CN109656645A - Presentation time determines the determination method and device of method and page rendering deadline - Google Patents

Presentation time determines the determination method and device of method and page rendering deadline Download PDF

Info

Publication number
CN109656645A
CN109656645A CN201710941580.8A CN201710941580A CN109656645A CN 109656645 A CN109656645 A CN 109656645A CN 201710941580 A CN201710941580 A CN 201710941580A CN 109656645 A CN109656645 A CN 109656645A
Authority
CN
China
Prior art keywords
time
determining
page
preset
page rendering
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
CN201710941580.8A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710941580.8A priority Critical patent/CN109656645A/en
Publication of CN109656645A publication Critical patent/CN109656645A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides the determination method and device that presentation time determines method and page rendering deadline, wherein, presentation time determines that method includes: the module being integrated in IOS systematic difference except original module, the described method includes: executing sampling operation to presetted pixel point set during page rendering, and record sampling time and the corresponding pixel value collection of the presetted pixel point set;Determine the variable quantity of the adjacent pixel values collection of the presetted pixel point set;The page rendering deadline is determined according to the variable quantity.The application can be in the case where no code invades modules, and accurate determine applies presentation time, in order to provide reference for determining application performance.

Description

Display time determining method and page rendering completion time determining method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for determining a presentation time and a method and an apparatus for determining a page rendering completion time.
Background
At present, a mobile terminal can be provided with a plurality of Applications (APP), and the quality of application performance can affect the use experience of a user. The application starting time and the page switching time are two important indexes in the application performance.
Currently, in an IOS operating system, the time-consuming process of acquiring application start is generally as follows: acquiring application starting time; and acquiring the time of calling the 'viewDidAppear function' by the application, and taking the time as the application starting completion time. And taking the difference value of the application starting completion time and the application starting time as the application starting time consumption.
Currently, in an IOS operating system, a time-consuming process for acquiring page switching generally includes: acquiring the starting time of page switching; and acquiring the time of calling the 'viewDidAppear function' by the application, and taking the time as the page switching completion time. And taking the difference value of the page switching completion time and the page switching start time as the page switching time consumption.
However, during application startup or page switching, an application calls the "viewdidappper function" to simply indicate that the page layout logic has completed. At the moment, the page is not rendered, and the user can view the page after the page rendering is completed. For the IOS system, the operating system does not provide any callback interface for rendering completion, so the callback interface cannot be used to obtain the page rendering completion time.
For the user, the application calls the "viewDidAppear function" time instead of the application start completion time or the page switch completion time felt by the user; therefore, the application startup time and the page switching time determined by the prior art scheme are inaccurate.
Disclosure of Invention
The inventor of the application finds out in the research process that:
adding codes in each module of the application which consumes time for starting the page or consuming time for starting the application, recording a timestamp of a page refreshed by the application by using the added codes after the application receives a network request response sent by a server, and determining the timestamp of the refreshed page as page switching completion time or application starting completion time.
According to the scheme, the time stamp for refreshing the page is later than the time for calling the 'viewDidAppear function' by the application, but the time stamp for refreshing the page is still earlier than the page rendering completion time. Moreover, codes need to be added to modules which consume time for starting each application page or application, and the implementation process is complicated.
Therefore, the time consumed by starting the application and the time consumed by switching the page, which are determined based on the scheme, are still inaccurate, and code invasion can be caused to modules in the application.
In view of this, the present application provides a method and a system for determining presentation time, which can accurately determine application presentation time without code intrusion into each module, so as to provide a reference for determining application performance.
In order to achieve the above object, the present application provides the following technical features:
a method for determining a page rendering completion time comprises the following steps:
performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
determining the variation of the adjacent pixel value sets of the preset pixel point set;
and determining the page rendering completion time according to the variable quantity.
Optionally, the determining the page rendering completion time according to the variation includes:
and under the condition that the variation of the pixel value set meets the preset variation for multiple times, determining the first sampling time when the variation of the pixel value set is less than or equal to the preset variation as the page rendering completion time.
Optionally, the case that the variation of the pixel value set satisfies the preset variation multiple times includes:
the change rate of the pixel value set is less than or equal to a preset change rate for multiple times; or,
the change value of the pixel value set is less than or equal to a preset change value for a plurality of times.
Optionally, if the preset variation is zero, determining the page rendering completion time according to the variation includes:
and under the condition that the plurality of pixel value sets are consistent, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
Optionally, the preset pixel point set includes one pixel point; the case that the variation of the pixel value set satisfies the preset variation for multiple times includes: the change quantity of the pixel value of the pixel point is less than or equal to the preset change quantity for multiple times.
Optionally, the method is applied to a module other than the original module applied in the IOS system.
Optionally, before performing a sampling operation on the preset pixel point set in the page rendering process, determining a page layout logic completion time;
the method further comprises:
stopping sampling operation after receiving a rendering ending instruction in the page rendering process; and determining the page layout logic completion time as the page rendering completion time.
Optionally, the determining the page layout logic completion time includes:
monitoring a function representing completion of page layout logic; recording the time when the function is called under the condition that the function is called; the time is determined as the page layout logic completion time.
Optionally, before performing a sampling operation on a preset pixel point set in a page rendering process, determining an operation start time;
the method further comprises: calculating a time difference value between the page rendering completion time and the operation starting time; and if the time difference value is within a preset time range, determining the time difference value as the display time of the operation.
Optionally, the obtaining the operation start time includes: acquiring application starting time or acquiring page switching starting time;
wherein the obtaining of the application start time comprises: and recording the time of loading the function of the class, and determining the time as the starting time of the application.
A presentation time determination method includes:
acquiring operation starting time; performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
determining the variable quantity of the adjacent pixel value set of the preset pixel point set, and determining the page rendering completion time according to the variable quantity;
and determining the time difference between the page rendering completion time and the operation starting time as the display time of the page corresponding to the operation.
Optionally, the method is applied to a module other than the original module applied in the IOS system.
Optionally, the obtaining the operation start time includes:
acquiring application starting time or acquiring page switching starting time;
wherein the obtaining of the application start time comprises: and recording the time for calling the loading function of the class, and determining the time as the starting time of the application.
Optionally, before performing a sampling operation on the preset pixel point set in the page rendering process, determining a page layout logic completion time;
the method further comprises:
stopping sampling operation after receiving a rendering ending instruction in the page rendering process;
and determining the page layout logic completion time as the page rendering completion time.
Optionally, after determining the page rendering completion time, the method further includes:
calculating a time difference value between the page rendering completion time and the operation starting time;
and if the time difference is within a preset time range, determining the time difference between the rendering completion time of the page and the operation starting time as the display time of the operation.
Optionally, the method further includes: and determining that the page display process is abnormal under the condition that the display time is greater than the threshold value.
Optionally, the method further includes: calculating the data volume of the page corresponding to the operation;
and determining the response speed of the corresponding page of the operation based on the data volume and the display time.
Optionally, the method further includes:
in the display process, counting the display time of a plurality of attributes in the page; wherein the plurality of attributes includes: text attributes, picture attributes and video attributes;
and outputting the showing time of each attribute.
A method for determining a page rendering completion time comprises the following steps:
performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
and under the condition that the multiple pixel value sets obtained by sampling the preset pixel point set are consistent, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
An apparatus for determining a page rendering completion time, comprising:
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
a variation determining unit configured to determine a variation of a set of adjacent pixel values of the preset set of pixel points;
and the time determining unit is used for determining the page rendering completion time according to the variable quantity.
Optionally, the determining the completion time unit determines the page rendering completion time according to the variation, and specifically includes: and under the condition that the variation of the pixel value set meets the preset variation for multiple times, determining the first sampling time when the variation of the pixel value set is less than or equal to the preset variation as the page rendering completion time.
Optionally, the case that the variation of the pixel value set satisfies the preset variation multiple times includes: the change rate of the pixel value set is less than or equal to a preset change rate for multiple times; alternatively, the change value of the set of pixel values is less than or equal to a preset change value a plurality of times.
Optionally, if the preset variation is zero, the determining completion time unit determines the page rendering completion time according to the variation, including: and under the condition that the plurality of pixel value sets are consistent, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
Optionally, the preset pixel point set includes one pixel point; the case that the variation of the pixel value set satisfies the preset variation for multiple times includes: the change quantity of the pixel value of the pixel point is less than or equal to the preset change quantity for multiple times.
Optionally, before performing a sampling operation on the preset pixel point set in the page rendering process, a layout logic completion time determining unit is further included, configured to determine a page layout logic completion time; then also include:
the completion time unit is determined and is also used for stopping sampling operation after receiving a rendering ending instruction in the page rendering process; and determining the page layout logic completion time as the page rendering completion time.
Optionally, the determining the page layout logic completion time includes: monitoring a function representing completion of page layout logic; recording the time when the function is called under the condition that the function is called; the time is determined as the page layout logic completion time.
A presentation time determination apparatus, comprising:
an acquisition unit configured to acquire an operation start time;
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
a variation determining unit, configured to determine a variation of a neighboring pixel value set of the preset pixel point set, and determine a page rendering completion time according to the variation;
and the time determining and finishing unit is used for determining the time difference value between the page rendering finishing time and the operation starting time as the display time of the page corresponding to the operation.
Optionally, before performing a sampling operation on a preset pixel point set in a page rendering process, determining an operation start time; wherein the obtaining operation start time includes: acquiring application starting time or acquiring page switching starting time;
wherein the obtaining of the application start time comprises: and recording the time of loading the function of the class, and determining the time as the starting time of the application.
Then also include:
the calculating unit is used for calculating a time difference value between the page rendering completion time and the operation starting time;
and the display time determining unit is used for determining the time difference value as the display time of the operation if the time difference value is within a preset time range.
Optionally, the method further includes: and the abnormity determining unit is used for determining that abnormity occurs in the page displaying process under the condition that the displaying time is greater than a threshold value.
Optionally, the method further includes: the response speed determining unit is used for calculating the data volume of the corresponding page; and determining the response speed of the corresponding page of the operation based on the data volume and the display time.
Optionally, the method further includes: determining the showing time corresponding to the attributes, and counting the showing time of the attributes in the page in the showing process; wherein the plurality of attributes includes: text attributes, picture attributes and video attributes; and outputting the showing time of each attribute.
An apparatus for determining a page rendering completion time, comprising:
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
and the time determining and finishing unit is used for determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering finishing time under the condition that the multiple pixel value sets obtained by sampling the preset pixel point set are consistent.
Through the technical means, the following beneficial effects can be realized:
according to the application, a new module is added in the application, and the module is used for calculating the time consumed by page switching and the time consumed by application starting, so that the intrusion code cannot be generated on the original module. In addition, the first sampling time when the pixel value set does not change is used as the page rendering completion time, and the application starting time and the page switching time which are obtained through calculation based on the page rendering completion time are closer to the real feeling of the user.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a terminal disclosed in an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining a presentation time according to an embodiment of the present disclosure;
FIGS. 3a-3b are schematic diagrams of sampling times disclosed in embodiments of the present application;
FIG. 4 is a flowchart of a method for determining a presentation time according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an apparatus for determining a page rendering completion time according to an embodiment of the present application;
fig. 6 is a schematic diagram of a presentation time determining apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
To facilitate understanding by those skilled in the art, the present application provides a mobile terminal that uses an IOS operating system. Referring to fig. 1, the mobile terminal includes a plurality of applications, and each application may include a plurality of existing modules implementing service functions.
In order to avoid the generation of intrusion codes on an original module, a new module is added in the application, and the module is used for calculating the time consumed by page switching and the time consumed by application starting. Other modules which need to use the time-consuming page switching or the time-consuming application starting can acquire the time-consuming page switching or the time-consuming application starting from the modules.
According to an embodiment provided by the present application, a first embodiment of a method for determining a presentation time is provided. The method is integrated in modules (namely new modules) outside original modules in the application of the IOS system. Referring to fig. 2, the method specifically includes the following steps:
step S201: an operation start time is acquired.
When the user triggers the application icon, the user is indicated as opening the application at present, so that the application start time can be acquired.
The first implementation mode comprises the following steps: the time when the "main function" is called is determined as the application start time.
The application calls the "main function" during the application opening process, so the module can monitor the "main function" and record the time when the "main function" is called, and take the time as the application start time.
The second implementation mode comprises the following steps: and recording the time for calling the loading function of the class, and determining the time as the starting time of the application.
The binary file is loaded in the application opening process, and according to the objective-critical time principle in the IOS system, the application actively calls the 'class loading function' when the IOS operating system loads the binary file. Therefore, the module monitors the class loading function and determines the time for calling the class loading function as the application starting time.
Since the time for calling the "class loading function" is before the time for calling the "main function", the application start time determined by the implementation mode is closer to the time when the user clicks the application icon.
And acquiring the starting time of page switching under the condition that the user triggers the application sub-page to trigger the page switching.
Depending on the situation that the user triggers the sub-page, the application may call a "push function", "tab function", or "addChildViewController function" when performing page switching.
Therefore, the module monitors a function (e.g., "push function", "tab function", or "adddevidviewcontroller function") indicating page switching, and records the call time of the function indicating page switching as the page switching start time.
Step S202: and acquiring the completion time of the page layout logic.
The application receives the network response sent by the server after sending the network request to the server, and carries out page layout according to the network response.
After the page layout logic is complete, the application will call a function, such as: "viewdidlayutreviews function", "layoutreviews function", or "viewdidappper function".
Thus, the module monitors a function (e.g., "viewDidLayoutSubvious function," "layoutSubvious function," or "viewDidAppear function") indicating the completion of the page layout logic, and records the time when the function is called, which is determined as the page layout logic completion time.
Step S203: and in the page rendering process, sampling operation is carried out on a preset pixel point set, and sampling time and a pixel value set corresponding to the preset pixel point set are recorded.
Because the IOS system does not have any callback interface after the rendering is finished, the technical scheme provided by the inventor of the application is as follows: the pixel value of the pixel point can be changed continuously in the process of rendering, and after the rendering process is finished, the pixel value of the pixel point is not changed any more. Therefore, whether the rendering process is completed is determined by whether the pixel value is changed.
After the page layout logic is complete, the application will perform a page rendering process. A plurality of pixels can be preset and form a preset pixel point set. The positions of a plurality of pixel points in the preset pixel point set are not limited.
Preferably, the pixels in the predetermined pixel set are distributed in different areas of the display screen, for example, the display screen is divided into four areas, i.e., an upper area, a lower area, a left area and a right area, and one pixel can be selected from the four areas respectively. Therefore, whether each area is rendered can be comprehensively known.
It can be understood that the more the number of the pixels in the preset pixel set, the more the subsequent comparison process, the more the CPU resources of the terminal are consumed, so the preset pixel set can include one pixel, and thus the comparison process can be executed only on one pixel, so that the comparison process is simple and convenient.
During the rendering process, a sampling operation may be performed on a set of preset pixel points, and a sampling time and a set of pixel values of the set of preset pixel points may be recorded. In the RGB mode, the pixel value set is a specific value of RGBR, where R is a red value, G is a green value, B is a blue value, RGB is between 0-255, R is transparency, and R is between 0-1.
The sampling period may be fixed in the usual case, for example 50ms or 100ms, for example 50ms as shown in fig. 3 a. The module then performs a comparison operation on the periodically obtained sets of pixel values. When the terminal performance is higher, the terminal is not affected.
Under the condition that the performance of the terminal is not good, the operation of periodically obtaining a plurality of pixel value sets is continuously compared, and great pressure is caused to the operation of a terminal CPU.
Referring to fig. 3b, the present embodiment proposes that the periodic sampling of the screen pixel values may be started with a period of 3 times 50ms, 4 times 100ms, and 5 times 150 ms. Since the rendering process is fast at the beginning of rendering, the sampling frequency is high, and the subsequent rendering process is slow, the sampling frequency is gradually reduced.
Assuming that 5 sampling operations are performed, see table 1, for the sampling time and pixel value set (for example, the preset pixel point set includes one pixel point) represented visually.
TABLE 1
Step S204: and judging whether the pixel value set of the preset pixel point set is not changed any more, if so, entering step S205, and otherwise, entering step S204.
After obtaining the sampling time 10050ms and the pixel value set 1 after the first sampling, and obtaining the sampling time 10100ms and the pixel value set 2 after the second sampling, comparing the pixel value set 1 at the first time and the pixel value set 2 at the second time to find that the two are inconsistent.
Then, in the continuous sampling process, the sampling time 10150ms and the pixel value set 2 obtained after the third sampling are obtained, and the pixel value set 2 obtained by the third sampling of the pixel value set 2 at the second time is compared, and the two are found to be consistent.
Since instability occurs during rendering, when the pixel value sets are consistent twice, it is further verified whether the subsequent pixel value is also the pixel value set 2 in order to ensure that the pixel value is not changed any more.
In the subsequent comparison process, the pixel value set of the preset pixel point set is found to be changed again, and the pixel value 3 is changed. The pixel value set 3 of the preset pixel point set is not changed; that is, when the pixel values of the consecutive preset times are consistent, it is determined that the pixel value set of the preset pixel point set does not change any more.
Step S205: and under the condition that the pixel value set of the preset pixel point set does not change any more, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
Continuing with the above example, the first sampling time 10200ms (fourth sampling time) of the pixel value 3 is taken as the page rendering completion time.
Step S206: and receiving a rendering ending instruction in the page rendering process, stopping sampling operation, and determining the page layout logic completion time as the page rendering completion time.
During the rendering process, some abnormal operation may occur to end the rendering process. For example, the user actively presses a "home key" to cause the application to switch home pages, the user actively presses an "power on" key to control screen blacking, and so on.
And stopping sampling operation after receiving a rendering ending instruction in the page rendering process. And determining the page layout logic completion time as the page rendering completion time because the preset pixel point set is still unstable.
Step S207: and calculating the time difference value between the page rendering completion time and the operation starting time.
Continuing with the above example, the page rendering completion time is 10200ms, and assuming that the obtained operation start time is 9900ms, the time difference between the two is 300 ms.
Step S208: and judging whether the time difference is within a preset time range, if so, entering the step S209, and if not, ending the step.
The technician sets the minimum time length and the maximum time length of the application starting time and the page switching time according to experience. The preset time range is composed of a minimum duration and a maximum duration.
The module determines whether the time difference is within a preset time range, and if so, it indicates that the time difference is valid (the terminal normally executes the operation process), and then the process goes to step S209. If not, the time difference is invalid (abnormality occurs in the terminal executing operation process).
Step S209: and determining the time difference value between the page rendering completion time and the operation starting time as the display time of the operation.
Through the technical means, the following beneficial effects can be realized:
according to the application, a new module is added in the application, and the module is used for calculating the time consumed by page switching and the time consumed by application starting, so that the intrusion code cannot be generated on the original module. In addition, the first sampling time when the pixel value set does not change is used as the page rendering completion time, and the application starting time and the page switching time which are obtained through calculation based on the page rendering completion time are closer to the real feeling of the user.
According to another embodiment provided by the present application, a second embodiment of a presentation time determination method is provided. The method is integrated in modules (namely new modules) outside original modules in the application of the IOS system. Referring to fig. 4, the method specifically includes the following steps:
step S401: an operation start time is acquired.
Step S402: and acquiring the completion time of the page layout logic.
Step S403: and in the page rendering process, sampling operation is carried out on a preset pixel point set, and sampling time and a pixel value set corresponding to the preset pixel point set are recorded. The pixel value set is described by taking table 1 as an example.
The above steps S401 to S403 can refer to the detailed description of steps S201 to S203, and are not described herein again.
Step S404: determining a variation of a set of neighboring pixel values of the set of preset pixel points.
Continuing with the above example, the variation is explained:
TABLE 2
Step S405: and under the condition that the variation of the pixel value set is less than or equal to the preset variation for multiple times, determining the first sampling time when the variation of the pixel value set is less than or equal to the preset variation as the page rendering completion time.
The precision in the above embodiment is higher, a preset variation may be set under the condition that the requirement for the rendering precision is not high, and the rendering of the page is determined to be completed under the condition that the variation of the pixel value set is less than or equal to the preset variation.
Continuing with the above example, assuming that the preset variation is 0.1, it can be found that the variation is 0 after the pixel value set is numbered 2, i.e. the variation is smaller than the preset variation. Therefore, the sampling time corresponding to the pixel value set corresponding to the sequence number 2 may be determined as the first sampling time, and the sampling time may be determined as the page rendering completion time.
Step S406: and receiving a rendering ending instruction in the page rendering process, stopping sampling operation, and determining the page layout logic completion time as the page rendering completion time.
Step S407: and calculating the time difference value between the page rendering completion time and the operation starting time.
Step S408: and judging whether the time difference is within a preset time range, if so, entering the step S409, and if not, ending.
Step S409: and determining the time difference value between the page rendering completion time and the operation starting time as the display time of the operation.
Through the technical means, the following beneficial effects can be realized:
according to the application, a new module is added in the application, and the module is used for calculating the time consumed by page switching and the time consumed by application starting, so that the intrusion code cannot be generated on the original module. In addition, the first sampling time when the pixel value set does not change is used as the page rendering completion time, and the application starting time and the page switching time which are obtained through calculation based on the page rendering completion time are closer to the real feeling of the user.
After the first embodiment and the second embodiment, the data volume of the operation corresponding page can be calculated; determining a page response speed corresponding to the operation based on the data volume and the display time; so that the page response speed can be invoked by a module that needs to use the page response speed.
In addition, in the page display process, the display time corresponding to each attribute can be respectively counted according to the attributes of the page content, for example, the display time of the character attribute, the display time of the picture attribute and the display time of the video attribute are counted; so that a module call is required that exposes the time using various attributes.
Of course, the presentation time of each attribute may also be output so that the user can view the presentation time of each attribute to determine whether the page performance is good.
Referring to fig. 5, there is provided an apparatus for determining a page rendering completion time, which is integrated in an application of an IOS system with a module other than an original module, the apparatus comprising:
the recording unit 401 is configured to perform sampling operation on a preset pixel point set in a page rendering process, and record sampling time and a pixel value set corresponding to the preset pixel point set;
a determining unit 402, configured to determine, as the page rendering completion time, the first sampling time corresponding to the current pixel value set of the preset pixel point set when the pixel value set of the preset pixel point set does not change any more.
For a specific implementation process of the determining apparatus regarding the page rendering completion time, reference may be made to the embodiment shown in fig. 2, which is not described herein again.
Referring to fig. 6, there is provided a presentation time determination apparatus integrated in a module other than an original module in an application of an IOS system, the apparatus including:
an acquisition unit 501 for acquiring an operation start time;
the recording unit 401 is configured to perform sampling operation on a preset pixel point set in a page rendering process, and record sampling time and a pixel value set corresponding to the preset pixel point set;
a determining unit 402, configured to determine, as a page rendering completion time, a first sampling time corresponding to a current pixel value set of the preset pixel point set when the pixel value set of the preset pixel point set does not change any more;
a display time determining unit 502, configured to determine a time difference between the page rendering completion time and the operation start time as a display time of the operation.
For a specific implementation process of the presentation time determining apparatus, reference may be made to the embodiment shown in fig. 2 or fig. 4, which is not described herein again.
The functions described in the method of the present embodiment, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (20)

1. A method for determining a page rendering completion time is characterized by comprising the following steps:
performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
determining the variation of the adjacent pixel value sets of the preset pixel point set;
and determining the page rendering completion time according to the variable quantity.
2. The method of claim 1, wherein determining a page rendering completion time based on the variance comprises:
and under the condition that the variation of the pixel value set meets the preset variation for multiple times, determining the first sampling time when the variation of the pixel value set is less than or equal to the preset variation as the page rendering completion time.
3. The method of claim 2, wherein the changing amount of the set of pixel values for a plurality of times satisfies a preset changing amount comprises:
the change rate of the pixel value set is less than or equal to a preset change rate for multiple times; or,
the change value of the pixel value set is less than or equal to a preset change value for a plurality of times.
4. The method of claim 2, wherein if the preset variation is zero, the determining the page rendering completion time according to the variation comprises:
and under the condition that the plurality of pixel value sets are consistent, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
5. The method of claim 2, wherein the predetermined set of pixel points comprises one pixel point;
the case that the variation of the pixel value set satisfies the preset variation for multiple times includes: the change quantity of the pixel value of the pixel point is less than or equal to the preset change quantity for multiple times.
6. The method of claim 1, wherein the method is applied to modules other than native modules applied in the IOS system.
7. The method of claim 1, prior to performing a sampling operation on a set of preset pixel points during page rendering, further comprising determining a page layout logic completion time;
the method further comprises:
stopping sampling operation after receiving a rendering ending instruction in the page rendering process;
and determining the page layout logic completion time as the page rendering completion time.
8. The method of claim 7, wherein the determining a page layout logic completion time comprises:
monitoring a function representing completion of page layout logic;
recording the time when the function is called under the condition that the function is called;
the time is determined as the page layout logic completion time.
9. A presentation time determination method, comprising:
acquiring operation starting time;
performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
determining the variable quantity of the adjacent pixel value set of the preset pixel point set, and determining the page rendering completion time according to the variable quantity;
and determining the time difference between the page rendering completion time and the operation starting time as the display time of the page corresponding to the operation.
10. The method of claim 9, wherein the method is applied to modules other than native modules applied in the IOS system.
11. The method of claim 10, wherein the obtaining an operation start time comprises:
acquiring application starting time or acquiring page switching starting time;
wherein the obtaining of the application start time comprises: and recording the time for calling the loading function of the class, and determining the time as the starting time of the application.
12. The method of claim 9, prior to performing a sampling operation on a set of preset pixel points during page rendering, further comprising determining a page layout logic completion time;
the method further comprises:
stopping sampling operation after receiving a rendering ending instruction in the page rendering process;
and determining the page layout logic completion time as the page rendering completion time.
13. The method of claim 11, after determining a page rendering completion time, further comprising:
calculating a time difference value between the page rendering completion time and the operation starting time;
and if the time difference is within a preset time range, determining the time difference between the rendering completion time of the page and the operation starting time as the display time of the operation.
14. The method of claim 9, further comprising:
and determining that the page display process is abnormal under the condition that the display time is greater than the threshold value.
15. The method of claim 9, further comprising:
calculating the data volume of the page corresponding to the operation;
and determining the response speed of the corresponding page of the operation based on the data volume and the display time.
16. The method of claim 9, further comprising:
in the display process, counting the display time of a plurality of attributes in the page; wherein the plurality of attributes includes: text attributes, picture attributes and video attributes;
and outputting the showing time of each attribute.
17. A method for determining a page rendering completion time is characterized by comprising the following steps:
performing sampling operation on a preset pixel point set in a page rendering process, and recording sampling time and a pixel value set corresponding to the preset pixel point set;
and under the condition that the multiple pixel value sets obtained by sampling the preset pixel point set are consistent, determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering completion time.
18. An apparatus for determining a page rendering completion time, comprising:
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
a variation determining unit configured to determine a variation of a set of adjacent pixel values of the preset set of pixel points;
and the time determining unit is used for determining the page rendering completion time according to the variable quantity.
19. A presentation time determination apparatus, comprising:
an acquisition unit configured to acquire an operation start time;
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
a variation determining unit, configured to determine a variation of a neighboring pixel value set of the preset pixel point set, and determine a page rendering completion time according to the variation;
and the time determining and finishing unit is used for determining the time difference value between the page rendering finishing time and the operation starting time as the display time of the page corresponding to the operation.
20. An apparatus for determining a page rendering completion time, comprising:
the device comprises a recording unit, a processing unit and a processing unit, wherein the recording unit is used for executing sampling operation on a preset pixel point set in the page rendering process and recording sampling time and a pixel value set corresponding to the preset pixel point set;
and the time determining and finishing unit is used for determining the first sampling time corresponding to the current pixel value set of the preset pixel point set as the page rendering finishing time under the condition that the multiple pixel value sets obtained by sampling the preset pixel point set are consistent.
CN201710941580.8A 2017-10-11 2017-10-11 Presentation time determines the determination method and device of method and page rendering deadline Pending CN109656645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710941580.8A CN109656645A (en) 2017-10-11 2017-10-11 Presentation time determines the determination method and device of method and page rendering deadline

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710941580.8A CN109656645A (en) 2017-10-11 2017-10-11 Presentation time determines the determination method and device of method and page rendering deadline

Publications (1)

Publication Number Publication Date
CN109656645A true CN109656645A (en) 2019-04-19

Family

ID=66109100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710941580.8A Pending CN109656645A (en) 2017-10-11 2017-10-11 Presentation time determines the determination method and device of method and page rendering deadline

Country Status (1)

Country Link
CN (1) CN109656645A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781067A (en) * 2019-10-30 2020-02-11 北京博睿宏远数据科技股份有限公司 Method, device, equipment and storage medium for calculating starting time consumption
CN111797339A (en) * 2019-11-07 2020-10-20 北京京东尚科信息技术有限公司 Page rendering monitoring method and device
CN112579416A (en) * 2020-12-11 2021-03-30 广州品唯软件有限公司 Page loading duration statistical method, terminal and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777939A (en) * 2013-03-18 2014-05-07 北京基调网络系统有限公司 Method for measuring webpage first screen time
CN103812713A (en) * 2012-11-06 2014-05-21 腾讯科技(深圳)有限公司 Method and apparatus for testing webpage loading time
CN103930885A (en) * 2011-11-16 2014-07-16 微软公司 Measuring web page rendering time
CN103955428A (en) * 2014-04-30 2014-07-30 百度在线网络技术(北京)有限公司 Method and equipment for testing response speed of application
CN104166614A (en) * 2013-05-17 2014-11-26 腾讯科技(深圳)有限公司 Frame rate detecting method for mobile device and related device
CN106202096A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 Customer terminal webpage rendering intent and device
CN106326097A (en) * 2015-07-01 2017-01-11 上海云双信息科技有限公司 Method and device for testing page perceived performance
CN106502902A (en) * 2016-10-25 2017-03-15 中国工商银行股份有限公司 Web page operational efficiency monitoring method and device
CN107239397A (en) * 2017-05-17 2017-10-10 北京微影时代科技有限公司 A kind of web automated testing methods and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103930885A (en) * 2011-11-16 2014-07-16 微软公司 Measuring web page rendering time
CN103812713A (en) * 2012-11-06 2014-05-21 腾讯科技(深圳)有限公司 Method and apparatus for testing webpage loading time
CN103777939A (en) * 2013-03-18 2014-05-07 北京基调网络系统有限公司 Method for measuring webpage first screen time
CN104166614A (en) * 2013-05-17 2014-11-26 腾讯科技(深圳)有限公司 Frame rate detecting method for mobile device and related device
CN103955428A (en) * 2014-04-30 2014-07-30 百度在线网络技术(北京)有限公司 Method and equipment for testing response speed of application
CN106202096A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 Customer terminal webpage rendering intent and device
CN106326097A (en) * 2015-07-01 2017-01-11 上海云双信息科技有限公司 Method and device for testing page perceived performance
CN106502902A (en) * 2016-10-25 2017-03-15 中国工商银行股份有限公司 Web page operational efficiency monitoring method and device
CN107239397A (en) * 2017-05-17 2017-10-10 北京微影时代科技有限公司 A kind of web automated testing methods and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MINGZHU_USTC: ""android测量网页加载时间"", 《HTTPS://BLOG.CSDN.NET/U010037124/ARTICLE/DETAILS/38468657》, 10 August 2014 (2014-08-10), pages 1 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781067A (en) * 2019-10-30 2020-02-11 北京博睿宏远数据科技股份有限公司 Method, device, equipment and storage medium for calculating starting time consumption
CN111797339A (en) * 2019-11-07 2020-10-20 北京京东尚科信息技术有限公司 Page rendering monitoring method and device
CN112579416A (en) * 2020-12-11 2021-03-30 广州品唯软件有限公司 Page loading duration statistical method, terminal and readable storage medium
CN112579416B (en) * 2020-12-11 2023-01-31 广州品唯软件有限公司 Page loading duration statistical method, terminal and readable storage medium

Similar Documents

Publication Publication Date Title
CN110324793B (en) Information reminding method and device and electronic terminal
CN110392306B (en) Data processing method and equipment
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN109656645A (en) Presentation time determines the determination method and device of method and page rendering deadline
US11991091B2 (en) Network resource pre-allocation method, device, and system, and medium
CN113051493A (en) Application program display method and device, storage medium and terminal
CN109388737B (en) Method and device for sending exposure data of content item and storage medium
CN110851327A (en) Hardware state information acquisition method and device, terminal and readable storage medium
CN116132742A (en) Method for determining video playing speed doubling value, video playing method, device and equipment
TW201344557A (en) Apparatus and method for automatically controlling display screen density
CN113992784B (en) Audio and video call method, device, computer equipment and storage medium
CN115797267A (en) Image quality evaluation method, system, electronic device, and storage medium
CN115357179A (en) Display screen management method, display screen management device, electronic equipment and storage medium
CN111767102B (en) Application program display method, information processing method, device and electronic equipment
CN106055229B (en) Display interface adjusting method and display interface adjusting module based on screen reading
CN112527539B (en) Interface detection method and related device
CN113641286A (en) Screen capturing method, electronic equipment and computer storage medium
CN114143590A (en) Video playing method, server and storage medium
CN112328351A (en) Animation display method, animation display device and terminal equipment
CN113791962B (en) Picture frame rate determining method and device
CN106776204B (en) Method and device for determining power consumption application
CN114222980A (en) Power consumption log processing method, device, electronic equipment and storage medium
CN112911400B (en) Video playing control method and device, storage medium and mobile terminal
CN111123744A (en) Menu recording method and device, storage medium and electronic equipment
CN109933537A (en) A kind of Caton detection method, relevant apparatus, equipment and computer-readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190419

RJ01 Rejection of invention patent application after publication