Data monitoring method, device, electronic device and storage medium
By starting the browser in debug mode and establishing a long connection to monitor application operations, the problem of being unable to obtain a complete exception link in the existing technology is solved, and the accurate and rapid positioning of application exceptions is achieved.
Patent Information
- Application Number
- CN202210078626.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-01-24
AI Technical Summary
In the existing technology, application anomaly detection cannot obtain complete anomaly link information, resulting in the inability to accurately locate the anomaly and can only obtain data before and after the anomaly.
By starting the target browser in debug mode and carrying the target interface parameters, determining the target access address, establishing a long connection between the server and the browser, monitoring the trigger operations on the application, and determining abnormal information based on the monitoring data.
It achieves precise positioning of application exceptions, records the complete exception chain from program connection to disconnection, supports real-time viewing of user exception information and page images, and quickly and easily locates Web program exceptions.
Smart Images

Figure CN114416488B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data monitoring technology, and in particular to a data monitoring method, device, electronic device, and storage medium. Background Art
[0002] Prior art approaches to locating application exceptions primarily involve pre-programming global exception information monitoring within the software code. These methods, combined with methods like try catch, window.onerror, and window.addEventListener("error"), are then hijacked or rewritten to capture exposed exceptions. Only after an exception is captured is the error log uploaded to the server, where system maintenance personnel can then use the log to locate the exception's location and cause.
[0003] However, in real-world applications, users may report an exception, but the application may not throw one. Therefore, it's impossible to pinpoint the specific exception. Furthermore, it's impossible to obtain the complete chain of events leading up to the exception; only data before and after the exception can be obtained. Consequently, even exceptions reported by the application cannot accurately pinpoint the specific exception. Summary of the Invention
[0004] The present invention provides a data monitoring method, device, electronic device and storage medium, which can record complete abnormal link information from the start of application connection to active disconnection, and then accurately locate the abnormality of the application based on the abnormal link information.
[0005] In a first aspect, an embodiment of the present invention provides a data monitoring method, comprising:
[0006] Starting a target browser corresponding to a target application in a debugging mode and carrying target interface parameters corresponding to the target browser;
[0007] When a target application is detected to be triggered, a target access address is determined based on the target interface parameters, and the target access address is sent to a server corresponding to the target application;
[0008] When the server receives the data monitoring instruction, a persistent connection is established between the server and the target browser based on the target access address;
[0009] Based on the preset monitoring event information and the long connection, the trigger operation on the target application is monitored to determine abnormal information based on the monitoring data generated by the trigger operation.
[0010] In a second aspect, an embodiment of the present invention further provides a data monitoring device, comprising:
[0011] A debug mode startup module, configured to start a target browser corresponding to a target application in debug mode and carry target interface parameters corresponding to the target browser;
[0012] a target access address determining module, configured to determine a target access address based on the target interface parameters when a target application is detected to be triggered, and send the target access address to a server corresponding to the target application;
[0013] A persistent connection establishing module, configured to establish a persistent connection between the server and the target browser based on the target access address when the server receives a data monitoring instruction;
[0014] The abnormal information determination module is used to monitor the trigger operation on the target application based on the preset monitoring event information and the long connection, so as to determine the abnormal information based on the monitoring data generated by the trigger operation.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the data monitoring method as described in any one of the embodiments of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the data monitoring method as described in any one of the embodiments of the present invention.
[0020] The technical solution of this embodiment is to start the target browser corresponding to the target program in debug mode, and carry the target interface parameters corresponding to the target browser. When it is detected that the user triggers the target application, the target application can access the target browser through the target interface parameters and determine the target access address of the target browser, and send it to the server. When the server receives the data monitoring instruction sent by the application, the server can establish a long connection with the target browser based on the target access address. Furthermore, the server can monitor the trigger operation on the target application based on the pre-set monitoring event and long connection, and determine the abnormal information based on the monitoring data generated by the trigger operation. It solves the problem that in the existing application abnormality detection, only the data before and after the abnormality can be obtained, and the complete abnormal link information cannot be obtained, and the accurate positioning of the abnormality cannot be achieved. The technical solution of this embodiment can view the abnormal information and program print information seen by the user in real time, and can record the complete abnormal link from the start of the program connection to the active disconnection. When necessary, the page image can also be obtained, realizing fast, convenient, and user-free active Web program abnormality accurate positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings introduced here only illustrate some of the embodiments to be described by the present invention, and are not exhaustive. A person skilled in the art can derive other drawings based on these drawings without inventive effort.
[0022] Figure 1 A flowchart of a data monitoring method provided in Example 1 of the present invention;
[0023] Figure 2 A schematic diagram of a transmission link of a data monitoring method provided in the second embodiment of the present invention;
[0024] Figure 3 A schematic structural diagram of an apparatus for a data monitoring method provided in a third embodiment of the present invention;
[0025] Figure 4 This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0027] Example 1
[0028] Figure 1 This is a flow chart of a data monitoring method provided in Example 1 of the present invention. This embodiment can be applied to monitor the full-link data corresponding to the operation in the application, and then obtain abnormal situations. The method can be executed by a data detection device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal or a PC.
[0029] like Figure 1 As shown, the method includes:
[0030] S110: Start a target browser corresponding to a target application in a debugging mode, and carry target interface parameters corresponding to the target browser.
[0031] Debug mode is a browser mode primarily used by web developers to debug web applications. The target application is the application the user currently needs to use, which can be a web application, and the application for which anomalies need to be located. The target browser is the browser used to run the target application. The target interface parameters are the parameters that the browser must carry when enabling debug mode.
[0032] Specifically, the developer starts and opens the debugging mode of the browser running the target application, and carries the target interface parameters corresponding to the target browser when starting, so that the target application can access the target browser based on the interface parameters.
[0033] For example, the debug mode of the target browser can be started by using a shortcut key or by writing a command in the command line. The shortcut key can be ctrl+shift+j(i) or F12, both of which can enter the debug mode of the browser.
[0034] S120: When triggering of a target application is detected, a target access address is determined based on the target interface parameters, and the target access address is sent to a server corresponding to the target application.
[0035] It should be noted that different applications will correspond to different addresses when running on the browser. Therefore, it is necessary to obtain the target access address corresponding to the target application in the browser.
[0036] The target access address is an address corresponding to the target application and stored in the target browser, and the address is used to establish a connection between the server and the target browser.
[0037] Specifically, when a user opens a target application running on a target browser, upon detecting that the target application has started, the target application can access the target browser through the target interface parameters, thereby obtaining the address corresponding to the target application stored in the target browser, and sending the address to the server, so that the server can establish a connection with the target browser based on the address.
[0038] For example, the target access address can be stored and accessed using a Uniform Resource Locator (URL). A Uniform Resource Locator (URL) is a concise representation of the location and access method of a resource available on the Internet. It is the address of a standard resource on the Internet. Every file on the Internet has a unique URL that contains information indicating the file's location and how the browser should process it.
[0039] Optionally, determining the target access address based on the target interface parameters and sending the target access address to the server corresponding to the target application includes: actively accessing the target interface parameters based on the target application to access the target browser; obtaining the target access address corresponding to the target application stored in the target browser; and sending the target access address to the server based on the target application.
[0040] Specifically, when the target application is launched, it can actively access the target interface parameters and use them to access the target browser, thereby determining the target access address stored in the target browser. The target access address corresponds to the application, and different applications running on the browser will have different corresponding addresses. After accessing the target browser, the target application sends the obtained target access address corresponding to the target application to the server.
[0041] For example, when the Web program starts, the Web program can actively access the target interface parameter --remote-debugging-port=[port] in the Chromium browser, access the Chromium browser through [port], obtain the browserWSEndpoint of the browser, and send the browserWSEndpoint to the server.
[0042] S130: When the server receives the data monitoring instruction, a long connection is established between the server and the target browser based on the target access address.
[0043] The data monitoring instruction is a command issued by the target application and sent to the server, which can be used to instruct the server to start monitoring the application.
[0044] Specifically, when the server receives a data monitoring instruction from the application, a long connection can be established between the server and the target browser through the target access address obtained in the previous step of this embodiment. A long connection means that multiple data packets can be sent continuously on a connection. During the connection maintenance period, if no data packet is sent, both parties need to send a link detection packet. Compared to a short connection channel, a long connection channel can be a channel that lasts for a set time after the connection is established. New requests initiated within the set time do not need to establish a connection channel again. Data is transmitted directly through the established long connection channel, saving data transmission time.
[0045] Optionally, when the server receives a data monitoring instruction, a long connection is established between the server and the browser based on the target access address, including: when the data anomaly monitoring control in the target application is triggered, the data monitoring instruction is generated and sent to the server; when the server receives the data monitoring instruction, the target tool is called to establish a long connection between the server and the target browser corresponding to the target access address.
[0046] The anomaly detection control is a control set in the target program for monitoring anomalies. The data anomaly monitoring control can be set with an exception event. When an abnormal situation occurs in the application and when the abnormal situation matches the abnormal event in the data anomaly monitoring control, the data anomaly monitoring control will be triggered. Alternatively, the user can trigger the data anomaly monitoring control by clicking a virtual button or filling out an exception feedback information form in the application. At this time, the application will generate a data monitoring instruction. The data monitoring instruction is used to instruct the server to establish a long connection with the target browser.
[0047] Specifically, if an exception occurs while a user is using an application, the user will be unable to use the application normally. The user can trigger the data anomaly monitoring control within the application by clicking a virtual button or filling out an exception feedback form. The application then generates a data monitoring instruction. The application then sends the generated data monitoring instruction to the server. Upon receiving the data monitoring instruction, the server can call the target tool and use it to establish a persistent connection channel with the target browser corresponding to the target access address.
[0048] For example, when a user is using a web program, an exception may occur. Common causes of the exception may include java.lang.NullPointerException, java.lang.ClassNotFoundException, java.lang.ArrayIndexOutOfBoundsExceptio, etc., which will not be described in detail in this embodiment. After an exception occurs, the user can click the exception reporting option in the program page. At this time, the exception monitoring control can generate an exception monitoring instruction based on the user's click operation. The application sends the exception monitoring instruction to the server, and the server calls the Puppeteer tool according to the instruction. Among them, Puppeteer provides a high-level API for controlling the Node library of inter-Chromium communication. Based on the target access address, the server connects to the target browser through the API provided by Puppeteer.
[0049] S140: Based on the preset monitoring event information and the long connection, monitor the trigger operation on the target application to determine abnormal information based on the monitoring data generated by the trigger operation.
[0050] The monitoring event information is event information used to monitor all operations performed by users on the application.
[0051] Specifically, based on the pre-set monitoring information, the server can monitor all keyboard input and mouse click operations of the user on the target application through the long connection channel, obtain the monitoring data generated by these operations and upload it to the server in real time, and then analyze the monitoring data to determine the abnormal information and accurately locate the abnormality.
[0052] Optionally, based on the preset listening event information and the long connection, the triggering operation on the target application is listened to to determine the abnormal information based on the monitoring data generated by the triggering operation, including: based on the long connection, by triggering the target application, jumping to the browser display page corresponding to the target application; based on the preset listening event, the triggering operation on the browser display page is listened to, and a full-link report corresponding to the triggering operation is generated; based on the full-link report, the abnormal operation in the triggering operation is determined, and the abnormal information corresponding to the abnormal operation is determined.
[0053] The browser display page corresponds to the target browser.
[0054] Specifically, based on the long connection, by triggering the target application, you can jump to the browser display page corresponding to the target program. The browser may have multiple display pages. In order to avoid incorrectly obtaining exception information, after triggering the target application, jump to the browser display page corresponding to the application that needs to be monitored, rather than other pages of the browser. Based on the pre-set monitoring events, you can monitor the user's triggering operations on the browser display page, which can be the user clicking a tab on the display page, or the user entering certain information on the display page. The server can generate a corresponding full-link report based on the triggering operation on the browser display page. The link report can include specific operation processes or page display information. Based on the generated full-link report, you can determine which operations in the triggering operation are abnormal operations, as well as the exception information corresponding to the abnormal operations. You can record the complete abnormal link from the start of the program connection to the active disconnection, and achieve fast, convenient, and user-free active Web program abnormality positioning.
[0055] For example, a user might click the settlement tab on the browser page corresponding to the settlement application, which then displays a "settlement unsuccessful" prompt and a corresponding exception message. The abnormal operation, abnormal prompt information, and abnormal message included in the full-link report can be analyzed to accurately locate the application anomaly.
[0056] Optionally, monitoring a trigger operation on the target application to determine abnormal information based on monitoring data generated by the trigger operation includes:
[0057] Based on a preset screenshot code, a screenshot diagram of an operation on the target application is obtained, so as to determine abnormal information generated by the triggering operation based on the screenshot diagram.
[0058] The pre-set screenshot code is a code set by the developer on the server side, through which the server side can perform a screenshot operation.
[0059] Specifically, developers pre-set screenshot code on the server. When monitoring a target application, the server can execute a screenshot operation based on the pre-set screenshot code, thereby intercepting the user's operation on the application and obtaining a screenshot diagram of the operation on the target application. The server can analyze the screenshot diagram to obtain full-link information when an anomaly occurs in the target application.
[0060] For example, when the server receives an exception detection instruction, it sends a prompt message to the application according to the preset screenshot code that a screenshot or screen recording is about to be taken. If the user selects OK in the application, the server can record and take screenshots of the operations on the target application, and analyze the recording or screenshot to obtain full-link information when an exception occurs in the target application.
[0061] The technical solution of this embodiment is to start the target browser corresponding to the target program in debug mode, and carry the target interface parameters corresponding to the target browser. When it is detected that the user triggers the target application, the target application can access the target browser through the target interface parameters and determine the target access address of the target browser, and send it to the server. When the server receives the data monitoring instruction sent by the application, the server can establish a long connection with the target browser based on the target access address. Furthermore, the server can monitor the trigger operation on the target application based on the pre-set monitoring event and long connection, and determine the abnormal information based on the monitoring data generated by the trigger operation. It solves the problem that the existing application abnormality detection cannot accurately locate the abnormality and can only obtain the data before and after the abnormality, and cannot obtain the complete abnormal link information. The technical solution of this embodiment can view the abnormal information and program print information seen by the user in real time, and can record the complete abnormal link from the start of the program connection to the active disconnection. When necessary, the page image can also be obtained, realizing fast, convenient, and user-free active Web program abnormality accurate positioning.
[0062] Example 2
[0063] As an alternative embodiment of the above embodiment, Figure 2 This is a schematic diagram of the data monitoring method transmission link provided by an embodiment of the present invention. The specific scheme is as follows:
[0064] See also Figure 2 First, launch a Chromium-based browser in debug mode. This browser is then launched with the target interface parameter --remote-debugging-port=[port] corresponding to the target browser. When the web application starts, it actively accesses [port] to obtain the browser's target access address, browserWSEndpoint, and uploads the target access address to the server.
[0065] When the user reports an abnormality or needs to check the user's operation status, the server connects to the browser through the API provided by the target tool puppeteer. The specific connection operation code is as follows:
[0066] const puppeteer=require('puppeteer');
[0067] / / Connect to an existing browser
[0068] const browser=await puppeteer.connect({
[0069] browserWSEndpoint:browserWSEndpoint, / / Web program upload and obtain
[0070] ignoreHTTPSErrors:true,
[0071] });
[0072] Finally, the server monitors the information and exception information printed by the web application, and can also perform operations such as page screenshots. The web application monitored by the server is the target application mentioned above, and the printed information is a screenshot diagram of the operation on the target application. The specific monitoring operation code is as follows:
[0073] const[page]=await browser.pages();
[0074] page.on('console',async e=>{
[0075] const args=await Promise.all(e.args().map(a=>a.jsonValue()));
[0076] console.log('args',...args);
[0077] }).on('pageerror',({message})=>console.log(message));
[0078] The technical solution of this embodiment is to start the target browser corresponding to the target program in debug mode, and carry the target interface parameters corresponding to the target browser. When it is detected that the user triggers the target application, the target application can access the target browser through the target interface parameters and determine the target access address of the target browser, and send it to the server. When the server receives the data monitoring instruction sent by the application, the server can establish a long connection with the target browser based on the target access address. Furthermore, the server can monitor the trigger operation on the target application based on the pre-set monitoring event and long connection, and determine the abnormal information based on the monitoring data generated by the trigger operation. It solves the problem that the existing application abnormality detection cannot accurately locate the abnormality and can only obtain the data before and after the abnormality, and cannot obtain the complete abnormal link information. The technical solution of this embodiment can view the abnormal information and program print information seen by the user in real time, and can record the complete abnormal link from the start of the program connection to the active disconnection. When necessary, the page image can also be obtained, realizing fast, convenient, and user-free active Web program abnormality accurate positioning.
[0079] Example 3
[0080] Figure 3 A data monitoring device provided in the third embodiment of the present invention includes:
[0081] The debug mode starting module 310 is used to start the target browser corresponding to the target application in debug mode and carry target interface parameters corresponding to the target browser;
[0082] a target access address determining module 320 for determining a target access address based on the target interface parameters when a target application is detected to be triggered, and sending the target access address to a server corresponding to the target application;
[0083] A persistent connection establishing module 330 is configured to establish a persistent connection between the server and the target browser based on the target access address when the server receives a data monitoring instruction;
[0084] The abnormal information determination module 340 is used to monitor the trigger operation on the target application based on the preset monitoring event information and the long connection, so as to determine the abnormal information based on the monitoring data generated by the trigger operation.
[0085] The technical solution of this embodiment is to start the target browser corresponding to the target program in debug mode, and carry the target interface parameters corresponding to the target browser. When it is detected that the user triggers the target application, the target application can access the target browser through the target interface parameters and determine the target access address of the target browser, and send it to the server. When the server receives the data monitoring instruction sent by the application, the server can establish a long connection with the target browser based on the target access address. Furthermore, the server can monitor the trigger operation on the target application based on the pre-set monitoring event and long connection, and determine the abnormal information based on the monitoring data generated by the trigger operation. It solves the problem that the existing application abnormality detection cannot accurately locate the abnormality and can only obtain the data before and after the abnormality, and cannot obtain the complete abnormal link information. The solution of this embodiment can view the abnormal information and program print information seen by the user in real time, and can record the complete abnormal link from the start of the program connection to the active disconnection. When necessary, the page image can also be obtained, realizing fast, convenient, and user-free active Web program abnormality accurate positioning.
[0086] Based on any optional technical solution in the embodiment of the present invention, optionally, the target access address determination module 320 includes:
[0087] a target browser access unit, wherein the user actively accesses the target interface parameters based on the target application to access the target browser;
[0088] A target access address acquisition unit, configured to acquire a target access address corresponding to the target application stored in the target browser;
[0089] A target access address sending unit sends the target access address to the server based on the target application.
[0090] Based on any optional technical solution in the embodiment of the present invention, optionally, the long connection establishing module 330 includes:
[0091] a data monitoring instruction sending unit, which generates the data monitoring instruction when the data anomaly monitoring control in the target application is triggered, and sends the data monitoring instruction to the server;
[0092] The persistent connection establishing unit, when the server receives the data monitoring instruction, calls a target tool to establish a persistent connection between the server and a target browser corresponding to the target access address.
[0093] Based on any optional technical solution in the embodiment of the present invention, optionally, the abnormal information determination module 340 includes:
[0094] a display page jump unit, which, based on the persistent connection, triggers the target application to jump to a browser display page corresponding to the target application; wherein the browser display page corresponds to the target browser;
[0095] A full-link report generating unit, which monitors a trigger operation on the browser display page based on a preset monitoring event and generates a full-link report corresponding to the trigger operation;
[0096] An abnormal information determination unit determines an abnormal operation in the triggering operation based on the full-link report, and determines abnormal information corresponding to the abnormal operation.
[0097] Based on any optional technical solution in the embodiment of the present invention, optionally, the abnormal information determination module 340 further includes:
[0098] The screenshot unit obtains a screenshot diagram of the operation on the target application based on a preset screenshot code, so as to determine the abnormal information generated by the triggering operation based on the screenshot diagram.
[0099] The data monitoring device provided in the embodiment of the present invention can execute the data monitoring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0100] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the embodiments of the present invention.
[0101] Example 4
[0102] Figure 4 This is a structural diagram of an electronic device provided in Example 4 of the present invention. Figure 4 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 4 The electronic device 40 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present invention.
[0103] like Figure 4 As shown, electronic device 40 is a general-purpose computing device. Components of electronic device 40 may include, but are not limited to, one or more processors or processing units 401, system memory 402, and a bus 403 connecting various system components (including system memory 402 and processing unit 401).
[0104] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0105] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0106] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 Not shown, often called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0107] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0108] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 40, and / or any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0109] The processing unit 401 executes various functional applications and data processing by running programs stored in the system memory 402, such as implementing the data monitoring method provided by the embodiment of the present invention.
[0110] Example 5
[0111] A fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a data monitoring method, the method comprising:
[0112] Starting a target browser corresponding to a target application in a debugging mode and carrying target interface parameters corresponding to the target browser;
[0113] When a target application is detected to be triggered, a target access address is determined based on the target interface parameters, and the target access address is sent to a server corresponding to the target application;
[0114] When the server receives the data monitoring instruction, a persistent connection is established between the server and the target browser based on the target access address;
[0115] Based on the preset monitoring event information and the long connection, the trigger operation on the target application is monitored to determine abnormal information based on the monitoring data generated by the trigger operation.
[0116] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0117] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0118] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0119] The computer program code for performing the operations of the embodiments of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0120] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A data monitoring method, characterized in that: include: Starting a target browser corresponding to a target application in a debugging mode and carrying target interface parameters corresponding to the target browser; When a target application is detected to be triggered, a target access address is determined based on the target interface parameters, and the target access address is sent to a server corresponding to the target application; When a data anomaly monitoring control in a target application is triggered, a data monitoring instruction is generated and sent to the server; The anomaly monitoring control is a control set in the target program for monitoring anomalies. The data anomaly monitoring control is provided with an abnormal event. When an abnormal situation occurs in the application and when the abnormal situation matches the abnormal event in the data anomaly monitoring control, the data anomaly monitoring control will be triggered; or the user triggers the data anomaly monitoring control by clicking a virtual button or filling out an abnormal feedback information form in the application; When the server receives the data monitoring instruction, a persistent connection is established between the server and the target browser based on the target access address; Based on the preset monitoring event information and the long connection, the trigger operation on the target application is monitored to determine abnormal information based on the monitoring data generated by the trigger operation.
2. The method according to claim 1, characterized in that The determining of a target access address based on the target interface parameter and sending the target access address to a server corresponding to the target application comprises: Actively accessing the target interface parameters based on the target application to access the target browser; Obtaining a target access address corresponding to the target application stored in the target browser; The target access address is sent to the server based on the target application.
3. The method according to claim 1, characterized in that Establishing a persistent connection between the server and the browser based on the target access address includes: The target tool is called to establish a long connection between the server and the target browser corresponding to the target access address.
4. The method according to claim 1, wherein The monitoring of the trigger operation on the target application based on the preset monitoring event information and the long connection, and determining abnormal information based on monitoring data generated by the trigger operation, includes: Based on the persistent connection, by triggering the target application, jumping to a browser display page corresponding to the target application; wherein the browser display page corresponds to the target browser; Monitoring a trigger operation on the browser display page based on a preset monitoring event, and generating a full-link report corresponding to the trigger operation; Based on the full-link report, an abnormal operation in the triggering operation is determined, and abnormal information corresponding to the abnormal operation is determined.
5. The method according to claim 1, wherein The monitoring of the trigger operation on the target application to determine abnormal information based on monitoring data generated by the trigger operation includes: Based on a preset screenshot code, a screenshot diagram of an operation on the target application is obtained, so as to determine abnormal information generated by the triggering operation based on the screenshot diagram.
6. A data monitoring device, characterized in that: include: A debug mode startup module, configured to start a target browser corresponding to a target application in debug mode and carry target interface parameters corresponding to the target browser; a target access address determining module, configured to determine a target access address based on the target interface parameters when a target application is detected to be triggered, and send the target access address to a server corresponding to the target application; When a data anomaly monitoring control in a target application is triggered, a data monitoring instruction is generated and sent to the server; The anomaly monitoring control is a control set in the target program for monitoring anomalies. The data anomaly monitoring control is provided with an abnormal event. When an abnormal situation occurs in the application and when the abnormal situation matches the abnormal event in the data anomaly monitoring control, the data anomaly monitoring control will be triggered; or the user triggers the data anomaly monitoring control by clicking a virtual button or filling out an abnormal feedback information form in the application; A persistent connection establishing module, configured to establish a persistent connection between the server and the target browser based on the target access address when the server receives a data monitoring instruction; The abnormal information determination module is used to monitor the trigger operation on the target application based on the preset monitoring event information and the long connection, so as to determine the abnormal information based on the monitoring data generated by the trigger operation.
7. The device according to claim 6, characterized in that The target access address determination module includes: a target browser access unit, wherein the user actively accesses the target interface parameters based on the target application to access the target browser; A target access address acquisition unit, configured to acquire a target access address corresponding to the target application stored in the target browser; A target access address sending unit sends the target access address to the server based on the target application.
8. The device according to claim 6, characterized in that The long connection establishment module includes: a data monitoring instruction sending unit, which generates the data monitoring instruction when the data anomaly monitoring control in the target application is triggered, and sends the data monitoring instruction to the server; The persistent connection establishing unit, when the server receives the data monitoring instruction, calls a target tool to establish a persistent connection between the server and a target browser corresponding to the target access address.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data monitoring method according to any one of claims 1 to 5.
10. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the data monitoring method according to any one of claims 1 to 5.