CN112068932A - Application program integration and monitoring method, device, system, equipment and medium - Google Patents

Application program integration and monitoring method, device, system, equipment and medium Download PDF

Info

Publication number
CN112068932A
CN112068932A CN202010904978.6A CN202010904978A CN112068932A CN 112068932 A CN112068932 A CN 112068932A CN 202010904978 A CN202010904978 A CN 202010904978A CN 112068932 A CN112068932 A CN 112068932A
Authority
CN
China
Prior art keywords
target
application program
monitoring
source code
code file
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
CN202010904978.6A
Other languages
Chinese (zh)
Other versions
CN112068932B (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.)
Beijing Zhizhangyi Technology Co ltd
Original Assignee
Beijing Zhizhangyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhizhangyi Technology Co ltd filed Critical Beijing Zhizhangyi Technology Co ltd
Priority to CN202010904978.6A priority Critical patent/CN112068932B/en
Publication of CN112068932A publication Critical patent/CN112068932A/en
Application granted granted Critical
Publication of CN112068932B publication Critical patent/CN112068932B/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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

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

Abstract

The embodiment of the invention discloses an application program integration and monitoring method, device, system, equipment and medium. The method is applied to a service platform and comprises the following steps: acquiring an initial source code file of a target application program to be integrated; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; putting the initial source code file and the monitoring engine file into corresponding positions in the target container, and splicing to generate a target source code file of the target application program; the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to monitor the operation of the target application program. According to the technical scheme of the embodiment of the invention, the monitoring function can be automatically added to the application program without modifying the source code file of the application program.

Description

Application program integration and monitoring method, device, system, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an application program integration and monitoring method, device, system, equipment and medium.
Background
At present, with popularization of application programs in daily life of people, enterprises pay more and more attention to performance and functions of the application programs, and the enterprises urgently need to know the functional use degree of the application programs and the performance of the applications. However, if an enterprise develops and realizes monitoring of the application program by itself, the workload of the development personnel is increased, the development difficulty is high, and the investment cost is high; if a third-party Software Development Kit (SDK) is integrated to monitor the application programs, certain personnel Development investment and maintenance cost are also required.
Disclosure of Invention
The invention provides an integration and monitoring method, device, system, equipment and medium of an application program, which can automatically add a monitoring function to the application program without modifying a source code file of the application program.
In a first aspect, an embodiment of the present invention provides an application integration method, applied to a service platform, including:
acquiring an initial source code file of a target application program to be integrated;
acquiring a target container to be configured, wherein the target container comprises an application monitoring tool;
placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program;
the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
the starting guide module is used for starting the automatic pile inserting module and loading an initial source code file;
and the automatic instrumentation module is used for adding a hook function at the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program.
In a second aspect, an embodiment of the present invention further provides a method for monitoring an application program, which is applied to a mobile terminal, and includes:
installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool;
the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool;
and monitoring the running of the target application program by using the application monitoring tool in the target container.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
monitoring the operation of the target application program by using an application monitoring tool in the target container, wherein the method comprises the following steps:
starting an automatic instrumentation module by using a starting guide module in a target container, and loading an initial source code file of a target application program; the target source code file comprises an initial source code file and a monitoring engine file;
adding a hook function at the calling position of each system service interface in a source code file of an operating system through an automatic instrumentation module;
and responding to the trigger operation of the hook function, collecting the monitoring data of the target application program, and reporting the monitoring data to the service platform for processing.
Optionally, collecting monitoring data of the target application in response to the trigger operation on the hook function includes:
responding to the trigger operation of the hook function, running a monitoring engine file in the target source code file, and acquiring a parameter of calling a system service interface by the initial source code file;
and analyzing the parameters to obtain the monitoring data of the target application program.
In a third aspect, an embodiment of the present invention further provides a monitoring system for an application program, including: the system comprises a service platform and at least one mobile terminal;
a service platform for executing the integration method of the application program provided by any embodiment of the present invention;
and the mobile terminal is used for executing the monitoring method of the application program provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides an integrated device for an application program, which is applied to a service platform, and includes:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an initial source code file of a target application program to be integrated;
the second acquisition module is used for acquiring a target container to be configured, and the target container comprises an application monitoring tool;
the integration module is used for putting the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program;
the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
In a fifth aspect, an embodiment of the present invention further provides a monitoring apparatus for an application program, which is applied to a mobile terminal, and includes:
the installation module is used for installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool;
the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool;
and the monitoring module is used for monitoring the running of the target application program by using the application monitoring tool in the target container.
In a sixth aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for monitoring an application program as provided in any embodiment of the present invention.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for integrating an application program or the method for monitoring an application program provided in any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the initial source code file of the target application program to be integrated is obtained through the service platform; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to run and monitor the target application program, solves the problems that the research and development difficulty for monitoring the application program is high and the cost is high in the prior art, and can automatically add the monitoring function to the application program without modifying the source code file of the application program.
Drawings
FIG. 1a is a flowchart of an application integration method according to a first embodiment of the present invention;
fig. 1b is a schematic structural diagram of a target application with integrated monitoring capability according to a first embodiment of the present invention;
FIG. 1c is a flowchart of an embodiment of a method for providing monitoring capability to an application
Fig. 2a is a flowchart of a monitoring method for an application program according to a second embodiment of the present invention;
FIG. 2b is a flowchart illustrating operation of a target application according to a second embodiment of the present invention;
fig. 3a is a schematic structural diagram of a monitoring system of an application program according to a third embodiment of the present invention;
fig. 3b is a schematic structural diagram of a monitoring system of an application program according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an integrated apparatus of an application according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a monitoring apparatus for an application program according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device in a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of an application integration method in an embodiment of the present invention, which is applicable to a case where a monitoring function is automatically added to an application without modifying a source code file of the application, and the method may be executed by an application integration apparatus, which may be implemented by hardware and/or software and may be generally integrated in a service platform providing a monitoring capability integration service. As shown in fig. 1a, the method comprises:
and step 110, acquiring an initial source code file of the target application program to be integrated.
The target application program refers to an application program with a monitoring function to be integrated, and the initial source code file refers to an original application program package of the target application program.
Step 120, a target container to be configured is obtained, and the target container includes an application monitoring tool.
In this embodiment, a target container is generated in advance, and the target container is actually a package architecture including an application monitoring tool for monitoring a target application.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module; the starting guide module is used for starting the automatic pile inserting module and loading an initial source code file; and the automatic instrumentation module is used for adding a hook function at the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program.
In this embodiment, the target container includes a boot starting module and an automatic instrumentation module, where the boot starting module is configured to, when the target application runs, guide a module related to monitoring to initialize, start the automatic instrumentation module, and load and start running the original application package. And after the automatic instrumentation module is started, acting the key points of the operating system service, and injecting the hook function into the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program. Because the realization of the self function of the target application program needs to use the operating system service, when the monitoring function is integrated on the target application program, the hook function can be injected into the system service interface, so that the target application program can be preferentially processed by the hook function when using the system service.
And step 130, placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of the target application program.
The mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
In this embodiment, the monitoring engine file refers to a sub application package having a function monitoring code and a performance monitoring code. The method comprises the steps that positions corresponding to a starting guide module, an automatic pile inserting module, an original application module and a monitoring module are preset in a target container, an initial source code file is placed in the position corresponding to the original application module, a monitoring engine module is placed in the position corresponding to the monitoring module, and then the initial source code file and the automatic pile inserting module in the target container can be spliced to generate a target source code file of a target application program.
In this embodiment, the mobile terminal installed with the target source code file may use an application monitoring tool in the target container to perform operation monitoring on the target application program, and specifically, when the target application program calls the system service interface, the hook function may be triggered, and current operation data of the target application program and the operating system may be recorded. In the process, the operation data is not modified, and the processing of the operating system is not influenced, so that the original application, namely the initial source code file, is not influenced.
According to the embodiment, the monitoring engine file and the initial source code file can be spliced in a containerization mode, the one-click integrated monitoring function for the application program is realized, the application program does not need to be modified, and the development and use cost is reduced. Moreover, the monitoring engine file can be automatically upgraded through containerization, the monitoring content can be dynamically modified through service configuration, and the method can adapt to any target mobile platform.
The integration method of the application program is further described below with reference to fig. 1 c. As shown in FIG. 1c, the service platform initializes the containerization packaging module and waits for input from the target application. If the target application program is input, the container packaging process is carried out. First, the external declaration of the initial source code file of the target application program is transferred into the target container as it is, so that the target container can have the same external declaration as the initial source code file. And then, splicing the initial source code file and the monitoring engine file again to generate a target source code file with a monitoring function in a generating mode provided by the mobile platform. And finally, applying a signature to the target source code file to generate an installable target source code file.
According to the technical scheme of the embodiment of the invention, the initial source code file of the target application program to be integrated is obtained through the service platform; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to run and monitor the target application program, solves the problems that the research and development difficulty for monitoring the application program is high and the cost is high in the prior art, and can automatically add the monitoring function to the application program without modifying the source code file of the application program.
Example two
Fig. 2a is a flowchart of a monitoring method for an application according to a second embodiment of the present invention, where this embodiment is applicable to a case where an application is monitored according to a source code file with an integrated monitoring function, and the method may be executed by a monitoring apparatus for an application, where the apparatus may be implemented by hardware and/or software, and may be generally integrated in an electronic device, such as a terminal device, that provides an application performance monitoring service. As shown in fig. 2a, the method comprises:
step 210, installing and running a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool.
The target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by the service platform, and the target container comprises an application monitoring tool.
In this embodiment, the monitoring engine file refers to a sub application package having a function monitoring code and a performance monitoring code. The target container is preset with positions corresponding to the application monitoring tool, the original application module and the monitoring module respectively, and after the initial source code file is placed in the position corresponding to the original application module and the monitoring engine module is placed in the position corresponding to the monitoring module, the initial source code file and the monitoring engine module can be spliced with the application monitoring tool in the target container to generate a target source code file of a target application program.
And step 220, monitoring the running of the target application program by using the application monitoring tool in the target container.
In this embodiment, when the target source code file runs on the mobile terminal, the initial source code file in the target source code file is loaded, and the automatic instrumentation module is started to monitor the function and performance of the target application program, and upload the collected monitoring data. The functions of the monitored application program may include: the application interface service duration, the interface operation process, the flow statistics, the abnormal error statistics and the like, and the performance of the application program can include: the method execution time length, the starting time length, the interface loading time length and the like.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
the operation monitoring of the target application program by using the application monitoring tool in the target container may include: starting an automatic instrumentation module by using a starting guide module in a target container, and loading an initial source code file of a target application program; the target source code file comprises an initial source code file and a monitoring engine file; adding a hook function at the calling position of each system service interface in a source code file of an operating system through an automatic instrumentation module; and responding to the trigger operation of the hook function, collecting the monitoring data of the target application program, and reporting the monitoring data to the service platform for processing.
In this embodiment, as shown in fig. 2b, when the target application with the monitoring function is started, a boot module in the target application starts to work, and boots and loads a corresponding code. The boot starting module can initialize and load an initial source code file to enable the original application to run normally, initialize the automatic instrumentation module, proxy the relevant interface and the key position of the operating system, and access the hook function to the relevant position. And then waiting for the target application program to run, and triggering the hook function of the instrumentation. And when the application operation action is triggered to the hook function of the pile, operating a monitoring engine file in the target application program, and acquiring system parameters, thereby obtaining monitoring data such as the operation action, the operation time, the related information of the original application and the like of the application. And the collected monitoring data is sorted and packaged, and uploaded to a service platform for further analysis and processing.
In this embodiment, after the automatic instrumentation module runs, all service interfaces of the operating system are traversed once, and the hook function is injected to the call position of each system service interface in the source code file of the operating system, so as to monitor the target application program. Because the realization of the self function of the target application program needs to use the operating system service, when the monitoring function is integrated on the target application program, the hook function can be injected into the system service interface, so that the target application program can be preferentially processed by the hook function when using the system service.
Optionally, collecting monitoring data of the target application in response to the trigger operation on the hook function may include: responding to the trigger operation of the hook function, running a monitoring engine file in the target source code file, and acquiring a parameter of calling a system service interface by the initial source code file; and analyzing the parameters to obtain the monitoring data of the target application program.
In this embodiment, when the hook function is triggered, the monitoring engine file in the target source code file is run to obtain a parameter for the original application to call the system service interface, and then, by analyzing the interface parameter, relevant information of the current application, page information, running action, and the like can be obtained.
In the embodiment, the monitoring engine file and the initial source code file are spliced in a containerization mode, so that the one-click monitoring function for the application program is realized, the application program does not need to be modified, and the development and use cost is reduced. Moreover, the monitoring engine file can be automatically upgraded through containerization, the monitoring content can be dynamically modified through service configuration, and the method can adapt to any target mobile platform.
According to the technical scheme of the embodiment of the invention, a target source code file of a target application program is installed and operated through a mobile terminal, wherein the target source code file comprises at least one application monitoring tool; the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool; by using the application monitoring tool in the target container to monitor the operation of the target application program, the problems of high research and development difficulty and high cost of monitoring the application program in the prior art are solved, and the monitoring function can be automatically added to the application program without modifying the source code file of the application program.
EXAMPLE III
Fig. 3a is a schematic structural diagram of a monitoring system for an application program according to a third embodiment of the present invention, which is applicable to a situation where a monitoring function is automatically added to an application program without modifying a source code file of the application program. As shown in fig. 3a, the monitoring system of the application program includes: a service platform 310 and at least one mobile terminal 320;
the service platform 310 is used for acquiring an initial source code file of a target application program to be integrated; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
the starting guide module is used for starting the automatic pile inserting module and loading an initial source code file;
and the automatic instrumentation module is used for adding a hook function at the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program.
In this embodiment, as shown in fig. 3b, a target container is generated in advance, where the target container is actually a package architecture, and the initial source code file is placed in the target container at a position corresponding to the original application module, and the monitoring engine module is placed in the target container at a position corresponding to the monitoring module, so that the target source code file of the target application program can be generated by splicing with the start guidance module and the automatic instrumentation module in the target container, so that the automatic monitoring function is added to the target application program under the condition that the initial source code file remains unchanged and the content of the external declaration of the target application program remains unchanged.
The mobile terminal 320 is used for installing and running a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool; the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool; and monitoring the running of the target application program by using the application monitoring tool in the target container.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
a mobile terminal 320 for: starting an automatic instrumentation module by using a starting guide module in a target container, and loading an initial source code file of a target application program; the target source code file comprises an initial source code file and a monitoring engine file; adding a hook function at the calling position of each system service interface in a source code file of an operating system through an automatic instrumentation module; and responding to the trigger operation of the hook function, collecting the monitoring data of the target application program, and reporting the monitoring data to the service platform for processing.
Optionally, the mobile terminal 320 is configured to: responding to the trigger operation of the hook function, running a monitoring engine file in the target source code file, and acquiring a parameter of calling a system service interface by the initial source code file; and analyzing the parameters to obtain the monitoring data of the target application program.
In this embodiment, as shown in fig. 3b, when the target source code file runs on the mobile terminal, the initial source code file in the target source code file is loaded, and the automatic instrumentation module is started to monitor the function and performance of the target application program, and upload the collected monitoring data to the service platform. The functions of the monitored application program may include: the application interface service duration, the interface operation process, the flow statistics, the abnormal error statistics and the like, and the performance of the application program can include: the method execution time length, the starting time length, the interface loading time length and the like.
Example four
Fig. 4 is a schematic structural diagram of an integrated apparatus for an application according to a fourth embodiment of the present invention, where this embodiment is applicable to a case where a monitoring function is automatically added to an application without modifying a source code file of the application, and the apparatus may be implemented by hardware and/or software and may be generally integrated in a service platform providing an integrated service for monitoring capability. As shown in fig. 4, the apparatus includes:
a first obtaining module 410, configured to obtain an initial source code file of a target application to be integrated;
a second obtaining module 420, configured to obtain a target container to be configured, where the target container includes an application monitoring tool;
the integration module 430 is configured to place the initial source code file and the monitoring engine file in corresponding positions of the target container, and splice to generate a target source code file of the target application program;
the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
According to the technical scheme of the embodiment of the invention, the initial source code file of the target application program to be integrated is obtained through the service platform; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to run and monitor the target application program, solves the problems that the research and development difficulty for monitoring the application program is high and the cost is high in the prior art, and can automatically add the monitoring function to the application program without modifying the source code file of the application program.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
the starting guide module is used for starting the automatic pile inserting module and loading an initial source code file;
and the automatic instrumentation module is used for adding a hook function at the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program.
The application integration device provided by the embodiment of the invention can execute the application integration method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a monitoring apparatus for an application program according to a fifth embodiment of the present invention, where this embodiment is applicable to a situation where an application program is monitored according to a source code file with an integrated monitoring function, and the apparatus may be implemented by hardware and/or software, and may be generally integrated in an electronic device that provides an application program performance monitoring service, for example, a terminal device. As shown in fig. 5, the apparatus includes:
an installation module 510, configured to install and run a target source code file of a target application program, where the target source code file includes at least one application monitoring tool;
the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool;
and a monitoring module 520, configured to perform operation monitoring on the target application by using the application monitoring tool in the target container.
According to the technical scheme of the embodiment of the invention, a target source code file of a target application program is installed and operated through a mobile terminal, wherein the target source code file comprises at least one application monitoring tool; the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool; by using the application monitoring tool in the target container to monitor the operation of the target application program, the problems of high research and development difficulty and high cost of monitoring the application program in the prior art are solved, and the monitoring function can be automatically added to the application program without modifying the source code file of the application program.
Optionally, the application monitoring tool includes: starting a guide module and an automatic pile inserting module;
a monitoring module 520 comprising: the starting unit is used for starting the automatic instrumentation module by using a starting guide module in the target container and loading an initial source code file of the target application program; the target source code file comprises an initial source code file and a monitoring engine file; the embedded point unit is used for adding hook functions at the calling positions of all system service interfaces in a source code file of an operating system through an automatic instrumentation module; and the monitoring unit is used for responding to the trigger operation of the hook function, acquiring the monitoring data of the target application program and reporting the monitoring data to the service platform for processing.
Optionally, the monitoring unit is specifically configured to: responding to the trigger operation of the hook function, running a monitoring engine file in the target source code file, and acquiring a parameter of calling a system service interface by the initial source code file; and analyzing the parameters to obtain the monitoring data of the target application program.
The monitoring device for the application program provided by the embodiment of the invention can execute the monitoring method for the application program provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a terminal device in a sixth embodiment of the present invention. Fig. 6 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 6 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in FIG. 6, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing an integration method of an application program or a monitoring method of an application program provided by an embodiment of the present invention.
Namely: the method for realizing the integration of the application program is applied to a service platform and comprises the following steps:
acquiring an initial source code file of a target application program to be integrated; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
Or, the method for monitoring an application program is applied to a mobile terminal, and includes:
installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool; the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool; and monitoring the running of the target application program by using the application monitoring tool in the target container.
EXAMPLE seven
An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, the program being used to execute an application integration method or an application monitoring method when executed by a computer processor.
Namely: the method for realizing the integration of the application program is applied to a service platform and comprises the following steps:
acquiring an initial source code file of a target application program to be integrated; acquiring a target container to be configured, wherein the target container comprises an application monitoring tool; placing the initial source code file and the monitoring engine file into corresponding positions in a target container, and splicing to generate a target source code file of a target application program; the mobile terminal provided with the target source code file can use an application monitoring tool in the target container to monitor the operation of the target application program.
Or, the method for monitoring an application program is applied to a mobile terminal, and includes:
installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool; the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool; and monitoring the running of the target application program by using the application monitoring tool in the target container.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example, but is not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An integration method of an application program is applied to a service platform, and comprises the following steps:
acquiring an initial source code file of a target application program to be integrated;
acquiring a target container to be configured, wherein the target container comprises an application monitoring tool;
putting the initial source code file and the monitoring engine file into corresponding positions in the target container, and splicing to generate a target source code file of the target application program;
the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to monitor the operation of the target application program.
2. The method of claim 1,
the application monitoring tool comprises: starting a guide module and an automatic pile inserting module;
the starting guide module is used for starting the automatic pile inserting module and loading an initial source code file;
and the automatic instrumentation module is used for adding a hook function at the calling position of each system service interface in the source code file of the operating system so as to monitor the target application program.
3. A monitoring method of an application program is applied to a mobile terminal, and comprises the following steps:
installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool;
the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool;
and monitoring the running of the target application program by using the application monitoring tool in the target container.
4. The method of claim 3, wherein applying the monitoring tool comprises: starting a guide module and an automatic pile inserting module;
monitoring the operation of the target application program by using the application monitoring tool in the target container, including:
starting an automatic instrumentation module by using a starting guide module in the target container, and loading an initial source code file of a target application program; the target source code file comprises an initial source code file and a monitoring engine file;
adding a hook function at the calling position of each system service interface in a source code file of an operating system through the automatic instrumentation module;
and responding to the trigger operation of the hook function, collecting the monitoring data of the target application program, and reporting the monitoring data to a service platform for processing.
5. The method of claim 4, wherein collecting monitoring data of the target application in response to the triggering operation of the hook function comprises:
responding to the trigger operation of the hook function, running a monitoring engine file in the target source code file, and acquiring a parameter of calling a system service interface by an initial source code file;
and analyzing the parameters to obtain the monitoring data of the target application program.
6. A monitoring system for an application, comprising: the system comprises a service platform and at least one mobile terminal;
the service platform for performing the integration method of the application program of any one of claims 1-2;
the mobile terminal is used for executing the application program monitoring method of any one of claims 3-5.
7. An integrated device of an application program, applied to a service platform, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an initial source code file of a target application program to be integrated;
the second acquisition module is used for acquiring a target container to be configured, and the target container comprises an application monitoring tool;
the integration module is used for putting the initial source code file and the monitoring engine file into corresponding positions in the target container, and splicing to generate a target source code file of the target application program;
the mobile terminal provided with the target source code file can use the application monitoring tool in the target container to monitor the operation of the target application program.
8. A monitoring device of an application program is applied to a mobile terminal, and comprises:
the installation module is used for installing and operating a target source code file of a target application program, wherein the target source code file comprises at least one application monitoring tool;
the target source code file is obtained by splicing an initial source code file of a target application program and a monitoring engine file which are put into corresponding positions in a target container by a service platform, wherein the target container comprises an application monitoring tool;
and the monitoring module is used for monitoring the running of the target application program by using the application monitoring tool in the target container.
9. A terminal device, characterized in that the terminal device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of monitoring an application program as claimed in any one of claims 3-5.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method for integrating an application program according to any one of claims 1-2, or a method for monitoring an application program according to any one of claims 3-5.
CN202010904978.6A 2020-09-01 2020-09-01 Application integration and monitoring method, device, system, equipment and medium Active CN112068932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010904978.6A CN112068932B (en) 2020-09-01 2020-09-01 Application integration and monitoring method, device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010904978.6A CN112068932B (en) 2020-09-01 2020-09-01 Application integration and monitoring method, device, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN112068932A true CN112068932A (en) 2020-12-11
CN112068932B CN112068932B (en) 2024-07-02

Family

ID=73665915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010904978.6A Active CN112068932B (en) 2020-09-01 2020-09-01 Application integration and monitoring method, device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN112068932B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559293A (en) * 2020-12-22 2021-03-26 上海哔哩哔哩科技有限公司 Application package monitoring method and device
CN113836567A (en) * 2021-11-26 2021-12-24 北京指掌易科技有限公司 Data security protection method, device, medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464791A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Code insertion system and method
CN103177210A (en) * 2013-04-02 2013-06-26 中国人民大学 Method of implanting dynamic stain analysis module in Android
CN108229107A (en) * 2016-12-21 2018-06-29 武汉安天信息技术有限责任公司 A kind of hulling method and container of Android platform application program
CN108920250A (en) * 2018-06-05 2018-11-30 麒麟合盛网络技术股份有限公司 The method and device of Application Container
US20190180006A1 (en) * 2017-12-07 2019-06-13 International Business Machines Corporation Facilitating build and deploy runtime memory encrypted cloud applications and containers
CN110262941A (en) * 2019-05-28 2019-09-20 深圳市汇川技术股份有限公司 Application Container cluster alarm implementation method, system, equipment and storage medium
CN111212418A (en) * 2019-12-31 2020-05-29 北京指掌易科技有限公司 Device and method for safely downloading mobile terminal application
CN116719696A (en) * 2023-06-16 2023-09-08 中科云谷科技有限公司 Method, device, equipment and storage medium for monitoring application program interface data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464791A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Code insertion system and method
CN103177210A (en) * 2013-04-02 2013-06-26 中国人民大学 Method of implanting dynamic stain analysis module in Android
CN108229107A (en) * 2016-12-21 2018-06-29 武汉安天信息技术有限责任公司 A kind of hulling method and container of Android platform application program
US20190180006A1 (en) * 2017-12-07 2019-06-13 International Business Machines Corporation Facilitating build and deploy runtime memory encrypted cloud applications and containers
CN108920250A (en) * 2018-06-05 2018-11-30 麒麟合盛网络技术股份有限公司 The method and device of Application Container
CN110262941A (en) * 2019-05-28 2019-09-20 深圳市汇川技术股份有限公司 Application Container cluster alarm implementation method, system, equipment and storage medium
CN111212418A (en) * 2019-12-31 2020-05-29 北京指掌易科技有限公司 Device and method for safely downloading mobile terminal application
CN116719696A (en) * 2023-06-16 2023-09-08 中科云谷科技有限公司 Method, device, equipment and storage medium for monitoring application program interface data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559293A (en) * 2020-12-22 2021-03-26 上海哔哩哔哩科技有限公司 Application package monitoring method and device
CN112559293B (en) * 2020-12-22 2023-03-07 上海哔哩哔哩科技有限公司 Application package monitoring method and device
CN113836567A (en) * 2021-11-26 2021-12-24 北京指掌易科技有限公司 Data security protection method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN112068932B (en) 2024-07-02

Similar Documents

Publication Publication Date Title
CN110457277B (en) Service processing performance analysis method, device, equipment and storage medium
CN109194606B (en) Attack detection system, method, computer device and storage medium
CN112068932B (en) Application integration and monitoring method, device, system, equipment and medium
CN107045475B (en) Test method and device
CN112035354B (en) Positioning method, device and equipment of risk codes and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN113050984A (en) Resource calling method and device, electronic equipment and storage medium
CN110633190B (en) Application program memory monitoring method, device, equipment and storage medium
CN113760306A (en) Method and device for installing software, electronic equipment and storage medium
CN111274130A (en) Automatic testing method, device, equipment and storage medium
CN114003269A (en) Component processing method and device, electronic equipment and storage medium
CN109783261B (en) Crash processing method and device for terminal application, electronic equipment and storage medium
CN110045952B (en) Code calling method and device
CN109522174B (en) Method, device, terminal and storage medium for controlling adb enabling
CN113342431B (en) Function call stack backtracking and program exception handling method, device, equipment and medium
CN115454856A (en) Multi-application security detection method, device, medium and electronic equipment
CN111124423B (en) Compiling detection method, device, server and medium based on multiple platforms
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN114490265A (en) Data acquisition method, device, equipment and storage medium
CN114116399A (en) Method, device, equipment and medium for monitoring third-party SDK in application
CN109634636B (en) Application processing method, device, equipment and medium
CN111475322A (en) Method and device for positioning stuck thread, computer equipment and readable storage medium
CN112506782A (en) Application program testing method, device, equipment and storage medium
CN113590435A (en) Abnormal information display method and equipment
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium

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