[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117076284A - Page loading time length detection method, equipment and storage medium - Google Patents

Page loading time length detection method, equipment and storage medium Download PDF

Info

Publication number
CN117076284A
CN117076284A CN202311351117.XA CN202311351117A CN117076284A CN 117076284 A CN117076284 A CN 117076284A CN 202311351117 A CN202311351117 A CN 202311351117A CN 117076284 A CN117076284 A CN 117076284A
Authority
CN
China
Prior art keywords
standard deviation
page
loading
application
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311351117.XA
Other languages
Chinese (zh)
Other versions
CN117076284B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311351117.XA priority Critical patent/CN117076284B/en
Publication of CN117076284A publication Critical patent/CN117076284A/en
Application granted granted Critical
Publication of CN117076284B publication Critical patent/CN117076284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a method, equipment and storage medium for detecting page loading time. When the method monitors the starting application or the skip operation of the pages in the application, the standard deviation of the page loading process is determined according to the histogram data by collecting the corresponding histogram data in different page loading processes, and then according to the change condition of the standard deviation in the page loading process, the electronic equipment can be accurately determined when the page starts to be loaded, and when the page is successfully loaded, and further the standard deviation of the page loading time length and the current log data of the electronic equipment can be reported to a cloud server, so that research and development personnel can accurately determine the loading time length of the corresponding page and the specific reason affecting the page loading time length according to the change of the standard deviation in the page loading process, and further the subsequent optimization of products is facilitated.

Description

Page loading time length detection method, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for detecting page loading duration.
Background
With the continuous development of computer and mobile terminal technologies, more and more applications can be installed in the electronic terminal, which brings great convenience to the daily life and work of users.
In order to better meet the experience requirements of users on the application program, developers of the application program can optimize the application program according to various indexes so as to improve the user experience. The page loading time is an important index in user experience.
Therefore, how to accurately measure the page loading time corresponding to each application in the electronic terminal is particularly important.
Disclosure of Invention
In order to solve the technical problems, the application provides a method, equipment and a storage medium for detecting page loading time, which aim to accurately determine when an electronic device starts loading a page and when the page is successfully loaded, namely accurately determine the page loading time corresponding to each application in the electronic device.
In a first aspect, the application provides a method for detecting page loading time, which is applied to electronic equipment. The method comprises the following steps: displaying a user interface, wherein the user interface comprises target options; responding to clicking operation of the target option, and loading a target page; in the process of loading the target page, acquiring loaded histogram data corresponding to each frame, wherein the histogram data comprises the number of pixels corresponding to each brightness level; for each frame, determining a standard deviation from the histogram data; judging whether the continuous variation of a plurality of standard deviations meets the preset threshold variation or not; when the preset threshold change is met, determining that loading of the target page is completed, and acquiring current log data of the electronic equipment; reporting the log data and the corresponding standard deviation in the loading process of the target page to a server; the server determines the starting loading time and the ending loading time of the target page according to the change of standard deviation in the loading process of the target page, and determines the reason affecting the loading time of the target page according to the log data.
The user interface may be any interface of the electronic device for a user to operate, such as a main interface, or a page of an application program.
The target page may be any page that needs to be loaded. The application may be started, or the starting page or the main page of the application may be a page included in the started application.
The target options can be icons, controls and the like displayed in a user interface for a user to operate.
The acquired current log data of the electronic equipment, namely the data acquired by the electronic equipment by executing the dotting operation. Such log data may include, for example, data related to system performance that can represent the current load, temperature, network, etc. of the electronic device. Corresponding system data when loading the target page, such as application data (applog), event data (eventlog), kernel data (kernel), etc., may also be included. Status information of the current system of the electronic device may also be included.
The log data may be reported periodically, or may be reported when an appropriate time is selected, for example, when the electronic device is idle.
When the application is started or the jump operation of the page in the application is monitored, the standard deviation of the page loading process is determined according to the histogram data by collecting the corresponding histogram data of different page loading processes, and then according to the change condition of the standard deviation in the page loading process, the electronic equipment can be accurately determined when the page starts to be loaded, and when the page is successfully loaded, and then the standard deviation of the page loading time length and the current log data of the electronic equipment can be reported to a cloud server, so that research and development personnel can accurately determine the loading time length of the corresponding page and the specific reason affecting the page loading time length according to the change of the standard deviation in the page loading process, and further the subsequent optimization of products is facilitated.
According to a first aspect, determining whether a change in a plurality of consecutive standard deviations meets a preset threshold change includes: determining whether the standard deviation of two adjacent frames is in an ascending trend or not after clicking operation according to the standard deviation of the two adjacent frames, and the standard deviation corresponding to the next frame is larger than a preset first threshold value; when the ascending trend is presented and the standard deviation corresponding to the later frame is larger than a first threshold value, the later frame is marked as a starting frame for starting loading the target page, and the starting frame corresponds to the loading starting time; starting from a starting frame, determining whether the corresponding standard deviation is in a descending trend in the loading process of the target page according to the standard deviation of continuous N frames, wherein N is an integer greater than or equal to 2; and when the drop exceeds the second threshold value for a preset number of times, determining a plurality of continuous standard deviation changes, and meeting the preset threshold value changes.
Wherein the first threshold is, for example, 130000 (13 w). The second threshold is 9000 (9 k), for example.
According to the first aspect, or any implementation manner of the first aspect, when a subsequent frame is recorded as a start frame for starting loading the target page, the method further includes: initializing a dip counter, and setting the value of the dip counter to 0; in the process of determining the loading of the target page according to the standard deviation of the continuous N frames each time, when the corresponding standard deviation is in a downloading trend and falls beyond a second threshold value, the value of the dip counter is increased by 1; when the value of the dip calculator reaches a preset M, which is an integer greater than 0, it is determined that the dip exceeds the second threshold a preset number of times.
Wherein M may be 3.
Therefore, by setting the self-increasing dip counter, under the condition that the standard deviation is reduced to exceed the second threshold value each time, the self-increasing operation is directly carried out on the dip counter, when the value of the dip counter is increased to a set value, the standard deviation can be directly determined to be reduced to exceed the preset times, and then the target page loading is determined to be completed, so that the page loading time determined based on the standard deviation change is more accurate and reasonable.
According to the first aspect, or any implementation manner of the first aspect, when a subsequent frame is recorded as a start frame for starting loading the target page, the method further includes: initializing a dip counter, and setting the value of the dip counter to M, wherein M is an integer greater than 0; in the process of determining the loading of the target page according to the standard deviation of the continuous N frames each time, when the corresponding standard deviation is in a downloading trend and falls beyond a second threshold value, the value of the dip counter is reduced by 1; when the value of the dip calculator becomes 0, it is determined that the dip exceeds the second threshold preset number of times.
Wherein M may be 3.
Therefore, by setting the self-decreasing dip counter, under the condition that the standard deviation decreases each time and exceeds the second threshold value, the self-decreasing operation is directly carried out on the dip counter, when the value of the dip counter decreases to 0, the fact that the standard deviation decreases more than the preset times can be directly determined, and then the target page loading is determined to be completed, and therefore the page loading time determined based on the standard deviation change is more accurate and reasonable.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: determining whether the standard deviation of the last frame in the continuous N frames is smaller than a preset third threshold value or not when determining that the corresponding standard deviation is in a downloading trend in the loading process of the target page according to the standard deviation of the continuous N frames each time; and when the standard deviation is smaller than the third threshold value, determining a plurality of continuous standard deviation changes, and meeting the preset threshold value changes.
The third threshold is, for example, 80000 (8 w).
Since under normal conditions, after the page is loaded, the corresponding standard deviation can be stabilized below 80000 (8 w), when the standard deviation is lower than a third threshold, whether the current dip frequency reaches the preset frequency or not can be considered as the target page is loaded, and therefore the determined page loading time is more accurate and reasonable.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: recording the starting time for starting to acquire the histogram data; when the preset threshold change is not met, determining whether the time difference value of the current time of the time interval for starting to acquire the histogram data is larger than a preset time threshold; and when the time threshold value is larger than the time threshold value, acquiring current log data of the electronic equipment.
Wherein the preset time threshold is, for example, 5s. The setting of the time threshold may be set by default in the program when the histogram attribute is turned on.
Therefore, the dotting operation is executed, and the precondition of the current log data of the electronic equipment is obtained, so that the normal page loading scene is considered, and the scene that the page cannot be loaded is considered. Namely, when the page is not loaded successfully normally, but reaches a set time threshold, dotting operation is also executed, so that research personnel can be ensured to know log data in various scenes, and further, products are optimized.
According to the first aspect, or any implementation manner of the first aspect, the histogram data is gray level histogram data, and the luminance level included in the histogram data includes 0 to 255 gray levels.
The content (image) of the page to be loaded is converted into the gray level image, so that the acquired gray level histogram data can comprise 256 gray levels of 0-255, visible banding distortion can be avoided, and subsequent programming processing is easy.
According to a first aspect, or any implementation manner of the first aspect, determining a standard deviation according to histogram data includes: determining an average value corresponding to the histogram data according to the pixel quantity corresponding to 0-255 gray levels respectively; according to the average value and the pixel number corresponding to 0-255 gray levels, determining the variance corresponding to the histogram data; from the variance, the standard deviation is determined.
Thus, the determination of the standard deviation of the histogram data corresponding to the image to be loaded for each frame is realized.
According to the first aspect, or any implementation manner of the first aspect, the user interface is a main interface of the electronic device, icons of application programs installed by the electronic device are displayed in the main interface, the target options are icons corresponding to any application program installed by the electronic device, and the target page is a main page of the application program corresponding to the target option.
Therefore, under the scene of starting an application program, the loading time length corresponding to the main page of the selected application program can be accurately determined based on the change of the standard deviation calculated by the histogram data in the page loading process of the started application program, and the log data during the period from the beginning of loading the page to the ending of loading is reported to the server, so that research and development personnel can conveniently and accurately locate reasons affecting the page loading time length under different scenes, and further, the optimization of products is facilitated.
According to the first aspect, or any implementation manner of the first aspect, the user interface is a main page of any application program installed on the electronic device, the target option is an option displayed in the main page, the target page is other pages included in the application program displaying the main page, and the other pages do not include the main page.
Therefore, under the scene of switching among different pages included in the application program, the loading time length corresponding to each page can be accurately determined based on the change of standard deviation calculated by the histogram data in the loading process of the different pages, and the log data in the loading period from the beginning to the ending of the page is reported to the server, so that research and development personnel can accurately position reasons affecting the loading time length of the page in different scenes, and further optimization of products is facilitated.
In a second aspect, the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the instructions of the first aspect or of the method in any possible implementation of the first aspect.
Any implementation manner of the second aspect and the second aspect corresponds to any implementation manner of the first aspect and the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a third aspect, the application provides a computer readable medium storing a computer program comprising instructions for performing the method of the first aspect or any possible implementation of the first aspect.
Any implementation manner of the third aspect and any implementation manner of the third aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation manner of the third aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a fourth aspect, the present application provides a computer program comprising instructions for performing the method of the first aspect or any possible implementation of the first aspect.
Any implementation manner of the fourth aspect and any implementation manner of the fourth aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. Technical effects corresponding to any implementation manner of the fourth aspect may be referred to the technical effects corresponding to any implementation manner of the first aspect, and are not described herein.
In a fifth aspect, the present application provides a chip comprising processing circuitry, transceiver pins. Wherein the transceiver pin and the processing circuit communicate with each other via an internal connection path, the processing circuit performing the method of the first aspect or any one of the possible implementation manners of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals.
Any implementation manner of the fifth aspect and any implementation manner of the fifth aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. Technical effects corresponding to any implementation manner of the fifth aspect may be referred to the technical effects corresponding to any implementation manner of the first aspect, and are not described herein.
Drawings
FIGS. 1A-1D are schematic diagrams illustrating a page load scenario;
FIGS. 2A and 2B are diagrams illustrating a loaded page and a corresponding histogram for the page;
fig. 3 is a schematic diagram of a hardware structure of an exemplary electronic device;
FIG. 4 is a schematic diagram of a software architecture of an exemplary electronic device;
fig. 5 is a schematic flow chart of a method for detecting page loading duration according to an embodiment of the present application;
Fig. 6A to fig. 6C are schematic views of interface changes during an application program is started and a target page corresponding to the application program is loaded;
fig. 7 is a schematic diagram showing a change in standard deviation in the process from the interface 10d1 shown in fig. 6A to the interface 10d4 shown in fig. 6C, which is exemplarily shown.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment of the present application is not to be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
With the continuous development of computer and mobile terminal technologies, there are more and more applications (hereinafter referred to as applications) that can be installed in electronic terminals (electronic devices). For example, various audio and video playback applications, various office applications such as mail, notepad, various picture applications. These applications provide great convenience to the daily life and work of the user.
Currently, in order to better meet the use requirements of users, multiple pages (interfaces) are nested in various applications, and the users can realize the jumping of different pages through controls/icons included in each page. However, during the process of application startup or in-application page switching, a white screen or loading failure may occur.
In the following, a mobile phone is taken as an example, and applications installed in an electronic device, such as starting of a gallery application, and switching loading of different pages in the gallery application are described in association with the drawings.
In fig. 1A (1), a cell phone interface 10a is exemplarily shown. Referring to fig. 1A (1), the interface 10a is shown with icons of a plurality of applications, such as icon 10a-1 of gallery applications, and icons of applications of cameras, address books, telephones, information, clocks, calendars, memos, file management, email, music, calculators, videos, recorders, weather, browsers, settings, and the like, for example.
It should be noted that, in some possible implementations, the interface 10a shown in (1) in fig. 1A may be referred to as a main interface. When the user clicks the icon 10a-1 in the interface 10a, the mobile phone responds to the operation behavior to start the gallery application. And, under normal circumstances, the default interface of the gallery application, such as interface 10b shown in fig. 1A (2), will be quickly loaded after the gallery application is started. However, in some implementation scenarios, starting and loading anomalies may occur due to current resources of the mobile phone, or the operating system, or gallery application version, etc. Such as when the user clicks on the icon 10a-1 in the interface 10a shown in (1) of fig. 1B, a white screen appears or the interface 10B shown in (2) of fig. 1A is not quickly loaded, resulting in the appearance of the interface 10B shown in (2) of fig. 1B.
Referring to fig. 1C (1), by way of example, in some possible implementations, a user may operate various controls in the normally displayed interface 10b, such as the control 10b-1 corresponding to all photo collections taken by the camera. Illustratively, normally, when the user clicks the control 10b-1, the handset will jump from the interface 10b shown in fig. 1C (1) to the interface 10C shown in fig. 1C (2) in response to the action. However, in some implementation scenarios, starting and loading anomalies may occur due to current resources of the mobile phone, or the operating system, or gallery application version, etc. Such as when the user clicks on control 10b-1 shown in fig. 1D, a white screen appears or interface 10C shown in fig. 1C (2) is not quickly loaded, resulting in the appearance of interface 10C shown in fig. 1D (2).
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Therefore, in order to better meet the experience requirements of the user on the application, the developer of the application program can optimize the application program according to various indexes so as to improve the user experience. The page loading time is an important index in user experience. However, since the loading logic of the current application is almost realized by the control of the application side, there is no way for the system side to accurately measure the page loading time corresponding to each application in the electronic device.
In view of this, the embodiment of the application provides a method for detecting page loading duration, when an application is started or a skip operation of an internal page is applied is monitored, by collecting corresponding histogram data in different page loading processes, determining standard deviation of the page loading process according to the histogram data, and further determining when an electronic device starts loading a page according to the variation condition of the standard deviation in the page loading process, and when the page is successfully loaded, namely, accurately determining the page loading duration corresponding to each application in the electronic device.
A Histogram (Histogram) is a statistical report of a series of vertical stripes, or line segments, or data points representing a data distribution. In general, the data type may be represented by the horizontal axis and the distribution by the vertical axis. In the embodiment of the application, the histogram data of each frame obtained in the page loading process includes the number of pixels corresponding to each brightness level. Based on the histogram data of each frame, a histogram with the horizontal axis as the brightness level and the vertical axis as the number of pixels can be drawn.
Specifically, in this embodiment, the acquired histogram data is specifically gray-scale histogram data, that is, the luminance level includes 256 gray levels (gray values) of 0 to 255, so that not only visible banding distortion can be avoided, but also subsequent programming processing is easy.
For ease of understanding, the following detailed description is made with reference to the accompanying drawings. Illustratively, take the page to be loaded as the screen shown in fig. 2A as an example. For the screen shown in fig. 2A, the electronic device collects gray-level histogram data, for example, as shown in table 1, during the loading process.
Table 1 histogram data corresponding to the page shown in fig. 2A
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Illustratively, the plotted gray-level histogram may be as shown in fig. 2B based on the number of pixels corresponding to each gray-level shown in table 1.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment. In the method for detecting the page loading time provided by the embodiment of the application, only the histogram data is required to be acquired, and the histogram shown in fig. 2B is not required to be drawn.
It is to be noted that, according to the calculation principle of the standard deviation, the standard deviation corresponding to the gradation histogram data is higher as the page color is single, that is, as the gradation level of the existing pixels is smaller. Conversely, the more rich the page color, the lower the standard deviation.
In addition, as can be seen from the above description of the page loading scenario, in the page loading process, when the white screen is present and the page cannot be loaded, the current page color is usually single, and the displayed page is normally loaded, and the color is usually relatively rich, as shown in fig. 2A. Based on the above, the higher the standard deviation is, the larger the probability of white screen occurrence and loading failure is, and the condition needs to be optimized and perfected by research personnel. Otherwise, the lower the standard deviation is, the smaller the probability that the white screen appears and the page cannot be loaded is, namely the page is normally loaded.
Therefore, according to different scenes of different applications, the corresponding standard deviation is determined by utilizing the histogram data collected in the page loading process, and the page loading time length corresponding to each application in the electronic equipment can be measured rapidly and accurately through the change of the standard deviation.
In order to better understand the technical solution provided by the embodiments of the present application, the following describes the hardware structure and the software structure of the electronic device with reference to fig. 3 and fig. 4.
It should be noted that, the electronic device to which the embodiment of the present application is applicable may be, for example, a device capable of installing various application programs, such as a mobile phone, a tablet computer, and an intelligent wearable device.
Taking the mobile phone 100 as an example, the electronic device according to the embodiment of the present application is applicable. As one possible implementation, the handset 100 may include various functional devices as shown in fig. 3.
Referring to fig. 3, exemplary, the handset 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, among others.
The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a Modem processor (Modem), a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a neural network processor (neural-network processing unit, NPU), etc., which are not further listed here, and the present application is not limited thereto.
The controller as the processing unit may be a neural center or a command center of the mobile phone 100. In practical application, the controller can generate operation control signals according to the instruction operation codes and the time sequence signals to complete instruction fetching and instruction execution control.
With respect to the modem processor described above, a modulator and demodulator may be included. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal and transmitting the low-frequency baseband signal obtained by demodulation to the baseband processor for processing.
The baseband processor is used for processing the low-frequency baseband signal transmitted by the regulator and transmitting the processed low-frequency baseband signal to the application processor.
It should be noted that in some implementations, the baseband processor may be integrated within the modem, i.e., the modem may be provided with the functionality of the baseband processor.
With respect to the above-mentioned application processor, it is used to output sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or to display images or videos through the display screen 194.
In particular, in the technical scheme provided by the embodiment of the application, an application processor is needed for loading the page.
The above-mentioned digital signal processor is used for processing digital signals. Specifically, the digital signal processor may process other digital signals in addition to the digital image signal.
With respect to the video codec described above, it is used for compressing or decompressing digital video. Illustratively, the handset 100 may support one or more video codecs. In this way, the mobile phone 100 can play or record video in multiple coding formats, for example: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The ISP is used for outputting the digital image signal to the DSP processing. Specifically, the ISP is used to process data fed back by the camera 193. For example, when photographing and video recording, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some implementations, the ISP may be provided in the camera 193.
The DSP is used to convert digital image signals into standard RGB, YUV, and other image signals.
Furthermore, it should be noted that, with respect to the processor 110 including the processing units described above, in some implementations, the different processing units may be separate devices. That is, each processing unit may be considered a processor. In other implementations, different processing units may also be integrated in one or more processors.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Further, the processor 110 may also include one or more interfaces. The interfaces may include, but are not limited to, an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
Further, a memory may be provided in the processor 110 for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
With continued reference to fig. 3, the external memory interface 120 may be used to interface with an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, pictures, videos, etc. are stored in an external memory card.
With continued reference to fig. 3, the internal memory 121 may be used to store computer executable program code, including instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, and a function for implementing detection of a page loading time length in the embodiment of the present application) required for at least one function, and the like. The storage data area may store data created during use of the handset 100 (pictures, videos that may be viewed through a gallery application in the above embodiments), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
With continued reference to fig. 3, the charge management module 140 is operable to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. Understandably, the method comprises the steps of. The charge management module 140 may also power the electronic device through the power management module 141 while charging the battery 142.
With continued reference to fig. 3, the power management module 141 is configured to connect the battery 142, the charge management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other implementations, the power management module 141 may also be provided in the processor 110. In other implementations, the power management module 141 and the charge management module 140 may also be disposed in the same device.
With continued reference to fig. 3, the wireless communication function of the handset 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and so on.
The antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other implementations, the antenna may be used in conjunction with a tuning switch.
With continued reference to fig. 3, the mobile communication module 150 may provide a solution for wireless communications, including 2G/3G/4G/5G, applied to the handset 100.
With continued reference to fig. 3, the wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), and the like, as applied to the handset 100.
It should be noted that, in some implementations, when the page loading operation occurs, the mobile phone 100 may determine whether the page loading is completed through the change of the standard deviation, so as to trigger the dotting operation in time, obtain the current log data of the mobile phone 100, and report the obtained log data and the standard deviation of each frame involved in the page loading process to a corresponding server (which may be a cloud server), so that research personnel can collect the log data, and then perform unified processing, optimize and perfect the page loading logic of the application that generates the log data, or optimize the operating system of the mobile phone 100, and so on.
For example, for a scenario in which such log data is delivered to a cloud server, the mobile phone 100 may communicate with the cloud server or other servers through the mobile communication module 150 or the wireless communication module 160. For example, after the mobile phone 100 may send the page load to the cloud server through the mobile communication module 150, the mobile phone 100 may log data currently. Accordingly, the cloud server can push the application version, the operating system version and the like of the research and development personnel after optimizing processing according to the log data reported by the mobile phone 100 to the mobile phone 100 so as to update the application, the operating system and the like which are installed in the mobile phone 100 and have abnormal problems, so that the loading of pages can be quickly realized in the subsequent use of the application, and the situations of white screen and incapability of loading are reduced.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
With continued reference to fig. 3, the audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and the like. Illustratively, the handset 100 may implement audio functionality through a speaker 170A, a receiver 170B, a microphone 170C, an earpiece interface 170D, etc. in the application processor and audio module 170. Such as an audio and video recording function.
With continued reference to fig. 3, the sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not further illustrated herein, but are not limiting.
With continued reference to fig. 3, the keys 190 include a power-on key, a volume key, etc. The handset 100 may receive key inputs, generating signal inputs related to user settings and function control of the handset 100. The motor 191 may generate a vibration cue. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
With continued reference to fig. 3, a camera 193 is used to capture still images or video. The mobile phone 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like. Specifically, the object generates an optical image through a lens and projects the optical image onto a photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some implementations, the cell phone 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
With continued reference to fig. 3, a display screen 194 is used to display images, video, etc. The display 194 includes a display panel. In some implementations, the cell phone 100 may include 1 or N display screens 194, N being a positive integer greater than 1. The cell phone 100 may implement display functions through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
As to the hardware architecture of the handset 100, it should be understood that the handset 100 shown in fig. 3 is only one example, and in a specific implementation, the handset 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 3 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
In order to better understand the software structure of the mobile phone 100 shown in fig. 3, the following describes the software structure of the mobile phone 100. Before explaining the software structure of the mobile phone 100, an architecture that the software system of the mobile phone 100 can employ will be first described.
Specifically, in practical applications, the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
Furthermore, it is understood that software systems currently in use in mainstream electronic devices include, but are not limited to, windows systems, android systems, and iOS systems. For convenience of explanation, the embodiment of the present application takes an Android system with a layered architecture as an example, and illustrates a software structure of the mobile phone 100.
In addition, the detection scheme of the page loading time provided by the embodiment of the application is applicable to other systems in specific implementation.
Referring to fig. 4, a software architecture diagram of a mobile phone 100 according to an embodiment of the present application is shown.
As shown in fig. 4, the layered architecture of the handset 100 divides the software into several layers, each with a clear role and division. The layers communicate with each other through a software interface. In some implementations, the Android system is divided into five layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun rows (Android run) and libraries, a hardware abstraction layer (hardware abstraction layer, HAL), and a kernel layer, respectively.
The application layer may include a series of application packages, among other things. As shown in fig. 4, the application package may include applications such as camera, setup, map, WLAN, bluetooth, gallery, music, etc., which are not to be construed as limiting the application.
It should be noted that, the detection of the page loading time length involved in the application starting process and the detection of the page loading time length performed when different pages in the application jump after the application is started can be based on the detection method of the page loading time length provided by the embodiment of the application, the loading time length of the non-passing page under different scenes can be accurately determined, and the reason affecting the page loading time length can be positioned.
Wherein the application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. In particular, in the technical scheme provided by the embodiment of the application, the application program framework layer may include a histogram data acquisition module, a standard deviation calculation module, a standard deviation change monitoring module and a dotting module as shown in fig. 4.
Specifically, in the technical solution provided in the embodiment of the present application, the histogram data collection module is configured to start to obtain histogram data in the page loading process according to an event notification sent by a triggered application when page loading occurs, where the histogram data may specifically be gray level histogram data, for example, the number of pixels corresponding to 256 gray levels, such as 0-255 shown in table 1, respectively.
And the standard deviation calculation module is used for calculating the standard deviation corresponding to each frame aiming at the histogram data of each frame. Taking calculation of standard deviation corresponding to one frame of histogram data as an example, specifically, an average value corresponding to the histogram data may be determined according to the number of pixels corresponding to 256 gray levels of 0-255. Then, the variance corresponding to the histogram data, that is, the number of pixels per gray level minus the average is determined from the average and the number of pixels corresponding to the 256 gray levels, respectively, and then squared, and then these squared numbers are added up and divided by 256. And finally, root marking is carried out on the difference.
The standard deviation change monitoring module is used for determining whether the change of the standard deviation of the continuous multiframe shows an ascending trend or a descending trend, and comparing the standard deviation with a preset threshold value when the ascending area or the descending trend is shown, so as to determine whether the standard deviation meets the preset threshold value change.
And the dotting module is used for triggering the electronic equipment to execute dotting operation when the standard deviation change monitoring module monitors that the standard deviation change meets the preset threshold value change, namely, the current log data of the electronic equipment is obtained.
In the technical scheme provided by the embodiment of the application, the electronic equipment executes dotting operation, and the obtained log data can comprise data related to system performance, such as current load, temperature, network and the like of the electronic equipment.
The above-mentioned log data related to the system performance may be acquired, for example, by sytrece (a tool for analyzing the performance of the Android system) which is installed in the electronic device in advance.
Also for example, system data corresponding to when the target page is loaded, such as application data (applog), event data (eventlog), kernel data (kernel), and the like, may be included.
Also for example, status information of the current system of the electronic device may be included. Illustratively, in one implementation, the status information is, for example, information obtained by a snapshot technique, such as janklog, bugreport, eventinfo, dunpsys, properties, sensor.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
It should be understood that the above-mentioned division of the functional modules is merely an example for better understanding the technical solution of the present embodiment, and is not the only limitation of the present embodiment. In practical applications, the above functions may also be integrated into one functional module, which is not limited in this embodiment.
In addition, in practical applications, the above-mentioned functional modules may also be represented as a service, a framework, for example, the histogram data collection module may be represented as a histogram data collection service, or a histogram data collection framework, which is not limited in this embodiment.
In addition, it should be noted that the application framework layer may also provide other application programming interfaces and programming frameworks for application programs of the application framework layer. Such as a window manager, content provider, view system, phone manager, resource manager, notification manager, etc., which are not explicitly recited herein, the application is not limited in this regard.
Wherein the window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Wherein the content provider is used to store and retrieve data and make such data accessible to the application. The data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc., which are not listed here, and the present application is not limited thereto.
The view system comprises visual controls, such as a control for displaying characters, a control for displaying pictures and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
Wherein the telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like, which are not listed here, but are not limiting.
The notification manager enables the application program to display notification information in a status bar, can be used for conveying notification type information, and can automatically disappear after a short stay without user interaction.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
The Android run time comprises a core library and a virtual machine. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional (3D) graphics processing Libraries (e.g., openGL ES), two-dimensional (2D) graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video formats for playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
It will be appreciated that the 2D graphics engine described above is a drawing engine for 2D drawing.
In particular, in the technical scheme provided by the embodiment of the application, the system library also comprises a log data management module for receiving the log data reported by the dotting module and the corresponding standard deviation in the page loading process.
The log data management module is used for reporting the standard deviation corresponding to the page loading process and the obtained log data to the server. In particular, it is required to implement data transmission by using a wireless communication module or a mobile communication mode in the electronic device.
In addition, the log data and the standard deviation may be reported periodically, or may be reported when the electronic device is idle.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
The hardware abstraction layer is used for packaging the hardware drive, and further provides the same interface for the upper layer framework. The kernel layer is a layer between hardware and software, and includes various hardware drivers such as a sensor driver, a display driver, a microphone driver, a WLAN driver, a camera driver, and the like.
As to the software structure of the terminal device 100, it will be understood that the layers and the components included in the layers in the software structure shown in fig. 4 do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or fewer layers than shown and may include more or fewer components per layer, as the application is not limited.
Based on the software structure of the electronic device shown in fig. 4, the method for detecting the page loading time provided by the embodiment of the application is described below with reference to a specific embodiment.
Referring to fig. 5, a flowchart of a method for detecting a page load duration is shown. In this embodiment, the method for detecting the page loading duration may include:
101, displaying a user interface, wherein the user interface displays a target option for triggering the electronic equipment to load a target page.
The user interface may be any interface of the electronic device for a user to operate, such as a main interface, or a page of an application program.
The target page may be any page that needs to be loaded. The application may be started, or the starting page or the main page of the application may be a page included in the started application.
The target options can be icons, controls and the like displayed in a user interface for a user to operate.
By way of example, in one possible implementation, when the user interface is a main interface of an electronic device, such as interface 10a shown in fig. 1A (1), or fig. 1B (1), icons of various applications installed in the electronic device may be displayed in the user interface. For a scenario in which such a user interface is the main interface, the target option may be, for example, an icon corresponding to any application installed in the electronic device, such as icon 10a-1 in interface 10a shown in fig. 1A (1), or fig. 1B (1).
Correspondingly, the target page is a page of the application program corresponding to the target option, and the target page can be a main page, namely, a page displayed by default after the application program is started.
Taking the target option as (1) in fig. 1A or (1) in fig. 1B as an example, after the user clicks on the icon 10a-1, the electronic device responds to the operation behavior to start the application program corresponding to the icon 10a-1, such as (1) in fig. 1A or the gallery application shown in (1) in fig. 1B. For a scenario in which a gallery application is launched from a master interface of an electronic device, a final loaded target page is, for example, interface 10b shown in fig. 1A (2).
Understandably, in the technical scheme provided by the embodiment of the application, not only can the detection of the loading time of the normally loaded target page be realized, but also the reason for causing the abnormal loading of the target page can be known. Therefore, for the log data corresponding to the interface 10B shown in (2) in fig. 1B, which occurs in the loading process, in the technical solution provided in the embodiment of the present application, the corresponding log data may also be obtained in time and reported to the server.
Therefore, under the scene of starting an application program, the loading time length corresponding to the main page of the selected application program can be accurately determined based on the change of the standard deviation calculated by the histogram data in the page loading process of the started application program, and the log data during the period from the beginning of loading the page to the ending of loading is reported to the server, so that research and development personnel can conveniently and accurately locate reasons affecting the page loading time length under different scenes, and further, the optimization of products is facilitated.
For example, in another possible implementation, when the user interface is a page included in a certain application that has been started, such as a main page of the application, the target option may be any option that can trigger a page jump in the page currently displayed by the application.
Taking the interface 10b shown in (1) in fig. 1C or (2) in fig. 1D as the user interface currently displayed by the electronic device, that is, the main page of the gallery application as an example. The target option may be, for example, control 10b-1 shown in the figures.
Accordingly, when the user clicks the control 10b-1, the electronic device will load a page displaying all the photos taken by the camera, as shown by interface 10C in fig. 1C (2), in response to this operational behavior.
Understandably, in the technical scheme provided by the embodiment of the application, not only can the detection of the loading time of the normally loaded target page be realized, but also the reason for causing the abnormal loading of the target page can be known. Therefore, for the log data corresponding to the interface 10c shown in (2) in fig. 1D, which occurs in the loading process, in the technical solution provided in the embodiment of the present application, the corresponding log data may also be obtained in time and reported to the server.
Therefore, under the scene of switching among different pages included in the application program, the loading time length corresponding to each page can be accurately determined based on the change of standard deviation calculated by the histogram data in the loading process of the different pages, and the log data in the loading period from the beginning to the ending of the page is reported to the server, so that research and development personnel can accurately position reasons affecting the loading time length of the page in different scenes, and further optimization of products is facilitated.
102, triggering loading of the target page in response to clicking operation of the target option.
And 103, acquiring the loaded histogram data corresponding to each frame.
Specifically, in order to avoid visible stripe distortion, the method is similar to the method that the subsequent programming is easy, and in the loading process of the target page, the histogram data corresponding to each frame obtained by the histogram data acquisition module, specifically, gray level histogram data, that is, data of 256 gray levels, namely, data of corresponding pixel numbers respectively, the brightness level comprises 2-255.
104, for each frame, determining standard deviation from the histogram data.
In the case where the histogram data includes the number of pixels corresponding to 256 gray levels of 0 to 255, the determination of the standard deviation corresponding to each frame may be as follows:
Firstly, according to the number of pixels corresponding to the 256 gray levels of 0-255, determining an average value corresponding to the histogram data.
Then, the variance corresponding to the histogram data is determined from the average value and the number of pixels corresponding to the 256 gray levels, respectively. I.e. the number of pixels per gray level minus the average number, squared again, and then the squares are added up to be divided by 256.
And finally, root marking is carried out on the difference.
Thus, the determination of the standard deviation of the histogram data corresponding to the image to be loaded for each frame is realized.
In addition, it should be noted that, because when the electronic device triggers the loading operation of the target page in response to the operation behavior of the user, there is a process of initializing the target page, so the obtained histogram data is still the currently displayed user interface in a short time. Whereas for user interfaces that are already normally displayed, their corresponding standard deviation is typically low. When the user interface is presenting the target page to be loaded and starts to load the content of the target page, the standard deviation calculated according to the histogram data corresponding to the current frame will present an ascending trend, and the value of the increment is larger, namely, the increment will rise instantaneously.
Based on the above, the standard deviation change monitoring module can determine whether the target page is loaded by judging whether the continuous changes of a plurality of standard deviations meet the preset threshold change.
The processing performed by the standard deviation change monitoring module may include, for example, steps 105 to 109, and steps 111 and 112.
105, whether the standard deviation of two adjacent frames is in an ascending trend, and the standard deviation corresponding to the subsequent frame is larger than a preset first threshold value.
Wherein the first threshold is, for example, 130000 (13 w).
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Thus, it can be determined whether the loading of the target page has been started currently, for example, the activity initialization of the target page is completed, the activity of the target page is displayed on the user interface, and then the content to be displayed in the target page is prepared to be started to be loaded really.
Specifically, if it is determined that the standard deviation is in an ascending trend and the standard deviation corresponding to the subsequent frame is greater than the first threshold, step 106 may be performed in this scenario. Otherwise, the standard deviation is not met at the same time and is in an ascending trend, and the standard deviation corresponding to the subsequent frame is not larger than the first threshold, so that the standard deviation change monitoring module can continue to execute the operation of the step 105 according to the new standard deviation calculated by the standard deviation calculating module.
Thus, the loading starting time when the target page is starting to be loaded can be accurately determined. Subsequently, after the loading of the target page is determined to be completed, the loading time of the target page can be accurately determined according to the loading ending time and the loading starting time.
And 106, marking the latter frame as a starting frame for starting loading the target page, and initializing a dip counter.
Wherein the dip counter may be classified into a self-increasing type and a self-decreasing type. In practical application, the setting can be performed according to service requirements.
For convenience of description, the embodiment of the present application takes the example that the dip counter is of the self-increment type.
Accordingly, for the self-increment type of dip counter, when it is determined that the target page starts to be loaded, an operation of initializing the dip counter is made, for example, to initialize the value of the self-increment type of dip counter to 0.
107, in the loading process of the target page, whether the corresponding standard deviation is in a descending trend or not, and the standard deviation is descending beyond a preset second threshold value.
The second threshold value is 9000 (9 k), for example.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Specifically, the standard deviation change monitoring module determines that the corresponding standard deviation is in a descending trend in the loading process of the target page according to the standard deviation of the continuous N frames calculated by the standard deviation calculating module, and when the standard deviation is descending to exceed the second threshold, the step 108 may be executed. Otherwise, step 111 may be performed.
Wherein N may be an integer of 2 or more.
108, the dip counter self-increments.
That is, the value of the dip calculator is incremented by 1 each time the standard deviation is reduced and falls beyond the second threshold.
109, whether the value of the dip counter reaches a preset number of times.
The preset times can be determined according to the slump change of standard deviation in the normal loading process of different pages. This embodiment is exemplified by 3 times.
Specifically, when the value of the dip counter reaches the preset number of times, the content of the target page can be basically considered to be loaded, in this case, the target page can be considered to be loaded, and then the dotting module is triggered to execute the dotting operation, so that the log data management module can report the log data acquired by the dotting module and the standard deviation, calculated by the standard deviation calculation module, of the starting frame to the server, that is, step 110 is executed. Otherwise, step 111 may be performed.
Therefore, by setting the self-increasing dip counter, under the condition that the standard deviation is reduced to exceed the second threshold value each time, the self-increasing operation is directly carried out on the dip counter, when the value of the dip counter is increased to a set value, the standard deviation can be directly determined to be reduced to exceed the preset times, and then the target page loading is determined to be completed, so that the page loading time determined based on the standard deviation change is more accurate and reasonable.
110, executing the dotting operation, and reporting the log data obtained by the dotting operation to the server.
When the standard deviation change monitoring module determines the continuous change of a plurality of standard deviations and the preset threshold value change is met, the dotting module is informed to acquire the current log data of the electronic equipment, and the current log data is submitted to the server by the log data management module.
111, whether the loading duration exceeds a preset time threshold.
Wherein the preset time threshold is, for example, 5s. The setting of the time threshold may be set by default in the program when the histogram attribute is turned on.
Specifically, when the loading duration exceeds the preset time threshold, it can be generally considered that the loading of the target page is abnormal, and this situation can timely acquire the current log data and report the current log data to the server, that is, execute step 110. Otherwise, step 112 may be performed.
Therefore, the dotting operation is executed, and the precondition of the current log data of the electronic equipment is obtained, so that the normal page loading scene is considered, and the scene that the page cannot be loaded is considered. Namely, when the page is not loaded successfully normally, but reaches a set time threshold, dotting operation is also executed, so that research personnel can be ensured to know log data in various scenes, and further, products are optimized.
112, whether the standard deviation of the current frame is less than a third threshold.
The third threshold is, for example, 80000 (8 w).
Since under normal conditions, after the page is loaded, the corresponding standard deviation can be stabilized below 80000 (8 w), when the standard deviation is lower than a third threshold, whether the current dip frequency reaches the preset frequency or not can be considered as the target page is loaded, and therefore the determined page loading time is more accurate and reasonable.
Based on this, when the standard deviation of the current frame is less than the third threshold, step 110 is directly performed. Otherwise, the operations of steps 107 to 112 are cyclically performed.
In addition, it should be noted that, in practical applications, the specific execution sequence of steps 111 and 112 may not be limited. And can be specifically set according to service requirements, which is not limited by the present application.
In order to better understand the technical solution provided by the embodiments of the present application, the following description is provided with reference to examples.
Illustratively, the user interface is illustrated as interface 10a in FIG. 6A (1), and the target option is illustrated as icon 10a-2 corresponding to the shopping application.
Referring to fig. 6A (1), for example, after the user clicks the icon 10a-2, the mobile phone responds to the operation action to start the shopping application, and further loads the main page of the shopping application, that is, the target page according to the embodiment of the present application. In the process from the start of the shopping application to the final display of the target page on the user interface, the change in the target page loading process includes an interface 10d1 shown in fig. 6A (2), an interface 10d2 shown in fig. 6B (1), an interface 10d3 shown in fig. 6B (2), an interface 10d4 shown in fig. 6C, and when the end user interface becomes an interface 10d4 shown in fig. 6C, it indicates that the target page loading is completed.
Based on this, when the user clicks the icon 10a-2, the cell phone starts the shopping application in response to the operation behavior, and the displayed interface 10d1 is loaded first. The standard deviation corresponding to the histogram data of this frame of the interface 10d1 may be 166232, for example.
From the above description, the more single the page color is, the higher the standard deviation is. Therefore, when the interface 10a with rich icons and controls is switched to the interface 10d1 with fewer icons and controls, the standard deviation of the frames corresponding to the two pages will have a significant rising trend, and the standard deviation of the frames corresponding to the interface 10d1 reaches 166232, that is, is greater than the first threshold in the above embodiment. At this time, a frame corresponding to the interface 10d1, such as the 1 st frame shown in fig. 7, may be marked as a start frame.
For example, if the corresponding standard deviation is substantially stabilized at 16623 from frame 1 to frame 15 during the loading of the get target page, i.e., interface 10d4, as shown in fig. 7. I.e., from frame 1 to frame 15, the standard deviation change monitoring module loops through step 105.
Illustratively, when the loading of the interface 10d1 is completed, the user interface of the handset will appear as the interface 10d2 shown in fig. 6B (1) over time.
Referring to fig. 6B (1), for example, since the icons and controls displayed in the interface 10d2 are more, the standard deviation is much lower than that of the interface 10d1, for example, it is reduced to 89575. Corresponding to fig. 7, it may be that, for example, a downward trend occurs at 15 th to 17 th frames and down to 89575. The dip counter may self increment since the dip value is greater than the second threshold value described in step 107.
Illustratively, over time, an unloaded icon in interface 10d2, such as icon 19 in interface 10d3 shown in fig. 6B (2), will be loaded. Since interface 10d3 has more icons 19 than interface 10d2, the corresponding standard deviation drops further, for example to 61968. Corresponding to fig. 7, 4 frames may be spent from interface 10d2 to interface 10d3, such as from frame 17 to frame 21. Since the drop value is greater than the second threshold value described in step 107, the dip counter may be self-incremented again.
Illustratively, as the interface 10d3 is involved, an unloaded icon, such as the icon 20 in the interface 10d4 shown in FIG. 6C, will be loaded. Since interface 10d4 has more icons 20 than interface 10d3, the corresponding standard deviation drops further, for example to 55316. Corresponding to fig. 7, 7 frames, such as from frame 21 to frame 27, may be spent from interface 10d3 to interface 10d 4. Since the drop value is greater than the second threshold value described in step 107, the dip counter may be self-incremented again.
For example, when the preset number of times corresponding to the dip counter is 3, as can be seen from fig. 6A, 6B, 6C, and 7, 3 dips have been experienced from the interface 10d1 to the interface 10d4, and each dip is greater than the second threshold. As can be seen from the description of the above step 109, in this case, the standard deviation change monitoring module may notify the dotting module to perform dotting operation, so that the log data management module reports the obtained log data and the standard deviation corresponding to each frame in the whole loading process corresponding to fig. 7 to the server.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
When the application is started or the jump operation of the page in the application is monitored, the standard deviation of the page loading process is determined according to the histogram data by collecting the corresponding histogram data of different page loading processes, and then according to the change condition of the standard deviation in the page loading process, the electronic equipment can be accurately determined when the page starts to be loaded, and when the page is successfully loaded, and then the standard deviation of the page loading time length and the current log data of the electronic equipment can be reported to a cloud server, so that research and development personnel can accurately determine the loading time length of the corresponding page and the specific reason affecting the page loading time length according to the change of the standard deviation in the page loading process, and further the subsequent optimization of products is facilitated.
Furthermore, it will be appreciated that the electronic device, in order to achieve the above-described functions, comprises corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In addition, it should be noted that, in an actual application scenario, the method for detecting the page loading duration provided in the foregoing embodiments implemented by the electronic device may also be executed by a chip system included in the electronic device, where the chip system may include a processor. The chip system may be coupled to a memory such that the chip system, when running, invokes a computer program stored in the memory, implementing the steps performed by the electronic device described above. The processor in the chip system can be an application processor or a non-application processor.
In addition, the embodiment of the application also provides a computer readable storage medium, and the computer storage medium stores computer instructions, which when executed on the electronic device, cause the electronic device to execute the related method steps to implement the method for detecting the page loading time in the embodiment.
In addition, the embodiment of the application also provides a computer program product, when the computer program product runs on the electronic equipment, the electronic equipment is caused to execute the related steps so as to realize the method for detecting the page loading time length in the embodiment.
In addition, embodiments of the present application also provide a chip (which may also be a component or module) that may include one or more processing circuits and one or more transceiver pins; the receiving pin and the processing circuit are mutually communicated through an internal connection path, and the processing circuit executes the related method steps to realize the method for detecting the page loading time length in the embodiment so as to control the receiving pin to receive signals and control the sending pin to send signals.
In addition, as can be seen from the above description, the electronic device, the computer-readable storage medium, the computer program product, or the chip provided by the embodiments of the present application are used to perform the corresponding methods provided above, and therefore, the advantages achieved by the embodiments of the present application can refer to the advantages in the corresponding methods provided above, and are not repeated herein.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (12)

1. The method for detecting the page loading time is characterized by being applied to electronic equipment, and comprises the following steps:
displaying a user interface, wherein the user interface comprises target options;
responding to clicking operation of the target option, and recording a target page;
in the process of loading the target page, acquiring loaded histogram data corresponding to each frame, wherein the histogram data comprises the number of pixels corresponding to each brightness level;
for each frame, determining a standard deviation from the histogram data;
judging whether the continuous changes of a plurality of standard deviations meet the preset threshold value changes or not;
when the preset threshold change is met, determining that the loading of the target page is completed, and acquiring current log data of the electronic equipment;
reporting the log data and the corresponding standard deviation in the loading process of the target page to a server; the server determines the starting loading time and the ending loading time of the target page according to the change of the standard deviation in the loading process of the target page, and determines the reason affecting the loading time of the target page according to the log data.
2. The method of claim 1, wherein said determining whether a predetermined threshold change is satisfied by a consecutive plurality of changes in the standard deviation comprises:
Determining whether the standard deviation of two adjacent frames is in an ascending trend or not after the clicking operation according to the standard deviation of the two adjacent frames, wherein the standard deviation corresponding to the next frame is larger than a preset first threshold value;
when the standard deviation corresponding to the later frame is larger than the first threshold value, marking the later frame as a starting frame for starting loading the target page, wherein the starting frame corresponds to the loading starting time;
starting from the initial frame, determining whether the corresponding standard deviation is in a descending trend or not in the loading process of the target page according to the standard deviation of continuous N frames, wherein the descending trend is more than a preset second threshold value, and N is an integer greater than or equal to 2;
and when the standard deviation is reduced by more than the second threshold value for a preset number of times, determining a plurality of continuous standard deviation changes, and meeting the preset threshold value changes.
3. The method of claim 2, wherein when the subsequent frame is noted as a start frame for starting loading the target page, the method further comprises:
initializing a dip counter, and setting the value of the dip counter to 0;
determining that the corresponding standard deviation is in a downloading trend in the loading process of the target page according to the standard deviation of the continuous N frames each time, and increasing the value of the dip counter by 1 when the corresponding standard deviation is reduced to exceed the second threshold value;
And when the value of the slump calculator reaches a preset M, determining that the dip exceeds the second threshold value for a preset number of times, wherein M is an integer greater than 0.
4. The method of claim 2, wherein when the subsequent frame is noted as a start frame for starting loading the target page, the method further comprises:
initializing a dip counter, and setting the value of the dip counter to M, wherein M is an integer greater than 0;
determining that the corresponding standard deviation is in a downloading trend in the loading process of the target page according to the standard deviation of the continuous N frames each time, and subtracting 1 from the value of the dip counter when the corresponding standard deviation is reduced to exceed the second threshold value;
when the value of the dip calculator becomes 0, determining that the dip exceeds the second threshold preset number of times.
5. The method according to claim 2, wherein the method further comprises:
determining whether the standard deviation of the last frame in the continuous N frames is smaller than a preset third threshold value or not when determining that the corresponding standard deviation is in a downloading trend in the loading process of the target page according to the standard deviation of the continuous N frames each time;
and when the standard deviation is smaller than the third threshold value, determining a plurality of continuous standard deviation changes, and meeting the preset threshold value changes.
6. The method according to any one of claims 1 to 5, further comprising:
recording a start time at which acquisition of the histogram data starts;
when the preset threshold change is not met, determining whether the time difference value of the current time of the time interval for starting to acquire the histogram data is larger than a preset time threshold;
and when the time threshold is larger than the time threshold, acquiring the current log data of the electronic equipment.
7. The method of any one of claims 1 to 5, wherein the histogram data is gray level histogram data, and the histogram data includes luminance levels including 0 to 255 gray levels.
8. The method of claim 7, wherein said determining a standard deviation from said histogram data comprises:
determining an average value corresponding to the histogram data according to the pixel quantity corresponding to 0-255 gray levels respectively;
determining a variance corresponding to the histogram data according to the average value and the pixel number corresponding to 0-255 gray levels respectively;
and determining the standard deviation according to the variance.
9. The method according to any one of claims 1 to 5, wherein the user interface is a main interface of the electronic device, in which an icon of an application installed by the electronic device is displayed, the target option is an icon corresponding to any application installed by the electronic device, and the target page is a main page of the application corresponding to the target option.
10. The method of any one of claims 1 to 5, wherein the user interface is a main page of any application installed by the electronic device, the target option is an option displayed in the main page, the target page is another page included in the application displaying the main page, and the other page does not include the main page.
11. An electronic device, the electronic device comprising: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the method of detecting a page load duration as claimed in any one of claims 1 to 10.
12. A computer readable storage medium comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of detecting a page load duration as claimed in any one of claims 1 to 10.
CN202311351117.XA 2023-10-18 2023-10-18 Page loading time length detection method, equipment and storage medium Active CN117076284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311351117.XA CN117076284B (en) 2023-10-18 2023-10-18 Page loading time length detection method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311351117.XA CN117076284B (en) 2023-10-18 2023-10-18 Page loading time length detection method, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117076284A true CN117076284A (en) 2023-11-17
CN117076284B CN117076284B (en) 2024-04-05

Family

ID=88715744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311351117.XA Active CN117076284B (en) 2023-10-18 2023-10-18 Page loading time length detection method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117076284B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015103850A1 (en) * 2014-01-09 2015-07-16 中兴通讯股份有限公司 Method, apparatus and terminal for controlling page loading progress
CN105955884A (en) * 2016-04-27 2016-09-21 上海携程商务有限公司 Method and device for checking white screen of App (Application) page
CN110717122A (en) * 2019-09-26 2020-01-21 北京华宇信息技术有限公司 Page performance acquisition method and device and electronic equipment
CN111104295A (en) * 2019-11-12 2020-05-05 华为技术有限公司 Method and equipment for testing page loading process
CN111752817A (en) * 2020-06-30 2020-10-09 汉海信息技术(上海)有限公司 Method, device and equipment for determining page loading duration and storage medium
CN112084444A (en) * 2019-06-12 2020-12-15 腾讯科技(深圳)有限公司 Page loading time detection method and device and computer readable storage medium
CN113688043A (en) * 2021-08-25 2021-11-23 北京三快在线科技有限公司 Application program testing method, device, server, iOS device and medium
CN114491326A (en) * 2020-10-27 2022-05-13 浙江宇视科技有限公司 Webpage loading state detection method and device, electronic equipment and storage medium
CN116468914A (en) * 2023-04-21 2023-07-21 抖音视界有限公司 Page comparison method and device, storage medium and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015103850A1 (en) * 2014-01-09 2015-07-16 中兴通讯股份有限公司 Method, apparatus and terminal for controlling page loading progress
CN105955884A (en) * 2016-04-27 2016-09-21 上海携程商务有限公司 Method and device for checking white screen of App (Application) page
CN112084444A (en) * 2019-06-12 2020-12-15 腾讯科技(深圳)有限公司 Page loading time detection method and device and computer readable storage medium
CN110717122A (en) * 2019-09-26 2020-01-21 北京华宇信息技术有限公司 Page performance acquisition method and device and electronic equipment
CN111104295A (en) * 2019-11-12 2020-05-05 华为技术有限公司 Method and equipment for testing page loading process
CN111752817A (en) * 2020-06-30 2020-10-09 汉海信息技术(上海)有限公司 Method, device and equipment for determining page loading duration and storage medium
CN114491326A (en) * 2020-10-27 2022-05-13 浙江宇视科技有限公司 Webpage loading state detection method and device, electronic equipment and storage medium
CN113688043A (en) * 2021-08-25 2021-11-23 北京三快在线科技有限公司 Application program testing method, device, server, iOS device and medium
CN116468914A (en) * 2023-04-21 2023-07-21 抖音视界有限公司 Page comparison method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN117076284B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
US11430358B2 (en) Frequency adjustment method and apparatus applied to terminal, and electronic device
CN113254120B (en) Data processing method and related device
CN110865837B (en) Method and terminal for system upgrade
CN114077529B (en) Log uploading method and device, electronic equipment and computer readable storage medium
CN116680153B (en) Application frame rate smoothing method, electronic device and storage medium
WO2022247446A1 (en) Performance optimization method and related device
CN112114733A (en) Screen capturing and recording method, mobile terminal and computer storage medium
CN112817634A (en) Method and device for downloading COTA (chip on TA) packet
CN115333941B (en) Method for acquiring application running condition and related equipment
CN112817610B (en) Cota package installation method and related device
CN114257502B (en) Log reporting method and device
CN116916093B (en) Method for identifying clamping, electronic equipment and storage medium
CN115119048B (en) Video stream processing method and electronic equipment
CN117076284B (en) Page loading time length detection method, equipment and storage medium
CN116700601B (en) Memory optimization method, equipment and storage medium
CN116347217B (en) Image processing method, device and storage medium
CN115941674B (en) Multi-device application connection method, device and storage medium
CN116052236B (en) Face detection processing engine, shooting method and equipment related to face detection
CN113641431B (en) Method for enhancing display of two-dimension code and terminal equipment
CN116662130A (en) Method for counting application use time length, electronic equipment and readable storage medium
CN113253905A (en) Touch method based on multi-finger operation and intelligent terminal
CN116744106B (en) Control method of camera application and terminal equipment
CN117956264B (en) Shooting method, electronic device, storage medium, and program product
CN117707662B (en) Interface display method and electronic equipment
CN116662150B (en) Application starting time-consuming detection method and related device

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