[go: up one dir, main page]

CN112685253B - Front-end error report log acquisition method, device, equipment and storage medium - Google Patents

Front-end error report log acquisition method, device, equipment and storage medium Download PDF

Info

Publication number
CN112685253B
CN112685253B CN202011601565.7A CN202011601565A CN112685253B CN 112685253 B CN112685253 B CN 112685253B CN 202011601565 A CN202011601565 A CN 202011601565A CN 112685253 B CN112685253 B CN 112685253B
Authority
CN
China
Prior art keywords
feedback
log
time
monitoring
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011601565.7A
Other languages
Chinese (zh)
Other versions
CN112685253A (en
Inventor
余祖杭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shenquan Interactive Technology Co ltd
Original Assignee
Shenzhen Shenquan Interactive Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shenquan Interactive Technology Co ltd filed Critical Shenzhen Shenquan Interactive Technology Co ltd
Priority to CN202011601565.7A priority Critical patent/CN112685253B/en
Publication of CN112685253A publication Critical patent/CN112685253A/en
Application granted granted Critical
Publication of CN112685253B publication Critical patent/CN112685253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to cloud monitoring and provides a front-end error report log acquisition method, device and equipment and a storage medium. The method can generate an event monitoring request based on a preset event and send the event monitoring request to a preset browser; receiving a monitoring feedback packet generated based on the event monitoring request; determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage; if the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet; screening a target log from the trigger terminal according to the generation time; and extracting an error report log from the target log according to the feedback webpage. The invention can obtain comprehensive error reporting information. In addition, the invention also relates to a blockchain technology, and the error report log can be stored in the blockchain.

Description

Front-end error report log acquisition method, device, equipment and storage medium
Technical Field
The present invention relates to the field of cloud monitoring technologies, and in particular, to a method, an apparatus, a device, and a storage medium for collecting a front-end error report log.
Background
At present, before the front-end item is online, the front-end item is fully tested, however, when unpredictable problems occur in equipment, a browser, a network environment and the like operated by the front-end page, the front-end page still fails to operate. In order to locate the reason of the front-end page operation failure, the error reporting information is obtained by burying points in the front-end project at present, however, the error reporting information obtained by burying points is not comprehensive enough, and thus the production problem cannot be accurately located.
Therefore, how to obtain comprehensive error reporting information to accurately locate the production problem is a problem to be solved.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, apparatus, device and storage medium for collecting a front-end error log, which can obtain comprehensive error reporting information to accurately locate production problems.
In one aspect, the invention provides a front-end error log acquisition method, which comprises the following steps:
generating an event monitoring request based on a preset event, and sending the event monitoring request to a preset browser;
receiving a monitoring feedback packet generated based on the event monitoring request;
Determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet;
If the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet;
screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time;
and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
According to a preferred embodiment of the present invention, the generating the event monitoring request based on the preset event includes:
acquiring a monitoring instruction template from an instruction template library, and determining the filling quantity of all filling events in the monitoring instruction template;
Determining a preset number of the preset events;
Processing all filling events in the monitoring instruction template based on the difference value between the filling quantity and the preset quantity to obtain a target template;
Determining filling positions of all filling events in the target template;
And writing the preset event into the filling position to obtain the event monitoring request.
According to a preferred embodiment of the present invention, the sending the event monitoring request to a preset browser includes:
Acquiring a device address of the electronic device, and acquiring a browser address of the preset browser;
Establishing a connection channel between the equipment address and the browser address;
And sending the event monitoring request to the preset browser through the connection channel.
According to a preferred embodiment of the present invention, the determining the feedback web page according to the monitoring feedback packet includes:
Analyzing the message of the monitoring feedback packet to obtain data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a webpage;
acquiring information corresponding to the preset tag from the data information as a webpage code;
and determining a webpage corresponding to the webpage code from a webpage mapping table as the feedback webpage.
According to a preferred embodiment of the present invention, the determining the feedback frequency of the feedback web page includes:
Determining a target feedback packet corresponding to each feedback webpage from the monitoring feedback packets;
acquiring the receiving time of the target feedback packet;
acquiring the time with the minimum value from the receiving time as a first time, and acquiring the time with the maximum value from the receiving time as a second time;
Determining the time difference between the second time and the first time to obtain target time;
Determining the feedback quantity of each feedback webpage according to the target feedback package;
dividing the feedback quantity by the target time to obtain the feedback frequency.
According to a preferred embodiment of the present invention, the screening the target log from the trigger terminal according to the generation time includes:
taking the sum of the generation time and the preset time as a third time;
determining a time interval according to the generation time and the third time;
Acquiring all logs on the trigger terminal, and acquiring the log time of each log in all logs;
And determining the log with the log time in the time interval as the target log.
According to a preferred embodiment of the present invention, after extracting the error log from the target log according to the feedback web page, the method further includes:
Extracting information indicating an entity from the error report log as error report information;
Determining a triggering user of the event monitoring request;
determining a terminal bound with the triggering user as a user terminal;
and sending the error reporting information to the user terminal.
On the other hand, the invention also provides a front-end error report log acquisition device, which comprises:
the sending unit is used for generating an event monitoring request based on a preset event and sending the event monitoring request to a preset browser;
The receiving unit is used for receiving a monitoring feedback packet generated based on the event monitoring request;
the determining unit is used for determining feedback webpages according to the monitoring feedback package and determining feedback frequency of the feedback webpages, wherein the feedback webpages are webpages triggering the monitoring feedback package to generate;
the determining unit is further configured to determine a generation time of the monitoring feedback packet and determine a trigger terminal of the monitoring feedback packet if the feedback frequency is greater than a configuration value;
the screening unit is used for screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and a preset time;
the extraction unit is used for extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
In another aspect, the present invention also proposes an electronic device, including:
a memory storing computer readable instructions; and
And the processor executes the computer readable instructions stored in the memory to realize the front-end error log acquisition method.
In another aspect, the present invention further proposes a computer readable storage medium, in which computer readable instructions are stored, the computer readable instructions being executed by a processor in an electronic device to implement the front-end error log collection method.
According to the technical scheme, the event monitoring request can be generated based on the preset event, and the event monitoring request is sent to the preset browser; receiving a monitoring feedback packet generated based on the event monitoring request; determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet; if the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet; screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time; and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run. According to the method and the device for monitoring the web page running on the preset browser, the web page running on the preset browser is further monitored through the generated event monitoring request, when the monitoring feedback packet is received, the feedback web page can be accurately determined from the monitoring feedback packet, further, the error report log corresponding to the feedback web page can be extracted from the trigger terminal, further, comprehensive error report information can be obtained from the error report log, and therefore positioning of production problems is facilitated.
Drawings
FIG. 1 is a flow chart of a method for collecting a front-end error log according to a preferred embodiment of the present invention.
FIG. 2 is a flow chart of one embodiment of the present invention for generating an event monitoring request.
FIG. 3 is a flowchart illustrating an embodiment of determining a feedback frequency of a feedback web page according to the present invention.
FIG. 4 is a functional block diagram of a front-end error log collection device according to a preferred embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing a front-end error log collection method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a method for collecting a front-end error log according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The front-end error log collection method is applied to one or more electronic devices, wherein the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored computer readable instructions, and hardware of the electronic devices comprises, but is not limited to, a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device and the like.
The electronic device may be any electronic product that can interact with a user in a human-computer manner, such as a Personal computer, a tablet computer, a smart phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a game console, an interactive internet protocol television (Internet Protocol Television, IPTV), a smart wearable device, etc.
The electronic device may comprise a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network electronic device, a group of electronic devices made up of multiple network electronic devices, or a Cloud based Cloud Computing (Cloud Computing) made up of a large number of hosts or network electronic devices.
The network on which the electronic device is located includes, but is not limited to: the internet, wide area networks, metropolitan area networks, local area networks, virtual private networks (Virtual Private Network, VPN), etc.
S10, generating an event monitoring request based on a preset event, and sending the event monitoring request to a preset browser.
In at least one embodiment of the present invention, the preset event may include, but is not limited to: onerror events, etc.
The event monitoring request may be triggered by a user to generate, and the information carried by the event monitoring request includes, but is not limited to: events are monitored.
The preset browser may be any browser, for example, the preset browser may be a fire fox browser or the like.
Referring to fig. 2, fig. 2 is a flow chart of one embodiment of generating an event monitoring request in accordance with the present invention. In at least one embodiment of the present invention, the generating, by the electronic device, an event monitoring request based on a preset event includes:
s100, acquiring a monitoring instruction template from an instruction template library, and determining the filling quantity of all filling events in the monitoring instruction template.
And the instruction template library stores a plurality of instruction templates. Each filling event comprises a label corresponding to the event.
S101, determining the preset number of the preset events.
S102, processing all filling events in the monitoring instruction template based on the difference value between the filling quantity and the preset quantity to obtain a target template.
Specifically, the electronic device processes all filling events in the monitoring instruction template based on the difference value between the filling quantity and the preset quantity, and the obtaining of the target template includes:
If the filling quantity is larger than the preset quantity, deleting filling events with the quantity being the difference value in the monitoring instruction templates, and determining the deleted monitoring instruction templates as the target templates; or alternatively
And if the filling quantity is smaller than the preset quantity, filling events with the quantity being the difference value are newly added in the monitoring instruction template, and the target template is obtained.
S103, determining filling positions of all filling events in the target template.
The fill location refers to the location of a fill event.
And S104, writing the preset event into the filling position to obtain the event monitoring request.
For example: the method for acquiring the monitoring instruction template from the instruction template library comprises the following steps: event tag 1, fill position 1; event tag 2, fill position 2], the number of fills of monitoring instruction template is determined to be 2, the preset event includes: the preset number is 3, and the filling number 2 is smaller than the preset number 3, so that filling events are expanded in the monitoring instruction template, and the target template is obtained as follows: event tag 1, fill position 1; event tag 2, fill location 2; event tag 3, fill location 3.
According to the embodiment, the monitoring instruction templates can be processed according to the difference value between the preset quantity and the filling quantity, the problem that the event monitoring request cannot be generated when the preset quantity is not the filling quantity is avoided, the generation applicability of the event monitoring request is improved, and further the preset event can be accurately written into the filling position according to the mapping relation between all filling events and the filling position, so that the generation accuracy of the event monitoring request is improved.
In at least one embodiment of the present invention, the sending, by the electronic device, the event monitoring request to a preset browser includes:
Acquiring a device address of the electronic device, and acquiring a browser address of the preset browser;
Establishing a connection channel between the equipment address and the browser address;
And sending the event monitoring request to the preset browser through the connection channel.
Wherein the device address refers to an address of the electronic device.
By establishing the connection channel, the event monitoring request can be accurately sent to the preset browser, so that a monitoring object for event monitoring can be improved.
S11, receiving a monitoring feedback packet generated based on the event monitoring request.
In at least one embodiment of the present invention, when it is detected that any information exists in the connection channel, the electronic device receives the any information, detects whether an identifier of the event monitoring request exists in the any information, and if the identifier of the event monitoring request exists in the any information, determines the received any information as the monitoring feedback packet.
S12, determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage triggering the monitoring feedback packet to generate.
In at least one embodiment of the present invention, the feedback web page may be any front-end web page.
The feedback frequency refers to the frequency of the feedback webpage in the monitoring feedback packet.
In at least one embodiment of the present invention, the determining, by the electronic device, a feedback web page according to the monitoring feedback packet includes:
Analyzing the message of the monitoring feedback packet to obtain data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a webpage;
acquiring information corresponding to the preset tag from the data information as a webpage code;
and determining a webpage corresponding to the webpage code from a webpage mapping table as the feedback webpage.
And storing the mapping relation between the webpage codes and the webpages in the webpage mapping table.
According to the embodiment, the whole monitoring feedback packet is not required to be analyzed, so that the data information acquisition efficiency can be improved, the feedback webpage can be rapidly determined, in addition, the webpage code can be accurately determined through the mapping relation between the preset label and the webpage, and the feedback webpage can be accurately determined.
Referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment of determining a feedback frequency of a feedback web page according to the present invention. In at least one embodiment of the present invention, the determining, by the electronic device, the feedback frequency of the feedback web page includes:
S120, determining a target feedback packet corresponding to each feedback webpage from the monitoring feedback packets.
S121, acquiring the receiving time of the target feedback packet.
The receiving time refers to the time when the electronic device receives the target feedback packet.
S122, acquiring the time with the minimum value from the receiving time as a first time, and acquiring the time with the maximum value from the receiving time as a second time.
S123, determining the time difference between the second time and the first time to obtain target time.
S124, determining the feedback quantity of each feedback webpage according to the target feedback package.
S125, dividing the feedback quantity by the target time to obtain the feedback frequency.
The target time can be accurately determined through the receiving time of the target feedback packet, and further the feedback frequency of the feedback webpage can be accurately determined according to the target time.
And S13, if the feedback frequency is larger than the configuration value, determining the generation time of the monitoring feedback packet, and determining a trigger terminal of the monitoring feedback packet.
In at least one embodiment of the present invention, the configuration value may be set according to the frequency of the feedback web page.
The generation time refers to the time of the preset browser to generate the monitoring feedback packet.
The triggering terminal is a terminal for triggering the generation of the monitoring feedback packet. The trigger terminal may be a terminal for the user to execute the feedback web page.
In at least one embodiment of the present invention, the determining, by the electronic device, a generation time of the monitoring feedback packet, and determining a trigger terminal of the monitoring feedback packet includes:
Acquiring information indicating time from the data information as the generation time;
acquiring information indicating a terminal from the data information as a terminal address;
and determining the terminal corresponding to the terminal address as the trigger terminal.
According to the embodiment, since the generation time and the terminal address are stored in the monitoring feedback packet, the generation time can be acquired through the tag indicating the time, the terminal address can be acquired through the tag indicating the terminal, and the trigger terminal can be accurately determined according to the terminal address.
S14, screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and a preset time.
In at least one embodiment of the present invention, the target log refers to a log whose log time is in a time interval, and the target log includes an error report log and a non-error report log.
In at least one embodiment of the present invention, the electronic device screening the target log from the trigger terminal according to the generation time includes:
taking the sum of the generation time and the preset time as a third time;
determining a time interval according to the generation time and the third time;
Acquiring all logs on the trigger terminal, and acquiring the log time of each log in all logs;
And determining the log with the log time in the time interval as the target log.
The preset time can be determined according to the time of the trigger terminal accessing the preset browser, and the invention does not limit the value of the preset time.
According to the embodiment, since the monitoring feedback packet is used for feeding back the event monitoring request, a certain delay exists between the generation time of the monitoring feedback packet and the time of the trigger terminal accessing the feedback webpage, and the target log can be accurately screened out from the trigger terminal according to the time interval, so that the analysis quantity of the log is reduced, and the acquisition efficiency of the subsequent error reporting log is improved.
S15, extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
It should be emphasized that, to further ensure the privacy and security of the error log, the error log may also be stored in a node of a blockchain.
In at least one embodiment of the present invention, the error log refers to a log of user behavior that triggers the monitoring feedback packet to generate.
In at least one embodiment of the present invention, the extracting, by the electronic device, the error log from the target log according to the feedback web page includes:
extracting an execution object from the target log;
comparing the execution object with the feedback webpage;
and if the execution object is the same as the feedback webpage, determining a target log corresponding to the execution object as the error report log.
According to the embodiment, since the target log is generated by triggering in the time interval, the target log comprises the error report log, and the error report log can be accurately extracted from the target log according to the feedback webpage.
In at least one embodiment of the present invention, after extracting the error log from the target log according to the feedback web page, the method further includes:
Extracting information indicating an entity from the error report log as error report information;
Determining a triggering user of the event monitoring request;
determining a terminal bound with the triggering user as a user terminal;
and sending the error reporting information to the user terminal.
Through the implementation manner, the comprehensive error reporting information can be obtained from the error reporting log, and then the comprehensive error reporting information can be sent to the user terminal for analysis by a user.
According to the technical scheme, the event monitoring request can be generated based on the preset event, and the event monitoring request is sent to the preset browser; receiving a monitoring feedback packet generated based on the event monitoring request; determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet; if the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet; screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time; and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run. According to the method and the device for monitoring the web page running on the preset browser, the web page running on the preset browser is further monitored through the generated event monitoring request, when the monitoring feedback packet is received, the feedback web page can be accurately determined from the monitoring feedback packet, further, the error report log corresponding to the feedback web page can be extracted from the trigger terminal, further, comprehensive error report information can be obtained from the error report log, and therefore positioning of production problems is facilitated.
FIG. 4 is a functional block diagram of a front-end error log collection device according to a preferred embodiment of the present invention. The front-end error log collection device 11 includes a sending unit 110, a receiving unit 111, a determining unit 112, a screening unit 113 and an extracting unit 114. The module/unit referred to herein is a series of computer readable instructions capable of being retrieved by the processor 13 and performing a fixed function and stored in the memory 12. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The transmitting unit 110 generates an event monitoring request based on a preset event and transmits the event monitoring request to a preset browser.
In at least one embodiment of the present invention, the preset event may include, but is not limited to: onerror events, etc.
The event monitoring request may be triggered by a user to generate, and the information carried by the event monitoring request includes, but is not limited to: events are monitored.
The preset browser may be any browser, for example, the preset browser may be a fire fox browser or the like.
In at least one embodiment of the present invention, the transmitting unit 110 generating the event monitoring request based on the preset event includes:
and acquiring a monitoring instruction template from an instruction template library, and determining the filling quantity of all filling events in the monitoring instruction template.
And the instruction template library stores a plurality of instruction templates. Each filling event comprises a label corresponding to the event.
And determining the preset number of the preset events.
And processing all filling events in the monitoring instruction template based on the difference value between the filling quantity and the preset quantity to obtain a target template.
Specifically, the sending unit 110 processes all the filling events in the monitoring instruction template based on the difference between the filling number and the preset number, and the obtaining a target template includes:
If the filling quantity is larger than the preset quantity, deleting filling events with the quantity being the difference value in the monitoring instruction templates, and determining the deleted monitoring instruction templates as the target templates; or alternatively
And if the filling quantity is smaller than the preset quantity, filling events with the quantity being the difference value are newly added in the monitoring instruction template, and the target template is obtained.
And determining filling positions of all filling events in the target template.
The fill location refers to the location of a fill event.
And writing the preset event into the filling position to obtain the event monitoring request.
For example: the method for acquiring the monitoring instruction template from the instruction template library comprises the following steps: event tag 1, fill position 1; event tag 2, fill position 2], the number of fills of monitoring instruction template is determined to be 2, the preset event includes: the preset number is 3, and the filling number 2 is smaller than the preset number 3, so that filling events are expanded in the monitoring instruction template, and the target template is obtained as follows: event tag 1, fill position 1; event tag 2, fill location 2; event tag 3, fill location 3.
According to the embodiment, the monitoring instruction templates can be processed according to the difference value between the preset quantity and the filling quantity, the problem that the event monitoring request cannot be generated when the preset quantity is not the filling quantity is avoided, the generation applicability of the event monitoring request is improved, and further the preset event can be accurately written into the filling position according to the mapping relation between all filling events and the filling position, so that the generation accuracy of the event monitoring request is improved.
In at least one embodiment of the present invention, the sending unit 110 sends the event monitoring request to a preset browser, including:
Acquiring a device address of the electronic device, and acquiring a browser address of the preset browser;
Establishing a connection channel between the equipment address and the browser address;
And sending the event monitoring request to the preset browser through the connection channel.
Wherein the device address refers to an address of the electronic device.
By establishing the connection channel, the event monitoring request can be accurately sent to the preset browser, so that a monitoring object for event monitoring can be improved.
The receiving unit 111 receives a monitoring feedback packet generated based on the event monitoring request.
In at least one embodiment of the present invention, when it is detected that any information exists in the connection channel, the receiving unit 111 receives the any information, detects whether an identifier of the event monitoring request exists in the any information, and determines the received any information as the monitoring feedback packet if the identifier of the event monitoring request exists in the any information.
The determining unit 112 determines a feedback webpage according to the monitoring feedback packet, and determines a feedback frequency of the feedback webpage, where the feedback webpage is a webpage triggering the monitoring feedback packet to generate.
In at least one embodiment of the present invention, the feedback web page may be any front-end web page.
The feedback frequency refers to the frequency of the feedback webpage in the monitoring feedback packet.
In at least one embodiment of the present invention, the determining unit 112 determines a feedback web page according to the monitoring feedback packet includes:
Analyzing the message of the monitoring feedback packet to obtain data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a webpage;
acquiring information corresponding to the preset tag from the data information as a webpage code;
and determining a webpage corresponding to the webpage code from a webpage mapping table as the feedback webpage.
And storing the mapping relation between the webpage codes and the webpages in the webpage mapping table.
According to the embodiment, the whole monitoring feedback packet is not required to be analyzed, so that the data information acquisition efficiency can be improved, the feedback webpage can be rapidly determined, in addition, the webpage code can be accurately determined through the mapping relation between the preset label and the webpage, and the feedback webpage can be accurately determined.
In at least one embodiment of the present invention, the determining unit 112 determines the feedback frequency of the feedback web page includes:
and determining a target feedback packet corresponding to each feedback webpage from the monitoring feedback packets.
And acquiring the receiving time of the target feedback packet.
The receiving time refers to the time when the electronic device receives the target feedback packet.
And acquiring the time with the minimum value from the receiving time as a first time, and acquiring the time with the maximum value from the receiving time as a second time.
And determining the time difference between the second time and the first time to obtain target time.
And determining the feedback quantity of each feedback webpage according to the target feedback package.
Dividing the feedback quantity by the target time to obtain the feedback frequency.
The target time can be accurately determined through the receiving time of the target feedback packet, and further the feedback frequency of the feedback webpage can be accurately determined according to the target time.
If the feedback frequency is greater than the configuration value, the determining unit 112 determines the generation time of the monitoring feedback packet, and determines a trigger terminal of the monitoring feedback packet.
In at least one embodiment of the present invention, the configuration value may be set according to the frequency of the feedback web page.
The generation time refers to the time of the preset browser to generate the monitoring feedback packet.
The triggering terminal is a terminal for triggering the generation of the monitoring feedback packet. The trigger terminal may be a terminal for the user to execute the feedback web page.
In at least one embodiment of the present invention, the determining unit 112 determines the generation time of the monitoring feedback packet, and determines the trigger terminal of the monitoring feedback packet includes:
Acquiring information indicating time from the data information as the generation time;
acquiring information indicating a terminal from the data information as a terminal address;
and determining the terminal corresponding to the terminal address as the trigger terminal.
According to the embodiment, since the generation time and the terminal address are stored in the monitoring feedback packet, the generation time can be acquired through the tag indicating the time, the terminal address can be acquired through the tag indicating the terminal, and the trigger terminal can be accurately determined according to the terminal address.
The screening unit 113 screens the target log from the trigger terminal according to the generation time, where the target log is a log whose log time is in a time interval, and the time interval is generated according to the generation time and a preset time.
In at least one embodiment of the present invention, the target log refers to a log whose log time is in a time interval, and the target log includes an error report log and a non-error report log.
In at least one embodiment of the present invention, the screening unit 113 screens a target log from the trigger terminal according to the generation time includes:
taking the sum of the generation time and the preset time as a third time;
determining a time interval according to the generation time and the third time;
Acquiring all logs on the trigger terminal, and acquiring the log time of each log in all logs;
And determining the log with the log time in the time interval as the target log.
The preset time can be determined according to the time of the trigger terminal accessing the preset browser, and the invention does not limit the value of the preset time.
According to the embodiment, since the monitoring feedback packet is used for feeding back the event monitoring request, a certain delay exists between the generation time of the monitoring feedback packet and the time of the trigger terminal accessing the feedback webpage, and the target log can be accurately screened out from the trigger terminal according to the time interval, so that the analysis quantity of the log is reduced, and the acquisition efficiency of the subsequent error reporting log is improved.
The extracting unit 114 extracts an error report log from the target log according to the feedback web page, where the error report log is a log generated when the feedback web page fails to run.
It should be emphasized that, to further ensure the privacy and security of the error log, the error log may also be stored in a node of a blockchain.
In at least one embodiment of the present invention, the error log refers to a log of user behavior that triggers the monitoring feedback packet to generate.
In at least one embodiment of the present invention, the extracting unit 114 extracts the error log from the target log according to the feedback web page includes:
extracting an execution object from the target log;
comparing the execution object with the feedback webpage;
and if the execution object is the same as the feedback webpage, determining a target log corresponding to the execution object as the error report log.
According to the embodiment, since the target log is generated by triggering in the time interval, the target log comprises the error report log, and the error report log can be accurately extracted from the target log according to the feedback webpage.
In at least one embodiment of the present invention, after extracting an error log from the target log according to the feedback web page, the extracting unit 114 extracts information indicating an entity from the error log as error reporting information;
the determining unit 112 determines a triggering user of the event monitoring request;
the determining unit 112 determines a terminal bound to the trigger user as a user terminal;
The transmitting unit 110 transmits the error reporting information to the user terminal.
Through the implementation manner, the comprehensive error reporting information can be obtained from the error reporting log, and then the comprehensive error reporting information can be sent to the user terminal for analysis by a user.
According to the technical scheme, the event monitoring request can be generated based on the preset event, and the event monitoring request is sent to the preset browser; receiving a monitoring feedback packet generated based on the event monitoring request; determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet; if the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet; screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time; and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run. According to the method and the device for monitoring the web page running on the preset browser, the web page running on the preset browser is further monitored through the generated event monitoring request, when the monitoring feedback packet is received, the feedback web page can be accurately determined from the monitoring feedback packet, further, the error report log corresponding to the feedback web page can be extracted from the trigger terminal, further, comprehensive error report information can be obtained from the error report log, and therefore positioning of production problems is facilitated.
Fig. 5 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing the front-end error log collection method.
In one embodiment of the invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions, such as a front-end error log collection program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and may include more or less components than illustrated, or may combine certain components, or different components, e.g. the electronic device 1 may further include input-output devices, network access devices, buses, etc.
The Processor 13 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor 13 is an operation core and a control center of the electronic device 1, connects various parts of the entire electronic device 1 using various interfaces and lines, and executes an operating system of the electronic device 1 and various installed applications, program codes, etc.
Illustratively, the computer readable instructions may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instructions capable of performing a specific function, the computer readable instructions describing a process of executing the computer readable instructions in the electronic device 1. For example, the computer readable instructions may be divided into a transmitting unit 110, a receiving unit 111, a determining unit 112, a screening unit 113, and an extracting unit 114.
The memory 12 may be used to store the computer readable instructions and/or modules, and the processor 13 may implement various functions of the electronic device 1 by executing or executing the computer readable instructions and/or modules stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. Memory 12 may include non-volatile and volatile memory, such as: a hard disk, memory, plug-in hard disk, smart memory card (SMART MEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one magnetic disk storage device, flash memory device, or other storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a physical memory, such as a memory bank, a TF card (Trans-FLASH CARD), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present invention may also be implemented by implementing all or part of the processes in the methods of the embodiments described above, by instructing the associated hardware by means of computer readable instructions, which may be stored in a computer readable storage medium, the computer readable instructions, when executed by a processor, implementing the steps of the respective method embodiments described above.
Wherein the computer readable instructions comprise computer readable instruction code which may be in the form of source code, object code, executable files, or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory).
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
In connection with fig. 1, the memory 12 in the electronic device 1 stores computer readable instructions for implementing a front-end error log collection method, and the processor 13 may execute the computer readable instructions to implement:
generating an event monitoring request based on a preset event, and sending the event monitoring request to a preset browser;
receiving a monitoring feedback packet generated based on the event monitoring request;
Determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet;
If the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet;
screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time;
and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
In particular, the specific implementation method of the processor 13 on the computer readable instructions may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The computer readable storage medium has stored thereon computer readable instructions, wherein the computer readable instructions when executed by the processor 13 are configured to implement the steps of:
generating an event monitoring request based on a preset event, and sending the event monitoring request to a preset browser;
receiving a monitoring feedback packet generated based on the event monitoring request;
Determining a feedback webpage according to the monitoring feedback packet, and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage generated by triggering the monitoring feedback packet;
If the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet;
screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time;
and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (9)

1. The front-end error report log acquisition method is characterized by comprising the following steps of:
generating an event monitoring request based on a preset event and sending the event monitoring request to a preset browser, wherein generating the event monitoring request based on the preset event comprises: acquiring a monitoring instruction template from an instruction template library, and determining the filling quantity of all filling events in the monitoring instruction template; determining a preset number of the preset events; processing all filling events in the monitoring instruction template based on the difference value between the filling quantity and the preset quantity to obtain a target template; determining filling positions of all filling events in the target template; writing the preset event into the filling position to obtain the event monitoring request;
receiving a monitoring feedback packet generated based on the event monitoring request;
Determining a feedback webpage according to the monitoring feedback packet, and determining feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage triggering the monitoring feedback packet to generate, and the feedback frequency is the frequency of the feedback webpage in the monitoring feedback packet;
If the feedback frequency is greater than the configuration value, determining the generation time of the monitoring feedback packet, and determining a triggering terminal of the monitoring feedback packet;
screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and preset time;
and extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
2. The method for collecting a front-end error log according to claim 1, wherein the sending the event monitoring request to a preset browser comprises:
Acquiring a device address of the electronic device, and acquiring a browser address of the preset browser;
Establishing a connection channel between the equipment address and the browser address;
And sending the event monitoring request to the preset browser through the connection channel.
3. The method for collecting a front-end error log according to claim 1, wherein determining a feedback web page according to the monitoring feedback packet comprises:
Analyzing the message of the monitoring feedback packet to obtain data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a webpage;
acquiring information corresponding to the preset tag from the data information as a webpage code;
and determining a webpage corresponding to the webpage code from a webpage mapping table as the feedback webpage.
4. The method for collecting the front-end error log according to claim 1, wherein determining the feedback frequency of the feedback web page comprises:
Determining a target feedback packet corresponding to each feedback webpage from the monitoring feedback packets;
acquiring the receiving time of the target feedback packet;
acquiring the time with the minimum value from the receiving time as a first time, and acquiring the time with the maximum value from the receiving time as a second time;
Determining the time difference between the second time and the first time to obtain target time;
Determining the feedback quantity of each feedback webpage according to the target feedback package;
dividing the feedback quantity by the target time to obtain the feedback frequency.
5. The method for collecting the front-end error log according to claim 1, wherein the step of screening the target log from the trigger terminal according to the generation time comprises:
taking the sum of the generation time and the preset time as a third time;
determining a time interval according to the generation time and the third time;
Acquiring all logs on the trigger terminal, and acquiring the log time of each log in all logs;
And determining the log with the log time in the time interval as the target log.
6. The method for collecting a front-end error log according to claim 1, wherein after extracting the error log from the target log according to the feedback web page, the method further comprises:
Extracting information indicating an entity from the error report log as error report information;
Determining a triggering user of the event monitoring request;
determining a terminal bound with the triggering user as a user terminal;
and sending the error reporting information to the user terminal.
7. A front-end error log collection device, characterized in that the device comprises means for implementing the front-end error log collection method according to any one of claims 1 to 6, the front-end error log collection device comprising:
the sending unit is used for generating an event monitoring request based on a preset event and sending the event monitoring request to a preset browser;
The receiving unit is used for receiving a monitoring feedback packet generated based on the event monitoring request;
The determining unit is used for determining a feedback webpage according to the monitoring feedback packet and determining the feedback frequency of the feedback webpage, wherein the feedback webpage is a webpage triggering the monitoring feedback packet to generate, and the feedback frequency is the frequency of the feedback webpage in the monitoring feedback packet;
the determining unit is further configured to determine a generation time of the monitoring feedback packet and determine a trigger terminal of the monitoring feedback packet if the feedback frequency is greater than a configuration value;
the screening unit is used for screening a target log from the trigger terminal according to the generation time, wherein the target log refers to a log with log time in a time interval, and the time interval is generated according to the generation time and a preset time;
the extraction unit is used for extracting an error report log from the target log according to the feedback webpage, wherein the error report log is generated when the feedback webpage fails to run.
8. An electronic device, the electronic device comprising:
a memory storing computer readable instructions; and
A processor executing computer readable instructions stored in the memory to implement the front-end error log collection method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized by: the computer readable storage medium has stored therein computer readable instructions that are executed by a processor in an electronic device to implement the front-end error log collection method of any one of claims 1 to 6.
CN202011601565.7A 2020-12-29 2020-12-29 Front-end error report log acquisition method, device, equipment and storage medium Active CN112685253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011601565.7A CN112685253B (en) 2020-12-29 2020-12-29 Front-end error report log acquisition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011601565.7A CN112685253B (en) 2020-12-29 2020-12-29 Front-end error report log acquisition method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112685253A CN112685253A (en) 2021-04-20
CN112685253B true CN112685253B (en) 2024-09-27

Family

ID=75454537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011601565.7A Active CN112685253B (en) 2020-12-29 2020-12-29 Front-end error report log acquisition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112685253B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490260B (en) * 2022-01-20 2024-08-27 中国平安人寿保险股份有限公司 System index generation method, device, proxy server and storage medium
CN115333929B (en) * 2022-07-14 2024-10-11 深圳市闪剪智能科技有限公司 Log early warning method based on cluster and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628741A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Webpage test method, device, electronic equipment and medium
CN112134865A (en) * 2020-09-15 2020-12-25 深圳市欢太科技有限公司 Log information reporting method, electronic equipment and readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8316046B2 (en) * 2010-04-07 2012-11-20 Apple Inc. Journaling on mobile devices
CN102684934B (en) * 2011-03-17 2015-02-04 阿里巴巴集团控股有限公司 Method and system for monitoring property of web application program and web server
KR20130123582A (en) * 2012-05-03 2013-11-13 (주)네오위즈게임즈 Method for monitoring log and server thereof, and recording medium
CN108334446A (en) * 2017-12-29 2018-07-27 五八有限公司 A kind of method of calibration of web page template, device and computer readable storage medium
CN109471976A (en) * 2018-11-07 2019-03-15 北京字节跳动网络技术有限公司 Method, device, electronic device and storage medium for processing web page operation data
CN111752793B (en) * 2020-05-27 2024-11-26 中国平安财产保险股份有限公司 System abnormality monitoring method, device, computer equipment and storage medium
CN111897713A (en) * 2020-06-22 2020-11-06 广州市玄武无线科技股份有限公司 Friendly prompt method and system based on PAAS platform front-end engine abnormity

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628741A (en) * 2018-04-10 2018-10-09 平安科技(深圳)有限公司 Webpage test method, device, electronic equipment and medium
CN112134865A (en) * 2020-09-15 2020-12-25 深圳市欢太科技有限公司 Log information reporting method, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112685253A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN114035827B (en) Application program updating method, device, equipment and storage medium
CN112433705A (en) Script generation method and device, electronic equipment and storage medium
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN112181485B (en) Script execution method and device, electronic equipment and storage medium
CN113050900B (en) Screen sharing method, device, equipment and storage medium
CN112948418A (en) Dynamic query method, device, equipment and storage medium
CN112685253B (en) Front-end error report log acquisition method, device, equipment and storage medium
CN112817742B (en) Data migration method, device, equipment and storage medium
CN113778442A (en) System menu generating method, device, equipment and storage medium
CN116360769A (en) Code generation method, device, equipment and storage medium
CN111857883A (en) Page data checking method and device, electronic equipment and storage medium
CN114003784A (en) Request recording method, device, equipment and storage medium
CN114942749A (en) Development method, device and equipment of approval system and storage medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN113760696B (en) A program problem locating method, device, electronic device and storage medium
CN112711696A (en) Request access method, device, electronic equipment and storage medium
CN112134968A (en) Domain name access method and device, electronic equipment and storage medium
CN111680483A (en) Document template update method, device, electronic device and medium
CN114490262B (en) Database monitoring method, device, equipment and storage medium
CN112738175B (en) Request processing method and related equipment
CN116594983A (en) Database performance test method, device, equipment and storage medium
CN116628005A (en) Structured query statement processing method, device, equipment and storage medium
CN113064802B (en) Operation track restoration method, device, equipment and storage medium
CN114610386A (en) Interaction method, device, equipment and storage medium of H5 and application program

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
TA01 Transfer of patent application right

Effective date of registration: 20240821

Address after: 4106, Building D1, Kexing Science Park, No. 15 Keyuan Road, Science Park Community, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 518000

Applicant after: Shenzhen Shenquan Interactive Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant