CN109144676A - A kind of self-starting detection method, device and the server of application program - Google Patents

A kind of self-starting detection method, device and the server of application program Download PDF

Info

Publication number
CN109144676A
CN109144676A CN201710453136.1A CN201710453136A CN109144676A CN 109144676 A CN109144676 A CN 109144676A CN 201710453136 A CN201710453136 A CN 201710453136A CN 109144676 A CN109144676 A CN 109144676A
Authority
CN
China
Prior art keywords
component
application program
enabled instruction
server
starting
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.)
Granted
Application number
CN201710453136.1A
Other languages
Chinese (zh)
Other versions
CN109144676B (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

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 present application provides self-starting detection method, device and the server of a kind of application program, comprising: the component enabled instruction that application program described in proxy interface object acquisition is submitted;Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to server, whether the server is used to determine application program by self-starting according to the target information.In the embodiment of the present application, when application program launching, the proxy interface object of the clean interface object of the ActivityThread on the necessary path for acting on behalf of the starting of android system component is generated.In the Booting sequence of application program, after proxy interface object acquisition component enabled instruction, component enabled instruction is parsed, and the target information that parsing obtains is uploaded to predetermined server.Allow program developer to optimize the self-starting of application according to the target information that server is collected, is occupied with reducing using power consumption and CPU, promote the stability of application, make better user experience.

Description

A kind of self-starting detection method, device and the server of application program
Technical field
This application involves fields of communication technology, more particularly to a kind of self-starting detection method of application program, Yi Zhongying With the self-starting detection device and server of program.
Background technique
There are thousands of a application programs in Android application market, due to the opening of android system itself Property, lead to the generally existing self-starting of various application programs, seize system CPU resource, so that mobile phone generation system Caton, power consumption speed Degree is fast, generates heat phenomena such as serious.
Some manufacturers can control application program self-starting in android system level at present, such as millet mobile phone MIUI system, taking technological means is usually to modify customization android system code to realize;It is opened there are also some security software companies Third party's optimization tool is sent out, auxiliary user clears up application process, such as 360 security guards of 360 Science and Technology Ltd. of Qihoo, QQ hand Machine aided hand, cheetah cleaning great master etc., taking technological means mostly is by obtaining all installations on mobile phone, and what is be currently running answers With information, booting broadcast is closed, network change radio receiver obtains independent finger daemon of root authority and cleaning backstage etc.. By the means outside these applications, self-starting phenomenon obtains to be alleviated to a certain extent, but does not solve specific application from the root Program self-starting problem.
It returns to for application program itself, if the self-starting of itself not being detected and being monitored, it will occupy a large amount of Cpu resource, raising power consumption is most fast, becomes the Killer application on cell phone system.Have to lay down using journey so as to cause user Sequence perhaps frequent charge or restarts system.This is extremely disadvantageous to the popularization and growth of application program.
Summary of the invention
In view of the above problems, it proposes the embodiment of the present application and overcomes the above problem or at least partly in order to provide one kind A kind of self-starting detection method of the application program to solve the above problems, a kind of self-starting detection device of application program and service Device.
To solve the above-mentioned problems, the embodiment of the present application discloses a kind of self-starting detection method of application program, generates There is proxy interface object;The method includes:
The component enabled instruction that application program described in the proxy interface object acquisition is submitted;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to service Whether device, the server are used to determine application program by self-starting according to the target information.
Preferably, the method also includes:
When application program launching, application program is to system activity management services module AMS sending assembly enabled instruction;
Application program described in the proxy interface object acquisition submit component enabled instruction the step of include:
The proxy interface object receive by the system activity management services module AMS send by the application program The component enabled instruction of submission.
Preferably, the method also includes:
The system activity management services module AMS after receiving the component enabled instruction that the application program is submitted, Main thread ActivityThread is created for the application program;Wherein, the main thread ActivityThread includes interior Portion member object message processing module Handler, the message processing module Handler include original call back function Callback;
Original call back function Callback described in the proxy interface object broker, the component enabled instruction is distributed to Corresponding system component, to complete the starting of component.
Preferably, the component enabled instruction includes: interface A ctivity component enabled instruction;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to service The step of device includes:
The proxy interface object determines whether the corresponding component of interface A ctivity component enabled instruction is to start for the first time;
If so, interface A ctivity component enabled instruction described in the proxy interface analysis of object, and parsing is obtained First object information be uploaded to server.
Preferably, the component enabled instruction further include: service service component enabled instruction;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to service The step of device further include:
The proxy interface object determines whether the corresponding component of service service component enabled instruction is to start for the first time;
If so, the enabled instruction of service component is serviced described in the proxy interface analysis of object, and parsing is obtained Second target information is uploaded to server.
Preferably, the component enabled instruction further include: the starting of radio receiver BroadcastReceiver component refers to It enables;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to service The step of device further include:
The proxy interface object determines the corresponding component of radio receiver BroadcastReceiver component enabled instruction It whether is to start for the first time;
If so, the starting of radio receiver BroadcastReceiver component described in the proxy interface analysis of object refers to It enables, and the third target information that parsing obtains is uploaded to server.
Preferably, the obtained target information that parses includes: component type information, the Transfer Parameters for starting component Packet name, component class name, the run process name of component where Intent object details, component.
The embodiment of the present application also discloses a kind of self-starting detection method of application program, and the application program generates agency Interface object;The proxy interface object is used to receive the component enabled instruction that the application program is submitted, and parses the component Enabled instruction, and the target information that parsing obtains is uploaded to server;
The method includes:
Whether the server determines application program by self-starting according to the target information.
Preferably, the server determines whether the step of self-starting is included: application program according to the target information
The server parses obtained target information according to described, determines in the host process where application program first The component being activated;
If first component being activated is entered by master of the application program statement in configuration file in the host process Mouth Activity, it is determined that application program is self-starting.
Preferably, the server determines whether application program is also wrapped the step of self-starting according to the target information It includes:
If the first component being activated is to state the main-inlet in configuration file by application program in the host process Activity, it is determined that application program is normal starting;
Preferably, when application program launching, application program starts to system activity management services module AMS sending assembly Instruction;The system activity management services module AMS after receiving the component enabled instruction that the application program is submitted, for The application program creates main thread ActivityThread;The main thread ActivityThread includes internal members' object Message processing module Handler, the message processing module Handler include original call back function Callback;The agency Interface object is also used to act on behalf of the original call back function Callback, and the component enabled instruction is distributed to corresponding system Component, to complete the starting of component.
The embodiment of the present application also discloses a kind of self-starting detection device of application program, and the device includes: application The proxy interface object module that program module and the application program module generate;The proxy interface object module includes:
Component enabled instruction acquisition submodule, the component enabled instruction submitted for obtaining the application program;
Parsing uploads submodule, is uploaded to for parsing the component enabled instruction, and by the target information that parsing obtains Whether server, the server are used to determine application program by self-starting according to the target information.
The embodiment of the present application also discloses a kind of server, the server and proxy interface object communication;The agency Interface object is generated by application program, and the component enabled instruction submitted for receiving the application program parses the component and opens Dynamic instruction, and the target information that parsing obtains is uploaded to predetermined server;
The server includes:
Judgment module, for determining application program whether by self-starting according to the target information.
The embodiment of the present application includes the following advantages:
In the embodiment of the present application, when application program launching, generate for act on behalf of android system component starting must The proxy interface object of clean interface object through the ActivityThread on path.In the Booting sequence of application program, The target information that after proxy interface object acquisition component enabled instruction, component enabled instruction is parsed, and parsing is obtained It is uploaded to predetermined server.Program developer is allowed to optimize opening certainly for application according to the target information that server is collected It is dynamic, it is occupied with reducing using power consumption and CPU, promotes the stability of application, make better user experience.
Detailed description of the invention
Fig. 1 is the application program launching process of android system;
Fig. 2 is the flow chart of the self-starting detection method embodiment of one of the embodiment of the present application application program;
Fig. 3 is a kind of step flow chart of the self-starting detection method embodiment 1 of application program of the application;
Fig. 4 is a kind of step flow chart of the self-starting detection method embodiment 2 of application program of the application;
Fig. 5 is a kind of structural block diagram of the self-starting detection device embodiment of application program of the application.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Applying mode, the present application will be further described in detail.
It is to click mobile phone screen institute installation procedure icon by user to trigger that Android application program, which normally starts, His situation all belongs to receive broadcast using self-starting scope, such as application booting self-starting or message push is invoked, by backstage Finger daemon arouses.
The existing process that opens automatically stresses mostly through system bottom, or the external operation information for obtaining application program, To forbid application program self-starting.
It is referring to Fig.1 the application program launching process of android system.When application program is activated, application program to AMS (ActivityManagerService, campaign management services module) sending assembly enabled instruction of system.AMS is Most crucial system service in Android is mainly responsible for the starting, switching, scheduling of four big components and application process in system The work such as management and scheduling.
After AMS receives component enabled instruction, a main thread ActivityThread is created for application program.Later, ActivityThread creates a global application Application object, and Application object is performed normally.AMS will Component enabled instruction is sent to ActivityThread.ActivityThread is according to the tune of the AMS component enabled instruction sent Degree executes the operation for being directed to some component.Wherein, signified component includes interface A ctivity component, service Service group Part, radio receiver BroadcastReceiver component.
After ActivityThread receives component enabled instruction, component enabled instruction is stored in In the message queue of ActivityThread.Then by the dispatch messages processor in ActivityThread by the group in queue Part enabled instruction is distributed, and component enabled instruction is distributed to corresponding component to complete the starting of component.According to Android System working mechanism, the starting for being normally applied program are started by the starting of component.
It is the flow chart of the self-starting detection method embodiment of one of the embodiment of the present application application program referring to Fig. 2. When application program is activated, AMS sending assembly enabled instruction of the application program to system.AMS receives component enabled instruction Afterwards, a main thread ActivityThread is created for application program.Later, ActivityThread creates a global application Application object, Application object are performed normally.Component enabled instruction is sent to by AMS ActivityThread。
When Application object is called by ActivityThread, application program creates proxy interface object, and will Proxy interface object injects ActivityThread, to act on behalf of the clean interface object of dispatch messages in ActivityThread. After ActivityThread receives component enabled instruction, proxy interface object is transferred into component enabled instruction.Proxy interface object Determine the type of component enabled instruction, and determination component instructs whether corresponding component is to start for the first time.If starting for the first time, generation The enabled instruction of interface object resolution component is managed, and the target information that parsing obtains is reported into predetermined server.Meanwhile proxy interface Object still carries out the function of clean interface object, and component enabled instruction is distributed to corresponding component, to complete opening for component It is dynamic.If it is not to be started for the first time that component, which instructs corresponding component, component enabled instruction is directly distributed to by proxy interface object Corresponding component, to complete the starting of component.
According to Android system mechanism, the starting of component has to pass through ActivityThread processing.Therefore the application is real It applies in example, proposes a kind of self-starting detection method of application program.When application program launching, generate for acting on behalf of Android The proxy interface object of the clean interface object of ActivityThread on the necessary path of system component starting.Applying journey In the Booting sequence of sequence, after proxy interface object acquisition component enabled instruction, component enabled instruction is parsed, and will parsing Obtained target information is uploaded to predetermined server.The target information that program developer is collected according to server is come excellent Change the self-starting of application, is occupied with reducing using power consumption and CPU, promote the stability of application, make better user experience.
Referring to Fig. 3, a kind of step process of the self-starting detection method embodiment 1 of application program of the application is shown Figure.Wherein, the application program generation has proxy interface object;The proxy interface object is for acting on behalf of clean interface object; The method can specifically include following steps:
Step 101, the component enabled instruction that application program described in the proxy interface object acquisition is submitted;
Specifically, when application program is activated, AMS sending assembly enabled instruction of the application program to system.AMS is received To after component enabled instruction, a main thread ActivityThread is created for application program.Later, ActivityThread is created A global application Application object is built, Application object is performed normally.AMS sends component enabled instruction To ActivityThread.After ActivityThread receives component enabled instruction, proxy interface is transferred into component enabled instruction Object.
After proxy interface object is application program launching, created by application program.More accurately, proxy interface object is It when Application object is called by ActivityThread, is created by application program, and injects ActivityThread, To act on behalf of the clean interface object of dispatch messages in ActivityThread.
In ActivityThread, the distribution of message is responsible for by internal member's message handling device Handler. Handler includes internal call back function Callback, and message handling device Handler is indeed through internal call back function Callback is by message distribution to various components, to complete the starting of component.
In the embodiment of the present application, proxy interface object, which refers to, acts on behalf of call back function by what application program generated Callback.Clean interface object is the original call back function Callback of main thread ActivityThread.By acting on behalf of back Letter of transfer number Callback executes the message distribution function of the original call back function Callback of main thread ActivityThread.
In the embodiment of the present application, dynamic proxy mode is used, when application program launching, application program dynamic Generate proxy interface object.
In the embodiment of the present application, the process of dynamic proxy are as follows: in application program launching, application program reflection parsing Original call back function Callback under the Handler of ActivityThread object internal members.Application program generates agency Call back function Callback, and original call back function Callback is replaced using call back function Callback is acted on behalf of, thus by generation Reason call back function Callback realizes the function of original call back function Callback.
Step 102, component enabled instruction described in the proxy interface analysis of object, and in the target information that parsing is obtained Predetermined server is reached, the server is used to determine application program whether by self-starting according to the target information.
In the embodiment of the present application, proxy interface object also has parsing other than the function that original function may be implemented Start component, and the target information that parsing obtains is uploaded to the function of server.
In the embodiment of the present application, component enabled instruction includes: the enabled instruction of interface A ctivity component, service The enabled instruction of service component and radio receiver BroadcastReceiver component enabled instruction.
When component enabled instruction is interface A ctivity component enabled instruction, proxy interface object determines interface Whether the corresponding component of Activity component enabled instruction is to start for the first time;
If starting for the first time, then proxy interface analysis of object interface A ctivity component enabled instruction, and parsing is obtained First object information be uploaded to predetermined server.
When component enabled instruction is service service component enabled instruction, proxy interface object determines service Whether the corresponding component of service component enabled instruction is to start for the first time;
If starting for the first time, then proxy interface analysis of object services the enabled instruction of service component, and parsing is obtained Second target information is uploaded to predetermined server.
When component enabled instruction is radio receiver BroadcastReceiver component enabled instruction, proxy interface pair As determining whether the corresponding component of radio receiver BroadcastReceiver component enabled instruction is to start for the first time;
If starting for the first time, then proxy interface analysis of object radio receiver BroadcastReceiver component starting refers to It enables, and the third target information that parsing obtains is uploaded to predetermined server.
In the embodiment of the present application, the target information that resolution component enabled instruction obtains may include following 5 information: group Packet name, component class name, component institute where part type information, the Transfer Parameters Intent object details for starting component, component Run process name.Server according to target information can determine application program whether self-starting, and cause the component of self-starting Object.
The target information that server analysis proxy interface object reports, and first quilt in the host process of determining application program Which the component of starting is.The main-inlet in configuration file Android manifest is stated if it is by application program MainActivity, then this starting is that user's click icon normally starts;If it is other assemblies, including non-main-inlet The components such as Activity, Service, BroadcastReceiver then belong to application program self-starting.Further, server Can be according to the module information on subprocess, which component triggering self-starting is more accurately positioned is.So that program developer can be with Optimize the self-starting of application according to the target information that server is collected, is occupied with reducing using power consumption and CPU, promote application Stability makes better user experience.
Referring to Fig. 4, a kind of step process of the self-starting detection method embodiment 2 of application program of the application is shown Figure.Wherein, the application program generates proxy interface object;The proxy interface object is submitted for receiving the application program Component enabled instruction, parse the component enabled instruction, and the target information that parsing obtains is uploaded to predetermined server;Institute The method stated can specifically include following steps:
Step 201, whether the server determines application program by self-starting according to the target information.
Clean interface object is the original call back function Callback of main thread ActivityThread;
When application program is activated, application program is to AMS sending assembly enabled instruction.AMS receives component starting and refers to After order, a main thread ActivityThread is created for application program.Later, ActivityThread creates an overall situation and answers With Application object, Application object is performed normally.Component enabled instruction is sent to by AMS ActivityThread.After ActivityThread receives component enabled instruction, proxy interface pair is transferred into component enabled instruction As.Proxy interface object determines the type of component enabled instruction, and determination component instructs whether corresponding component is started for the first time. If starting for the first time, proxy interface analysis of object component enabled instruction, and the target information that parsing obtains is reported into preset service Device.
After proxy interface object is application program launching, generated by application program.More accurately, proxy interface object It is to be created by application program, and inject when Application object is called by ActivityThread ActivityThread, to act on behalf of the clean interface object of dispatch messages in ActivityThread.
The target information that proxy interface object reports may include: component type information, the Transfer Parameters for starting component Packet name, component class name, the run process name of component where Intent object details, component.
Specifically, the server determines the host process where application program according to the target information for parsing and obtaining In first component being activated;
If first component being activated is entered by master of the application program statement in configuration file in the host process Mouth Activity, it is determined that application program is self-starting.
If the first component being activated is to state the main-inlet in configuration file by application program in the host process Activity, it is determined that application program is normal starting;
In android system, each application program has a host process, and application program overwhelming majority logic operation exists In this process, the packet name of the entitled application program of host process.Five category informations reported by proxy interface object, that is, may know that it is main into Which first component being activated be in journey.
Application program is in addition to there are a host processes, it is also possible to which there are multiple subprocess.Subprocess be usually do it is some after Platform consuming task or message push use.The communication interaction of host process and subprocess really passes through Activity/ The system components such as Service/BroadcastReceiver are completed, these assembly operatings are being really by configuring in which process Module configuration information determines in file Android manifest.
Subprocess module information is similar with host process and above-mentioned five category information.Self-starting is often that subprocess passes through certain Some component defined in host process has been aroused in the operation of a component.By the component for reporting first starting in each process Information can directly find which component triggering self-starting in which subprocess.
Whether the target information that server can be reported according to proxy interface object determines application by self-starting.It answers With the source of program self-starting, self-starting frequency and severity, and then control and optimization application, promote user's body It tests,
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented Necessary to example.
Referring to Fig. 5, a kind of structural block diagram of the self-starting detection device embodiment of application program of the application is shown, is had Body may include following module: the proxy interface object module that application program module 31 and the application program module generate 32;The proxy interface object module 32 may include:
Component enabled instruction acquisition submodule 321, the component enabled instruction submitted for obtaining the application program;
Parsing uploads submodule 322, and for parsing the component enabled instruction, and the target information that parsing is obtained uploads To predetermined server, whether the server is used to determine application program by self-starting according to the target information.
In the embodiment of the present application, the application program module 31 can also include:
Component enabled instruction sending submodule is used for when application program launching, to system activity management services module AMS Sending assembly enabled instruction;
The component enabled instruction acquisition submodule includes:
Component enabled instruction receiving unit, for receiving by system activity management services module AMS transmission by institute State the component enabled instruction of application program submission.
In the embodiment of the present application, described device can also include: system activity management services module AMS;The system Campaign management services modules A MS includes:
Main thread setting up submodule, for after receiving the component enabled instruction that the application program is submitted, for institute State application program creation main thread ActivityThread;Wherein, the main thread ActivityThread includes internal members Object message processing module Handler, the message processing module Handler include original call back function Callback;
The proxy interface object module further include:
Agency's distribution submodule, for acting on behalf of the original call back function Callback, by the component enabled instruction point It is dealt into corresponding system component, to complete the starting of component.
In the embodiment of the present application, the component enabled instruction includes: interface A ctivity component enabled instruction;
The parsing uploads submodule 322
First starting determination unit, for determining whether the corresponding component of interface A ctivity component enabled instruction is for the first time Starting;
First parsing uploading unit, if being to start for the first time for the corresponding component of interface A ctivity component enabled instruction, The interface A ctivity component enabled instruction is then parsed, and the first object information that parsing obtains is uploaded to preset service Device.
In the embodiment of the present application, the component enabled instruction further include: service service component enabled instruction;
The parsing uploads submodule 322
Second starting determination unit, for determining whether the corresponding component of service service component enabled instruction is for the first time Starting;
Second parsing uploading unit, if being to start for the first time for servicing the corresponding component of service component enabled instruction, The service service component enabled instruction is parsed, and the second target information that parsing obtains is uploaded to predetermined server.
In the embodiment of the present application, the component enabled instruction further include: radio receiver BroadcastReceiver group Part enabled instruction;
The parsing uploads submodule 322
Third starts determination unit, for determining that radio receiver BroadcastReceiver component enabled instruction is corresponding Component whether be to start for the first time;
Third parses uploading unit, if corresponding for radio receiver BroadcastReceiver component enabled instruction Component is to start for the first time, then parses the radio receiver BroadcastReceiver component enabled instruction, and parsing is obtained Third target information be uploaded to predetermined server.
In the embodiment of the present application, the obtained target information that parses includes: component type information, the biography for starting component Packet name, component class name, the run process name of component where passing parameter Intent object details, component.
The embodiment of the present application also discloses a kind of server, wherein the server and proxy interface object communication;It is described Proxy interface object is generated by application program, and the component enabled instruction submitted for receiving the application program parses described group Part enabled instruction, and the target information that parsing obtains is uploaded to predetermined server;
The server includes:
Judgment module, for determining application program whether by self-starting according to the target information.
In the embodiment of the present application, the judgment module may include:
Host process component determines submodule, for parsing obtained target information according to described, determines application program place Host process in first component being activated;
Self-starting determines submodule, if not being by application program sound for first component being activated in the host process The bright main-inlet Activity in configuration file, it is determined that application program is self-starting.
In the embodiment of the present application, the judgment module can also include:
Normal start determines submodule, if the component being activated in the host process first is stated by application program Main-inlet Activity in configuration file, it is determined that application program is normal starting;
In the embodiment of the present application, when application program launching, application program is sent out to system activity management services module AMS Sending component enabled instruction;The system activity management services module AMS is in the component starting for receiving the application program submission After instruction, main thread ActivityThread is created for the application program;The main thread ActivityThread includes Internal members' object message processing module Handler, the message processing module Handler include original call back function Callback;The proxy interface object is also used to act on behalf of the original call back function Callback, and component starting is referred to Order is distributed to corresponding system component, to complete the starting of component.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of self-starting detection method of application program provided herein, a kind of self-starting of application program Detection device and server, are described in detail, principle and embodiment of the specific case to the application used herein It is expounded, the description of the example is only used to help understand the method for the present application and its core ideas;Meanwhile for Those of ordinary skill in the art have change according to the thought of the application in specific embodiments and applications Place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (13)

1. a kind of self-starting detection method of application program, which is characterized in that generation has proxy interface object;The method packet It includes:
The component enabled instruction that application program described in the proxy interface object acquisition is submitted;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to server, Whether the server is used to determine application program by self-starting according to the target information.
2. the method according to claim 1, wherein further include:
When application program launching, application program is to system activity management services module AMS sending assembly enabled instruction;
Application program described in the proxy interface object acquisition submit component enabled instruction the step of include:
The proxy interface object reception is submitted by what the system activity management services module AMS was sent by the application program Component enabled instruction.
3. according to the method described in claim 2, it is characterized by further comprising:
The system activity management services module AMS after receiving the component enabled instruction that the application program is submitted, for The application program creates main thread ActivityThread;Wherein, the main thread ActivityThread include it is internal at Member's object message processing module Handler, the message processing module Handler include original call back function Callback;
The component enabled instruction is distributed to correspondence by original call back function Callback described in the proxy interface object broker System component, to complete the starting of component.
4. according to the method described in claim 2, it is characterized in that, the component enabled instruction includes: interface A ctivity group Part enabled instruction;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to server Step includes:
The proxy interface object determines whether the corresponding component of interface A ctivity component enabled instruction is to start for the first time;
If so, interface A ctivity component enabled instruction described in the proxy interface analysis of object, and that parsing is obtained One target information is uploaded to server.
5. according to the method described in claim 4, it is characterized in that, the component enabled instruction further include: service service group Part enabled instruction;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to server Step further include:
The proxy interface object determines whether the corresponding component of service service component enabled instruction is to start for the first time;
If so, service the enabled instruction of service component described in the proxy interface analysis of object, and parsing is obtained second Target information is uploaded to server.
6. according to the method described in claim 5, it is characterized in that, the component enabled instruction further include: radio receiver BroadcastReceiver component enabled instruction;
Component enabled instruction described in the proxy interface analysis of object, and the target information that parsing obtains is uploaded to server Step further include:
Whether the proxy interface object determines the corresponding component of radio receiver BroadcastReceiver component enabled instruction To start for the first time;
If so, radio receiver BroadcastReceiver component enabled instruction described in the proxy interface analysis of object, and The third target information that parsing obtains is uploaded to server.
7. according to the method described in claim 2, it is characterized in that, the obtained target information that parses includes: component type Information, start the Transfer Parameters Intent object details of component, component where packet name, component class name, component run into Journey name.
8. a kind of self-starting detection method of application program, which is characterized in that the application program generates proxy interface object;Institute The component enabled instruction that proxy interface object is submitted for receiving the application program is stated, the component enabled instruction is parsed, and The target information that parsing obtains is uploaded to server;
The method includes:
Whether the server determines application program by self-starting according to the target information.
9. according to the method described in claim 8, it is characterized in that, the server determines to apply journey according to the target information Whether the step of self-starting, is included: sequence
The server parses obtained target information according to described, determines that first is opened in the host process where application program Dynamic component;
If first component being activated is not to state the main-inlet in configuration file by application program in the host process Activity, it is determined that application program is self-starting.
10. according to the method described in claim 9, it is characterized in that, the server determines to apply according to the target information The step of whether program is by self-starting further include:
If the first component being activated is to state the main-inlet in configuration file by application program in the host process Activity, it is determined that application program is normal starting.
11. according to the method described in claim 8, it is characterized in that, when application program launching, application program is to system activity Management services module AMS sending assembly enabled instruction;The system activity management services module AMS receive it is described using journey After the component enabled instruction that sequence is submitted, main thread ActivityThread is created for the application program;The main thread ActivityThread includes internal members' object message processing module Handler, and the message processing module Handler includes Original call back function Callback;The proxy interface object is also used to act on behalf of the original call back function Callback, by institute It states component enabled instruction and is distributed to corresponding system component, to complete the starting of component.
12. a kind of self-starting detection device of application program, which is characterized in that the device includes: application program module, with And the proxy interface object module that the application program module generates;The proxy interface object module includes:
Component enabled instruction acquisition submodule, the component enabled instruction submitted for obtaining the application program;
Parsing uploads submodule, is uploaded to service for parsing the component enabled instruction, and by the target information that parsing obtains Whether device, the server are used to determine application program by self-starting according to the target information.
13. a kind of server, which is characterized in that the server and proxy interface object communication;The proxy interface object by Application program generates, the component enabled instruction submitted for receiving the application program, parses the component enabled instruction, and will It parses obtained target information and is uploaded to predetermined server;
The server includes:
Judgment module, for determining application program whether by self-starting 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 true CN109144676A (en) 2019-01-04
CN109144676B 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)

Cited By (3)

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

Citations (10)

* 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
CN104298932A (en) * 2014-10-27 2015-01-21 中国建设银行股份有限公司 Method and device for calling SO file
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
WO2015117539A1 (en) * 2014-07-22 2015-08-13 中兴通讯股份有限公司 Method and apparatus for invoking application installed on electronic device
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

Patent Citations (10)

* 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
WO2015117539A1 (en) * 2014-07-22 2015-08-13 中兴通讯股份有限公司 Method and apparatus for invoking application installed on electronic device
CN104123162A (en) * 2014-07-29 2014-10-29 北京奇虎科技有限公司 Method and device controlling self-starting of application programs
CN104298932A (en) * 2014-10-27 2015-01-21 中国建设银行股份有限公司 Method and device for calling SO file
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 (5)

* Cited by examiner, † Cited by third party
Title
CCJHDOPC: "AMS 如何管控 Activity/Service/Broadcast的?", 《HTTPS://BLOG.CSDN.NET/CCJHDOPC/ARTICLE/DETAILS/71566347》 *
JESSE-CSDN: "Android设计模式之代理模式 Proxy", 《HTTPS://BLOG.CSDN.NET/L2SHOW/ARTICLE/DETAILS/46992495》 *
何红辉 等: "《Android源码设计模式解析与实战》", 30 November 2015, 人民邮电出版社 *
李印 等: "安卓手机数据结构演示软件开发技术", 《电脑知识与技术》 *
陈鹏 等: "一种Andriod系统启动后自动运行应用的方法", 《电子技术与软件工程》 *

Cited By (5)

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

Also Published As

Publication number Publication date
CN109144676B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
JP7197612B2 (en) Execution of auxiliary functions on on-demand network code execution systems
CN109120426B (en) Network slice management method and device and computer readable storage medium
JP6571277B2 (en) Method and apparatus for loading terminal application
US10341463B2 (en) System and method for message queue configuration in a network
CN103209439B (en) The method of a kind of data traffic monitoring, device and equipment
CN107534570B (en) Computer system, method and medium for virtualized network function monitoring
EP3496335B1 (en) Method and apparatus for managing broadcast message
CN110908879A (en) Method, device, terminal and storage medium for reporting buried point data
CN108600034B (en) Service pressure management method, device, equipment, system and storage medium
CN105052076B (en) Network element management system and network element management method based on cloud computing
WO2020087948A1 (en) Network slice template generation method, apparatus and device, and storage medium
CN113448749B (en) Method, system, device and medium for optimizing execution of expected timing task
CN110532044B (en) Big data batch processing method and device, electronic equipment and storage medium
CN114205230B (en) Configuration method, system, medium and electronic equipment of cloud primary network element
CN109144676A (en) A kind of self-starting detection method, device and the server of application program
CN108900627B (en) Network request method, terminal device and storage medium
US20220182851A1 (en) Communication Method and Apparatus for Plurality of Administrative Domains
CN108234551B (en) Data processing method and device
CN114168297A (en) Method, device, equipment and medium for scheduling collection tasks
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium
CN110362314B (en) Information processing method and device, computer readable medium and electronic equipment
US11523281B1 (en) Validating customized user equipment (UE)
KR20180060144A (en) method for scaling-out of virtualized network function, virtualized network function manager using the same, and network function virtualization system using the same
CN108694571A (en) A kind of method for processing business and device based on multi-process
US10140150B2 (en) Thread diversion awaiting log call return

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