CN109144676B - Self-starting detection method and device of application program and server - Google Patents

Self-starting detection method and device of application program and server Download PDF

Info

Publication number
CN109144676B
CN109144676B CN201710453136.1A CN201710453136A CN109144676B CN 109144676 B CN109144676 B CN 109144676B CN 201710453136 A CN201710453136 A CN 201710453136A CN 109144676 B CN109144676 B CN 109144676B
Authority
CN
China
Prior art keywords
component
application program
interface object
starting instruction
server
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
CN201710453136.1A
Other languages
Chinese (zh)
Other versions
CN109144676A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710453136.1A priority Critical patent/CN109144676B/en
Publication of CN109144676A publication Critical patent/CN109144676A/en
Application granted granted Critical
Publication of CN109144676B publication Critical patent/CN109144676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • G06F9/4862Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • 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/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • 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/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a self-starting detection method, a self-starting detection device and a self-starting detection server of an application program, wherein the self-starting detection method comprises the following steps: the agent interface object acquires a component starting instruction submitted by the application program; and the agent interface object analyzes the component starting instruction and uploads the analyzed target information to a server, and the server is used for judging whether the application program is started by itself according to the target information. In the embodiment of the application, when the application program is started, a proxy interface object for proxying an original interface object of ActivityThread on a mandatory path for starting an Android system component is generated. In the starting process of the application program, after the agent interface object acquires the component starting instruction, the component starting instruction is analyzed, and the target information obtained through analysis is uploaded to a preset server. The program developer can optimize the self-starting of the application according to the target information collected by the server, so that the power consumption and the CPU occupation of the application are reduced, the stability of the application is improved, and better user experience is created.

Description

Self-starting detection method and device of application program and server
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for detecting a self-start of an application.
Background
Thousands of application programs exist in the Android application market, and due to the openness of an Android system, various application programs are generally self-started to seize system CPU resources, so that the mobile phone has the phenomena of system blockage, high power consumption speed, serious heating and the like.
At present, some manufacturers can control the self-starting of an application program on the Android system level, for example, a millet mobile phone MIUI system adopts a technical means which is realized by generally modifying and customizing an Android system code; some security software companies develop third-party optimization tools to assist users in cleaning application processes, such as 360 security guards of the tiger 360-technology limited company, QQ mobile phone assistants, and leopard cleaning masters, and most of the technical measures are adopted to obtain all application information installed and running on the mobile phone, close startup broadcasting, change a broadcast receiver on a network, obtain root authority, clean background independent daemon processes, and the like. By means outside the application, the self-starting phenomenon is relieved to a certain extent, but the self-starting problem of the specific application program is not solved fundamentally.
Returning to the aspect of the application program, if the self-starting of the application program is not detected and monitored, a large amount of CPU resources are occupied, the power consumption is improved fastest, and the application program becomes killer-level application on a mobile phone system. Resulting in the user having to uninstall the application, or frequently charge, or restart the system. This is extremely disadvantageous to the promotion and growth of the application.
Disclosure of Invention
In view of the above problems, embodiments of the present application are proposed to provide a method for detecting a self-start of an application, a device for detecting a self-start of an application, and a server, which overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present application discloses a self-starting detection method for an application program, which generates an agent interface object; the method comprises the following steps:
the agent interface object acquires a component starting instruction submitted by the application program;
and the agent interface object analyzes the component starting instruction and uploads the analyzed target information to a server, and the server is used for judging whether the application program is started by itself according to the target information.
Preferably, the method further comprises:
when the application program is started, the application program sends a component starting instruction to a system activity management service module AMS;
the step of the proxy interface object acquiring the component starting instruction submitted by the application program comprises the following steps:
the agent interface object receives a component start instruction submitted by the application program, which is transmitted by the system activity management service module AMS.
Preferably, the method further comprises:
after receiving a component starting instruction submitted by the application program, the system activity management service module AMS creates a main thread ActivityThread aiming at the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback;
and the proxy interface object proxies the original Callback function Callback and distributes the component starting instruction to the corresponding system component to complete the starting of the component.
Preferably, the component start instruction includes: an interface Activity component starting instruction;
the step that the agent interface object analyzes the component starting instruction and uploads the target information obtained by analysis to the server comprises the following steps:
the agent interface object determines whether a component corresponding to the interface Activity component starting instruction is started for the first time;
and if so, the agent interface object analyzes the interface Activity component starting instruction and uploads the analyzed first target information to a server.
Preferably, the component activating instruction further comprises: a service component starting instruction;
the step of analyzing the component starting instruction by the agent interface object and uploading the target information obtained by analysis to the server further comprises the following steps:
the proxy interface object determines whether the component corresponding to the service component starting instruction is started for the first time;
and if so, the proxy interface object analyzes the service component starting instruction and uploads the second target information obtained by analysis to a server.
Preferably, the component activating instruction further comprises: broadcasting a receiver broadcasterever component start instruction;
the step of analyzing the component starting instruction by the agent interface object and uploading the target information obtained by analysis to the server further comprises the following steps:
the proxy interface object determines whether a component corresponding to a broadcast receiver BroadcastReceiver component starting instruction is started for the first time;
and if so, the agent interface object analyzes the broadcast receiver BroadcastReceiver component starting instruction and uploads the analyzed third target information to a server.
Preferably, the target information obtained by the analysis includes: the method comprises the following steps of component type information, content object detailed information of a transmission parameter of a starting component, a package name of the component, a component class name and a process name of the component.
The embodiment of the application also discloses a self-starting detection method of the application program, wherein the application program generates a proxy interface object; the agent interface object is used for receiving the component starting instruction submitted by the application program, analyzing the component starting instruction and uploading the target information obtained by analysis to a server;
the method comprises the following steps:
and the server judges whether the application program is self-started or not according to the target information.
Preferably, the step of the server determining whether the application is self-started according to the target information includes:
the server determines a first started component in a main process where the application program is located according to the target information obtained by analyzing;
and if the first started component in the main process is not the main entrance Activity declared in the configuration file by the application program, determining that the application program is self-started.
Preferably, the step of the server determining whether the application is self-started according to the target information further includes:
if the first started component in the main process is the main entry Activity declared in the configuration file by the application program, determining that the application program is normally started;
preferably, when the application program is started, the application program sends a component starting instruction to the system activity management service module AMS; after receiving a component starting instruction submitted by the application program, the system activity management service module AMS creates a main thread ActivityThread aiming at the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback; the proxy interface object is also used for proxy of the original Callback function Callback and distributing the component starting instruction to the corresponding system component so as to complete the starting of the component.
The embodiment of the application also discloses a self-starting detection device of the application program, the device comprises: the application program module and the proxy interface object module generated by the application program module; the proxy interface object module includes:
the component starting instruction acquisition submodule is used for acquiring a component starting instruction submitted by the application program;
and the analysis uploading sub-module is used for analyzing the component starting instruction and uploading the analyzed target information to a server, and the server is used for judging whether the application program is automatically started or not according to the target information.
The embodiment of the application also discloses a server, wherein the server is communicated with the proxy interface object; the agent interface object is generated by an application program and used for receiving a component starting instruction submitted by the application program, analyzing the component starting instruction and uploading target information obtained by analysis to a preset server;
the server comprises:
and the judging module is used for judging whether the application program is automatically started or not according to the target information.
The embodiment of the application has the following advantages:
in the embodiment of the application, when the application program is started, a proxy interface object for acting on an original interface object of ActivityThread on a mandatory path for starting an Android system component is generated. In the starting process of the application program, after the agent interface object acquires the component starting instruction, the component starting instruction is analyzed, and the target information obtained through analysis is uploaded to a preset server. The program developer can optimize the self-starting of the application according to the target information collected by the server, so that the power consumption and the CPU occupation of the application are reduced, the stability of the application is improved, and better user experience is created.
Drawings
FIG. 1 is an application startup process of an Android system;
FIG. 2 is a flowchart of an embodiment of a method for detecting self-initiation of an application program in an embodiment of the present application;
FIG. 3 is a flowchart of steps of embodiment 1 of a method for detecting self-initiation of an application program according to the present application;
FIG. 4 is a flowchart of the steps of embodiment 2 of a method for detecting the self-initiation of an application program according to the present application;
fig. 5 is a block diagram of an embodiment of a self-start detection apparatus for an application program according to the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The normal starting of the Android application program is triggered by clicking a program icon installed on a mobile phone screen by a user, and other situations all belong to the application self-starting category, such as starting up and self-starting of the application, being called by receiving broadcast or message push, being called by a background daemon process and the like.
Most of the existing automatic starting processes focus on the operation information of the application program obtained through the system bottom layer or the outside to prohibit the automatic starting of the application program.
Referring to fig. 1, an application program starting process of an Android system is shown. When the application is started, the application transmits a component start instruction to an AMS (activity management service) of the system. The AMS is the most core system service in the Android and is mainly responsible for the starting, switching and scheduling of four major components in the system, the management and scheduling of application processes and the like.
After receiving the component starting instruction, the AMS creates a main thread ActivityThread for the application program. Thereafter, ActivityThread creates a global Application object, which is executed normally. The AMS sends a component start instruction to ActivityThread. The ActivityThread performs an operation for a certain component according to the scheduling of the component start instruction transmitted by the AMS. The components comprise an interface Activity component, a Service component and a broadcast receiver broadcasterever component.
After the ActivityThread receives the component start instruction, the component start instruction is stored in the message queue of the ActivityThread. The component launch instructions in the queue are then distributed by a distribution message handler in the ActivityThread, the component launch instructions being distributed to the corresponding components to complete the launching of the components. According to the Android system working mechanism, the starting of a general application program is started through the starting of a component.
Fig. 2 is a flowchart of an embodiment of a method for detecting self-starting of an application program in this embodiment of the present application. When an application is started, the application sends a component start instruction to the AMS of the system. After receiving the component starting instruction, the AMS creates a main thread ActivityThread for the application program. Thereafter, ActivityThread creates a global Application object, which is executed normally. The AMS sends a component start instruction to ActivityThread.
When the Application object is invoked by ActivityThread, the Application creates a proxy interface object and injects the proxy interface object into ActivityThread to proxy the original interface object that distributed the message in ActivityThread. After the ActivityThread receives the component starting instruction, the component starting instruction is delivered to the agent interface object. And the proxy interface object determines the type of the component starting instruction and judges whether the component corresponding to the component instruction is started for the first time. If the starting is the first time, the proxy interface object analysis component starts an instruction, and target information obtained through analysis is reported to a preset server. Meanwhile, the proxy interface object still executes the function of the original interface object and distributes the component starting instruction to the corresponding component so as to complete the starting of the component. If the component corresponding to the component instruction is not started for the first time, the interface object is proxied, and the component starting instruction is directly distributed to the corresponding component to complete the starting of the component.
According to the android system mechanism, the starting of the component must be processed by ActivityThread. Therefore, in the embodiment of the present application, a method for detecting a self-start of an application program is provided. When the application program is started, generating a proxy interface object for acting on an original interface object of ActivityThread on a mandatory path for starting the Android system component. In the starting process of the application program, after the agent interface object acquires the component starting instruction, the component starting instruction is analyzed, and the target information obtained through analysis is uploaded to a preset server. The program developer can optimize the self-starting of the application according to the target information collected by the server, so that the power consumption and the CPU occupation of the application are reduced, the stability of the application is improved, and better user experience is created.
Referring to fig. 3, a flowchart of the steps of embodiment 1 of a method for detecting self-starting of an application program according to the present application is shown. Wherein, the application program generates a proxy interface object; the proxy interface object is used for proxy of the original interface object; the method specifically comprises the following steps:
step 101, the agent interface object obtains a component starting instruction submitted by the application program;
specifically, when an application is started, the application sends a component start instruction to the AMS of the system. After receiving the component starting instruction, the AMS creates a main thread ActivityThread for the application program. Thereafter, ActivityThread creates a global Application object, which is executed normally. The AMS sends a component start instruction to ActivityThread. After the ActivityThread receives the component starting instruction, the component starting instruction is delivered to the agent interface object.
The proxy interface object is created by the application after the application is started. More precisely, the proxy interface object is the original interface object created by the Application when the Application object is invoked by ActivityThread and injected ActivityThread to proxy the distribution message in ActivityThread.
In ActivityThread, the distribution of messages is handled by an internal member message Handler. The Handler includes an internal Callback function Callback through which the message Handler actually distributes messages to the various components to complete the launching of the components.
In the embodiment of the present application, the proxy interface object refers to a proxy Callback function Callback generated by an application program. The primitive interface object is the primitive Callback function Callback of the main thread ActivityThread. The message distribution function of the original Callback function Callback of the main thread ActivityThread is executed by the proxy Callback function Callback.
In the embodiment of the application, a dynamic proxy mode is adopted, and when the application program is started, the application program dynamically generates a proxy interface object.
In the embodiment of the present application, the dynamic proxy process is: when the application program is started, the application program reflects and resolves the original Callback function Callback under the Handler of the internal member of the ActivityThread object. The application program generates a proxy Callback function Callback, and replaces the original Callback function Callback with the proxy Callback function Callback, so that the function of the original Callback function Callback is realized by the proxy Callback function Callback.
And 102, the proxy interface object analyzes the component starting instruction and uploads target information obtained by analysis to a preset server, and the server is used for judging whether the application program is started by itself according to the target information.
In the embodiment of the application, the proxy interface object has a function of analyzing the starting component and uploading the target information obtained by analysis to the server besides the function of realizing the original function.
In an embodiment of the present application, the component start instruction includes: an interface Activity component start instruction, a service component start instruction and a broadcast receiver broadcastdetect component start instruction.
When the component starting instruction is an interface Activity component starting instruction, the interface object is proxied, and whether the component corresponding to the interface Activity component starting instruction is started for the first time or not is determined;
if the starting is the first time, the agent interface object analyzes the starting instruction of the interface Activity component, and uploads the analyzed first target information to a preset server.
When the component starting instruction is a service component starting instruction, the interface object is proxied to determine whether the component corresponding to the service component starting instruction is started for the first time;
if the first time, the agent interface object analyzes the service component starting instruction, and uploads the second target information obtained by analysis to a preset server.
When the component starting instruction is a broadcast receiver BroadcastReceiver component starting instruction, the agent interface object determines whether a component corresponding to the broadcast receiver BroadcastReceiver component starting instruction is started for the first time;
if the broadcast receiver BroadcastReceiver component is started for the first time, the agent interface object analyzes a broadcast receiver BroadcastReceiver component starting instruction and uploads the analyzed third target information to a preset server.
In this embodiment of the present application, the target information obtained by analyzing the component start instruction may include the following 5 pieces of information: the method comprises the following steps of component type information, content object detailed information of a transmission parameter of a starting component, a package name of the component, a component class name and a process name of the component. The server can determine whether the application program is self-started or not and the component object causing the self-starting according to the target information.
The server analyzes the target information reported by the proxy interface object and determines which component is the first one to be started in the main process of the application. If the application program declares the main entrance MainActivity in the configuration file Android manifest, the starting is normal starting when the user clicks the icon; if the component is other components, including components such as non-primary portal Activity, Service, BroadcastReceiver and the like, the component belongs to application self-starting. Further, the server can more accurately locate which component triggers the self-starting according to the component information on the sub-process. The program developer can optimize the self-starting of the application according to the target information collected by the server, so that the power consumption and the CPU occupation of the application are reduced, the stability of the application is improved, and better user experience is created.
Referring to fig. 4, a flowchart of the steps of embodiment 2 of a method for detecting self-starting of an application program is shown. Wherein the application generates a proxy interface object; the agent interface object is used for receiving the component starting instruction submitted by the application program, analyzing the component starting instruction and uploading target information obtained by analysis to a preset server; the method specifically comprises the following steps:
step 201, the server determines whether the application program is self-started according to the target information.
The original interface object is an original Callback function Callback of a main thread ActivityThread;
when an application is started, the application sends a component start instruction to the AMS. After receiving the component starting instruction, the AMS creates a main thread ActivityThread for the application program. Thereafter, ActivityThread creates a global Application object, which is executed normally. The AMS sends a component start instruction to ActivityThread. After the ActivityThread receives the component starting instruction, the component starting instruction is delivered to the agent interface object. The proxy interface object determines the type of the component starting instruction and judges whether the component corresponding to the component instruction is started for the first time. If the server is started for the first time, the proxy interface object analysis component starts an instruction, and target information obtained through analysis is reported to a preset server.
The proxy interface object is generated by the application after the application is started. More precisely, the proxy interface object is the original interface object created by the Application when the Application object is invoked by ActivityThread and injected ActivityThread to proxy the distribution message in ActivityThread.
The target information reported by the proxy interface object may include: the method comprises the following steps of component type information, content object detailed information of a transmission parameter of a starting component, a package name of the component, a component class name and a process name of the component.
Specifically, the server determines a first started component in a main process where the application program is located according to the target information obtained by the analysis;
and if the first started component in the main process is not the main entrance Activity declared in the configuration file by the application program, determining that the application program is self-started.
If the first started component in the main process is the main entry Activity declared in the configuration file by the application program, determining that the application program is normally started;
in the Android system, each application program has a main process, most of logic of the application program runs on the main process, and the name of the main process is the package name of the application program. Through the five types of information reported by the proxy interface object, the first started component in the main process can be known.
An application may have multiple sub-processes in addition to a main process. The sub-process is usually used for doing some background time-consuming tasks or message pushing. The communication interaction between the main process and the sub-process is actually completed through Activity/Service/broadcastireiver and other system components, and the operation of the components in which process is actually determined by component configuration information in a configuration file Android manifest.
The sub-process component information is similar to the main process, and is also the above five types of information. The self-starting is that a sub-process calls a certain component defined in a main process through the running of the certain component. By reporting the information of the first started component in each process, the self-starting of which component in which subprocess is triggered can be directly found out.
The server can determine whether the application program is self-started or not according to the target information reported by the proxy interface object. The source of the self-starting of the application program, the self-starting frequency and the severity degree, thereby controlling and optimizing the application program, improving the user experience,
it should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 5, a block diagram of an embodiment of a self-starting detection apparatus for an application program according to the present application is shown, and specifically, the block diagram may include the following modules: an application module 31, and a proxy interface object module 32 generated by the application module; the proxy interface object module 32 may include:
a component start instruction obtaining submodule 321, configured to obtain a component start instruction submitted by the application program;
and the analysis uploading submodule 322 is configured to analyze the component starting instruction, and upload the analyzed target information to a preset server, where the server is configured to determine whether the application program is self-started according to the target information.
In this embodiment, the application module 31 may further include:
the module starting instruction sending submodule is used for sending a module starting instruction to the system activity management service module AMS when the application program is started;
the component starting instruction obtaining submodule comprises:
and the component starting instruction receiving unit is used for receiving a component starting instruction sent by the system activity management service module AMS and submitted by the application program.
In an embodiment of the present application, the apparatus may further include: a system activity management service module AMS; the system activity management service module AMS comprises:
the main thread establishing submodule is used for establishing a main thread ActivityThread aiming at the application program after receiving an assembly starting instruction submitted by the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback;
the proxy interface object module further comprises:
and the proxy distribution submodule is used for proxying the original Callback function Callback and distributing the component starting instruction to the corresponding system component so as to complete the starting of the component.
In an embodiment of the present application, the component start instruction includes: an interface Activity component initiating instruction;
the parsing upload sub-module 322 may include:
the first starting determining unit is used for determining whether the component corresponding to the interface Activity component starting instruction is started for the first time;
the first analysis uploading unit is used for analyzing the interface Activity component starting instruction if the component corresponding to the interface Activity component starting instruction is started for the first time, and uploading the first target information obtained through analysis to a preset server.
In an embodiment of the present application, the component activating instruction further includes: a service component starting instruction;
the parsing upload sub-module 322 may further include:
the second starting determining unit is used for determining whether the component corresponding to the service component starting instruction is started for the first time;
and the second analysis uploading unit is used for analyzing the service component starting instruction and uploading second target information obtained by analysis to a preset server if the component corresponding to the service component starting instruction is started for the first time.
In an embodiment of the present application, the component activating instruction further includes: broadcasting a receiver broadcasterever component start instruction;
the parsing upload sub-module 322 may further include:
a third starting determining unit, configured to determine whether a component corresponding to the broadcastrechiver component starting instruction of the broadcast receiver is started for the first time;
and the third analysis uploading unit is used for analyzing the broadcast receiver BroadcastReceiver component starting instruction if the component corresponding to the broadcast receiver BroadcastReceiver component starting instruction is started for the first time, and uploading the analyzed third target information to a preset server.
In this embodiment of the present application, the target information obtained by the analysis includes: the method comprises the following steps of component type information, content object detailed information of a transmission parameter of a starting component, a package name of the component, a component class name and a process name of the component.
The embodiment of the application also discloses a server, wherein the server is communicated with the proxy interface object; the agent interface object is generated by an application program and used for receiving a component starting instruction submitted by the application program, analyzing the component starting instruction and uploading target information obtained by analysis to a preset server;
the server comprises:
and the judging module is used for judging whether the application program is automatically started or not according to the target information.
In an embodiment of the present application, the determining module may include:
a main process component determining submodule, configured to determine, according to the target information obtained through the analysis, a first started component in a main process where the application program is located;
and the self-starting determining submodule is used for determining that the application program is self-starting if the first started component in the main process is not the main entry Activity declared in the configuration file by the application program.
In this embodiment of the application, the determining module may further include:
the normal starting determining submodule is used for determining that the application program is normally started if the first started component in the main process is the main entry Activity declared in the configuration file by the application program;
in the embodiment of the application, when the application program is started, the application program sends a component starting instruction to the system activity management service module AMS; after receiving a component starting instruction submitted by the application program, the system activity management service module AMS creates a main thread ActivityThread aiming at the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback; the proxy interface object is also used for proxy of the original Callback function Callback and distributing the component starting instruction to the corresponding system component so as to complete the starting of the component.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. 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 terminal that comprises the element.
The application program self-starting detection method, the application program self-starting detection device and the server provided by the application program are introduced in detail, specific examples are applied in the text to explain the principle and the implementation mode of the application program, and the description of the above examples is only used for helping to understand the method and the core idea of the application program; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. A self-starting detection method of an application program is characterized in that a proxy interface object is generated; the method comprises the following steps:
the agent interface object acquires a component starting instruction submitted by the application program, and the component starting instruction is sent to the agent interface object by ActivityThread;
and the agent interface object analyzes the component starting instruction and uploads the analyzed target information to a server, and the server is used for judging whether the application program is started by itself according to the target information.
2. The method of claim 1, further comprising:
when the application program is started, the application program sends a component starting instruction to a system activity management service module AMS;
the step of the proxy interface object acquiring the component starting instruction submitted by the application program comprises the following steps:
the agent interface object receives a component start instruction submitted by the application program, which is transmitted by the system activity management service module AMS.
3. The method of claim 2, further comprising:
after receiving a component starting instruction submitted by the application program, the system activity management service module AMS creates a main thread ActivityThread aiming at the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback;
and the proxy interface object proxies the original Callback function Callback and distributes the component starting instruction to the corresponding system component to complete the starting of the component.
4. The method of claim 2, wherein the component launch instruction comprises: an interface Activity component starting instruction;
the step that the agent interface object analyzes the component starting instruction and uploads the target information obtained by analysis to the server comprises the following steps:
the agent interface object determines whether the component corresponding to the interface Activity component starting instruction is started for the first time;
and if so, the agent interface object analyzes the interface Activity component starting instruction and uploads the analyzed first target information to a server.
5. The method of claim 4, wherein the component launch instructions further comprise: a service component starting instruction;
the step of analyzing the component starting instruction by the agent interface object and uploading the target information obtained by analysis to the server further comprises the following steps:
the proxy interface object determines whether the component corresponding to the service component starting instruction is started for the first time;
and if so, the proxy interface object analyzes the service component starting instruction and uploads the second target information obtained by analysis to a server.
6. The method of claim 5, wherein the component launch instructions further comprise: broadcasting a receiver broadcasterever component start instruction;
the step of analyzing the component starting instruction by the agent interface object and uploading the target information obtained by analysis to the server further comprises the following steps:
the proxy interface object determines whether a component corresponding to a broadcast receiver BroadcastReceiver component starting instruction is started for the first time;
and if so, the agent interface object analyzes the broadcast receiver BroadcastReceiver component starting instruction and uploads the analyzed third target information to a server.
7. The method of claim 2, wherein the parsed target information comprises: the method comprises the following steps of component type information, content object detailed information of a transmission parameter of a starting component, a package name of the component, a component class name and a process name of the component.
8. The self-starting detection method of the application program is characterized in that the application program generates a proxy interface object; the agent interface object is used for receiving a component starting instruction submitted by the application program, the component starting instruction is sent to the agent interface object by ActivityThread, the component starting instruction is analyzed, and target information obtained by analysis is uploaded to a server;
the method comprises the following steps:
and the server judges whether the application program is started by itself or not according to the target information.
9. The method of claim 8, wherein the step of the server determining whether the application is self-started according to the target information comprises:
the server determines a first started component in a main process where the application program is located according to the target information obtained by analyzing;
and if the first started component in the main process is not the main entrance Activity declared in the configuration file by the application program, determining that the application program is self-started.
10. The method of claim 9, wherein the step of the server determining whether the application is self-started based on the target information further comprises:
and if the first started component in the main process is the main entrance Activity declared in the configuration file by the application program, determining that the application program is normally started.
11. The method of claim 8, wherein when the application program is started, the application program sends a component start instruction to the system activity management service module AMS; after receiving a component starting instruction submitted by the application program, the system activity management service module AMS creates a main thread ActivityThread aiming at the application program; the main thread ActivityThread comprises an internal member object message processing module Handler, and the message processing module Handler comprises an original Callback function Callback; the proxy interface object is also used for proxy of the original Callback function Callback and distributing the component starting instruction to the corresponding system component so as to complete the starting of the component.
12. An apparatus for detecting the self-initiation of an application, the apparatus comprising: the application program module and the proxy interface object module generated by the application program module; the proxy interface object module includes:
the component starting instruction acquisition submodule is used for acquiring a component starting instruction submitted by the application program, and the component starting instruction is sent to the component starting instruction acquisition submodule by ActivityThread;
and the analysis uploading sub-module is used for analyzing the component starting instruction and uploading the analyzed target information to a server, and the server is used for judging whether the application program is automatically started or not according to the target information.
13. A server, wherein the server is in communication with a proxy interface object; the agent interface object is generated by an application program and used for receiving a component starting instruction submitted by the application program, the component starting instruction is sent to the agent interface object by ActivityThread, the component starting instruction is analyzed, and target information obtained by analysis is uploaded to a preset server;
the server comprises:
and the judging module is used for judging whether the application program is automatically started or not according to the target information.
CN201710453136.1A 2017-06-15 2017-06-15 Self-starting detection method and device of application program and server Active CN109144676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710453136.1A CN109144676B (en) 2017-06-15 2017-06-15 Self-starting detection method and device of application program and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710453136.1A CN109144676B (en) 2017-06-15 2017-06-15 Self-starting detection method and device of application program and server

Publications (2)

Publication Number Publication Date
CN109144676A CN109144676A (en) 2019-01-04
CN109144676B true CN109144676B (en) 2022-05-17

Family

ID=64830142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710453136.1A Active CN109144676B (en) 2017-06-15 2017-06-15 Self-starting detection method and device of application program and server

Country Status (1)

Country Link
CN (1) CN109144676B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328316B (en) * 2019-08-02 2023-01-24 Tcl科技集团股份有限公司 APP optimization method, mobile terminal and storage medium
CN111708586B (en) * 2020-06-22 2023-06-20 平安养老保险股份有限公司 Application starting configuration item loading method and device, computer equipment and storage medium
CN113934519B (en) * 2021-08-10 2022-08-02 荣耀终端有限公司 Application scheduling method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123162A (en) * 2014-07-29 2014-10-29 北京奇虎科技有限公司 Method and device controlling self-starting of application programs
CN104462952A (en) * 2014-12-31 2015-03-25 北京奇虎科技有限公司 Method and device for preventing self-starting of application
CN104462978A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and device for application program authority management
CN104714813A (en) * 2013-12-13 2015-06-17 航天信息股份有限公司 Android database lazy loading method based on proxy mode
CN105094278A (en) * 2015-06-30 2015-11-25 努比亚技术有限公司 information processing method and device
CN105786579A (en) * 2016-03-28 2016-07-20 联想(北京)有限公司 Processing method and device as well as program start stopping method and device
US9479357B1 (en) * 2010-03-05 2016-10-25 Symantec Corporation Detecting malware on mobile devices based on mobile behavior analysis
CN106407098A (en) * 2015-07-27 2017-02-15 腾讯科技(深圳)有限公司 Application program state monitoring method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335176B (en) * 2014-07-22 2019-10-25 南京中兴软件有限责任公司 A kind of method and device for calling the application being installed on electronic equipment
CN104298932B (en) * 2014-10-27 2017-12-12 中国建设银行股份有限公司 A kind of call method and device of SO files

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9479357B1 (en) * 2010-03-05 2016-10-25 Symantec Corporation Detecting malware on mobile devices based on mobile behavior analysis
CN104714813A (en) * 2013-12-13 2015-06-17 航天信息股份有限公司 Android database lazy loading method based on proxy mode
CN104123162A (en) * 2014-07-29 2014-10-29 北京奇虎科技有限公司 Method and device controlling self-starting of application programs
CN104462978A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and device for application program authority management
CN104462952A (en) * 2014-12-31 2015-03-25 北京奇虎科技有限公司 Method and device for preventing self-starting of application
CN105094278A (en) * 2015-06-30 2015-11-25 努比亚技术有限公司 information processing method and device
CN106407098A (en) * 2015-07-27 2017-02-15 腾讯科技(深圳)有限公司 Application program state monitoring method and device
CN105786579A (en) * 2016-03-28 2016-07-20 联想(北京)有限公司 Processing method and device as well as program start stopping method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
AMS 如何管控 Activity/Service/Broadcast的?;CCJHDOPC;《https://blog.csdn.net/CCJHDOPC/article/details/71566347》;20170510;1-6 *
Android设计模式之代理模式 Proxy;Jesse-csdn;《https://blog.csdn.net/l2show/article/details/46992495》;20150728;1-14 *
一种Andriod系统启动后自动运行应用的方法;陈鹏 等;《电子技术与软件工程》;20140115;115-116 *

Also Published As

Publication number Publication date
CN109144676A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN106708899B (en) Automatic point burying method and device
CN109144676B (en) Self-starting detection method and device of application program and server
US20120311128A1 (en) Performance testing in a cloud environment
US20120079105A1 (en) Application Processor Apparatus and Method for Monitoring A Wireless Communication Network
CN110659123B (en) Distributed task distribution scheduling method and device based on message
CN108804215B (en) Task processing method and device and electronic equipment
KR101349805B1 (en) Method for scheduling device managemnt using trap mechanism and terminal thereof
CN105302722B (en) CTS automatic testing method and device
EP2382811A2 (en) Programmable agent for monitoring mobile communication in a wireless communication network
CN108600034B (en) Service pressure management method, device, equipment, system and storage medium
CN109558304B (en) Component association analysis method and device and electronic equipment
CN111106976B (en) Detection method and device for CDN network, electronic equipment and readable storage medium
CN109560976B (en) Message delay monitoring method and device
CN111190573A (en) Application program point burying method and device and electronic equipment
CN110764894A (en) Timed task management method, device, equipment and storage medium
CN110618869A (en) Resource management method, device and equipment
US8104037B2 (en) Terminal and method for performing device management scheduled based on threshold
KR102118487B1 (en) Automatic quality inspection system and method of container based application for ci/cd
CN106775620B (en) Timing method and device
CN106294119B (en) Test scheduling system and method and terminal equipment
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
KR100700608B1 (en) Method for interacting with user in managing device and terminal thereof
CN112765246A (en) Task processing method and device, electronic equipment and storage medium
CN110858829B (en) Video processing method, device and system, analysis server and transcoding server
CN112732265A (en) Data processing method and related device

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