CN111382380A - Statistical method and device for page access duration - Google Patents

Statistical method and device for page access duration Download PDF

Info

Publication number
CN111382380A
CN111382380A CN201811611495.6A CN201811611495A CN111382380A CN 111382380 A CN111382380 A CN 111382380A CN 201811611495 A CN201811611495 A CN 201811611495A CN 111382380 A CN111382380 A CN 111382380A
Authority
CN
China
Prior art keywords
page
access duration
event
time
page access
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
CN201811611495.6A
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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201811611495.6A priority Critical patent/CN111382380A/en
Publication of CN111382380A publication Critical patent/CN111382380A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention discloses a statistical method and device for page access duration, electronic equipment and a computer readable storage medium. The method comprises the following steps: when the opening event of the page is monitored, judging whether page access duration data are stored in a local designated storage or not, and if so, sending the stored page access duration data to a server; and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage. According to the technical scheme, the page access duration of one page can be recorded in the designated storage, and when the next page is opened, the page access duration data of the previous page stored in the designated storage can be sent to the server, so that the loss of the sent data can be avoided when the page is closed, the statistics of the page access duration is realized, and the accuracy of the page access duration is ensured.

Description

Statistical method and device for page access duration
Technical Field
The invention relates to the technical field of computers, in particular to a statistical method and device of page access duration, electronic equipment and a computer-readable storage medium.
Background
In order to better determine the stickiness of a user to a web page so as to facilitate the optimization of the web page, the page access duration of the user to the web page, that is, the time interval from the user opening the web page using a browser to the user closing the web page, is counted. In the prior art, a timestamp is recorded when a page is opened, a timestamp is recorded when the page is closed, and the interval of the two timestamps is sent to a server, so that the page access duration is counted. However, when the page is closed, due to reasons such as network, the transmitted data has a certain loss rate; moreover, the request sent by the page is automatically cancelled after the page is closed, and even if the sent data is lost, the data cannot be sent again after the page is closed, so that the loss rate is higher, and the access duration of the user to the page cannot be counted.
Disclosure of Invention
In view of the above, the present invention has been made to provide a statistical method, apparatus, electronic device and computer-readable storage medium for page access duration that overcomes or at least partially solves the above problems.
According to one aspect of the invention, a statistical method for page access duration is provided, wherein the method comprises the following steps:
when the opening event of the page is monitored, judging whether page access duration data are stored in a local designated storage or not, and if so, sending the stored page access duration data to a server;
and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage.
Optionally, the obtaining the page access duration of the page according to the opening event and the closing event of the page includes:
when the opening event of the page is monitored, determining the opening time of the page, and storing the opening time into the specified storage;
when a closing event of the page is monitored, determining the closing time of the page, and storing the closing time into the specified storage;
and determining the page access duration of the page according to the opening time and the closing time of the page stored in the specified storage.
Alternatively,
the page opening event comprises a page loading completion event;
the closing event of the page comprises a before unload event of the page.
Optionally, after the determining the open time of the page and saving the open time to the designated storage, the method further includes:
acquiring system time every preset time, taking the system time as the related time of the page, and storing the system time to the specified storage;
the obtaining of the page access duration of the page according to the opening event and the closing event of the page includes:
and determining the page access duration of the page according to the opening time, the related time and the closing time of the page stored in the specified storage.
Optionally, after the sending the stored page access duration data to the server, the method further includes:
initializing the specified store.
Optionally, the method further comprises:
judging whether a notification of successful receiving returned by the server is received; if so, the step of initializing the specified storage is executed again.
Optionally, the specifying storage comprises:
localstorage, and/or userData.
According to another aspect of the present invention, there is provided a device for counting page access time, wherein the device comprises:
the sending unit is suitable for judging whether the page access duration data is stored in a local designated storage or not when the opening event of the page is monitored, and if so, sending the stored page access duration data to the server;
and the acquisition unit is suitable for acquiring the page access duration of the page according to the opening event and the closing event of the page and storing the acquired page access duration into the specified storage.
Alternatively,
the acquisition unit is suitable for determining the opening time of the page when the opening event of the page is monitored, and storing the opening time into the specified storage; when a closing event of the page is monitored, determining the closing time of the page, and storing the closing time into the specified storage; and determining the page access duration of the page according to the opening time and the closing time of the page stored in the specified storage.
Alternatively,
the page opening event comprises a page loading completion event;
the closing event of the page comprises a before unload event of the page.
Alternatively,
the acquiring unit is further adapted to acquire system time as the relevant time of the page and store the system time to the specified storage every preset time after determining the opening time of the page and storing the opening time of the page to the specified storage; and determining the page access duration of the page according to the opening time, the related time and the closing time of the page stored in the specified storage.
Optionally, the apparatus further comprises:
and the initialization unit is suitable for initializing the specified storage after the transmission unit transmits the saved page access duration data to the server.
Alternatively,
the initialization unit is suitable for judging whether a notification of successful receiving returned by the server is received; if so, the step of initializing the specified storage is executed again.
Optionally, the specifying storage comprises:
localstorage, and/or userData.
According to still another aspect of the present invention, there is provided an electronic apparatus, wherein the electronic apparatus includes:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method according to the foregoing.
According to yet another aspect of the present invention, there is provided a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the aforementioned method.
According to the technical scheme of the invention, when the opening event of the page is monitored, whether page access duration data is stored in a local designated storage or not is judged, and if yes, the stored page access duration data is sent to a server; and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage. According to the technical scheme, the page access duration of one page can be recorded in the designated storage, and when the next page is opened, the page access duration data of the previous page stored in the designated storage can be sent to the server, so that the loss of the sent data can be avoided when the page is closed, the statistics of the page access duration is realized, the accuracy of the page access duration is ensured, and the coverage rate of the page access duration is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a statistical method of page access duration according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an apparatus for counting page access durations according to an embodiment of the present invention;
FIG. 3 shows a schematic structural diagram of an electronic device according to one embodiment of the invention;
fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart illustrating a page access duration statistical method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S110, when the opening event of the page is monitored, whether page access duration data is stored in a local designated storage or not is judged, and if yes, the stored page access duration data is sent to a server.
Step S120, acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into a specified storage.
In the prior art, in order to solve the problem of lost page closing, one is to block a page closing event by using JavaScript for a period of time, for example, 200ms, so that a request sent in this time range is not cancelled, but the user experience is greatly affected, only a few applications (such as an IE browser) can close the page by using JavaScript, and other high-level browsers cannot block the page closing event by using JavaScript. Another is that data lost at shutdown is filled up using default or calculated values, but data accuracy suffers.
In this embodiment, the page access duration of one page is not sent to the server when the page is closed, but is first recorded in the designated storage, and when the next page is opened, the page access duration data of the previous page stored in the designated storage is sent to the server, so that the loss of the sent data when the page is closed can be avoided; when the statistics of the page access time length is realized, the page closing event does not need to be blocked, the use experience of a user is not influenced, the accuracy of the page access time length can be ensured, and the coverage rate of the page access time length is improved.
For example, according to the opening event and the closing event of the page 1, the page access duration of the page 1 is acquired and stored in the specified storage. When the page 2 is opened, the page access duration data of the page 1 is judged to be stored in the appointed storage, and the page access duration data of the page 1 is sent to the server. And acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When the page 3 is opened, judging that the page access duration data of the page 2 is stored in the appointed storage, and sending the page access duration data of the page 2 to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, storing the page access duration in a specified storage, and so on.
Preferably, the storage format of the page access duration data of the page in the specified storage may be stored in the form of a key-value pair, for example, page 1-page access duration data.
Preferably, the present embodiment is suitable for application in each page.
In an embodiment of the present invention, the acquiring a page access duration of a page according to an open event and a close event of the page in step S120 of the method shown in fig. 1 includes: when the opening event of the page is monitored, determining the opening time of the page and storing the opening time into a specified storage; when a closing event of a page is monitored, determining the closing time of the page, and storing the closing time into a specified storage; and determining the page access time length of the page according to the opening time and the closing time of the page stored in the designated storage.
In the embodiment, when a page is opened, a timestamp T1 of the page opening is recorded, when the page is closed, a timestamp T2 of the page closing is recorded, and then a time difference T3 between T2 and T1 is calculated as a page access time length of the page.
Specifically, the page opening event includes a page loading completion event; the closing event of the page includes a beforeunload event of the page.
That is to say, when the page loading is completed, the page is determined to be opened, and the current time is recorded as the page opening time T1, and when a before unload event of the page is monitored, the page is determined to be closed, and the current time is recorded as the page closing time T2.
Preferably, after the determining the open time of the page and saving the open time to the designated storage, the method further includes: and acquiring the system time once every preset time, taking the system time as the related time of the page, and storing the system time to a specified storage.
Then, the obtaining the page access duration of the page according to the opening event and the closing event of the page in step S120 of the method shown in fig. 1 includes: and determining the page access time length of the page according to the opening time, the related time and the closing time of the page stored in the designated storage.
Considering that when a page is closed, a corresponding closing event may not be triggered, for example, a user directly closes an application or directly closes a terminal device, which may not accurately record the time of closing the page. Therefore, in this embodiment, after the page is opened, the time is recorded at regular intervals, and as long as the page is in an opened state, the time is recorded for multiple times, so that even if the page is abnormally closed, the page access duration of the page can be reasonably determined from the last recorded time, and the accuracy of the statistics of the page access duration of the page is further ensured.
For example, according to the open event of page 1, the open event of page 1 is recorded as T1, the time is recorded every 5 seconds(s), and after the recorded relevant time is T2(T1+5s), T3(T2+5s), T4(T3+5s), page 1 is already closed, which means that page 1 is closed after T4, which is that the page access duration of page 1 can be determined according to T4 and T1. Here, when the page access time length of the page 1 is determined, the shortest access time length of the page 1, that is, 15s (the page 1 is considered to be closed in the case of the recorded page at T4) may be determined; alternatively, the longest access duration of page 1, i.e. 20s, is determined (page 1 is closed at the time when T5 time is to be recorded).
In an embodiment of the present invention, after the sending the saved page access duration data to the server in step S110 of the method shown in fig. 1, the method shown in fig. 1 further includes: the specified storage is initialized.
After the saved page access duration data is sent to the server, in order to ensure the storage space of the designated storage, the designated storage needs to be read for initialization processing, for example, to clearly designate the data saved in the storage.
Further, on the basis of the above embodiment, the method shown in fig. 1 further includes: judging whether a notification of successful receiving returned by the server is received; if yes, the step of initializing the designated storage is executed again.
Considering that there is a problem of data loss when the stored page access duration data is sent to the server, if the designated storage is initialized after the sending, the server still cannot count the page access duration of the page. Therefore, in this embodiment, when the server receives the page access duration data, a notification of successful reception is returned, and only when the notification returned by the server is received, the initialization processing is performed on the specified storage.
And if the notification of successful reception returned by the server is not received, continuing to store the corresponding page access duration data in the specified storage. For example, according to the opening event and the closing event of the page 1, the page access duration of the page 1 is acquired and stored in the specified storage. When the page 2 is opened, sending the page access duration data of the page 1 stored in the designated storage to the server, and if receiving a notification that the page access duration data of the page 1 returned by the server is successfully received within the designated time, clearing the page access duration data of the page 1 in the designated storage; and then, acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When page 3 is opened, page access duration data specifying page 2 in storage is sent to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, and storing the page access duration in a specified storage
If the notification that the reception of the page access duration data of the page 1 returned by the server is successful is not received within the specified time, the page access duration data of the page 1 in the specified storage is not cleared. And then, acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When page 3 is opened, page access duration data in which page 1 and page 2 are stored in the specified storage is transmitted to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, and storing the page access duration in a specified storage.
Preferably, if the current page is opened, the last page access duration data of the page is stored in the designated storage, and the page access duration data of the page stored in the designated storage is updated after the page access duration of the current page is determined according to the opening event and the closing event of the current page, so that only one page access duration of one page in the designated storage is ensured.
In one embodiment of the invention, the specifying storage in the method shown in FIG. 1 includes: localstorage, and/or userData.
In particular, the type of usage-specific storage may be determined according to the level of application. For example, if the application is a browser, then the localstorage storage is used for the high-level browser and the userData storage is used for the low-level browser (e.g., IE browser).
Fig. 2 is a flowchart illustrating a page access duration counting apparatus according to an embodiment of the present invention. As shown in fig. 2, the device 200 for counting page access time includes:
the sending unit 210 is adapted to, when an open event of a page is monitored, determine whether page access duration data is stored in a local designated storage, and if so, send the stored page access duration data to the server.
The obtaining unit 220 is adapted to obtain a page access duration of the page according to the opening event and the closing event of the page, and store the obtained page access duration in a specified storage.
In the prior art, in order to solve the problem of lost page closing, one is to block a page closing event by using JavaScript for a period of time, for example, 200ms, so that a request sent in this time range is not cancelled, but the user experience is greatly affected, only a few applications (such as an IE browser) can close the page by using JavaScript, and other high-level browsers cannot block the page closing event by using JavaScript. Another is that data lost at shutdown is filled up using default or calculated values, but data accuracy suffers.
In this embodiment, the page access duration of one page is not sent to the server when the page is closed, but is first recorded in the designated storage, and when the next page is opened, the page access duration data of the previous page stored in the designated storage is sent to the server, so that the loss of the sent data when the page is closed can be avoided; when the statistics of the page access duration is realized, the page closing event does not need to be blocked, the use experience of a user is not influenced, and the accuracy of the page access duration can be ensured.
For example, according to the opening event and the closing event of the page 1, the page access duration of the page 1 is acquired and stored in the specified storage. When the page 2 is opened, the page access duration data of the page 1 is judged to be stored in the appointed storage, and the page access duration data of the page 1 is sent to the server. And acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When the page 3 is opened, judging that the page access duration data of the page 2 is stored in the appointed storage, and sending the page access duration data of the page 2 to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, storing the page access duration in a specified storage, and so on.
Preferably, the storage format of the page access duration data of the page in the specified storage may be stored in the form of a key-value pair, for example, page 1-page access duration data.
Preferably, the device shown in fig. 2 is adapted for application in each page.
In an embodiment of the present invention, the obtaining unit 220 shown in fig. 2 is adapted to determine, when an open event of a page is monitored, an open time of the page, and store the open time in a designated storage; when a closing event of a page is monitored, determining the closing time of the page, and storing the closing time into a specified storage; and determining the page access time length of the page according to the opening time and the closing time of the page stored in the designated storage.
In the embodiment, when a page is opened, a timestamp T1 of the page opening is recorded, when the page is closed, a timestamp T2 of the page closing is recorded, and then a time difference T3 between T2 and T1 is calculated as a page access time length of the page.
Specifically, the page opening event includes a page loading completion event; the closing event of the page includes a beforeunload event of the page.
That is to say, when the page loading is completed, the page is determined to be opened, and the current time is recorded as the page opening time T1, and when a before unload event of the page is monitored, the page is determined to be closed, and the current time is recorded as the page closing time T2.
Preferably, on the basis of the foregoing embodiment, the obtaining unit 220 shown in fig. 2 is further adapted to obtain a system time as a related time of the page to be saved to the designated storage every preset time after determining the opening time of the page to be saved to the designated storage; and determining the page access time length of the page according to the opening time, the related time and the closing time of the page stored in the designated storage.
Then, the obtaining the page access duration of the page according to the opening event and the closing event of the page in step S120 of the method shown in fig. 1 includes: and determining the page access time length of the page according to the opening time, the related time and the closing time of the page stored in the designated storage.
Considering that when a page is closed, a corresponding closing event may not be triggered, for example, a user directly closes an application or directly closes a terminal device, which may not accurately record the time of closing the page. Therefore, in this embodiment, after the page is opened, the time is recorded at regular intervals, and as long as the page is in an opened state, the time is recorded for multiple times, so that even if the page is abnormally closed, the page access duration of the page can be reasonably determined from the last recorded time, and the accuracy of the statistics of the page access duration of the page is further ensured.
For example, according to the open event of page 1, the open event of page 1 is recorded as T1, the time is recorded every 5 seconds(s), and after the recorded relevant time is T2(T1+5s), T3(T2+5s), T4(T3+5s), page 1 is already closed, which means that page 1 is closed after T4, which is that the page access duration of page 1 can be determined according to T4 and T1. Here, when the page access time length of the page 1 is determined, the shortest access time length of the page 1, that is, 15s (the page 1 is considered to be closed in the case of the recorded page at T4) may be determined; alternatively, the longest access duration of page 1, i.e. 20s, is determined (page 1 is closed at the time when T5 time is to be recorded).
In one embodiment of the present invention, the apparatus shown in fig. 2 further comprises:
and the initialization unit is suitable for initializing the specified storage after the transmission unit transmits the saved page access duration data to the server.
After the saved page access duration data is sent to the server, in order to ensure the storage space of the designated storage, the designated storage needs to be read for initialization processing, for example, to clearly designate the data saved in the storage.
Further, on the basis of the above embodiment, the initialization unit is adapted to determine whether a notification of successful reception returned by the server is received; if yes, the step of initializing the designated storage is executed again.
Considering that there is a problem of data loss when the stored page access duration data is sent to the server, if the designated storage is initialized after the sending, the server still cannot count the page access duration of the page. Therefore, in this embodiment, when the server receives the page access duration data, a notification of successful reception is returned, and only when the notification returned by the server is received, the initialization processing is performed on the specified storage.
And if the notification of successful reception returned by the server is not received, continuing to store the corresponding page access duration data in the specified storage. For example, according to the opening event and the closing event of the page 1, the page access duration of the page 1 is acquired and stored in the specified storage. When the page 2 is opened, sending the page access duration data of the page 1 stored in the designated storage to the server, and if receiving a notification that the page access duration data of the page 1 returned by the server is successfully received within the designated time, clearing the page access duration data of the page 1 in the designated storage; and then, acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When page 3 is opened, page access duration data specifying page 2 in storage is sent to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, and storing the page access duration in a specified storage
If the notification that the reception of the page access duration data of the page 1 returned by the server is successful is not received within the specified time, the page access duration data of the page 1 in the specified storage is not cleared. And then, acquiring the page access duration of the page 2 according to the opening event and the closing event of the page 2, and storing the page access duration in a specified storage. When page 3 is opened, page access duration data in which page 1 and page 2 are stored in the specified storage is transmitted to the server. And acquiring the page access duration of the page 3 according to the opening event and the closing event of the page 3, and storing the page access duration in a specified storage.
Preferably, the initialization unit is adapted to, if the current page is open, determine that the last page access duration data of the page is already stored in the specified storage, and after determining the page access duration of the current page according to an open event and a close event of the current page, update the page access duration data of the page already stored in the specified storage, so as to ensure that only one page access duration exists in one page in the specified storage.
In an embodiment of the present invention, the above-mentioned specifying storage includes: localstorage, and/or userData.
In particular, the type of usage-specific storage may be determined according to the level of application. For example, if the application is a browser, then the localstorage storage is used for the high-level browser and the userData storage is used for the low-level browser (e.g., IE browser).
In summary, according to the technical scheme of the present invention, when an open event of a page is monitored, whether page access duration data is stored in a local designated storage is determined, and if so, the stored page access duration data is sent to a server; and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage. According to the technical scheme, the page access duration of one page can be recorded in the designated storage, and when the next page is opened, the page access duration data of the previous page stored in the designated storage can be sent to the server, so that the loss of the sent data can be avoided when the page is closed, the statistics of the page access duration is realized, the accuracy of the page access duration is ensured, and the coverage rate of the page access duration is improved.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the page access duration counting apparatus, the electronic device and the computer-readable storage medium according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the invention. The electronic device 300 conventionally comprises a processor 310 and a memory 320 arranged to store computer-executable instructions (program code). The memory 320 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Memory 320 has storage space 330 for storing program code 340 for performing the method steps shown in fig. 1 and in any of the embodiments. For example, the storage space 330 for the program code may comprise respective program codes 340 for implementing respective steps in the above method. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is generally a computer-readable storage medium 400 such as described in fig. 4. The computer-readable storage medium 400 may have memory segments, memory spaces, etc. arranged similarly to the memory 320 in the electronic device of fig. 3. The program code may be compressed, for example, in a suitable form. In general, the memory unit stores a program code 410 for performing the steps of the method according to the invention, i.e. a program code readable by a processor such as 310, which program code, when executed by an electronic device, causes the electronic device to perform the individual steps of the method described above.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses A1 and a statistical method for page access duration, wherein the method comprises the following steps:
when the opening event of the page is monitored, judging whether page access duration data are stored in a local designated storage or not, and if so, sending the stored page access duration data to a server;
and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage.
A2, the method as in a1, wherein the obtaining the page access duration of the page according to the open event and the close event of the page includes:
when the opening event of the page is monitored, determining the opening time of the page, and storing the opening time into the specified storage;
when a closing event of the page is monitored, determining the closing time of the page, and storing the closing time into the specified storage;
and determining the page access duration of the page according to the opening time and the closing time of the page stored in the specified storage.
A3 the method of A2, wherein,
the page opening event comprises a page loading completion event;
the closing event of the page comprises a before unload event of the page.
A4, the method as in a2, wherein after said determining the open time of the page, saving to said designated store, the method further comprises:
acquiring system time every preset time, taking the system time as the related time of the page, and storing the system time to the specified storage;
the obtaining of the page access duration of the page according to the opening event and the closing event of the page includes:
and determining the page access duration of the page according to the opening time, the related time and the closing time of the page stored in the specified storage.
A5, the method as in a1, wherein after the sending the saved page access duration data to the server, the method further comprises:
initializing the specified store.
A6, the method of a5, wherein the method further comprises:
judging whether a notification of successful receiving returned by the server is received; if so, the step of initializing the specified storage is executed again.
A7, the method of A1, wherein the specifying storage comprises:
localstorage, and/or userData.
The invention also discloses B8, a statistical device for the page access duration, wherein the device comprises:
the sending unit is suitable for judging whether the page access duration data is stored in a local designated storage or not when the opening event of the page is monitored, and if so, sending the stored page access duration data to the server;
and the acquisition unit is suitable for acquiring the page access duration of the page according to the opening event and the closing event of the page and storing the acquired page access duration into the specified storage.
B9, the device of B8, wherein,
the acquisition unit is suitable for determining the opening time of the page when the opening event of the page is monitored, and storing the opening time into the specified storage; when a closing event of the page is monitored, determining the closing time of the page, and storing the closing time into the specified storage; and determining the page access duration of the page according to the opening time and the closing time of the page stored in the specified storage.
B10, the device of B9, wherein,
the page opening event comprises a page loading completion event;
the closing event of the page comprises a before unload event of the page.
B11, the device of B9, wherein,
the acquiring unit is further adapted to acquire system time as the relevant time of the page and store the system time to the specified storage every preset time after determining the opening time of the page and storing the opening time of the page to the specified storage; and determining the page access duration of the page according to the opening time, the related time and the closing time of the page stored in the specified storage.
B12, the apparatus of B8, wherein the apparatus further comprises:
and the initialization unit is suitable for initializing the specified storage after the transmission unit transmits the saved page access duration data to the server.
B13, the device of B12, wherein,
the initialization unit is suitable for judging whether a notification of successful receiving returned by the server is received; if so, the step of initializing the specified storage is executed again.
B14, the apparatus as in B8, wherein the specified storing comprises:
localstorage, and/or userData.
The invention also discloses C15 and an electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method according to any one of a 1-a 7.
The invention also discloses D16, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs that when executed by a processor implement the method of any one of a 1-a 7.

Claims (10)

1. A statistical method for page access duration is provided, wherein the method comprises the following steps:
when the opening event of the page is monitored, judging whether page access duration data are stored in a local designated storage or not, and if so, sending the stored page access duration data to a server;
and acquiring the page access duration of the page according to the opening event and the closing event of the page, and storing the acquired page access duration into the specified storage.
2. The method of claim 1, wherein the obtaining the page access duration of the page according to the opening event and the closing event of the page comprises:
when the opening event of the page is monitored, determining the opening time of the page, and storing the opening time into the specified storage;
when a closing event of the page is monitored, determining the closing time of the page, and storing the closing time into the specified storage;
and determining the page access duration of the page according to the opening time and the closing time of the page stored in the specified storage.
3. The method of claim 2, wherein,
the page opening event comprises a page loading completion event;
the closing event of the page comprises a before unload event of the page.
4. The method of claim 2, wherein after said determining the open time of the page, saving to said specified storage, the method further comprises:
acquiring system time every preset time, taking the system time as the related time of the page, and storing the system time to the specified storage;
the obtaining of the page access duration of the page according to the opening event and the closing event of the page includes:
and determining the page access duration of the page according to the opening time, the related time and the closing time of the page stored in the specified storage.
5. The method of claim 1, wherein after sending the saved page access duration data to the server, the method further comprises:
initializing the specified store.
6. The method of claim 5, wherein the method further comprises:
judging whether a notification of successful receiving returned by the server is received; if so, the step of initializing the specified storage is executed again.
7. The method of claim 1, wherein the specifying storage comprises:
localstorage, and/or userData.
8. A device for counting page access duration, wherein the device comprises:
the sending unit is suitable for judging whether the page access duration data is stored in a local designated storage or not when the opening event of the page is monitored, and if so, sending the stored page access duration data to the server;
and the acquisition unit is suitable for acquiring the page access duration of the page according to the opening event and the closing event of the page and storing the acquired page access duration into the specified storage.
9. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any one of claims 1 to 7.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-7.
CN201811611495.6A 2018-12-27 2018-12-27 Statistical method and device for page access duration Pending CN111382380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811611495.6A CN111382380A (en) 2018-12-27 2018-12-27 Statistical method and device for page access duration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811611495.6A CN111382380A (en) 2018-12-27 2018-12-27 Statistical method and device for page access duration

Publications (1)

Publication Number Publication Date
CN111382380A true CN111382380A (en) 2020-07-07

Family

ID=71216385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811611495.6A Pending CN111382380A (en) 2018-12-27 2018-12-27 Statistical method and device for page access duration

Country Status (1)

Country Link
CN (1) CN111382380A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181797A (en) * 2020-10-28 2021-01-05 武汉悦学帮网络技术有限公司 Software platform operation time-consuming calculation method and device, storage medium and equipment
CN112463520A (en) * 2020-11-05 2021-03-09 广州博恒信息科技有限责任公司 Page full life cycle statistical method and equipment based on Flutter and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544288A (en) * 2013-10-28 2014-01-29 东莞宇龙通信科技有限公司 Browser webpage loading control method and device
CN103559203A (en) * 2013-10-08 2014-02-05 北京奇虎科技有限公司 Method, device and system for web page sorting
CN103825948A (en) * 2014-02-27 2014-05-28 优视科技有限公司 Method and system for optimizing webpage access based on webpage access requests
US20140379841A1 (en) * 2011-12-30 2014-12-25 Beijing Qihoo Technology Company Limited Web page content loading control method and device
CN105376311A (en) * 2015-11-11 2016-03-02 北京北信源软件股份有限公司 Method and device for determining page stay duration based on terminal access
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
CN106656577A (en) * 2016-11-24 2017-05-10 中国通信建设集团设计院有限公司 User behavior statistical method for APP and browser, and intelligent router
CN106874390A (en) * 2017-01-12 2017-06-20 北京奇虎科技有限公司 Browser history records inspection method and terminal
CN107870933A (en) * 2016-09-27 2018-04-03 北京京东尚科信息技术有限公司 Count the method, apparatus and system of Android five application page navigation patterns
WO2018121277A1 (en) * 2016-12-26 2018-07-05 广州市动景计算机科技有限公司 Page access method, device, computer apparatus, and computer storage medium
CN108337281A (en) * 2017-01-19 2018-07-27 北京京东尚科信息技术有限公司 Calculate the method and system of page browsing duration
CN108900563A (en) * 2018-03-30 2018-11-27 世纪龙信息网络有限责任公司 Sending method, device, computer equipment and the storage medium of data

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379841A1 (en) * 2011-12-30 2014-12-25 Beijing Qihoo Technology Company Limited Web page content loading control method and device
CN103559203A (en) * 2013-10-08 2014-02-05 北京奇虎科技有限公司 Method, device and system for web page sorting
CN103544288A (en) * 2013-10-28 2014-01-29 东莞宇龙通信科技有限公司 Browser webpage loading control method and device
CN103825948A (en) * 2014-02-27 2014-05-28 优视科技有限公司 Method and system for optimizing webpage access based on webpage access requests
CN105376311A (en) * 2015-11-11 2016-03-02 北京北信源软件股份有限公司 Method and device for determining page stay duration based on terminal access
CN106294648A (en) * 2016-08-03 2017-01-04 腾讯科技(深圳)有限公司 A kind of processing method and processing device for page access path
CN107870933A (en) * 2016-09-27 2018-04-03 北京京东尚科信息技术有限公司 Count the method, apparatus and system of Android five application page navigation patterns
CN106656577A (en) * 2016-11-24 2017-05-10 中国通信建设集团设计院有限公司 User behavior statistical method for APP and browser, and intelligent router
WO2018121277A1 (en) * 2016-12-26 2018-07-05 广州市动景计算机科技有限公司 Page access method, device, computer apparatus, and computer storage medium
CN106874390A (en) * 2017-01-12 2017-06-20 北京奇虎科技有限公司 Browser history records inspection method and terminal
CN108337281A (en) * 2017-01-19 2018-07-27 北京京东尚科信息技术有限公司 Calculate the method and system of page browsing duration
CN108900563A (en) * 2018-03-30 2018-11-27 世纪龙信息网络有限责任公司 Sending method, device, computer equipment and the storage medium of data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
汪一平: "基于Eucalyptus的Hadoop集群web日志分析***的设计与实现", 中国优秀硕士学位论文全文数据库信息科技辑, no. 04, pages 138 - 1953 *
霍晓钢;: "由Web日志确定页面访问时间的方法研究", 计算机工程与设计, no. 10, pages 264 - 267 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181797A (en) * 2020-10-28 2021-01-05 武汉悦学帮网络技术有限公司 Software platform operation time-consuming calculation method and device, storage medium and equipment
CN112463520A (en) * 2020-11-05 2021-03-09 广州博恒信息科技有限责任公司 Page full life cycle statistical method and equipment based on Flutter and storage medium

Similar Documents

Publication Publication Date Title
CN108055343B (en) Data synchronization method and device for computer room
WO2017113677A1 (en) User behavior data processing method and system
CN108076377B (en) Video storage and playing method and device, electronic equipment and storage medium
CN104820667A (en) Method, device and system for reporting webpage click rate
WO2014025966A2 (en) Immediately launching applications
CN104850556B (en) A kind of method and device of data processing
WO2019140739A1 (en) Method for determining return visits to client, and electronic apparatus and computer-readable storage medium
CN111382380A (en) Statistical method and device for page access duration
US10761935B2 (en) Accelerating system dump capturing
CN108366098B (en) Data interaction method and device for network nodes
CN111309485A (en) Service calling method and device, electronic equipment and computer readable storage medium
CN110944231B (en) Monitoring method and device of video player
CN109597566B (en) Data reading and storing method and device
CN110502486B (en) Log processing method and device, electronic equipment and computer readable storage medium
CN116541239A (en) Timing task monitoring method and device, electronic equipment and storage medium
CN107948234A (en) The processing method and processing device of data
CN108108126B (en) Data processing method, device and equipment
CN107665142B (en) Method, terminal and computer readable storage medium for detecting interruption of application program business process
CN105630991B (en) ID automatic generation method and device
CN110543486B (en) Data change method and device and server
CN112328288A (en) Method, system, equipment and storage medium for updating server component
CN108629610B (en) Method and device for determining popularization information exposure
CN111367868A (en) Method and device for processing file acquisition request
CN112423144B (en) Multimedia resource exception handling method, device, equipment and storage medium
CN116634587B (en) Method, device and storage medium for recovering data

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