CN112579416B - Page loading duration statistical method, terminal and readable storage medium - Google Patents

Page loading duration statistical method, terminal and readable storage medium Download PDF

Info

Publication number
CN112579416B
CN112579416B CN202011471065.6A CN202011471065A CN112579416B CN 112579416 B CN112579416 B CN 112579416B CN 202011471065 A CN202011471065 A CN 202011471065A CN 112579416 B CN112579416 B CN 112579416B
Authority
CN
China
Prior art keywords
page
screen
loading
occupation ratio
screen occupation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011471065.6A
Other languages
Chinese (zh)
Other versions
CN112579416A (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.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei Software 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 Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN202011471065.6A priority Critical patent/CN112579416B/en
Publication of CN112579416A publication Critical patent/CN112579416A/en
Application granted granted Critical
Publication of CN112579416B publication Critical patent/CN112579416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a statistical method of page loading duration, a terminal and a readable storage medium, wherein the statistical method of page loading duration comprises the following steps: the method comprises the steps of obtaining a screen occupation ratio of a page and loading corresponding loading duration of the page according to the screen occupation ratio at regular time within preset duration; determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio; and determining the page loading duration according to the screen ratio change rate. The method and the device can solve the problem that the labor cost is high due to the existing method for counting the loading time of the first screen of the page.

Description

Page loading duration statistical method, terminal and readable storage medium
Technical Field
The invention relates to the technical field of terminals, in particular to a statistical method of page loading duration, a terminal and a readable storage medium.
Background
Through analyzing the content change conditions of basic components such as texts and images in the content area, the time for completing loading of the first screen content of the mobile application can be accurately counted. The existing first screen loading modes generally comprise two modes, one mode is that a tester records a screen in the first screen loading process of a certain page through a screen recording analysis tool and then analyzes a video frame; the other way is that a developer writes the statistical code for a specific page, and the specific statistical code needs to be written for different pages. The statistics of the loading time of the first screen of the page in the two modes requires manual maintenance, the time needs to be counted again by manpower when the page changes every time, universality is avoided, and the labor cost is high.
Disclosure of Invention
The invention mainly aims to provide a statistical method, a terminal and a readable storage medium for page loading duration, and solve the problem of high labor cost caused by the conventional statistical method for page first screen loading duration.
In order to achieve the above object, the present invention provides a statistical method for page loading duration, where the statistical method for page loading duration includes:
the method comprises the steps of obtaining the screen proportion of a page and loading corresponding loading time of the page according to the screen proportion at regular time in preset time;
determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio;
and determining the page loading duration according to the screen occupation ratio change rate.
Optionally, the step of determining the page loading duration according to the screen duty ratio change rate includes:
when the screen occupation ratio change rate is larger than or equal to a preset value, comparing the acquired screen occupation ratio with the screen occupation ratio corresponding to the recorded optimal loading duration;
when the screen occupation ratio obtained at this time is larger than the screen occupation ratio corresponding to the recorded optimal loading duration, updating the loading duration corresponding to the screen occupation ratio obtained at this time to the optimal loading duration;
when the acquired screen occupation ratio is smaller than the recorded screen occupation ratio corresponding to the optimal loading time, executing the step of acquiring the screen occupation ratio of the page at regular time and loading the corresponding loading time according to the screen occupation ratio by the page;
and when the preset time length is reached, taking the recorded optimal loading time length as the page loading time length.
Optionally, before the step of taking the recorded optimal loading duration as the page loading duration when the preset duration is reached, the method further includes:
when the screen occupation ratio change rate is larger than or equal to a preset value, acquiring a fluctuation mark corresponding to the screen occupation ratio acquired this time;
and when the fluctuation mark is a preset mark, updating the loading time corresponding to the screen occupation ratio acquired at this time into the optimal loading time.
Optionally, the step of determining the screen ratio change rate of the page according to the screen ratio and the loading duration corresponding to the screen ratio includes:
and determining the screen occupation ratio change rate of the page according to the currently acquired screen occupation ratio and the loading duration corresponding to the screen occupation ratio and the previously acquired preset number of screen occupation ratios and the loading duration corresponding to the screen occupation ratio.
Optionally, the step of determining the screen proportion change rate of the page according to the currently acquired screen proportion and the loading duration corresponding to the screen proportion and the loading durations corresponding to the screen proportions of the preset number of previously acquired screen proportions and screen proportions includes:
acquiring a first difference value between a currently acquired screen occupation ratio and a previously acquired screen occupation ratio and a second difference value between a loading time length corresponding to the currently acquired screen occupation ratio and a loading time length corresponding to the previously acquired screen occupation ratio;
calculating a ratio of the first difference to the second difference;
and determining the screen ratio change rate of the page according to the ratio.
Optionally, the step of periodically acquiring the screen ratio of the page includes:
acquiring the pixel area of a page;
acquiring the pixel area of the loaded target visual component in the page at fixed time;
and determining the screen occupation ratio of the page according to the pixel area of the page and the pixel area of the loaded target visual component in the page.
Optionally, the step of periodically acquiring the pixel area of the target visual component loaded in the page includes:
acquiring the loaded target visual component in the page at fixed time;
and acquiring the pixel area of the loaded target visual component.
Optionally, the page includes a plurality of target visual components, and the step of periodically acquiring the target visual components loaded in the page includes:
regularly acquiring the address of each target visual component content;
when the address of the target visual component content is the same as the address of the target visual component content acquired last time, determining that the target visual component is loaded;
and acquiring the loaded target visual component.
In addition, in order to achieve the above object, the present invention further provides a terminal, where the terminal includes a memory, a processor, and a computer program stored in the memory and being executable on the processor, and the computer program, when executed by the processor, implements the steps of the statistical method for page loading duration as described above.
In addition, to achieve the above object, the present invention further provides a readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the statistical method for page loading duration described above.
The invention provides a statistical method of page loading duration, a terminal and a readable storage medium, wherein the screen occupation ratio of a page and the loading duration corresponding to the page loading according to the screen occupation ratio are obtained at regular time within the preset duration, then the screen occupation ratio change rate of the page is determined according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio, and finally the page loading duration is determined according to the screen occupation ratio change rate. According to the scheme, the page loading time is counted by calculating the screen ratio change rate, the universality is high, the loading time of various pages in the online environment can be automatically counted without interruption, a large amount of manpower is saved, and therefore the problem that the manpower cost is high due to the existing page first screen loading time counting method is effectively solved.
Drawings
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a hardware architecture of a terminal according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a statistical method for page loading durations according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a method for counting page loading durations according to the present invention;
fig. 4 is a flowchart illustrating a third embodiment of the statistical method for page loading duration according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: the method comprises the steps of obtaining the screen occupation ratio of a page and the loading duration corresponding to the loading of the page according to the screen occupation ratio at regular time in preset duration; determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio; and determining the page loading duration according to the screen occupation ratio change rate. According to the scheme, the page loading time is counted by calculating the screen ratio change rate, the universality is high, the loading time of various pages in the online environment can be automatically counted without interruption, a large amount of manpower is saved, and therefore the problem that the manpower cost is high due to the existing page first screen loading time counting method is effectively solved.
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware architecture of a terminal according to an embodiment of the present invention.
As shown in fig. 1, the terminal may include: a processor 1001, e.g. a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), a remote controller, and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a non-volatile memory), such as a disk memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system and a computer program therein.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the computer program stored in the memory 1005 and perform the following operations:
the method comprises the steps of obtaining a screen occupation ratio of a page and loading corresponding loading duration of the page according to the screen occupation ratio at regular time within preset duration;
determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio;
and determining the page loading duration according to the screen occupation ratio change rate.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
when the screen occupation ratio change rate is larger than or equal to a preset value, comparing the screen occupation ratio obtained at this time with the screen occupation ratio corresponding to the recorded optimal loading duration;
when the screen occupation ratio obtained at this time is larger than the screen occupation ratio corresponding to the recorded optimal loading duration, updating the loading duration corresponding to the screen occupation ratio obtained at this time to the optimal loading duration;
when the acquired screen occupation ratio is smaller than the recorded screen occupation ratio corresponding to the optimal loading time, executing the step of acquiring the screen occupation ratio of the page at regular time and loading the corresponding loading time according to the screen occupation ratio by the page;
and when the preset time length is reached, taking the recorded optimal loading time length as the page loading time length.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
when the screen occupation ratio change rate is larger than or equal to a preset value, acquiring a fluctuation mark corresponding to the acquired screen occupation ratio;
and when the fluctuation mark is a preset mark, updating the loading time corresponding to the screen occupation ratio acquired at this time into the optimal loading time.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
and determining the screen ratio change rate of the page according to the currently acquired screen ratio and the loading duration corresponding to the screen ratio and the loading durations corresponding to the previously acquired preset number of screen ratios and screen ratios.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
acquiring a first difference value between a currently acquired screen occupation ratio and a previously acquired screen occupation ratio and a second difference value between a loading time length corresponding to the currently acquired screen occupation ratio and a loading time length corresponding to the previously acquired screen occupation ratio;
calculating a ratio of the first difference to the second difference;
and determining the screen ratio change rate of the page according to the ratio.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
acquiring the pixel area of a page;
acquiring the pixel area of the loaded target visual component in the page at regular time;
and determining the screen occupation ratio of the page according to the pixel area of the page and the pixel area of the loaded target visual component in the page.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
acquiring the loaded target visual component in the page at fixed time;
and acquiring the pixel area of the loaded target visual component.
Further, the processor 1001 may call the computer program stored in the memory 1005, and also perform the following operations:
regularly acquiring the address of each target visual component content;
when the address of the target visual component content is the same as the address of the target visual component content acquired last time, determining that the target visual component is loaded;
and acquiring the loaded target visual component.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a statistical method for page loading duration according to the present invention, where the statistical method for page loading duration includes the following steps:
step S10, acquiring the screen occupation ratio of a page and the corresponding loading time of the page according to the screen occupation ratio at regular time within preset time;
in this embodiment, the execution subject is a terminal device, and the terminal device may be a computer, a mobile phone, or the like, in other embodiments, the terminal device may also be other devices or apparatuses that can load a page and count the loading duration, and the page may be a first screen of a web page, or may be other pages that can be displayed on the terminal device, which is not limited herein.
In this embodiment, the screen duty ratio of a page is defined as a ratio of a pixel area of loaded content to a total pixel area of the page content, and ranges from 0 to 1, the page loading duration is a time required for completing loading of all content in the page, and in the loading process of the page, before completing loading of all content in the page, the screen duty ratio of the page changes along with the change of time, generally speaking, the longer the page loading time is, the closer the screen duty ratio of the page is to 1, which indicates that the more content has been loaded in the page; the shorter the page loading time is, the closer the screen proportion of the page is to 0, which indicates that the content loaded in the page is less, and it can be understood that when all the content in the page is completely loaded, the screen proportion of the page does not change with the change of time, that is, the screen proportion of the page tends to be stable, and the screen proportion of the page and the loading time length corresponding to the loading of the page according to the screen proportion are regularly obtained within a preset time length, wherein the preset time length is the time for ensuring that the page can be loaded in a normal condition, generally speaking, the time for completing the page loading in a normal condition is 2-3s, and the preset time length range is 5-10s, and is optionally 5s. In a preset time, detecting the screen occupation ratio of the page and the corresponding loading time in the page loading process at intervals, wherein the time interval can be selected to be 0.1s, that is, detecting the screen occupation ratio of the loaded page and the loading time corresponding to the current screen occupation ratio at intervals of 0.1 s.
In this embodiment, the content of the page mainly includes a text component and a picture component, and if the text component or the picture component is visible in the page, the component is referred to as a target visible component, and a part of the target visible component visible in the page is referred to as a target visible area. The pixel area of the page content is the sum of the pixel areas of all the text components and the image components, and the pixel area of the loaded content is the sum of the pixel areas of the loaded target visual components. And determining the screen occupation ratio of the page by acquiring the sum of the pixel areas of all the text components and the picture components and calculating the sum of the pixel areas of the loaded target visual components in a timing mode.
In this embodiment, the target visual component is sampled at regular time, the address of the target visual component and the address of the content are read by traversing the target visual component of the designated page, and are recorded in a hash table (the hash table is denoted by M), wherein the address of the component is a key, the string address of the text component is a value, the picture address of the picture component is a value, and the hash table of the first sampling is denoted by M 1 And the hash representation of the nth sample is denoted as M n . Generating an updated hash table by traversing the specified page every time, wherein the updated hash table does not change the address of the target visual component every time in the page loading process, the address of the content of the target visual component changes along with the change of the loading duration, and when the address of the target visual component and the address of the content are acquired for the nth time, the address of the target visual component is at M n-1 By comparing M n And M n-1 The address of the same target visual component content, if M n And M n-1 The addresses of the contents of the same target visual components are the same, which indicates that the target visual components are loaded completely, and after traversing, all the loaded target visual components are accumulatedPixel area of the component to update the sum of pixel areas of the loaded target visual components.
In this embodiment, if the pixel area of the page content is defined as S, the pixel area of the loaded target visual component is a, the screen duty ratio of the page is R, and the screen duty ratio of each sampling is calculated according to the following formula:
R n =A n /S
it is understood that when n =1, R 1 =0, indicating that no target visual component is loaded.
In this embodiment, the time for loading the loaded target visual component is the duration of page loading corresponding to the current sampling, and the screen duty ratio obtained by each sampling is associated with the duration of page loading to generate a sampling point, for example, the screen duty ratio of the nth sampling is R n Corresponding load duration of T n The generated sampling point is represented as P n =(T n ,R n )。
Step S20, determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio;
and S30, determining the page loading duration according to the screen ratio change rate.
In this embodiment, the screen duty ratio change rate reflects the trend of the page screen duty ratio change, the screen duty ratio change rate ranges from 0 to 1, generally speaking, the larger the screen duty ratio change rate is, the more stable the screen duty ratio of a page is, the more target visual components have been loaded in the page is, the smaller the screen duty ratio change rate is, the fewer target visual components have been loaded in the page is, the page is still in the process of gradual loading, and the screen duty ratio change rate of the page is determined through the screen duty ratio obtained at regular time and the corresponding loading duration.
Specifically, the screen duty ratio change rate of the page is determined according to the loading time length corresponding to the currently acquired screen duty ratio and the loading time length corresponding to the previously acquired preset number of screen duty ratios and the screen duty ratio, a first difference value between the currently acquired screen duty ratio and the previously acquired screen duty ratio and a second difference value between the loading time length corresponding to the currently acquired screen duty ratio and the loading time length corresponding to the previously acquired screen duty ratio are calculated, the ratio of the first difference value to the second difference value is calculated, and finally the screen duty ratio change rate of the page is determined according to the ratio.
For example, at the number of sampling n>At 2, 3 sampling points P can be obtained n 、P n-1 、P n-2 Calculating the screen ratio change rate of the page by calculating the slope of the linear regression line of the three points, wherein the slope of the linear regression line of the three points is P n And P n-2 If the slope is determined by B n Shows the slope B n The following calculation formula is obtained:
B n =(P n .R-P n-2 .R)/(P n .T-P n-2 .T)
further, the slope B is obtained n Then, normalizing the screen ratio to obtain the screen ratio change rate NB n Screen ratio change rate NB n Calculated according to the following formula:
NB n =1/fabs(B n )+1
and determining the page loading duration according to the screen ratio change rate. It should be noted that, when determining the screen ratio change rate, the number of sampling points may be selected according to the sampling precision, for example, P may be selected n 、P n-1 、P n-2 、P n-3 Generally, when the screen occupation ratio change rate is calculated, the more the number of the sampling points is, the more accurate the calculation of the screen occupation ratio change rate is, the higher the precision is, and the more accurate the determined page loading time is.
In the technical scheme provided by the embodiment, the screen occupation ratio of the page and the corresponding loading time for loading the page according to the screen occupation ratio are regularly acquired within the preset time; determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio; and determining the page loading duration according to the screen occupation ratio change rate. According to the scheme, the page loading time is counted by calculating the screen ratio change rate, the universality is high, the loading time of various pages in the online environment can be automatically counted without interruption, a large amount of manpower is saved, and therefore the problem that the manpower cost is high due to the existing page first screen loading time counting method is effectively solved.
Referring to fig. 3, fig. 3 is a schematic flowchart of a second embodiment of the statistical method for page loading durations according to the present invention, where based on the first embodiment, the step S30 includes:
step S31, comparing the screen occupation ratio obtained at this time with the screen occupation ratio corresponding to the recorded optimal loading duration when the screen occupation ratio change rate is larger than or equal to a preset value;
step S32, when the screen occupation ratio obtained this time is larger than the screen occupation ratio corresponding to the recorded optimal loading duration, updating the loading duration corresponding to the screen occupation ratio obtained this time into the optimal loading duration;
and step S33, when the preset time length is reached, taking the recorded optimal loading time length as the page loading time length.
In this embodiment, after the screen duty ratio change rate is acquired, the page loading duration is determined according to the screen duty ratio change rate.
Specifically, when the calculated screen duty ratio change rate is greater than or equal to a preset value, comparing the screen duty ratio obtained this time with the screen duty ratio corresponding to the recorded optimal loading duration, and when the screen duty ratio obtained this time is greater than the screen duty ratio corresponding to the previously recorded optimal loading duration, updating the loading duration corresponding to the screen duty ratio obtained this time to the optimal loading duration, where the preset value is a standard for judging whether the screen duty ratio tends to be stable, and when the screen duty ratio change rate is greater than or equal to the preset value, the change of the screen duty ratio tends to be stable, and determining the loading duration corresponding to the initial sampling point where the screen duty ratio tends to be stable as the optimal loading duration. For example, in the nth sampling process, when NB is in the process of n >When =0.95, determining that the page loading tends to be stable, and recording the current NB n Corresponding P n-2 The loading duration corresponding to the sampling point is P t If the loading duration P of the current record t The corresponding screen ratio R is larger than the screen ratio R corresponding to the last recorded optimal loading time, which indicates that when the loaded target visual component in the secondary sampling is more than the loaded target visual component in the last sampling, P is added t Updating to optimal load duration. It should be noted that the optimal loading time is recorded if and only if the screen duty ratio change rate is greater than or equal to the preset value. And after the preset time length is reached, determining the optimal loading time length as the page loading time length.
It should be noted that, when the screen occupation ratio obtained this time is smaller than the screen occupation ratio corresponding to the recorded optimal loading duration, the step of obtaining the screen occupation ratio of the page at the fixed time and loading the corresponding loading duration according to the screen occupation ratio is executed, that is, sampling is continued to obtain the screen occupation ratio of the page and load the corresponding loading duration according to the screen occupation ratio.
In the technical scheme provided by this embodiment, when the screen duty ratio change rate is greater than or equal to a preset value, the screen duty ratio obtained this time and the screen duty ratio corresponding to the recorded optimal loading duration are compared, when the screen duty ratio obtained this time is greater than the screen duty ratio corresponding to the recorded optimal loading duration, the loading duration corresponding to the screen duty ratio obtained this time is updated to the optimal loading duration, and when the preset duration is reached, the recorded optimal loading duration is used as the page loading duration. According to the scheme, the optimal loading time is continuously updated by comparing the screen occupation ratio with the preset value in the preset time, so that the accuracy of counting the page loading time is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a third embodiment of the statistical method for page loading duration according to the present invention, where based on the second embodiment, before the step of S33, the method further includes:
step S34, when the screen occupation ratio change rate is larger than or equal to a preset value, acquiring a fluctuation mark corresponding to the screen occupation ratio acquired this time;
and step S35, when the fluctuation mark is a preset mark, updating the loading time corresponding to the screen occupation ratio acquired at this time into the optimal loading time.
In this embodiment, one fluctuation flag W is maintained during sampling. If NB of the current sample n >NB of last sampling of =0.95 n <0.95 then fluctuation mark W = true otherwise fluctuation mark W = false. When the screen occupation ratio change rate acquired by the sub-sampling is larger than or equal to a preset value, acquiring a current-sampling recordAnd when the fluctuation mark is the preset mark W = true, the fluctuation mark of the record indicates that the page loading time length is increased due to the fact that network delay possibly occurs in the page loading process, and the loading time length corresponding to the sampling is updated to be the optimal loading time length.
In the technical scheme provided by this embodiment, when the screen duty ratio change rate is greater than or equal to a preset value, a fluctuation mark of this sampling record is obtained, whether the fluctuation mark is a preset mark is judged, when the fluctuation mark is a preset mark, the loading time corresponding to this sampling is updated to the optimal loading time, and after the preset time is reached, the optimal loading time is determined as the page loading time.
Based on the foregoing embodiments, the present invention further provides a terminal, where the terminal may include a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for counting page loading durations according to any one of the foregoing embodiments is implemented.
Based on the foregoing embodiments, the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the statistical method for page loading duration according to any of the foregoing embodiments.
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, method, article, or system 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, method, article, or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (9)

1. A statistical method for page loading duration is characterized in that the statistical method for page loading duration comprises the following steps:
the method comprises the steps of obtaining the screen proportion of a page and loading corresponding loading time of the page according to the screen proportion at regular time in preset time;
determining the screen occupation ratio change rate of the page according to the screen occupation ratio and the loading duration corresponding to the screen occupation ratio;
determining the page loading duration according to the screen ratio change rate;
the step of determining the page loading duration according to the screen duty ratio change rate comprises the following steps:
when the screen occupation ratio change rate is larger than or equal to a preset value, comparing the acquired screen occupation ratio and the screen occupation ratio corresponding to the recorded optimal loading duration, wherein the preset value is a standard for judging whether the screen occupation ratio tends to be stable or not;
when the screen occupation ratio acquired this time is larger than the screen occupation ratio corresponding to the recorded optimal loading duration, updating the loading duration corresponding to the screen occupation ratio acquired this time to the optimal loading duration;
when the screen occupation ratio obtained at this time is smaller than the screen occupation ratio corresponding to the recorded optimal loading duration, executing the step of obtaining the screen occupation ratio of the page at regular time and loading the corresponding loading duration according to the screen occupation ratio by the page;
and when the preset time length is reached, taking the recorded optimal loading time length as the page loading time length.
2. The statistical method for page loading duration according to claim 1, wherein before the step of taking the recorded optimal loading duration as the page loading duration when the preset duration is reached, the statistical method further comprises:
when the screen occupation ratio change rate is larger than or equal to a preset value, acquiring a fluctuation mark corresponding to the acquired screen occupation ratio;
and when the fluctuation mark is a preset mark, updating the loading time corresponding to the screen occupation ratio acquired at this time into the optimal loading time.
3. The statistical method for page loading durations as recited in claim 1, wherein the step of determining the screen duty ratio change rate of the page according to the screen duty ratio and the loading duration corresponding to the screen duty ratio comprises:
and determining the screen occupation ratio change rate of the page according to the currently acquired screen occupation ratio and the loading duration corresponding to the screen occupation ratio and the previously acquired preset number of screen occupation ratios and the loading duration corresponding to the screen occupation ratio.
4. The statistical method for page loading durations according to claim 3, wherein the step of determining the screen duty ratio change rate of the page according to the loading durations corresponding to the currently acquired screen duty ratio and the previously acquired preset number of screen duty ratios and screen duty ratios includes:
acquiring a first difference value between a currently acquired screen occupation ratio and a previously acquired screen occupation ratio and a second difference value between a loading time length corresponding to the currently acquired screen occupation ratio and a loading time length corresponding to the previously acquired screen occupation ratio;
calculating a ratio of the first difference to the second difference;
and determining the screen ratio change rate of the page according to the ratio.
5. The statistical method for page loading duration as claimed in claim 1, wherein the step of periodically obtaining the screen fraction of the page comprises:
acquiring the pixel area of a page;
acquiring the pixel area of the loaded target visual component in the page at fixed time;
and determining the screen occupation ratio of the page according to the pixel area of the page and the pixel area of the loaded target visual component in the page.
6. The statistical method for page loading duration as claimed in claim 5, wherein the step of obtaining the pixel area of the target visual component loaded in the page at regular time comprises:
acquiring the loaded target visual component in the page at fixed time;
and acquiring the pixel area of the loaded target visual component.
7. The statistical method for page loading duration according to claim 5, wherein the page includes a plurality of target visual components, and the step of periodically acquiring the target visual components loaded in the page includes:
regularly acquiring the address of each target visual component content;
when the address of the target visual component content is the same as the address of the target visual component content acquired last time, determining that the target visual component is loaded;
and acquiring the loaded target visual component.
8. A terminal, characterized in that it comprises a memory, a processor and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the statistical method of page load durations according to any one of claims 1 to 7.
9. A readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the statistical method of page load durations according to any one of claims 1 to 7.
CN202011471065.6A 2020-12-11 2020-12-11 Page loading duration statistical method, terminal and readable storage medium Active CN112579416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011471065.6A CN112579416B (en) 2020-12-11 2020-12-11 Page loading duration statistical method, terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011471065.6A CN112579416B (en) 2020-12-11 2020-12-11 Page loading duration statistical method, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN112579416A CN112579416A (en) 2021-03-30
CN112579416B true CN112579416B (en) 2023-01-31

Family

ID=75135048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011471065.6A Active CN112579416B (en) 2020-12-11 2020-12-11 Page loading duration statistical method, terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN112579416B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114935991A (en) * 2022-06-09 2022-08-23 成都新潮传媒集团有限公司 Statistical method, device and storage medium for cell display duration in table view
CN115617637A (en) * 2022-12-20 2023-01-17 北京仁科互动网络技术有限公司 Application page loading duration determining method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344044A (en) * 2018-10-08 2019-02-15 杭州有赞科技有限公司 Calculate the method and system of page head screen render time
CN109656645A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Presentation time determines the determination method and device of method and page rendering deadline
CN109976966A (en) * 2017-12-27 2019-07-05 阿里巴巴集团控股有限公司 A kind of application program launching time counting method, apparatus and system
CN110781063A (en) * 2019-10-25 2020-02-11 北京博睿宏远数据科技股份有限公司 Method, device and equipment for measuring first screen time of webpage and storage medium
CN111538885A (en) * 2020-04-24 2020-08-14 腾讯音乐娱乐科技(深圳)有限公司 Page monitoring method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108390961B (en) * 2018-01-25 2020-06-26 奇酷互联网络科技(深圳)有限公司 Touch response method and device, readable storage medium and mobile terminal
CN111026625A (en) * 2019-11-15 2020-04-17 贝壳技术有限公司 Method, device and storage medium for calculating page rendering time
CN111026989B (en) * 2019-11-15 2023-06-27 汉海信息技术(上海)有限公司 Page loading time detection method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656645A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Presentation time determines the determination method and device of method and page rendering deadline
CN109976966A (en) * 2017-12-27 2019-07-05 阿里巴巴集团控股有限公司 A kind of application program launching time counting method, apparatus and system
CN109344044A (en) * 2018-10-08 2019-02-15 杭州有赞科技有限公司 Calculate the method and system of page head screen render time
CN110781063A (en) * 2019-10-25 2020-02-11 北京博睿宏远数据科技股份有限公司 Method, device and equipment for measuring first screen time of webpage and storage medium
CN111538885A (en) * 2020-04-24 2020-08-14 腾讯音乐娱乐科技(深圳)有限公司 Page monitoring method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112579416A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112579416B (en) Page loading duration statistical method, terminal and readable storage medium
US20030169288A1 (en) Representative image generating apparatus
CN109445884B (en) Function label display method and terminal equipment
CN109344044B (en) Method and system for calculating rendering time of first screen of page
CN112291370A (en) Method for processing service access relation and related equipment
CN109902726B (en) Resume information processing method and device
CN116225600A (en) Application program recording method, playback method, device, medium and electronic equipment
CN109492163B (en) List display recording method and device, terminal equipment and storage medium
CN115527142A (en) Key frame searching method and device, storage medium and computer equipment
CN110121088B (en) User attribute information determination method and device and electronic equipment
CN112291121B (en) Data processing method and related equipment
CN114064445B (en) Test method, test device, test equipment and computer-readable storage medium
CN111629266B (en) Playing progress display method and device, electronic equipment and storage medium
CN110324707B (en) Video playing time consumption testing method and device
CN112399252B (en) Soft and hard decoding control method and device and electronic equipment
CN114510305B (en) Model training method and device, storage medium and electronic equipment
CN106302821B (en) Data request method and equipment thereof
CN110377362B (en) Method, device, terminal and storage medium for cleaning application program
CN113177176A (en) Feature construction method, content display method and related device
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN113377602A (en) Business operation monitoring method, device, equipment and storage medium
CN114675799A (en) Display range judging method, device, equipment and storage medium
CN114666673B (en) Information source channel renaming method, device, equipment and storage medium
CN114078018A (en) Multimedia information pushing method, equipment, storage medium and device
CN116501219A (en) Page help course display method and device, electronic equipment and automobile

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
GR01 Patent grant
GR01 Patent grant