CN113569168A - Page performance data generation method and device, computer storage medium and terminal - Google Patents

Page performance data generation method and device, computer storage medium and terminal Download PDF

Info

Publication number
CN113569168A
CN113569168A CN202110672210.5A CN202110672210A CN113569168A CN 113569168 A CN113569168 A CN 113569168A CN 202110672210 A CN202110672210 A CN 202110672210A CN 113569168 A CN113569168 A CN 113569168A
Authority
CN
China
Prior art keywords
page
node
performance
time
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110672210.5A
Other languages
Chinese (zh)
Inventor
陈未
张浩男
籍文兵
沈鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Absolute Health Ltd
Original Assignee
Beijing Absolute Health 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 Beijing Absolute Health Ltd filed Critical Beijing Absolute Health Ltd
Priority to CN202110672210.5A priority Critical patent/CN113569168A/en
Publication of CN113569168A publication Critical patent/CN113569168A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • 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/957Browsing optimisation, e.g. caching or content distillation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for generating page performance data, a computer storage medium and a terminal, relates to the technical field of H5 webpage processing, and mainly solves the problems that the processing efficiency of the page performance data is low and the generation requirement of the page performance data cannot be met. The method comprises the following steps: when a user page access request is detected, acquiring node time of tracking and recording a page to generate network basic data and/or user access data; storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes; responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting. The method is mainly used for generating page performance data.

Description

Page performance data generation method and device, computer storage medium and terminal
Technical Field
The invention relates to the technical field of H5 webpage processing, in particular to a method and a device for generating page performance data, a computer storage medium and a terminal.
Background
With the rapid development of internet technology, the introduction of H5 pages into different developed APP products and web products by internet enterprises has become a mainstream project development trend. In order to save users using different products, internet enterprises can greatly improve the performance of the H5 page, thereby introducing more users.
At present, basic data such as network connection duration, page rendering completion time, resource downloading time and the like are only acquired through one end of a browser in the conventional generation of page performance data in an H5 page, and then statistical processing of interactive response time is performed, however, the situation that a user generates real operation on the page exists in the page performance data obtained through statistical processing of the basic data acquired through one end of the browser, so that the page performance data is too rigid to be processed, and real page performance data cannot be obtained.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is that the processing of the page performance data is too rigid, the real page performance data cannot be obtained, and the accuracy of the page performance data in the characteristic dimension of a user can be reduced only by counting at one end of a browser, so that the generation requirement of the page performance data cannot be met.
According to an aspect of the present invention, a method for generating page performance data is provided, including:
when a user page access request is detected, acquiring node time of tracking and recording a page to generate network basic data and/or user access data;
storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes;
responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting.
Further, before the node time when the trace record page generates the network basic data and/or the user access data, the method further comprises:
determining at least one trigger node generating network basic data and/or user access data based on the process information of the page access;
configuring a trace event for the triggering node such that a node time is recorded upon arrival at the triggering node based on the trace event.
Further, before the determining at least one trigger node generating the network basic data and/or the user access data based on the process information of the page access, the method further includes:
acquiring page service demand information, and analyzing a demand node of the page service demand information, wherein the page service demand information is used for representing the content of performance data processing demand generated based on different page services;
and configuring a basic performance node and a target page performance node in the performance nodes according to the demand node, wherein the basic performance node at least comprises one of a transmission protocol establishing node, a domain name resolution node, a page resource downloading node, a page script running node and a page document object model resolution node, and the target page performance node at least comprises one of a page visible operable node, a page arrival node, a page routing node and a page component rendering node.
Further, the page performance data matched with the performance node to be processed carried in the output request based on the stored node time statistics includes:
if the performance node to be processed is a page visible operable node, extracting the page first loading time and the page first rendering completion time in the node time, and determining that the page visible operable performance is consumed time according to the difference value of the page first loading time and the page first rendering completion time; and/or the presence of a gas in the gas,
if the performance node to be processed is a page routing node, extracting the page routing entry time and the page routing exit time in the node time, and determining that the page routing performance consumes time according to the difference value of the page routing entry time and the page routing exit time; and/or the presence of a gas in the gas,
if the performance node to be processed is a page component rendering node, extracting the time before creation and the time after creation of a page life cycle function in the node time, and determining the time consumed by the rendering performance of the page component according to the difference value of the time before creation and the time after creation; and/or the presence of a gas in the gas,
if the performance node to be processed is a page arrival node, extracting a first user amount and a second user amount requesting page access, which have node time corresponding to page address loading and/or page content rendering, in the node time, calculating a ratio of the first user amount to the second user amount according to a preset time interval, and determining the ratio as a page arrival rate.
Further, the obtaining the node time of the trace record page for generating the network basic data and/or the user access data comprises:
when any one of user identification, page access time and page access address is detected to be recorded in real time based on the proxy server, judging whether the trigger node is reached;
and if the trigger node is reached, recording the node time of the network basic data and/or the user access data based on the tracking event.
Further, the configuring a trace event for the trigger node includes:
and if the trigger node is a page address loading node, configuring the tracking event at the node where the completion of the downloading of the page resource is detected and the page script is not executed, so that the node time before the completion of the downloading of the page resource and the execution of the page script is taken as the page address loading time.
Further, the storing the node time of the network basic data and/or the user access data according to the configured performance node comprises:
and classifying the node time of the network basic data and/or the user access data according to different user identifications or different page identifications, and storing the classified node time into a database matched with the performance node.
According to another aspect of the present invention, there is provided a page performance data generating apparatus, including:
the acquisition module is used for acquiring node time of tracking and recording a page to generate network basic data and/or user access data after detecting a user page access request;
the storage module is used for storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes determined based on user operation behaviors;
and the counting module is used for responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting the page performance data.
Further, the apparatus further comprises:
the determining module is used for determining at least one trigger node for generating network basic data and/or user access data based on the process information of page access;
a configuration module, configured to configure a trace event for the trigger node, so that a node time is recorded based on the trace event when the trigger node is reached.
Further, the apparatus further comprises: an analysis module for analyzing the received data,
the analysis module is used for acquiring page service demand information and analyzing demand nodes of the page service demand information, wherein the page service demand information is used for representing the content of performance data processing demands generated based on different page services;
the configuration module is further configured to configure a basic performance node and a target page performance node in the performance nodes according to the demand node, where the basic performance node at least includes one of a transport protocol establishment node, a domain name resolution node, a page resource download node, a page script running node, and a page document object model resolution node, and the target page performance node at least includes one of a page visible operable node, a page arrival node, a page routing node, and a page component rendering node.
Further, the statistics module comprises:
a first determining unit, configured to, if the performance node to be processed is a page visible and operable node, extract a page first loading time and a page first rendering completion time in the node time, and determine that the page visible and operable performance is time-consuming according to a difference between the page first loading time and the page first rendering completion time; and/or the presence of a gas in the gas,
a second determining unit, configured to, if the to-be-processed performance node is a page routing node, extract a page routing entry time and a page routing exit time in the node time, and determine that the page routing performance consumes time according to a difference between the page routing entry time and the page routing exit time; and/or the presence of a gas in the gas,
a third determining unit, configured to, if the to-be-processed performance node is a page component rendering node, extract a pre-creation time and a post-creation time of a page life cycle function in the node time, and determine, according to a difference between the pre-creation time and the post-creation time, a time consumed for rendering the page component; and/or the presence of a gas in the gas,
a fourth determining unit, configured to, if the to-be-processed performance node is a page arrival node, extract a first user amount and a second user amount that request page access, where a node time corresponding to page address loading and/or page content rendering exists in the node time, calculate a ratio of the first user amount to the second user amount according to a preset time interval, and determine that the ratio is a page arrival rate.
Further, the obtaining module comprises:
the judging unit is used for judging whether the trigger node is reached or not when any one of user identification, page access time and page access address is detected to be recorded in real time based on the proxy server;
and the recording unit is used for recording the node time of the network basic data and/or the user access data based on the tracking event if the trigger node is reached.
Further, the configuration module is specifically configured to configure the trace event at a node where completion of downloading of the page resource is detected and the page script is executed if the trigger node is a page address loading node, so that the node time where the completion of downloading of the page resource is detected and the page script is executed is used as the page address loading time.
Further, the storage module is specifically configured to classify the node time of the network basic data and/or the user access data according to different user identifiers or different page identifiers, and store the classified node time in a database matched with the performance node.
According to another aspect of the present invention, a storage medium is provided, where at least one executable instruction is stored, and the executable instruction causes a processor to perform an operation corresponding to the method for generating page performance data.
According to still another aspect of the present invention, there is provided a terminal including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the generation method of the page performance data.
By the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
the invention provides a method and a device for generating page performance data, a computer storage medium and a terminal, compared with the prior art, the embodiment of the invention obtains the node time for tracking and recording a page to generate network basic data and/or user access data after detecting a user page access request; storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes; responding to a page performance data output request, counting page performance data matched with a performance node to be processed carried in the output request based on the stored node time, and outputting the page performance data, so that the page performance data is generated by flexibly configuring the performance node to meet different page performance requirements, the true operation behavior of a user is taken as the analysis range of the performance node, the authenticity of page performance reflected by page operation is greatly increased, and the effectiveness of the page performance data is improved.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
The invention will be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
fig. 1 is a flowchart illustrating a method for generating page performance data according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for generating page performance data according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for generating page performance data according to another embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a system architecture for generating page performance data according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating an apparatus for generating page performance data according to an embodiment of the present invention;
fig. 6 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the computer system/server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
The computer system/server may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
The embodiment of the invention provides a method for generating page performance data, which comprises the following steps of:
101. and when the user page access request is detected, acquiring the node time of the tracking record page for generating the network basic data and/or the user access data.
The network basic data is data generated by network connection after a user triggers a page access request, and includes, but is not limited to, network state data, page loading data, interface data, url addresses, and the like, and the user access data is data representing user characteristics in a page access process, and includes, but is not limited to, user ip, user access time, and the like. In the embodiment of the invention, the current execution main body can record the time point of the node generating the network basic data and the user access data through the tracking event, so that the node time configured in the node of the network basic data and the user access data is obtained after the page access request triggered by the user is detected.
It should be noted that the execution main body as the current execution end may be a software package embedded in an application component, a script tool, or a server in the client, so as to detect whether the user triggers a page access request of the page in real time, thereby acquiring the network basic data generated by the tracked and recorded page and the node time of the user access data. In addition, in the embodiment of the present invention, the page may be a user interface built in different applications, and is preferably a page built by a set of progressive frames Vue for building the user interface. In addition, the user in the embodiment of the invention is any user who accesses the specified page, so that the performance data generated for the specified page is obtained when the performance data of the page is counted.
102. And storing the network basic data and/or the node time of the user access data according to the configured performance node.
The configured performance nodes comprise basic performance nodes and target page performance nodes for representing the performance of the target page determined based on the user operation behavior, the basic performance nodes at least comprise one of a transmission protocol establishing node, a domain name resolution node, a page resource downloading node, a page script running node and a page document object model resolution node, and the target page performance nodes at least comprise one of a page visible operable node, a page arrival node, a page routing node and a page component rendering node. In the embodiment of the present invention, since the user may perform an operation such as exiting operation or jumping to another page after triggering the page access request, after acquiring the node time, in order to accurately generate the page performance data, the node time of the network basic data and the user access data is stored in a preset database, such as a clickhouse database, according to the configured performance node.
It should be noted that, after the performance node in the embodiment of the present invention performs page access for a user, a browser, a network server, and the like output all page contents to a node, which needs to count page performance, in each process node in a user process, so that configuration may be performed in advance based on different services or user behaviors, so as to generate page performance by using node time of different performance nodes.
103. Responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting.
In the embodiment of the present invention, the requesting party for the page performance data output request may be a developer in a service background, or may be a user party having a right to acquire the page performance data, and the embodiment of the present invention is not particularly limited. Therefore, after receiving the page performance data output request, the current execution end counts the page performance data of the performance nodes needing to be processed according to the network basic data already stored in the database and the node time of the user access data. The page performance data is used for representing time consumption of various data generated after the page is accessed by the user, for example, if the performance node to be processed is a domain name resolution node, the page performance data based on node time statistics is the time consumption of domain name resolution, so as to output the page performance data. The output mode may be a Grafana chart, a table, or the like, and the embodiment of the present invention is not particularly limited.
In the embodiment of the present invention, if the performance node to be processed is a basic performance node, the performance node at least includes one of a transmission protocol establishment node, a domain name resolution node, a page resource download node, a page script operation node, and a page document object model resolution node, so that the page performance data of the transmission protocol establishment node may be time consumed for establishing the TCP transmission protocol, and the statistical method is a difference between a time when the connection between the browser and the server is completed and a time when the browser requests url content from the server, which is expressed as time consumed for establishing the TCP transmission protocol (performance.time.connection.connection.start); the page performance data of the domain name resolution node can be time consumed by DNS resolution, and the statistical method is the difference between the end time of domain name resolution and the start time of domain name resolution, and the time consumed by DNS resolution is expressed as performance. For the page performance data of the page resource downloading node, the page resource downloading time can be consumed, and the statistical method is the difference between the time when the browser receives the last byte or connection of the response from the server, the cache or the local resource and the time when the browser uses the HTTP request to capture the document, which is expressed as the page resource downloading time, performance. The statistical method is the difference between the loading completion time of the event when the page loading state is changed and the loaded time of the event when the page loading state is changed and the time when the document and the user start to interact, and the self-execution JavaScript running time is expressed as self-execution JavaScript running time. The page performance data of the page document object model analysis node can be time consumed by Dom analysis, and the statistical method is the difference between the time of entering the loading when the analyzer starts to work and the time of entering the interaction when the analyzer starts to work, and is expressed as Dom analysis time consumption, performance. The performance is a series of key time points, which include a series of time data such as network and analysis, so as to perform statistics on the time consumption data of the performance node.
For further explanation and limitation, in the embodiment of the present invention, as shown in fig. 2, before the step 101 acquires a node time of a trace record page for generating network basic data and/or user access data, the method further includes: 201. determining at least one trigger node generating network basic data and/or user access data based on the process information of the page access; 202. configuring a trace event for the triggering node such that a node time is recorded upon arrival at the triggering node based on the trace event.
In order to avoid over-rigor in the generation of the page performance data, at least one trigger node for generating the network basic data and/or the user access data is determined before the node time for acquiring the network basic data and the user access data, and a tracking event is configured for the trigger node. The process information of the page access is from a user triggering page, through the steps of starting to request network establishment, communication protocol establishment, url domain name resolution, page resource loading, page script operation, page rendering and the like by a processing terminal such as a browser, a network server and the like until a page is completely displayed at a user terminal, and corresponding to the process information of the page access, a triggering node is an execution node for acquiring network basic data and user access data in the process, for example, a page resource loading node is a time point for starting to acquire the page resource loading data.
It should be noted that, in the embodiment of the present invention, the trace event is to record the node time after the node is triggered through a trace interface, for example, a track API, and when the node arrives at the trigger node, a trace script of the track API is called to record the node time, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, for further limitation and explanation, step 202 configures a trace event for the trigger node, which specifically includes: and if the trigger node is a page address loading node, configuring the tracking event at the node where the completion of the downloading of the page resource is detected and the page script is not executed, so that the node time before the completion of the downloading of the page resource and the execution of the page script is taken as the page address loading time.
In the process of triggering the page access request by the user, the url data is recorded by the proxy server, and url skipping may occur due to execution of the page script, so that the real url of the page accessed by the user is inconsistent with the url recorded by the proxy server, and the determination of the performance node of the page address loading node is influenced.
In an embodiment of the present invention, for further definition and explanation, before determining at least one trigger node generating network basic data and/or user access data based on the process information of page access in step 201, the method further includes: acquiring page service demand information, and analyzing a demand node of the page service demand information, wherein the page service demand information is used for representing the content of performance data processing demand generated based on different page services; and configuring a basic performance node and a target page performance node in the performance nodes according to the demand node, wherein the basic performance node at least comprises one of a transmission protocol establishing node, a domain name resolution node, a page resource downloading node, a page script running node and a page document object model resolution node, and the target page performance node at least comprises one of a page visible operable node, a page arrival node, a page routing node and a page component rendering node.
In order to meet the generation requirements of different page performance data and expand the perception of page performance, before determining the trigger node, the demand node can be configured into a basic performance node and a target page performance node by acquiring page service demand information and analyzing the demand node. The page service requirement information is used for representing content of performance data processing requirements generated based on different page services, and the page service is an operation requirement generated by a user triggering a page, for example, a video page is required for playing a video, and an online shopping page is required for electronic transaction, so that different performance data processing requirements can be generated for different page services, and then different requirement nodes can be analyzed according to the page service requirement information. For example, for a video playing service, the page service requirement information may be a video resource loading requirement, and therefore, the requirement node obtained through analysis is a video resource loading node. In the embodiment of the invention, for the demand node for analyzing the page service demand information, splitting can be carried out based on the demand content in the input page service demand information, so that each split demand content is used as a demand node, and the basic performance node and the target page performance node in the performance nodes are configured according to the demand node.
It should be noted that, the performance node includes a transmission protocol establishing node, a domain name resolution node, a page resource downloading node, a page script running node, a page document object model resolution node, etc. which provide a basis for page optimization in the page access process, and includes a page visible operable node, a page arrival node, a page routing node, and a page component rendering node which are related to user operation behaviors in order to satisfy different page services. The page visible operable node is a node which is really displayed and operable to be executed by the page relative to the user, and the page arrival node is a node which is used for really arriving at the user terminal to display the content of the page after the user triggers page access within a preset time interval. In addition, for Vue pages, the page routing node is a node for Vue route injection, and the page component rendering node is a node for Vue component real rendering, which is not specifically limited in the embodiment of the present invention.
In this embodiment of the present invention, for further limitation, step 102, based on the stored node time statistics, and the page performance data matched with the performance node to be processed carried in the output request, specifically includes: if the performance node to be processed is a page visible operable node, extracting the page first loading time and the page first rendering completion time in the node time, and determining that the page visible operable performance is consumed time according to the difference value of the page first loading time and the page first rendering completion time; and/or if the performance node to be processed is a page routing node, extracting the page routing entry time and the page routing exit time in the node time, and determining that the page routing performance consumes time according to the difference value of the page routing entry time and the page routing exit time; and/or if the performance node to be processed is a page component rendering node, extracting the time before creation and the time after creation of a page life cycle function in the node time, and determining the time consumed by the rendering performance of the page component according to the difference value of the time before creation and the time after creation; and/or if the performance node to be processed is a page arrival node, extracting a first user amount and a second user amount, which have node time corresponding to page address loading and/or page content rendering, in the node time, and request for page access, calculating a ratio of the first user amount to the second user amount according to a preset time interval, and determining the ratio as a page arrival rate.
Because the performance nodes comprise the basic performance node and the target page performance node, in order to meet the generation requirements of different page performance data, different target page performance nodes have different calculation methods for the generation of the page performance data of the target page performance node. Specifically, if the performance node to be processed is a page visible operable node, extracting the page first loading time and the page first rendering completion time in the node time, determining the page visible operable performance consumed time according to a difference value between the page first loading time and the page first rendering completion time, namely obtaining the page first loading time provided by the browser through window. If the performance node to be processed is a page routing node, extracting the page routing entry time and the page routing exit time in the node time, and determining that the page routing performance time is consumed according to the difference between the page routing entry time and the page routing exit time, namely for an Vue page, using Vue routing skip through a before reach and an after reach injected into Vue-router as the page routing entry time and the page routing exit time respectively to determine the difference between the two time points. If the performance node to be processed is a page component rendering node, extracting the time before creation and the time after creation of a page life cycle function in the node time, and determining the time consumed by the rendering performance of the page component according to the difference between the time before creation and the time after creation, namely for Vue pages, respectively using the life cycle functions before creation and consumed injected into Vue pages as the time spent in creating money and the time spent after creation to determine the difference between the two time points. If the performance node to be processed is a page arrival node, extracting a first user amount of node time corresponding to page address loading and/or page content rendering and a second user amount of the node time and requesting page access in the node time, calculating a ratio of the first user amount to the second user amount according to a preset time interval, and determining the ratio as a page arrival rate, wherein the page arrival rate is used for indicating the probability of how many users actually access a specific page by all users opening the specific page within a certain time range, so that the page arrival rate is calculated by taking the page loading address or the time node of page content rendering as the user amount corresponding to the node of the page actually opened by the user and combining the user amount corresponding to the time node of page access requested by the user, so as to embody the expected degree of the user to the page.
It should be noted that the visible operable time consumption in the embodiment of the present invention is used to indicate how fast different pages are rendered on the same device, so that during statistics, the time consumption of the process of interactively clicking from the page access start to the page final content presentation completion by the user using the device may be used as a basis for statistics, and thus, the time consumption is used to analyze the actual rendering speed of one page and different terminal devices as performance data. Meanwhile, for the statistics of the arrival rate, because the node time is stored in the clickhost database, for the node time stored in different positions, for example, one data table stores the relevant data of the user access request network, and the other data table stores the relevant data of the user access request page actual arrival, the page arrival rate is counted once by taking a preset time interval as a statistic point, for example, taking the user access amount in the access request detail table as a denominator and the user access amount in the actual arrival detail table as a numerator every 5 minutes, and the page arrival rate of the historical record every 5 minutes is calculated.
For further definition and illustration, in the embodiment of the present invention, as shown in fig. 3, the node time for acquiring the trace record page to generate the network basic data and/or the user access data in step 101 includes: 1011. when any one of user identification, page access time and page access address is detected to be recorded in real time based on the proxy server, judging whether the trigger node is reached; 1012. and if the trigger node is reached, recording the node time of the network basic data and/or the user access data based on the tracking event.
Specifically, after a user triggers a page access request, the access information of the user, including a user identifier, page access time and a page access address, is recorded in real time through the proxy server, so that in order to improve the accuracy of tracking and recording of a trigger node, when the proxy server detects that any one of the user identifier, the page access time and the page access address is recorded, the user starts a page access process, and therefore whether a pre-configured trigger node is reached is judged, and if the trigger node is reached, a time node for generating network basic data and user access data by tracking an event record is called.
In this embodiment of the present invention, for further limitation and description, the step 102 of storing the node time of the network basic data and/or the user access data according to the configured performance node specifically includes: and classifying the node time of the network basic data and/or the user access data according to different user identifications or different page identifications, and storing the classified node time into a database matched with the performance node.
Specifically, the user identifier is a user ip used for representing the user identity, and the page identifier is a page id or url used for representing the page identity, when storing, in order to facilitate statistical generation of performance data of different performance nodes, node time of network basic data and user access data can be classified according to different user identifiers or different page identifiers, and the node time is stored in a database matched with the performance nodes according to node time classified according to different user identifiers or different page identifiers, so that efficiency and accuracy of performance data generation are improved.
In an Vue page scenario in an embodiment of the present invention, the page performance data generation system architecture diagram shown in fig. 4 includes: after a user makes a page access request, information such as user access time, user access url, user ip and the like is obtained based on an Nginx server, each node time is obtained through a performance interface as @ sd/monitor of a current execution end, the tracked node time when the user enters the page url, visible operable nodes and other nodes is obtained according to a pre-configured trigger node, and the node time is stored in a ClickHouse database according to user network related data and user access data in a classified mode. When an opener or an authority user requests performance data output, the data in the database is called based on the data application layer to perform user arrival rate, visible and operable time consumption, page network establishment time consumption (network state), page first rendering time consumption (first screen time), page complete loading completion time consumption and Dom analysis time consumption statistics, and therefore the obtained page performance data is output.
Compared with the prior art, the embodiment of the invention provides a method for generating page performance data, which is characterized in that after a user page access request is detected, the embodiment of the invention acquires the node time of tracking and recording a page to generate network basic data and/or user access data; storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes; responding to a page performance data output request, counting page performance data matched with a performance node to be processed carried in the output request based on the stored node time, and outputting the page performance data, so that the page performance data is generated by flexibly configuring the performance node to meet different page performance requirements, the true operation behavior of a user is taken as the analysis range of the performance node, the authenticity of page performance reflected by page operation is greatly increased, and the effectiveness of the page performance data is improved.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides an apparatus for generating page performance data, where as shown in fig. 5, the apparatus includes:
the obtaining module 31 is configured to obtain, after detecting a user page access request, a node time for tracking a record page to generate network basic data and/or user access data;
a storage module 32, configured to store the node time of the network basic data and/or the user access data according to configured performance nodes, where the configured performance nodes include a basic performance node and a target page performance node that is determined based on a user operation behavior;
and the counting module 33 is configured to respond to a page performance data output request, count page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and output the page performance data.
Further, the apparatus further comprises:
the determining module is used for determining at least one trigger node for generating network basic data and/or user access data based on the process information of page access;
a configuration module, configured to configure a trace event for the trigger node, so that a node time is recorded based on the trace event when the trigger node is reached.
Further, the apparatus further comprises: an analysis module for analyzing the received data,
the analysis module is used for acquiring page service demand information and analyzing demand nodes of the page service demand information, wherein the page service demand information is used for representing the content of performance data processing demands generated based on different page services;
the configuration module is further configured to configure a basic performance node and a target page performance node in the performance nodes according to the demand node, where the basic performance node at least includes one of a transport protocol establishment node, a domain name resolution node, a page resource download node, a page script running node, and a page document object model resolution node, and the target page performance node at least includes one of a page visible operable node, a page arrival node, a page routing node, and a page component rendering node.
Further, the statistics module comprises:
a first determining unit, configured to, if the performance node to be processed is a page visible and operable node, extract a page first loading time and a page first rendering completion time in the node time, and determine that the page visible and operable performance is time-consuming according to a difference between the page first loading time and the page first rendering completion time; and/or the presence of a gas in the gas,
a second determining unit, configured to, if the to-be-processed performance node is a page routing node, extract a page routing entry time and a page routing exit time in the node time, and determine that the page routing performance consumes time according to a difference between the page routing entry time and the page routing exit time; and/or the presence of a gas in the gas,
a third determining unit, configured to, if the to-be-processed performance node is a page component rendering node, extract a pre-creation time and a post-creation time of a page life cycle function in the node time, and determine, according to a difference between the pre-creation time and the post-creation time, a time consumed for rendering the page component; and/or the presence of a gas in the gas,
a fourth determining unit, configured to, if the to-be-processed performance node is a page arrival node, extract a first user amount and a second user amount that request page access, where a node time corresponding to page address loading and/or page content rendering exists in the node time, calculate a ratio of the first user amount to the second user amount according to a preset time interval, and determine that the ratio is a page arrival rate.
Further, the obtaining module comprises:
the judging unit is used for judging whether the trigger node is reached or not when any one of user identification, page access time and page access address is detected to be recorded in real time based on the proxy server;
and the recording unit is used for recording the node time of the network basic data and/or the user access data based on the tracking event if the trigger node is reached.
Further, the configuration module is specifically configured to configure the trace event at a node where completion of downloading of the page resource is detected and the page script is executed if the trigger node is a page address loading node, so that the node time where the completion of downloading of the page resource is detected and the page script is executed is used as the page address loading time.
Further, the storage module is specifically configured to classify the node time of the network basic data and/or the user access data according to different user identifiers or different page identifiers, and store the classified node time in a database matched with the performance node.
Compared with the prior art, the embodiment of the invention provides a device for generating page performance data, and the device provided by the invention has the advantages that after a user page access request is detected, the node time for tracking and recording a page to generate network basic data and/or user access data is obtained; storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes; responding to a page performance data output request, counting page performance data matched with a performance node to be processed carried in the output request based on the stored node time, and outputting the page performance data, so that the page performance data is generated by flexibly configuring the performance node to meet different page performance requirements, the true operation behavior of a user is taken as the analysis range of the performance node, the authenticity of page performance reflected by page operation is greatly increased, and the effectiveness of the page performance data is improved.
According to an embodiment of the present invention, a computer storage medium is provided, where at least one executable instruction is stored, and the computer executable instruction can execute the method for generating page performance data in any of the above method embodiments.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 6, the terminal may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein: the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with network elements of other devices, such as clients or other servers.
The processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the above-described method for generating page performance data.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may specifically be configured to cause the processor 402 to perform the following operations:
when a user page access request is detected, acquiring node time of tracking and recording a page to generate network basic data and/or user access data;
storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes;
responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A method for generating page performance data is characterized by comprising the following steps:
when a user page access request is detected, acquiring node time of tracking and recording a page to generate network basic data and/or user access data;
storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes which are determined based on user operation behaviors and used for representing the target page performance nodes;
responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting.
2. The method of claim 1, wherein before the obtaining the trace record page generates the node time of the network infrastructure data and/or the user access data, the method further comprises:
determining at least one trigger node generating network basic data and/or user access data based on the process information of the page access;
configuring a trace event for the triggering node such that a node time is recorded upon arrival at the triggering node based on the trace event.
3. The method of claim 2, wherein before determining at least one trigger node for generating network infrastructure data and/or user access data based on the process information for page access, the method further comprises:
acquiring page service demand information, and analyzing a demand node of the page service demand information, wherein the page service demand information is used for representing content of performance data processing demand generated based on different page services and/or different user operation behaviors;
and configuring a basic performance node and a target page performance node in the performance nodes according to the demand node, wherein the basic performance node at least comprises one of a transmission protocol establishing node, a domain name resolution node, a page resource downloading node, a page script running node and a page document object model resolution node, and the target page performance node at least comprises one of a page visible operable node, a page arrival node, a page routing node and a page component rendering node.
4. The method of claim 3, wherein the matching of the stored node time statistics with the performance nodes to be processed carried in the output request based on the stored page performance data comprises:
if the performance node to be processed is a page visible operable node, extracting the page first loading time and the page first rendering completion time in the node time, and determining that the page visible operable performance is consumed time according to the difference value of the page first loading time and the page first rendering completion time; and/or the presence of a gas in the gas,
if the performance node to be processed is a page routing node, extracting the page routing entry time and the page routing exit time in the node time, and determining that the page routing performance consumes time according to the difference value of the page routing entry time and the page routing exit time; and/or the presence of a gas in the gas,
if the performance node to be processed is a page component rendering node, extracting the time before creation and the time after creation of a page life cycle function in the node time, and determining the time consumed by the rendering performance of the page component according to the difference value of the time before creation and the time after creation; and/or the presence of a gas in the gas,
if the performance node to be processed is a page arrival node, extracting a first user amount and a second user amount requesting page access, which have node time corresponding to page address loading and/or page content rendering, in the node time, calculating a ratio of the first user amount to the second user amount according to a preset time interval, and determining the ratio as a page arrival rate.
5. The method of claim 2, wherein obtaining the node time at which the trace record page generates the network infrastructure data and/or the user access data comprises:
when any one of user identification, page access time and page access address is detected to be recorded in real time based on the proxy server, judging whether the trigger node is reached;
and if the trigger node is reached, recording the node time of the network basic data and/or the user access data based on the tracking event.
6. The method of claim 2, wherein configuring the trigger node with a trace event comprises:
and if the trigger node is a page address loading node, configuring the tracking event at the node where the completion of the downloading of the page resource is detected and the page script is not executed, so that the node time before the completion of the downloading of the page resource and the execution of the page script is taken as the page address loading time.
7. The method according to any of claims 1-6, wherein storing the node time of the network infrastructure data and/or user access data according to the configured performance node comprises:
and classifying the node time of the network basic data and/or the user access data according to different user identifications or different page identifications, and storing the classified node time into a database matched with the performance node.
8. An apparatus for generating page performance data, comprising:
the acquisition module is used for acquiring node time of tracking and recording a page to generate network basic data and/or user access data after detecting a user page access request;
the storage module is used for storing the node time of the network basic data and/or the user access data according to configured performance nodes, wherein the configured performance nodes comprise basic performance nodes and target page performance nodes determined based on user operation behaviors;
and the counting module is used for responding to a page performance data output request, counting page performance data matched with the performance node to be processed carried in the output request based on the stored node time, and outputting the page performance data.
9. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the method for generating page performance data according to any one of claims 1-7.
10. A terminal, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the generation method of the page performance data as claimed in any one of claims 1 to 7.
CN202110672210.5A 2021-06-17 2021-06-17 Page performance data generation method and device, computer storage medium and terminal Pending CN113569168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110672210.5A CN113569168A (en) 2021-06-17 2021-06-17 Page performance data generation method and device, computer storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110672210.5A CN113569168A (en) 2021-06-17 2021-06-17 Page performance data generation method and device, computer storage medium and terminal

Publications (1)

Publication Number Publication Date
CN113569168A true CN113569168A (en) 2021-10-29

Family

ID=78162351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110672210.5A Pending CN113569168A (en) 2021-06-17 2021-06-17 Page performance data generation method and device, computer storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113569168A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080114875A1 (en) * 2006-10-25 2008-05-15 Paul Anastas Methods and apparatus for real user monitoring
US20100325615A1 (en) * 2009-06-23 2010-12-23 Myspace Inc. Method and system for capturing web-page information through web-browser plugin
CN103825948A (en) * 2014-02-27 2014-05-28 优视科技有限公司 Method and system for optimizing webpage access based on webpage access requests
CN106100936A (en) * 2016-08-10 2016-11-09 乐视控股(北京)有限公司 Webpage method for monitoring performance and device and the webserver, client
CN106385339A (en) * 2016-11-01 2017-02-08 上海携程商务有限公司 Monitoring method and monitoring system for access performance of enterprise network
CN109165152A (en) * 2018-07-31 2019-01-08 上海哔哩哔哩科技有限公司 Method for monitoring performance, system and the storage medium of WEB system
CN109271600A (en) * 2018-08-16 2019-01-25 微梦创科网络科技(中国)有限公司 A kind of monitoring method of performance data, system and device
CN109739725A (en) * 2018-12-29 2019-05-10 云智慧(北京)科技有限公司 Monitoring method, device and system based on browser and storage medium
CN110224896A (en) * 2019-06-24 2019-09-10 深圳前海桔子信息技术有限公司 A kind of network performance data acquisition method, device, server and storage medium
CN110740081A (en) * 2019-10-23 2020-01-31 北京网聘咨询有限公司 Data visualization method for page performance of standard multiple companies

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080114875A1 (en) * 2006-10-25 2008-05-15 Paul Anastas Methods and apparatus for real user monitoring
US20100325615A1 (en) * 2009-06-23 2010-12-23 Myspace Inc. Method and system for capturing web-page information through web-browser plugin
CN103825948A (en) * 2014-02-27 2014-05-28 优视科技有限公司 Method and system for optimizing webpage access based on webpage access requests
CN106100936A (en) * 2016-08-10 2016-11-09 乐视控股(北京)有限公司 Webpage method for monitoring performance and device and the webserver, client
CN106385339A (en) * 2016-11-01 2017-02-08 上海携程商务有限公司 Monitoring method and monitoring system for access performance of enterprise network
CN109165152A (en) * 2018-07-31 2019-01-08 上海哔哩哔哩科技有限公司 Method for monitoring performance, system and the storage medium of WEB system
CN109271600A (en) * 2018-08-16 2019-01-25 微梦创科网络科技(中国)有限公司 A kind of monitoring method of performance data, system and device
CN109739725A (en) * 2018-12-29 2019-05-10 云智慧(北京)科技有限公司 Monitoring method, device and system based on browser and storage medium
CN110224896A (en) * 2019-06-24 2019-09-10 深圳前海桔子信息技术有限公司 A kind of network performance data acquisition method, device, server and storage medium
CN110740081A (en) * 2019-10-23 2020-01-31 北京网聘咨询有限公司 Data visualization method for page performance of standard multiple companies

Similar Documents

Publication Publication Date Title
CN112148674B (en) Log data processing method, device, computer equipment and storage medium
US9456019B2 (en) Web page load time prediction and simulation
WO2016173200A1 (en) Malicious website detection method and system
CN110275831B (en) Mock data verification method and device of protocol interface
CN109194671B (en) Abnormal access behavior identification method and server
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN108415804B (en) Method for acquiring information, terminal device and computer readable storage medium
CN110298662B (en) Automatic detection method and device for transaction repeated submission
US9727394B2 (en) Establishing causality order of computer trace records
US20180159724A1 (en) Automatic task tracking
US10067862B2 (en) Tracking asynchronous entry points for an application
CN111177623A (en) Information processing method and device
CN110598135A (en) Network request processing method and device, computer readable medium and electronic equipment
CN114157568B (en) Browser secure access method, device, equipment and storage medium
CN110515631B (en) Method for generating application installation data packet, server and computer storage medium
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN110806913A (en) Webpage screenshot method, device and equipment
WO2019047677A1 (en) Application download source detection method and apparatus
CN111459577B (en) Application installation source tracking method, device, equipment and storage medium
CN113569168A (en) Page performance data generation method and device, computer storage medium and terminal
CN112671615B (en) Method, system and storage medium for collecting front-end user operation behavior data
CN112559278B (en) Method and device for acquiring operation data
CN110061864B (en) Method and system for automatically verifying domain name configuration
CN110955856B (en) Webpage loading method and device, server and storage medium
CN110674487B (en) Method and device for verifying sliding verification code, storage medium and electronic equipment

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
CB02 Change of applicant information

Address after: 100102 201 / F, block C, 2 lizezhong 2nd Road, Chaoyang District, Beijing

Applicant after: Beijing Shuidi Technology Group Co.,Ltd.

Address before: 100102 201, 2 / F, block C, No.2 lizezhong 2nd Road, Chaoyang District, Beijing

Applicant before: Beijing Health Home Technology Co.,Ltd.

CB02 Change of applicant information