CN114217923A - Page information processing method and device - Google Patents

Page information processing method and device Download PDF

Info

Publication number
CN114217923A
CN114217923A CN202111441426.7A CN202111441426A CN114217923A CN 114217923 A CN114217923 A CN 114217923A CN 202111441426 A CN202111441426 A CN 202111441426A CN 114217923 A CN114217923 A CN 114217923A
Authority
CN
China
Prior art keywords
page
time
event
link
updating
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
CN202111441426.7A
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.)
Wireless Life Hangzhou Information Technology Co ltd
Original Assignee
Wireless Life Hangzhou Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wireless Life Hangzhou Information Technology Co ltd filed Critical Wireless Life Hangzhou Information Technology Co ltd
Priority to CN202111441426.7A priority Critical patent/CN114217923A/en
Publication of CN114217923A publication Critical patent/CN114217923A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a page information processing method and device. The method comprises the following steps: initializing a page life cycle object when detecting that a page is opened; controlling to start event monitoring of a browser; after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object; and acquiring page use information according to the updated page life cycle object. The method and the device have the advantages that the page life cycle objects are updated through different browser events, so that the page life cycle objects are more comprehensive and accurate when the page use information is obtained, and the accuracy of obtaining the page use information is improved.

Description

Page information processing method and device
Technical Field
The present disclosure relates to the field of web page technologies, and in particular, to a method and an apparatus for processing page information.
Background
When a user opens an application, the retention time of the user on a page needs to be recorded, and the user experience is optimized by conveniently counting the page or the function of the user consuming time according to data.
The current common scheme is to obtain the dwell time of the page according to the opening and closing time of the page.
But the statistical duration in the above scheme is not accurate.
Disclosure of Invention
In order to overcome the problems in the related art, the embodiments of the present disclosure provide a page information processing method and apparatus. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a page information processing method, including:
initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object;
and acquiring page use information according to the updated page life cycle object.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the embodiment of the disclosure provides a page information processing method, which includes: initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse; controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event; after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object; and acquiring page use information according to the updated page life cycle object. The method and the device have the advantages that the page life cycle objects are updated through different browser events, so that the page life cycle objects are more comprehensive and accurate when the page use information is obtained, and the accuracy of obtaining the page use information is improved.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
setting the page state to inactive;
removing the mouse movement event monitoring when the mouse movement event monitoring is detected to be started;
updating the last moving time of the mouse as the current time;
and updating the page stay time according to the starting time calculated by the current time and the page stay time.
In one embodiment, the browser event is a page focus event, and updating a parameter corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored includes:
setting the page state to be active;
updating the last moving time of the mouse as the current time;
and updating the starting time calculated by the page stay time length to be the current time.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
judging whether a first time length between the current time and the last movement time of the mouse exceeds a preset time length or not;
if the first time length exceeds a preset time length, updating the page staying time length according to the first time length;
updating the last moving time of the mouse to be the current time;
if the first time length exceeds a preset time length, updating the page stay time length according to the first time length, wherein the updating comprises the following steps:
calculating a second time length between the current time and the starting time of the updated page stay time length calculation;
and updating the page stay time length according to the difference value between the second time length and the first time length.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page life cycle object after the monitoring of the browser event includes:
detecting a window state;
if the window is in a display state, updating the starting time calculated by the page staying time length to be the current time;
and if the window is in a hidden state, updating the page staying time to be the page staying time before the window is hidden.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
clearing the life cycle data of the page when judging whether the configured page is closed;
if yes, clearing the cache;
if not, detecting the page state;
and if the page state is an activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
In an embodiment, the page usage information is a page precise dwell time, and the acquiring the page usage information according to the updated surface life cycle object includes:
acquiring the starting time calculated by the updated page staying time;
acquiring the updated retention time of the page;
acquiring the updated final mouse moving time;
acquiring a third duration between the current time and the updated last mouse movement time;
if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration according to the duration between the current time and the starting time calculated by the updated page staying duration to obtain the accurate page staying duration;
if the third time length is less than the preset time length, subtracting the updated page stay time length according to the time length between the current time and the start time calculated by the updated page stay time length to obtain the accurate page stay time length.
In one embodiment, the method further comprises:
receiving an information configuration instruction, wherein the information configuration instruction comprises: configuration information of parameters in the page lifecycle object;
and configuring the corresponding parameters in the page life cycle object according to the configuration information of the parameters in the page life cycle object.
In one embodiment, the method further comprises:
acquiring a page link of the page;
detecting whether the page link identification is included in the page link;
if not, generating the page link identification according to a preset rule; the page link identification comprises: the time at which the link begins to operate.
In one embodiment, the method further comprises:
when a new page is detected to be jumped or opened, acquiring a page link identification of the current page;
and transmitting the page link identification of the current page into the page link corresponding to the new page.
In one embodiment, the method further comprises:
receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
acquiring the page link according to the link operation information acquisition instruction;
and acquiring the link skipping information and the link starting operation time according to the page link identifier in the page link.
In one embodiment, the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information comprises: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the method further comprises the following steps:
and when detecting that a sub-module stay time data acquisition instruction is received, acquiring the sub-module stay time data through the updated stay time of the sub-module.
According to a second aspect of the embodiments of the present disclosure, there is provided a page information processing apparatus including:
the detection module is used for initializing the page life cycle object when detecting that the page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
the control module is used for controlling the starting of browser event monitoring; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
the updating module is used for updating parameters corresponding to the monitored browser events in the page life cycle object after the browser events are monitored to obtain an updated page life cycle object;
and the acquisition module is used for acquiring the page use information according to the updated page life cycle object.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any one of the first aspects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a page information processing method according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a page information processing method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a page information processing method according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a page information processing method according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a page information processing method according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a page information processing apparatus according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating an apparatus 80 for page information processing according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a page information processing method according to an exemplary embodiment, which includes the following steps S101-S104, as shown in fig. 1:
in step S101, when it is detected that a page is opened, a page lifecycle object is initialized; the page lifecycle objects include: the method comprises the following steps of page link identification, starting time of page staying time calculation, page staying time, unique page identification, whether page life cycle data is cleared when a page is closed or not, page state and the last moving time of a mouse.
Specifically, when a user opens a page, the user initializes a page lifecycle object (English: PageLifecCycleInfo), which includes: page link identification (also called as page link id), start _ time (starting time of page staying time calculation), page staying time, page unique identification (English: page _ uuid), whether page lifecycle data is cleared when a page is closed (English: default represents that the next time is entered and the previous time is continued), and page state (English: status represents whether a page is activated or not).
In step S102, controlling to start event monitoring of a browser; the browser events include: page out-of-focus events, page in-focus times, mouse movement events, window visibility change events, and pre-page unload events.
During initialization, a page focus (focus) event, a page out-of-focus (blur) event, a mouse movement (mouse) event, a window visibility change (visibility) event, and a pre-page unload (before unload) event of the monitoring browser object (window) are controlled to be started.
In step S103, after the browser event is monitored, the parameters corresponding to the monitored browser event in the page life cycle object are updated, so as to obtain an updated page life cycle object.
In one embodiment, if the browser event is a page out-of-focus event, the step S103 includes the following sub-steps A1-A4:
a1, setting the page state as inactive;
a2, when detecting that the mouse movement event monitoring is started, removing the mouse movement event monitoring;
a3, updating the last mouse moving time as the current time;
and A4, updating the page stay time according to the starting time calculated by the current time and the page stay time.
Specifically, when blu (page out of focus), a) sets the page state attribute to off (inactive); b) removing mouse event monitoring to prevent the page from timing again; c) updating the last moving time of the mouse to be present; d) and updating the retention time of the page to prevent the page from losing the last statistical time when being closed.
And updating the page stay time length in the page life cycle object according to the time length.
The last movement time of the mouse is used for recording the latest movement time of the mouse, whether the current time and the last movement time of the mouse exceed the preset time needs to be judged when the remaining time of the page is counted subsequently, if the current time and the last movement time of the mouse exceed the preset time, the mouse does not move, and the time between the current time and the last movement time of the mouse needs to be subtracted, namely, the unmoving time of the mouse is subtracted.
In one embodiment, if the browser event is a page focus event, the above step S103 includes the following sub-steps B1-B3:
b1, setting the page state to be activated;
b2, updating the last mouse moving time as the current time;
and B3, the starting time of the updated page staying time length calculation is the current time.
At focus, a) set the page state attribute to on (active); b) updating the last moving time of the mouse as the current time; c) the start _ time (start time of page dwell time calculation) of the updated page life cycle object configuration is now.
In one embodiment, if the browser event is a mouse movement event, the step S103 includes the following sub-steps C1-C3:
c1, judging whether the first time length between the current time and the last moving time of the mouse exceeds a preset time length or not;
c2, if the first time length exceeds the preset time length, updating the page staying time length according to the first time length;
in one implementation, step C2 includes the following sub-steps C21-C22:
c21, calculating a second time length between the current time and the start time of the updated page stay time length calculation;
and C22, updating the page stay time length according to the difference value between the second time length and the first time length.
And C3, updating the last mouse moving time to be the current time.
For example: taking the preset time length of 2 minutes as an example, the current time is 9:30, the starting time of the page staying time length calculation is 9:00, and the final mouse moving time is 9: 20; the first time length between the current time and the last mouse moving time is 10 minutes and exceeds 2 minutes, at this time, the second time length between the current time and the starting time of the updated page staying time length calculation is 30 minutes, the time length of subtracting 10 minutes from 30 minutes is 20 minutes, and then, at this time, the updated page staying time length is 20 minutes.
For example: taking the preset time length of 2 minutes as an example, the current time is 9:30, the starting time of the page staying time length calculation is 9:00, and the final mouse moving time is 9: 29; the first time length between the current time and the last mouse moving time is 1 minute and does not exceed 2 minutes, and at the moment, the updated page staying time length is 30 minutes which is the second time length between the current time and the starting time calculated by the updated page staying time length.
In one embodiment, if the browser event is a window visibility change event, the above step S103 includes the following sub-steps D1-D3:
d1, detecting the window state;
d2, if the window is in a display state, updating the starting time of the calculation of the dwell time of the page to be the current time;
d3, if the window is in the hidden state, the updated page staying time is the page staying time before the window is hidden.
For example: 9:00 enters page A, 9:10 jumps from page A to page B, and 9:20 jumps from page B to page A, wherein the current time is 9: 30; then the window of the page A belongs to the display state at 9:00, the dwell time of the page A in the page life cycle object is 0 minute, and the start _ time of the page A is 9: 00; when the window of the page A belongs to a hidden state at 9:10, the dwell time of the page A in the page life cycle object is updated to 10 minutes (before the window of the 9:10 page A is hidden, the window of the page A from 9:00 to 9:10 is always in a display state, then the dwell time of the page of the window from 9:00 to 9:10 page A is 10 minutes), and the start _ time of the page A is updated to 9: 00; at 9:20, the window of the page A belongs to a display state, the dwell time of the page A in the page life cycle object is updated to 10 minutes (the dwell time is kept unchanged because the window of the page A is always in a hidden state from 9:10 to 9: 20), and the start _ time of the page A is updated to 9: 20; at 9:30, the A page dwell time in the page lifecycle object is updated to 20 minutes, and the start _ time of the A page is updated to 9: 30.
In one embodiment, if the browser event is a pre-page unload event, the step S103 includes the following sub-steps E1-E4:
e1, clearing the life cycle data of the page when judging whether the page is configured to be closed;
e2, if yes, clearing the cache;
e3, if not, detecting the page state;
e4, if the page state is the activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
Specifically, when before downloading, it is determined that the autostore is configured as true, the cache is emptied; otherwise, caching the current page data, and before caching, if the current page is in an active state (status ═ on'), updating the page staying time length firstly, wherein the updated page staying time length is the difference between the current time and the starting time of the calculation of the page staying time length and the page staying time length recorded before.
In step S104, page usage information is acquired according to the updated face lifecycle object.
The embodiment of the disclosure provides a page information processing method, which includes: initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse; controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event; after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object; and acquiring page use information according to the updated page life cycle object. The method and the device have the advantages that the page life cycle objects are updated through different browser events, so that the page life cycle objects are more comprehensive and accurate when the page use information is obtained, and the accuracy of obtaining the page use information is improved.
In an embodiment, as shown in fig. 2, the step of obtaining the page use information according to the updated surface life cycle object includes the following sub-steps 1041 and 1046, where the page use information is the page accurate dwell time:
in step 1041, acquiring the starting time of the updated page staying time calculation;
in step 1042, the updated page dwell time is obtained;
in step 1043, obtaining the updated final mouse movement time;
in step 1044, obtaining a third duration between the current time and the updated last mouse movement time;
in step 1045, if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration from a duration between the current time and the start time calculated from the updated page staying duration to obtain the accurate page staying duration;
in step 1046, if the third duration is less than the preset duration, the updated page staying duration is subtracted from the duration between the current time and the start time calculated from the updated page staying duration to obtain the accurate page staying duration.
Specifically, the user may obtain, by using the getStayDuration method, the accurate dwell time of the page between the time when the page is opened and the time when the method is called. In this method, the current time is subtracted by the start _ time (the starting time of the last page dwell time calculation of the page buffer), plus the previously updated page dwell time (the state _ duration), and then subtracted by the time the mouse has not moved.
The method and the device can record the user operation data very accurately, quickly and flexibly, and extremely improve the statistical accuracy of the retention time of the page, so that the method and the device are used for optimizing application and improving user experience.
In one embodiment, as shown in FIG. 3, the method further comprises the following sub-steps 105-106:
in step 105, an information configuration instruction is received, where the information configuration instruction includes: configuration information of parameters in the page lifecycle object;
in step 106, the corresponding parameters in the page life cycle object are configured according to the configuration information of the parameters in the page life cycle object.
The caller invokes the initialization method, which may be based on configuration information of parameters in the page lifecycle object, such as: the page _ uuid (page unique id) and related configuration (e.g., whether to keep track of current page lifecycle data when the page is closed, whether to use page link id in cache, etc.) are passed in, and attributes such as page _ uuid (page unique id) may be set in the initialization method.
The user can specify the parameters to be configured by himself, so that the user experience is improved.
In the related art, when a user opens an application, if statistics is needed for an operation link of the user in the process of opening the application and closing the application, a session _ id is needed to identify a window operation link, but the method cannot acquire a link starting source of a newly opened window, and the technical problem is solved by the following embodiments:
in one embodiment, as shown in fig. 4, the above method further comprises the sub-steps of:
in step 107, acquiring a page link of the page;
in step 108, detecting whether the page link includes a page link identifier;
in step 109, if not, generating a page link identifier according to a preset rule; the page link identification comprises: the time at which the link begins to operate.
Judging whether the page link contains a page link identifier or not according to the page link, if the page link contains the page link identifier, updating a current page link id source, and if the page link does not contain the page link identifier, generating the page link identifier similar to the form by using a hexadecimal time stamp; for example: 60c3de7e-8595-46ab-9866-841d2bdaab 93-1630412805121, in which the cipher text generated by hexadecimal numbers is preceded by an underline followed by a timestamp which can simply be located to the time the link started.
In one embodiment, on the basis of fig. 4, the method further comprises steps F1-F2:
f1, when detecting to jump or open a new page, acquiring a page link identification of the current page;
and F2, transferring the page link identification of the current page into the page link corresponding to the new page.
When a user jumps or opens a new page, the page link identifier of the current page can be obtained by the getPlcId method, the page link identifier of the current page is transmitted into the url to be jumped (for example, _ plcId ═ xxx), and then the _ plcId _ parameter on the page link is automatically obtained as the page link identifier of the page on the next page. By the method, the jump operation of the whole applied link can be flexibly recorded, and the starting time of the link operation can be acquired through the timestamp on the page link identifier.
In one embodiment, the method further comprises F3-F5:
f3, receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
f4, acquiring the page link according to the link operation information acquisition instruction;
and F5, acquiring link jump information and link starting operation time according to the page link identification in the page link.
When a user wants to check link jump information and link start operation time, only a getPlcId method (which is equivalent to the link operation information acquisition instruction) needs to be triggered, once the getPlcId method is triggered, the system acquires a page link identifier of a current page through the getPlcId method, and then the link jump information and the link start operation time can be acquired from the page link identifier of the current page.
Due to the existence of the page link identification, all operation links from the beginning to the end of the page are tracked flexibly and accurately.
In one embodiment, the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information (children) comprising: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the method further comprises the following steps:
and when detecting that a sub-module stay time data acquisition instruction is received, acquiring the sub-module stay time data through the updated stay time of the sub-module.
Specifically, a user can start the dwell time monitoring of a page sub-module and stop the monitoring of a module by a createchildlifecycler method, the two methods need to transmit a childId (unique sub-module identifier), and then a monitoring object with the unique sub-module identifier as the identifier is initialized inside the method and is placed into a children object of PageLifeCycleInfo (page life cycle object). The format is as follows: PageLifecCycleInfo { children: { childId _001: { startTime: date. now (), status _ duration: 0, status:1} } }.
The data information of the page sub-module at this time further includes: and startTime, namely the starting time of the submodule, the retention time of the follow-up calculation submodule is consistent with the retention time of the page, the starting time of the submodule is subtracted from the current time, the previous retention time of the submodule is added, and the time that the mouse of the submodule is not moved is subtracted. static _ duration: the dwell time of the submodule. status, whether the sub-module is in an activated state or not, and whether the sub-module is in the activated state or not needs to be judged when the sub-module is updated to stay for a long time.
In the stopchleid cycle method, the submodule data is cleared, and the submodule state is set to 0 (not activated).
For example, in an application scenario, the configuration duration of a user page bullet box (which may also be called as a sub-module) needs to be acquired, and a createcheldlifecycle method can be called to start recording the operation duration of the bullet box when a user clicks a button to open the bullet box; when the box closing button is clicked, the stopchlidlifecycle method is called to stop listening. And obtains sub-module dwell duration data by getStayDuration method and transmitting into childId.
The technical scheme of the present disclosure is described in detail by the flow chart shown in fig. 5:
when a user opens an application, the accurate dwell time of the user on a page, the operation time of a page module and a jump link need to be recorded, so that the page or the function of the time consumption of the user can be conveniently counted according to data, and the operation links of the user in the application opening and closing processes are optimized to optimize the user experience.
The current common scheme is to obtain the dwell time of the page according to the page opening and closing time, and identify the window operation link according to the session _ id.
However, the above-described prior art solutions have the following problems:
1. if the user is inactive on the page for a long time or has switched to another application, the application is run in the background, the duration is meaningless and filtering is required.
2. The time length of the user between certain operations cannot be counted.
3. The source of the link start for the newly opened window is not known.
In order to solve the above technical problem, the present disclosure provides a technical solution as shown in fig. 5, including the following processes:
1. when a user opens a page, a page lifecycleinfo (page life cycle object) is initialized, and the page life cycle object comprises a page link id (page link identifier), a start _ time (starting time for calculating the page stay time), a page stay time, a page _ uuid (unique identifier of a page), an autostore (whether page life cycle data is cleared when the page is closed or not, a default false represents that the next time the previous time is started), a child (page sub-module operation information), and a status (page state: in activation or not).
2. And judging whether the page link contains a page link id parameter according to the page link, if so, updating the page link id source of the current page, and if not, generating the page link id similar to the form by using hexadecimal time stamping, namely 60c3de7e-8595-46ab-9866-841d2bdaab 93-1630412805121, wherein the front part of an underline is a ciphertext generated by 16-system numbers, and the rear part of the underline is a time stamp which can be simply positioned to the time when the link starts to operate.
3. Opening focus (page focus), blu (page out of focus), mouseview (mouse movement), visibiliychange (window visibility change), beforeuunload (before page unload) events of the monitoring window (browser object).
4. When a focus (page focus) event is listened to, a) setting the page state to on (active); b) updating the last moving time of the mouse to be the current time, recording the latest moving time of the mouse, and subsequently counting the stay time of the page, wherein whether the distance between the current time and the last moving time of the mouse exceeds a preset time is required to be judged; c) the start _ time of the update page life cycle configuration is now.
Taking the preset time period as 2 minutes as an example: in b), subsequently counting the residence time of the page, it is necessary to determine whether the current time is more than 2 minutes from the last movement time of the mouse, and if the current time is more than 2 minutes, the residence time of the page is updated by subtracting the time between the current time and the last movement time of the mouse.
5. Upon listening to a blu (page out of focus) event, a) set the page state to off (inactive); b) removing mouse event monitoring to prevent the page from timing again; c) updating the last moving time of the mouse to be present; d) and updating the retention time of the page to prevent the page from losing the last statistical time when being closed.
6. When a mouse movement event is monitored, whether the current time and the last mouse movement time exceed a preset time length or not is judged, and if yes, the time length between the current time and the last mouse movement time needs to be subtracted when the updated page stays for a long time. And updates the last mouse movement time to be present.
7. When a visibilisation event is monitored, if the window is displayed, updating the start _ time to be present; and if the window is hidden, updating the page staying time.
8. When a before-page-unloading event is monitored, judging whether autostore is configured or not, and if true, emptying the cache; otherwise, the data of the current page is cached, and before caching, if the current page is in an active state (status ═ on'), the retention time of the page is updated first.
9. The caller calls an initialization method, and introduces page _ uuid (page unique identifier) and related configuration (for example, whether page closing clears page lifecycle data, whether page link identifier in cache is used, etc.), and in the initialization method, sets attributes of page _ uuid (page unique id), id (page link id), etc.
10. Before a user jumps or opens a new page, the user may obtain the link id of the page currently through the getPlcId method, and then automatically obtain the _ plcId _ parameter on the link as the link id of the page by passing the id into the url to jump (e.g., _ plcId:. xxx). By the method, the whole link operation of the application can be flexibly recorded. The operation start time may also be obtained by a timestamp on the link id.
11. The user can obtain the accurate stay time between the time when the page is opened and the time when the method is called through the getStayDuration method. In the method, the current time is subtracted by the start _ time (last time of the page buffer) plus the previously updated page staying time (state _ duration), and then the time when the mouse has not moved (if the time difference between the current time and the last mouse moving time is greater than the preset time, the time difference is called the time when the mouse has not moved), which is obtained according to the difference between the current time and the last recorded mouse moving time.
12. A user can start the stay time monitoring of a page sub-module and stop the monitoring of a module by a createChildLifecCycle method, the two methods need to transmit a child Id (unique sub-module id), then a monitoring object with the id as the identifier is initialized inside the method, and the monitoring object is placed into a child object of a PageLifecCycleInfo (page life cycle object). The format is as follows: PageLifecCycleInfo { children: { childId _001: { startTime: date. now (), status _ duration: 0, status:1} } }. And startTime, namely the starting time of the submodule, the retention time of the follow-up calculation submodule is consistent with the retention time of the page, the starting time of the submodule is subtracted from the current time, the previous retention time of the submodule is added, and the time that the mouse of the submodule is not moved is subtracted. static _ duration: the dwell time of the submodule. status is whether the sub-module is in an activated state, and whether the sub-module is in the activated state needs to be judged when the retention time of the sub-module is updated. The stopchlidlifecycle method clears the submodule data and the submodule state is set to 0 (inactive). For example, in an application scenario, the configuration duration of a user page popup frame needs to be acquired, and a createcheldlifecycle method can be called to start recording the operation duration of the popup frame when the user clicks a button to open the popup frame; when the box closing button is clicked, the stopchlidlifecycle method is called to stop listening. And obtains sub-module dwell duration data by getStayDuration method and transmitting into childId.
By the scheme, the user stay data and the user operation link data of the page or the specific functional module can be flexibly acquired by calling different api (methods), so that the user operation data can be accurately, quickly and flexibly acquired and recorded for optimizing application and improving user experience.
Further, the method of the present disclosure includes the following advantageous effects:
1. the statistical accuracy of the residence time of the page is improved extremely;
2. by a simple method, accurate data of the page operation duration are flexibly obtained;
3. flexibly and accurately tracking all operation links from the beginning to the end of a page;
4. the access is simple, and the dwell time of the page and the operation link data can be easily obtained only by introducing a js file of 3kb into the page;
5. the operation dwell time is very simple and flexible, for example, when a user clicks a button to obtain an operation time reported from a page opened to the time when the user clicks the button, the method for obtaining the operation dwell time is only called when the button is clicked.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 6 is a block diagram illustrating a page information processing apparatus, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both, according to an exemplary embodiment.
As shown in fig. 6, the page information processing apparatus includes:
the detection module 11 is configured to initialize a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
the control module 12 is used for controlling the starting of event monitoring of the browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
the updating module 13 is configured to update a parameter, corresponding to the monitored browser event, in the page life cycle object after the browser event is monitored, so as to obtain an updated page life cycle object;
and the obtaining module 14 is configured to obtain the page usage information according to the updated page lifecycle object.
In an embodiment, the browser event is a page out-of-focus event, and the updating module 13 is configured to:
setting the page state to inactive;
removing the mouse movement event monitoring when the mouse movement event monitoring is detected to be started;
updating the last moving time of the mouse as the current time;
and updating the page stay time according to the starting time calculated by the current time and the page stay time.
In an embodiment, the browser event is a page focus event, and the updating module 13 is configured to:
setting the page state to be active;
updating the last moving time of the mouse as the current time;
and updating the starting time calculated by the page stay time length to be the current time.
In an embodiment, the browser event is a mouse movement event, and the update module 13 is configured to:
judging whether a first time length between the current time and the last movement time of the mouse exceeds a preset time length or not;
if the first time length exceeds a preset time length, updating the page staying time length according to the first time length;
updating the last moving time of the mouse to be the current time;
if the first time length exceeds a preset time length, updating the page stay time length according to the first time length, wherein the updating comprises the following steps:
calculating a second time length between the current time and the starting time of the updated page stay time length calculation;
and updating the page stay time length according to the difference value between the second time length and the first time length.
In an embodiment, the browser event is a window visibility change event, and the updating module 13 is configured to:
detecting a window state;
if the window is in a display state, updating the starting time calculated by the page staying time length to be the current time;
and if the window is in a hidden state, updating the page staying time to be the page staying time before the window is hidden.
In an embodiment, the browser event is a pre-page-unload event, and the updating module 13 is configured to:
clearing the life cycle data of the page when judging whether the configured page is closed;
if yes, clearing the cache;
if not, detecting the page state;
and if the page state is an activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
In an embodiment, the page usage information is a precise dwell time of a page, and the obtaining module 14 includes:
acquiring the starting time calculated by the updated page staying time;
acquiring the updated retention time of the page;
acquiring the updated final mouse moving time;
acquiring a third duration between the current time and the updated last mouse movement time;
if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration according to the duration between the current time and the starting time calculated by the updated page staying duration to obtain the accurate page staying duration;
if the third time length is less than the preset time length, subtracting the updated page stay time length according to the time length between the current time and the start time calculated by the updated page stay time length to obtain the accurate page stay time length.
In one embodiment, the apparatus further comprises:
an information configuration instruction receiving module, configured to receive an information configuration instruction, where the information configuration instruction includes: configuration information of parameters in the page lifecycle object;
and the configuration module is used for configuring the corresponding parameters in the page life cycle object according to the configuration information of the parameters in the page life cycle object.
In one embodiment, the apparatus further comprises:
the page link acquisition module is used for acquiring the page link of the page;
the processing module is used for detecting whether the page link identification is included in the page link;
the generating module is used for generating the page link identification according to a preset rule if the page link identification does not contain the page link identification; the page link identification comprises: the time at which the link begins to operate.
In one embodiment, the apparatus further comprises:
the page link identification acquisition module is used for acquiring the page link identification of the current page when the new page is detected to be jumped or opened;
and the transmitting module is used for transmitting the page link identification of the current page into the page link corresponding to the new page.
In one embodiment, the apparatus further comprises:
a link operation information acquisition instruction receiving module for receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
the page link obtaining module is used for obtaining the page link according to the link operation information obtaining instruction;
and the information acquisition module is used for acquiring the link skipping information and the link starting operation time according to the page link identification in the page link.
In one embodiment, the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information comprises: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the device further comprises:
a submodule information acquisition module for acquiring the retention time data of the submodule through the retention time of the updated submodule when detecting and receiving the retention time data acquisition instruction of the submodule
The embodiment of the present disclosure further provides a page information processing apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object;
and acquiring page use information according to the updated page life cycle object.
The processor may be further configured to:
in an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
setting the page state to inactive;
removing the mouse movement event monitoring when the mouse movement event monitoring is detected to be started;
updating the last moving time of the mouse as the current time;
and updating the page stay time according to the starting time calculated by the current time and the page stay time.
In one embodiment, the browser event is a page focus event, and updating a parameter corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored includes:
setting the page state to be active;
updating the last moving time of the mouse as the current time;
and updating the starting time calculated by the page stay time length to be the current time.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
judging whether a first time length between the current time and the last movement time of the mouse exceeds a preset time length or not;
if the first time length exceeds a preset time length, updating the page staying time length according to the first time length;
updating the last moving time of the mouse to be the current time;
if the first time length exceeds a preset time length, updating the page stay time length according to the first time length, wherein the updating comprises the following steps:
calculating a second time length between the current time and the starting time of the updated page stay time length calculation;
and updating the page stay time length according to the difference value between the second time length and the first time length.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page life cycle object after the monitoring of the browser event includes:
detecting a window state;
if the window is in a display state, updating the starting time calculated by the page staying time length to be the current time;
and if the window is in a hidden state, updating the page staying time to be the page staying time before the window is hidden.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
clearing the life cycle data of the page when judging whether the configured page is closed;
if yes, clearing the cache;
if not, detecting the page state;
and if the page state is an activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
In an embodiment, the page usage information is a page precise dwell time, and the acquiring the page usage information according to the updated surface life cycle object includes:
acquiring the starting time calculated by the updated page staying time;
acquiring the updated retention time of the page;
acquiring the updated final mouse moving time;
acquiring a third duration between the current time and the updated last mouse movement time;
if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration according to the duration between the current time and the starting time calculated by the updated page staying duration to obtain the accurate page staying duration;
if the third time length is less than the preset time length, subtracting the updated page stay time length according to the time length between the current time and the start time calculated by the updated page stay time length to obtain the accurate page stay time length.
In one embodiment, the method further comprises:
receiving an information configuration instruction, wherein the information configuration instruction comprises: configuration information of parameters in the page lifecycle object;
and configuring the corresponding parameters in the page life cycle object according to the configuration information of the parameters in the page life cycle object.
In one embodiment, the method further comprises:
acquiring a page link of the page;
detecting whether the page link identification is included in the page link;
if not, generating the page link identification according to a preset rule; the page link identification comprises: the time at which the link begins to operate.
In one embodiment, the method further comprises:
when a new page is detected to be jumped or opened, acquiring a page link identification of the current page;
and transmitting the page link identification of the current page into the page link corresponding to the new page.
In one embodiment, the method further comprises:
receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
acquiring the page link according to the link operation information acquisition instruction;
and acquiring the link skipping information and the link starting operation time according to the page link identifier in the page link.
In one embodiment, the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information comprises: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the method further comprises the following steps:
and when detecting that a sub-module stay time data acquisition instruction is received, acquiring the sub-module stay time data through the updated stay time of the sub-module.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an apparatus 80 for page information processing, which is suitable for a terminal device, according to an exemplary embodiment. For example, the apparatus 80 may be a computer.
The apparatus 80 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 80, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 80. Examples of such data include instructions, messages, pictures, videos, etc. for any application or method operating on the device 80. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the device 80. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 80.
The multimedia component 808 includes a screen that provides an output interface between the device 80 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 80 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 80 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 80. For example, the sensor assembly 814 may detect the open/closed status of the device 80, the relative positioning of the components, such as a display and keypad of the device 80, the change in position of the device 80 or a component of the device 80, the presence or absence of user contact with the device 80, the orientation or acceleration/deceleration of the device 80, and the change in temperature of the device 80. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 80 and other devices. The device 80 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 80 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the apparatus 80 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium, in which instructions, when executed by a processor of an apparatus 80, enable the apparatus 80 to perform the above-mentioned page information processing method, the method comprising:
initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object;
and acquiring page use information according to the updated page life cycle object.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
setting the page state to inactive;
removing the mouse movement event monitoring when the mouse movement event monitoring is detected to be started;
updating the last moving time of the mouse as the current time;
and updating the page stay time according to the starting time calculated by the current time and the page stay time.
In one embodiment, the browser event is a page focus event, and updating a parameter corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored includes:
setting the page state to be active;
updating the last moving time of the mouse as the current time;
and updating the starting time calculated by the page stay time length to be the current time.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
judging whether a first time length between the current time and the last movement time of the mouse exceeds a preset time length or not;
if the first time length exceeds a preset time length, updating the page staying time length according to the first time length;
updating the last moving time of the mouse to be the current time;
if the first time length exceeds a preset time length, updating the page stay time length according to the first time length, wherein the updating comprises the following steps:
calculating a second time length between the current time and the starting time of the updated page stay time length calculation;
and updating the page stay time length according to the difference value between the second time length and the first time length.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page life cycle object after the monitoring of the browser event includes:
detecting a window state;
if the window is in a display state, updating the starting time calculated by the page staying time length to be the current time;
and if the window is in a hidden state, updating the page staying time to be the page staying time before the window is hidden.
In an embodiment, the updating the parameter corresponding to the monitored browser event in the page lifecycle object after the monitoring of the browser event includes:
clearing the life cycle data of the page when judging whether the configured page is closed;
if yes, clearing the cache;
if not, detecting the page state;
and if the page state is an activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
In an embodiment, the page usage information is a page precise dwell time, and the acquiring the page usage information according to the updated surface life cycle object includes:
acquiring the starting time calculated by the updated page staying time;
acquiring the updated retention time of the page;
acquiring the updated final mouse moving time;
acquiring a third duration between the current time and the updated last mouse movement time;
if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration according to the duration between the current time and the starting time calculated by the updated page staying duration to obtain the accurate page staying duration;
if the third time length is less than the preset time length, subtracting the updated page stay time length according to the time length between the current time and the start time calculated by the updated page stay time length to obtain the accurate page stay time length.
In one embodiment, the method further comprises:
receiving an information configuration instruction, wherein the information configuration instruction comprises: configuration information of parameters in the page lifecycle object;
and configuring the corresponding parameters in the page life cycle object according to the configuration information of the parameters in the page life cycle object.
In one embodiment, the method further comprises:
acquiring a page link of the page;
detecting whether the page link identification is included in the page link;
if not, generating the page link identification according to a preset rule; the page link identification comprises: the time at which the link begins to operate.
In one embodiment, the method further comprises:
when a new page is detected to be jumped or opened, acquiring a page link identification of the current page;
and transmitting the page link identification of the current page into the page link corresponding to the new page.
In one embodiment, the method further comprises:
receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
acquiring the page link according to the link operation information acquisition instruction;
and acquiring the link skipping information and the link starting operation time according to the page link identifier in the page link.
In one embodiment, the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information comprises: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the method further comprises the following steps:
and when detecting that a sub-module stay time data acquisition instruction is received, acquiring the sub-module stay time data through the updated stay time of the sub-module.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A page information processing method is characterized by comprising the following steps:
initializing a page life cycle object when detecting that a page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
controlling to start event monitoring of a browser; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
after a browser event is monitored, updating parameters corresponding to the monitored browser event in the page life cycle object to obtain an updated page life cycle object;
and acquiring page use information according to the updated page life cycle object.
2. The method of claim 1, wherein the browser event is a page out-of-focus event, and the updating the parameters corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored comprises:
setting the page state to inactive;
removing the mouse movement event monitoring when the mouse movement event monitoring is detected to be started;
updating the last moving time of the mouse as the current time;
and updating the page stay time according to the starting time calculated by the current time and the page stay time.
3. The method of claim 1, wherein the browser event is a page focus event, and the updating the parameters corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored comprises:
setting the page state to be active;
updating the last moving time of the mouse as the current time;
and updating the starting time calculated by the page stay time length to be the current time.
4. The method of claim 1, wherein the browser event is a mouse movement event, and the updating the parameters corresponding to the monitored browser event in the page lifecycle object after the browser event is monitored comprises:
judging whether a first time length between the current time and the last movement time of the mouse exceeds a preset time length or not;
if the first time length exceeds a preset time length, updating the page staying time length according to the first time length;
updating the last moving time of the mouse to be the current time;
if the first time length exceeds a preset time length, updating the page stay time length according to the first time length, wherein the updating comprises the following steps:
calculating a second time length between the current time and the starting time of the updated page stay time length calculation;
and updating the page stay time length according to the difference value between the second time length and the first time length.
5. The method according to claim 1, wherein the browser event is a window visibility change event, and the updating the parameter corresponding to the monitored browser event in the page lifecycle object after monitoring the browser event comprises:
detecting a window state;
if the window is in a display state, updating the starting time calculated by the page staying time length to be the current time;
and if the window is in a hidden state, updating the page staying time to be the page staying time before the window is hidden.
6. The method of claim 1, wherein the browser event is a pre-page-unload event, and the updating the parameters corresponding to the monitored browser event in the page lifecycle object after monitoring the browser event comprises:
clearing the life cycle data of the page when judging whether the configured page is closed;
if yes, clearing the cache;
if not, detecting the page state;
and if the page state is an activated state, updating the page stay time according to the starting time calculated by the current time and the page stay time, and caching the page data.
7. The method of claim 1, wherein the page usage information is a precise dwell duration of a page, and the obtaining page usage information according to the updated face lifecycle object comprises:
acquiring the starting time calculated by the updated page staying time;
acquiring the updated retention time of the page;
acquiring the updated final mouse moving time;
acquiring a third duration between the current time and the updated last mouse movement time;
if the third duration is greater than or equal to the preset duration, subtracting the updated page staying duration and the third duration according to the duration between the current time and the starting time calculated by the updated page staying duration to obtain the accurate page staying duration;
if the third time length is less than the preset time length, subtracting the updated page stay time length according to the time length between the current time and the start time calculated by the updated page stay time length to obtain the accurate page stay time length.
8. The method of claim 1, further comprising:
receiving an information configuration instruction, wherein the information configuration instruction comprises: configuration information of parameters in the page lifecycle object;
and configuring the corresponding parameters in the page life cycle object according to the configuration information of the parameters in the page life cycle object.
9. The method of claim 1, further comprising:
acquiring a page link of the page;
detecting whether the page link identification is included in the page link;
if not, generating the page link identification according to a preset rule; the page link identification comprises: the time at which the link begins to operate.
10. The method of claim 9, further comprising:
when a new page is detected to be jumped or opened, acquiring a page link identification of the current page;
and transmitting the page link identification of the current page into the page link corresponding to the new page.
11. The method of claim 9, further comprising:
receiving a link operation information acquisition instruction; the link operation information acquisition instruction indicates to acquire link jump information and link starting operation time;
acquiring the page link according to the link operation information acquisition instruction;
and acquiring the link skipping information and the link starting operation time according to the page link identifier in the page link.
12. The method of claim 1, wherein the page lifecycle object further comprises: page sub-module data information;
the page sub-module data information comprises: unique submodule identification, residence time of the submodule, starting time of the submodule and submodule state;
the method further comprises the following steps:
and when detecting that a sub-module stay time data acquisition instruction is received, acquiring the sub-module stay time data through the updated stay time of the sub-module.
13. A page information processing apparatus characterized by comprising:
the detection module is used for initializing the page life cycle object when detecting that the page is opened; the page lifecycle object includes: the method comprises the following steps of (1) identifying a page link, starting time for calculating page staying time, unique page identification, whether page life cycle data is cleared or not when a page is closed, a page state and the last moving time of a mouse;
the control module is used for controlling the starting of browser event monitoring; the browser event includes: a page out-of-focus event, a page in-focus time, a mouse movement event, a window visibility change event, and a page pre-unload event;
the updating module is used for updating parameters corresponding to the monitored browser events in the page life cycle object after the browser events are monitored to obtain an updated page life cycle object;
and the acquisition module is used for acquiring the page use information according to the updated page life cycle object.
14. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, carry out the steps of the method according to any one of claims 1 to 12.
CN202111441426.7A 2021-11-30 2021-11-30 Page information processing method and device Pending CN114217923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111441426.7A CN114217923A (en) 2021-11-30 2021-11-30 Page information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111441426.7A CN114217923A (en) 2021-11-30 2021-11-30 Page information processing method and device

Publications (1)

Publication Number Publication Date
CN114217923A true CN114217923A (en) 2022-03-22

Family

ID=80699010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111441426.7A Pending CN114217923A (en) 2021-11-30 2021-11-30 Page information processing method and device

Country Status (1)

Country Link
CN (1) CN114217923A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115586895A (en) * 2022-09-08 2023-01-10 浙江讯盟科技有限公司 Big data processing system and method for cooperative office

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115586895A (en) * 2022-09-08 2023-01-10 浙江讯盟科技有限公司 Big data processing system and method for cooperative office

Similar Documents

Publication Publication Date Title
CN106911961B (en) Multimedia data playing method and device
EP3188066A1 (en) A method and an apparatus for managing an application
CN107193678B (en) Method and device for determining cause of stuck and storage medium
CN110796988A (en) Backlight adjusting method and device
CN112114765A (en) Screen projection method and device and storage medium
CN108200279B (en) Backlight adjusting method, device and equipment
CN111031177A (en) Screen recording method, device and readable storage medium
CN111340808A (en) Screen display monitoring method and device, electronic equipment and storage medium
CN107316207B (en) Method and device for acquiring display effect information
CN114217923A (en) Page information processing method and device
CN111405319B (en) Bandwidth determination method and device, electronic equipment and storage medium
CN105786561B (en) Method and device for calling process
CN107948876B (en) Method, device and medium for controlling sound box equipment
CN108012258B (en) Data traffic management method and device for virtual SIM card, terminal and server
CN112866612B (en) Frame insertion method, device, terminal and computer readable storage medium
CN110858921A (en) Program video processing method and device
CN111049732B (en) Push message display method and device, electronic equipment and medium
CN109246322B (en) Information processing method and system
CN107360315B (en) Information display method and device
CN108769780B (en) Advertisement playing method and device
CN115134516A (en) Shooting method and device
CN112102009A (en) Advertisement display method, device, equipment and storage medium
CN112333233A (en) Event information reporting method and device, electronic equipment and storage medium
CN105892832B (en) Method and device for displaying display information
CN112565521B (en) Information processing method, device, terminal and storage medium

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