First screen time detection method, device, electronic device and storage medium
By monitoring the container startup and page rendering time, combined with data requests, the problem of high cost and low accuracy of first-screen time detection is solved, and unified and accurate first-screen time detection is achieved to adapt to multi-service and multi-mode scenarios .
Patent Information
- Application Number
- CN202111442296.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the prior art, the first screen time detection cost is high and not accurate enough, and the business party needs to manually bury the points, and the difference in rendering speeds of different models leads to statistical deviations.
By monitoring page loading requests, obtain the container startup time and the page root view creation completion time, and combine the data request situation within the preset period to determine the first screen time to achieve unified and precise detection.
It reduces the cost of detection on the first screen time, avoids the risks of false alarms and missed reports, improves detection accuracy, is compatible with the rendering time of different models, and is adapted to static and dynamic page scenes.
Smart Images

Figure CN114185778B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet application technology, and in particular to a first screen time detection method, device, electronic device and storage medium. Background Art
[0002] As an important indicator of user experience, the first screen time has attracted much attention in page testing. In order to calculate the first screen time, the relevant technology requires the business party to manually track the point and report, which leads to the risk of false positives or false negatives. In addition, this method of requiring the business party to track the point and report requires familiarity with the characteristics of different businesses, and each business needs to track points independently, resulting in a high cost for the detection of the first screen time. In addition, the statistics of the first screen time will face different models, and the rendering speeds of different models vary, resulting in a certain deviation in the statistics of the first screen time, which is not accurate enough. Summary of the invention
[0003] The present disclosure provides a first screen time detection method, device, electronic device and storage medium to at least solve the problem of how to unify first screen time detection and improve the accuracy of first screen time in related technologies. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a first screen time detection method is provided, including:
[0005] In response to a page load request, data requests are monitored;
[0006] Get the first time when the container is started and the second time when the root view of the page is created;
[0007] If there is no data request within the first preset time period, the first screen time is determined according to the second time and the first time, wherein the start time of the first preset time period is the first time.
[0008] In a possible implementation, the method further includes:
[0009] If there is a data request within the first preset time period, obtaining at least one data request within a second preset time period; wherein the start time of the second preset time period is the first time, and the duration of the second preset time period is greater than the duration of the first preset time period;
[0010] Determine at least one third time corresponding to the at least one data request, the at least one third time being a completion time of each of the at least one data request;
[0011] The first screen time is determined based on the at least one third time and the first time.
[0012] In a possible implementation manner, determining the first screen time based on the at least one third time and the first time includes:
[0013] In a case where the at least one request includes a primary interface identifier, determining a first target time corresponding to the primary interface identifier from the at least one third time;
[0014] The first screen time is determined based on the first target time and the first time.
[0015] In a possible implementation manner, determining the first screen time based on the at least one third time and the first time includes:
[0016] In the case where the at least one request does not include a primary interface identifier, determining a second target time from the at least one third time; the duration from the second target time to the current time is greater than the duration from the third target time to the current time, and the third target time is a third time in the at least one third time excluding the second target time;
[0017] The first screen time is determined based on the second target time and the first time.
[0018] In a possible implementation, the method further includes:
[0019] In response to the time period configuration request, the first preset time period and the second preset time period are updated.
[0020] In a possible implementation, the method further includes:
[0021] When the first screen time is greater than the time threshold, an alarm message is sent.
[0022] According to a second aspect of an embodiment of the present disclosure, a first screen time detection device is provided, including:
[0023] A monitoring module is configured to monitor the data request in response to the page loading request;
[0024] A first time acquisition module is configured to execute acquisition of the first time when the container is started;
[0025] A second time acquisition module is configured to execute acquisition of a second time when the creation of the page root view is completed;
[0026] The first first screen time determination module is configured to determine the first screen time according to the second time and the first time if there is no data request within a first preset time period, wherein the start time of the first preset time period is the first time.
[0027] In a possible implementation manner, the device further includes:
[0028] a data request acquisition module, configured to execute, if there is a data request within the first preset time period, acquiring at least one data request within a second preset time period; wherein the start time of the second preset time period is the first time, and the duration of the second preset time period is greater than the duration of the first preset time period;
[0029] A third time acquisition module is configured to determine at least one third time corresponding to the at least one data request, where the at least one third time is a completion time of each of the at least one data request;
[0030] The second first screen time determination module is configured to determine the first screen time based on the at least one third time and the first time.
[0031] In a possible implementation, the second first screen time determination module includes:
[0032] A first target time determining unit is configured to determine a first target time corresponding to the primary interface identifier from the at least one third time when the at least one request includes the primary interface identifier;
[0033] The first first screen time determining unit is configured to determine the first screen time based on the first target time and the first time.
[0034] In a possible implementation, the second first screen time determination module includes:
[0035] A second target time determination unit is configured to determine a second target time from the at least one third time when the at least one request does not include a primary interface identifier; the duration from the second target time to the current time is greater than the duration from the third target time to the current time, and the third target time is a third time in the at least one third time excluding the second target time;
[0036] The second first screen time determining unit is configured to determine the first screen time based on the second target time and the first time.
[0037] In a possible implementation manner, the device further includes:
[0038] The updating module is configured to execute, in response to a time period configuration request, updating the first preset time period and the second preset time period.
[0039] In a possible implementation, the method further includes:
[0040] The alarm module is configured to execute the sending process of the alarm information when the first screen time is greater than the time threshold.
[0041] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a method as described in any one of the above-mentioned first aspects.
[0042] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any method described in the first aspect of the embodiment of the present disclosure.
[0043] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by a processor, enable a computer to execute any one of the methods described in the first aspect of an embodiment of the present disclosure.
[0044] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0045] By obtaining the first time when the container is started and the second time when the root view of the page is created, the first screen rendering time node is refined. Through this fine-grained split, actual data basis can be provided for in-depth optimization of each subsequent link; and by judging whether there is a data request within the first preset time period, the page attribute is considered in the first screen rendering: static page or dynamic page, so that multiple scenarios can be considered in the first screen time detection, improving the accuracy of the first screen time detection;
[0046] Moreover, this first screen time detection method does not require the participation of the business party, realizes unified detection of the first screen time, is compatible with the first screen time detection of multiple businesses, and can reduce the first screen time detection cost; and the first screen time detection processing does not require the business party to manually track the points, which is more intelligent and avoids the risk of mistransmission or omission; in addition, by using the second time when the root view of the page is created as the basis for determining the first screen time, the first screen time detection can be compatible with different models, fully considering the rendering time of different models, and can further improve the accuracy of the first screen time detection.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0049] Figure 1 It is a schematic diagram of an application environment according to an exemplary embodiment.
[0050] Figure 2 The figure is a flow chart of a first screen time detection method according to an exemplary embodiment.
[0051] Figure 3 The figure is a flow chart of another first screen time detection method according to an exemplary embodiment.
[0052] Figure 4 The present invention is a flow chart of a method for determining a first screen time based on at least one third time and a first time according to an exemplary embodiment.
[0053] Figure 5 The present invention is a flowchart of another method for determining the first screen time based on at least one third time and the first time according to an exemplary embodiment.
[0054] Figure 6 The figure is a block diagram of a first screen time detection device according to an exemplary embodiment.
[0055] Figure 7 The present invention is a block diagram of an electronic device for first screen time detection according to an exemplary embodiment.
[0056] Figure 8 The figure is a block diagram of another electronic device for first screen time detection according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0059] See also Figure 1 , Figure 1 is a schematic diagram of an application environment according to an exemplary embodiment. Figure 1 As shown, the application environment may include a server 01 and a terminal 02 .
[0060] In an optional embodiment, server 01 can be used for first screen time detection. Specifically, server 01 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0061] In an optional embodiment, the terminal 02 can be used for page operation. Specifically, the terminal 02 can include but is not limited to smart phones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices and other types of electronic devices. Optionally, the operating system running on the electronic device can include but is not limited to Android system, IOS system, Linux, Windows and the like.
[0062] In addition, it should be noted that Figure 1 The illustrated example is only an application environment of the first screen time detection method provided by the present disclosure. In the embodiments of the present specification, the server 01 and the terminal 02 may be directly or indirectly connected via wired or wireless communication, and the present application does not limit this.
[0063] It should be noted that the following figure shows a possible order of steps, which is not actually limited to this order. Some steps can be executed in parallel without relying on each other. The user information (including but not limited to user device information, user personal information, user behavior information, etc.) and data (including but not limited to data for display, training data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0064] Figure 2 FIG. 1 is a flow chart showing a method for detecting first screen time according to an exemplary embodiment. Figure 2 As shown, the following steps may be included.
[0065] In step S201, in response to a page loading request, a data request is monitored.
[0066] In actual applications, users on the terminal side can trigger a page loading request in the target application and can send a page loading request to the server. For example, by clicking on the entry information of an activity page in a short video application, you can enter the activity page and trigger a page loading request for the activity page to display the activity page. Accordingly, the server can monitor the data request associated with the page loading request in response to the page loading request. The response data of the data request can be a page element in the target page corresponding to the page loading request. Among them, the data request can be an http (Hyper Text Transfer Protocol) request.
[0067] In step S203, a first time when the container is started and a second time when the page root view is created are obtained.
[0068] In the embodiments of this specification, the container may refer to a container for page rendering, which provides an engine and support for page rendering. For example, it may include containers corresponding to Native, RN (React Native), and H5 (HTML5, Hyper Text Markup Language).
[0069] In actual applications, in response to a page loading request, the startup time of the container can be monitored, so that the first time t0 when the container is started can be obtained. The creation of the root view of the page can also be monitored, so that when the creation of the root view of the page is detected to be completed, the second time t1 when the creation of the root view of the page is completed can be obtained. Among them, the first time and the second time can be reported by the terminal side according to the buried point, and the following third time can also be reported by the terminal side according to the buried point.
[0070] In step S205, if there is no data request within the first preset time period, the first screen time is determined according to the second time and the first time.
[0071] In the embodiments of this specification, the first preset time period may be pre-set, and the duration of the first preset time period may be 3 seconds, which is not limited in this disclosure. The starting time of the first preset time period may be the above-mentioned first time t0. In one example, it is possible to determine whether there is a data request within the first preset time period based on the monitoring of the data request. If there is no data request within the first preset time period, the first screen time may be determined based on the second time and the first time. For example, the time difference between t1-t0 may be used as the first screen time. Among them, the data request may be made by calling an interface, so that the call of the interface may be monitored to realize the monitoring of the data request.
[0072] By obtaining the first time when the container is started and the second time when the root view of the page is created, the first screen rendering time node is refined. Through this fine-grained split, actual data basis can be provided for in-depth optimization of each subsequent link; and by judging whether there is a data request within the first preset time period, the page attribute is considered in the first screen rendering: static page or dynamic page, so that multiple scenarios can be considered in the first screen time detection, improving the accuracy of the first screen time detection;
[0073] Moreover, this first screen time detection method does not require the participation of the business party, realizes unified detection of the first screen time, is compatible with the first screen time detection of multiple businesses, and can reduce the first screen time detection cost; and the first screen time detection processing does not require the business party to manually track the points, which is more intelligent and avoids the risk of mistransmission or omission; in addition, by using the second time when the root view of the page is created as the basis for determining the first screen time, the first screen time detection can be compatible with different models, fully considering the rendering time of different models, and can further improve the accuracy of the first screen time detection.
[0074] Optionally, in a possible implementation, after step S205, the method may further include: when the first screen time is greater than the time threshold, sending an alarm message. For example, an alarm message may be sent to a monitoring terminal of the first screen time so that the monitoring personnel can be informed of the alarm of the first screen time in a timely manner, so that the first screen time can be adjusted in a timely manner to reduce the first screen time to within the time threshold.
[0075] The time threshold can be pre-set, and the present disclosure does not limit this. By setting the time threshold, automatic monitoring of the first screen time can be achieved, which can improve the efficiency and accuracy of the alarm; thereby, timely and effective adjustment of the first screen time detection can be achieved to ensure the user's browsing experience.
[0076] Figure 3 is a flow chart of another first screen time detection method according to an exemplary embodiment. In a possible implementation, Figure 3 As shown, the method may also include:
[0077] In step S301, if there is a data request within the first preset time period, obtain at least one data request within the second preset time period; wherein the start time of the second preset time period is the above-mentioned first time, and the duration of the second preset time period is greater than the duration of the first preset time period, for example, the duration of the second preset time period is 5 seconds, which is not limited in the present disclosure.
[0078] In the embodiment of the present specification, if there is a data request in the first preset time period, at least one data request in the second preset time period may be obtained. The at least one data request in the second preset time period may refer to all data requests in the second preset time period.
[0079] In step S303, at least one third time corresponding to at least one data request is determined, and the at least one third time is the completion time of at least one data request, that is, the completion time of a data request may refer to the time corresponding to the completion of rendering of the response data of a data request in the page (the response data is displayed in the page).
[0080] In the embodiment of the present specification, the processing progress of each data request can be monitored, and when the data request is completed, the completion time of the data request can be determined as the third time, wherein each data request corresponds to a third time.
[0081] In one example, the completion time of a data request may refer to the time when the data request is processed and the response data is obtained. Alternatively, in another example, the completion time of a data request may refer to the time when the response data of the data request is rendered and the notifylayout on the end side is called. For example, the call time of the notifylayout corresponding to each data request may be obtained, and the call time may be used as the third time corresponding to each data request.
[0082] In step S305, the first screen time is determined based on at least one third time and the first time.
[0083] In the embodiment of the present specification, the first screen time can be determined based on at least one third time and the first time. As an example, the difference between the last third time in the at least one third time and the first time can be used as the first screen time.
[0084] When there is a data request within the first preset time period, that is, when the loaded page is a dynamic page, the first screen time is determined based on at least one third time corresponding to at least one data request within the second preset time period, so that the first screen time of the dynamic page can be determined more accurately.
[0085] Figure 4 is a flow chart of a method for determining the first screen time based on at least one third time and the first time according to an exemplary embodiment. In a possible implementation, Figure 4 As shown, step S305 may include:
[0086] In step S401, when at least one data request includes a primary interface identifier, a first target time corresponding to the primary interface identifier is determined from at least one third time;
[0087] In step S403, the first screen time is determined based on the first target time and the first time.
[0088] In the embodiment of the present specification, when the loaded page is a dynamic page, in order to further improve the accuracy of the first screen time of the dynamic page, the dynamic page can be divided into more fine-grained levels, such as whether there is a main interface identifier, so as to take into account the main interface scenario. Based on this, when the main interface identifier is included in at least one data request, the first target time corresponding to the main interface identifier can be determined from at least one third time. For example, a target data request including a main interface identifier can be determined from at least one data request, so that the request completion time corresponding to the target data request can be used as the first target time corresponding to the main interface identifier. Among them, the main interface identifier can be represented by Main-Api. When the Main-Api is 1, it can be represented that the data request includes the main interface identifier; when the Main-Api is 0, it can be represented that the data request does not include the main interface identifier. As an example, the main interface identifier can be carried in the header structure of the data request, which is not limited in the present disclosure.
[0089] Furthermore, the first screen time may be determined based on the first target time and the first time. For example, the difference between the first target time and the first time may be used as the first screen time.
[0090] By further considering the impact of the main interface on the basis of page rendering and page attributes, the first screen time can be detected and controlled from more dimensions, making the first screen time more accurate and reliable.
[0091] Figure 5 is a flowchart of another method for determining the first screen time based on at least one third time and the first time according to an exemplary embodiment. In a possible implementation, Figure 5 As shown, step S305 may include:
[0092] In step S501, when at least one data request does not include a primary interface identifier, a second target time is determined from at least one third time; the time length from the second target time to the current time is greater than the time length from the third target time to the current time, and the third target time is a third time in the at least one third time except the second target time;
[0093] In step S503, the first screen time is determined based on the second target time and the first time.
[0094] In the embodiment of the present specification, when the main interface identifier is not included in at least one data request, the duration between each third time and the current time can be determined; thus, the third time corresponding to the maximum duration can be determined as the second target time, that is, the duration between the second target time and the current time is greater than the duration between the third target time and the current time, and the third target time is the third time other than the second target time in at least one third time. Further, the first screen time can be determined based on the second target time and the first time, for example, the difference between the second target time and the first time can be determined as the first screen time.
[0095] By further considering the influence of the main interface on the basis of page rendering and page attributes, differentiated first screen time detection based on whether there is a main interface identification is implemented, making the first screen time detection more refined.
[0096] In a possible implementation, the first preset time period and the second preset time period can be dynamically adjusted according to the actual scenario, and the specific adjustment can be triggered by the user on the terminal side, or can be automatically triggered by the server side or manually triggered by the server side, which is not limited in this disclosure. As an example, the adjustment of the time period can be implemented by the following steps:
[0097] In response to the time period configuration request, the first preset time period and the second preset time period are updated.
[0098] In actual applications, the corresponding first preset time period and second preset time period can be dynamically set according to different application scenarios. The first preset time period and the second preset time period can be obtained by statistics, which is not limited in the present disclosure. In one example, the time period configuration request may include first adjustment information for the first preset time period and second adjustment information for the second preset time period; thereby, the first preset time period and the second preset time period can be updated based on the first adjustment information and the second adjustment information. When the first adjustment information is the first target time period, the first preset time period can be updated to the first target time period; when the first adjustment information is the first time adjustment information, for example, adding 0.1 seconds, 0.1 seconds can be added to the first preset time period, that is, the first preset time period is updated to: the first preset time period + 0.1 seconds.
[0099] Correspondingly, when the second adjustment information is the second target time period, the second preset time period can be updated to the second target time period; when the second adjustment information is the second time adjustment information, for example, reducing 0.1 seconds, the first preset time period can be reduced by 0.1 seconds, that is, the first preset time period is updated to: the first preset time period - 0.1 seconds.
[0100] By dynamically adjusting the first preset time period and the second preset time period, adapted time periods can be used for different business scenarios, which can make the detection and processing of the first screen time more accurate.
[0101] Figure 6 is a block diagram of a first screen time detection device according to an exemplary embodiment. Figure 6 , the device may include:
[0102] The monitoring module 601 is configured to monitor the data request in response to the page loading request;
[0103] A first time acquisition module 603 is configured to execute acquisition of a first time when the container is started and a second time when the page root view is created;
[0104] The second time acquisition module 605 is configured to execute acquisition of the second time when the creation of the page root view is completed;
[0105] The first first screen time determination module 607 is configured to determine the first screen time according to the second time and the first time if there is no data request within the first preset time period, wherein the start time of the first preset time period is the above-mentioned first time.
[0106] By obtaining the first time when the container is started and the second time when the root view of the page is created, the first screen rendering time node is refined. Through this fine-grained split, actual data basis can be provided for in-depth optimization of each subsequent link; and by judging whether there is a data request within the first preset time period, the page attribute is considered in the first screen rendering: static page or dynamic page, so that multiple scenarios can be considered in the first screen time detection, improving the accuracy of the first screen time detection;
[0107] Moreover, this first screen time detection method does not require the participation of the business party, realizes unified detection of the first screen time, is compatible with the first screen time detection of multiple businesses, and can reduce the first screen time detection cost; and, the first screen time detection does not require the business party to manually track the points, which is more intelligent and avoids the risk of mistransmission or omission; in addition, by using the second time when the root view of the page is created as the basis for determining the first screen time, the first screen time detection can be compatible with different models, fully considering the rendering time of different models, and can further improve the accuracy of the first screen time detection.
[0108] In a possible implementation, the device may further include:
[0109] A data request acquisition module, configured to execute, if there is a data request within the first preset time period, to acquire at least one data request within a second preset time period; wherein the start time of the second preset time period is the above-mentioned first time, and the duration of the second preset time period is greater than the duration of the first preset time period;
[0110] A third time acquisition module is configured to determine at least one third time corresponding to the at least one data request, where the at least one third time is a completion time of each of the at least one data request;
[0111] The second first screen time determination module is configured to determine the first screen time based on the at least one third time and the first time.
[0112] In a possible implementation, the second first screen time determination module may include:
[0113] A first target time determining unit is configured to determine a first target time corresponding to the primary interface identifier from the at least one third time when the at least one request includes the primary interface identifier;
[0114] The first first screen time determining unit is configured to determine the first screen time based on the first target time and the first time.
[0115] In a possible implementation, the second first screen time determination module may include:
[0116] A second target time determination unit is configured to determine a second target time from the at least one third time when the at least one request does not include a primary interface identifier; the duration between the second target time and the current time is greater than the duration between the third target time and the current time, and the third target time is a third time other than the second target time in the at least one third time;
[0117] The second first screen time determining unit is configured to determine the first screen time based on the second target time and the first time.
[0118] In a possible implementation, the above device may further include:
[0119] The updating module is configured to execute, in response to a time period configuration request, updating the first preset time period and the second preset time period.
[0120] In a possible implementation, the method may further include:
[0121] The alarm module is configured to execute the sending process of the alarm information when the first screen time is greater than the time threshold.
[0122] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0123] Figure 7is a block diagram of an electronic device for first screen time detection according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for first screen time detection is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0124] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] Figure 8 is a block diagram of another electronic device for first screen time detection according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for first screen time detection is implemented.
[0126] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] In an exemplary embodiment, an electronic device is also provided, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the first screen time detection method as in the embodiment of the present disclosure.
[0128] In an exemplary embodiment, a computer-readable storage medium is also provided, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the first screen time detection method in the embodiment of the present disclosure. The computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0129] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the method for detecting the first screen time in the embodiment of the present disclosure.
[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0131] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0132] It should be understood that the present disclosure is not limited to the exact structures that have been 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
1. A method for detecting first screen time, It is characterized in that include: In response to a page load request, data requests are monitored; Get the first time when the container is started and the second time when the page root view is created; If there is no data request within the first preset time period, determining the first screen time according to the second time and the first time, wherein the start time of the first preset time period is the first time; If there is a data request within the first preset time period, obtain at least one data request within the second preset time period; wherein the start time of the second preset time period is the first time, and the duration of the second preset time period is greater than the duration of the first preset time period; and determine at least one third time corresponding to the at least one data request, the at least one third time being the completion time of each of the at least one data request; and determine the first screen time based on the at least one third time and the first time.
2. The method according to claim 1, It is characterized in that The determining the first screen time based on the at least one third time and the first time includes: In a case where the at least one data request includes a primary interface identifier, determining a first target time corresponding to the primary interface identifier from the at least one third time; The first screen time is determined based on the first target time and the first time.
3. The method according to claim 1 or 2, It is characterized in that The determining the first screen time based on the at least one third time and the first time includes: In a case where the at least one data request does not include a primary interface identifier, determining a second target time from the at least one third time; a time length from the second target time to the current time is greater than a time length from the third target time to the current time, and the third target time is a third time in the at least one third time excluding the second target time; The first screen time is determined based on the second target time and the first time.
4. The method according to claim 1, It is characterized in that The method further comprises: In response to the time period configuration request, the first preset time period and the second preset time period are updated.
5. The method according to claim 1, It is characterized in that Also includes: When the first screen time is greater than the time threshold, an alarm message is sent.
6. A first screen time detection device, It is characterized in that include: A monitoring module is configured to monitor the data request in response to the page loading request; A first time acquisition module is configured to execute acquisition of the first time when the container is started; A second time acquisition module is configured to execute acquisition of a second time when the creation of the page root view is completed; A first first screen time determination module is configured to determine the first screen time according to the second time and the first time if there is no data request within a first preset time period, wherein the start time of the first preset time period is the first time; a data request acquisition module, configured to execute, if there is a data request within the first preset time period, acquiring at least one data request within a second preset time period; wherein the start time of the second preset time period is the first time, and the duration of the second preset time period is greater than the duration of the first preset time period; A third time acquisition module is configured to determine at least one third time corresponding to the at least one data request, where the at least one third time is a completion time of each of the at least one data request; The second first screen time determination module is configured to determine the first screen time based on the at least one third time and the first time.
7. The device according to claim 6, It is characterized in that The second first screen time determination module includes: A first target time determining unit is configured to determine a first target time corresponding to the primary interface identifier from the at least one third time when the at least one request includes the primary interface identifier; The first first screen time determining unit is configured to determine the first screen time based on the first target time and the first time.
8. The device according to claim 6 or 7, It is characterized in that The second first screen time determination module includes: A second target time determination unit is configured to determine a second target time from the at least one third time when the at least one request does not include a primary interface identifier; the duration from the second target time to the current time is greater than the duration from the third target time to the current time, and the third target time is a third time in the at least one third time excluding the second target time; The second first screen time determining unit is configured to determine the first screen time based on the second target time and the first time.
9. The device according to claim 6, It is characterized in that The device also includes: The updating module is configured to execute, in response to a time period configuration request, updating the first preset time period and the second preset time period.
10. The device according to claim 6, It is characterized in that Also includes: The alarm module is configured to execute the sending process of the alarm information when the first screen time is greater than the time threshold.
11. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the first screen time detection method as described in any one of claims 1 to 5.
12. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the first screen time detection method as described in any one of claims 1 to 5.
13. A computer program product comprising computer instructions, It is characterized in that When the computer instructions are executed by a processor, the first screen time detection method described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Eye protection system and method
CN105719439A
Page first screen loading duration test method and device, computer equipment and medium
CN111782492A
