A page idle detection method, device, electronic device and storage medium

By listening to user operations on the client and leisurely, disconnecting timeout connections solves the problem of too much server burden in the existing technology, and achieves the effect of reducing server participation and improving server performance.

CN115630253BActive Publication Date: 2025-01-28NETTRIX INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211397203.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-01-28
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

The existing page idle detection method involves the server in the timeout mechanism, resulting in increased server burden and waste of resources.

Method used

By listening to the user's operation at the client and when determining the user operation to the effective operation, it is time to disconnect the client connection if the free time exceeds the preset threshold to reduce the server participation.

Benefits of technology

Reduce the pressure and resources of the server and improve the server performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115630253B_ABST
    Figure CN115630253B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a page idle detection method, device, electronic device and storage medium. The page idle detection method may specifically include: when it is determined that the client connection is successful, monitoring the user operation through the monitoring module; when it is determined that the user operation is a valid user operation, performing a first idle timing through the timing module; wherein the valid user operation is a user operation with an operation frequency less than a preset operation frequency threshold; determining a first current idle time according to the first idle timing result, and disconnecting the client connection when the first current idle time exceeds a first preset time threshold. The technical solution of the embodiments of the present invention can reduce server participation, avoid waste of server resources, and reduce server pressure, thereby improving server performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a page idle detection method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of the Internet, various websites and applications have sprung up like mushrooms after rain, so more and more users are accessing various network resources through the Internet. However, with the increase in the number of users, the pressure on the servers that provide network resources is also increasing. In order to reduce the pressure on the server and avoid resource waste, the web (World Wide Web, Internet) front end itself can have some mechanisms to control the indiscriminate output of resources, and the timeout mechanism is one of them.

[0003] Existing page idle detection methods usually use a combination of client and server to jointly establish a timeout mechanism. Specifically, the client first monitors the user's operation on the page and sends an instruction to update the timeout time to the server. After the server updates the time, it determines whether it exceeds the set threshold. If it times out, it actively disconnects the connection and the client needs to reconnect.

[0004] However, the above page idle detection method involves the server in the timeout mechanism, and when monitoring the page, the user may perform multiple operations at the same time, which adds additional burden to the server. Summary of the invention

[0005] The embodiments of the present invention provide a page idle detection method, device, electronic device and storage medium, which can reduce server participation, avoid waste of server resources, and reduce server pressure, thereby improving server performance.

[0006] According to one aspect of the present invention, a page idle detection method is provided, comprising:

[0007] When the client connection is confirmed to be successful, the monitoring module monitors the user operation events;

[0008] In the case where it is determined that the user operation is a valid user operation, a first idle timing is performed by a timing module; wherein the valid user operation is a user operation whose operation frequency is less than a preset operation frequency threshold;

[0009] A first current idle time is determined according to the first idle timing result, and the client connection is disconnected when the first current idle time exceeds a first preset time threshold.

[0010] In addition, the page idle detection method according to the above embodiment of the present invention may also have the following additional technical features:

[0011] Optionally, the page idle detection method further includes:

[0012] When it is determined that the user operation is an invalid user operation, the operation of performing event monitoring on the user operation through the monitoring module is returned.

[0013] An embodiment of the above invention has the following advantages or beneficial effects: a supplementary processing strategy for determining whether a user operation is an invalid user operation is added, that is, when the user operation is an invalid user operation, the user operation continues to be monitored through the monitoring module, thereby achieving event throttling of user operation events, which can effectively avoid the waste of resources and performance caused by high-frequency triggering events.

[0014] Optionally, the page idle detection method further includes:

[0015] When the monitoring module monitors the first user operation, the timing module performs a second idle timing;

[0016] When the monitoring module monitors the second user operation, determining the second current idle time according to the second idle timing result;

[0017] In the case of determining that the second current idle time reaches the second preset time threshold, determining the second user operation as a valid user operation;

[0018] When it is determined that the second current idle time does not reach the second preset time threshold, the second user operation is determined as an invalid user operation.

[0019] An embodiment of the above invention has the following advantages or beneficial effects: a specific implementation method for determining valid user operations and invalid user operations is proposed to avoid waste of resources and performance caused by multiple triggering of user operations in a short period of time.

[0020] Optionally, the page idle detection method further includes:

[0021] When it is determined that the client connection is successful, a third idle timing is performed by the timing module, and a third current idle time is determined according to the third idle timing result;

[0022] If the monitoring module does not monitor the user operation and the third current idle time exceeds the first preset time threshold, the client connection is disconnected.

[0023] An embodiment of the above invention has the following advantages or beneficial effects: a supplementary processing strategy is added when the monitoring module fails to monitor user operations, that is, a third idle timing is performed through the timing module when the client is successfully connected, so as to disconnect the client connection when the monitoring module fails to monitor user operations and the third current idle time exceeds the first preset time threshold. The connection can be disconnected when there is no user operation, thereby ensuring the implementation of the timeout mechanism.

[0024] Optionally, before the timing module performs the first idle timing, the method further includes:

[0025] Send a reset timing instruction to the timing module through the monitoring module;

[0026] The third current idle time is updated to a preset time value through the timing module according to the reset timing instruction.

[0027] An embodiment of the above invention has the following advantages or beneficial effects: a reset timing instruction is sent to the timing module through the monitoring module, so that the third current idle time is updated to a preset time value through the timing module according to the reset timing instruction, so that the timing module can start a new idle timing, thereby improving the accuracy of the idle timing.

[0028] Optionally, before monitoring the user operation through the monitoring module, the following is also included:

[0029] Determine a monitoring object; wherein the monitoring object includes a browser page and / or an application page;

[0030] The monitoring module monitors user operations, including:

[0031] The monitoring module monitors the user operations in the monitoring object.

[0032] An embodiment of the above invention has the following advantages or beneficial effects: a specific application scenario of event monitoring is proposed to implement event monitoring of user operations in a browser page or an application page, thereby expanding the application scenario of event monitoring of user operations.

[0033] Optionally, the user operation includes at least one of a mouse click event, a keyboard input event, a mouse slide event, a mouse wheel scroll event, and a screen touch event.

[0034] An embodiment of the above invention has the following advantages or beneficial effects: multiple operation events included in user operations are proposed, and user operations can be monitored more comprehensively, thereby expanding the application scenarios of the method.

[0035] According to another aspect of the present invention, there is provided a page idle detection device, comprising:

[0036] The monitoring module is used to monitor the user operation events when the client connection is successful;

[0037] A timing module, configured to perform a first idle timing when it is determined that the user operation is a valid user operation; wherein the valid user operation is a user operation whose operation frequency is less than a preset operation frequency threshold;

[0038] The timing module is further configured to determine a first current idle time according to the first idle timing result, and disconnect the client connection when the first current idle time exceeds a first preset time threshold.

[0039] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0040] at least one processor; and

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page idle detection method described in any embodiment of the present invention.

[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page idle detection method described in any embodiment of the present invention when executed.

[0044] The technical solution of the embodiment of the present invention, when determining that the client connection is successful, monitors the user operation through the monitoring module, and when determining that the user operation is a valid user operation, performs a first idle timing through the timing module, so as to determine the first current idle time according to the first idle timing result, thereby disconnecting the client connection when the first current idle time exceeds the first preset time threshold, thereby solving the problem of excessive server burden pressure in the timeout mechanism of the existing page idle detection method, reducing server participation, avoiding waste of server resources, and reducing server pressure, thereby improving server performance.

[0045] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0047] Figure 1 is a flow chart of a page idle detection method provided by Embodiment 1 of the present invention;

[0048] Figure 2 is a flow chart of a page idle detection method provided by Embodiment 2 of the present invention;

[0049] Figure 3 is an example flow chart of a page idle detection method provided by Embodiment 3 of the present invention;

[0050] Figure 4 is a schematic diagram of a page idle detection device provided by a fourth embodiment of the present invention;

[0051] Figure 5 It is a structural schematic diagram of an electronic device for implementing the page idle detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0054] Embodiment 1

[0055] Figure 1This is a flow chart of a page idle detection method provided by the first embodiment of the present invention. This embodiment can be applied to reduce the participation of the server in the timeout mechanism, reduce the server pressure, and improve the server performance. The method can be executed by a page idle detection device, which can be implemented by software and / or hardware, and can generally be directly integrated in an electronic device that executes the method. The electronic device can be a terminal device or a server device. The embodiment of the present invention does not limit the type of electronic device that executes the page idle detection method. Specifically, Figure 1 As shown, the page idle detection method may specifically include the following steps:

[0056] S110: When it is determined that the client is connected successfully, monitor the user operation through the monitoring module.

[0057] Among them, the client connection success may be the client connection success with the server. It should be noted that the client connection success may be determined after the client receives the connection success message sent by the server, or after the client sends a connection request to the server, etc. The embodiment of the present invention does not limit the specific implementation method of determining the client connection success, as long as the determination of the client connection success can be achieved. The monitoring module may be a module for monitoring user operations. The user operation may be any operation of the user, such as keyboard operation, mouse operation, or touch operation, etc., which is not limited by the embodiment of the present invention.

[0058] In the embodiment of the present invention, it is determined whether the client is successfully connected, and when the client is successfully connected, the monitoring module monitors the user operation for an event. It is understandable that each user operation can be determined as an event. Monitoring the user operation for an event means monitoring whether a user operation event occurs.

[0059] S120. When it is determined that the user operation is a valid user operation, a timing module is used to perform a first idle timing. The valid user operation is a user operation whose operation frequency is less than a preset operation frequency threshold.

[0060] Among them, the effective user operation may be an effective user operation. The first idle timing may be a timing operation for recording the idle time. It is understandable that the idle time is also the time when there is no user operation. The operation frequency may be the frequency of the user's operation. The preset operation frequency threshold may be a threshold of the operation frequency set in advance. It is understandable that when the operation frequency of the user operation is less than the preset operation frequency, the user operation can be determined as a valid user operation.

[0061] In an embodiment of the present invention, after the monitoring module monitors the user operation for events, it is possible to further determine whether the monitored user operation is a valid user operation when the monitoring module monitors the user operation, and perform a first idle timing through the timing module when the user operation is a valid user operation.

[0062] It is understandable that user operations may include valid user operations and invalid user operations. When the operation frequency of the user operation is greater than the preset operation frequency, the user operation can be determined as an invalid user operation. If the operation frequency of the user operation is greater than the preset operation frequency threshold, it means that multiple user operation events occur in a short period of time. In order to avoid triggering idle timing multiple times, the user operation events that occur multiple times in a short period of time can be determined as invalid user operations. When the user operation is an invalid user operation, idle timing is not performed, thereby avoiding waste of resources.

[0063] S130: Determine a first current idle time according to the first idle timing result, and disconnect the client when the first current idle time exceeds a first preset time threshold.

[0064] Among them, the first idle timing result may be a result obtained through the first idle timing. The first current idle time may be an idle time obtained through the first idle timing. Exemplarily, assuming that the first idle timing result is 5 counting results obtained through the first idle timing, then the first current idle time may be 5 minutes, or 5 seconds, etc., and the embodiment of the present invention does not limit this. The first preset time threshold may be a preset time threshold. Optionally, the first preset time threshold may be a preset idle timeout threshold, that is, a preset maximum time threshold without user operation, for example, it may be 0.5 hours, or 1 hour, etc., and the embodiment of the present invention does not limit this.

[0065] In an embodiment of the present invention, after the first idle timing is performed by the timing module, the first current idle time can be further determined according to the first idle timing result to determine whether the first current idle time exceeds the first preset time threshold, and the client connection is disconnected when the first current idle time exceeds the first preset time threshold. Exemplarily, assuming that the first preset time threshold is 0.5 hours, the client connection can be disconnected when it is determined that the first current idle time is greater than 0.5 hours.

[0066] Optionally, the first idle timing result can be determined at any time after the timing module performs the first idle timing, or the first idle timing result can be determined when the system time interval reaches the set time interval, etc., and the embodiment of the present invention does not limit this. Exemplarily, the first idle timing result can be determined at any time, so as to determine at any time whether the first current idle time exceeds the first preset time threshold. The operation of determining the first idle timing result can also be performed every 5 minutes, so as to perform the operation of determining whether the first current idle time exceeds the first preset time threshold every 5 minutes.

[0067] The technical solution of this embodiment, when determining that the client connection is successful, monitors the user operation through the monitoring module, and when determining that the user operation is a valid user operation, performs a first idle timing through the timing module, so as to determine the first current idle time according to the first idle timing result, thereby disconnecting the client connection when the first current idle time exceeds the first preset time threshold. This solves the problem of excessive server burden pressure in the timeout mechanism of the existing page idle detection method, can reduce server participation, avoid waste of server resources, and reduce the pressure on the server, thereby improving server performance.

[0068] Embodiment 2

[0069] Figure 2 is a flow chart of a page idle detection method provided in the second embodiment of the present invention. This embodiment is a further refinement of the above-mentioned technical solutions, and provides multiple specific optional implementation methods for monitoring user operations through a monitoring module and determining that the user operations are valid user operations. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above-mentioned embodiments. Figure 2 As shown, the method may include the following steps:

[0070] S210: When it is determined that the client is connected successfully, monitor the user operation through the monitoring module.

[0071] Optionally, before performing event monitoring on user operations through the monitoring module, it may also include: determining the monitoring object; wherein the monitoring object includes a browser page and / or an application page; accordingly, performing event monitoring on user operations through the monitoring module may include: performing event monitoring on user operations in the monitoring object through the monitoring module.

[0072] The monitoring object may be an object for monitoring events of user operations, for example, a page for monitoring events of user operations. It is understandable that the monitoring object may be a page or multiple pages, and the embodiment of the present invention does not limit this. Specifically, the monitoring object may be a browser page, an application page, or a browser page and an application page. The application page may be a page in an application.

[0073] Specifically, before performing event monitoring on user operations through the monitoring module, a monitoring object may be determined so as to perform event monitoring on user operations in the monitoring object through the monitoring module.

[0074] The above technical solution proposes a specific application scenario of event monitoring to implement event monitoring of user operations in a browser page or an application page, thereby expanding the application scenario of event monitoring of user operations.

[0075] Optionally, after determining the monitoring object, a monitoring module may be further started, and a monitoring mechanism in the monitoring module may be initialized, so as to perform event monitoring on user operations in the monitoring object through the monitoring mechanism in the monitoring module.

[0076] Optionally, the user operation may include at least one of a mouse click event, a keyboard input event, a mouse slide event, a mouse wheel scroll event, and a screen touch event.

[0077] Among them, a mouse click event can be an operation in which a user clicks a mouse. A keyboard input event can be an operation in which a user inputs data through a keyboard. A mouse slide event can be an operation in which a user slides a mouse, that is, an event in which a mouse cursor slides in a monitoring object. A mouse wheel scroll event can be an operation in which a user scrolls a mouse wheel. A screen touch event can be an operation in which a user touches the screen.

[0078] Specifically, when the monitoring module monitors the user operation, at least one of a mouse click event, a keyboard input event, a mouse slide event, a mouse wheel scroll event, and a screen touch event may be monitored.

[0079] The above technical solution proposes a variety of operation events included in user operations, which can monitor user operations more comprehensively, thereby expanding the application scenarios of the method.

[0080] S220: Perform a third idle timing by the timing module, and determine a third current idle time according to the third idle timing result.

[0081] The third idle timer may be another timer operation for recording the idle time. The third idle timer result may be a result obtained through the third idle timer. The third current idle time may be an idle time obtained through the third idle timer.

[0082] In the embodiment of the present invention, the third idle timing can be performed by the timing module when the client is successfully connected, so as to determine the third current idle time according to the third idle timing result.

[0083] It should be noted that the embodiment of the present invention does not limit the order of S210 and S220, that is, S210 and S220 can be performed simultaneously.

[0084] S230, determining whether the monitoring module monitors the user operation; if so, executing S240; otherwise, executing S280.

[0085] In the embodiment of the present invention, after the monitoring module monitors the user operation and the timing module performs the third idle timing, it can be further determined whether the monitoring module monitors the user operation.

[0086] Specifically, if the monitoring module monitors the user operation, it can further determine whether the user operation is a valid user operation. If the monitoring module does not monitor the user operation, it can further determine whether the third current idle time exceeds the first preset time threshold.

[0087] S240, determining whether the user operation is a valid user operation; if so, executing S250; otherwise, returning to executing S210.

[0088] In an embodiment of the present invention, after determining that the monitoring module monitors the user operation, it can be further determined whether the user operation is a valid user operation. Specifically, if the user operation is a valid user operation, a reset timing instruction can be further sent to the timing module through the monitoring module, so that the third current idle time is updated to a preset time value according to the reset timing instruction through the timing module, thereby performing the first idle timing through the timing module. If the user operation is an invalid user operation, the operation of performing event monitoring on the user operation through the monitoring module can be returned.

[0089] The above technical solution, by adding a supplementary processing strategy for determining whether a user operation is an invalid user operation, that is, when the user operation is an invalid user operation, continues to monitor the user operation through the monitoring module, thereby realizing event throttling of user operation events, which can effectively avoid the waste of resources and performance caused by high-frequency triggering events.

[0090] Optionally, the method may also include: when the monitoring module monitors the first user operation, performing a second idle timing through the timing module; when the monitoring module monitors the second user operation, determining a second current idle time according to the second idle timing result; when it is determined that the second current idle time reaches a second preset time threshold, determining the second user operation as a valid user operation; when it is determined that the second current idle time does not reach the second preset time threshold, determining the second user operation as an invalid user operation.

[0091] The first user operation may be any user operation. The second idle timer may be another timer operation for recording idle time. The second user operation may be a user operation that occurs after the first user operation. The second idle timer result may be a result obtained through the second idle timer. The second current idle time may be an idle time obtained through the second idle timer. The second preset time threshold may be another preset time threshold, for example, it may be n seconds, or it may be n minutes, etc., which is not limited in the embodiment of the present invention, wherein n may be any number such as 1, 2, 3, etc.

[0092] Specifically, when the monitoring module monitors the first user operation, the second idle timing is performed through the timing module, and when the monitoring module monitors the second user operation, the second current idle time is determined according to the second idle timing result to determine whether the second current idle time reaches the second preset time threshold, so as to determine the second user operation as a valid user operation when the second current idle time reaches the second preset time threshold, and determine the second user operation as an invalid user operation when the second current idle time does not reach the second preset time threshold.

[0093] It is understandable that if the monitoring module does not monitor the second user operation after monitoring the first user operation, it means that no user operation event occurs. Then the second current idle time can be determined at any time, so that the client connection is disconnected when the second current idle time exceeds the first preset time threshold.

[0094] The above technical solution proposes a specific implementation method for determining valid user operations and invalid user operations, so as to avoid the waste of resources and performance caused by triggering user operations multiple times in a short period of time.

[0095] S250: Send a reset timing instruction to the timing module through the monitoring module.

[0096] S260: updating the third current idle time to a preset time value through the timing module according to the reset timing instruction.

[0097] The reset timing instruction may be an instruction for re-timing. The preset time value may be a pre-set time value, such as 0, or other values, which is not limited in the embodiment of the present invention.

[0098] In the embodiment of the present invention, after determining that the user operation is a valid user operation, a reset timing instruction may be further sent to the timing module through the monitoring module, so that the timing module updates the third current idle time to a preset time value according to the reset timing instruction.

[0099] The above technical solution sends a reset timing instruction to the timing module through the monitoring module, so that the timing module updates the third current idle time to a preset time value according to the reset timing instruction, so that the timing module can start a new idle timing, thereby improving the accuracy of the idle timing.

[0100] S270: Perform a first idle timing through a timing module, determine a first current idle time according to the first idle timing result, and disconnect the client connection when the first current idle time exceeds a first preset time threshold.

[0101] It should be noted that if the first current idle time does not exceed the first preset time threshold, the event monitoring of the user operation can continue through the monitoring module. If the monitoring module does not monitor the user operation, it can be determined at any time whether the first current idle time exceeds the first preset time threshold. If the monitoring module monitors the user operation, it can further determine whether the user operation is a valid user operation, and if the user operation is a valid user operation, a reset timing instruction is sent to the timing module through the monitoring module to re-perform idle timing through the timing module.

[0102] S280: When the third current idle time exceeds the first preset time threshold, disconnect the client connection.

[0103] In the embodiment of the present invention, when the monitoring module does not monitor the user operation, it is determined whether the third current idle time exceeds the first preset time threshold, so as to disconnect the client connection when the third current idle time exceeds the first preset time threshold. It can be understood that if the monitoring module does not monitor the user operation, it means that the monitored object is in an idle state. When the time when the monitored object is in an idle state, that is, the third current idle time, exceeds the first preset time threshold, the client connection can be disconnected.

[0104] It should be noted that if the third current idle time does not exceed the first preset time threshold, the operation of performing event monitoring on user operations through the monitoring module may be returned to execution.

[0105] The above technical solution adds a supplementary processing strategy when the monitoring module fails to monitor user operations, that is, when the client is successfully connected, the third idle timing is performed through the timing module, so as to disconnect the client connection when the monitoring module fails to monitor user operations and the third current idle time exceeds the first preset time threshold. The connection can be disconnected when there is no user operation, thereby ensuring the implementation of the timeout mechanism.

[0106] The technical solution of this embodiment is to monitor the user operation through the monitoring module when determining that the client connection is successful, and to perform the third idle timing through the timing module to determine the third current idle time according to the third idle timing result, so as to disconnect the client connection when the monitoring module does not monitor the user operation and the third current idle time exceeds the first preset time threshold. When the user operation monitored by the monitoring module is a valid user operation, the monitoring module sends a reset timing instruction to the timing module, and the timing module updates the third current idle time to the preset time value according to the reset timing instruction, and the timing module performs the first idle timing to determine the first current idle time according to the first idle timing result, so as to disconnect the client connection when the first current idle time exceeds the first preset time threshold, which solves the problem of excessive server burden pressure in the timeout mechanism of the existing page idle detection method, can reduce server participation, avoid waste of server resources, and reduce server pressure at the same time, thereby improving server performance.

[0107] Embodiment 3

[0108] In order to enable those skilled in the art to better understand the page idle detection method of this embodiment, Figure 3 is an example flow chart of a page idle detection method provided by Embodiment 3 of the present invention. Figure 3 As shown, the page idle detection method may specifically include the following contents:

[0109] (1) After detecting that the user has successfully logged in, set a timeout threshold (i.e., a first preset time threshold) and a monitoring object. It is understandable that the user enters a user name and password to log in. If the user is a new user, the user can log in after the user registration is completed.

[0110] (2) After setting the timeout threshold time and the monitoring object, start the monitoring module (i.e., module 1) and the timing module (i.e., module 2). It is understandable that the monitoring module and the timing module can be performed simultaneously. The monitoring module can be used to monitor whether the user's operation is a valid operation. The timing module can be used to determine whether the current accumulated idle time exceeds the timeout threshold.

[0111] (3) The monitoring module is turned on, and the monitoring mechanism is first initialized, and the user operation is monitored after initialization. When the monitoring mechanism monitors that the user has performed a user operation, it determines whether it is a valid user operation. If it is not a valid user operation, it returns to continue monitoring the user operation. If it is a valid user operation, a reset timing instruction is sent to the timing module to make the timing module clear the current timing and start a new idle time timing. It can be understood that the event throttling mechanism of the monitoring module is triggered (that is, determining whether the user operation is a valid user operation) to prevent multiple triggering of the reset timing instruction due to multiple user operations performed by the user in a short period of time, thereby reducing system pressure.

[0112] (4) When the monitoring module is turned on, the timing module is turned on, and the timing starts from 0. The timing mechanism is triggered every 1 second. When the timing mechanism is triggered, the idle time at this time is the last recorded time + 1. If a reset timing instruction is received from the monitoring module, the current idle time is cleared and a new timing is started from 0.

[0113] (5) Determine whether the current accumulated idle time exceeds the set timeout threshold. It should be noted that if the idle time unit is different from the timeout threshold unit, the time data needs to be processed in a unified unit before determining whether the current accumulated idle time exceeds the set timeout threshold.

[0114] (6) If the current accumulated idle time exceeds the timeout threshold, a prompt message may be generated to prompt the system to recognize that the current user has been automatically disconnected due to not performing any operation for a long time, and the connection will be disconnected after 1 second. If the current accumulated idle time does not exceed the timeout threshold, the system returns to continue to determine whether the current accumulated idle time exceeds the set timeout threshold.

[0115] The above technical solution does not require the participation of the server and only implements the timeout mechanism through the client, which reduces the huge pressure on the server; by adding an event throttling mechanism, it prevents the waste of performance and resources caused by multiple triggering of reset timing events in a short period of time; by monitoring multiple user operations, it is possible to monitor user operations on the mobile phone, expanding the application scenarios of the timeout mechanism.

[0116] Embodiment 4

[0117] Figure 4 is a schematic diagram of a page idle detection device provided by Embodiment 4 of the present invention, such as Figure 4 As shown, the device includes: a monitoring module 410 and a timing module 420, wherein:

[0118] The monitoring module 410 is used to monitor the user operation event when it is determined that the client connection is successful;

[0119] The timing module 420 is used to perform a first idle timing when it is determined that the user operation is a valid user operation; wherein the valid user operation is a user operation whose operation frequency is less than a preset operation frequency threshold;

[0120] The timing module 420 is further configured to determine a first current idle time according to the first idle timing result, and disconnect the client connection when the first current idle time exceeds a first preset time threshold.

[0121] The technical solution of this embodiment, when determining that the client connection is successful, monitors the user operation through the monitoring module, and when determining that the user operation is a valid user operation, performs a first idle timing through the timing module, so as to determine the first current idle time according to the first idle timing result, thereby disconnecting the client connection when the first current idle time exceeds the first preset time threshold. This solves the problem of excessive server burden pressure in the timeout mechanism of the existing page idle detection method, can reduce server participation, avoid waste of server resources, and reduce the pressure on the server, thereby improving server performance.

[0122] Optionally, the page idle detection device may also be used to: when it is determined that the user operation is an invalid user operation, return to execute the operation of performing event monitoring on the user operation through the monitoring module.

[0123] Optionally, the page idle detection device can also be used to: when the monitoring module monitors the first user operation, perform a second idle timing through the timing module; when the monitoring module monitors the second user operation, determine the second current idle time according to the second idle timing result; when it is determined that the second current idle time reaches a second preset time threshold, determine the second user operation as a valid user operation; when it is determined that the second current idle time does not reach the second preset time threshold, determine the second user operation as an invalid user operation.

[0124] Optionally, the page idle detection device can also be used to: when it is determined that the client connection is successful, perform a third idle timing through the timing module, and determine a third current idle time based on the third idle timing result; when the monitoring module does not monitor the user operation and the third current idle time exceeds the first preset time threshold, disconnect the client connection.

[0125] Optionally, the monitoring module 410 may be specifically used to send a reset timing instruction to the timing module; correspondingly, the timing module 420 may be specifically used to update the third current idle time to a preset time value according to the reset timing instruction.

[0126] Optionally, the monitoring module 410 may also be specifically used to: determine a monitoring object; wherein the monitoring object includes a browser page and / or an application page; and perform event monitoring on user operations in the monitoring object through the monitoring module.

[0127] Optionally, the user operation may include at least one of a mouse click event, a keyboard input event, a mouse slide event, a mouse wheel scroll event, and a screen touch event.

[0128] The page idle detection device provided in the embodiment of the present invention can execute the page idle detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0129] Embodiment 5

[0130] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0131] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0132] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0133] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a page idle detection method.

[0134] In some embodiments, the page idle detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the page idle detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the page idle detection method in any other appropriate manner (e.g., by means of firmware).

[0135] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0136] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0137] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0138] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0139] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0140] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0141] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0142] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A page idle detection method, characterized in that: include: When the client connection is confirmed to be successful, the monitoring module monitors the user operation events; In the case where it is determined that the user operation is a valid user operation, the first idle timing is performed through the timing module; in the case where it is determined that the user operation is an invalid user operation, the first idle timing is not performed through the timing module; wherein the user operation includes a valid user operation and an invalid user operation, wherein the invalid user operation is a user operation with an operation frequency greater than a preset operation frequency threshold; and the valid user operation is a user operation with an operation frequency less than a preset operation frequency threshold; wherein the first idle timing is used to record the idle time, wherein the idle time is the time when the user does not perform an operation, and the operation frequency is the frequency of the user performing an operation; A first current idle time is determined according to the first idle timing result, and the client connection is disconnected when the first current idle time exceeds a first preset time threshold; wherein the first preset time threshold is a preset maximum time threshold during which the user does not perform an operation.

2. The method according to claim 1, characterized in that: The method further comprises: In the case where it is determined that the user operation is an invalid user operation, the operation of performing event monitoring on the user operation through the monitoring module is returned to execution.

3. The method according to claim 2, characterized in that The method further comprises: When the monitoring module monitors the first user operation, the timing module performs a second idle timing; In the case where the monitoring module monitors the second user operation, determining a second current idle time according to the second idle timing result; In the case where it is determined that the second current idle time reaches a second preset time threshold, determining the second user operation as the valid user operation; When it is determined that the second current idle time does not reach the second preset time threshold, the second user operation is determined as the invalid user operation.

4. The method according to claim 1, characterized in that: The method further comprises: When it is determined that the client connection is successful, the timing module performs a third idle timing, and determines a third current idle time according to the third idle timing result; When the monitoring module does not monitor the user operation and the third current idle time exceeds the first preset time threshold, the client connection is disconnected.

5. The method according to claim 4, characterized in that Before the first idle timing is performed by the timing module, the method further includes: Sending a reset timing instruction to the timing module through the monitoring module; The third current idle time is updated to a preset time value through the timing module according to the reset timing instruction.

6. The method according to claim 1, characterized in that Before the monitoring module monitors the user operation event, the method further includes: Determine a monitoring object; wherein the monitoring object includes a browser page and / or an application page; The monitoring of user operations by the monitoring module includes: The monitoring module is used to monitor the user operation in the monitoring object.

7. The method according to any one of claims 1 to 6, characterized in that: The user operation includes at least one of a mouse click event, a keyboard input event, a mouse slide event, a mouse wheel scroll event, and a screen touch event.

8. A page idle detection device, characterized in that: include: The monitoring module is used to monitor the user operation events when the client connection is successful; A timing module, configured to perform a first idle timing when it is determined that the user operation is a valid user operation; In the case where it is determined that the user operation is an invalid user operation, the first idle timing is not performed by the timing module; wherein the user operation includes a valid user operation and an invalid user operation, the invalid user operation is a user operation with an operation frequency greater than a preset operation frequency threshold; the valid user operation is a user operation with an operation frequency less than a preset operation frequency threshold; wherein the first idle timing is used to record the idle time, the idle time is the time when the user does not perform an operation, and the operation frequency is the frequency of the user performing an operation; The timing module is also used to determine the first current idle time according to the first idle timing result, and disconnect the client connection when the first current idle time exceeds the first preset time threshold; wherein the first preset time threshold is a preset maximum time threshold during which the user has not performed any operation.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page idle detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page idle detection method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Webpage timeout automatic logout method and system, terminal and storage medium

    CN112272204A

  • Method for automatically renewing token at web front end

    CN114218513A