CN117290140A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117290140A
CN117290140A CN202311214138.7A CN202311214138A CN117290140A CN 117290140 A CN117290140 A CN 117290140A CN 202311214138 A CN202311214138 A CN 202311214138A CN 117290140 A CN117290140 A CN 117290140A
Authority
CN
China
Prior art keywords
webpage
data
browser
web page
monitoring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311214138.7A
Other languages
Chinese (zh)
Inventor
吴曦
刘祎莹
唐攀
杨杰
郝学宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311214138.7A priority Critical patent/CN117290140A/en
Publication of CN117290140A publication Critical patent/CN117290140A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0778Dumping, i.e. gathering error/state information after a fault for later diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to the field of data processing, and in particular, to a data processing method, apparatus, electronic device, and storage medium. The method is applied to an independent program, the independent program executes processing in a background thread of a browser, and the method comprises the following steps: when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown; when the independent program determines that the started webpage in the browser has webpage collapse, the acquired webpage data are sent to a remote storage unit, so that the situation that the data acquired before webpage collapse cannot be sent when the webpage collapses can be avoided.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a data processing method, a data processing device, electronic equipment and a storage medium.
Background
At present, along with the continuous development of technology, people start to get used to using pages provided by a browser to perform shopping, entertainment and other activities, and therefore, higher requirements are put forward on functions of a website system.
When a user uses a page provided by a browser, the page cannot be loaded or run normally due to program errors, network problems or other reasons, abnormal conditions such as no response, white screen, flash back and the like occur, and the problem of page breakdown occurs.
When the problem of page collapse occurs, the browser in the prior art cannot send out data before the web page collapse, so that a technician cannot obtain the data causing the web page collapse.
Disclosure of Invention
The embodiment of the invention aims to provide a data processing method, a device, electronic equipment and a storage medium, which are used for sending data collected before page crash in time when the page crashes.
In a first aspect, an embodiment of the present invention provides a data processing method, applied to an independent program, where the independent program performs processing in a background thread of a browser, the method including:
when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown;
and when the independent program determines that the started webpage in the browser has webpage collapse, the acquired webpage data are sent to a remote storage unit.
In one possible implementation manner, when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown includes:
triggering an error event when the started webpage is monitored;
if the initiating tag of the error event is a preset tag, acquiring webpage static loading data as the webpage data according to the data recorded by the error event; wherein the preset label is img or script.
In one possible implementation manner, when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown includes:
calling an error processor error handler method provided by a frame for constructing the started webpage and corresponding to the browser, monitoring webpage code execution errors, and obtaining a first monitoring result;
and taking the code execution error data in the first monitoring result as the webpage data.
In one possible implementation manner, when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown includes:
calling a window.performance.timing method of the overall time parameter of the page provided by the browser, monitoring the loading performance of the webpage, and obtaining a second monitoring result;
and taking the webpage loading performance data in the second monitoring result as the webpage data.
In one possible implementation manner, when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown includes:
calling a page memory parameter window.performance.memory method provided by the browser, monitoring the use of a webpage execution stack memory, and obtaining a third monitoring result;
and taking the memory usage data of the execution stack in the third monitoring result as the webpage data.
In one possible implementation manner, when the independent program determines that the started webpage in the browser has a webpage crash, the acquired webpage data is sent to a remote storage unit, and the method includes:
determining the communication state of the browser according to the historical communication time record and the communication detection period time;
if the communication state indicates that the browser does not communicate within the communication detection period time, sending a test request to a remote storage unit; the test request is used for testing whether the remote storage unit is in an idle state or not;
if the response message of the test request is received within the preset time period, determining that the remote storage unit is in an idle state, compressing the collected webpage data, sending the compressed webpage data to the remote storage unit, and clearing the webpage data locally stored by the browser.
In a second aspect, an embodiment of the present invention provides a data processing apparatus applied to an independent program that performs processing in a browser background thread, the apparatus including:
the collecting unit is used for monitoring and collecting webpage data related to webpage collapse when the independent program monitors that the webpage in the browser is started;
and the sending unit is used for sending the collected webpage data to the remote storage unit when the independent program determines that the started webpage in the browser has webpage collapse.
In a possible embodiment, the acquisition unit is specifically configured to:
triggering an error event when the started webpage is monitored;
if the initiating tag of the error event is a preset tag, acquiring webpage static loading data as the webpage data according to the data recorded by the error event; wherein the preset label is img or script.
In a possible embodiment, the acquisition unit is specifically configured to:
calling an error processor error handler method provided by a frame for constructing the started webpage and corresponding to the browser, monitoring webpage code execution errors, and obtaining a first monitoring result;
and taking the code execution error data in the first monitoring result as the webpage data.
In a possible embodiment, the acquisition unit is specifically configured to:
calling a window.performance.timing method of the overall time parameter of the page provided by the browser, monitoring the loading performance of the webpage, and obtaining a second monitoring result;
and taking the webpage loading performance data in the second monitoring result as the webpage data.
In a possible embodiment, the acquisition unit is specifically configured to:
calling a page memory parameter window.performance.memory method provided by the browser, monitoring the use of a webpage execution stack memory, and obtaining a third monitoring result;
and taking the memory usage data of the execution stack in the third monitoring result as the webpage data.
In a possible implementation manner, the sending unit is specifically configured to:
determining the communication state of the browser according to the historical communication time record and the communication detection period time;
if the communication state indicates that the browser does not communicate within the communication detection period time, sending a test request to a remote storage unit; the test request is used for testing whether the remote storage unit is in an idle state or not;
and if the response message of the test request is received within a preset time period, determining that the remote storage unit is in an idle state, compressing the acquired webpage data, then sending the compressed webpage data to the remote storage unit, and clearing the webpage data locally stored by the browser.
In a third aspect, an embodiment of the present invention provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the methods provided by the embodiments of the first aspect of the present invention.
In a fourth aspect, embodiments of the present invention provide a computer storage medium, where the computer readable storage medium stores a computer program for causing a computer to perform any of the methods provided by the embodiments of the first aspect of the present invention.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform any of the methods provided by the embodiments of the first aspect.
The invention has the following beneficial effects:
in the embodiment of the invention, the independent program can monitor and collect the webpage data related to webpage collapse when monitoring that the webpage in the browser is started; thus, when the independent program determines that the web page corresponding to the browser is crashed, the collected web page data is sent to the remote storage unit. That is, since the independent program in the embodiment of the present invention can perform processing in the background thread of the browser and execute processing with the main line Cheng Fenli of the started web page in the browser, after the web page crashes, the independent program can send the monitored and collected web page data to the remote storage unit, so as to avoid the situation that the browser in the prior art cannot send the data collected before the web page crashes, and thus cannot accurately analyze the web page crashes.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. Embodiments of the invention and features of the embodiments may be combined with one another arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
The term "comprising" and any variations thereof in the description of the invention and in the claims is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the embodiments of the present invention, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
In the technical scheme of the invention, the data is collected, transmitted, used and the like, and all meet the requirements of national relevant laws and regulations.
In order to facilitate understanding of the technical solution provided by the embodiments of the present invention, some key terms used in the embodiments of the present invention are explained here:
JavaScript: (abbreviated as "JS") is a lightweight, interpreted or just-in-time compiled programming language with functional preference.
JavaScript execution stack: refers to a data structure in which all function calls and variable declarations are stored in memory when the Javascript program is executed. When a function is called, it is placed on top of the execution stack and then the code within the function is executed. When the function is executed, it pops up from the execution stack, and control returns to the location where the function was called. The size of the execution stack memory is limited and when the stack memory overflows, it may cause the web page to crash.
As described above, in the prior art, when a web page crashes, the browser cannot send out data before the web page crashes, so that a technician cannot obtain the data causing the web page crashes.
In view of this, an embodiment of the present invention provides a data processing method, in which an independent program can monitor and collect web page data related to web page crash when it is monitored that a web page in a browser is started; thus, when the independent program determines that the web page corresponding to the browser is crashed, the collected web page data is sent to the remote storage unit. That is, since the independent program in the embodiment of the present invention can perform processing in the background thread of the browser and execute processing with the main line Cheng Fenli of the started web page in the browser, after the web page crashes, the independent program can send the monitored and collected web page data to the remote storage unit, so as to avoid the situation that the browser in the prior art cannot send the data collected before the web page crashes, and thus cannot accurately analyze the web page crashes.
After the design idea of the embodiment of the present invention is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present invention, and it should be noted that the application scenarios described below are only used for illustrating the embodiment of the present invention and are not limiting. In the specific implementation process, the technical scheme provided by the embodiment of the invention can be flexibly applied according to actual needs.
The scheme provided by the embodiment of the invention can be suitable for a scene of timely sending the data acquired before the web page breakdown of the browser.
In the embodiment of the present invention, please refer to fig. 1, fig. 1 is a schematic diagram of an application scenario provided in the embodiment of the present invention, where the scenario includes a plurality of electronic devices 101 and a remote storage unit 102.
In the embodiment of the invention, a user can open a browser through the corresponding electronic equipment 101 and operate a webpage corresponding to the browser, and then an independent program in the browser can monitor and collect webpage data related to webpage breakdown when monitoring that the webpage in the browser is started; when the independent program determines that the web page corresponding to the browser crashes, the collected web page data is sent to the remote storage unit 102. Wherein the independent program performs processing in the browser background thread and executes with the main line Cheng Fenli of the web page that is started in the browser. Therefore, the monitoring and the collection can not be influenced by the main thread due to the independent thread, so that webpage data can be fed back at any time, the condition of webpage collapse can be determined at any time, and the data collected before the webpage collapse is timely sent out, so that workers can analyze the reason of the collapse, the webpage is restored, and the use experience of users is improved.
In the embodiment of the present invention, the terminal device may be, for example, a tablet personal computer (PAD), a personal computer (Personal computer, PC), a smart phone, a smart television, an intelligent vehicle-mounted device, a wearable device, or the like, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, the remote storage device 102 may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms, or may be a physical server, but is not limited thereto.
Wherein the terminal device 101 and the remote storage unit 102 may be in direct or indirect communication connection via one or more networks 103. The network 103 may be a wired network, or may be a Wireless network, for example, a mobile cellular network, or may be a Wireless-Fidelity (WIFI) network, or may be other possible networks, which are not limited in this embodiment of the present invention.
Of course, the method provided by the embodiment of the present invention is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, for example, only the terminal device implements the data processing method, which is not limited by the embodiment of the present invention. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described together in the following method embodiments, which are not described in detail herein.
In order to further explain the technical solution provided by the embodiments of the present invention, the following details are described with reference to the accompanying drawings and the detailed description. Although embodiments of the present invention provide the method operational steps shown in the following embodiments or figures, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present invention. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Referring to fig. 2, fig. 2 is a flow chart of a data processing method according to an embodiment of the invention. The flow of the method may be executed by an electronic device, which may be the aforementioned terminal device, and the specific implementation flow of the method is as follows:
step 201: when the independent program monitors that the webpage in the browser is started, the independent program monitors and collects webpage data related to webpage breakdown.
In the embodiment of the invention, the electronic equipment can establish the independent program and establish the heartbeat connection between the main thread corresponding to the started webpage and the independent program, so that when the webpage operates normally, the independent program can periodically receive the heartbeat signal sent by the main thread corresponding to the webpage, and therefore, when the independent program does not receive the heartbeat signal sent by the main thread corresponding to the webpage at the moment corresponding to the new period, the occurrence of the breakdown condition of the webpage can be determined. For example, assuming that the period of sending the heartbeat signal by the main thread is 3 seconds, the independent program may detect the heartbeat signal sent by the main thread every 4 seconds, and if the heartbeat signal is not received in the last 4 seconds, it may determine that the web page crashes.
Alternatively, the stand-alone program is, for example, a Web Worker, which is a JavaScript program running in a browser that is capable of handling a large number of computationally intensive tasks, such as image processing or data processing, without affecting the responsiveness of the user interface.
In order to better introduce the independent program to monitor and collect the webpage data related to the webpage crash in the embodiment of the present invention, the independent program is described below in terms of several exemplary examples to monitor and collect the webpage data related to the webpage crash.
Mode 1:
when the independent program monitors that the started webpage triggers an error event, whether the initiating label of the error event is img or script can be judged, and if the initiating label of the error event is img or script, the static webpage resource loading error data is obtained as webpage data according to the data recorded by the error event.
Mode 2:
the independent program can call an error processor error handler method provided by a frame for constructing the started webpage and corresponding to the browser, monitor webpage code execution errors and obtain a first monitoring result; and taking the code execution error data in the first monitoring result as webpage data.
Mode 3:
the independent program can call a window.performance.timing method provided by the browser, monitor the webpage loading performance and obtain a second monitoring result; and taking the webpage loading performance data in the second monitoring result as the webpage data.
Mode 4:
when the independent program monitors that the started webpage triggers an unhandleddrejet event, the webpage asynchronous task error data in the record of the unhandleddrejet event can be used as webpage data.
Mode 5:
the independent program can call a window.performance.memory method provided by the browser, monitor the use of the started webpage execution stack memory in the browser, and obtain a third monitoring result; and taking the memory usage data of the execution stack in the third monitoring result as webpage data.
Mode 6:
the independent program can monitor the loadend event of the XMLHttpRequest object, and if the loadend event is determined to be triggered by the XMLHttpRequest object, the information of the hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) request is collected, the information including the information of a requested uniform resource location system (uniform resource locator, URL), the request state, the request response value and the like, and the HTTP request information is used as webpage data.
Mode 7:
the independent program can monitor action events of the user operation page, wherein the action events comprise at least one of single click webpage element sub-action events, double click webpage element sub-action events and dragging webpage element sub-action events. If the independent program monitors that the started webpage in the browser triggers an action event, acquiring action information of a user operating the webpage and clicked target webpage element information, and taking the action information and the webpage element information as webpage data.
Optionally, the independent program may further acquire a current time, and tag the current time to the web page data, to record a time of acquiring the web page data, and then temporarily store the web page data in a corresponding list, and if there is first web page data in the corresponding list, where a time difference from the recorded time to the current time exceeds a threshold, delete the first web page data.
In the embodiment of the invention, the independent program can monitor the webpages unloading event before the webpages unloading event, wherein the webpages unloading event is called when the webpages are unloaded (closed) or refreshed, and if the webpages are determined to trigger the webpages before the webpages are closed, the independent program can close the webpages normally, and the collected webpage data is cleared.
Therefore, in the embodiment of the invention, after the started webpage in the browser normally operates or normally exits, the collected webpage data cannot be sent to the remote storage unit, so that the interference to the remote storage unit is reduced.
Step 202: when the independent program determines that the started webpage in the browser crashes, the acquired webpage data are sent to the remote storage unit.
In the embodiment of the invention, the independent program can determine the communication state of the browser according to the historical communication time record and the communication detection cycle time; if the communication state indicates that the browser does not communicate within the communication detection period time, sending a test request to the remote storage unit; the test request is used for testing whether the remote storage unit is in an idle state; if a response message of the test request is received within a preset time period, determining that the remote storage unit is in an idle state, compressing the collected webpage data, sending the compressed webpage data to the remote storage unit, and clearing the webpage data locally stored by the browser. Alternatively, the web page data may be converted into a string, and the string is compressed by a string table compression algorithm (LZW), and then sent to the remote storage unit.
In the embodiment of the invention, the data before the breakdown of the webpage started in the browser can be timely and accurately monitored through the independent program, the collected webpage data is sent to the remote storage unit, and the independent program is automatically and independently operated on the main thread corresponding to the webpage started in the browser, so that the whole process of collecting the webpage data is automatically operated, the normal use of the webpage started in the browser by a user is not influenced, and the use experience of the user is improved.
Based on the same inventive concept, the embodiments of the present invention also provide a data processing apparatus applied to an independent program that performs processing in a browser background thread. As shown in fig. 3, which is a schematic structural diagram of the data processing apparatus 300, may include:
the collecting unit 301 is configured to monitor and collect web page data related to web page crash when the independent program monitors that a web page in the browser is started; the said
And the sending unit 302 is configured to send the collected web page data to a remote storage unit when the independent program determines that the started web page in the browser has a web page crash.
In a possible embodiment, the acquisition unit 301 is specifically configured to:
triggering an error event when the started webpage is monitored;
if the initiating tag of the error event is a preset tag, acquiring webpage static loading data as the webpage data according to the data recorded by the error event; wherein the preset label is img or script.
In a possible embodiment, the acquisition unit 301 is specifically configured to:
calling an error processor error handler method provided by a frame for constructing the started webpage and corresponding to the browser, monitoring webpage code execution errors, and obtaining a first monitoring result;
and taking the code execution error data in the first monitoring result as the webpage data.
In a possible embodiment, the acquisition unit 301 is specifically configured to:
calling a window.performance.timing method of the overall time parameter of the page provided by the browser, monitoring the loading performance of the webpage, and obtaining a second monitoring result;
and taking the webpage loading performance data in the second monitoring result as the webpage data.
In a possible embodiment, the acquisition unit 301 is specifically configured to:
calling a page memory parameter window.performance.memory method provided by the browser, monitoring the use of a webpage execution stack memory, and obtaining a third monitoring result;
and taking the memory usage data of the execution stack in the third monitoring result as the webpage data.
In a possible implementation manner, the sending unit 302 is specifically configured to:
determining the communication state of the browser according to the historical communication time record and the communication detection period time;
if the communication state indicates that the browser does not communicate within the communication detection period time, sending a test request to a remote storage unit; the test request is used for testing whether the remote storage unit is in an idle state or not;
and if the response message of the test request is received within a preset time period, determining that the remote storage unit is in an idle state, compressing the collected webpage data, then sending the compressed webpage data to the remote storage unit, and clearing the webpage data locally stored by the browser.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present invention.
Having described the data processing method and apparatus of an exemplary embodiment of the present invention, next, an electronic device according to another exemplary embodiment of the present invention is described.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
The embodiment of the invention also provides electronic equipment based on the same conception as the embodiment of the method. In this embodiment, the structure of the electronic device may be shown in fig. 4, where the electronic device is, for example, the server 102 in fig. 1, as shown in fig. 4, and the electronic device in the embodiment of the present invention includes at least one processor 401, and a memory 402 and a communication interface 403 connected to the at least one processor 401, where the embodiment of the present invention does not limit a specific connection medium between the processor 401 and the memory 402, and in fig. 4, a connection between the processor 401 and the memory 402 is taken as an example by using a system bus 400, and in fig. 4, the system bus 400 is shown by a bold line, and a connection manner between other components is merely illustrative, and not limited to. The system bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present invention, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 may perform the steps included in the aforementioned data processing method by executing the instructions stored in the memory 402.
The processor 401 is a control center of the electronic device, and may connect various parts of the entire electronic device using various interfaces and lines, and may implement various functions of the electronic device by executing or executing instructions stored in the memory 402 and calling data stored in the memory 402. Alternatively, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the processor 401 mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 401 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
Memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 402 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 402 in embodiments of the present invention may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
The communication interface 403 is a transmission interface that can be used for communication, and data can be received or transmitted through the communication interface 403.
In addition, the electronic device includes a basic input/output system (I/O system) 404, a mass storage device 408 for storing an operating system 405, application programs 406, and other program modules 407, which facilitate the transfer of information between the various devices within the electronic device.
The basic input/output system 404 includes a display 409 for displaying information and an input device 410, such as a mouse, keyboard, etc., for the user to input information. Wherein both the display 409 and the input device 410 are coupled to the processor 401 via a basic input/output system 404 coupled to the system bus 400. The basic input/output system 404 may also include an input/output controller for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller also provides output to a display screen, a printer, or other type of output device.
In particular, mass storage device 408 is connected to processor 401 through a mass storage controller (not shown) connected to system bus 400. Wherein the mass storage device 408 and its associated computer-readable media provide non-volatile storage for the server package. That is, mass storage device 408 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
The electronic device may also operate via a network, such as the internet, connected to a remote computer on the network, in accordance with various embodiments of the present invention. I.e., the electronic device may be connected to the network 411 through a communication interface 403 coupled to the system bus 400, or alternatively, the communication interface 403 may be used to connect to other types of networks or remote computer systems (not shown).
The embodiment of the invention also provides a computer storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is used for making a computer execute the technical scheme of the data processing method of the embodiment.
Embodiments of the present invention also provide a computer program product comprising: computer program code for implementing the technical solution of the data processing method in the above embodiment when the computer program code runs on a computer, so that the computer executes the computer program.
Those skilled in the art will appreciate that: all or part of the steps of implementing the above method embodiments may be implemented by hardware associated with program instructions pertaining to a computer program, which may be stored in a computer-readable storage medium, which when executed performs steps comprising the above method embodiments; the readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a 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.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's equipment, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A data processing method applied to a separate program that performs processing in a browser background thread, the method comprising:
when the independent program monitors that the webpage in the browser is started, monitoring and collecting webpage data related to webpage breakdown;
and when the independent program determines that the started webpage in the browser has webpage collapse, the acquired webpage data are sent to a remote storage unit.
2. The method of claim 1, wherein the standalone program, when monitoring that a web page in the browser is launched, monitors and gathers web page data related to a web page crash, comprising:
triggering an error event when the started webpage is monitored;
if the initiating tag of the error event is a preset tag, acquiring webpage static loading data as the webpage data according to the data recorded by the error event; wherein the preset label is img or script.
3. The method of claim 1, wherein the standalone program, when monitoring that a web page in the browser is launched, monitors and gathers web page data related to a web page crash, comprising:
calling an error processor error handler method provided by a frame for constructing the started webpage and corresponding to the browser, monitoring webpage code execution errors, and obtaining a first monitoring result;
and taking the code execution error data in the first monitoring result as the webpage data.
4. The method of claim 1, wherein the standalone program, when monitoring that a web page in the browser is launched, monitors and gathers web page data related to a web page crash, comprising:
calling a window.performance.timing method of the overall time parameter of the page provided by the browser, monitoring the loading performance of the webpage, and obtaining a second monitoring result;
and taking the webpage loading performance data in the second monitoring result as the webpage data.
5. The method of claim 1, wherein the standalone program, when monitoring that a web page in the browser is launched, monitors and gathers web page data related to a web page crash, comprising:
calling a page memory parameter window.performance.memory method provided by the browser, monitoring the use of a webpage execution stack memory, and obtaining a third monitoring result;
and taking the memory usage data of the execution stack in the third monitoring result as the webpage data.
6. The method according to any one of claims 1-5, wherein when the independent program determines that a web page crash occurs in a web page launched in the browser, sending the collected web page data to a remote storage unit includes:
determining the communication state of the browser according to the historical communication time record and the communication detection period time;
if the communication state indicates that the browser does not communicate within the communication detection period time, sending a test request to a remote storage unit; the test request is used for testing whether the remote storage unit is in an idle state or not;
if the response message of the test request is received within the preset time period, determining that the remote storage unit is in an idle state, compressing the collected webpage data, sending the compressed webpage data to the remote storage unit, and clearing the webpage data locally stored by the browser.
7. A data processing apparatus, characterized by being applied to a separate program that performs processing in a browser background thread, comprising:
the collecting unit is used for monitoring and collecting webpage data related to webpage collapse when the independent program monitors that the webpage in the browser is started;
and the sending unit is used for sending the collected webpage data to the remote storage unit when the independent program determines that the webpage started in the browser has webpage breakdown.
8. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to implement the method of any of claims 1-6.
9. A computer storage medium, characterized in that the computer storage medium stores a computer program for enabling a computer to perform the method according to any one of claims 1-6.
10. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-6.
CN202311214138.7A 2023-09-20 2023-09-20 Data processing method and device, electronic equipment and storage medium Pending CN117290140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311214138.7A CN117290140A (en) 2023-09-20 2023-09-20 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311214138.7A CN117290140A (en) 2023-09-20 2023-09-20 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117290140A true CN117290140A (en) 2023-12-26

Family

ID=89256557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311214138.7A Pending CN117290140A (en) 2023-09-20 2023-09-20 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117290140A (en)

Similar Documents

Publication Publication Date Title
US9369356B2 (en) Conducting a diagnostic session for monitored business transactions
US10904112B2 (en) Automatic capture of detailed analysis information based on remote server analysis
US10230611B2 (en) Dynamic baseline determination for distributed business transaction
CN111752793A (en) System abnormity monitoring method and device, computer equipment and storage medium
CN111258736B (en) Information processing method and device and electronic equipment
CN107045475B (en) Test method and device
US20180159724A1 (en) Automatic task tracking
CN111984896A (en) Buried point data acquisition method and device, computer equipment and readable storage medium
CN113254320A (en) Method and device for recording user webpage operation behaviors
US10140377B2 (en) Data processing, data collection
CN112817831A (en) Application performance monitoring method, device, computer system and readable storage medium
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
CN109165372B (en) Webpage loading method, device, equipment and storage medium
CN110659435A (en) Page data acquisition processing method and device, computer equipment and storage medium
CN111552613A (en) Thread timeout processing method and device and electronic equipment
CN111966508A (en) Message batch sending method and device, computer equipment and storage medium
CN115955557A (en) Kadun analysis method and device thereof
CN117290140A (en) Data processing method and device, electronic equipment and storage medium
CN114546775A (en) Web monitoring method, device, equipment and medium based on client application
CN112416698B (en) Expansion method and device of monitoring system, storage medium and electronic equipment
CN113032237A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111338960A (en) Buried point data acquisition method and device
CN109361557B (en) Control method and control device for monitoring browser jamming
CN114398233B (en) Load abnormality detection method and device, server and storage medium
US20150288584A1 (en) System and method for determining end user timing

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