CN111966421A - Page component operation monitoring method, device, equipment and storage medium - Google Patents
Page component operation monitoring method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111966421A CN111966421A CN202010605991.1A CN202010605991A CN111966421A CN 111966421 A CN111966421 A CN 111966421A CN 202010605991 A CN202010605991 A CN 202010605991A CN 111966421 A CN111966421 A CN 111966421A
- Authority
- CN
- China
- Prior art keywords
- life cycle
- function
- page component
- functions
- calling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 97
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000006870 function Effects 0.000 claims abstract description 181
- 230000015654 memory Effects 0.000 claims description 20
- 238000012806 monitoring device Methods 0.000 claims description 10
- 239000000126 substance Substances 0.000 claims description 2
- 230000008569 process Effects 0.000 description 14
- 230000002159 abnormal effect Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 7
- 230000005856 abnormality Effects 0.000 description 6
- 230000006399 behavior Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000012905 input function Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- 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/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- 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
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application discloses a method, a device, equipment and a storage medium for monitoring operation of a page component, and relates to the technical field of page component monitoring and cloud computing. The specific implementation scheme is as follows: calling and monitoring a plurality of life cycle functions of the page component; when the call is monitored, determining the call time for the called life cycle function; and monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component. The embodiment of the application can improve the exception handling efficiency.
Description
Technical Field
The application relates to the technical field of computers, in particular to the technical field of page component monitoring and cloud computing, and specifically relates to a method, a device, equipment and a storage medium for monitoring operation of a page component.
Background
San is an MVVM (Model-View-ViewModel) component framework. The system is small in size (11K), good in compatibility (IE6) and excellent in performance, and is a reliable and dependable solution for realizing a responsive user interface. Generally, data defined in San is packaged, so that when the data is effectively changed, the San component (page component) is notified, the page component depends on a node relation tree generated in a template compiling stage, a minimum view needing to be changed is determined, asynchronous updating of the view is further completed, and the efficiency of view updating is guaranteed. However, an exception occurs during the operation of the page component, so a scheme for monitoring the operation of the page component is needed.
Disclosure of Invention
The application provides a running monitoring scheme for a page assembly, so that when the page assembly is abnormal in the running process, scenes and user operation behaviors when the abnormality occurs can be restored, conditions are provided for positioning problems and solving problems, and the abnormality processing efficiency is improved.
In a first aspect, an embodiment of the present application provides a method for monitoring operation of a page component, including:
calling and monitoring a plurality of life cycle functions of the page component;
when the call is monitored, determining the call time for the called life cycle function;
and monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component.
In a second aspect, an embodiment of the present application provides an operation monitoring device for a page component, including:
the first monitoring module is used for calling and monitoring a plurality of life cycle functions of the page component;
the determining module is used for determining calling time for the called life cycle function when the calling is monitored;
and the second monitoring module is used for monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component.
In a third aspect, an embodiment of the present application provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of monitoring operation of a page assembly as described in any of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method for monitoring the operation of a page component according to any one of the embodiments of the present application.
The embodiment of the application can improve the exception handling efficiency.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a schematic flowchart of a method for monitoring operation of a page component according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for monitoring the operation of a page component according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a process for generating operation monitoring data according to an embodiment of the present application;
FIG. 4 is a schematic diagram of the whole operation process of a page component provided according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of an operation monitoring device for a page assembly according to an embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing a method for monitoring the operation of a page component according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The following describes a method, an apparatus, a device, and a storage medium for monitoring operation of a page component provided in an embodiment of the present application with specific reference to the accompanying drawings, and first describes a method for monitoring operation of a page component provided in an embodiment of the present application with reference to fig. 1. Fig. 1 is a schematic flowchart of a method for monitoring operation of a page component according to an embodiment of the present application, and referring to fig. 1, the method includes the following steps:
and S101, calling and monitoring a plurality of life cycle functions of the page component.
The method for monitoring the operation of the page component provided in this embodiment may be executed by the apparatus for monitoring the operation of the page component provided in this embodiment, and the apparatus may be configured in an electronic device to monitor the operation process of the page component.
In the embodiment of the invention, the page component refers to an san component in an san framework. The plurality of lifecycle functions for the san component may include: the complex function, the input function, the created function, the atteched function, the stepped function, the deployed function, and the updated function, for a total of 7 lifecycle functions. Wherein the complied represents that the compiling of the component view template is completed; inited indicates that the component instance is initialized; created represents the creation of the component element is completed; atteched indicates that the component has been attached to the page; updated represents a component data update; detached represents the removal of a component from a page; disposed represents that the component uninstall is complete. For example, a complied function is called when the component is compiled; when the component is mounted into the page, an atteched function is called; component uninstall from a page calls a dispatched function.
Optionally, a plurality of lifecycle functions of the page component may be called and monitored through a preset lifecycle function monitor; alternatively, whether or not the plurality of lifecycle functions of the page component are used is monitored, the plurality of lifecycle functions of the page component are called for monitoring, and the like, which are not specifically limited herein.
And S102, determining the calling time for the called life cycle function when the calling is monitored.
Optionally, a plurality of lifecycle functions in the page component may be called at any time, and the called lifecycle functions exist at a corresponding time, so that when it is detected that any lifecycle function is called, the calling time of the called lifecycle function may be determined.
As an alternative implementation, the call time when the lifecycle function is called can be determined, and the call time when the lifecycle function is called can be recorded by using an application program interface (performance api) provided by a browser.
For example, when the lifecycle function complied function and the atteched function call are monitored, the call time of the lifecycle function can be recorded respectively based on the performance api provided by the browser.
Furthermore, in order to conveniently determine the call time of the life cycle function, in the embodiment of the application, when the call time of the life cycle function is recorded based on the application interface provided by the browser, the call time of the life cycle function can be marked by using a marking function. In this embodiment, the mark function may be performance.
That is to say, in this embodiment, determining the calling time for the called lifecycle function includes: and calling an application program interface provided by a browser, and marking the calling time of the life cycle function by adopting a marking function in the application program interface so as to quickly and accurately determine the calling time of the life cycle based on the marking function.
S103, monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component.
Optionally, after the call time of the plurality of life cycle functions in the page component is determined, the life cycle functions of the page component may be rewritten by a decorator (decorator) provided by a new standard (ES6) of the JavaScript language, the call time of each life cycle function is recorded when the life cycle function is called, and then the operation performance of the page component is analyzed according to the call time of the life cycle, so as to determine whether an abnormality occurs in the operation process of the page component.
According to the technical scheme, the plurality of life cycle functions of the page assembly are called and monitored, when the calling is monitored, the calling time is determined for the called life cycle functions, and then the operation of the page assembly is monitored according to the calling time of the plurality of life cycle functions of the page assembly. Therefore, whether the page component is abnormal in the operation process is determined based on the operation condition of the page component, so that when the page component is abnormal in the operation process, scenes and user operation behaviors in the abnormal state can be restored, conditions are provided for positioning problems and solving problems, and the abnormity processing efficiency is improved.
Fig. 2 is a schematic flowchart of another method for monitoring the operation of a page component according to an embodiment of the present application. The present embodiment is an alternative proposed on the basis of the above-described embodiments. As shown in fig. 2, the method comprises the steps of:
s201, calling and monitoring a plurality of life cycle functions of the page component.
S202, when the call is monitored, determining the call time for the called life cycle function.
S203, when the call of the uninstalling function is monitored, generating operation monitoring data according to the monitored call time of each life cycle function.
Wherein the plurality of lifecycle functions includes an unload function for unloading the page component. Such as a stepped function.
Generally, when the offload function is called, it generally means that all performance data of the page component have been completely counted, and at this time, the operation monitoring data of the page component may be generated. Therefore, when call operation of an offload function (a stepped function) in a plurality of lifecycle functions of a page component is monitored, the present embodiment may generate operation monitoring data of the page component from call moments of all the lifecycle functions monitored before, so as to provide conditions for subsequently determining operation performance of the page component.
As an alternative implementation, the present application may generate the operation monitoring data through fig. 3.
As shown in fig. 3, the method comprises the steps of:
s301, determining and setting the calling time interval between the two life cycle functions according to the monitored calling time of each life cycle function.
The two set lifecycle functions can be any two lifecycle functions in a plurality of lifecycles of the page component. In this embodiment, two sets of lifecycle functions are set, wherein one set of two lifecycle functions is respectively used for loading the page component into a page and compiling the view template of the page component.
For facilitating understanding of the present solution, the following explains the whole operation process of the page component based on fig. 4, specifically when a new page component request (new) is triggered, first determining whether there is a code (Has 'el' option) of the component template currently, if so, parsfrom el analyzes the code of the event view template, that is, compiling the component template representation to obtain a compilation result (initdata); if not, then the component instance initialization is done directly based on edit (build). And then, triggering and loading a page component in the page through call attach, completing component element creation based on a create component element creation function, attaching the component to a page function based on attach, and attaching the created component element to the page. Then, a page component removal request is triggered by call detail to remove a page component from the page based on the detail removal function. Finally, an unload page component request from the page is triggered by call release to remove the page component from the page based on detach and to unload the removed page component from the page based on release.
That is, as can be seen from fig. 4, the setting of the two lifecycle functions in the present embodiment includes the following cases: in case one, the complex function and the input function are set two life cycle functions; in case two, the input function and the created function are set two life cycle functions; thirdly, setting a created function and an atteched function as two life cycle functions; in case four, the atteded function and the stepped function are set as two life cycle functions; in case five, the stepped function and the deployed function are set two lifecycle functions.
Optionally, whether an offload function in the page component is called or not may be monitored by a monitor, and if the offload function is monitored, the call time between the two lifecycle functions is determined and set according to the monitored call time of each lifecycle function. During specific implementation, the calling time of the two set life cycle functions can be counted by using a statistical function in the program interface through calling an application program interface provided by a browser, so that the calling time interval between the two set life cycle functions can be obtained. Therefore, the calling time interval between the two dough periodic functions can be automatically determined and set.
Wherein the application program interface may be a performance api. The statistical function within the application interface may be: performance.
For example, setting the two lifecycle functions as an atteched function and a populated function, respectively, then using a statistical function in the program interface, and according to the respective call times of the atteched function and the populated function, determining the call time interval of the page component hanging in the page.
For another example, if the two lifecycle functions are respectively configured as a complied function and an input function, the call time interval from the compiling of the page component view template to the creation of the page component element can be determined according to the respective call times of the complied function and the input function by using the statistical function in the application program interface.
S302, the calling time interval between the two set life cycle functions is used as the operation monitoring data.
Optionally, after determining that the call time interval between the two lifecycle functions is set in the page component, the call time interval between the two lifecycle functions may be set in this embodiment as the operation monitoring data of the page component.
And S204, sending the operation monitoring data to a server side.
Optionally, in order to count the operation performance of the page component, in this embodiment, after the operation monitoring data is generated according to the monitored call time of each lifecycle function, the operation monitoring data of the page component may be sent to the server side, so that the server side determines the operation performance of the page component based on the operation monitoring data of the page component.
According to the technical scheme of the embodiment of the application, a plurality of life cycle functions of the page component are called and monitored, when calling is monitored, the calling time is determined for the called life cycle functions, when calling of the unloading function is monitored, operation monitoring data are generated according to the monitored calling time of each life cycle function, and the operation monitoring data are sent to the server side. Therefore, the server side analyzes the operation performance of the page component based on the operation monitoring data, and can restore the scene and the user operation behavior when the abnormality occurs in the operation process of the page component when the abnormality occurs, so that conditions are provided for positioning problems and solving problems, and the abnormality processing efficiency is improved.
Fig. 5 is a schematic structural diagram of an operation monitoring device of a page assembly according to an embodiment of the present application. Referring to fig. 5, an embodiment of the present application discloses an apparatus 500 for monitoring operation of a page assembly, where the apparatus 500 may be configured in an electronic device, and the apparatus 500 includes: a first monitoring module 510, a determination module 520, and a second monitoring module 530;
the first monitoring module 510 is configured to perform call monitoring on a plurality of lifecycle functions of a page component.
The determining module 520 is configured to determine a calling time for the called lifecycle function whenever a call is monitored.
A second monitoring module 530, configured to monitor operation of the page component according to the call time of the plurality of lifecycle functions of the page component.
Optionally, the plurality of lifecycle functions includes an uninstall function for uninstalling the page component; the first monitoring module 510 includes:
the monitoring data generating unit is used for generating operation monitoring data according to the monitored calling time of each life cycle function when the call of the unloading function is monitored;
and the monitoring data sending module is used for sending the operation monitoring data to the server side.
Optionally, the monitoring data generating unit is specifically configured to:
determining and setting a calling time interval between the two life cycle functions according to the monitored calling time of each life cycle function;
and taking the calling time interval between the two set life cycle functions as the operation monitoring data.
Optionally, the monitoring data generating unit is further configured to:
and calling an application program interface provided by a browser, and counting the calling time of the set two life cycle functions by adopting a counting function in the application program interface to obtain the calling time interval between the set two life cycle functions.
Optionally, the two set lifecycle functions are in multiple groups, where one set of the two set lifecycle functions is used to load the page component into a page, and compile a view template of the page component.
Optionally, the determining module 520 is specifically configured to:
and calling an application program interface provided by a browser, and marking the calling time of the life cycle function by adopting a marking function in the application program interface.
It should be noted that the foregoing explanation of the embodiment of the operation monitoring method for a page component is also applicable to the operation monitoring device for a page component in this embodiment, and the implementation principle is similar, and is not described herein again.
According to the technical scheme, the plurality of life cycle functions of the page assembly are called and monitored, when the calling is monitored, the calling time is determined for the called life cycle functions, and then the operation of the page assembly is monitored according to the calling time of the plurality of life cycle functions of the page assembly. Therefore, whether the page component is abnormal in the operation process is determined based on the operation condition of the page component, so that when the page component is abnormal in the operation process, scenes and user operation behaviors in the abnormal state can be restored, conditions are provided for positioning problems and solving problems, and the abnormity processing efficiency is improved.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 6 is a block diagram of an electronic device of a method for monitoring operation of a page component according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor, so that the at least one processor executes the operation monitoring method of the page component provided by the application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the operation monitoring method of a page component provided by the present application.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first monitoring module 510, the determining module 520, and the second monitoring module 530) corresponding to the operation monitoring method of the page component in the embodiments of the present application. The processor 601 executes various functional applications and data processing of the server by executing the non-transitory software programs, instructions and modules stored in the memory 602, that is, the operation monitoring method of the page component in the above method embodiment is implemented.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device of the operation monitoring method of the page component, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory remotely located from the processor 601, and these remote memories may be connected over a network to an electronic device for audio-video synchronized playback. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the operation monitoring method of the page component may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device on which the web page is live audibly, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme, the plurality of life cycle functions of the page assembly are called and monitored, when the calling is monitored, the calling time is determined for the called life cycle functions, and then the operation of the page assembly is monitored according to the calling time of the plurality of life cycle functions of the page assembly. Therefore, whether the page component is abnormal in the operation process is determined based on the operation condition of the page component, so that when the page component is abnormal in the operation process, scenes and user operation behaviors in the abnormal state can be restored, conditions are provided for positioning problems and solving problems, and the abnormity processing efficiency is improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (14)
1. A method for monitoring the operation of a page component comprises the following steps:
calling and monitoring a plurality of life cycle functions of the page component;
when the call is monitored, determining the call time for the called life cycle function;
and monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component.
2. The operation monitoring method according to claim 1, wherein the plurality of lifecycle functions includes an unload function for unloading the page component; the monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component comprises:
when the call of the unloading function is monitored, generating operation monitoring data according to the monitored call time of each life cycle function;
and sending the operation monitoring data to a server side.
3. The operation monitoring method according to claim 2, wherein the generating operation monitoring data according to the monitored calling time of each lifecycle function includes:
determining and setting a calling time interval between the two life cycle functions according to the monitored calling time of each life cycle function;
and taking the calling time interval between the two set life cycle functions as the operation monitoring data.
4. The operation monitoring method according to claim 3, wherein the determining to set the calling time interval between the two lifecycle functions according to the monitored calling time of each lifecycle function comprises:
and calling an application program interface provided by a browser, and counting the calling time of the set two life cycle functions by adopting a counting function in the application program interface to obtain the calling time interval between the set two life cycle functions.
5. The operation monitoring method according to claim 3, wherein the set two lifecycle functions are in a plurality of groups, and one group of the set two lifecycle functions is respectively used for loading the page component into a page and compiling a view template of the page component.
6. The operation monitoring method according to any one of claims 1 to 5, wherein the determining a calling time for the called lifecycle function comprises:
and calling an application program interface provided by a browser, and marking the calling time of the life cycle function by adopting a marking function in the application program interface.
7. An operation monitoring device of a page assembly, comprising:
the first monitoring module is used for calling and monitoring a plurality of life cycle functions of the page component;
the determining module is used for determining calling time for the called life cycle function when the calling is monitored;
and the second monitoring module is used for monitoring the operation of the page component according to the calling time of the plurality of life cycle functions of the page component.
8. The operation monitoring device according to claim 7, wherein the plurality of lifecycle functions includes an unload function for unloading the page component; the first monitoring module comprises:
the monitoring data generating unit is used for generating operation monitoring data according to the monitored calling time of each life cycle function when the call of the unloading function is monitored;
and the monitoring data sending module is used for sending the operation monitoring data to the server side.
9. The operation monitoring device according to claim 8, wherein the monitoring data generation unit is specifically configured to:
determining and setting a calling time interval between the two life cycle functions according to the monitored calling time of each life cycle function;
and taking the calling time interval between the two set life cycle functions as the operation monitoring data.
10. The operation monitoring device according to claim 9, wherein the monitoring data generation unit is further configured to:
and calling an application program interface provided by a browser, and counting the calling time of the set two life cycle functions by adopting a counting function in the application program interface to obtain the calling time interval between the set two life cycle functions.
11. The operation monitoring device according to claim 9, wherein the set two lifecycle functions are in a plurality of groups, and one group of the set two lifecycle functions is respectively used for loading the page component into a page and compiling a view template of the page component.
12. The operation monitoring device according to any one of claims 7 to 11, wherein the determining module is specifically configured to:
and calling an application program interface provided by a browser, and marking the calling time of the life cycle function by adopting a marking function in the application program interface.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of monitoring operation of a page assembly as claimed in any one of claims 1 to 6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the operation monitoring method of the page assembly of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010605991.1A CN111966421B (en) | 2020-06-29 | 2020-06-29 | Page component operation monitoring method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010605991.1A CN111966421B (en) | 2020-06-29 | 2020-06-29 | Page component operation monitoring method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111966421A true CN111966421A (en) | 2020-11-20 |
CN111966421B CN111966421B (en) | 2024-01-09 |
Family
ID=73360991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010605991.1A Active CN111966421B (en) | 2020-06-29 | 2020-06-29 | Page component operation monitoring method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966421B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112860455A (en) * | 2021-02-08 | 2021-05-28 | 北京百度网讯科技有限公司 | Life cycle event processing method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101629184B1 (en) * | 2014-12-10 | 2016-06-13 | 현대오트론 주식회사 | Method for calling periodic function to enhance process speed of EEPROM in AUTOSAR |
US20180139180A1 (en) * | 2016-07-06 | 2018-05-17 | Hiro Media Ltd. | Real-time monitoring of web page code |
CN109558304A (en) * | 2017-09-27 | 2019-04-02 | 北京邮电大学 | A kind of component liaison analysis method, device and electronic equipment |
CN109918101A (en) * | 2019-01-28 | 2019-06-21 | 努比亚技术有限公司 | Terminal and its application component management method, computer readable storage medium |
CN110496395A (en) * | 2019-08-22 | 2019-11-26 | 阿里巴巴集团控股有限公司 | It is a kind of for the assembly operating method of illusory engine, system and equipment |
CN111078225A (en) * | 2019-11-21 | 2020-04-28 | 贝壳技术有限公司 | Hot reloading method and device, electronic equipment and storage medium |
CN111125698A (en) * | 2019-11-28 | 2020-05-08 | 中金金融认证中心有限公司 | System and method for preventing interface hijacking in Android application |
-
2020
- 2020-06-29 CN CN202010605991.1A patent/CN111966421B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101629184B1 (en) * | 2014-12-10 | 2016-06-13 | 현대오트론 주식회사 | Method for calling periodic function to enhance process speed of EEPROM in AUTOSAR |
US20180139180A1 (en) * | 2016-07-06 | 2018-05-17 | Hiro Media Ltd. | Real-time monitoring of web page code |
CN109558304A (en) * | 2017-09-27 | 2019-04-02 | 北京邮电大学 | A kind of component liaison analysis method, device and electronic equipment |
CN109918101A (en) * | 2019-01-28 | 2019-06-21 | 努比亚技术有限公司 | Terminal and its application component management method, computer readable storage medium |
CN110496395A (en) * | 2019-08-22 | 2019-11-26 | 阿里巴巴集团控股有限公司 | It is a kind of for the assembly operating method of illusory engine, system and equipment |
CN111078225A (en) * | 2019-11-21 | 2020-04-28 | 贝壳技术有限公司 | Hot reloading method and device, electronic equipment and storage medium |
CN111125698A (en) * | 2019-11-28 | 2020-05-08 | 中金金融认证中心有限公司 | System and method for preventing interface hijacking in Android application |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112860455A (en) * | 2021-02-08 | 2021-05-28 | 北京百度网讯科技有限公司 | Life cycle event processing method and device and electronic equipment |
CN112860455B (en) * | 2021-02-08 | 2023-07-21 | 北京百度网讯科技有限公司 | Life cycle event processing method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111966421B (en) | 2024-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110780890B (en) | System upgrading method, device, electronic equipment and medium | |
CN111258609A (en) | Upgrading method and device of Kubernetes cluster, electronic equipment and medium | |
CN111984476B (en) | Test method and device | |
US10055436B2 (en) | Alert management | |
CN112073994A (en) | Method and device for over-the-air upgrading, electronic equipment and readable storage medium | |
US20130086571A1 (en) | Dynamically Updating Firmware In A Computing System | |
CN112527748A (en) | Method, device, equipment and storage medium for analyzing user operation behaviors | |
CN110752968B (en) | Performance benchmark test method and device, electronic equipment and storage medium | |
CN112328328A (en) | Method, device, equipment and storage medium for overloading equipment drive | |
CN114721686A (en) | Configuration data updating method and device, electronic equipment and storage medium | |
CN111597027A (en) | Application program starting method, device, equipment and storage medium | |
CN111339187A (en) | Data processing method, device, equipment and storage medium based on intelligent contract | |
CN111966421B (en) | Page component operation monitoring method, device, equipment and storage medium | |
CN113254043A (en) | Web front-end project processing method and device, electronic equipment and storage medium | |
CN110750419B (en) | Offline task processing method and device, electronic equipment and storage medium | |
CN110737560B (en) | Service state detection method and device, electronic equipment and medium | |
CN111796851A (en) | Client base library updating method and device, electronic equipment and storage medium | |
CN111782357A (en) | Label control method and device, electronic equipment and readable storage medium | |
JP7147123B2 (en) | Source channel determination method, device, equipment, program and computer storage medium | |
CN114661274A (en) | Method and device for generating intelligent contract | |
CN111767170A (en) | Operation restoration method and device for equipment, equipment and storage medium | |
CN113051122B (en) | Performance data acquisition method, device, electronic equipment and medium | |
CN112148596A (en) | Method and device for generating error reporting content of deep learning framework | |
CN112346512A (en) | Time synchronization method and device | |
CN113821232A (en) | Model updating 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |