CN106610887A - Method and device for determining webpage loading speed - Google Patents

Method and device for determining webpage loading speed Download PDF

Info

Publication number
CN106610887A
CN106610887A CN201510703022.9A CN201510703022A CN106610887A CN 106610887 A CN106610887 A CN 106610887A CN 201510703022 A CN201510703022 A CN 201510703022A CN 106610887 A CN106610887 A CN 106610887A
Authority
CN
China
Prior art keywords
webpage
time
same
slow
loading velocity
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
CN201510703022.9A
Other languages
Chinese (zh)
Other versions
CN106610887B (en
Inventor
李新国
周建涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201510703022.9A priority Critical patent/CN106610887B/en
Publication of CN106610887A publication Critical patent/CN106610887A/en
Application granted granted Critical
Publication of CN106610887B publication Critical patent/CN106610887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and device for determining a webpage loading speed. The method comprises the following steps: analyzing access data of a target website to obtain access data in which the same source in the same session accesses the same webpage exceeding a preset access time, extracting a dwell time of the same source in the same session in the same webpage from the obtained access data, and determining whether the accessed webpage is a webpage with a low loading speed according to the dwell time. By adoption of the method and device disclosed by the invention, the technical problem that the webpage with the low loading speed cannot be accurately judged is solved.

Description

The determination method and apparatus of webpage loading velocity
Technical field
The application is related to internet arena, in particular to a kind of determination method and apparatus of webpage loading velocity.
Background technology
In website the evaluation index of the loading velocity of webpage typically refer to user from open a webpage be in completely to the webpage Reveal and carry out the consumed time, this time is shorter, and website is better to the experience that user brings.Generally website is total Webpage quantity it is general it is few have a hundreds of thousands, even millions more, so many webpage occurs unavoidably The slow webpage of loading velocity have impact on the experience of user.Therefore, each website operator needs to find out these loading velocities slow Webpage, in order to determine the reason for its loading velocity is slow, pointedly solve the problems, such as that loading velocity is slow.
How to go to find such webpage is a problem for being relatively difficult to solve.At present, the slow net of loading velocity is found out The mode of page is mainly by the loading velocity of each webpage of manual testing website.However, manual testing can only react survey Under network environment residing for examination personnel for the load condition of webpage, when not necessarily actual response netizen accesses webpage Situation, so as to cause the webpage slow to loading velocity to judge inaccurate.
For above-mentioned problem, effective solution is not yet proposed at present.
The content of the invention
The embodiment of the present application provides a kind of determination method and apparatus of webpage loading velocity, at least to solve to loading speed The slow webpage of degree judges inaccurate technical problem.
According to the one side of the embodiment of the present application, there is provided a kind of determination method of webpage loading velocity, including:It is right The access data of targeted website are parsed, and same webpage is accessed more than default to obtain same source in the same session The access data of access times;From the access extracting data same source described in the same session for obtaining in institute State the time of staying of same webpage;And determine whether the webpage for accessing is that loading velocity is slow according to the time of staying Webpage.
Further, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:System Total residence time and total access times of the meter same source described in the same session in the same webpage;Obtain Same source last time accesses the time of staying of the same webpage described in the same session;Using following public affairs Formula is calculated in the same session except last time accesses the mean residence time of the same webpage: T=(T-T1)/(N-1), wherein, T is the total residence time, and T1 is that the last time accesses the same webpage The time of staying, N be total access times;Judge the t whether more than or equal to time threshold;In the t During more than or equal to the time threshold, the webpage for determining the access is the slow webpage of loading velocity.
Further, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:System Meter same source described in the same session accesses the time of staying of the same webpage more than or equal to time threshold Access times;Judge whether the time of staying exceedes frequency threshold value more than or equal to the access times of the time threshold;Sentencing Break the time of staying more than or equal to the time threshold access times exceed frequency threshold value when, determine the net of the access Page is the slow webpage of loading velocity.
Further, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:Root The slow webpage of doubtful loading velocity is determined according to the time of staying;The statistics webpage slow to the doubtful loading velocity adds Carry slow-footed source quantity;Judge whether the source quantity reaches predetermined number;Judging the source quantity When reaching the predetermined number, the slow webpage of the doubtful loading velocity is determined for the slow webpage of loading velocity.
Further, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:Root The slow webpage of doubtful loading velocity is determined according to the time of staying;Record the system of the slow webpage of the doubtful loading velocity One URLs;Judge whether default note is exceeded to the number of times of same URL record in preset time period Record number of times;When more than the preset recording number of times, it is determined that more than the URL of the preset recording number of times Corresponding webpage is the slow webpage of loading velocity.
According to the another aspect of the embodiment of the present application, a kind of determining device of webpage loading velocity is additionally provided, including: Acquiring unit, for parsing to the access data of targeted website, is accessed with obtaining same source in the same session Same webpage exceedes the access data of default access times;Extraction unit, for existing from the access extracting data for obtaining The time of staying of the same source in the same webpage described in the same session;And determining unit, for basis The time of staying determines whether the webpage for accessing is the slow webpage of loading velocity.
Further, the determining unit includes:First statistical module, for statistics described in the same session Total residence time and total access times of the same source in the same webpage;Acquisition module, for obtaining described same The last time of same source described in one session accesses the time of staying of the same webpage;Computing module, for utilizing Below equation is calculated in the same session except last time accesses the mean residence time of the same webpage: T=(T-T1)/(N-1), wherein, T is the total residence time, and T1 is that the last time accesses the same webpage The time of staying, N be total access times;First judge module, for judging whether the t is more than or equal to Time threshold;First determining module, for when the t is more than or equal to the time threshold, determining the access Webpage be the slow webpage of loading velocity.
Further, the determining unit includes:Second statistical module, for statistics described in the same session Same source accesses the access times of the time of staying more than or equal to time threshold of the same webpage;Second judge module, For judging whether the time of staying exceedes frequency threshold value more than or equal to the access times of the time threshold;Second determines mould Block, for judge the time of staying more than or equal to the time threshold access times exceed frequency threshold value when, it is determined that The webpage of the access is the slow webpage of loading velocity.
Further, the determining unit includes:3rd determining module, it is doubtful for being determined according to the time of staying Like the webpage that loading velocity is slow;3rd statistical module, for counting the webpage loading speed slow to the doubtful loading velocity The slow source quantity of degree;3rd judge module, for judging whether the source quantity reaches predetermined number;3rd is true Cover half block, for when judging that the source quantity reaches the predetermined number, determining that the doubtful loading velocity is slow Webpage be the slow webpage of loading velocity.
Further, the determining unit includes:4th determining module, it is doubtful for being determined according to the time of staying Like the webpage that loading velocity is slow;Logging modle, the unified resource for recording the slow webpage of the doubtful loading velocity is determined Position symbol;4th judge module, for whether judging in preset time period to the number of times of same URL record More than preset recording number of times;5th determining module, for when more than the preset recording number of times, it is determined that exceeding described The corresponding webpage of URL of preset recording number of times is the slow webpage of loading velocity.
According to the embodiment of the present application, same source in the same session is obtained from the access data of targeted website and accesses same One webpage exceedes the access data of default access times, obtains same next in the same session from the access data for obtaining Source determines whether the webpage for accessing is the slow webpage of loading velocity in the time of staying of same webpage according to the time of staying, There are the access data of the access behavior of user according to record, judge loading velocity from the actual access behavior of user slow Webpage, relative to the load condition for testing webpage in prior art under test network environment, has truly reacted netizen Situation during webpage is accessed, the accuracy that the webpage slow to loading velocity judges is improve, is solved slow to loading velocity Webpage judge inaccurate technical problem.
Description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes the part of the application, this Shen Schematic description and description please does not constitute the improper restriction to the application for explaining the application.In accompanying drawing In:
Fig. 1 is the flow chart of the determination method of the webpage loading velocity according to the embodiment of the present application;
Fig. 2 is the schematic diagram of the determining device of the webpage loading velocity according to the embodiment of the present application.
Specific embodiment
In order that those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present application, it is clear that described embodiment The only embodiment of the application part, rather than the embodiment of whole.Based on the embodiment in the application, ability The every other embodiment that domain those of ordinary skill is obtained under the premise of creative work is not made, all should belong to The scope of the application protection.
It should be noted that the description and claims of this application and the term " first " in above-mentioned accompanying drawing, " Two " it is etc. the object for distinguishing similar, without for describing specific order or precedence.It should be appreciated that this The data that sample is used can be exchanged in the appropriate case, so as to embodiments herein described herein can with except Here the order beyond those for illustrating or describing is implemented.Additionally, term " comprising " and " having " and they Any deformation, it is intended that covering is non-exclusive to be included, and for example, contains process, the side of series of steps or unit Method, system, product or equipment are not necessarily limited to those steps clearly listed or unit, but may include unclear List or other steps intrinsic for these processes, method, product or equipment or unit.
According to the embodiment of the present application, there is provided a kind of embodiment of the method for the determination method of webpage loading velocity, need It is bright, can be in the computer system of such as one group of computer executable instructions the step of the flow process of accompanying drawing is illustrated Middle execution, and, although show logical order in flow charts, but in some cases, can be being different from Order herein performs shown or described step.
Fig. 1 is the flow chart of the determination method of the webpage loading velocity according to the embodiment of the present application, as shown in figure 1, should Method comprises the steps:
The access data of targeted website are parsed by step S102, are accessed with obtaining same source in the same session Same webpage exceedes the access data of default access times.
When by terminal access targeted website, the targeted website would generally record the access behavior of user to user, for example, The webpage of record access, access times, access time, (can use in the time of staying of webpage, the source of user In the mark for representing user's uniqueness, such as IP address, mac addresses of terminal that user uses etc.) etc. data, Formed and access data.In the present embodiment, targeted website is the website tested, and the targeted website includes certain amount Webpage.
When user accesses certain webpage, if run into the excessively slow webpage of loading velocity can attempt being refreshed, if right There are many people that refreshing (more than twice) has all been carried out repeatedly when accessing in same webpage, then it is considered that the webpage Loading velocity may be slow, needs investigated.In the present embodiment, once refresh and be user to webpage Once request, once request of the user to webpage be designated as once accessing.
Parsed by the access data to targeted website, to obtain same source in the same session same net is accessed Page exceedes the access data of default access times, wherein, session refers to the user in same source on website Once complete access process.It can be specifically the visit in first analytically result to targeted website to obtain above-mentioned access data Ask that data are traveled through, same webpage is therefrom found out in units of session and is accessed for access times more than default access time The access data of (can be configured with root demand) are counted, then finds out all same sources in the same session and access same Webpage exceedes the access data of default access times, in order to obtain user stopping when accessing every time from these data Stay the time.
Step S104, from obtain access extracting data in the same session same source in the stop of same webpage Between.
The time of staying for once accessing is referred to from after user's request loading webpage, until user's request of loading net again Till page or other webpages, the time experienced between this, no matter whether the webpage loads out.Specifically, Can be obtain access data in can record in each access process, user's request record webpage moment and User asks again the moment for recording the webpage or request of loading other webpages, is calculated by the above-mentioned two moment State the time of staying.It is of course also possible to when user accesses webpage, be counted by each access of the timer to user When so that directly record has the time of staying of each access in access data, so, after access data are got, Can directly from the access extracting data above-mentioned time of staying.Obtain in a session, user accesses same webpage The time of staying for accessing each time, facilitating the use the time of staying determines whether the webpage is the slow webpage of loading velocity.
Step S106, determines whether the webpage for accessing is the slow webpage of loading velocity according to the time of staying.
Can attempt being refreshed because user runs into the excessively slow webpage of loading velocity, i.e., repeatedly access identical webpage, then The webpage is probably the slow webpage of loading velocity, when determining whether, the webpage for accessing is determined according to the time of staying whether Can be the length of the time of staying for judging to access every time for the webpage that loading velocity is slow, if wherein repeatedly access The time of staying longer (being more than or equal to time threshold), it is determined that the webpage is the slow webpage of loading velocity;Can also sentence Whether the disconnected mean residence time for repeatedly accessing is more than or equal to time threshold, if it is, determining the webpage for loading speed The slow webpage of degree;Can also be and judge in addition to the time of staying that last time is accessed, the average stop that others are accessed Whether the time is more than or equal to time threshold, if it is, determining the webpage for the slow webpage of loading velocity.Use due to working as Family last time accesses the time for the time of staying of webpage generally including user's browsed web content, and this period is long, This section of time of staying is rejected, the accuracy of judgement can be further improved.It should be noted that the embodiment of the present application In, determine that whether the webpage for accessing is that the concrete mode of the slow webpage of loading velocity is included but is not limited to according to the time of staying Aforesaid way, does not have improper restriction to the application here.
According to the embodiment of the present application, same source in the same session is obtained from the access data of targeted website and accesses same One webpage exceedes the access data of default access times, obtains same next in the same session from the access data for obtaining Source determines whether the webpage for accessing is the slow webpage of loading velocity in the time of staying of same webpage according to the time of staying, There are the access data of the access behavior of user according to record, judge loading velocity from the actual access behavior of user slow Webpage, relative to the load condition for testing webpage in prior art under test network environment, has truly reacted netizen Situation during webpage is accessed, the accuracy that the webpage slow to loading velocity judges is improve, is solved slow to loading velocity Webpage judge inaccurate technical problem.
Further, since artificial statistics is time-consuming longer in prior art, particularly with large-scale website, and manual testing is basic Cannot coverage goal website all webpages.And the embodiment of the present application judges by using the access data of targeted website The slow webpage of loading velocity, without the need for manual intervention, all webpages that can be accessed user by computer program etc. Judged, coverage rate is high.
Preferably, in the embodiment of the present application, can be by adding Tracker (JS scripts) in targeted website, to receive Collection user counts access behavior of each user in website in the access data of targeted website, and by the targeted website All access data all can be sent on given server, the user accesses data that one by one resolution server is collected.
Preferably, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:Statistics is same Total residence time and total access times of the same source in same webpage in one session;Obtain same next in the same session Source last time accesses the time of staying of same webpage;Calculated in the same session except last time is visited using below equation Ask the mean residence time of same webpage:T=(T-T1)/(N-1), wherein, T is total residence time, and T1 is last The secondary time of staying for accessing same webpage, N is total access times;Judge t whether more than or equal to time threshold;In t During more than or equal to time threshold, it is determined that the webpage for accessing is the slow webpage of loading velocity.
For the statistics of total residence time, can be by adder will be aforementioned in visit every time in the same session extracted The time of staying asked is added, and obtains total residence time.For total access times, it is possible to use enumerator is to accessing data In each access of same session added up, obtain total access times.
In the present embodiment, by the mean residence time for calculating the access to webpage (not accessing including last time), Whether the mean residence time is judged more than or equal to time threshold, the time threshold can be user's access target website The minimum access time of webpage, different targeted websites can arrange different time thresholds, during above-mentioned average stop Between more than or equal to time threshold then substantially it is considered that user do not browse web data, here can consider that user does not also have When webpage loads out.Webpage is browsed because the time of staying that webpage is accessed when user's last time generally includes user The time of content, this period is long, and this section of time of staying is rejected, and can further improve the accuracy of judgement.
Such as user webpage 3 times of connected reference one in a session, have accessed successively 10 seconds, 10 seconds, and 25 Second, wherein, last time of the user in this session is accessed has spent a certain amount of time browsed web content, therefore, Last time access time is longer.If the time threshold of the targeted website is 3s, it is calculated user and accesses the webpage The mean residence time of (not accessing including last time) is 10s, hence, it can be determined that the webpage that the user accesses Loading velocity is slow.If above-mentioned mean access time is less than time threshold, it is believed that violence of the user to webpage refreshes Or refresh by mistake, it is impossible to it is considered that webpage loading velocity itself is slow.
Alternatively, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:Statistics is same Same source accesses the access times of the time of staying more than or equal to time threshold of same webpage in one session;Judge to stop Whether the time exceedes frequency threshold value more than or equal to the access times of time threshold;When judging that the time of staying is more than or equal to Between the access times of threshold value when exceeding frequency threshold value, it is determined that the webpage for accessing is the slow webpage of loading velocity.
In the present embodiment, each time of staying for accessing in a session can be done and once be judged, judge whether it is big In equal to time threshold, and record access times of the time of staying more than or equal to time threshold, then the access time to recording Number is judged that judge that whether it exceedes frequency threshold value, namely be to determine in a session, user accesses stopping for webpage Whether the access times for staying the time longer are enough.If the user while in a session, for stopping for same web page access Stay some time of time longer, then may be considered and made because the webpage loading velocity causes slowly user repeatedly to refresh Into.When judging that the time of staying exceedes frequency threshold value more than or equal to the access times of time threshold, it is determined that access Webpage is the slow webpage of loading velocity.
In the present embodiment, time threshold and the time threshold of previous embodiment can be with identical, and frequency threshold value can be according to need Ask and be configured.
According to the embodiment of the present application, by arranging time threshold and frequency threshold value, successively to each time of staying for accessing Judged more than or equal to the access times of time threshold with the time of staying, further increased the net slow to loading velocity The accuracy of the judgement of page.
Preferably, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:According to stop Time determines the slow webpage of doubtful loading velocity;The slow source of the statistics webpage loading velocity slow to doubtful loading velocity Quantity;Judge whether source quantity reaches predetermined number;When judging that source quantity reaches predetermined number, it is determined that doubting It is the slow webpage of loading velocity like the slow webpage of loading velocity.
Because user's loading webpage speed is likely to be slowly what the network environment being located by the user caused, and not Webpage itself has problems, and there is accidentalia.To reject the interference factor, in the present embodiment, will be according to stop The slow webpage of loading velocity that time is determined for example, is more than or equal to as the slow webpage of doubtful loading velocity in t During time threshold, it is determined that the webpage for accessing is the slow webpage of doubtful loading velocity;Or, judging that the time of staying is big When the access times equal to time threshold exceed frequency threshold value, it is determined that the webpage for accessing is the slow net of doubtful loading velocity Page, then does again and further judges.Specifically, the slow webpage of doubtful loading velocity is being determined according to the time of staying Afterwards, the webpage is recorded, then to access source as dimension, counts the slow webpage quilt of the doubtful loading velocity The number of times of record, that is to say the slow source quantity of the webpage loading velocity slow to doubtful loading velocity, if it exceeds default Quantity (can be configured according to demand), then show that the speed for having a certain amount of user to load the webpage is slower, therefore, It is considered that the slow webpage of the doubtful loading velocity is the slow webpage of loading velocity.
According to the embodiment of the present application, by the source using webpage is accessed as the index for determining whether, so as to propose idol So factor, further improves the accuracy of the judgement of the webpage slow to loading velocity.
Preferably, determine whether the webpage for accessing is that the slow webpage of loading velocity includes according to the time of staying:According to stop Time determines the slow webpage of doubtful loading velocity;Record the URL of the slow webpage of doubtful loading velocity; Judge whether preset recording number of times is exceeded to the number of times of same URL record in preset time period;Exceeding During preset recording number of times, it is determined that being that loading velocity is slow more than the corresponding webpage of the URL of preset recording number of times Webpage.
In the present embodiment, in order to avoid affecting accuracy (for example, certain time period target of result due to time factor The server fail of website, webpage loading in the time period goes wrong), a time period is pre-selected, i.e., in advance If the time period, count in preset time period, the same webpage is registered as the number of times of the slow webpage of doubtful loading velocity, Judge whether to exceed preset recording number of times, if it exceeds, then it is assumed that the webpage is the slow webpage of loading velocity, wherein, Preset recording number of times can be configured according to demand.
Below a kind of optional embodiment of the application is illustrated with a kind of specific example, specifically included:
Step1:Tracker is disposed in targeted website, after deployment is completed, all access of the user in the targeted website Data can all be sent to given server.
Step2:The user accesses data that one by one resolution server is collected.
Step3:Statistic of user accessing data, webpage is accessed according to access by same user in a conversation procedure Sequencing is ranked up.Wherein, a session refers to an once complete access on targeted website of user Journey.
Step4:The access data of user are collected, is found out in the same session, the same webpage of connected reference is surpassed After access data twice, it is assumed that certain user connected reference webpage P in a conversation procedure, 3 times are have accessed; When webpage is refreshed, server end can receive the data that user accesses same webpage to user.
Step5:The access data that obtain in statistics Step4, count in this conversation procedure user by connected reference Webpage in total time of staying T, such as user webpage 3 times of connected reference one in a session, successively Have accessed 10 seconds, 10 seconds, 25 seconds, then T=29 seconds.
Step6:The time T1 for resting on the webpage for the last time in this connected reference is found out, such as above-mentioned example The middle T1=25 seconds.
Step7:If (T-T1)/(N-1)>=M then thinks that the webpage there may be the slower problem of loading, record The URL (Uniform Resoure Locator, referred to as URL) of the webpage and session information, it is no Then terminate the analysis to the session;M is time threshold, can be the minimum access time that user accesses webpage, is more than Then can consider that user does not browse web data substantially equal to M, here can consider that user does not also wait until that webpage is loaded Out, different for the value of different types of website M, N here is the number of times of the connected reference webpage.
Step8:Statistics is recorded more than 1 time in a period of time, and at least URL of the webpage of source and two users, It is considered that the corresponding webpages of these URL are the slow webpage of loading velocity.
The embodiment of the present application additionally provides a kind of determining device of webpage loading velocity, and the device can be used for performing this Shen Please embodiment webpage loading velocity determination method, as shown in Fig. 2 the device includes:Acquiring unit 10, extraction Unit 20 and determining unit 30.
Acquiring unit 10 is used to parse the access data of targeted website, to obtain same source in the same session Access the access data that same webpage exceedes default access times.
When by terminal access targeted website, the targeted website would generally record the access behavior of user to user, for example, The webpage of record access, access times, access time, (can use in the time of staying of webpage, the source of user In the mark for representing user's uniqueness, such as IP address, mac addresses of terminal that user uses etc.) etc. data, Formed and access data.In the present embodiment, targeted website is the website tested, and the targeted website includes certain amount Webpage.
When user accesses certain webpage, if run into the excessively slow webpage of loading velocity can attempt being refreshed, if right There are many people that refreshing (more than twice) has all been carried out repeatedly when accessing in same webpage, then it is considered that the webpage Loading velocity may be slow, needs investigated.In the present embodiment, once refresh and be user to webpage Once request, once request of the user to webpage be designated as once accessing.
Parsed by the access data to targeted website, to obtain same source in the same session same net is accessed Page exceedes the access data of default access times, wherein, session refers to the user in same source on website Once complete access process.It can be specifically the visit in first analytically result to targeted website to obtain above-mentioned access data Ask that data are traveled through, same webpage is therefrom found out in units of session and is accessed for access times more than default access time The access data of (can be configured with root demand) are counted, then finds out all same sources in the same session and access same Webpage exceedes the access data of default access times, in order to obtain user stopping when accessing every time from these data Stay the time.
Extraction unit 20 be used for from obtain access extracting data in the same session same source in same webpage The time of staying.
The time of staying for once accessing is referred to from after user's request loading webpage, until user's request of loading net again Till page or other webpages, the time experienced between this, no matter whether the webpage loads out.Specifically, Can be obtain access data in can record in each access process, user's request record webpage moment and User asks again the moment for recording the webpage or request of loading other webpages, is calculated by the above-mentioned two moment State the time of staying.It is of course also possible to when user accesses webpage, be counted by each access of the timer to user When so that directly record has the time of staying of each access in access data, so, after access data are got, Can directly from the access extracting data above-mentioned time of staying.Obtain in a session, user accesses same webpage The time of staying for accessing each time, facilitating the use the time of staying determines whether the webpage is the slow webpage of loading velocity.
Determining unit 30 is used to determine whether the webpage for accessing is the slow webpage of loading velocity according to the time of staying.
Can attempt being refreshed because user runs into the excessively slow webpage of loading velocity, i.e., repeatedly access identical webpage, then The webpage is probably the slow webpage of loading velocity, when determining whether, the webpage for accessing is determined according to the time of staying whether Can be the length of the time of staying for judging to access every time for the webpage that loading velocity is slow, if wherein repeatedly access The time of staying longer (being more than or equal to time threshold), it is determined that the webpage is the slow webpage of loading velocity;Can also sentence Whether the disconnected mean residence time for repeatedly accessing is more than or equal to time threshold, if it is, determining the webpage for loading speed The slow webpage of degree;Can also be and judge in addition to the time of staying that last time is accessed, the average stop that others are accessed Whether the time is more than or equal to time threshold, if it is, determining the webpage for the slow webpage of loading velocity.Use due to working as Family last time accesses the time for the time of staying of webpage generally including user's browsed web content, and this period is long, This section of time of staying is rejected, the accuracy of judgement can be further improved.It should be noted that the embodiment of the present application In, determine that whether the webpage for accessing is that the concrete mode of the slow webpage of loading velocity is included but is not limited to according to the time of staying Aforesaid way, does not have improper restriction to the application here.
According to the embodiment of the present application, same source in the same session is obtained from the access data of targeted website and accesses same One webpage exceedes the access data of default access times, obtains same next in the same session from the access data for obtaining Source determines whether the webpage for accessing is the slow webpage of loading velocity in the time of staying of same webpage according to the time of staying, There are the access data of the access behavior of user according to record, judge loading velocity from the actual access behavior of user slow Webpage, relative to the load condition for testing webpage in prior art under test network environment, has truly reacted netizen Situation during webpage is accessed, the accuracy that the webpage slow to loading velocity judges is improve, is solved slow to loading velocity Webpage judge inaccurate technical problem.
Further, since artificial statistics is time-consuming longer in prior art, particularly with large-scale website, and manual testing is basic Cannot coverage goal website all webpages.And the embodiment of the present application judges by using the access data of targeted website The slow webpage of loading velocity, without the need for manual intervention, all webpages that can be accessed user by computer program etc. Judged, coverage rate is high.
Preferably, in the embodiment of the present application, can be by adding Tracker (JS scripts) in targeted website, to receive Collection user counts access behavior of each user in website in the access data of targeted website, and by the targeted website All access data all can be sent on given server, the user accesses data that one by one resolution server is collected.
Preferably, determining unit includes:First statistical module, for statistics in the same session same source same The total residence time of webpage and total access times;Acquisition module, for obtain in the same session same source last The secondary time of staying for accessing same webpage;Computing module, for being calculated in the same session except last using below equation Once access the mean residence time of same webpage:T=(T-T1)/(N-1), wherein, T is total residence time, and T1 is Last time accesses the time of staying of same webpage, and N is total access times;First judge module, for judging that t is It is no more than or equal to time threshold;First determining module, for when t is more than or equal to time threshold, it is determined that accessing Webpage be the slow webpage of loading velocity.
For the statistics of total residence time, can be by adder will be aforementioned in visit every time in the same session extracted The time of staying asked is added, and obtains total residence time.For total access times, it is possible to use enumerator is to accessing data In each access of same session added up, obtain total access times.
In the present embodiment, by the mean residence time for calculating the access to webpage (not accessing including last time), Whether the mean residence time is judged more than or equal to time threshold, the time threshold can be user's access target website The minimum access time of webpage, different targeted websites can arrange different time thresholds, during above-mentioned average stop Between more than or equal to time threshold then substantially it is considered that user do not browse web data, here can consider that user does not also have When webpage loads out.Webpage is browsed because the time of staying that webpage is accessed when user's last time generally includes user The time of content, this period is long, and this section of time of staying is rejected, and can further improve the accuracy of judgement.
Such as user webpage 3 times of connected reference one in a session, have accessed successively 10 seconds, 10 seconds, and 25 Second, wherein, last time of the user in this session is accessed has spent a certain amount of time browsed web content, therefore, Last time access time is longer.If the time threshold of the targeted website is 3s, it is calculated user and accesses the webpage The mean residence time of (not accessing including last time) is 10s, hence, it can be determined that the webpage that the user accesses Loading velocity is slow.If above-mentioned mean access time is less than time threshold, it is believed that violence of the user to webpage refreshes Or refresh by mistake, it is impossible to it is considered that webpage loading velocity itself is slow.
Optionally it is determined that unit includes:Second statistical module, for statistics, in the same session same source accesses same Access times of the time of staying of one webpage more than or equal to time threshold;Second judge module, for judging the time of staying Whether exceed frequency threshold value more than or equal to the access times of time threshold;Second determining module, for judging to stop When time exceedes frequency threshold value more than or equal to the access times of time threshold, it is determined that the webpage for accessing is that loading velocity is slow Webpage.
In the present embodiment, each time of staying for accessing in a session can be done and once be judged, judge whether it is big In equal to time threshold, and record access times of the time of staying more than or equal to time threshold, then the access time to recording Number is judged that judge that whether it exceedes frequency threshold value, namely be to determine in a session, user accesses stopping for webpage Whether the access times for staying the time longer are enough.If the user while in a session, for stopping for same web page access Stay some time of time longer, then may be considered and made because the webpage loading velocity causes slowly user repeatedly to refresh Into.When judging that the time of staying exceedes frequency threshold value more than or equal to the access times of time threshold, it is determined that access Webpage is the slow webpage of loading velocity.
In the present embodiment, time threshold and the time threshold of previous embodiment can be with identical, and frequency threshold value can be according to need Ask and be configured.
According to the embodiment of the present application, by arranging time threshold and frequency threshold value, successively to each time of staying for accessing Judged more than or equal to the access times of time threshold with the time of staying, further increased the net slow to loading velocity The accuracy of the judgement of page.
Preferably, determining unit includes:3rd determining module, for determining doubtful loading velocity according to the time of staying Slow webpage;3rd statistical module, for the source quantity that the statistics webpage loading velocity slow to doubtful loading velocity is slow; 3rd judge module, for judging whether source quantity reaches predetermined number;3rd determining module, for judging When source quantity reaches predetermined number, the slow webpage of doubtful loading velocity is determined for the slow webpage of loading velocity.
Because user's loading webpage speed is likely to be slowly what the network environment being located by the user caused, and not Webpage itself has problems, and there is accidentalia.To reject the interference factor, in the present embodiment, will be according to stop The slow webpage of loading velocity that time is determined for example, is more than or equal to as the slow webpage of doubtful loading velocity in t During time threshold, it is determined that the webpage for accessing is the slow webpage of doubtful loading velocity;Or, judging that the time of staying is big When the access times equal to time threshold exceed frequency threshold value, it is determined that the webpage for accessing is the slow net of doubtful loading velocity Page, then does again and further judges.Specifically, the slow webpage of doubtful loading velocity is being determined according to the time of staying Afterwards, the webpage is recorded, then to access source as dimension, counts the slow webpage quilt of the doubtful loading velocity The number of times of record, that is to say the slow source quantity of the webpage loading velocity slow to doubtful loading velocity, if it exceeds default Quantity (can be configured according to demand), then show that the speed for having a certain amount of user to load the webpage is slower, therefore, It is considered that the slow webpage of the doubtful loading velocity is the slow webpage of loading velocity.
According to the embodiment of the present application, by the source using webpage is accessed as the index for determining whether, so as to propose idol So factor, further improves the accuracy of the judgement of the webpage slow to loading velocity.
Preferably, determining unit includes:4th determining module, for determining doubtful loading velocity according to the time of staying Slow webpage;Logging modle, for recording the URL of the slow webpage of doubtful loading velocity;4th judges Module, for judging whether exceed preset recording time to the number of times of same URL record in preset time period Number;5th determining module, for when more than preset recording number of times, it is determined that more than the unified resource of preset recording number of times The corresponding webpage of finger URL is the slow webpage of loading velocity.
In the present embodiment, in order to avoid affecting accuracy (for example, certain time period target of result due to time factor The server fail of website, webpage loading in the time period goes wrong), a time period is pre-selected, i.e., in advance If the time period, count in preset time period, the same webpage is registered as the number of times of the slow webpage of doubtful loading velocity, Judge whether to exceed preset recording number of times, if it exceeds, then it is assumed that the webpage is the slow webpage of loading velocity, wherein, Preset recording number of times can be configured according to demand.
The determining device of the webpage loading velocity includes processor and memorizer, above-mentioned acquiring unit, extraction unit, Determining unit etc. is stored in memory as program unit, by computing device storage above-mentioned journey in memory Sequence unit.Above-mentioned default access times, time threshold, frequency threshold value etc. may be stored in memorizer.
Kernel is included in processor, is gone in memorizer to transfer corresponding program unit by kernel.Kernel can arrange one Or more, parse content of text by adjusting kernel parameter.
Memorizer potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/ Or the form, such as read only memory (ROM) or flash memory (flash RAM) such as Nonvolatile memory, memorizer includes at least one Individual storage chip.
Present invention also provides a kind of embodiment of computer program, when performing in data handling equipment, fits In the program code for performing initialization there are as below methods step:The access data of targeted website are parsed, to obtain In the same session same source accesses the access data that same webpage exceedes default access times, from the access number for obtaining According to middle extraction, in the same session same source, in the time of staying of same webpage, the net for accessing is determined according to the time of staying Whether page is the slow webpage of loading velocity.
Above-mentioned the embodiment of the present application sequence number is for illustration only, does not represent the quality of embodiment.
In above-described embodiment of the application, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, other can be passed through Mode realize.Wherein, device embodiment described above is only schematic, such as division of described unit, Can be a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Can with reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, institute The coupling each other for showing or discussing or direct-coupling or communication connection can be by some interfaces, unit or mould The INDIRECT COUPLING of block or communication connection, can be electrical or other forms.
The unit as separating component explanation can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to On multiple units.Some or all of unit therein can be according to the actual needs selected to realize this embodiment scheme Purpose.
In addition, each functional unit in the application each embodiment can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.It is above-mentioned integrated Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized and as independent production marketing or when using using in the form of SFU software functional unit, During a computer read/write memory medium can be stored in.Based on such understanding, the technical scheme essence of the application On all or part of prior art is contributed part in other words or the technical scheme can be with software product Form is embodied, and the computer software product is stored in a storage medium, including some instructions are used so that one Platform computer equipment (can be personal computer, server or network equipment etc.) performs each embodiment institute of the application State all or part of step of method.And aforesaid storage medium includes:USB flash disk, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD Etc. it is various can be with the medium of store program codes.
The above is only the preferred implementation of the application, it is noted that for the ordinary skill people of the art For member, on the premise of without departing from the application principle, some improvements and modifications can also be made, these improve and moisten Decorations also should be regarded as the protection domain of the application.

Claims (10)

1. a kind of determination method of webpage loading velocity, it is characterised in that include:
The access data of targeted website are parsed, to obtain same source in the same session same net is accessed Page exceedes the access data of default access times;
From the access extracting data same source described in the same session for obtaining in the same webpage The time of staying;And
Determine whether the webpage for accessing is the slow webpage of loading velocity according to the time of staying.
2. method according to claim 1, it is characterised in that determine that the webpage for accessing is according to the time of staying The no webpage slow for loading velocity includes:
Total residence time and total access of the statistics same source described in the same session in the same webpage Number of times;
Obtain the time of staying that the same source last time described in the same session accesses the same webpage;
Calculated in the same session except last time accesses averagely stopping for the same webpage using below equation Stay the time:
T=(T-T1)/(N-1)
Wherein, T is the total residence time, when T1 is that the last time accesses the stop of the same webpage Between, N is total access times;
Judge the t whether more than or equal to time threshold;
When the t is more than or equal to the time threshold, the webpage for determining the access is that loading velocity is slow Webpage.
3. method according to claim 1, it is characterised in that determine that the webpage for accessing is according to the time of staying The no webpage slow for loading velocity includes:
Statistics time of staying of the same source access same webpage described in the same session is more than or equal to The access times of time threshold;
Judge whether the time of staying exceedes frequency threshold value more than or equal to the access times of the time threshold;
When judging that the time of staying exceedes frequency threshold value more than or equal to the access times of the time threshold, it is determined that The webpage of the access is the slow webpage of loading velocity.
4. the method according to any one of claims 1 to 3, it is characterised in that determined according to the time of staying and visited Whether the webpage asked is that the slow webpage of loading velocity includes:
The slow webpage of doubtful loading velocity is determined according to the time of staying;
The slow source quantity of the statistics webpage loading velocity slow to the doubtful loading velocity;
Judge whether the source quantity reaches predetermined number;
When judging that the source quantity reaches the predetermined number, the slow net of the doubtful loading velocity is determined Page is the slow webpage of loading velocity.
5. the method according to any one of claims 1 to 3, it is characterised in that determined according to the time of staying and visited Whether the webpage asked is that the slow webpage of loading velocity includes:
The slow webpage of doubtful loading velocity is determined according to the time of staying;
Record the URL of the slow webpage of the doubtful loading velocity;
Judge whether preset recording number of times is exceeded to the number of times of same URL record in preset time period;
When more than the preset recording number of times, it is determined that more than the URL of the preset recording number of times Corresponding webpage is the slow webpage of loading velocity.
6. a kind of determining device of webpage loading velocity, it is characterised in that include:
Acquiring unit, it is same in the same session to obtain for parsing to the access data of targeted website Source accesses the access data that same webpage exceedes default access times;
Extraction unit, for existing from the access extracting data same source described in the same session for obtaining The time of staying of the same webpage;And
Determining unit, for determining whether the webpage for accessing is the slow webpage of loading velocity according to the time of staying.
7. device according to claim 6, it is characterised in that the determining unit includes:
First statistical module, for counting the same source described in the same session in the same webpage Total residence time and total access times;
Acquisition module, accesses described same for obtaining the same source last time described in the same session The time of staying of webpage;
Computing module, for being calculated in the same session except last time accesses described same using below equation The mean residence time of one webpage:
T=(T-T1)/(N-1)
Wherein, T is the total residence time, when T1 is that the last time accesses the stop of the same webpage Between, N is total access times;
First judge module, for judging the t whether more than or equal to time threshold;
First determining module, for when the t is more than or equal to the time threshold, determining the access Webpage is the slow webpage of loading velocity.
8. device according to claim 6, it is characterised in that the determining unit includes:
Second statistical module, for statistics same source described in the same session the same webpage is accessed The time of staying more than or equal to time threshold access times;
Second judge module, for judging whether the time of staying surpasses more than or equal to the access times of the time threshold Cross frequency threshold value;
Second determining module, for judging that the time of staying surpasses more than or equal to the access times of the time threshold When crossing frequency threshold value, the webpage for determining the access is the slow webpage of loading velocity.
9. the device according to any one of claim 6 to 8, it is characterised in that the determining unit includes:
3rd determining module, for determining the slow webpage of doubtful loading velocity according to the time of staying;
3rd statistical module, for the source number that the statistics webpage loading velocity slow to the doubtful loading velocity is slow Amount;
3rd judge module, for judging whether the source quantity reaches predetermined number;
3rd determining module, for when judging that the source quantity reaches the predetermined number, it is determined that described The slow webpage of doubtful loading velocity is the slow webpage of loading velocity.
10. the device according to any one of claim 6 to 8, it is characterised in that the determining unit includes:
4th determining module, for determining the slow webpage of doubtful loading velocity according to the time of staying;
Logging modle, for recording the URL of the slow webpage of the doubtful loading velocity;
4th judge module, for judging to be to the number of times of same URL record in preset time period It is no more than preset recording number of times;
5th determining module, for when more than the preset recording number of times, it is determined that exceeding the preset recording time The corresponding webpage of several URLs is the slow webpage of loading velocity.
CN201510703022.9A 2015-10-26 2015-10-26 The determination method and apparatus of webpage loading velocity Active CN106610887B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510703022.9A CN106610887B (en) 2015-10-26 2015-10-26 The determination method and apparatus of webpage loading velocity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510703022.9A CN106610887B (en) 2015-10-26 2015-10-26 The determination method and apparatus of webpage loading velocity

Publications (2)

Publication Number Publication Date
CN106610887A true CN106610887A (en) 2017-05-03
CN106610887B CN106610887B (en) 2019-02-22

Family

ID=58612901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510703022.9A Active CN106610887B (en) 2015-10-26 2015-10-26 The determination method and apparatus of webpage loading velocity

Country Status (1)

Country Link
CN (1) CN106610887B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479151A (en) * 2010-11-26 2012-05-30 腾讯科技(深圳)有限公司 Testing method and device of webpage access speed
CN103246526A (en) * 2012-02-07 2013-08-14 腾讯科技(深圳)有限公司 Client pre-loading method and device
CN103559222A (en) * 2013-10-18 2014-02-05 北京奇虎科技有限公司 Method and device for displaying page loading time in browsers
CN104156401A (en) * 2014-07-22 2014-11-19 小米科技有限责任公司 Webpage loading method, device and equipment
US20150263912A1 (en) * 2010-06-02 2015-09-17 Ebay Inc. Method and system for detecting slow page load

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150263912A1 (en) * 2010-06-02 2015-09-17 Ebay Inc. Method and system for detecting slow page load
CN102479151A (en) * 2010-11-26 2012-05-30 腾讯科技(深圳)有限公司 Testing method and device of webpage access speed
CN103246526A (en) * 2012-02-07 2013-08-14 腾讯科技(深圳)有限公司 Client pre-loading method and device
CN103559222A (en) * 2013-10-18 2014-02-05 北京奇虎科技有限公司 Method and device for displaying page loading time in browsers
CN104156401A (en) * 2014-07-22 2014-11-19 小米科技有限责任公司 Webpage loading method, device and equipment

Also Published As

Publication number Publication date
CN106610887B (en) 2019-02-22

Similar Documents

Publication Publication Date Title
US20160314064A1 (en) Systems and methods to identify and classify performance bottlenecks in cloud based applications
Gleich et al. Tracking the random surfer: empirically measured teleportation parameters in PageRank
CN109241343B (en) System, method and device for identifying brush amount user
CN103297394B (en) Website security detection method and device
CN102932206B (en) The method and system of monitoring website access information
CN103631787B (en) Webpage type identification method and type of webpage identification device
CN105095207B (en) Retrieval, the method and apparatus for obtaining application software content
CN104182548B (en) Webpage updates processing method and processing device
CN103618696B (en) Method and server for processing cookie information
US20160210181A1 (en) Analysis apparatus and analysis method
CN107578263A (en) A kind of detection method, device and the electronic equipment of advertisement abnormal access
CN110602045A (en) Malicious webpage identification method based on feature fusion and machine learning
CN107678932A (en) Application performance analysis method and device
CN107992738A (en) A kind of account logs in method for detecting abnormality, device and electronic equipment
CN104391953B (en) Detect the method and device of webpage renewal
CN107403251A (en) Risk checking method and device
KR101212457B1 (en) Web page searching system and method using access time and frequency
CN107135199A (en) The detection method and device at webpage back door
CN106611010A (en) Method and device for determining webpage loading speed
CN110110219B (en) Method and device for determining user preference according to network behavior
CN103618761B (en) Method and browser for processing cookie information
CN106485143A (en) Counter-scanning detection method based on the various change of URL and system
CN116932549A (en) Intelligent model-based platform data storage method, system, medium and equipment
CN106610887A (en) Method and device for determining webpage loading speed
CN103116708A (en) Device and method for evaluating website experience

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for determining webpage loading speed

Effective date of registration: 20190531

Granted publication date: 20190222

Pledgee: Shenzhen Black Horse World Investment Consulting Co., Ltd.

Pledgor: Beijing Guoshuang Technology Co.,Ltd.

Registration number: 2019990000503

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.