Page dwell time collection method and device, computer device, and storage medium

By collecting page interaction data and recording time slice information through a heartbeat cycle mechanism, the problem of large errors and poor real-time performance in the collection of page dwell time in existing technologies is solved, and more accurate and real-time page dwell time calculation and data analysis are achieved.

CN116226578BActive Publication Date: 2026-03-03BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing methods for collecting page dwell time suffer from large errors, low accuracy, and poor real-time performance. They cannot obtain dwell time in real time during a page session, and the dwell time cannot be determined when the start or end time of the page session is lost.

Method used

A heartbeat cycle mechanism is adopted to collect page interaction data and record time slice information within each heartbeat cycle, and report it to the server at the end of the heartbeat cycle, so as to achieve periodic and fragmented collection of page dwell time.

Benefits of technology

It improves the accuracy and reliability of page dwell time calculation, reduces errors, enables real-time data collection, ensures the complete upload of time slice information under abnormal conditions, and generates richer data analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226578B_ABST
    Figure CN116226578B_ABST
Patent Text Reader

Abstract

The present disclosure provides a page stay duration collection method and device, computer equipment and storage medium, wherein the method comprises: in response to the start of a page session of a target page, obtaining a heartbeat period; in each heartbeat period, collecting page interaction data of the target page, and recording time slice information in the heartbeat period at the end of the heartbeat period; the time slice information includes the duration of the page session in the current heartbeat period and the collected page interaction data; wherein the end of the heartbeat period includes reaching the end time node of the heartbeat period or the end of the page session of the target page; at the end of each heartbeat period, the time slice information recorded in the latest heartbeat period is reported to the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, computer device, and storage medium for collecting page dwell time. Background Technology

[0002] Page dwell time measures how long a user stays on a webpage. Generally, the longer the dwell time, the better the user experience is likely to be. Therefore, page dwell time can be an important metric when analyzing and improving webpages.

[0003] Conventional methods for collecting page dwell time usually determine it directly based on the start and end times of the page session. Therefore, the page dwell time can only be uploaded when the page session ends, resulting in problems such as large collection errors, low accuracy, and poor real-time performance. Summary of the Invention

[0004] This disclosure provides at least one method, apparatus, computer device, and storage medium for collecting page dwell time.

[0005] In a first aspect, embodiments of this disclosure provide a method for collecting page dwell time, including:

[0006] In response to the start of a page session on the target page, obtain the heartbeat cycle;

[0007] During each heartbeat cycle, page interaction data of the target page is collected, and at the end of the heartbeat cycle, time slice information of the heartbeat cycle is recorded; the time slice information includes the duration of the page session in the current heartbeat cycle and the collected page interaction data; wherein, the end of the heartbeat cycle includes reaching the end time node of the heartbeat cycle or the end of the page session of the target page.

[0008] At the end of each heartbeat cycle, the time slice information recorded in the most recent heartbeat cycle will be reported to the server.

[0009] In one possible implementation, the page session of the target page ends in the following situations: closing the target page, entering a new page, or mounting the target page in the system background.

[0010] In one possible implementation, recording the time slice information within the heartbeat cycle at the end of the heartbeat cycle includes:

[0011] Based on the various page interaction data collected during the heartbeat cycle and the pre-set interaction data representation rules, interaction data indication information is generated;

[0012] Based on the duration of the page session within the heartbeat cycle and the interaction data indication information, time slice information within the heartbeat cycle is generated.

[0013] In one possible implementation, generating interaction data indication information based on various page interaction data collected during the heartbeat cycle and pre-set interaction data representation rules includes:

[0014] Based on the page type of the target page, target interaction data to be uploaded is selected from various page interaction data collected during the heartbeat cycle;

[0015] According to the interactive data representation rules that match the page type, generate interactive data indication information that matches each of the target interactive data.

[0016] In one possible implementation, after reporting the time slice information recorded within the most recent heartbeat cycle to the server, the method further includes:

[0017] The server obtains the duration comparison information sent by the server. The duration comparison information is used to characterize the comparison of the total session duration of the target page under each preset comparison period when it is displayed on different clients. The duration comparison information is generated by the server based on the page session duration in the time slice information sent by different clients.

[0018] Display the duration comparison information.

[0019] In one possible implementation, the target page includes a course teaching page; the page interaction data includes authorized learning behavior data.

[0020] After reporting the time slice information recorded within the most recent heartbeat cycle to the server, the process further includes:

[0021] The learning report information sent by the server is obtained. The learning report information includes the total learning time that students who have logged into different clients have used the course teaching page at the current time, as well as the behavior report information of each student. The learning report information is generated by the server based on the time slice information sent by different clients.

[0022] Display the learning report information.

[0023] Secondly, embodiments of this disclosure also provide a page dwell time collection device, comprising:

[0024] The acquisition module is used to acquire the heartbeat cycle in response to the start of the page session of the target page;

[0025] The data acquisition module is used to acquire page interaction data of the target page in each heartbeat cycle, and record time slice information of the heartbeat cycle at the end of the heartbeat cycle; the time slice information includes the duration of the page session in the current heartbeat cycle and the acquired page interaction data; wherein, the end of the heartbeat cycle includes reaching the end time node of the heartbeat cycle or the end of the page session of the target page.

[0026] The reporting module is used to report the time slice information recorded in the most recent heartbeat cycle to the server at the end of each heartbeat cycle.

[0027] Thirdly, an optional implementation of this disclosure also provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.

[0028] Fourthly, an optional implementation of this disclosure also provides a computer-readable storage medium storing a computer program that, when run, performs the steps of the first aspect or any possible implementation of the first aspect.

[0029] For a description of the effects of the aforementioned page dwell time collection device, computer equipment, and computer-readable storage medium, please refer to the description of the page dwell time collection method above, which will not be repeated here.

[0030] The page dwell time collection method, apparatus, computer device, and storage medium provided in this disclosure, through a heartbeat cycle, can achieve periodic and fragmented collection of page dwell time. Compared with the prior art method of determining and uploading dwell time based on the start and end times of a page session, this disclosure utilizes a heartbeat cycle for collection and uploads time slice information according to the heartbeat cycle. This enables more real-time collection of dwell time, effectively solving the problem of waiting for the end of a page session before uploading the duration, and also effectively avoiding the problem of being unable to determine the page dwell time due to the loss of the start or end times of a page session. Furthermore, since corresponding time slice information can be obtained in each time cycle, the calculation of page dwell time using the time slice information corresponding to each time cycle is more reliable in terms of time slice information compared to the method of calculating using only the start and end times of a page session. Therefore, the error in the calculated page dwell time will be smaller, and the reliability and accuracy of the calculated page dwell time will be higher. Furthermore, by collecting page interaction data in real time, the granularity of information collection during page dwell time acquisition can be improved, allowing for the detection of richer page interaction behaviors and the generation of more comprehensive time-slice information. By reporting the time-slice information recorded in the most recent heartbeat cycle to the server at the end of each heartbeat cycle, more detailed and comprehensive data analysis results can be obtained by relying on the collected page interaction data when using time-slice information for data analysis.

[0031] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0033] Figure 1 A flowchart of a page dwell time collection method provided by an embodiment of this disclosure is shown;

[0034] Figure 2 This illustration shows a schematic diagram of a method for recording time slice information corresponding to a heartbeat cycle, provided by an embodiment of this disclosure.

[0035] Figure 3 This illustration shows a schematic diagram of a foreground / background session collection method provided in an embodiment of this disclosure.

[0036] Figure 4 This illustration shows a schematic diagram of the specific implementation process of a page dwell time collection method provided in an embodiment of this disclosure;

[0037] Figure 5 A schematic diagram illustrating a display of duration comparison information provided in an embodiment of this disclosure is shown;

[0038] Figure 6 This illustration shows a schematic diagram of a learning report information provided in an embodiment of the present disclosure;

[0039] Figure 7 A schematic diagram of a page dwell time collection device provided in an embodiment of this disclosure is shown;

[0040] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown herein can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0042] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.

[0043] In this article, "multiple or several" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0044] Research has revealed the following problems with calculating page dwell time using the start and end times of a page session: 1. Poor accuracy: The method relies heavily on the start and end times of the page session. If either time point is lost, the page dwell time cannot be determined, leading to significant errors. Furthermore, because it only depends on these times, it ignores interactive behaviors that affect page dwell time, such as background loading, often resulting in a calculated dwell time that is much higher than the actual dwell time. 2. Poor real-time performance: The page dwell time can only be uploaded when the page session ends. During the entire page session, the server cannot obtain any information about the dwell time, making it impossible to obtain the current page dwell time in real time. In conclusion, traditional page dwell time collection methods have significant drawbacks.

[0045] Based on the above research, this disclosure provides a method, apparatus, computer device, and storage medium for collecting page dwell time. By utilizing a heartbeat cycle, it enables periodic and fragmented collection of page dwell time. Compared to existing technologies that determine and upload dwell time based on the start and end times of a page session, this disclosure utilizes a heartbeat cycle for collection and uploads time-slice information according to the heartbeat cycle. This achieves more real-time dwell time collection, effectively solving the problem of waiting for the end of a page session before uploading the duration and avoiding the inability to determine the page dwell time due to lost start or end times. Furthermore, since corresponding time-slice information can be obtained in each time cycle, calculating page dwell time using the time-slice information corresponding to each time cycle provides richer time-slice information compared to calculating using only the start and end times of a page session. Therefore, the calculated page dwell time has smaller errors and higher reliability and accuracy. Furthermore, by collecting page interaction data in real time, the granularity of information collection during page dwell time acquisition can be improved, allowing for the detection of richer page interaction behaviors and the generation of more comprehensive time-slice information. By reporting the time-slice information recorded in the most recent heartbeat cycle to the server at the end of each heartbeat cycle, more detailed and comprehensive data analysis results can be obtained by relying on the collected page interaction data when using time-slice information for data analysis.

[0046] The shortcomings of the above solutions are the result of the inventor's practical experience and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.

[0047] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0048] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0049] To facilitate understanding of this embodiment, a detailed description of the page dwell time collection method disclosed in this disclosure embodiment will be provided first. The execution subject of the page dwell time collection method provided in this disclosure embodiment is generally a terminal device or other processing device with a certain computing power. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, personal digital assistant device (PDA), handheld device, computer device, etc. In some possible implementations, the page dwell time collection method can be implemented by the processor calling computer-readable instructions stored in the memory.

[0050] The following describes the page dwell time collection method provided in this embodiment, taking the client as the executing entity as an example.

[0051] like Figure 1 The flowchart shown is a method for collecting page dwell time according to an embodiment of this disclosure, which may include the following steps:

[0052] S101: In response to the start of a page session on the target page, obtain the heartbeat cycle.

[0053] Here, the target page can be any page whose dwell time needs to be collected. For example, the target page can be a page corresponding to any website, a page corresponding to any application, etc. The start of a page session can specifically mean the start of displaying the target page on the client. For instance, entering the target page can indicate the start of a page session; similarly, when the target page, which is mounted in the system backend, is re-displayed on the frontend page, it can also indicate the start of a page session.

[0054] The heartbeat cycle refers to the interval between each heartbeat in the heartbeat mechanism. The length of the heartbeat cycle can be set empirically, and this embodiment does not impose a specific limitation. For example, the heartbeat cycle can be 3 seconds (S), 5 seconds, 10 seconds, etc. By using the heartbeat cycle, time-slice information collected within the current time interval can be uploaded at fixed time intervals.

[0055] For example, in response to the start of a page session on the target page, a heartbeat mechanism can be initiated and a preset heartbeat cycle can be obtained from the server or the cloud.

[0056] S102: During each heartbeat cycle, collect page interaction data of the target page, and at the end of the heartbeat cycle, record the time slice information of the heartbeat cycle; the time slice information includes the duration of the page session in the current heartbeat cycle, as well as the collected page interaction data; wherein, the end of the heartbeat cycle includes reaching the end time node of the heartbeat cycle or the end of the page session of the target page.

[0057] Here, page interaction data can be data authorized by the user, specifically including user behavior data on the target page. This behavior data may include, for example, page component click behavior data, tab switching trigger behavior data, page content navigation behavior data, search behavior data, image / video viewing data, page status data, etc. This disclosure does not specifically limit the specific page interaction data; provided user authorization is obtained, all interaction data corresponding to interactive behaviors that can occur on the target page should fall within the protection scope of this disclosure.

[0058] For example, various page interaction data obtained through authorization can be collected by embedding tracking points.

[0059] A heartbeat cycle corresponds to a time slice, which includes various page interaction data collected within that heartbeat cycle, the duration of the page session within that heartbeat cycle, and the page identifier of the target page. The page session duration characterizes the length of time the target page is continuously displayed on the client within the heartbeat cycle. The page session duration within a heartbeat cycle is less than or equal to the duration of the corresponding heartbeat cycle.

[0060] At the start of each heartbeat cycle, page interaction data related to that heartbeat cycle can be collected. At the end of the heartbeat cycle, the duration of the page session within that heartbeat cycle can be determined. Then, based on the duration of the page session within that heartbeat cycle and the page interaction data collected within that heartbeat cycle, time slice information corresponding to that heartbeat cycle can be generated.

[0061] The end of a heartbeat cycle can occur in two ways: First, it may occur when the heartbeat cycle reaches its designated end time. For example, in a 10-second heartbeat cycle, the first heartbeat cycle ends at 10 seconds, the second at 20 seconds, the third at 30 seconds, and so on. Second, it may occur when the target page's session ends. Specifically, this means the page displayed on the client changes from the target page to another page; in other words, the target page is no longer displayed on the client.

[0062] In practice, the end of a page session can include the following three scenarios: 1. Closing the target page, i.e., exiting the target page; 2. Entering a new page, i.e., being redirected from the target page to a new page and having the new page displayed; 3. Mounting the target page in the system background. Here, the situation where the target page is displayed on the client side can be called the foreground display time of the target page. After mounting the target page in the system background, although the target page is not closed, the page displayed on the client side at this time is not the target page. Therefore, to ensure the accuracy of the statistical page dwell time, the situation where the target page is mounted in the system background should be considered the end of the page session.

[0063] Specifically, if the heartbeat cycle ends at its designated end time, the next heartbeat can begin simultaneously by recording the time slice information corresponding to the current heartbeat cycle and uploading it to the server. If the heartbeat cycle ends when the page session terminates, the heartbeat mechanism can be stopped, and the recorded time slice information corresponding to the current heartbeat cycle can be uploaded to the server.

[0064] In practice, a heartbeat mechanism can be activated after the page session begins, and page interaction data of the target page can be collected within each heartbeat cycle. Then, at the end of each heartbeat cycle, time slice information corresponding to that heartbeat cycle can be generated based on the collected page interaction data and the duration of the page session within the current heartbeat cycle.

[0065] In one embodiment, the step of "recording time slice information within the heartbeat cycle at the end of the heartbeat cycle" can be implemented according to the following steps:

[0066] Step 1: Generate interaction data indication information based on the various page interaction data collected during the heartbeat cycle and the pre-set interaction data representation rules.

[0067] Here, the interaction data representation rules are used to indicate how to represent various types of interaction data, and can be pre-agreed and set by the client and server. For example, the interaction data representation rules can be to use field 1 to represent type A page interaction data, field 2 to represent type B page interaction data, and field 3 to represent type C page interaction data, etc.

[0068] Interactive data indication information is used to indicate various page interactive data represented according to interactive data representation rules.

[0069] In practice, the client can obtain the pre-agreed interaction data representation rules with the server. For various page interaction data collected during the heartbeat cycle, target rules matching each type of page interaction data can be determined from the interaction data representation rules. Then, according to the target rules matching each type of page interaction data, the various page interaction data can be converted into interaction data indication information that conforms to the target rules.

[0070] Step 2: Generate time slice information within the heartbeat cycle based on the duration of the page session and the interaction data indication information within the heartbeat cycle.

[0071] For example, the duration of the page session within the heartbeat cycle and the generated interaction data indication information can be directly combined to obtain the time slice information within the heartbeat cycle.

[0072] In this way, by pre-setting interactive data representation rules and using these rules to represent page interactive data, we can not only improve the security of page interactive data included in time slice information and the security of information during transmission, but also ensure the uniformity of the format of page interactive data received by the server.

[0073] In one embodiment, step one above can also be implemented according to the following steps:

[0074] S1: Based on the page type of the target page, filter out the target interaction data to be uploaded from the various page interaction data collected during the heartbeat cycle.

[0075] Here, the target interaction data refers to the page interaction data that needs to be uploaded. Different page types require different types of page interaction data. For example, for image pages, image viewing data is of interest, while for functional pages, functional usage behavior (such as component click behavior data, component swipe behavior data, etc.) is of interest. Therefore, to reduce the file size of the reported time-slice information and minimize resource consumption during the information upload process, the various page interaction data collected within the heartbeat cycle can be filtered.

[0076] Specifically, you can first determine the page type of the target page, and then determine the target data types that need to be focused on for that page type. Afterwards, you can filter out various target interaction data that match the target data types from the various page interaction data collected during the heartbeat cycle, and then upload them.

[0077] S2: Generate interactive data indication information that matches the interactive data of each target according to the interactive data representation rules that match the page type.

[0078] Here, different page types yield different amounts of page interaction data, and the importance of this data also varies. Therefore, to further enhance the security of the generated interaction data indication information, different interaction data representation rules can be set for different page types, with varying levels of data encryption. For example, the more important the page interaction data, the more complex the corresponding interaction data representation rule and the higher the encryption level.

[0079] In practice, based on the page type of the target page, an interactive data representation rule matching the page type can be determined from a variety of preset interactive data representation rules. Then, according to this interactive data representation rule, the selected target interactive data can be transformed to obtain interactive data indication information matching each target interactive data.

[0080] In this way, using page type to generate interactive data indication information can both reduce the amount of data generated and improve the security of the generated interactive data indication information.

[0081] S103: At the end of each heartbeat cycle, the time slice information recorded in the most recent heartbeat cycle will be reported to the server.

[0082] Here, a heartbeat cycle ends, and the most recent heartbeat cycle corresponding to that heartbeat cycle is the heartbeat cycle itself.

[0083] For example, at the end of each heartbeat cycle, the time slice information recorded during that heartbeat cycle can be reported to the server.

[0084] By utilizing a heartbeat mechanism, the recorded time-slice information for the target page can be proactively reported to the server at fixed intervals, enabling the fragmented uploading of the overall page dwell time for the target page. Based on this, it ensures that even in abnormal situations, such as the loss of the page session termination node (e.g., sudden page process termination), the uploading of time-slice information for each previous heartbeat cycle can still be achieved. Furthermore, the server can determine the overall page dwell time for the target page by aggregating the reported time-slice information, minimizing the impact of abnormal situations on the statistical page dwell time.

[0085] like Figure 2 The diagram illustrates a method for recording time slice information corresponding to a heartbeat cycle according to an embodiment of this disclosure. The heartbeat cycle is 10 seconds. At the start of a page session, the heartbeat mechanism can be initiated, and page interaction data is collected within the heartbeat cycle. Upon reaching the end of the heartbeat cycle, the time slice information recorded in the most recent heartbeat cycle can be reported to the server, and the next heartbeat can begin. At the end of the page session, the heartbeat can be stopped immediately, and the duration of the last heartbeat is obtained by subtracting the start time of the last heartbeat from the current time. Based on this page session duration and the page interaction data collected within the last heartbeat cycle, time slice information corresponding to the last heartbeat cycle is generated and reported to the server. Figure 2 The diagram shows four heartbeats (heartbeat 1 to heartbeat 4). During the periods corresponding to heartbeats 1 to 3, no page session ends; therefore, the duration of each page session corresponding to heartbeats 1 to 3 is 10 seconds. In the 7th second of the heartbeat cycle corresponding to heartbeat 4, a page session ends. At this point, the heartbeat mechanism can be stopped, and the duration of the page session corresponding to the 4th heartbeat cycle is determined to be 7 seconds. Then, based on the page interaction data collected within the first 7 seconds of the heartbeat cycle corresponding to heartbeat 4 and the page session duration of 7 seconds, time slice information for the 4th heartbeat cycle can be generated and reported to the server.

[0086] To collect page interaction data within each heartbeat cycle, a parameter injection method can be used. Different parameters correspond to different types of page interaction data. In practice, different parameters can be set for different target pages, and then personalized data collection can be achieved by injecting different parameters into different target pages. Furthermore, after receiving the time slice information corresponding to each time cycle, the server can obtain real-time interaction data analysis results related to the target page based on the page interaction data in the time slice information.

[0087] In one embodiment, to facilitate the explanation of the target page's display on the front end and its mounting in the back end, reference can be made to, as follows: Figure 3 The diagram illustrates the front-end and back-end session data collection. Specifically, during a page session, if it is detected that the target page is mounted in the system background, the heartbeat mechanism can be stopped immediately. The duration of the page session corresponding to the last heartbeat cycle is determined by the start time of the last heartbeat and the current time. Based on this duration and the page interaction data collected during the last heartbeat cycle, time slice information for the last heartbeat cycle is generated and reported to the server. Furthermore, if it is detected that the user will re-display the target page mounted in the system background on the client's front-end page, the heartbeat mechanism can be retried, and the current heartbeat start time is reset. This ensures that the time slice information for the next heartbeat cycle records the actual session duration after the target page is re-displayed on the client's front-end page.

[0088] exist Figure 3 In the second heartbeat cycle, at the 3rd second, if the target page is detected to be mounted in the system background (i.e., entering the background), the heartbeat mechanism can be stopped. Then, based on the page interaction data collected in the first 3 seconds of the second heartbeat cycle and the page session duration of 3 seconds, the time slice information corresponding to the second heartbeat cycle is generated and reported to the server. After a certain period of time, if it is detected that the user will re-display the target page mounted in the system background on the client's front-end page (i.e., returning to the foreground), the heartbeat mechanism can be restarted, and the start time of the current heartbeat is set to the current time. Then, the time slice information is recorded and reported according to the heartbeat cycle. Figure 3 In the process, after the target page mounted in the system background is re-displayed on the client's front-end page, two more heartbeats are performed (i.e., heartbeat a and heartbeat b). The page session corresponding to heartbeat a lasts for 10 seconds, and the page session corresponding to heartbeat b lasts for 6 seconds. The page session ends in the 6th second of heartbeat b.

[0089] It should be noted that, regarding S103 above, for any heartbeat cycle, at the end of that heartbeat cycle and during the process of reporting the time slice information recorded in the most recent heartbeat cycle to the server, it is also possible to check whether the time slice information can be successfully reported to the server. If not, a retry mechanism can be used to re-report the time slice information until it is successfully reported to the server. In this way, by using the retry mechanism, it is possible to ensure that all time slice information is successfully reported to the server, effectively avoiding the problem of inaccurate page dwell time statistics caused by the loss of time slice information.

[0090] Furthermore, since the server can receive time-slice information from multiple clients simultaneously, and the time-slice information reported by different clients can correspond to different pages, after receiving the time-slice information reported by the clients, the server can determine the various acquired target time-slice information related to the target page based on the page identifier in the time-slice information, and calculate the current total session duration of the target page in real time based on the page session duration recorded in each acquired target time-slice information.

[0091] In this way, by using the heartbeat cycle, page dwell time can be collected periodically and in fragmented form. Compared with the existing technology that determines and uploads dwell time based on the start and end times of a page session, this embodiment of the disclosure uses the heartbeat cycle for collection and uploads time slice information according to the heartbeat cycle. This enables more real-time collection of dwell time, effectively solving the problem of waiting for the end of a page session before uploading the duration, and also effectively avoiding the problem of being unable to determine the page dwell time due to the loss of the start or end times of a page session. Furthermore, since corresponding time slice information can be obtained in each time cycle, the calculation of page dwell time using the time slice information corresponding to each time cycle is more reliable in terms of time slice information compared to the method of calculating using only the start and end times of a page session. Therefore, the error in the calculated page dwell time will be smaller, and the reliability and accuracy of the calculated page dwell time will be higher. In addition, by collecting page interaction data in real time, the information collection precision in the page dwell time collection process can be improved, detecting richer page interaction behaviors, thereby generating richer time slice information. By reporting the time slice information recorded in the most recent heartbeat cycle to the server at the end of each heartbeat cycle, more detailed and comprehensive data analysis results can be obtained by relying on the collected page interaction data when using the time slice information for data analysis.

[0092] like Figure 4 The diagram shown illustrates a specific implementation process of a page dwell time collection method provided in this embodiment of the present disclosure, which may include the following steps:

[0093] S401: Page session for the target page begins.

[0094] S402: Start heartbeat collection.

[0095] Here, the heartbeat cycle can be used to continuously collect time-slice information.

[0096] S403: Determine whether the page session of the target page has ended.

[0097] If yes, then execute S404; otherwise, execute S405 at the end of the heartbeat cycle.

[0098] S404: Stop heartbeat data collection.

[0099] S405: The time slice information recorded in the most recent heartbeat cycle will be reported to the server.

[0100] It should be noted that after the heartbeat mechanism is started, in addition to determining whether the page session of the target page has ended, S405 can also be executed directly if the end time of the current heartbeat cycle is determined.

[0101] If the page session of the target page has not ended after executing S405, it can return to execute S402, that is, use the heartbeat mechanism to continuously collect time slice information.

[0102] S406: Determine whether the time slice information has been successfully reported.

[0103] If yes, then it can be determined that the server has successfully obtained the time slice information under the heartbeat cycle; otherwise, execute S407 below.

[0104] S407: Resubmit using the retry mechanism.

[0105] Here, a retry mechanism can be used to re-report the time slice information to the server until the server successfully obtains the time slice information.

[0106] S408: If the target page is redisplayed on the client or if the client returns to the target page from a new page, S402 can be executed again.

[0107] Here, if the target page session ends when the target page is mounted in the system background, heartbeat collection can restart when the target page is displayed on the client again, i.e., the heartbeat mechanism can be used to collect time-slice information. If the target page session ends when entering a new page, heartbeat collection can also restart when returning to the target page from the new page.

[0108] In addition, if the page session on the target page ends when the target page is closed, you can exit the target page directly.

[0109] For the specific implementation process of S401 to S408 above, please refer to the above embodiments, which will not be repeated here.

[0110] In one embodiment, after reporting the time slice information recorded within the most recent heartbeat cycle to the server, the following steps may also be performed:

[0111] Obtain the duration comparison information sent by the server. The duration comparison information is used to characterize the comparison of the total session duration of the target page under each preset comparison period when it is displayed on different clients. The duration comparison information is generated by the server based on the page session duration in the time slice information sent by different clients.

[0112] Here, the preset comparison period can be set according to the actual comparison accuracy. For example, when it is necessary to obtain the comparison situation of each hour, the preset comparison period can be set to 1 hour; when it is necessary to obtain the comparison situation of each day, the preset comparison period can be set to 1 day; when it is necessary to obtain the comparison situation of each week, the preset comparison period can be set to 1 week.

[0113] For example, if the clients include clients 1, 2 and 3, and the preset comparison period is one day, the duration comparison information can characterize the comparison of the total session duration of the target page displayed on the three clients each day when the target page is displayed on clients 1, 2 and 3 respectively.

[0114] In practice, the target page can be displayed on different clients. Simultaneously, each client can report time-slice information related to the target page to the server. The server can determine the total session duration of the target page displayed on each client within each preset comparison period based on the page session duration reported by each client for each time-slice related to the target page displayed on that client. Subsequently, the server can generate duration comparison information based on the total session duration of the target page displayed on each client within each preset comparison period and feed this duration comparison information back to the client.

[0115] Furthermore, after receiving the duration comparison information sent by the server, the client can also display the duration comparison information. For example, after receiving the duration comparison information, the client can display the duration comparison information in the form of a bar chart. Figure 5 The diagram shown illustrates a display of session duration comparison information provided in an embodiment of this disclosure. This information compares the total daily session duration of client 1 and client 2 when displaying the target page. The dashed boxes represent the total daily session duration for client 1, and the solid boxes represent the total daily session duration for client 2. Figure 5 Dates 1, 2, and 3 in the table each correspond to a day, that is, in Figure 5 The image shows a comparison of the total session duration over three days for client 1 and client 2 when displaying the target page.

[0116] In another embodiment, the page dwell time collection method provided in this disclosure can be applied to teaching scenarios. Specifically, the target page may include a course teaching page; the page interaction data may include authorized learning behavior data. For example, learning behavior data may include answer data, video viewing data, page switching behavior data, etc. The user viewing the target page on the client can be a student logged into the client.

[0117] After reporting the time slice information recorded in the most recent heartbeat cycle to the server, the following steps can be performed:

[0118] Retrieve learning report information sent by the server. The learning report information includes the total learning time that students logged into different clients have used the course teaching page at the current moment, as well as the behavior report information of each student. The learning report information is generated by the server based on the time slice information sent by different clients.

[0119] Here, since the server can obtain time-slice information from the client in each heartbeat cycle, it can determine the total learning time that the logged-in student has used the course teaching page at the current moment based on the page session duration in each obtained time-slice information. Simultaneously, it can also determine the student's behavior report information based on the learning behavior data in each obtained time-slice information.

[0120] The behavior report information is generated based on learning behavior data from the time-slice information. Specifically, it can include normal learning behavior information, learning progress information, and abnormal learning behavior information (such as the duration of time spent away from the learning page). The specific behavior report information generated can be determined based on the actual learning behavior data being monitored; different behaviors will result in different generated behavior report information. For example, abnormal learning behavior information in the behavior report can be used to correct learning behaviors in a timely manner, thereby improving students' learning efficiency and ensuring their learning outcomes.

[0121] In practice, for students logged into different clients, each client can report its time slice information for each heartbeat cycle to the server in real time. After receiving the time slice information from each client, the server can generate a learning report for each student based on the time slice information obtained from that client. Then, the server can combine the generated learning reports from all clients and send them back to the client as a unified learning report. Here, the client sending the feedback can be the one logged into the teacher system.

[0122] Furthermore, the client can display learning report information. For example, the client can display learning report information on the student's learning progress page. Figure 6 The diagram shown is a schematic representation of a learning report information provided in an embodiment of this disclosure. Wherein, Figure 6 The system displays learning reports for two students, each including their name, current learning content, number of questions answered, accuracy rate, learning progress, total learning time, and behavioral report information. A "view" button is available under the behavioral report information to access a detailed report. Alternatively, the detailed behavioral report information can be displayed directly on the student's learning progress page.

[0123] Thus, since the page dwell time collection method provided in this embodiment has a good real-time effect, the learning report information can be generated by uploading time slice information from the client, which can realize the analysis of students' real-time learning situation, and thus facilitate teachers to grasp the real-time learning situation of each student in a timely manner.

[0124] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0125] Based on the same inventive concept, this disclosure also provides a page dwell time collection device corresponding to the page dwell time collection method. Since the principle of the device in this disclosure is similar to the page dwell time collection method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0126] like Figure 7 The diagram shown is a schematic of a page dwell time collection device provided in an embodiment of this disclosure, including:

[0127] The acquisition module 701 is used to acquire the heartbeat cycle in response to the start of the page session of the target page;

[0128] The acquisition module 702 is used to acquire page interaction data of the target page in each heartbeat cycle, and record time slice information of the heartbeat cycle at the end of the heartbeat cycle; the time slice information includes the duration of the page session in the current heartbeat cycle and the acquired page interaction data; wherein, the end of the heartbeat cycle includes reaching the end time node of the heartbeat cycle or the end of the page session of the target page.

[0129] The reporting module 703 is used to report the time slice information recorded in the most recent heartbeat cycle to the server at the end of each heartbeat cycle.

[0130] In one possible implementation, the page session of the target page ends in the following situations: closing the target page, entering a new page, or mounting the target page in the system background.

[0131] In one possible implementation, when the acquisition module 702 records the time slice information within the heartbeat cycle at the end of the heartbeat cycle, it is used to:

[0132] Based on the various page interaction data collected during the heartbeat cycle and the pre-set interaction data representation rules, interaction data indication information is generated;

[0133] Based on the duration of the page session within the heartbeat cycle and the interaction data indication information, time slice information within the heartbeat cycle is generated.

[0134] In one possible implementation, the acquisition module 702, when generating interaction data indication information based on various page interaction data acquired during the heartbeat cycle and pre-set interaction data representation rules, is used to:

[0135] Based on the page type of the target page, target interaction data to be uploaded is selected from various page interaction data collected during the heartbeat cycle;

[0136] According to the interactive data representation rules that match the page type, generate interactive data indication information that matches each of the target interactive data.

[0137] In one possible implementation, the device further includes:

[0138] The first display module 704, after reporting the time slice information recorded within the most recent heartbeat cycle to the server, is used for:

[0139] The server obtains the duration comparison information sent by the server. The duration comparison information is used to characterize the comparison of the total session duration of the target page under each preset comparison period when it is displayed on different clients. The duration comparison information is generated by the server based on the page session duration in the time slice information sent by different clients.

[0140] Display the duration comparison information.

[0141] In one possible implementation, the target page includes a course teaching page; the page interaction data includes authorized learning behavior data; the device further includes:

[0142] The second display module 705, after reporting the time slice information recorded within the most recent heartbeat cycle to the server, is used for:

[0143] The learning report information sent by the server is obtained. The learning report information includes the total learning time that students who have logged into different clients have used the course teaching page at the current time, as well as the behavior report information of each student. The learning report information is generated by the server based on the time slice information sent by different clients.

[0144] Display the learning report information.

[0145] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0146] Based on the same technical concept, embodiments of this application also provide a computer device. (Refer to...) Figure 8 The diagram shown is a structural schematic of a computer device provided in an embodiment of this application, comprising:

[0147] The system includes a processor 81, a memory 82, and a bus 83. The memory 82 stores machine-readable instructions executable by the processor 81. The processor 81 executes these machine-readable instructions, performing the following steps: S101: In response to the start of a page session on the target page, a heartbeat cycle is acquired; S102: Within each heartbeat cycle, page interaction data of the target page is collected, and at the end of the heartbeat cycle, time slice information is recorded; the time slice information includes the duration of the page session within the current heartbeat cycle and the collected page interaction data; the end of the heartbeat cycle includes reaching the end time node of the heartbeat cycle or the end of the page session on the target page; and S103: At the end of each heartbeat cycle, the time slice information recorded in the most recent heartbeat cycle is reported to the server.

[0148] The aforementioned memory 82 includes a main memory 821 and an external memory 822. The main memory 821, also known as internal memory, is used to temporarily store the computational data in the processor 81, as well as the data exchanged with external memory such as a hard disk. The processor 81 exchanges data with the external memory 822 through the main memory 821. When the computer device is running, the processor 81 and the memory 82 communicate through the bus 83, so that the processor 81 executes the execution instructions mentioned in the above method embodiments.

[0149] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the page dwell time collection method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0150] The computer program product of the page dwell time collection method provided in this disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the page dwell time collection method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0151] The computer program product can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0152] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0154] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0155] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0156] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the user through pop-up information or by asking the user to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

[0157] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A page dwell time collection method, characterized in that, The method comprises the steps of: in response to the start of a page session of a target page, obtaining a heartbeat period; in each heartbeat period, collecting page interaction data of the target page, and recording time slice information in the heartbeat period at the end of the heartbeat period; the time slice information comprises a page session duration in the current heartbeat period and the collected page interaction data; wherein the end of the heartbeat period comprises reaching an end time node of the heartbeat period or the end of the page session of the target page, and the end of the page session of the target page comprises closing the target page, entering a new page, or mounting the target page in the background of a system; at the end of each heartbeat period, reporting the time slice information recorded in the latest heartbeat period to a server.

2. The method of claim 1, wherein, The step of recording the time slice information in the heartbeat period at the end of the heartbeat period comprises the steps of: generating interaction data indication information according to various page interaction data collected in the heartbeat period and pre-set interaction data representation rules; generating time slice information in the heartbeat period according to the page session duration in the heartbeat period and the interaction data indication information.

3. The method of claim 2, wherein, The step of generating interaction data indication information according to various page interaction data collected in the heartbeat period and pre-set interaction data representation rules comprises the steps of: screening target interaction data to be uploaded from various page interaction data collected in the heartbeat period according to the page type of the target page; generating interaction data indication information matched with each target interaction data according to the interaction data representation rules matched with the page type.

4. The method of claim 1, wherein, After the step of reporting the time slice information recorded in the latest heartbeat period to the server, the method further comprises the steps of: obtaining time length comparison information sent by the server, wherein the time length comparison information is used to represent the comparison of total session time lengths of the target page in each preset comparison period corresponding to different clients respectively; the page session duration in the time slice information is generated by the server according to different clients respectively; displaying the time length comparison information.

5. The method of claim 1, wherein, The target page comprises a course teaching page; and the page interaction data comprises authorized learning behavior data. After the step of reporting the time slice information recorded in the latest heartbeat period to the server, the method further comprises the steps of: obtaining learning report information sent by the server, wherein the learning report information comprises total learning time length information of students logged in different clients who have learned by using the course teaching page at the current time, and behavior report information of each student; the learning report information is generated by the server according to the time slice information sent by different clients respectively; displaying the learning report information.

6. A page dwell time collection apparatus, characterized by comprising: The method comprises the steps of: obtaining a heartbeat period in response to the start of a page session of a target page. The collection module is configured to collect the page interaction data of the target page in each heartbeat period, and record time slice information in the heartbeat period at the end of the heartbeat period; the time slice information includes a page session duration in the current heartbeat period and the collected page interaction data; wherein the end of the heartbeat period includes reaching an end time node of the heartbeat period or the end of a page session of the target page, and the end of the page session of the target page includes closing the target page, entering a new page, or mounting the target page in the background of a system; The reporting module is configured to report the time slice information recorded in the latest heartbeat period to a server at the end of each heartbeat period.

7. The apparatus of claim 6, wherein, The device further comprises: The first display module is configured to: obtain time duration comparison information sent by the server, the time duration comparison information being used to represent a comparison of total session durations of the target page in each preset comparison period corresponding to different clients; the time duration comparison information is generated by the server based on the page session durations in the time slice information sent by the server for different clients; display the time duration comparison information.

8. A computer device, comprising: The device comprises: a processor and a memory, the memory storing machine readable instructions executable by the processor, the processor being configured to execute the machine readable instructions stored in the memory, and the machine readable instructions being configured to cause the processor to perform the steps of the page stay duration collection method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is configured to cause a computer device to perform the steps of the page stay duration collection method according to any one of claims 1 to 5 when the computer program is executed by the computer device.

Citation Information

Patent Citations

  • User stay duration determination method and device, equipment and storage medium

    CN110677447A

  • Webpage browsing duration calculation method based on activeness continuous time service

    CN115270036A