CN109766246B - Method and apparatus for monitoring applications - Google Patents

Method and apparatus for monitoring applications Download PDF

Info

Publication number
CN109766246B
CN109766246B CN201910107650.9A CN201910107650A CN109766246B CN 109766246 B CN109766246 B CN 109766246B CN 201910107650 A CN201910107650 A CN 201910107650A CN 109766246 B CN109766246 B CN 109766246B
Authority
CN
China
Prior art keywords
view
view controller
controller
application
stack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910107650.9A
Other languages
Chinese (zh)
Other versions
CN109766246A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910107650.9A priority Critical patent/CN109766246B/en
Publication of CN109766246A publication Critical patent/CN109766246A/en
Application granted granted Critical
Publication of CN109766246B publication Critical patent/CN109766246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for monitoring an application. The method comprises the following specific implementation modes: monitoring the calling of a view controller of the application to the view displayed method; generating calling condition information; and monitoring the view display condition of the application based on the calling condition information. This embodiment provides a new way of monitoring applications.

Description

Method and device for monitoring applications
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and apparatus for monitoring an application.
Background
With the development of computer technology, various functions realized by the computer technology are increasingly optimized. Software Development Kit (SDK) is generally a collection of Development tools used by Software engineers to build application Software for a particular Software package, software architecture, hardware platform, operating system, etc. With the continuous development of the technology, the software development kit may have some functions, such as a push function, an image recognition function, a mobile payment function, and a voice recognition analysis function. The developer does not need to develop each function of the product, and can integrate a certain function in the product by selecting a proper and stable software development kit.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for monitoring an application.
In a first aspect, an embodiment of the present disclosure provides a method for monitoring an application, the method including: monitoring the calling of a view controller of the application to the view displayed method; generating calling condition information; and monitoring the view display condition of the application based on the calling condition information.
In some embodiments, the call condition information includes a view controller corresponding to a current display view of the application; and the above method further comprises: in response to the detection of a predefined trigger operation, determining a view controller corresponding to the current display view of the application according to the calling condition information, and determining the determined view controller as the current view controller, wherein the trigger operation is used for triggering the display of a new view; and displaying the new view according to the current view controller.
In some embodiments, the generating the call condition information includes: building a stack; and modifying the elements in the stack according to the calling of the view controller to the view life cycle method to generate calling condition information.
In some embodiments, the modifying the element in the stack according to the call of the view controller to the view lifecycle method to generate call condition information includes: in response to detecting that the view controller calls the view displayed method, pushing a view controller identifier of the view controller calling the view displayed method to a stack; in response to detecting that the view controller calls the view disappeared method, the view controller identification of the view controller calling the view disappeared method is popped from the stack.
In some embodiments, the determining, in response to detecting the predefined trigger operation and according to the call condition information, a view controller corresponding to the current display view of the application, and determining the determined view controller as the current view controller include: in response to detecting the trigger operation, acquiring a view controller identifier positioned at the top of the stack in the stack; and determining the view controller indicated by the acquired view controller identification as the current view controller.
In some embodiments, the generating the call condition information includes: in response to determining that the view controller calls the view displayed method, adding a view controller identifier of the view controller calling the view displayed method to the call situation information; in response to determining that the view controller invokes the view lost method, the view controller identification of the view controller invoking the view lost method is deleted from the invocation status information.
In a second aspect, an embodiment of the present disclosure provides an apparatus for monitoring an application, the apparatus including: a first monitoring unit configured to monitor invocation of a view presented device by a view controller of an application; a generation unit configured to generate call situation information; and the second monitoring unit is configured to monitor the view display condition of the application based on the calling condition information.
In some embodiments, the call condition information includes a view controller corresponding to a current display view of the application; and the above apparatus further comprises: the determining unit is configured to determine a view controller corresponding to a current display view of the application according to the calling condition information in response to detection of a predefined trigger operation, and determine the determined view controller as a current view controller, wherein the trigger operation is used for triggering display of a new view; and the display unit is configured to display the new view according to the current view controller.
In some embodiments, the generating unit is further configured to: building a stack; and modifying the elements in the stack according to the call of the view controller to the view life cycle device to generate call condition information.
In some embodiments, the generating unit is further configured to: in response to detecting that the view controller calls the view exhibited apparatus, pushing a view controller identification of the view controller calling the view exhibited apparatus into a stack; and in response to detecting that the view controller calls the view disappeared device, popping the view controller identification of the view controller calling the view disappeared device from the stack.
In some embodiments, the determining unit is further configured to: in response to detecting the trigger operation, acquiring a view controller identifier positioned at the top of the stack in the stack; and determining the view controller indicated by the acquired view controller identification as the current view controller.
In some embodiments, the generating unit is further configured to: in response to determining that the view controller calls the view-already-exhibited device, adding a view controller identification of the view controller calling the view-already-exhibited device to the call situation information; in response to determining that the view controller calls the view-lost device, the view controller identification of the view controller calling the view-lost device is deleted from the call situation information.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the method and the device for monitoring the application, the view controller in the monitoring application calls the view displayed method, then the calling condition information is generated, and then the view display condition of the application is monitored based on the calling condition information, and the technical effects at least comprise the following steps: a new way of monitoring applications is provided.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for monitoring an application according to the present disclosure;
FIG. 3 is a schematic illustration of an application scenario of a method for monitoring an application according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method for monitoring an application according to the present disclosure;
FIG. 5 is a flow diagram of yet another embodiment of a method for monitoring an application according to the present disclosure;
FIG. 6 is a schematic block diagram of one embodiment of an apparatus for monitoring applications according to the present disclosure;
FIG. 7 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the figures and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the disclosed method for monitoring an application or apparatus for monitoring an application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 may be the medium used to provide communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a call application, a live application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the terminal devices 101, 102, and 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices with communication functions, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, motion Picture Experts Group Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, motion Picture Experts Group Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server supporting some functions in a live like application on the terminal devices 101, 102, 103. For example, the backend server may send a software development kit responsible for implementing a certain function to the terminal device. The terminal device may run a software development kit, thereby enabling implementation of such functionality in an application.
It should be noted that the method for monitoring the application provided by the embodiment of the present disclosure is generally performed by the terminal device 101, 102, 103, and accordingly, the apparatus for monitoring the application is generally in the terminal device 101, 102, 103.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring to FIG. 2, a flow 200 of one embodiment of a method for monitoring an application is shown. The embodiment is mainly exemplified by applying the method to an electronic device with certain computing capability, and the electronic device may be the terminal device shown in fig. 1. The method for monitoring an application comprises the following steps:
step 201, monitoring the calling of the view controller of the application to the view displayed method.
In this embodiment, a method execution subject (for example, the terminal device shown in fig. 1) for monitoring an application may monitor a call of a view controller of the application to a view-exposed method.
In this embodiment, the execution body may have an application installed thereon. The application may present a view (e.g., a content profile page). The execution agent may install a software development kit. The software development kit may implement certain functions, such as generating and presenting new views (e.g., a content detail page for a concept in a content introduction page, etc.).
Here, the terminal device in which the software development kit is installed may be an execution subject. That is, the terminal device may execute the method in this embodiment when running the installed software development kit.
In this embodiment, the application may generate the view and the display view by using a view controller (view controller). The view controller in the application may be one or more. It is understood that the view controller may invoke various view-related methods provided in an operating system (e.g., iOS system or android system) to perform various operations on the view (e.g., expose a new view, un-expose a view, etc.).
In this embodiment, the operating system may provide a view-exposed method. Here, the view exposed method may be a type of lifecycle function that is invoked when the view is actually exposed.
It should be noted that there are many ways that the view controller may present the new view, and if starting from the presentation method of monitoring the new view, it needs to monitor a plurality of methods. However, the inventors contemplate that there is a commonality after view presentation regardless of the way the view is presented — the call view presented method. Thus, the inventor thinks that monitoring the view displayed by the application can be realized starting from the calling of the method displayed by the monitoring view.
Step 202, call situation information is generated.
In this embodiment, the execution subject may generate call situation information.
Here, the call situation information may include a view controller corresponding to a current presentation view of the application.
In this embodiment, the call situation information may be a record of the call situation of the view controller of the application to the view-exposed method. The call situation information may be generated in various ways. That is, the call situation information may be recorded in various ways.
In some embodiments, step 202 may be implemented by: and recording the time of calling the view displayed method by at least one view controller, and correspondingly storing the recorded time and the view controller identifier to obtain calling condition information.
And 203, monitoring the view display condition of the application based on the calling condition information.
In this embodiment, the execution main body may monitor the view display condition of the application based on the call condition information.
In this embodiment, the view presentation status of the application may include the order in which the views are presented by the application and the current presentation view of the application. The execution subject can monitor the view display condition of the application.
It should be noted that, in the prior art, the application itself typically sends the view display situation information of the application (including the view controller identifier of the currently displayed view, the view display sequence information, etc.) to the terminal device. In the application, the execution main body generates and maintains the calling condition information by itself starting with the calling of the view displayed method from the monitoring view controller, so that the execution main body can monitor the view display condition of the application by itself.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for monitoring an application according to the embodiment shown in fig. 2. Specifically, the method comprises the following steps:
the terminal 301 may monitor the invocation of the view exposed method by the view controller of the application.
The terminal 301 may generate call situation information. Here, the call situation information may include a view controller corresponding to the current presentation view of the application.
The terminal 301 may monitor the view display condition of the application based on the call condition information.
In the method provided by the above embodiment of the present disclosure, the call of the view controller in the application to the view displayed method is monitored, then the call condition information is generated, and then the view display condition of the application is monitored based on the call condition information, and the technical effects at least include: a new way of monitoring applications is provided.
In some embodiments, generating call case information may include: allocating a storage space for the calling condition information, wherein the information in the storage space can be used as the calling condition information; then, in response to determining that the view controller invokes the view exposed method, a view controller identification of the view controller invoking the view exposed method may be added to the invocation status information; in response to determining that the view controller invokes the view lost method, the view controller identification of the view controller for the view lost method is deleted from the invocation status information.
Therefore, it can be seen that, after the operations of adding and deleting in time are described above, only the view controller corresponding to the currently displayed view may be included in the call condition information, and therefore, the view controller indicated by the view controller identifier in the call condition information may be determined as the current view controller.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for monitoring an application is shown. The process 400 of the method for monitoring an application includes the following steps:
the implementation manner and technical effect of step 401, step 402 and step 403 may refer to the description in step 201, step 202 and step 203, and are not described herein again.
Step 404, in response to detecting the predefined trigger operation, according to the call condition information, determining a view controller corresponding to the current display view of the application, and determining the determined view controller as the current view controller.
In this embodiment, the executing entity may determine, in response to detecting the predefined trigger operation, a view controller corresponding to the current display view of the application according to the call condition information generated in step 402, and determine the view controller corresponding to the determined current display view as the current view controller.
Here, the above-described trigger operation is used to trigger presentation of a new view. As an example, the triggering operation may be implemented by a user clicking a preset control on a screen, and the execution main body may present a new view by clicking the preset control.
It will be appreciated that the executing agent may need to know what the current view is before the new view is presented. The relationship between the views can be regarded as different layers, and when a new view is to be displayed, the new layer needs to be added on the top layer, otherwise, the top layer cannot be displayed.
In some implementations, if the call condition information includes the corresponding recorded time and the view controller identifier, a view controller of the at least one view controller, in which the last call view has been displayed, may be found according to the recorded times; and determining the found view controller as the view controller corresponding to the current display view, namely the current view controller.
Step 405, the new view is presented according to the current view controller.
In this embodiment, the execution subject may display a new view according to the current view controller.
Here, the execution body may set the layer priority of the new view above the view priority of the managed view of the current view controller. I.e. the new view can be presented on top of the current presented view. The new view is thus at the top of the multiple views of the application and can thus be presented.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for monitoring an application in the embodiment highlights the steps of determining a current view controller according to the call situation information and presenting a new view according to the current view controller. Therefore, the technical effects of the solution described in this embodiment at least include:
first, a new way of determining the current view controller is provided.
Second, the speed of displaying new views is increased. When the execution main body needs to display the new view, the execution main body does not need to interact with the application (in the prior art, the current view controller identifier needs to be requested from the application), and the view controller identifier of the current view controller is directly obtained from the calling condition information generated by the execution main body, so that the new view is rapidly displayed. Thus, the speed of presenting the new view may be provided.
With further reference to FIG. 5, a flow 500 of yet another embodiment of a method for monitoring an application is shown. The process 500 of the method for monitoring an application includes the steps of:
step 501, monitoring the invocation of the method displayed by the view controller of the application to the view.
In this embodiment, an execution subject of a method for monitoring an application (e.g., a terminal device shown in fig. 1) may monitor a call of a view controller of the application to a view-one-stop method.
The implementation details and technical effects of step 501 may refer to the description in step 201, and are not described herein again.
Step 502, build a stack.
In this embodiment, the execution agent may establish a stack.
In this embodiment, a stack (stack), also known as a stack, is a linear table with limited operations. The limitation is that only insert and delete operations are allowed at one end of the table. This end is called the top of the stack, and the opposite end is called the bottom of the stack. Inserting a new element into a stack, which is called stack pushing, stack pushing or push, and the new element is placed on the top element of the stack to be a new top element of the stack; deleting an element from a stack, also known as popping or popping, deletes the top-of-stack element, making its neighbors a new top-of-stack element.
In some implementations, the execution subject may modify elements in the stack according to a call of the view controller to the view lifecycle method, and generate call condition information. Here, the view lifecycle method may include a view presented method, and optionally, may further include a view lost method.
Optionally, modifying the elements in the stack may be implemented in step 503.
Optionally, modifying the elements in the stack may be implemented by step 503 and step 504.
In response to detecting that the view controller calls the view displayed method, the view controller identifier of the view controller calling the view displayed method is pushed onto the stack, step 503.
In this embodiment, the executing entity may push the view controller identifier of the view controller calling the view exhibited method to the stack in response to detecting that the view controller calls the view exhibited method.
In response to detecting that the view controller calls the view-lost method, the view controller identification of the view controller calling the view-lost method is popped from the stack, STEP 504.
In this embodiment, the execution subject may pop the view controller identifier of the view controller calling the view lost method from the stack in response to detecting that the view controller calls the view lost method.
Here, it is understood that the execution agent may maintain the stack through step 503 and step 504 after the stack is established at step 502.
And step 505, in response to detecting the trigger operation, acquiring the identifier of the view controller positioned at the top of the stack in the stack.
In this embodiment, the executing entity may acquire, in response to detecting the trigger operation, the identifier of the view controller located at the top of the stack in the stack maintained in steps 502, 503, and 504.
In step 506, the acquired view controller identifier indicates a view controller, which is determined as a current view controller.
In this embodiment, the executing entity may determine the view controller indicated by the view controller identifier obtained in step 505 as the current view controller.
Step 507, displaying the new view according to the current view controller.
In this embodiment, the execution subject may display a new view according to the current view controller.
Here, the details and technical effects of step 507 may refer to the description in step 405, and are not described herein again.
As can be seen from fig. 5, compared with the embodiment corresponding to fig. 2, the flow 500 of the method for monitoring an application in this embodiment highlights the steps of establishing a stack, maintaining call status information using a stack structure, and obtaining a view controller identifier from the top of the stack, thereby determining a current view controller. Therefore, the technical effects of the solution described in this embodiment at least include:
first, a new way of determining the current view controller is provided.
Second, the speed of determining the current view controller is increased, thereby increasing the speed of presenting the new view. When the execution main body modifies the calling condition information, the first-in first-out characteristic of the stack structure ensures that the execution main body only needs to push and pop the identifier of the view controller, and does not need to consider and operate the identifiers except the identifier of the view controller (such as calling time and the like), thereby improving the speed of determining the current view controller; when the execution main body needs to display the new view, the execution main body does not need to interact with the application (in the prior art, the current view controller identifier needs to be requested from the application), and the view controller identifier of the current view controller is directly obtained from the calling condition information generated by the execution main body, so that the new view is rapidly displayed. Thus, the speed of presenting the new view may be provided.
With further reference to fig. 6, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for monitoring an application, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 6, the apparatus 600 for monitoring an application of the present embodiment includes: a first monitoring unit 601, a generating unit 602 and a second monitoring unit 603. The first monitoring unit is configured to monitor the calling of the view controller of the application to the view-displayed device; a generation unit configured to generate call situation information; and the second monitoring unit is configured to monitor the view display condition of the application based on the calling condition information.
In this embodiment, specific processes of the first monitoring unit 601, the generating unit 602, and the second monitoring unit 603 of the apparatus 600 for monitoring an application and technical effects brought by the processes may refer to related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not described herein again.
In some embodiments, the call condition information includes a view controller corresponding to a current display view of the application; and the above apparatus further comprises: a determining unit (not shown in the figure), configured to determine, in response to detection of a predefined trigger operation, a view controller corresponding to a currently displayed view of the application according to the call condition information, and determine the determined view controller as a current view controller, where the trigger operation is used to trigger display of a new view; and a presentation unit (not shown) configured to present the new view according to the current view controller.
In some embodiments, the generating unit is further configured to: building a stack; and modifying the elements in the stack according to the call of the view controller to the view life cycle device to generate call condition information.
In some embodiments, the generating unit is further configured to: in response to detecting that the view controller calls the view exhibited apparatus, pushing a view controller identification of the view controller calling the view exhibited apparatus into a stack; in response to detecting that the view controller calls the view lost device, the view controller identification of the view controller calling the view lost device is popped from the stack.
In some embodiments, the determining unit is further configured to: in response to detecting the trigger operation, acquiring a view controller identifier positioned at the top of the stack in the stack; and determining the view controller indicated by the acquired view controller identification as the current view controller.
In some embodiments, the generating unit is further configured to: in response to determining that the view controller invokes the view exhibited apparatus, adding a view controller identification of the view controller invoking the view exhibited apparatus to the call situation information; in response to determining that the view controller calls the view-lost device, the view controller identification of the view controller calling the view-lost device is deleted from the call situation information.
It should be noted that, for details of implementation and technical effects of each unit in the apparatus for monitoring an application provided in the embodiments of the present disclosure, reference may be made to descriptions of other embodiments in the present disclosure, and details are not described herein again.
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., a terminal or server of fig. 1) 700 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage means 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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 be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: transmitting, to a processor of the at least two processors, a subset of training samples in the set of training samples, wherein the processor is configured to: monitoring the calling of a view controller of the application to the view displayed method; generating calling condition information; and monitoring the view display condition of the application based on the calling condition information.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation of the element itself, for example, the first monitoring element may also be described as an "element monitoring the invocation of the view exposed method by the view controller of the application".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (14)

1. A method for monitoring an application, comprising:
monitoring the calling of a view controller of the application to the view displayed method; the view displayed method is a method which is called when the view is displayed and is related to the life cycle of the view;
generating calling condition information; the calling condition information is the record of the calling condition of the view controller of the application to the method displayed by the view;
and monitoring the view display condition of the application based on the calling condition information.
2. The method of claim 1, wherein the call situation information comprises a view controller corresponding to a currently presented view of the application; and
the method further comprises the following steps:
in response to the detection of a predefined trigger operation, according to the calling condition information, determining a view controller corresponding to the current display view of the application, and determining the determined view controller as the current view controller, wherein the trigger operation is used for triggering the display of a new view;
and displaying the new view according to the current view controller.
3. The method of claim 2, wherein the generating call case information comprises:
building a stack;
and modifying elements in the stack according to the calling of the view controller to the view life cycle method to generate calling condition information.
4. The method of claim 3, wherein the modifying elements in the stack to generate call situation information in accordance with the call to the view lifecycle method by the view controller comprises:
in response to detecting that the view controller calls the view displayed method, pushing a view controller identifier of the view controller calling the view displayed method to a stack;
in response to detecting that the view controller calls the view disappeared method, the view controller identification of the view controller calling the view disappeared method is popped from the stack.
5. The method of claim 3, wherein the determining a view controller corresponding to a currently presented view of the application according to the call situation information in response to detecting a predefined trigger operation and determining the determined view controller as a current view controller comprises:
in response to detecting the trigger operation, acquiring a view controller identifier positioned at the top of a stack in the stack;
determining the acquired view controller to identify the indicated view controller as the current view controller.
6. The method of claim 1, wherein the generating call case information comprises:
in response to determining that the view controller invokes the view exhibited method, adding a view controller identification of the view controller invoking the view exhibited method to the call case information;
in response to determining that the view controller invokes the view disappeared method, the view controller identification of the view controller invoking the view disappeared method is deleted from the invocation status information.
7. An apparatus for monitoring an application, comprising:
a first monitoring unit configured to monitor a call of a view controller of an application to a view-exposed method; the view displayed method is a method which is called when the view is displayed and is related to the life cycle of the view;
a generation unit configured to generate call situation information; the calling condition information is the record of the calling condition of the view controller of the application to the method which is displayed by the view;
and the second monitoring unit is configured to monitor the view display condition of the application based on the calling condition information.
8. The apparatus of claim 7, wherein the call situation information comprises a view controller corresponding to a currently exposed view of the application; and
the device further comprises:
the determining unit is configured to determine a view controller corresponding to a current display view of the application according to the calling condition information in response to detection of a predefined trigger operation, and determine the determined view controller as a current view controller, wherein the trigger operation is used for triggering display of a new view;
a presentation unit configured to present the new view according to the current view controller.
9. The apparatus of claim 8, wherein the generating unit is further configured to:
building a stack;
and modifying elements in the stack according to the call of the view controller to the view life cycle device to generate call condition information.
10. The apparatus of claim 9, wherein the generating unit is further configured to:
in response to detecting that the view controller calls the view exhibited apparatus, pushing a view controller identification of the view controller calling the view exhibited apparatus into a stack;
in response to detecting that the view controller calls the view lost device, the view controller identification of the view controller calling the view lost device is popped from the stack.
11. The apparatus of claim 9, wherein the determining unit is further configured to
In response to detecting the trigger operation, acquiring a view controller identifier positioned at the top of a stack in the stack;
determining the acquired view controller to identify the indicated view controller as the current view controller.
12. The apparatus of claim 7, wherein the generating unit is further configured to:
in response to determining that the view controller invokes the view exhibited apparatus, adding a view controller identification of the view controller invoking the view exhibited apparatus to the call situation information;
in response to determining that the view controller calls the view-disappeared device, a view controller identification of the view controller that calls the view-disappeared device is deleted from the call situation information.
13. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910107650.9A 2019-02-02 2019-02-02 Method and apparatus for monitoring applications Active CN109766246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910107650.9A CN109766246B (en) 2019-02-02 2019-02-02 Method and apparatus for monitoring applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910107650.9A CN109766246B (en) 2019-02-02 2019-02-02 Method and apparatus for monitoring applications

Publications (2)

Publication Number Publication Date
CN109766246A CN109766246A (en) 2019-05-17
CN109766246B true CN109766246B (en) 2023-04-07

Family

ID=66456062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910107650.9A Active CN109766246B (en) 2019-02-02 2019-02-02 Method and apparatus for monitoring applications

Country Status (1)

Country Link
CN (1) CN109766246B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104303140A (en) * 2012-05-11 2015-01-21 三星电子株式会社 Multiple window providing apparatus and method
CN106909262A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of data processing method and device
CN107729214A (en) * 2017-10-13 2018-02-23 福建富士通信息软件有限公司 A kind of visual distributed system monitors O&M method and device in real time

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140038708A1 (en) * 2012-07-31 2014-02-06 Cbs Interactive Inc. Virtual viewpoint management system
CN103761474B (en) * 2014-01-24 2016-08-17 北京京东尚科信息技术有限公司 A kind of method and device for monitoring the execution time of a monitoring method
CN104346168B (en) * 2014-10-13 2017-08-29 国家电网公司 A kind of monitoring management method for visualizing based on interexchange bus
US20170357568A1 (en) * 2016-06-12 2017-12-14 Apple Inc. Device, Method, and Graphical User Interface for Debugging Accessibility Information of an Application
CN106203113B (en) * 2016-07-08 2018-11-16 西安电子科技大学 The privacy leakage monitoring method of Android application file
CN106874168A (en) * 2017-01-12 2017-06-20 北京奇虎科技有限公司 Determine method, device and the mobile terminal of application program runnability
CN108874381B (en) * 2017-05-09 2021-09-07 武汉斗鱼网络科技有限公司 Method and device for outputting page view controller and electronic equipment
CN108984245B (en) * 2018-06-20 2021-08-31 武汉斑马快跑科技有限公司 Page switching method and system based on single-view controller
CN109144638B (en) * 2018-08-07 2021-11-09 武汉斗鱼网络科技有限公司 Android horizontal and vertical screen data synchronization method and device, terminal and readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104303140A (en) * 2012-05-11 2015-01-21 三星电子株式会社 Multiple window providing apparatus and method
CN106909262A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of data processing method and device
CN107729214A (en) * 2017-10-13 2018-02-23 福建富士通信息软件有限公司 A kind of visual distributed system monitors O&M method and device in real time

Also Published As

Publication number Publication date
CN109766246A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
WO2020207454A1 (en) Information pushing method and device
CN109753332B (en) Method and device for displaying information
CN109862100B (en) Method and device for pushing information
WO2020216204A1 (en) Information acquisition method and apparatus
CN110619100B (en) Method and apparatus for acquiring data
JP7033165B2 (en) How and equipment to process information in parallel
CN109992719B (en) Method and apparatus for determining push priority information
CN111694629A (en) Information display method and device and electronic equipment
CN110673886B (en) Method and device for generating thermodynamic diagrams
CN111813685B (en) Automatic test method and device
CN111580883A (en) Application program starting method, device, computer system and medium
CN111460211A (en) Audio information playing method and device and electronic equipment
CN109766246B (en) Method and apparatus for monitoring applications
US11366613B2 (en) Method and apparatus for writing data
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN110619079B (en) Method and device for pushing information
CN110187987B (en) Method and apparatus for processing requests
CN113568695A (en) Corner mark processing method and device for boarder application
CN115373869A (en) Process processing method and device based on AAR and electronic equipment
WO2020224295A1 (en) Information management method, device, and system
CN109614137B (en) Software version control method, device, equipment and medium
CN111831530A (en) Test method and device
CN112311842A (en) Method and device for information interaction
CN110099122B (en) Method and apparatus for sending network request

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant