Mouse event monitoring processing method and device, electronic device and storage medium

By overwriting the mouse event monitoring layer on the rendering screen layer of the terminal, listening to touchstart and touchend events to simulate the left mouse button operation, and sending other mouse event data to the cloud server, the problem of inconvenient mouse operation when users control x86 cloud applications is solved, and efficient control of x86 cloud applications is achieved.

CN119225615BActive Publication Date: 2025-04-04BEIJING HAIYUDONGXIANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411774135.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-04
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The prior art is difficult to improve the convenience of users to operate x86 cloud applications by running mobile devices that are not specific iOS system versions, especially inconvenience in mouse operation.

Method used

By overwriting the mouse event monitoring layer on the rendering screen layer of the terminal, listening to touchstart and touchend events to simulate the pressing and lifting of the left mouse button, and sending data of other mouse events to the cloud server to achieve manipulation of x86 cloud applications.

Benefits of technology

Accurate control of x86 cloud applications running in cloud servers is achieved, and the convenience of users to control x86 cloud applications through mobile devices that are not specific iOS system versions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225615B_ABST
    Figure CN119225615B_ABST
Patent Text Reader

Abstract

The present application provides a mouse event monitoring and processing method and device, an electronic device and a storage medium, the method comprising: when the mouse event monitoring layer monitors a touchstart event, sending the left mouse button pressed event data to the cloud server; and when the mouse event monitoring layer monitors a touchend event, sending the left mouse button lifted event data to the cloud server; when the mouse event monitoring layer monitors other mouse events except the touchstart event, the touchend event, the mousedown event triggered when the left mouse button is lifted, and the mouseup event triggered when the left mouse button is lifted, sending the event data corresponding to the other mouse events to the cloud server, wherein the mouse event monitoring layer is covered on the touch input layer on the rendering screen layer of the terminal, and is used to monitor mouse events, which can improve the convenience of users controlling x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud applications, and in particular to a mouse event monitoring and processing method and device, an electronic device and a storage medium. Background Art

[0002] Cloud applications (such as cloud games) are an emerging online application model that places application rendering, processing, and running processes on remote cloud servers and transmits application screens to user devices, allowing users to enjoy high-quality application experience on various devices without the need for high-performance hardware support.

[0003] Currently, cloud applications usually run on ARM platforms or x86 platforms. Cloud applications running on the x86 platform (hereinafter referred to as x86 cloud applications) are host applications, which have the characteristics of exquisite graphics, smooth animations and complex operations, and therefore require more complex and delicate operations. At present, most cloud application users use mobile devices for input. In the mobile input mode, the operation mainly relies on the touch of fingers. However, due to the high complexity of x86 cloud application operations, fingers cannot conveniently control the application, and the mouse operation is required to better experience x86 cloud applications. However, the system API for the mouse provided by the iOS system provider currently only supports specific types of mobile devices running specific iOS system versions, which makes it very inconvenient for users to control x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices.

[0004] Therefore, how to provide a solution to improve the convenience for users to control x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the technical problems existing in the prior art, the embodiments of the present application provide a mouse event monitoring and processing method and device, an electronic device and a storage medium.

[0006] In a first aspect, an embodiment of the present application provides a method for monitoring and processing a mouse event, comprising:

[0007] When the mouse event monitoring layer monitors the touchstart event, the left mouse button is pressed event data is sent to the cloud server; and when the mouse event monitoring layer monitors the touchend event, the left mouse button is lifted event data is sent to the cloud server;

[0008] When the mouse event monitoring layer monitors other mouse events except the touchstart event, the touchend event, the mousedown event triggered when the left mouse button is lifted, and the mouseup event triggered when the left mouse button is lifted, the event data corresponding to the other mouse events are sent to the cloud server, wherein the mouse event monitoring layer is overlaid on the touch input layer on the rendering picture layer of the terminal, and is used to monitor mouse events.

[0009] In a second aspect, an embodiment of the present application further provides a mouse event monitoring and processing device, comprising:

[0010] The first monitoring unit is used to send the left mouse button pressed event data to the cloud server when the mouse event monitoring layer monitors the touchstart event; and send the left mouse button lifted event data to the cloud server when the mouse event monitoring layer monitors the touchend event;

[0011] The second monitoring unit is used to send event data corresponding to other mouse events to the cloud server when the mouse event monitoring layer monitors other mouse events except touchstart event, touchend event, mousedown event triggered when the left mouse button is lifted, and mouseup event triggered when the left mouse button is lifted, wherein the mouse event monitoring layer is overlaid on the touch input layer on the rendering picture layer of the terminal and is used to monitor mouse events.

[0012] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the mouse event monitoring processing method described in the first aspect are executed.

[0013] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the mouse event monitoring processing method described in the first aspect.

[0014] In summary, the mouse event monitoring processing method and device, electronic device and storage medium provided in the embodiments of the present application monitor mouse events through the mouse event monitoring layer on the touch input layer covered on the rendering screen layer of the terminal, monitor operations on the left mouse button with the help of touchstart events and touchend events, and monitor other operations on the mouse with the help of other mouse events except touchstart events, touchend events, mousedown events triggered when the left mouse button is lifted, and mouseup events triggered when the left mouse button is lifted. In this way, when the scheme is applied to iOS devices that are not supported by the system API for the mouse, the mouse control input can be accurately identified, and the corresponding event data can be sent to the cloud server, thereby realizing the control of the x86 cloud application running in the cloud server, that is, it can improve the convenience of users controlling x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flowchart of an embodiment of a mouse event monitoring processing method provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of the structure of an embodiment of a mouse event monitoring and processing device provided in an embodiment of the present application;

[0017] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0019] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0020] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0021] Reference Figure 1 As shown, an embodiment of the present application provides a flowchart of a mouse event monitoring processing method, and the mouse event monitoring processing method includes:

[0022] S10, when the mouse event monitoring layer monitors a touchstart event, sending the left mouse button pressed event data to the cloud server; and when the mouse event monitoring layer monitors a touchend event, sending the left mouse button lifted event data to the cloud server;

[0023] In this embodiment, it should be noted that the mouse event monitoring layer may include a transparent WebView control for carrying web pages, the WebView control is overlaid on the touch input layer on the rendering screen layer of the terminal, and the WebView control is loaded with H5 web page code, and the H5 web page code is used to monitor mouse events. The WebView control covers the entire rendering screen area of ​​the terminal. When the user presses the left button of the mouse connected to the terminal in the WebView control area, a touchstart event is triggered. When the user lifts the left button of the mouse connected to the terminal in the WebView control area, a touchend event, mousedown event, and mouseup event are triggered. In order to realize the cloud application's response to operations such as long pressing the left mouse button, the mousedown event and mouseup event triggered by lifting the left mouse button cannot be used. The touchstart event and touchend event need to be used. Specifically, when the H5 web page code monitors the touchstart event triggered by pressing the left mouse button, it is determined that the left mouse button is pressed, and the left mouse button press event data is sent to the cloud server at this time; when the H5 web page code monitors the touchend event triggered by lifting the left mouse button, it is determined that the left mouse button is lifted, and the left mouse button lift event data is sent to the cloud server at this time, while the mousedown event and mouseup event triggered by lifting the left mouse button need to be ignored. The mouse operations that trigger the generation of mousedown events and mouseup events can be distinguished by type. The left mouse button pressed event data may include a key-value pair consisting of a left mouse button identifier and a pressed identifier, and in addition, may also include: a trigger position corresponding to a touchstart event, which is a trigger position on the terminal screen (pressing the left mouse button at this trigger position triggers the touchstart event) or is obtained by converting the trigger position on the terminal screen; the left mouse button lifted event data may include a key-value pair consisting of a left mouse button identifier and a lifted identifier, and in addition, may also include: a trigger position corresponding to a touchend event, which is a trigger position on the terminal screen (lifting the left mouse button at this trigger position triggers the touchend event) or is obtained by converting the trigger position on the terminal screen. For the conversion of the trigger position, assuming that the trigger position coordinates before the conversion are (x1, y1) and the trigger position coordinates after the conversion are (x2, y2), then x2=x1×(W2 / W1), y2=y1×(H2 / H1), where W1 and W2 are the width of the cloud application screen rendered and displayed by the terminal and the width of the cloud application screen rendered by the cloud server, respectively, and H1 and H2 are the height of the cloud application screen rendered and displayed by the terminal and the height of the cloud application screen rendered by the cloud server, respectively. The cloud application screen rendered by the cloud server has the same aspect ratio as the cloud application screen rendered and displayed by the terminal.It should be noted that if the left mouse button pressed event data / left mouse button lifted event data contains the trigger position on the terminal screen, after the left mouse button pressed event data / left mouse button lifted event data is sent to the cloud server, the cloud server will convert the trigger position on the terminal screen. The conversion process can refer to the conversion formula of the trigger position coordinates mentioned above. After receiving the left mouse button pressed event data / left mouse button lifted event data, the cloud server sends the left mouse button pressed event data / left mouse button lifted event data to the cloud server system, or converts the left mouse button pressed event data / left mouse button lifted event data into data recognizable by the cloud server system and then sends it to the cloud server system to drive the cloud application to run. The conversion process includes: through the correspondence between the identifiers, converting the left mouse button identifier in the left mouse button pressed event data / left mouse button lifted event data into a left mouse button identifier recognizable by the cloud server system and / or converting the pressed identifier / lifted identifier in the left mouse button pressed event data / left mouse button lifted event data into a pressed identifier / lifted identifier recognizable by the cloud server system. In other words, the data finally sent to the cloud server system includes the left mouse button identifier, the pressed identifier / lifted identifier, and the trigger position.

[0024] S11. When the mouse event monitoring layer monitors other mouse events except the touchstart event, the touchend event, the mousedown event triggered when the left mouse button is lifted, and the mouseup event triggered when the left mouse button is lifted, the event data corresponding to the other mouse events are sent to the cloud server, wherein the mouse event monitoring layer is overlaid on the touch input layer on the rendering picture layer of the terminal, and is used to monitor mouse events.

[0025] In this embodiment, it should be noted that when the user presses the right button of the mouse connected to the terminal in the WebView control area, a mousedown event will be triggered. When the H5 web page code monitors the mousedown event triggered by pressing the right button of the mouse, it is necessary to send the right button press event data to the cloud server. The right button press event data may include a key-value pair consisting of a right button identifier and a press identifier. In addition, it may also include: a trigger position corresponding to the mousedown event, which is the trigger position on the terminal screen (pressing the right button of the mouse at this trigger position triggers a mousedown event) or the trigger position on the terminal screen is converted. The conversion process can refer to the aforementioned trigger The conversion formula of the trigger position coordinates; when the user lifts the right button of the mouse connected to the terminal in the WebView control area, a mouseup event will be triggered. When the H5 web page code monitors the mouseup event triggered by lifting the right button of the mouse, it is necessary to send the mouseup event data to the cloud server. The mouseup event data may include a key-value pair consisting of a right button identifier and a lift identifier. In addition, it may also include: the trigger position corresponding to the mouseup event, which is the trigger position on the terminal screen (lifting the right button of the mouse at this trigger position triggers the mouseup event) or the trigger position on the terminal screen is converted. The conversion process can refer to the conversion formula of the trigger position coordinates mentioned above. It should be noted that if the mouse right button press event data / mouse right button lift event data contains the trigger position on the terminal screen, then after sending the mouse right button press event data / mouse right button lift event data to the cloud server, the cloud server will convert the trigger position on the terminal screen. The conversion process can refer to the conversion formula of the trigger position coordinates mentioned above. After receiving the right-button-down event data / right-button-up event data, the cloud server sends the right-button-down event data / right-button-up event data to the cloud server system, or converts the right-button-down event data / right-button-up event data into data that can be recognized by the cloud server system and sends it to the cloud server system to drive the cloud application to run. The conversion process is the same as the conversion process of the left-button-down event data / left-button-up event data mentioned above, and will not be repeated here. In other words, the data finally sent to the cloud server system includes the right-button identifier, the press identifier / the lift identifier, and the trigger position.

[0026] When the user presses the middle button of the mouse connected to the terminal in the WebView control area, a mousedown event will be triggered. When the H5 web page code monitors the mousedown event triggered by pressing the middle button, it is necessary to send the middle button press event data to the cloud server. The middle button press event data may include a key-value pair consisting of a middle button identifier and a press identifier. In addition, it may also include: the trigger position corresponding to the middle button press event, which is the trigger position on the terminal screen (pressing the middle button of the mouse at this trigger position triggers a mousedown event) or the trigger position on the terminal screen is converted. The conversion process can refer to the aforementioned trigger position coordinates Target conversion formula: When the user lifts the middle button of the mouse connected to the terminal in the WebView control area, a mouseup event will be triggered. When the H5 web page code monitors the mouseup event, it is necessary to send the middle button lift event data to the cloud server. The middle button lift event data may include a key-value pair consisting of a middle button identifier and a lift identifier. In addition, it may also include: the trigger position corresponding to the middle button lift event, which is the trigger position on the terminal screen (lifting the middle button of the mouse at this trigger position triggers the mouseup event) or the trigger position on the terminal screen is converted. The conversion process can refer to the aforementioned conversion formula for the trigger position coordinates. It should be noted that if the middle button press event data / middle button lift event data contains the trigger position on the terminal screen, then after the middle button press event data / middle button lift event data are sent to the cloud server, the cloud server will convert the trigger position on the terminal screen. The conversion process can refer to the aforementioned conversion formula for the trigger position coordinates. After receiving the middle mouse button press event data / middle mouse button lift event data, the cloud server sends the middle mouse button press event data / middle mouse button lift event data to the cloud server system, or converts the middle mouse button press event data / middle mouse button lift event data into data that can be recognized by the cloud server system and sends it to the cloud server system to drive the cloud application to run. The conversion process is the same as the conversion process of the left mouse button press event data / left mouse button lift event data mentioned above, and will not be repeated here. In other words, the data finally sent to the cloud server system includes the middle mouse button identifier, the press identifier / lift identifier, and the trigger position.

[0027] When the user slides the mouse wheel of the mouse connected to the terminal in the WebView control area, a wheel event will be triggered. When the H5 web page code monitors the wheel event, it is necessary to send the mouse wheel sliding event data to the cloud server. The mouse wheel sliding event data may include a key-value pair consisting of a mouse wheel identifier and a sliding amplitude. The sliding amplitude is the amplitude generated by sliding the mouse wheel or the amplitude generated by sliding the mouse wheel. The amplitude is converted or the scaled value of the amplitude obtained after conversion. For the conversion of the sliding amplitude, assuming that the sliding amplitude before conversion is L1 and the sliding amplitude after conversion is L2, then L2=L1×(H2 / H1), where H1 and H2 are the height of the cloud application screen rendered and displayed by the terminal and the height of the cloud application screen rendered by the cloud server, respectively. After receiving the mouse wheel sliding event data, the cloud server sends the mouse wheel sliding event data to the cloud server system, or converts the mouse wheel identifier in the mouse wheel sliding event data into a mouse wheel identifier recognizable by the cloud server system and / or converts and / or scales the sliding amplitude in the mouse wheel sliding event data and sends it to the cloud server system to drive the cloud application to run, wherein the mouse wheel identifier conversion process is consistent with the conversion process of the mouse left button identifier in the aforementioned mouse left button pressed event data / mouse left button lifted event data, and will not be repeated here. In other words, the data ultimately sent to the cloud server system includes the mouse wheel identifier and the sliding amplitude.

[0028] When the user moves the mouse connected to the terminal in the WebView control area, a mousemove event is triggered. When the H5 web page code listens to the mousemove event, it is necessary to send mouse movement event data to the cloud server. The mouse movement event data may include a mouse movement identifier and movement-related coordinate data, wherein the movement-related coordinate data includes cursor movement coordinate data and / or mouse movement coordinate data, the cursor movement coordinate data includes the position of the cursor, and the mouse movement coordinate data includes the accumulated value of the cursor movement position change / offset. After receiving the mouse movement event data, the cloud server sends the mouse movement event data to the cloud server system, or converts the mouse movement identifier in the mouse movement event data and sends it to the cloud server system to drive the cloud application to run, wherein the conversion process is consistent with the conversion process of the mouse left button identifier in the aforementioned mouse left button pressed event data / mouse left button lifted event data, and will not be repeated here. It should be noted that the movement-related coordinate data in the mouse movement event data of the system sent by the cloud server to the cloud server is calculated based on the converted cursor position, including cursor movement coordinate data and / or mouse movement coordinate data, wherein the cursor movement coordinate data includes the cursor position obtained by converting the position of the cursor on the terminal screen, and the mouse movement coordinate data includes the accumulated value of the cursor movement position change / offset calculated based on the cursor movement coordinate data. As for the calculation process of the movement-related coordinate data, it can be performed on the terminal side, or on the cloud server side, or part of the calculation can be completed by the terminal side, and the rest of the calculation can be completed by the cloud server side. In other words, the data of the system finally sent to the cloud server includes the mouse movement identifier, as well as the cursor movement coordinate data and / or mouse movement coordinate data.

[0029] The mouse event monitoring processing method provided in the embodiment of the present application monitors mouse events through a mouse event monitoring layer on a touch input layer covered on a rendering screen layer of a terminal, monitors operations on the left mouse button with the help of touchstart events and touchend events, and monitors other operations on the mouse with the help of other mouse events except touchstart events, touchend events, mousedown events triggered when the left mouse button is lifted, and mouseup events triggered when the left mouse button is lifted. In this way, when the scheme is applied to iOS devices that are not supported by the system API for the mouse, the mouse control input can be accurately identified, and the corresponding event data can be sent to the cloud server, thereby realizing the control of the x86 cloud application running in the cloud server, that is, it can improve the convenience of users controlling x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices.

[0030] Based on the aforementioned method embodiment, the other mouse events may include: at least one of: a mouse event triggered by operating the right button of a mouse, a mouse event triggered by operating the middle button of a mouse, a mouse event triggered by operating a mouse wheel, and a mouse event triggered by moving the mouse;

[0031] The event data corresponding to the other mouse events include a mouse object operation identifier and operation position related data.

[0032] Reference Figure 2 FIG. 1 is a schematic diagram of a structure of a mouse event monitoring and processing device provided in an embodiment of the present application, the device comprising:

[0033] The first monitoring unit 20 is used to send the left mouse button pressed event data to the cloud server when the mouse event monitoring layer monitors the touchstart event; and to send the left mouse button lifted event data to the cloud server when the mouse event monitoring layer monitors the touchend event;

[0034] The second monitoring unit 21 is used to send event data corresponding to other mouse events to the cloud server when the mouse event monitoring layer monitors other mouse events except touchstart event, touchend event, mousedown event triggered when the left mouse button is lifted, and mouseup event triggered when the left mouse button is lifted, wherein the mouse event monitoring layer is overlaid on the touch input layer on the rendering picture layer of the terminal and is used to monitor mouse events.

[0035] The mouse event monitoring and processing device provided in the embodiment of the present application monitors mouse events through the mouse event monitoring layer on the touch input layer covered on the rendering screen layer of the terminal, monitors operations on the left mouse button with the help of touchstart events and touchend events, and monitors other operations on the mouse with the help of other mouse events except touchstart events, touchend events, mousedown events triggered when the left mouse button is lifted, and mouseup events triggered when the left mouse button is lifted. In this way, when the scheme is applied to iOS devices that are not supported by the system API for the mouse, the mouse control input can be accurately identified, and the corresponding event data can be sent to the cloud server, thereby realizing the control of the x86 cloud application running in the cloud server, that is, it can improve the convenience of users controlling x86 cloud applications through mobile devices running non-specific iOS system versions / non-specific types of mobile devices.

[0036] Based on the aforementioned device embodiment, the mouse event monitoring layer may include a transparent WebView control, the WebView control is covered on the touch input layer, the WebView control is loaded with H5 web page code, and the H5 web page code is used to monitor mouse events.

[0037] Based on the aforementioned device embodiment, the left mouse button pressed event data may include a key-value pair consisting of a left mouse button identifier and a pressed identifier, and the left mouse button lifted event data may include a key-value pair consisting of a left mouse button identifier and a lifted identifier.

[0038] Based on the aforementioned device embodiment, the other mouse events may include: at least one of: a mouse event triggered by operating the right button of a mouse, a mouse event triggered by operating the middle button of a mouse, a mouse event triggered by operating a mouse wheel, and a mouse event triggered by moving the mouse;

[0039] The event data corresponding to the other mouse events include a mouse object operation identifier and operation position related data.

[0040] The mouse event monitoring and processing device provided in the embodiment of the present application has an implementation process that is consistent with the mouse event monitoring and processing method provided in the embodiment of the present application, and the effect that can be achieved is also the same as the mouse event monitoring and processing method provided in the embodiment of the present application, and will not be repeated here.

[0041] like Figure 3 As shown, an electronic device provided by an embodiment of the present application includes: a processor 30, a memory 31 and a bus 32, wherein the memory 31 stores machine-readable instructions executable by the processor 30, and when the electronic device is running, the processor 30 communicates with the memory 31 through the bus 32, and the processor 30 executes the machine-readable instructions to perform the steps of the above-mentioned mouse event monitoring processing method.

[0042] Specifically, the memory 31 and the processor 30 can be general-purpose memories and processors, which are not specifically limited here. When the processor 30 runs the computer program stored in the memory 31, the mouse event monitoring processing method can be executed.

[0043] Corresponding to the above-mentioned mouse event monitoring processing method, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned mouse event monitoring processing method are executed.

[0044] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A mouse event monitoring processing method, characterized in that: include: When the mouse event monitoring layer monitors the touchstart event, it sends the left mouse button pressed event data to the cloud server; And when the mouse event monitoring layer monitors the touchend event, it sends the mouse left button lift event data to the cloud server; When the mouse event monitoring layer monitors other mouse events except the touchstart event, the touchend event, the mousedown event triggered when the left mouse button is lifted, and the mouseup event triggered when the left mouse button is lifted, the event data corresponding to the other mouse events are sent to the cloud server, wherein the mouse event monitoring layer is covered on the touch input layer on the rendering picture layer of the terminal, and is used to monitor mouse events; The mouse event monitoring layer includes a transparent WebView control, the WebView control is covered on the touch input layer, the WebView control is loaded with an H5 webpage code, and the H5 webpage code is used to monitor mouse events; When the user presses the left button of the mouse connected to the terminal in the WebView control area, the touchstart event is triggered. When the user lifts the left button of the mouse connected to the terminal in the WebView control area, the touchend event, mousedown event, and mouseup event are triggered.

2. The method according to claim 1, characterized in that The left mouse button pressed event data includes a key-value pair consisting of a left mouse button identifier and a pressed identifier, and the left mouse button lifted event data includes a key-value pair consisting of a left mouse button identifier and a lifted identifier.

3. The method according to claim 1, characterized in that The other mouse events include: at least one of a mouse event triggered by operating the right button of a mouse, a mouse event triggered by operating the middle button of a mouse, a mouse event triggered by operating the mouse wheel, and a mouse event triggered by moving the mouse; The event data corresponding to the other mouse events include a mouse object operation identifier and operation position related data.

4. A mouse event monitoring and processing device, characterized in that: include: The first monitoring unit is used to send the left mouse button pressed event data to the cloud server when the mouse event monitoring layer monitors the touchstart event; And when the mouse event monitoring layer monitors the touchend event, it sends the mouse left button lift event data to the cloud server; A second monitoring unit is used for sending event data corresponding to other mouse events to the cloud server when the mouse event monitoring layer monitors other mouse events except the touchstart event, the touchend event, the mousedown event triggered when the left mouse button is lifted, and the mouseup event triggered when the left mouse button is lifted, wherein the mouse event monitoring layer is covered on the touch input layer on the rendering picture layer of the terminal and is used for monitoring mouse events; The mouse event monitoring layer includes a transparent WebView control, the WebView control is covered on the touch input layer, the WebView control is loaded with an H5 webpage code, and the H5 webpage code is used to monitor mouse events; When the user presses the left button of the mouse connected to the terminal in the WebView control area, the touchstart event is triggered. When the user lifts the left button of the mouse connected to the terminal in the WebView control area, the touchend event, mousedown event, and mouseup event are triggered.

5. The device according to claim 4, characterized in that The left mouse button pressed event data includes a key-value pair consisting of a left mouse button identifier and a pressed identifier, and the left mouse button lifted event data includes a key-value pair consisting of a left mouse button identifier and a lifted identifier.

6. The device according to claim 4, characterized in that The other mouse events include: at least one of a mouse event triggered by operating the right button of a mouse, a mouse event triggered by operating the middle button of a mouse, a mouse event triggered by operating the mouse wheel, and a mouse event triggered by moving the mouse; The event data corresponding to the other mouse events include a mouse object operation identifier and operation position related data.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the mouse event monitoring processing method according to any one of claims 1 to 3 are executed.

8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the mouse event monitoring processing method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Canvas tag event response method and system, electronic equipment and storage medium

    CN112433626A

  • Cloud game processing method and device, computer equipment and storage medium

    CN116920359A