CN114006891A - Information reporting method, device, equipment and storage medium - Google Patents

Information reporting method, device, equipment and storage medium Download PDF

Info

Publication number
CN114006891A
CN114006891A CN202111265070.6A CN202111265070A CN114006891A CN 114006891 A CN114006891 A CN 114006891A CN 202111265070 A CN202111265070 A CN 202111265070A CN 114006891 A CN114006891 A CN 114006891A
Authority
CN
China
Prior art keywords
information
time
reporting
frame
idle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111265070.6A
Other languages
Chinese (zh)
Other versions
CN114006891B (en
Inventor
柴瑞雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shenzhou Digital Cloud Information Technology Co ltd
Shenzhou Kuntai Xiamen Information Technology Co ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202111265070.6A priority Critical patent/CN114006891B/en
Publication of CN114006891A publication Critical patent/CN114006891A/en
Application granted granted Critical
Publication of CN114006891B publication Critical patent/CN114006891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of data processing, and discloses a method, a device, equipment and a storage medium for reporting information, wherein the method comprises the steps of obtaining log information to be reported in a target browser, respectively packaging each log information into an execution unit, and storing the log information into a cache library; combining each execution unit according to a preset arrangement sequence to form single linked list information; calling a preset monitoring interface, reading frame information of a target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time; after the idle time is entered, calling a reporting function to select log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is finished; therefore, the problem of display delay during information reporting is avoided.

Description

Information reporting method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for reporting information.
Background
In the field of Web front ends, when a front-end page is loaded for the First time, a browser needs to request various static file resources, initiate a request of a First-screen data interface, render a page animation, and the like, and at this time, for a front-end monitoring system, it is also necessary to acquire, through the browser, abnormal information such as performance indexes of FMP (First meaningfull Paint, First effective drawing) \ LCP (large content drawing) \ FPS (Frames Per Second, frame rate), white screen, stuck, code errors, resource loading errors, interface errors, and the like. However, as the functions of front-end pages are more and more, the environment of the local browser of the user is complicated, and when the project becomes more and more complicated and the reported information becomes numerous and huge, the performance of the page is influenced, such as delayed screen display, pause and the like, which influences the user experience.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a device and a storage medium for reporting information, and aims to solve the problem of display delay occurring when information is reported in the prior art.
In order to achieve the above object, the present application provides an information reporting method, where the method includes:
acquiring log information to be reported in a target browser, respectively packaging each piece of log information into an execution unit, and storing the log information into a cache library;
combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information;
calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time;
and after the idle time is entered, calling a reporting function to select the log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is ended.
Further, the determining whether the frame information meets a preset idle condition, and taking a time when the frame information meets the idle condition as an initial time includes:
acquiring the execution time of each frame according to the frame information;
if the execution time is smaller than a preset time threshold value, judging that the current frame information meets the idle condition;
and taking the appearance moment corresponding to the frame with the execution time smaller than the preset time threshold value as the starting time.
Further, the combining forms singly linked list information, including:
setting an execution node for each execution unit respectively, wherein each execution node comprises a pointer and at least one data element;
and combining the execution nodes according to the arrangement sequence and then storing the combination into the cache library again.
Further, the encapsulating each piece of the log information into an execution unit respectively includes:
and identifying a data structure of the log information, and packaging the log information according to the data structure.
Further, the determining whether the frame information meets a preset idle condition includes:
and identifying a frame rate carried in the frame information, and judging that the frame information meets the idle condition when the frame rate is greater than a preset frame threshold.
Further, the storing into the cache library includes:
sending a cache request to a cloud server, and sending the execution unit to the cache library of the cloud server after receiving cache confirmation information returned by the cloud server;
and acquiring the storage address of each execution unit, and storing the storage address in a leaf node of a hash tree in the cache bank.
The present application further provides an apparatus for reporting information, including:
the execution unit generation module is used for acquiring the log information to be reported in the target browser, respectively packaging each piece of the log information into an execution unit and storing the execution unit into the cache library;
the single linked list generating module is used for combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information;
the idle calculation module is used for calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition or not, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking the continuous time between the starting time and the ending time as idle time;
and the log reporting module is used for calling a reporting function to select the log information from the single linked list information for reporting after the idle time is entered, and stopping calling the reporting function after the idle time is finished.
The present application further proposes a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
The present application also proposes a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
According to the information reporting method, the device, the equipment and the storage medium, log information is collected and packaged uniformly, each log information is packaged into an execution unit so as to be reported conveniently, and the execution units are stored in the cache, so that the problem that the log information interrupts the execution process of other tasks is solved; the execution units formed by the log information are subjected to data arrangement processing through a single linked list mode, so that the adjustability of the log reporting sequence is improved, and the log information which needs to be reported more can be reported preferentially; by acquiring the frame information of the target browser and accurately identifying the idle time of the target browser according to the frame information, the accuracy of judging the working state of the target browser is improved; after the idle time is reached, the reporting function is called to select the log information from the single linked list information for reporting, and the reporting function is stopped to be called after the idle time is finished, so that the target browser can preferentially process user interaction and page rendering, the quick response of the page on the sense of the user is realized, and the reporting is stopped after the idle time is finished, so that the timeliness of the execution of the subsequent user interaction and page rendering functions is improved, and the problem of display delay or blockage of the target browser is avoided.
Drawings
Fig. 1 is a schematic flow chart illustrating a method for reporting information according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for reporting information according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a structure of an information reporting apparatus according to an embodiment of the present application;
fig. 4 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, in order to achieve the purpose of the foregoing embodiments, the present application provides an information reporting method, where the method includes:
s1: acquiring log information to be reported in a target browser, respectively packaging each piece of log information into an execution unit, and storing the log information into a cache library;
s2: combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information;
s3: calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time;
s4: and after the idle time is entered, calling a reporting function to select the log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is ended.
In the embodiment, the log information is uniformly collected and packaged, each piece of log information is packaged into one execution unit for reporting, and the execution units are stored in the cache, so that the problem that the log information interrupts the execution process of other tasks is solved; the execution units formed by the log information are subjected to data arrangement processing through a single linked list mode, so that the adjustability of the log reporting sequence is improved, and the log information which needs to be reported more can be reported preferentially; by acquiring the frame information of the target browser and accurately identifying the idle time of the target browser according to the frame information, the accuracy of judging the working state of the target browser is improved; after the idle time is reached, the reporting function is called to select the log information from the single linked list information for reporting, and the reporting function is stopped to be called after the idle time is finished, so that the target browser can preferentially process user interaction and page rendering, the quick response of the page on the sense of the user is realized, and the reporting is stopped after the idle time is finished, so that the timeliness of the execution of the subsequent user interaction and page rendering functions is improved, and the problem of display delay or blockage of the target browser is avoided.
As for step S1, the present embodiment is applied to the application of computer data processing, particularly processing of log information. With the development of the field of the front end of the Web, the browser is used as a front end page, more and more functions are needed to be executed, log information needing to be reported to a monitoring system is increased, if the log information is directly reported after being generated, the browser cannot preferentially execute other tasks triggered by a user, and therefore the problems that the display screen of the browser is discontinuous and the like are caused, and the use experience of the user is influenced are caused. In the embodiment, by uniformly collecting and packaging the log information, each piece of log information is packaged into one execution unit for reporting, and the execution units are stored in the cache, so that the problem that the log information interrupts the execution process of other tasks is solved.
For step S2, before reporting is completed, the execution units corresponding to each piece of log information to be reported are arranged according to a preset arrangement order, where the arrangement order may be a priority order, or a generation time order, and the like; the single linked list information is a chained access data structure, and a group of addresses are used in a cache to linearly store execution units in the single linked list information, so that chained data storage and reading can be supported; in the embodiment, the execution units formed by the log information are subjected to data arrangement processing through the single linked list mode, so that the adjustability of the log reporting sequence is improved, and the log information which needs to be reported more can be preferentially reported.
For step S3, in order to not interrupt the response of the target browser to the normal instruction of the user instruction, a mode of detecting frame information of the target browser is adopted, where the frame information may be a frame rate or a frame task completion time; taking the frame rate as an example, when the target browser plays a video or processes other functions, the frame rate is usually changed along with the change of the display screen, so that when the frame rate is higher, it often means that the target browser is in a working state of rendering animation or jumping to a screen, and when the frame rate is lower, it often means that the target browser is in an idle state; therefore, the moment when the frame information meets the idle condition is used as the starting time, the moment when the frame information does not meet the idle condition is used as the ending time, and the time interval is used as the idle time of the target browser. In the embodiment, the frame information of the target browser is obtained, and the idle time of the target browser is accurately identified according to the frame information, so that the accuracy of judging the working state of the target browser is improved.
For step S4, after entering the idle time, the browser can execute background and low-priority work on the main event loop by calling the reporting function requestIdleCallback without affecting the delay of key events, such as animation and input response, and in a specific implementation manner, when a user input event occurs or animation occurs, the browser can preferentially process user interaction and page rendering, wait until the next idle time occurs, and then perform task reporting of the next execution unit, thereby implementing fast response of the page on the user sense, and when the idle time ends, stop calling the requestIdleCallback function, thereby avoiding affecting the target browser to execute new rendering or display instructions. In the embodiment, after the idle time is reached, the reporting function is called to select the log information from the single linked list information for reporting, and the reporting function is stopped to be called after the idle time is finished, so that the target browser can preferentially process user interaction and page rendering, the quick response of the page on the user sense is realized, and the reporting is stopped after the idle time is finished, so that the timeliness of the execution of the subsequent user interaction and page rendering functions is improved.
In one embodiment, the determining whether the frame information meets a preset idle condition, and taking a time when the frame information meets the idle condition as a start time includes:
s31: acquiring the execution time of each frame according to the frame information;
s32: if the execution time is smaller than a preset time threshold value, judging that the current frame information meets the idle condition;
s33: and taking the appearance moment corresponding to the frame with the execution time smaller than the preset time threshold value as the starting time.
According to the method and the device, whether the target browser is in the idle time currently is judged according to the frame information, so that the problem that the normal display function of the target browser is interrupted due to log reporting in non-idle time is avoided, and the problem of display delay or blockage of the target browser is avoided.
For step S31, the screen refresh rate of most current devices is 60 times/second, and the rate at which the browser renders each frame of animation or page also needs to be consistent with the refresh rate of the device screen. When the number of frames drawn per second reaches 60, the page is fluent, and below this value, the user feels stuck. The beginning of each frame includes style computation, layout, and rendering. The Javascript engine and the page rendering engine are in the same rendering thread, and the GUI rendering and the Javascript execution are mutually exclusive. In practice, however, developers often want browsers to respond quickly to users, feel fast enough, and cannot block user interaction. Reporting the idle time of each frame of the browser through the requestIdleCallback, and delivering the controller to the browser when the starting time of the idle time is reached.
For step S32, since requestIdleCallback enables the browser to perform background and low priority work on the main event loop without affecting delay critical events such as animation and input response. After the normal frame task is completed, the preset time threshold is not exceeded, which indicates that there is a time margin, and the task registered in requestIdleCallback is executed at this time, wherein the preset time threshold may be 16 ms.
In one embodiment, the combining forms singly linked list information, including:
s21: setting an execution node for each execution unit respectively, wherein each execution node comprises a pointer and at least one data element;
s22: and combining the execution nodes according to the arrangement sequence and then storing the combination into the cache library again.
In the embodiment, the execution unit is formed by setting the execution nodes comprising the pointers and the data elements, so that different data elements are positioned through the pointers, and the single linked list sorting is performed, thereby improving the ordering of data.
For step S21, the data in the linked list is represented by nodes, each node consisting of: an element (a map of data elements) + a pointer (indicating the storage location of the successor element), an element being the storage location where the data is stored, and a pointer being the address data connecting each node. Expressing a linear table as a "sequence of nodes" is called a linear linked list (singly linked list), which is a structure for storing and reading data in a chain. The linear table stored in the link mode is referred to as a linked list (linkedlst) for short. The specific storage of the linked list is represented as: firstly, a group of arbitrary storage units is used for storing the nodes of the linear table (the group of storage units can be continuous or discontinuous), and secondly, the logical order and the physical order of the nodes in the linked list are not necessarily the same. In order to correctly represent the logical relationship between nodes, it is necessary to store address (or location) information (called pointer (pointer) or chain (link)) indicating the node following each node while storing each node value, and the chain storage is one of the most common storage methods, and it can be used to represent not only linear tables but also various non-linear data structures. The linked list links n nodes of the linear table together in their logical order through the chain domain of each node, and the linked list in which each node has only one chain domain is called a single chain (singlelinkedlst). The head pointer head and the storage address of each node in the terminal node single-chain list are stored in the next field of the predecessor node, and the starting node has no predecessor, so the head pointer head should be set to point to the starting node. The linked list is uniquely defined by a head pointer and the singly linked list may be named by the name of the head pointer. The terminal node has no successor, so the pointer field of the terminal node is NULL, i.e. NULL.
In one embodiment, the encapsulating each piece of the log information into one execution unit respectively includes:
s11: and identifying a data structure of the log information, and packaging the log information according to the data structure.
According to the embodiment, the log information is packaged according to the data structure by identifying the data structure of the log information, so that the monitoring system can directly identify the type of the log information according to the execution unit, and the identification efficiency is improved.
For step S11, the log information generally corresponds to logs of different functions, for example, the Redo log is a Redo log, the Redo log belongs to a log of the InnoDB engine, and the Undo log is a logical log and a rollback log.
In one embodiment, the determining whether the frame information satisfies a preset idle condition includes:
s34: and identifying a frame rate carried in the frame information, and judging that the frame information meets the idle condition when the frame rate is greater than a preset frame threshold.
In the embodiment, the frame rate threshold is used as an idle condition, and whether the target browser is in an idle state at present is judged through the frame rate carried in the frame information, so that the idle time can be accurate to a frame, and the accuracy of idle time judgment is improved.
For step S41, when the front-end page is loaded for the first time, the browser needs to request various static file resources, initiate a first-screen data interface request, render a page animation, and the like, and at this time, for the front-end monitoring system, it also needs to acquire, through the browser, abnormal information such as performance indexes such as FMP \ LCP \ FP \ FCP \ FLD, white screen, stuck, and code errors, resource loading errors, interface errors, and the like. When projects become more and more complex and reported information becomes more and more huge, page performance is influenced, such as delay of first screen display, blockage and the like, user experience is influenced, the frame rate of a target browser is often higher at the moment, and when the target browser is in an idle state, the frame rate is lower, so that timing can be started at the moment when the frame rate is lower than a threshold value, and the moment is used as the starting moment of idle time.
In one embodiment, the storing into a cache library comprises:
s12: sending a cache request to a cloud server, and sending the execution unit to the cache library of the cloud server after receiving cache confirmation information returned by the cloud server;
s13: and acquiring the storage address of each execution unit, and storing the storage address in a leaf node of a hash tree in the cache bank.
In the embodiment, the execution unit is stored in the cache library of the cloud server, and the execution unit is synchronized to other cloud cache clusters through the cloud server, so that the problem that log information is lost due to the fact that a local server fails is solved, and the data security is improved.
For step S12, the execution unit data is cached in the cloud server, so that the storage resource of the local server can be released, thereby improving the data analysis performance of the local server. In addition, the data are synchronized to other server caches through the cloud server, the consistency of the data is ensured, and the problem that the data at a certain end is tampered by viruses or malicious programs to cause data abnormity is solved.
For step S13, in this embodiment, the hash tree leaf node records a storage location of the execution unit in the redis cache service, so as to serve as a data index to facilitate data lookup, thereby improving traceability of data.
In an embodiment, the obtaining log information to be reported in the target browser S1 includes:
s14: monitoring the target browser according to a preset time interval, and extracting the reported information of the target browser according to an event identifier;
s15: identifying the generation time of each piece of reported information, and acquiring the reported content corresponding to the reported information with the same generation time;
s16: and judging whether the report information with the same generation time and the same report content exists, and if so, combining the report information with the same generation time and the same report content to form the log information.
In the embodiment, the target browser is monitored according to a certain time interval, so that the problem that communication resources are occupied due to frequent visiting is avoided, and the repeated data is eliminated by combining the report information with the same generation time and report content.
For step S14, the time interval may be 1S, 2S, 5S, and the like, and the specific data may be set according to the running state of the actual target browser, so as to improve the effectiveness of monitoring and avoid the problem of resource waste caused by invalid occupation of communication resources.
For step S15, in a specific application, if a network anomaly or a virus attack occurs in the target browser, the problem of repeated submission of log information may occur, and the abnormally repeated log information can be accurately identified by the generation time and the reported content, so that the removal of the repeated content is realized, and the accuracy of the reported log information is improved.
Referring to fig. 3, the present application further provides an information reporting apparatus, including:
the execution unit generation module 100 is configured to obtain log information to be reported in a target browser, package each piece of the log information into one execution unit, and store the execution unit in a cache library;
a single linked list generating module 200, configured to combine each execution unit in the cache library according to a preset arrangement order to form single linked list information;
an idle calculation module 300, configured to invoke a preset monitoring interface, read frame information of the target browser, determine whether the frame information meets a preset idle condition, use a time when the frame information meets the idle condition as a start time, use a time when the frame information does not meet the idle condition as an end time, and use a consecutive time between the start time and the end time as an idle time;
and a log reporting module 400, configured to call a reporting function to select the log information from the single-linked list information for reporting after the idle time is entered, and stop calling the reporting function after the idle time is finished.
In the embodiment, the log information is uniformly collected and packaged, each piece of log information is packaged into one execution unit for reporting, and the execution units are stored in the cache, so that the problem that the log information interrupts the execution process of other tasks is solved; the execution units formed by the log information are subjected to data arrangement processing through a single linked list mode, so that the adjustability of the log reporting sequence is improved, and the log information which needs to be reported more can be reported preferentially; by acquiring the frame information of the target browser and accurately identifying the idle time of the target browser according to the frame information, the accuracy of judging the working state of the target browser is improved; after the idle time is reached, the reporting function is called to select the log information from the single linked list information for reporting, and the reporting function is stopped to be called after the idle time is finished, so that the target browser can preferentially process user interaction and page rendering, the quick response of the page on the sense of the user is realized, and the reporting is stopped after the idle time is finished, so that the timeliness of the execution of the subsequent user interaction and page rendering functions is improved, and the problem of display delay or blockage of the target browser is avoided.
In one embodiment, the idle calculation module 300 is further configured to:
acquiring the execution time of each frame according to the frame information;
if the execution time is smaller than a preset time threshold value, judging that the current frame information meets the idle condition;
and taking the appearance moment corresponding to the frame with the execution time smaller than the preset time threshold value as the starting time.
In one embodiment, the singly linked list generating module 200 is further configured to:
setting an execution node for each execution unit respectively, wherein each execution node comprises a pointer and at least one data element;
and combining the execution nodes according to the arrangement sequence and then storing the combination into the cache library again.
In one embodiment, the execution unit generation module 100 is further configured to:
and identifying a data structure of the log information, and packaging the log information according to the data structure.
In one embodiment, the idle calculation module 300 is further configured to:
and identifying a frame rate carried in the frame information, and judging that the frame information meets the idle condition when the frame rate is greater than a preset frame threshold.
In one embodiment, the execution unit generation module 100 is further configured to:
sending a cache request to a cloud server, and sending the execution unit to the cache library of the cloud server after receiving cache confirmation information returned by the cloud server;
and acquiring the storage address of each execution unit, and storing the storage address in a leaf node of a hash tree in the cache bank.
In an embodiment, the log reporting module 400 is further configured to:
monitoring the target browser according to a preset time interval, and extracting the reported information of the target browser according to an event identifier;
identifying the generation time of each piece of reported information, and acquiring the reported content corresponding to the reported information with the same generation time;
and judging whether the report information with the same generation time and the same report content exists, and if so, combining the report information with the same generation time and the same report content to form the log information.
Referring to fig. 4, a computer device, which may be a server and whose internal structure may be as shown in fig. 4, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer equipment is used for storing data such as information reporting methods and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for reporting information. The information reporting method comprises the following steps: acquiring log information to be reported in a target browser, respectively packaging each piece of log information into an execution unit, and storing the log information into a cache library; combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information; calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time; and after the idle time is entered, calling a reporting function to select the log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is ended.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for reporting information, and the method includes: acquiring log information to be reported in a target browser, respectively packaging each piece of log information into an execution unit, and storing the log information into a cache library; combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information; calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time; and after the idle time is entered, calling a reporting function to select the log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is ended.
In the method for reporting executed information, each piece of log information is packaged into one execution unit for reporting conveniently by uniformly collecting and packaging the log information, and the execution units are stored in the cache, so that the problem that the log information interrupts the execution process of other tasks is solved; the execution units formed by the log information are subjected to data arrangement processing through a single linked list mode, so that the adjustability of the log reporting sequence is improved, and the log information which needs to be reported more can be reported preferentially; by acquiring the frame information of the target browser and accurately identifying the idle time of the target browser according to the frame information, the accuracy of judging the working state of the target browser is improved; after the idle time is reached, the reporting function is called to select the log information from the single linked list information for reporting, and the reporting function is stopped to be called after the idle time is finished, so that the target browser can preferentially process user interaction and page rendering, the quick response of the page on the sense of the user is realized, and the reporting is stopped after the idle time is finished, so that the timeliness of the execution of the subsequent user interaction and page rendering functions is improved, and the problem of display delay or blockage of the target browser is avoided.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method for reporting information is characterized in that the method comprises the following steps:
acquiring log information to be reported in a target browser, respectively packaging each piece of log information into an execution unit, and storing the log information into a cache library;
combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information;
calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking coherent time between the starting time and the ending time as idle time;
and after the idle time is entered, calling a reporting function to select the log information from the single linked list information for reporting, and stopping calling the reporting function after the idle time is ended.
2. The method according to claim 1, wherein the determining whether the frame information satisfies a preset idle condition, and taking a time when the frame information satisfies the idle condition as a start time includes:
acquiring the execution time of each frame according to the frame information;
if the execution time is smaller than a preset time threshold value, judging that the current frame information meets the idle condition;
and taking the appearance moment corresponding to the frame with the execution time smaller than the preset time threshold value as the starting time.
3. The method according to claim 1, wherein the combining forms a single-linked list information, and includes:
setting an execution node for each execution unit respectively, wherein each execution node comprises a pointer and at least one data element;
and combining the execution nodes according to the arrangement sequence and then storing the combination into the cache library again.
4. A method for reporting information as claimed in claim 1, wherein the step of encapsulating each piece of the log information into an execution unit respectively includes:
and identifying a data structure of the log information, and packaging the log information according to the data structure.
5. The method for reporting information according to claim 1, wherein the determining whether the frame information satisfies a preset idle condition includes:
and identifying a frame rate carried in the frame information, and judging that the frame information meets the idle condition when the frame rate is greater than a preset frame threshold.
6. The method for reporting information according to claim 1, wherein the storing in a cache library includes:
sending a cache request to a cloud server, and sending the execution unit to the cache library of the cloud server after receiving cache confirmation information returned by the cloud server;
and acquiring the storage address of each execution unit, and storing the storage address in a leaf node of a hash tree in the cache bank.
7. The method according to claim 1, wherein the acquiring log information to be reported in the target browser includes:
monitoring the target browser according to a preset time interval, and extracting the reported information of the target browser according to an event identifier;
identifying the generation time of each piece of reported information, and acquiring the reported content corresponding to the reported information with the same generation time;
and judging whether the report information with the same generation time and the same report content exists, and if so, combining the report information with the same generation time and the same report content to form the log information.
8. An apparatus for reporting information, comprising:
the execution unit generation module is used for acquiring the log information to be reported in the target browser, respectively packaging each piece of the log information into an execution unit and storing the execution unit into the cache library;
the single linked list generating module is used for combining each execution unit in the cache library according to a preset arrangement sequence to form single linked list information;
the idle calculation module is used for calling a preset monitoring interface, reading frame information of the target browser, judging whether the frame information meets a preset idle condition or not, taking the moment when the frame information meets the idle condition as a starting time, taking the moment when the frame information does not meet the idle condition as an ending time, and taking the continuous time between the starting time and the ending time as idle time;
and the log reporting module is used for calling a reporting function to select the log information from the single linked list information for reporting after the idle time is entered, and stopping calling the reporting function after the idle time is finished.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111265070.6A 2021-10-28 2021-10-28 Information reporting method, device, equipment and storage medium Active CN114006891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111265070.6A CN114006891B (en) 2021-10-28 2021-10-28 Information reporting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111265070.6A CN114006891B (en) 2021-10-28 2021-10-28 Information reporting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114006891A true CN114006891A (en) 2022-02-01
CN114006891B CN114006891B (en) 2024-05-17

Family

ID=79924680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111265070.6A Active CN114006891B (en) 2021-10-28 2021-10-28 Information reporting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114006891B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378802A (en) * 2022-08-24 2022-11-22 深圳市晨北科技有限公司 Log collection method, device and equipment and computer readable storage medium
WO2024060867A1 (en) * 2022-09-22 2024-03-28 深圳Tcl新技术有限公司 Webpage index information acquisition method and apparatus, computer device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109802992A (en) * 2018-12-10 2019-05-24 视联动力信息技术股份有限公司 A kind of method and apparatus of change in resources log read-write
CN110390063A (en) * 2019-07-03 2019-10-29 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
CN110546632A (en) * 2017-09-29 2019-12-06 谷歌有限责任公司 Scanning for bindings in web page markup
CN111309574A (en) * 2020-02-17 2020-06-19 北京百度网讯科技有限公司 Information processing method, device and equipment
CN113037846A (en) * 2021-03-17 2021-06-25 成都新希望金融信息有限公司 Data reporting method and device, electronic equipment and computer readable storage medium
CN113139891A (en) * 2021-04-28 2021-07-20 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110546632A (en) * 2017-09-29 2019-12-06 谷歌有限责任公司 Scanning for bindings in web page markup
CN109802992A (en) * 2018-12-10 2019-05-24 视联动力信息技术股份有限公司 A kind of method and apparatus of change in resources log read-write
CN110390063A (en) * 2019-07-03 2019-10-29 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
CN111309574A (en) * 2020-02-17 2020-06-19 北京百度网讯科技有限公司 Information processing method, device and equipment
CN113037846A (en) * 2021-03-17 2021-06-25 成都新希望金融信息有限公司 Data reporting method and device, electronic equipment and computer readable storage medium
CN113139891A (en) * 2021-04-28 2021-07-20 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378802A (en) * 2022-08-24 2022-11-22 深圳市晨北科技有限公司 Log collection method, device and equipment and computer readable storage medium
WO2024060867A1 (en) * 2022-09-22 2024-03-28 深圳Tcl新技术有限公司 Webpage index information acquisition method and apparatus, computer device, and storage medium

Also Published As

Publication number Publication date
CN114006891B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN110941528B (en) Log buried point setting method, device and system based on fault
CN110069297B (en) SPRING MVC-based exception handling method, SPRING MVC-based exception handling device, computer equipment and storage medium
CN114006891A (en) Information reporting method, device, equipment and storage medium
CN108415804B (en) Method for acquiring information, terminal device and computer readable storage medium
CN103647794A (en) Data correlation method based on J2EE platform and correlation plug-in
CN109086183B (en) Application program monitoring method and device, electronic equipment and storage medium
CN110737892B (en) Detection method aiming at APC injection and related device
CN110750443B (en) Webpage testing method, device, computer equipment and storage medium
CN110471832B (en) Processing method and device for program running and computer readable storage medium
CN111930472B (en) Code debugging method and device, electronic equipment and storage medium
CN110175099B (en) Interface change prompting method and device, computer equipment and storage medium
CN112685745B (en) Firmware detection method, device, equipment and storage medium
CN112416794A (en) Method, device and equipment for processing code coverage rate and storage medium
CN112631701A (en) Page request method and device, computer equipment and storage medium
KR102242219B1 (en) Method and device for preventing the server from being attacked
CN114328073A (en) Thread monitoring method, device, equipment and storage medium
CN114189559A (en) Interface repeat request processing method and system based on Axios
CN109740386B (en) Method and device for detecting static resource file
CN111538483B (en) Data processing method, device, server and readable storage medium
CN116304458B (en) Method, device, equipment and medium for web page real-time notification update
CN112445706A (en) Program abnormal code acquisition method and device, electronic equipment and storage medium
CN114218188A (en) Data migration method, device, equipment and storage medium
CN111488230A (en) Method and device for modifying log output level, electronic equipment and storage medium
CN110020268B (en) Page returning method and device
CN112148428A (en) Java virtual machine memory monitoring method, computer equipment and storage medium

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: 20240423

Address after: Room 301, 3rd floor, 9 shangdijiu street, Haidian District, Beijing

Applicant after: Beijing Shenzhou Digital Cloud Information Technology Co.,Ltd.

Country or region after: China

Applicant after: Shenzhou Kuntai (Xiamen) Information Technology Co.,Ltd.

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