Event monitoring method, device, medium and electronic device
By predicting the mouse movement path, only event monitoring is enabled for predicted resource blocks, which solves the performance degradation caused by event monitoring of multi-resource blocks and improves the user experience.
Patent Information
- Application Number
- CN202111435903.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-11-29
AI Technical Summary
In the visual interface, event monitoring of multiple resource blocks causes performance degradation and affects the user experience.
Obtain the mouse position by the preset interval, determine the mouse movement direction and speed, predict the collection of resource blocks that the mouse will pass through, and only enable mouse event monitoring for the predicted resource block, and other resource blocks remain closed.
It realizes the matching between resource block event listening and user operations, reduces invalid event listening, and improves performance and user experience.
Smart Images

Figure CN114115562B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an event monitoring method, device, medium and electronic device. Background Art
[0002] Currently, in the visualization field, visualization interfaces are increasingly used, which also raises the requirements for the production of visualization interfaces. In related technologies, in order to produce a visualization interface, it is usually necessary to use dozens or even hundreds of freely draggable resource blocks in the interface, and to improve the interactive experience of the visualization interface for users by setting the combination and response between different resource blocks.
[0003] When editing a resource block, if the mouse moves in the editing area, each resource block in the editing interface needs to respond to the mouse's suspension time, and the resource block can also be configured with multiple attributes and monitor mouse events at the same time. If there are many resource blocks in the editing interface, there will be too many event monitors, which will seriously affect the performance of the device. Summary of the invention
[0004] The purpose of the present disclosure is to provide a dynamic and accurate event monitoring method, device, medium and electronic device, so that the event monitoring of the resource block in the target interface matches the user operation.
[0005] In order to achieve the above object, according to a first aspect of the present disclosure, an event monitoring method is provided, the method comprising:
[0006] Get the mouse position corresponding to the current time period in the target interface at preset intervals;
[0007] Determine the direction and speed of mouse movement based on the mouse positions obtained in the current period and the previous period;
[0008] Determine a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are resource blocks predicted to be passed by the mouse in the next time period;
[0009] When the target resource block set is a non-empty set, the mouse event monitoring of the target resource block is controlled to be in an on state, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
[0010] Optionally, determining a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period includes:
[0011] Determining a predicted trajectory of the mouse in a next time period according to the moving direction, the moving speed, and the mouse position obtained in the current time period;
[0012] A target resource block set corresponding to the target interface is determined according to the predicted trajectory.
[0013] Optionally, determining a target resource block set corresponding to the target interface according to the predicted trajectory includes:
[0014] Determining an endpoint position corresponding to the predicted trajectory;
[0015] If the end point is outside the target interface, determining that the target resource block set is empty;
[0016] If the end point position is within the target interface, the resource blocks in the target interface that overlap with the predicted trajectory are added to the target resource block set.
[0017] Optionally, the determining, according to the moving direction, the moving speed and the mouse position obtained in the current time period, a target resource block set corresponding to the target interface in a next time period further includes:
[0018] Determine the magnitude relationship between the moving speed and a preset speed threshold;
[0019] If the moving speed is less than the speed threshold, the step of determining the predicted trajectory of the mouse in the next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period is performed;
[0020] If the moving speed is not less than the speed threshold, it is determined that the target resource block set corresponding to the next time period is empty.
[0021] Optionally, the method further comprises:
[0022] Determining the number of resource blocks in the target interface;
[0023] The preset time interval obtains the mouse position corresponding to the current time period in the target interface, including:
[0024] When the number of resource blocks exceeds a preset number threshold, the mouse position corresponding to the current time period in the target interface is obtained at preset time intervals.
[0025] Optionally, the method further comprises:
[0026] When the target resource block set is empty, the mouse event monitoring of each resource block in the target interface is kept in a closed state.
[0027] Optionally, the method further comprises:
[0028] When the target resource block set is a non-empty set, the mouse event monitoring of the resource blocks other than the target resource block in the target interface is controlled to be in a closed state.
[0029] According to a second aspect of the present disclosure, an event monitoring device is provided, the device comprising:
[0030] An acquisition module is used to obtain the mouse position corresponding to the current time period in the target interface at preset intervals;
[0031] A first determination module, used to determine the moving direction and moving speed of the mouse according to the mouse positions obtained in the current period and the previous period;
[0032] A second determination module is used to determine a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are resource blocks predicted to be passed by the mouse in the next time period;
[0033] The first control module is used to control the mouse event monitoring of the target resource block to be in an on state when the target resource block set is a non-empty set, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
[0034] According to a third aspect of the present disclosure, there is provided a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0035] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0036] a memory having a computer program stored thereon;
[0037] A processor is used to execute the computer program in the memory to implement the steps of any method described in the first aspect.
[0038] In the above technical solution, the mouse position corresponding to the current time period in the target interface is obtained at intervals of preset duration, and the moving direction and moving speed of the mouse can be determined according to the mouse positions obtained in the current time period and the previous time period, and then the resource blocks that the mouse passes through in the target interface in the next time period can be predicted according to the moving direction, the moving speed and the mouse position obtained in the current time period, so as to control the mouse event monitoring of the target resource block to be in an open state, and the mouse event monitoring of each resource block in the target interface is initially closed. Therefore, through the above technical solution, the resource blocks that the mouse may pass through in the future time period can be predicted by detecting the moving position of the mouse in real time, so that the mouse event monitoring of this part of the resource blocks can be controlled to be in an open state, and the monitoring of the mouse events by this part of the resource blocks can be realized, so that the event monitoring of the resource blocks in the target interface matches the user operation. At the same time, it can avoid the monitoring of mouse events by all resource blocks in the interface during the mouse movement process, reduce the number of invalid mouse monitoring events, reduce the occupation of resources and performance by event monitoring in the interface, and also improve the response of the target resource block to mouse events to a certain extent, and ensure the user experience.
[0039] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0041] Figure 1 is a flow chart of an event monitoring method provided according to an embodiment of the present disclosure;
[0042] Figure 2 is a schematic diagram of constructing a coordinate system of a target interface provided according to an embodiment of the present disclosure;
[0043] Figure 3 is a schematic diagram of a target interface provided according to an embodiment of the present disclosure;
[0044] Figure 4 is a statistical diagram of monitoring data of mouse operation tracks provided according to an embodiment of the present disclosure;
[0045] Figure 5 is a block diagram of an event monitoring device provided according to an embodiment of the present disclosure;
[0046] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0047] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0048] Figure 1 As shown, it is a flow chart of an event monitoring method provided according to an embodiment of the present disclosure. Figure 1 As shown, the method may include:
[0049] In step 11, the mouse position corresponding to the current time period in the target interface is obtained at preset time intervals.
[0050] The preset duration can be set according to the actual application scenario or user operation behavior, and the present disclosure does not limit this. For example, a coordinate system is constructed in advance for the target interface, such as Figure 2 As shown, a two-dimensional rectangular coordinate system can be constructed with the point in the lower left corner of the target interface U as the origin O. Then, after the interval time reaches the preset time length, the mouse position corresponding to the current time period in the target interface can be determined. The mouse position corresponding to the current time period can be the mouse position at the end time corresponding to the current time period. The mouse position can be represented by two-dimensional coordinates such as (Xi, Yi).
[0051] In step 12, the moving direction and moving speed of the mouse are determined according to the mouse positions obtained in the current period and the previous period.
[0052] In order to ensure the real-time performance of mouse position detection, the preset duration is usually set shorter, such as 20ms. Figure 2 As shown, the mouse position corresponding to the current period is P1 (X1, Y1), and the mouse position corresponding to the previous period is P0 (X0, Y0), that is, the mouse position obtained at 0ms is P0 (X0, Y0), and the mouse position obtained at 20ms is P1 (X1, Y1).
[0053] In this embodiment, the direction in which the mouse position obtained in the previous time period points to the mouse position obtained in the current time period can be used as the moving direction, and the moving speed V can be determined according to the distance L between the mouse positions obtained in the current time period and the previous time period and the preset time length T. The moving speed can be the ratio of the distance to the preset time length, that is, the moving speed V is L / T.
[0054] In step 13, the target resource block set corresponding to the target interface in the next time period is determined based on the moving direction, moving speed and mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are the resource blocks that the mouse is predicted to pass in the next time period.
[0055] Among them, the resource block in the target interface can be a graphic block used to configure multiple resources. The resources can include pictures, icons, texts, dynamic charts, clocks, special effects components, borders, etc. The image block can be, for example, a rectangular block, a circular block or a user-defined graphic block, which will not be elaborated here.
[0056] In step 14, when the target resource block set is a non-empty set, the mouse event monitoring of the target resource block is controlled to be in an on state, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
[0057] Among them, the mouse event monitoring of each resource block in the target interface is initially in a closed state. When the target resource block set is a non-empty set, the mouse event monitoring of the target resource block can be controlled to be in an open state so as to respond according to the movement of the mouse, that is, the mouse event monitoring is turned on as needed according to the actual movement of the mouse. As an example, the mouse event monitoring of the target resource block is controlled to be in an open state, that is, for the resource block whose mouse event monitoring is in an open state, it is kept in an open state, and for the resource block whose mouse event monitoring is in an closed state, the mouse event monitoring is controlled to be turned on.
[0058] In the above technical solution, the mouse position corresponding to the current time period in the target interface is obtained at intervals of preset duration, and the moving direction and moving speed of the mouse can be determined according to the mouse positions obtained in the current time period and the previous time period, and then the resource blocks that the mouse passes through in the target interface in the next time period can be predicted according to the moving direction, the moving speed and the mouse position obtained in the current time period, so as to control the mouse event monitoring of the target resource block to be in an open state, and the mouse event monitoring of each resource block in the target interface is initially closed. Therefore, through the above technical solution, the resource blocks that the mouse may pass through in the future time period can be predicted by detecting the moving position of the mouse in real time, so that the mouse event monitoring of this part of the resource blocks can be controlled to be in an open state, and the monitoring of the mouse events by this part of the resource blocks can be realized, so that the event monitoring of the resource blocks in the target interface matches the user operation. At the same time, it can avoid the monitoring of mouse events by all resource blocks in the interface during the mouse movement process, reduce the number of invalid mouse monitoring events, reduce the occupation of resources and performance by event monitoring in the interface, and also improve the response of the target resource block to mouse events to a certain extent, and ensure the user experience.
[0059] When the duration of mouse event monitoring of a resource block being turned on reaches the monitoring duration and the resource block is not currently determined as a target resource block, the mouse event monitoring is controlled to be turned off to reduce the number of invalid mouse monitoring events.
[0060] In a possible embodiment, the method may further include:
[0061] When the target resource block set is a non-empty set, the mouse event monitoring of the resource blocks other than the target resource block in the target interface is controlled to be in a closed state.
[0062] As described above, when the target resource block set is a non-empty set, the mouse event monitoring of the target resource block therein can be controlled to be in an on state. For the resource blocks whose mouse event monitoring is in an on state in the current period, it may not be necessary to continue to remain in an on state in the next period. Therefore, in this embodiment, when the target resource block set is a non-empty set, the mouse event monitoring of the resource blocks other than the target resource block in the target interface can be controlled to be in an off state, that is, for the resource blocks whose mouse event monitoring is in an on state, the mouse event monitoring is controlled to be off, and for the resource blocks whose mouse event monitoring is in an off state, the mouse event monitoring can be kept in an off state.
[0063] Therefore, through the above technical solution, when the target resource block in the next time period is determined, the mouse event monitoring of other resource blocks in the target interface except the target resource block can be controlled to be in a closed state, thereby further reducing the number of resource blocks for mouse event monitoring in the target interface, reducing the occupancy of mouse event monitoring on device performance, and saving device resources.
[0064] In a possible embodiment, the exemplary implementation method of determining the target resource block set corresponding to the target interface in the next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period may include:
[0065] The predicted trajectory of the mouse in the next time period is determined according to the moving direction, the moving speed and the mouse position obtained in the current time period.
[0066] In this embodiment, in order to ensure the real-time nature of the mouse position, the preset time length is usually set to be relatively small, so the movement trajectories of the mouse in adjacent time periods are usually similar. Based on this, in the present disclosure, the moving direction determined in the current time period can be used as the moving direction of the mouse in the next time period, and the moving speed determined in the current time period can be used as the moving speed of the mouse in the next time period, so that the predicted trajectory of the mouse can be determined, that is, the line obtained by taking the mouse position obtained in the current time period as the starting point and moving in the moving direction at the moving speed for the preset time length as the predicted trajectory, such as Figure 2 As shown by the dotted line from P1 to M.
[0067] A target resource block set corresponding to the target interface is determined according to the predicted trajectory.
[0068] Among them, after constructing a coordinate system for the target interface, the corresponding coordinates of the positions of each resource block in the target interface can be determined from the coordinate system. For example, the layout of each resource block can be obtained from the layout structure information of the target interface, and then the coordinates are determined according to the layout of each resource block and the positional relationship with the boundary of the target interface. For example, the coordinates of the boundary line of each resource block can be determined, so that the coordinate position of each resource block can be determined. Among them, the method of determining the position of elements in the interface can be implemented by the commonly used position detection method in the field, and the present disclosure does not limit this. As an example, the resource blocks in the target interface that overlap with the predicted trajectory can be directly used as target resource blocks and added to the target resource block set. Figure 2 As shown, resource blocks Z2 and Z3 may be determined as target resource blocks and added to the target resource block set.
[0069] Therefore, through the above technical scheme, the trajectory of the mouse in the next time period can be predicted to obtain the predicted trajectory, so that the resource block that overlaps with the predicted trajectory can be directly determined as the resource block passed by the mouse. The efficiency and accuracy of determining the target resource block can be improved through position determination, and data support can be provided for the status of mouse event monitoring for subsequent control of the target resource block. It also meets the application scenario requirements of mouse movement and improves the scope of application of the event monitoring method.
[0070] As another example, an exemplary implementation of determining a target resource block set corresponding to the target interface according to the predicted trajectory is as follows, and this step may include:
[0071] Determine the end position corresponding to the predicted trajectory, wherein the final position corresponding to the movement of the determined predicted trajectory can be determined as the end position, such as Figure 2 The M in.
[0072] If the end point position is outside the target interface, it is determined that the target resource block set is empty.
[0073] Among them, Figure 3 The target interface shown, where S1 is the mouse position obtained in the current period, and S2 is the end position corresponding to the predicted trajectory in the next period. Afterwards, the coordinates of the end position can be compared with the position range of the target interface to determine whether the end position belongs to the position range of the target interface. If the coordinates of the end position belong to the position range of the target interface, it is determined that the end position is within the target interface. If the coordinates of the end position do not belong to the position range of the target interface, it is determined that the end position is outside the target interface.
[0074] Among them, in actual application scenarios, if the user actually moves the mouse to operate the resource block in the target interface, the moving speed is usually not too fast, so that the user can prepare to select the corresponding resource block, and the resource block is generally a certain distance away from the edge of the target interface, and the position of the mouse generally does not exceed the range of the target interface. In actual application scenarios, when the user does not intend to operate on the resource block, he may also operate the mouse to move. For example, the user can slide the mouse at will to quickly find the position of the mouse in the target interface. In this case, the user's mouse movement range is relatively large; or the user quickly moves the mouse to the fixed button in the menu bar, such as the corresponding buttons of minimize window, close window, etc., and the fixed button is usually at the edge of the target interface. Therefore, when the user performs this type of mouse operation, when the trajectory of the next time period is predicted directly according to the moving speed corresponding to the current time period, the end point of the predicted trajectory may be outside the target interface.
[0075] As mentioned above, if the end position is outside the target interface, it means that the user's operation is not a mouse operation on the resource block in the target interface. At this time, the target resource block set can be directly determined to be empty to match the user's actual operation.
[0076] If the end point position is within the target interface, the resource blocks in the target interface that overlap with the predicted trajectory are added to the target resource block set.
[0077] Among them, if the end position is within the target interface, it means that the user's mouse operation at this time may be an operation on the resource block in the target interface. At this time, the corresponding target resource block can be determined according to the predicted trajectory. The method for determining the resource block in the target interface that overlaps with the predicted trajectory has been described in detail above and will not be repeated here.
[0078] Therefore, through the above technical solution, the user's real intention of operating the mouse in the target interface can be analyzed by predicting the end point position of the trajectory, so as to further determine the resource blocks in the target interface that need to enable mouse event monitoring based on the user's intention. While ensuring the accuracy of mouse event monitoring and response in the target interface, it can match the user's actual mouse operation and improve the user experience.
[0079] In a possible embodiment, the exemplary implementation method of determining the target resource block set corresponding to the target interface in the next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period is as follows, and this step may also include:
[0080] Determine the magnitude relationship between the moving speed and a preset speed threshold.
[0081] The preset speed threshold can be set according to the actual application scenario. For example, when a user performs an editing operation in the target interface, the data of the mouse operation trajectory of multiple people is monitored. Figure 4 As shown, the horizontal axis represents the mouse movement speed and the vertical axis represents the proportion. Specifically, when the user edits the resource block in the target interface, the mouse movement speed is usually within 1px / ms (pixel / millisecond), and usually does not exceed 5px / ms. When the mouse movement speed is higher than 10px / ms, the movement trajectory of the mouse is basically sliding outward, usually corresponding to specific operations, such as minimizing the window, closing the browser, or dragging the browser to the edge of the target interface. Therefore, the preset speed threshold can be set based on the determined monitoring data, and the speed threshold for other application scenarios can also be determined by scene monitoring, which will not be repeated here.
[0082] If the moving speed is less than the speed threshold, the step of determining the predicted trajectory of the mouse in the next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period is performed.
[0083] For example, if the moving speed is less than the speed threshold, it means that the user's mouse operation in the target interface is an operation on the resource block in the target interface. At this time, the predicted trajectory of the mouse in the next time period can be determined based on the moving direction, moving speed and mouse position to further determine the target resource block.
[0084] If the moving speed is not less than the speed threshold, it is determined that the target resource block set corresponding to the next time period is empty.
[0085] If the moving speed is not less than the speed threshold, it means that the mouse operation performed by the user in the target interface is not an operation on the resource block in the target interface. At this time, it can be directly determined that the target resource block set corresponding to the next time period is empty. In this way, the monitoring and response of the mouse operation in the target page can be matched with the actual operation of the user, and the occupation of device resources and performance can also be saved.
[0086] In a possible embodiment, the method may further include:
[0087] The number of resource blocks in the target interface is determined, wherein the number of resource blocks in the target interface can be determined by acquiring the layout information or layout code of the target interface, which will not be described in detail here.
[0088] An exemplary implementation of obtaining the mouse position corresponding to the current time period in the target interface at intervals of a preset time length is as follows. This step may include:
[0089] When the number of resource blocks exceeds a preset number threshold, the mouse position corresponding to the current time period in the target interface is obtained at preset time intervals.
[0090] Among them, the quantity threshold can be set according to the actual performance of the device. For example, if the device performance is good, the quantity threshold can be set larger. If the device performance is insufficient, the quantity threshold can be set smaller. Therefore, through the above technical solution, when the number of resource blocks in the target interface is small, turning on all mouse event monitoring has little impact on the device performance. At this time, there is no need to determine the target resource block based on the mouse movement trajectory. When there are many resource blocks in the target interface, it is easy to generate more invalid mouse event monitoring, and too many resource blocks for mouse event monitoring in the target interface will also increase the occupation of device resources and performance. At this time, the position of the mouse can be monitored to screen the resource blocks that need to be monitored for mouse events in the target interface, which fits the actual application scenario, and can be applied to devices with low resources and performance, broadening the scope of application of the event monitoring method and improving the user experience.
[0091] In a possible embodiment, the method may further include:
[0092] When the target resource block set is empty, the mouse event monitoring of each resource block in the target interface is kept in a closed state.
[0093] As described above, if the determined target resource block set is empty, it means that the user's current mouse operation may be to slide the mouse randomly so that the user can quickly find the position of the mouse in the target interface, or it may be an operation on a fixed button in the menu bar, such as minimizing the window, closing the window, etc., and it is not an operation related to the resource block in the target interface. Therefore, in this embodiment, when the target resource block set is empty, the mouse event monitoring of each resource block in the target interface is kept in a closed state. In this way, when the user performs mouse operations unrelated to the resource block in the target interface, the monitoring and response of the corresponding mouse operations of the resource block can be avoided, which saves device resources while avoiding the influence of the mouse event monitoring and response of the resource block on the user's actual operation, which meets the user's usage needs.
[0094] The present disclosure also provides an event monitoring device, such as Figure 5 As shown, the device 10 comprises:
[0095] The acquisition module 100 is used to acquire the mouse position corresponding to the current time period in the target interface at intervals of a preset time;
[0096] A first determination module 200, for determining a moving direction and a moving speed of the mouse according to the mouse positions obtained in the current period and the previous period;
[0097] A second determination module 300 is used to determine a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are resource blocks predicted to be passed by the mouse in the next time period;
[0098] The first control module 400 is used to control the mouse event monitoring of the target resource block to be in an on state when the target resource block set is a non-empty set, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
[0099] Optionally, the second determining module includes:
[0100] A first determination submodule, configured to determine a predicted trajectory of the mouse in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period;
[0101] The second determination submodule is used to determine a target resource block set corresponding to the target interface according to the predicted trajectory.
[0102] Optionally, determining a target resource block set corresponding to the target interface according to the predicted trajectory includes:
[0103] A third determination submodule is used to determine the end point position corresponding to the predicted trajectory;
[0104] A fourth determination submodule, configured to determine that the target resource block set is empty if the end point position is outside the target interface;
[0105] The fifth determination submodule is used to add the resource blocks in the target interface that overlap with the predicted trajectory to the target resource block set if the end position is within the target interface.
[0106] Optionally, the second determining module further includes:
[0107] a sixth determination submodule, configured to determine a magnitude relationship between the moving speed and a preset speed threshold, and, when the moving speed is less than the speed threshold, trigger the first determination submodule to determine a predicted trajectory of the mouse in a next time period according to the moving direction, the moving speed, and the mouse position obtained in the current time period;
[0108] The seventh determination submodule is used to determine that the target resource block set corresponding to the next time period is empty if the moving speed is not less than the speed threshold.
[0109] Optionally, the device further comprises:
[0110] A third determination module, used to determine the number of resource blocks in the target interface;
[0111] The acquisition module is used for:
[0112] When the number of resource blocks exceeds a preset number threshold, the mouse position corresponding to the current time period in the target interface is obtained at preset time intervals.
[0113] Optionally, the device further comprises:
[0114] The second control module is used to keep the mouse event monitoring of each resource block in the target interface in a closed state when the target resource block set is empty.
[0115] Optionally, the device further comprises:
[0116] The third control module is used to control the mouse event monitoring of resource blocks other than the target resource block in the target interface to be in a closed state when the target resource block set is a non-empty set.
[0117] 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.
[0118] Figure 6 FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Figure 6 As shown, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0119] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned event monitoring method. The memory 702 is used to store various types of data to support the operation of the electronic device 700, and these data may include, for example, instructions for any application or method used to operate on the electronic device 700, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module, etc.
[0120] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned event monitoring method.
[0121] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned event monitoring method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned event monitoring method.
[0122] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0123] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0124] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. An event monitoring method, characterized in that: The method comprises: Get the mouse position corresponding to the current time period in the target interface at preset intervals; Determine the direction and speed of mouse movement based on the mouse positions obtained in the current period and the previous period; Determine a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are resource blocks predicted to be passed by the mouse in the next time period; When the target resource block set is a non-empty set, the mouse event monitoring of the target resource block is controlled to be in an on state, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
2. The method according to claim 1, characterized in that The determining, according to the moving direction, the moving speed, and the mouse position obtained in the current time period, a target resource block set corresponding to the target interface in the next time period includes: Determining a predicted trajectory of the mouse in a next time period according to the moving direction, the moving speed, and the mouse position obtained in the current time period; A target resource block set corresponding to the target interface is determined according to the predicted trajectory.
3. The method according to claim 2, characterized in that The step of determining a target resource block set corresponding to the target interface according to the predicted trajectory includes: Determining an endpoint position corresponding to the predicted trajectory; If the end point is outside the target interface, determining that the target resource block set is empty; If the end point position is within the target interface, the resource blocks in the target interface that overlap with the predicted trajectory are added to the target resource block set.
4. The method according to claim 2, characterized in that: The step of determining a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period further includes: Determine the magnitude relationship between the moving speed and a preset speed threshold; If the moving speed is less than the speed threshold, the step of determining the predicted trajectory of the mouse in the next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period is performed; If the moving speed is not less than the speed threshold, it is determined that the target resource block set corresponding to the next time period is empty.
5. The method according to claim 1, characterized in that The method further comprises: Determining the number of resource blocks in the target interface; The preset time interval obtains the mouse position corresponding to the current time period in the target interface, including: When the number of resource blocks exceeds a preset number threshold, the mouse position corresponding to the current time period in the target interface is obtained at preset time intervals.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the target resource block set is empty, the mouse event monitoring of each resource block in the target interface is kept in a closed state.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the target resource block set is a non-empty set, the mouse event monitoring of the resource blocks other than the target resource block in the target interface is controlled to be in a closed state.
8. An event monitoring device, characterized in that: The device comprises: An acquisition module is used to obtain the mouse position corresponding to the current time period in the target interface at preset intervals; A first determination module, used to determine the moving direction and moving speed of the mouse according to the mouse positions obtained in the current period and the previous period; A second determination module is used to determine a target resource block set corresponding to the target interface in a next time period according to the moving direction, the moving speed and the mouse position obtained in the current time period, wherein the target resource blocks in the target resource block set are resource blocks predicted to be passed by the mouse in the next time period; The first control module is used to control the mouse event monitoring of the target resource block to be in an on state when the target resource block set is a non-empty set, wherein the mouse event monitoring of each resource block in the target interface is initially in a off state.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
