CN113496003A - Method and device for determining page stay time - Google Patents

Method and device for determining page stay time Download PDF

Info

Publication number
CN113496003A
CN113496003A CN202010269384.2A CN202010269384A CN113496003A CN 113496003 A CN113496003 A CN 113496003A CN 202010269384 A CN202010269384 A CN 202010269384A CN 113496003 A CN113496003 A CN 113496003A
Authority
CN
China
Prior art keywords
page
determining
time
event
route change
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010269384.2A
Other languages
Chinese (zh)
Inventor
迟潇潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010269384.2A priority Critical patent/CN113496003A/en
Publication of CN113496003A publication Critical patent/CN113496003A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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/3438Recording 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 monitoring of user actions

Abstract

The invention discloses a method and a device for determining the retention time of a page, and relates to the technical field of computers. One embodiment of the method comprises: monitoring a loading event of a first page, and determining first time corresponding to the loading event when the loading event is monitored; determining whether the mode of the first page is a single-page application mode, and if so, monitoring a route change event corresponding to the first page; when the route change event is monitored, determining a second time corresponding to the route change event; and determining the stay time of the first page according to the first time and the second time. This embodiment improves the accuracy of determining the dwell time of the pages of the single-page application mode.

Description

Method and device for determining page stay time
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for determining the retention time of a page.
Background
The page dwell time can reflect the degree of interest of the user to the page, is an important index of webpage analysis, and has important significance for constructing user figures and optimizing pages of websites and the like.
Currently, the following method is generally adopted to determine the page dwell time: and recording the starting time of the page when the page is loaded, recording the ending time of the page when the page is closed, and taking the time difference between the ending time and the starting time as the dwell time of the page.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in a page in the single-page application mode, the contents of the page can be updated without closing and reloading the page. That is, when the contents of a page of the single page application mode are changed, the page may not be reloaded. Therefore, when the page staying time length is determined in the above mode, the determined page staying time length is not accurate enough.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for determining a page dwell time, where when a loading event of a first page is monitored, a first time of the loading event is determined. And when the first page is in the single-page application mode, monitoring a route change event of the first page, and determining a second time corresponding to the route change event when the route change event is monitored. And then determining the stay time of the first page according to the first time and the second time. When the content of the page in the single-page application mode changes, although the events of page unloading and page reloading may not occur, the route changes, so that the accuracy of the stay duration of the page in the single-page application mode can be improved by monitoring the route change event.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for determining a page dwell time is provided.
The method for determining the dwell time of the page in the embodiment of the invention comprises the following steps: monitoring a loading event of a first page, and determining first time corresponding to the loading event when the loading event is monitored;
determining whether the mode of the first page is a single-page application mode, and if so, monitoring a route change event corresponding to the first page;
when the route change event is monitored, determining a second time corresponding to the route change event;
and determining the stay time of the first page according to the first time and the second time.
Optionally, when the route change event is monitored, the method further includes:
determining a second page according to the route change event;
and determining whether the content of the second page is the same as the content of the first page, and if not, determining the stay time of the first page according to the first time and the second time.
Optionally, the method further comprises:
when the content of the second page is the same as the content of the first page, ignoring the route change event.
Optionally, the method further comprises:
monitoring an unloading event corresponding to the first page;
when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event;
and determining the stay time of the first page according to the third time and the first time.
Optionally, when the mode of the first page is a multi-page application mode, determining a dwell time of the first page according to a third time of the unload event and the first time.
Optionally, the determining whether the mode of the first page is a single-page application mode includes:
acquiring configuration information, wherein the configuration information comprises: modes corresponding to one or more pages respectively;
and determining whether the mode of the first page is a single-page application mode or not according to the configuration information.
Optionally, the configuration information further includes: the one or more pages respectively correspond to the routes; the determining a second page according to the route change event includes:
and determining a second page corresponding to the route change event according to the route corresponding to the route change event and the configuration information.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an apparatus for determining a page dwell time.
The device for determining the dwell time of the page in the embodiment of the invention comprises the following steps: the system comprises a loading event monitoring module, a mode determining module, a routing event monitoring module and a stay time determining module; wherein the content of the first and second substances,
the loading event monitoring module is used for monitoring a loading event of a first page, and when the loading event is monitored, determining first time corresponding to the loading event;
the mode determining module is used for determining whether the mode of the first page is a single-page application mode, and if so, triggering the route monitoring module;
the route monitoring module is used for monitoring a route change event corresponding to the first page, and when the route change event is monitored, determining second time corresponding to the route change event;
and the stay time length determining module is used for determining the stay time length of the first page according to the first time and the second time.
Optionally, the route monitoring module is configured to determine a second page according to the route change event when the route change event is monitored; and determining whether the content of the second page is the same as the content of the first page, and if not, triggering the stay time length determining module.
Optionally, the method further comprises: an unloading event monitoring module; wherein the content of the first and second substances,
the unloading event monitoring module is used for monitoring the unloading event corresponding to the first page; when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event, and triggering the stay time length determining module;
and the stay time length determining module is used for determining the stay time length of the first page according to the third time and the first time.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device for determining a page dwell time.
The electronic equipment for determining the dwell time of the page comprises: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the dwell time of the page according to the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements a method of determining a page dwell time of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: when a load event of a first page is monitored, a first time of the load event is determined. And when the first page is in the single-page application mode, monitoring a route change event of the first page, and determining a second time corresponding to the route change event when the route change event is monitored. And then determining the stay time of the first page according to the first time and the second time. When the content of the page in the single-page application mode changes, although the events of page unloading and page reloading may not occur, the route changes, so that the accuracy of the stay duration of the page in the single-page application mode can be improved by monitoring the route change event.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method for determining page dwell time according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the main steps of a method for determining page dwell time for single page application mode, according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main steps of another method for determining page dwell time for single page application mode according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating the main steps of another method for determining page dwell time according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of an apparatus for determining page dwell time in accordance with an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
FIG. 1 is a diagram illustrating the main steps of a method for determining a page dwell time according to an embodiment of the present invention.
As shown in fig. 1, a method for determining a page dwell time according to an embodiment of the present invention mainly includes the following steps:
step S101: monitoring a loading event of a first page, and determining a first time corresponding to the loading event when the loading event is monitored.
The loading event of the first page occurs when the first page is loaded, for example, when a loading request of the first page sent by a user is responded, the loading event of the first page occurs. For pages of different formats, different ways may be employed to listen for a load event for the first page. Using api in javascript as an example, onload may be monitored in window for a load event of the first page. When a load event for the first page is snooped, a first time t1 at which the load event occurs may be recorded.
Step S102: and determining whether the mode of the first page is a single-page application mode, and if so, monitoring a route change event corresponding to the first page.
Step S103: and when the route change event is monitored, determining a second time corresponding to the route change event.
The monitoring mode of the route change event can be various, for example, the monitoring of the route change event can be realized based on the history api and the hashHistory. Taking a hashHistory as an example, when the route of the first page changes, a hashChange event is triggered, and the route change event corresponding to the first page can be monitored by monitoring the hashChange event. In addition, taking a hashHistory as an example, when the user triggers a forward or backward button on the first page, that is, when the route of the first page changes, a pop state event is triggered, and the route change event corresponding to the first page can be monitored by monitoring the pop state event.
In one embodiment of the present invention, configuration information about one or more pages may be set in advance. The configuration information includes a mode corresponding to each of the one or more pages, for example, an issile field is used in the configuration information to indicate whether the page is in a single-page application mode. The configuration information may be set in the server or in a device for determining the residence time of the page according to the embodiment of the present invention. When the configuration information is set in the server, the device for determining the residence time of the page according to the embodiment of the invention can acquire the configuration information according to the corresponding server address. When the configuration information is updated, the updated configuration information is obtained according to the address of the server, and the code of the device for determining the retention time of the page is not required to be changed.
After the configuration information is obtained, a page identical to the first page can be determined from a plurality of pages of the configuration information, and then whether the mode of the first page is a single-page application mode or not is determined according to the mode of the first page recorded in the configuration information. For example, it is determined whether the mode of the first page is a single page application mode by parsing an issile field in the configuration information.
Further, the configuration information may further include: the one or more pages respectively correspond to the routes; when a route change event corresponding to the first page is monitored, the second page corresponding to the route change event can be determined according to the route corresponding to the route change event and the configuration information.
When the configuration information includes a route of a page, a field corresponding to one page in the configuration information may be as shown in table 1 below. As shown in table 1, the configuration information may further set a reporting address of the server, so that the apparatus for determining the page staying time according to the embodiment of the present invention can automatically report the staying time of the first page to the server according to the reporting address of the server after determining the staying time of the first page.
TABLE 1
Key Description of the invention
isSingle Whether it is a single-page application
routes Routing of pages
server Reported address of server
It can be understood that table 1 shows a field corresponding to a certain page in the configuration information. When the configuration information includes the mode and the route corresponding to the plurality of pages, the mode and the route corresponding to each page may be recorded in the form shown in table 1, and accordingly, the identification information and the field thereof of each page may be recorded correspondingly. When the route change event of the first page is monitored, the page which is the same as the first page can be determined from the configuration information according to the identification information of the page, and the second page corresponding to the route change event is determined according to the route of the first page recorded by the configuration information.
In order to further improve the accuracy of the page dwell time, in one embodiment of the present invention, when the route change event is monitored, a second page is determined according to the route change event; determining whether the content of the second page is the same as the content of the first page, and if so, ignoring the route change event; otherwise, determining the stay time of the first page according to the first time and the second time.
To facilitate comparing the contents of the first page and the second page, the contents of the first page may be stored in a cache after the first page is loaded. When the second page is determined, the content of the second page may be compared with the content of the first page according to the caching. When the content of the first page is the same as the content of the second page, it is indicated that the route corresponding to the route change event and the route corresponding to the first page loading event both correspond to the same page content, that is, it is indicated that the page content viewed by the user is not changed. Therefore, when the content of the first page is the same as that of the second page, the route change event is ignored, so that the duration of the user staying in the same page content is continuously recorded, the page staying duration is more accurately determined, and the user portrait construction, page optimization and the like according to the page staying duration are more accurately realized.
In addition, it can be understood that when the content of the first page is different from the content of the second page, the content of the first page stored in the cache can be replaced by the content of the second page, and when the route change event of the first page is monitored again, whether the page content is changed due to the route change event can be determined according to the page content corresponding to the route change event of the first page which is monitored again and the content of the second page in the cache, so that the page dwell time can be determined more accurately.
According to the above embodiment, when the first page is in the single-page application mode, as shown in fig. 2, the method for determining the page dwell time provided by the embodiment of the present invention may include the following steps:
step S201: monitoring a loading event of a first page, and determining a first time corresponding to the loading event when the loading event is monitored.
Step S202: and monitoring a route change event corresponding to the first page, and determining a second page according to the route change event when the route change event is monitored.
Step S203: and determining whether the content of the second page is the same as the content of the first page, if so, executing step S204, otherwise, executing step S205.
Step S204: the route change event is ignored and step S202 is performed.
Step S205: and determining second time corresponding to the route change event, and determining the stay time of the first page according to the first time and the second time.
Through the embodiment, when the content of the second page is different from that of the first page, the page staying time is determined according to the second time corresponding to the route change event and the first time of the page loading time, so that the time of a user staying in the same page content is continuously recorded, the page staying time is more accurately determined, and further, the user portrait, the optimized page and the like can be more accurately constructed according to the page staying time.
Step S104: and determining the stay time of the first page according to the first time and the second time.
When the route change event of the first page is monitored, the stay time of the first page is determined to be t2-t1 according to the second time t2 corresponding to the route change event and the first time t1 corresponding to the loading event of the first page.
To improve the efficiency of determining the dwell time of the first page, when the first time t1 corresponding to the loading event of the first page is determined, t1 may be stored in the cache first. After the second time t2 corresponding to the route change event of the first page is determined, the dwell time of the first page can be calculated to be t2-t1 according to the cached t 1. And, t1 in the cache can be replaced by t2, so that when the route change event of the first page is monitored again, the stay time of the first page after the route change can be determined according to the time corresponding to the route change event of the first page monitored again and t2 in the cache.
In addition, when the user browses the first page of the single-page application mode, the user may close the first page when the content of the page is not changed. For example, when no route change event occurs, the user leaves the page. In order to accurately determine the dwell time of the first page, in an embodiment of the present invention, in addition to monitoring a route change event, an unload event corresponding to the first page is also monitored; when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event; and determining the stay time of the first page according to the third time and the first time.
A page unload event occurs when a user closes or refreshes a page. In an embodiment of the present invention, taking api in javascript as an example, a window. When the unloading event of the first page is monitored before the route change event occurs, the unloading event of the first page is described, the unloading from the loading of the first page to the first page is described, and the route change event does not occur in the process, that is, the user leaves the first page before the content of the first page is changed. At this time, the dwell time of the first page may be determined according to the third time t3 corresponding to the unload event and the first time t1 of the page load event, where the dwell time of the first page is t3-t 1.
According to the above embodiment, when the first page is in the single-page application mode, as shown in fig. 3, the method for determining the page dwell time provided by the embodiment of the present invention may include the following steps:
step S301: monitoring a loading event of a first page, and determining a first time corresponding to the loading event when the loading event is monitored.
Step S302: and monitoring a route change event and an unloading event corresponding to the first page.
Step S303: and when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event.
Step S304: and determining the stay time of the first page according to the third time and the first time.
In addition, after the first page route change event is monitored, that is, the first page is converted into the second page according to the route change event, and when the unloading event of the second page is monitored, the stay time of the second page can be determined according to the third time corresponding to the unloading event of the second page and the second time corresponding to the route change event of the first page.
It can be understood that, when the mode of the first page is the multi-page application mode, and when the content of the page changes, the page needs to be unloaded first and then the page needs to be reloaded, the dwell time of the first page can be determined by monitoring the unloading event of the first page. Specifically, in an embodiment of the present invention, when the mode of the first page is the multi-page application mode, the dwell time of the first page is determined according to the third time of the unloading event and the first time.
The unload event of the first page may also be monitored through window. When the content of the first page changes, the current first page needs to be unloaded first, and then a new first page needs to be reloaded, so that the stay time of the first page of the multi-page application mode can be determined by monitoring the unloading event of the first page.
According to the above embodiment, as shown in fig. 4, the method for determining the page staying time provided by the embodiment of the present invention may include the following steps:
step S401: monitoring a loading event of a first page, and determining a first time corresponding to the loading event when the loading event is monitored.
Step S402: and judging whether the mode of the first page is a single-page application mode, if so, executing the step S403 to the step S409, otherwise, executing the step S410.
Step S403: monitoring a route change event and an unloading event corresponding to the first page; when the route change event is not monitored and the uninstall event is monitored, executing step S404; when the uninstall event is not monitored and the route change event is monitored, step S405 is performed.
Step S404: determining third time corresponding to the unloading event, and determining the stay time of the first page according to the third time corresponding to the unloading event and the first time of the loading event; the current flow is ended.
Step S405: and determining a second page according to the route change event.
Step S406: and judging whether the content of the second page is the same as the content of the first page, if so, executing step S407, otherwise, executing step S408.
Step S407: the route change event is ignored and step S403 is performed.
Step S408: and determining second time corresponding to the route change event, and determining the stay time of the first page according to the second time and the first time corresponding to the loading event.
Step S409: when the unloading event of the second page is monitored, determining the stay time of the second page according to the fourth time corresponding to the unloading event of the second page and the second time; the current flow is ended.
Step S410: and monitoring an unloading event of the first page, and when the unloading event is monitored, determining the stay time of the first page according to the fifth time corresponding to the unloading event.
According to the method for determining the dwell time of the page, the first time of the loading event is determined when the loading event of the first page is monitored. And when the first page is in the single-page application mode, monitoring a route change event of the first page, and determining a second time corresponding to the route change event when the route change event is monitored. And then determining the stay time of the first page according to the first time and the second time. When the content of the page in the single-page application mode changes, although the events of page unloading and page reloading may not occur, the route changes, so that the accuracy of the stay duration of the page in the single-page application mode can be improved by monitoring the route change event.
FIG. 5 is a schematic diagram of the main modules of an apparatus for determining page dwell time in accordance with an embodiment of the present invention.
As shown in fig. 5, the apparatus 500 for determining the dwell time of the page according to the embodiment of the present invention includes: a loading event monitoring module 501, a mode determining module 502, a routing event monitoring module 503 and a stay time determining module 504; wherein the content of the first and second substances,
the load event monitoring module 501 is configured to monitor a load event of a first page, and when the load event is monitored, determine a first time corresponding to the load event;
the mode determining module 502 is configured to determine whether the mode of the first page is a single-page application mode, and if so, trigger the route monitoring module;
the route monitoring module 503 is configured to monitor a route change event corresponding to the first page, and when the route change event is monitored, determine a second time corresponding to the route change event;
the staying duration determining module 504 is configured to determine the staying duration of the first page according to the first time and the second time.
In an embodiment of the present invention, the route monitoring module 503 is configured to determine a second page according to the route change event when the route change event is monitored; and determining whether the content of the second page is the same as the content of the first page, and if not, triggering the stay time length determination module 504.
In an embodiment of the present invention, the route monitoring module 503 is configured to ignore the route change event when the content of the second page is the same as the content of the first page.
In one embodiment of the invention, the apparatus further comprises: an offload event listening module 505; the unloading event monitoring module 505 is configured to monitor an unloading event corresponding to the first page; when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event, and triggering the stay time duration determining module 504;
the staying duration determining module 504 is configured to determine the staying duration of the first page according to the third time and the first time.
In an embodiment of the invention, the staying length determining module 504 is configured to determine the staying length of the first page according to the third time of the unloading event and the first time when the mode of the first page is the multi-page application mode.
In an embodiment of the present invention, the mode determining module 502 is configured to obtain configuration information, where the configuration information includes: modes corresponding to one or more pages respectively; and determining whether the mode of the first page is a single-page application mode or not according to the configuration information.
In an embodiment of the present invention, the configuration information further includes: the one or more pages respectively correspond to the routes; the route monitoring module 503 is configured to determine a second page corresponding to the route change event according to the route corresponding to the route change event and the configuration information.
According to the device for determining the dwell time of the page, which is disclosed by the embodiment of the invention, when the loading event of the first page is monitored, the first time of the loading event is determined. And when the first page is in the single-page application mode, monitoring a route change event of the first page, and determining a second time corresponding to the route change event when the route change event is monitored. And then determining the stay time of the first page according to the first time and the second time. When the content of the page in the single-page application mode changes, although the events of page unloading and page reloading may not occur, the route changes, so that the accuracy of the stay duration of the page in the single-page application mode can be improved by monitoring the route change event.
Fig. 6 illustrates an exemplary system architecture 600 of a method of determining page dwell time or an apparatus for determining page dwell time to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the method for determining the page staying time provided by the embodiment of the present invention is generally executed by the terminal devices 601, 602, and 603, and accordingly, the apparatus for determining the page staying time is generally disposed in the terminal devices 601, 602, and 603.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a load event snoop module, a mode determination module, a route event snoop module, and a dwell time determination module. The names of these modules do not in some cases constitute a limitation on the module itself, for example, the load event monitoring module may also be described as a "module that monitors a load event of the first page".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: monitoring a loading event of a first page, and determining first time corresponding to the loading event when the loading event is monitored; determining whether the mode of the first page is a single-page application mode, and if so, monitoring a route change event corresponding to the first page; when the route change event is monitored, determining a second time corresponding to the route change event; and determining the stay time of the first page according to the first time and the second time.
According to the technical scheme of the embodiment of the invention, when the loading event of the first page is monitored, the first time of the loading event is determined. And when the first page is in the single-page application mode, monitoring a route change event of the first page, and determining a second time corresponding to the route change event when the route change event is monitored. And then determining the stay time of the first page according to the first time and the second time. When the content of the page in the single-page application mode changes, although the events of page unloading and page reloading may not occur, the route changes, so that the accuracy of the stay duration of the page in the single-page application mode can be improved by monitoring the route change event.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for determining page dwell time, comprising:
monitoring a loading event of a first page, and determining first time corresponding to the loading event when the loading event is monitored;
determining whether the mode of the first page is a single-page application mode, and if so, monitoring a route change event corresponding to the first page;
when the route change event is monitored, determining a second time corresponding to the route change event;
and determining the stay time of the first page according to the first time and the second time.
2. The method of claim 1, wherein when the route change event is monitored, further comprising:
determining a second page according to the route change event;
and determining whether the content of the second page is the same as the content of the first page, and if not, determining the stay time of the first page according to the first time and the second time.
3. The method of claim 2, further comprising:
when the content of the second page is the same as the content of the first page, ignoring the route change event.
4. The method of claim 1, further comprising:
monitoring an unloading event corresponding to the first page;
when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event;
and determining the stay time of the first page according to the third time and the first time.
5. The method of claim 4,
and when the mode of the first page is a multi-page application mode, determining the stay time of the first page according to the third time and the first time of the unloading event.
6. The method of claim 2, wherein determining whether the mode of the first page is a single page application mode comprises:
acquiring configuration information, wherein the configuration information comprises: modes corresponding to one or more pages respectively;
and determining whether the mode of the first page is a single-page application mode or not according to the configuration information.
7. The method of claim 6, wherein the configuration information further comprises: the one or more pages respectively correspond to the routes; the determining a second page according to the route change event includes:
and determining a second page corresponding to the route change event according to the route corresponding to the route change event and the configuration information.
8. An apparatus for determining page dwell time, comprising: the system comprises a loading event monitoring module, a mode determining module, a routing event monitoring module and a stay time determining module; wherein the content of the first and second substances,
the loading event monitoring module is used for monitoring a loading event of a first page, and when the loading event is monitored, determining first time corresponding to the loading event;
the mode determining module is used for determining whether the mode of the first page is a single-page application mode, and if so, triggering the route monitoring module;
the route monitoring module is used for monitoring a route change event corresponding to the first page, and when the route change event is monitored, determining second time corresponding to the route change event;
and the stay time length determining module is used for determining the stay time length of the first page according to the first time and the second time.
9. The apparatus of claim 8,
the route monitoring module is used for determining a second page according to the route change event when the route change event is monitored; and determining whether the content of the second page is the same as the content of the first page, and if not, triggering the stay time length determining module.
10. The apparatus of claim 8, further comprising: an unloading event monitoring module; wherein the content of the first and second substances,
the unloading event monitoring module is used for monitoring the unloading event corresponding to the first page; when the route change event is not monitored and the unloading event is monitored, determining a third time corresponding to the unloading event, and triggering the stay time length determining module;
and the stay time length determining module is used for determining the stay time length of the first page according to the third time and the first time.
11. An electronic device for determining a page dwell time, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010269384.2A 2020-04-08 2020-04-08 Method and device for determining page stay time Pending CN113496003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010269384.2A CN113496003A (en) 2020-04-08 2020-04-08 Method and device for determining page stay time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010269384.2A CN113496003A (en) 2020-04-08 2020-04-08 Method and device for determining page stay time

Publications (1)

Publication Number Publication Date
CN113496003A true CN113496003A (en) 2021-10-12

Family

ID=77995728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010269384.2A Pending CN113496003A (en) 2020-04-08 2020-04-08 Method and device for determining page stay time

Country Status (1)

Country Link
CN (1) CN113496003A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077250A (en) * 2013-01-28 2013-05-01 人民搜索网络股份公司 Method and device for capturing webpage content
CN104850409A (en) * 2015-06-05 2015-08-19 北京京东尚科信息技术有限公司 Webpage staying duration statistic method
CN105009103A (en) * 2013-03-15 2015-10-28 雅虎公司 Display time of web page
CN108108381A (en) * 2016-11-25 2018-06-01 北京国双科技有限公司 The monitoring method and device of the page
CN108337281A (en) * 2017-01-19 2018-07-27 北京京东尚科信息技术有限公司 Calculate the method and system of page browsing duration
CN108416038A (en) * 2018-03-14 2018-08-17 北京网信云服信息科技有限公司 A kind of data statistical approach and device of single page application
CN109669847A (en) * 2017-10-13 2019-04-23 北京国双科技有限公司 Information processing method and device
WO2019153479A1 (en) * 2018-02-06 2019-08-15 武汉斗鱼网络科技有限公司 Browser page monitoring method and apparatus, and computer device
US20190253332A1 (en) * 2018-02-12 2019-08-15 Ca, Inc. Correlated page resources for single page applications
CN110263070A (en) * 2019-05-30 2019-09-20 北京创鑫旅程网络技术有限公司 Event report method and device
CN110717122A (en) * 2019-09-26 2020-01-21 北京华宇信息技术有限公司 Page performance acquisition method and device and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077250A (en) * 2013-01-28 2013-05-01 人民搜索网络股份公司 Method and device for capturing webpage content
CN105009103A (en) * 2013-03-15 2015-10-28 雅虎公司 Display time of web page
CN104850409A (en) * 2015-06-05 2015-08-19 北京京东尚科信息技术有限公司 Webpage staying duration statistic method
CN108108381A (en) * 2016-11-25 2018-06-01 北京国双科技有限公司 The monitoring method and device of the page
CN108337281A (en) * 2017-01-19 2018-07-27 北京京东尚科信息技术有限公司 Calculate the method and system of page browsing duration
CN109669847A (en) * 2017-10-13 2019-04-23 北京国双科技有限公司 Information processing method and device
WO2019153479A1 (en) * 2018-02-06 2019-08-15 武汉斗鱼网络科技有限公司 Browser page monitoring method and apparatus, and computer device
US20190253332A1 (en) * 2018-02-12 2019-08-15 Ca, Inc. Correlated page resources for single page applications
CN108416038A (en) * 2018-03-14 2018-08-17 北京网信云服信息科技有限公司 A kind of data statistical approach and device of single page application
CN110263070A (en) * 2019-05-30 2019-09-20 北京创鑫旅程网络技术有限公司 Event report method and device
CN110717122A (en) * 2019-09-26 2020-01-21 北京华宇信息技术有限公司 Page performance acquisition method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111125107A (en) Data processing method, device, electronic equipment and medium
CN108334516B (en) Information pushing method and device
CN111400304A (en) Method and device for acquiring total data of section dates, electronic equipment and storage medium
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN111783005A (en) Method, apparatus and system for displaying web page, computer system and medium
CN112948138A (en) Method and device for processing message
CN115496544A (en) Data processing method and device
CN112115149A (en) Method and device for providing data
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
CN113496003A (en) Method and device for determining page stay time
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
CN112688982B (en) User request processing method and device
CN113138943B (en) Method and device for processing request
US20210144048A1 (en) Method and apparatus for outputting information
CN110377654B (en) Data request processing method and device, electronic equipment and computer-readable storage medium
CN113722007A (en) Configuration method, device and system of VPN branch equipment
CN109087097B (en) Method and device for updating same identifier of chain code
CN113127416A (en) Data query method and device
CN112699116A (en) Data processing method and system
CN113761433A (en) Service processing method and device
CN112711572A (en) Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN111695059A (en) Information view list processing method and device and display equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination