CN115033454A - Data monitoring method and terminal of non-intrusive App - Google Patents
Data monitoring method and terminal of non-intrusive App Download PDFInfo
- Publication number
- CN115033454A CN115033454A CN202210682499.3A CN202210682499A CN115033454A CN 115033454 A CN115033454 A CN 115033454A CN 202210682499 A CN202210682499 A CN 202210682499A CN 115033454 A CN115033454 A CN 115033454A
- Authority
- CN
- China
- Prior art keywords
- monitoring
- original
- app
- data
- pointer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
- G06F11/3093—Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/865—Monitoring of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Computer And Data Communications (AREA)
Abstract
The application provides a data monitoring method of a non-intrusive App, which comprises the following steps: acquiring an original method to be monitored through a runtime library, wherein the original method is one or more of an original example method or a static method in APP; acquiring a method name of the original method and a pointer pointing to the original method; acquiring a method signature in the original method through the method name; calling the method signature in a preset monitoring method to obtain a method with monitoring for monitoring an original method, wherein the method with monitoring comprises the original method and a monitoring method for monitoring the original method; acquiring a pointer pointing to the method with monitoring; exchanging pointers between the original method and the method with monitoring in the replacement method; and calling the method with monitoring when the APP runs and uploading data generated by monitoring in the method with monitoring to a data server. According to the technical scheme, the APP data can be monitored more efficiently and simply.
Description
Technical Field
The application relates to the technical field of mobile internet, in particular to a data monitoring method and terminal of a non-intrusive App.
Background
The mobile internet's era App is the entrance of a large number of scenes, and the monitoring support of the App in the current industry is limited to manual code intrusion modification monitoring based on standard specifications, which is easier for new services and has risks for stock services. If a user wants to implement data monitoring without intrusion, the current industry solution cannot. In addition, the common monitoring mode in the industry at present mainly adopts a unified definition acquisition standard, and users follow the standard to monitor and bury points in respective services. This approach is not yet available and can be done without an online service, but only for some time. When the service is already in online use, if the monitoring is required to be added without changing the original service logic mode, the method cannot be realized. In addition, the business team wastes too much time in the manual embedding point of the App, and the research and development efficiency of the team is influenced.
Disclosure of Invention
In view of the above, it is actually necessary to provide a more efficient and simple data monitoring method and terminal for a non-intrusive App.
In a first aspect, an embodiment of the present application provides a data monitoring method for a non-intrusive App, where the data monitoring method for the non-intrusive App includes the following steps:
acquiring an original method to be monitored through a runtime library, wherein the original method is one or more of an original example method or a static method in APP;
acquiring a method name of the original method and a pointer pointing to the original method;
acquiring a method signature in the original method through the method name;
calling the method signature in a preset monitoring method to obtain a method with monitoring for monitoring an original method, wherein the method with monitoring comprises the original method and a monitoring method for monitoring the original method;
acquiring a pointer pointing to the method with monitoring;
exchanging pointers between the original method and the method with monitoring in the replacement method; and
calling the method with monitoring in the APP operation and uploading the data generated by monitoring in the method with monitoring to the data server.
In a second aspect, an embodiment of the present application provides a terminal, where the terminal includes:
a computer readable storage medium for storing program instructions;
the processor and the bus execute the program instructions to implement the data monitoring method of the non-intrusive App.
According to the data monitoring method and the terminal of the non-intrusive App, the original method pointer and the pointer of the method with monitoring are exchanged, so that the APP can be called to the method with monitoring when running to the original method, data required by the running of the original method can be monitored without modifying a service code, the monitored data is uploaded to a data server, production data and analysis of the original method can be checked in time, and guidance can be provided for subsequent research and development.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a flowchart of a data monitoring method of a non-intrusive App according to an embodiment of the present application.
Fig. 2 is a first sub-flowchart of a data monitoring method of a non-intrusive App according to an embodiment of the present application.
Fig. 3 is a second sub-flowchart of the data monitoring method of the non-intrusive App according to the embodiment of the present application.
Fig. 4 is a third sub-flowchart of a data monitoring method of the non-intrusive App according to an embodiment of the present application.
Fig. 5 is a fourth sub-flowchart of the data monitoring method of the non-intrusive App according to the embodiment of the present application.
Fig. 6 is a fifth sub-flowchart of a data monitoring method of the non-intrusive App according to an embodiment of the present application.
Fig. 7 is a schematic internal structure diagram of a terminal according to an embodiment of the present application.
Fig. 8 is a schematic diagram of implementation of a monitoring method of a data monitoring method of a non-intrusive App according to an embodiment of the present application
Fig. 9 is a schematic diagram of an App server accessing a data server in a data monitoring method for a non-intrusive App according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar items and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances, in other words, the described embodiments may be practiced other than as illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation thereof, may also include other things, such as processes, methods, systems, articles, or apparatus that comprise a list of steps or elements is not necessarily limited to only those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such processes, methods, articles, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
Referring to fig. 1 and fig. 9 in combination, fig. 1 is a flowchart of a data monitoring method of a non-intrusive App according to an embodiment of the present application. Fig. 9 shows that the App server of the data monitoring method for a non-intrusive App according to the embodiment of the present application accesses a data server, where the data monitoring method for a non-intrusive App specifically includes the following steps S102 to S114.
Step S102, acquiring an original method 30 required to be monitored through a runtime library, wherein the original method 30 is one or more of an original example method or a static method in APP. It can be understood that after the developer introduces a runtime library to the APP project, the developer configures a white list of classes to be monitored for the APP project, where the white list is a list that can perform corresponding operations on the classes added to the white list. And acquiring the method in the class to be monitored configured by the developer by using a runtime mechanism specific to the IOS to obtain the original method 30 to be monitored. How to obtain the original method 30 will be described in detail below.
The Runtime library is written in C language and assembly language, and is a core of object-oriented programming language (Objective-C), the Objective-C is language of dynamic Runtime, the type of an object is determined at Runtime, a method of the corresponding object is called, and Objective-C codes are finally converted into corresponding function structures in the Runtime library.
Step S104, a method name of the original method 30 and a pointer pointing to the original method 30 are obtained. It can be understood that, by adopting a method of adding Load to APP delete by IOS specific Category in APP, a developer writes a method of obtaining an original method pointer and a method of obtaining an original method name in the Load method according to the original method 30. The following detailed description is obtained in detail.
The Load method is called when the program starts to Load classes, that is, the IOS program loads all classes when starting, and also calls the Load method of each class.
Step S106, obtaining the method signature in the original method 30 by the method name. It can be understood that, after the APP server 300 acquires the method name of the original method 30 according to the method of acquiring the original method name, the method signature of the original method 30 is acquired for the acquired method name by using the nsmethod signature method in the runtime library. The method signature may also be obtained using a selector in this embodiment.
Step S108, calling the method signature in a preset monitoring method to obtain the method 10 with monitoring for the original method 30, wherein the method 10 with monitoring comprises the original method 30 and a monitoring method for monitoring the original method 30. It can be understood that, a developer adds a preset monitoring method in APP according to the unique Category of the IOS, adds a method for acquiring a corresponding method signature by a method name in the preset monitoring method, and adds a method for calling the corresponding original method 30 according to the method signature after the method for acquiring the method signature. Since the monitoring method monitors the method signature, and the method signature during operation can access the corresponding original method 30, the monitoring method monitors the original method 30 to obtain the method with monitoring 10.
Category is a linguistic property added after Objective-C2.0, and the main role of Category is to add methods to already existing classes. Appdegate is a representative of the IOS running an APP, and various methods are defined in Appdegate for the IOS to call when running the APP. That is, all operations based on the APP hierarchy need to be completed within them. Further, in this embodiment, a preset monitoring method is added to the running APP through Category, so that a preset monitoring method can be added before and after the original method in which the APP runs, and monitoring on data input or generated by the original method in the APP is realized.
Step S110, a pointer pointing to the method with monitoring 10 is obtained. It can be understood that, a developer writes a calling method for obtaining the pointer of the method 10 with monitoring in the Load method, and the APP server 300 obtains the pointer of different methods 10 with monitoring according to the parameter change in the method 10 with monitoring in the Load method according to the method for obtaining the pointer of the method 10 with monitoring. The parameter is the original method 30 in the tape monitoring method. The details of how the pointer to the method 10 with monitoring is obtained are described below.
In step S112, the original method 30 and the method with monitoring 10 exchange pointers in an alternative method. It can be understood that, the developer adds a class of exchange pointer in the APP project, and adds a method for passing the obtained original method pointer and the method pointer with monitor into the class of exchange pointer in the Load method. So that the pointer to the original method 30 and the pointer to the method 10 with monitoring are all passed along to the alternate method. Details of how the pointers are exchanged are described below.
Step S114, calling the method 10 with monitoring while running APP and uploading the data generated by monitoring in the method 10 with monitoring to the data server 400. It can be understood that, when the APP runs to the corresponding original method 30, the APP server 300 calls the method with monitoring 10 corresponding to the original method 30 according to the exchanged pointer, the APP server 300 runs the method with monitoring 10, the monitoring method in the method with monitoring 10 when the APP server 300 runs the method with monitoring 10 monitors the whole running process of the original method 30 in the method with monitoring 10, and generates monitoring data of the original method 30, and the APP server 300 packs the monitoring data of the original method 30 generated by monitoring in the method with monitoring 10 and uploads the packed monitoring data to the data server 400. The specific operation will be described in detail below.
In the above embodiment, by setting the white list for the class to be monitored, the waste of resources is reduced, and the original method 30 is monitored more specifically, and exchanging the pointer of the original method 30 with the pointer of the method 10 with monitoring, so that the APP can be called to the method 10 with monitoring when running to the original method 30, thereby reducing the intrusion of the service code, and uploading the monitored running data of the original method 30 to the data server 400, thereby looking up the production data of the original method 30 in time, analyzing the generated monitoring data, and providing guidance for the subsequent research and development.
Please refer to fig. 2, which is a first sub-flowchart of an APP start-up process control method according to an embodiment of the present disclosure. Step S110 further specifically includes steps S202-S206.
Step S202, the calling object of the original method 30 is obtained through the original method 30 signature. As will be appreciated, the method signature includes: parameter type, method name, and return value type, and the calling object of the original method 30 also includes: parameter type, method name, and return value type. The APP server 300 transmits the method name of the original method 30 acquired in the Load method to the nsmethodsignaturethod in the runtime library, and by transmitting the method name of the original method 30 to the nsmethodsignaturethod, the parameter type and the return value type of the original method 30 can be acquired according to the nsmethodsignaturethod, and the APP server 300 can acquire the method signature of the original method 30 according to the method name of the original method 30 and the acquired parameter type and return value type. The APP server 300 transmits the obtained method signature of the original method 30 to the method for obtaining the calling object to obtain the calling object of the original method 30.
And step S204, adding a monitoring method to the calling object to expand the calling object. It can be understood that, a developer adds a preset method in appldelete by using an Aspect Oriented Programming (AOP) technology, where the preset method is to add a monitoring method before and after the developer calls an object method, so that the whole process of the original method 30 when starting and when ending may be monitored according to the call object during running.
Step S206, acquiring the method pointer of the expanded call object. It can be understood that, the APP server 300 obtains the parameter of the extended call object, and transmits the parameter into the method for obtaining the pointer of the method 10 with monitoring in the load method to obtain the method pointer of the corresponding call object.
In the above embodiment, the monitoring method is added to the original method 30 by the AOP technology, so that the original method 30 can be changed only by changing the calling object in the calling object method in the preset monitoring method, and different original methods 30 can be monitored, thereby reducing intrusion to the service code, and starting monitoring can be easily realized only by writing the service code normally.
Please refer to fig. 3, which is a second sub-flowchart of an APP start-up process control method according to an embodiment of the present application. Step S112 further specifically includes steps S302-S306.
In step S302, a class for exchanging pointers is created. It will be appreciated that the developer adds a package to the project of the APP for creating a class for exchanging pointers.
In step S304, the pointer of the original method 30 and the pointer of the method 10 with monitoring are transferred to the switching method of the class. It can be understood that, after detecting that the original method pointer and the method pointer with monitoring of the same original method 30 are both obtained successively during running in the Load method, the APP server 300 packs and sends the original method pointer and the method pointer with monitoring of the original method 30 to the exchange method for pointer exchange.
Step S306 replaces the original method 30 with the method 10 with monitoring by exchanging pointers of the two methods. It can be understood that, in the exchange method, the APP server 300 places the transmitted pointer of the original method 30 and the pointer of the method with monitoring 10 into the exchange method for exchange, and after the exchange is successful, the APP server 300 replaces the pointer of the original method 30 with the pointer of the method with monitoring 10 and replaces the pointer of the method with monitoring 10 with the pointer of the original method 30.
In the above embodiment, the method 10 with monitoring can be called more conveniently when the APP runs by exchanging the pointer of the original method 30 and the pointer of the method 10 with monitoring.
Please refer to fig. 4, fig. 8, and fig. 9 in combination, which are third sub-flowcharts of an APP start-up process control method according to an embodiment of the present application. Fig. 8 is a schematic diagram of a monitoring method executed by a data monitoring method of a non-intrusive App provided in an embodiment of the present application, and fig. 9 is a schematic diagram of an App server accessing a data server of the data monitoring method of the non-intrusive App provided in the embodiment of the present application. Step S114 further includes steps S402-S406.
Step S402, the APP runs the method 10 with monitoring. It can be understood that, when the APP runs to the original method 30 during running, the APP server 300 runs the original method 30 according to the address of the pointer to the original method 30, but since the APP server 300 replaces the pointer of the original method 30 with the pointer to the method 10 with monitoring in the replacement method, the APP server 300 obtains the pointer to the method 10 with monitoring according to the address of the original method 30 during running of the APP, so that the APP can directly call the method 10 with monitoring during running. The APP server 300 accesses the method 10 with monitoring according to the pointer of the calling object, and calls the calling object according to the calling object method in the message library, thereby implementing that the APP runs the method 10 with monitoring when running.
The message library is the core of the Runtime, and the object method is called in Objective-C to carry out message transmission through the message library.
In step S404, the monitoring in the method with monitoring 10 acquires data generated in the operation process of the original method 30 in the method with monitoring 10. It can be understood that, as shown in fig. 8, the method 10 with monitoring adds monitoring before and after calling the object method, so that when the APP runs to the original method 30, the monitoring method a 20 obtains the starting time for running the original method 30, after the monitoring method a is run, the original method 30 is run again, and after the original method 30 is run, the monitoring method B40 is run again to obtain the execution result, the parameter, and the object name obtained by running the original method 30, and the ending time for running the original method 30.
For example, assuming that the original method 30 is a login method, when the APP runs to the method, the APP server 300 accesses the login method with monitoring according to the fact that the login method pointer is replaced by the login method pointer with monitoring, the APP server 300 first obtains the start time of the login method by the monitoring method a 20 at 2022-05-1309: 20:00, then runs the login method to obtain the account, the password and the login result of the login user, if the account of the user is XX, the login password is XX, the login result is successful login, after the login method is finished, the execution result, the parameters, the object name and the end time of running the login method are obtained by the monitoring method B40, the execution result obtained by the monitoring method B40 is successful login, the parameters are XX, the object name is the login method, the end time is 2022-05-1309: 20: 02.
Step S406, the data is uploaded to the data server 400 through a preset data channel. It can be understood that, after the monitoring method B40 is finished, the APP server 300 packages the monitoring data obtained by the monitoring method a 20 and the monitoring method B40 into a monitoring data packet, and the APP server 300 uploads the packaged monitoring data packet to the data server 400 through a log reporting channel or a TCP data connection channel. The data server 400 performs data aggregation on all the received monitoring data packets and combines the data from different data sources, so that the monitoring data can be more conveniently analyzed
For example, the data generated by the monitoring method a 20 is 2022-05-1309: 20:00, and the data generated by the monitoring method B40 is successful in registration, XX, 2022-05-1309: 20:02, according to step S404. The APP server 300 packages the data generated by the monitoring method a 20 and the monitoring method B40 into a monitoring data packet, and uploads the obtained monitoring data packet to the data server 400, so that the data server 400 receives the monitoring data packet and obtains the data of the login method 2022-05-1309: 20:00, and the login is successful, and the user logs in the data packet XX, the user logs in the data packet 2022-05-1309: 20:02
In the above embodiment, the monitored operation data of the original method 30 is uploaded to the data server 400, so that the production data of the original method 30 can be checked in time, and the generated monitoring data is analyzed, thereby providing guidance for subsequent research and development.
Please refer to fig. 5 in combination, which is a fourth sub-flowchart of an APP start-up process control method according to an embodiment of the present application. Step S102 further specifically includes steps S502-S504.
Step S502, configuring the files of the classes to be monitored. It can be understood that the developer writes a white list of class forming classes to be monitored in a configuration file in the APP project. And the classes added into the white list are stored in an array mode, and the configuration files for storing the classes are stored by adopting JSON and PLIST files.
In step S504, the original method 30 in the class in the file is obtained through the runtime library. It is understood that the original methods 30 included in the class include example methods and static methods. The APP server 300 acquires an instance method or a static method in the class according to different acquisition methods. In the present embodiment, the example method is obtained by using the class _ copyMethodList () method in the runtime library, and the static method is obtained by using the sel _ getName () method in the runtime library.
In the embodiment, the classes to be monitored are placed in the white list, so that the method in the classes to be monitored can be called more specifically, and the waste of resources is reduced.
Please refer to fig. 6, which is a first sub-flowchart of an APP start-up process control method according to an embodiment of the present application. Step S104 further includes steps S602 to S606.
Step S602, the original method 30 obtained by the runtime library is read. It will be appreciated that the APP server 300 traverses the classes in the configuration file through the properties of the runtime library, which obtains all the original methods 30 in each class. According to all the original methods 30 acquired by the runtime library, the APP server 300 reads all the acquired original methods 30.
Step S604, a preset method for obtaining a pointer is called according to the original method 30 to obtain the pointer of the original method 30. It can be understood that, according to all the original methods 30 obtained by the runtime library, the APP server 300 will make a call to all the original methods 30 in the Load method, and obtain pointers of the original methods 30 by using the method _ getName () method in the runtime library.
The pointer to the original method 30 is equivalent to the implementation address to the original method 30.
Step S606 calls a preset method for obtaining a method name according to the original method 30 to obtain the method name of the original method 30. It can be understood that the APP server 300 acquires the method name of the original method 30 according to the nsstringfromsector () method in the runtime library.
In the above embodiment, the method name of the original method 30 is obtained, so that the corresponding original method 30 can be obtained according to the method name in the preset monitoring, and the monitoring is performed according to the obtained original method 30, so as to reduce the intrusion of the service code, and the pointer of the original method 30 is obtained to be exchanged with the pointer of the method 10 with monitoring in the exchange method, so that the method 10 with monitoring can be called according to the replaced pointer when the APP runs, and the non-intrusion monitoring APP is implemented.
Please refer to fig. 7 in combination, which is a schematic diagram of an internal structure of a terminal according to an embodiment of the present application. The terminal 10 includes a computer-readable storage medium 11, a processor 12, and a bus 13. The computer-readable storage medium 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The computer readable storage medium 11 may in some embodiments be an internal storage unit of the terminal 10, such as a hard disk of the terminal 10. The computer readable storage medium 11 may in other embodiments also be an external terminal 10 storage device, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) Card, Flash memory Card (Flash Card), etc. provided on the terminal 10. Further, the computer-readable storage medium 11 may also include both an internal storage unit and an external storage device of the terminal 10. The computer-readable storage medium 11 may be used not only to store application software and various types of data installed in the terminal 10 but also to temporarily store data that has been output or will be output.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Further, the terminal 10 may also include a display assembly 14. The display component 14 may be a Light Emitting Diode (LED) display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch panel, or the like. The display component 14 may also be referred to as a display device or display unit, as appropriate, for displaying information processed in the terminal 10 and for displaying a visual user interface, among other things.
Further, the terminal 10 may also include a communication component 15. The communication component 15 may optionally include a wired communication component and/or a wireless communication component, such as a WI-FI communication component, a bluetooth communication component, etc., typically used to establish communication connections between the terminal 10 and other intelligent control devices.
The processor 12 may be, in some embodiments, a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip for executing program codes stored in the computer-readable storage medium 11 or Processing data. Specifically, the processor 12 executes a program to control the terminal 10 to implement a data monitoring method of the non-intrusive App.
It is to be understood that fig. 7 only shows the terminal 10 with the components 11-15 and a data monitoring method implementing a non-intrusive App, and it will be understood by those skilled in the art that the structure shown in fig. 7 does not constitute a limitation of the terminal 10, and may include fewer or more components than those shown, or combine certain components, or a different arrangement of components.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, to the extent that such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, it is intended that the present application also encompass such modifications and variations.
The above list is only for the preferred embodiment of the present application, and certainly, the scope of the present application should not be limited thereto, and therefore, the equivalent changes made to the claims of the present application should be made to the scope of the present application.
Claims (10)
1. A data monitoring method of a non-intrusive App is characterized by comprising the following steps:
acquiring an original method to be monitored through a runtime library, wherein the original method is one or more of an original example method or a static method in APP;
acquiring a method name of the original method and a pointer pointing to the original method;
acquiring a method signature in the original method through the method name;
calling the method signature in a preset monitoring method to obtain a method with monitoring for monitoring an original method, wherein the method with monitoring comprises the original method and a monitoring method for monitoring the original method;
acquiring a pointer pointing to the method with monitoring;
exchanging pointers between the original method and the method with monitoring in the replacement method; and
calling the method with monitoring when the APP runs, and uploading data generated by monitoring in the method with monitoring to a data server.
2. The data monitoring method of the non-intrusive App as recited in claim 1, wherein obtaining a pointer to the method with monitoring specifically comprises:
obtaining a calling object of the original method through the original method signature;
adding a monitoring method to the calling object to expand the calling object; and
and acquiring a method pointer of the expanded call object.
3. The data monitoring method of the non-intrusive App as claimed in claim 1, wherein exchanging pointers between the original method and the method with monitoring in the alternative method specifically includes:
creating a class for exchanging pointers;
transmitting the pointer of the original method and the pointer of the method with monitoring into the switching method of the class; and
the original method and the method with monitoring are replaced by the exchange of pointers of the two methods.
4. The data monitoring method of the non-intrusive App as claimed in claim 1, wherein invoking a method with monitoring at App run time and uploading data generated by monitoring in the method with monitoring to a data server specifically comprises:
APP operation belt monitoring method;
monitoring in the method with monitoring obtains data generated in the operation process of the original method in the method with monitoring; and
and uploading the data to a data server through a preset data channel.
5. The data monitoring method of the non-intrusive App as recited in claim 4, wherein uploading the data to a data server through a preset data channel comprises: and a log reporting channel or a data connection channel.
6. The data monitoring method of the non-intrusive App as recited in claim 1, wherein the original method for acquiring the required monitoring through the runtime library further comprises:
configuring files of classes to be monitored; and
and acquiring the original method in the class in the file through a runtime library.
7. The data monitoring method of the non-intrusive App as recited in claim 1, wherein obtaining the method name of the original method and the pointer to the original method specifically includes:
reading an original method obtained by a runtime library;
calling a preset method for acquiring the pointer according to the original method to obtain the pointer of the original method; and
and calling a preset method for obtaining the method name according to the original method to obtain the method name of the original method.
8. The data monitoring method of the non-intrusive App as defined in claim 1, wherein the method with monitoring comprises the original method and a monitoring method for monitoring the original method, the monitoring method being executed at the start and at the end of the execution of the original method.
9. The data monitoring method of the non-intrusive App of claim 1, wherein the App running environment is an IOS; and
the original method pointer, the method pointer with monitoring and the method name of the original method are obtained in the Load method.
10. A terminal, characterized in that the terminal comprises:
a computer readable storage medium for storing program instructions; and
a processor for executing the program instructions to implement the data monitoring method of a non-intrusive App as defined in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210682499.3A CN115033454A (en) | 2022-06-16 | 2022-06-16 | Data monitoring method and terminal of non-intrusive App |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210682499.3A CN115033454A (en) | 2022-06-16 | 2022-06-16 | Data monitoring method and terminal of non-intrusive App |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115033454A true CN115033454A (en) | 2022-09-09 |
Family
ID=83124189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210682499.3A Pending CN115033454A (en) | 2022-06-16 | 2022-06-16 | Data monitoring method and terminal of non-intrusive App |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115033454A (en) |
-
2022
- 2022-06-16 CN CN202210682499.3A patent/CN115033454A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108108205B (en) | Application page surface treatment method and apparatus | |
CN113259224B (en) | Method and device for sending customer service data | |
CN107729452B (en) | Webpage loading method and device, electronic equipment and computer readable storage medium | |
CN110365724B (en) | Task processing method and device and electronic equipment | |
CN102567516A (en) | Script loading method and device | |
CN113836540B (en) | Method, apparatus, storage medium and program product for managing application rights | |
CN111124544A (en) | Interface display method and device, electronic equipment and storage medium | |
CN112380145A (en) | SDK generation method, device, equipment and readable storage medium | |
CN109032693B (en) | Method and device for loading display information, electronic equipment and readable storage medium | |
CN111488144B (en) | Data processing method and device | |
CN116028108B (en) | Method, device, equipment and storage medium for analyzing dependent package installation time | |
CN111158777B (en) | Component calling method, device and computer readable storage medium | |
CN111240998A (en) | Test case processing method and device | |
CN113726855B (en) | Service aggregation method, device, electronic equipment and computer-readable storage medium | |
CN111124627A (en) | Method, device, terminal and storage medium for determining application program caller | |
CN115033454A (en) | Data monitoring method and terminal of non-intrusive App | |
CN113504898B (en) | Front-end assembly rapid processing method, system and computer storage medium for realizing business arrangement | |
CN112988604B (en) | Object testing method, testing system, electronic device and readable storage medium | |
CN114510334A (en) | Class instance calling method and device, electronic equipment and automatic driving vehicle | |
CN115113898A (en) | Dynamic updating method and device for micro application, computer equipment and storage medium | |
CN114780497A (en) | Batch file processing method, apparatus, computer device, medium, and program product | |
CN114546410A (en) | Code optimization method based on design mode and related equipment | |
CN113064987A (en) | Data processing method, apparatus, electronic device, medium, and program product | |
CN113568720A (en) | Process management, development and configuration method, device, electronic equipment and storage medium | |
CN113342633B (en) | Performance test method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |