Key control method and device, electronic equipment and computer readable storage medium

By receiving and processing the triggering operations of the target buttons at the system level, generating system messages and controlling the processing operations of the system application, the problem of button operation restrictions in special scenarios is solved, high-level button operation restrictions are implemented, terminal configuration changes are prevented, and security is improved.

CN120654237APending Publication Date: 2025-09-16BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410302432.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In special scenarios, it is necessary to restrict the operation function of the target button to avoid changes in the terminal configuration. Existing technologies make it difficult to effectively implement high-level button operation restrictions to prevent security vulnerabilities and improper operations.

Method used

By receiving the trigger operation of the target button at the system level, generating the target system message, determining the corresponding system application, and obtaining the target processing information, the system application is controlled to perform the target processing operation, including interception, release and system message replacement, so as to realize the restriction of button operation.

Benefits of technology

Implementing operational function restrictions on target buttons at the system level prevents terminal configuration changes, improves security and the protection level of the operation interface, and prevents potential security vulnerabilities and improper operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654237A_ABST
    Figure CN120654237A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a key control method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: receiving a triggering operation for a target key, and generating a target system message corresponding to the triggering operation at a system level; in response to the target system message, determining a system application program corresponding to the target system message; target processing information for the target system message is obtained, the system application program is controlled to carry out target processing operation on the target system message, and the target processing operation is matched with the target processing information. According to the key control method provided by the invention, the target processing operation is performed on the target system message of the trigger operation corresponding to the target key on the basis of the system application program at the system level, and the target processing operation is matched with the target processing information for the target system message; the operation function of the target key is limited at the system level to avoid the change of the terminal configuration, so that the operation function of the target key is limited to avoid the change of the terminal configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a key control method, device, electronic device, and computer-readable storage medium. Background Art

[0002] With the rapid development of electronic technology, controlling terminals through physical buttons or virtual buttons has become a common means of operating terminals. However, in special scenarios, it is necessary to limit the operation function of the target button to avoid changes in terminal configuration. Summary of the Invention

[0003] The embodiments of the present application provide a key control method, device, electronic device and computer-readable storage medium, which can solve the technical problem of needing to limit the operating function of the target key in special scenarios to avoid terminal configuration changes.

[0004] In a first aspect, an embodiment of the present application provides a key control method, the method comprising:

[0005] Receiving a trigger operation for a target button, and generating a target system message corresponding to the trigger operation at the system level;

[0006] In response to the target system message, determining a system application corresponding to the target system message;

[0007] Target processing information for the target system message is acquired, and the system application is controlled to perform a target processing operation on the target system message, where the target processing operation matches the target processing information.

[0008] Optionally, the acquiring target processing information for the target system message and controlling the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information, includes:

[0009] Acquire module configuration information of a key control module, and determine target processing information for the target system message based on the module configuration information;

[0010] The key control module controls the system application to perform a target processing operation on the target system message, where the target processing operation matches the target processing information.

[0011] Optionally, the controlling the system application to perform a target processing operation on the target system message based on the key control module, wherein the target processing operation matches the target processing information, includes:

[0012] parsing the target processing information to determine a processing type of the target processing information;

[0013] When the processing type is the first type, controlling the system application to perform an interception processing operation on the target system message based on the key control module;

[0014] When the processing type is the second type, controlling the system application to perform a release processing operation on the target system message based on the key control module;

[0015] When the processing type is the third type, the key control module controls the system application to perform a system message replacement processing operation on the target system message.

[0016] Optionally, before obtaining the module configuration information of the key control module, the method further includes:

[0017] In response to an update operation of the target webpage on the module configuration information in the key control module, the module configuration information is updated based on the update operation.

[0018] Optionally, controlling the system application to perform a system message replacement processing operation on the target system message based on the key control module includes:

[0019] Obtaining a preset system message for the third type;

[0020] The key control module controls the system application to replace the target system message with the preset system message.

[0021] Optionally, controlling the system application to perform a target processing operation on the target system message includes:

[0022] Obtaining a system application program interface of the system application program;

[0023] The system application program interface is called to control the system application program, so as to perform a target processing operation on the target system message through the system application program.

[0024] Optionally, the receiving a trigger operation for a target button and generating a target system message corresponding to the trigger operation at a system level includes:

[0025] A trigger operation for a mouse button is received, and a target system message corresponding to the trigger operation is generated at a system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

[0026] In a second aspect, an embodiment of the present application provides a key control device, the device comprising:

[0027] A receiving module, adapted to receive a trigger operation for a target button and generate a target system message corresponding to the trigger operation at a system level;

[0028] a response module, adapted to determine, in response to the target system message, a system application corresponding to the target system message;

[0029] The acquisition module is adapted to acquire target processing information for the target system message and control the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information.

[0030] Optionally, the acquisition module includes:

[0031] an acquiring unit, adapted to acquire module configuration information of the key control module, and determine target processing information for the target system message based on the module configuration information;

[0032] The target processing operation unit is adapted to control the system application to perform a target processing operation on the target system message based on the key control module, wherein the target processing operation matches the target processing information.

[0033] Optionally, the target processing operation unit includes:

[0034] a parsing subunit, adapted to parse the target processing information and determine a processing type of the target processing information;

[0035] a first subunit, adapted to, when the processing type is the first type, control the system application to perform an interception processing operation on the target system message based on the key control module;

[0036] a second subunit, adapted to, when the processing type is the second type, control the system application to perform a release processing operation on the target system message based on the key control module;

[0037] The third subunit is adapted to control the system application to perform a system message replacement processing operation on the target system message based on the key control module when the processing type is the third type.

[0038] Optionally, the button control device further includes:

[0039] The updating unit is adapted to respond to an update operation of the target webpage on the module configuration information in the key control module and update the module configuration information based on the update operation.

[0040] Optionally, the third subunit includes:

[0041] an acquiring subunit, adapted to acquire a preset system message for the third type;

[0042] The replacement subunit is adapted to control the system application to replace the target system message with the preset system message based on the key control module.

[0043] Optionally, the target processing operation unit includes:

[0044] An interface acquisition subunit, adapted to acquire a system application interface of the system application;

[0045] The calling subunit is adapted to call the system application interface to control the system application so as to perform a target processing operation on the target system message through the system application.

[0046] Optionally, the receiving module is further adapted to receive a trigger operation for a mouse button, and generate a target system message corresponding to the trigger operation at the system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

[0047] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:

[0048] processor; and

[0049] A memory arranged to store computer executable instructions, which when executed cause the processor to perform any of the methods described above.

[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, implement any of the methods described above.

[0051] The beneficial effects of the technical solution provided by the embodiments of the present application include at least the following: receiving a trigger operation for a target button, generating a target system message corresponding to the trigger operation at the system level; determining the system application corresponding to the target system message in response to the target system message; obtaining target processing information for the target system message, controlling the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information. The button control method provided by the present application implements limiting the operation function of the target button at the system level to avoid changes in the terminal configuration by performing a target processing operation on the target system message corresponding to the trigger operation of the target button based on the system application at the system level. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 An exemplary system architecture diagram of a key control method provided in an embodiment of the present application;

[0054] Figure 2 A flowchart of a key control method provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of the architecture of a key control method provided in an embodiment of the present application;

[0056] Figure 4 A schematic diagram of a process for performing a target processing operation on a target system message provided in an embodiment of the present application;

[0057] Figure 5 A schematic diagram of another process for performing target processing operations on target system messages provided in an embodiment of the present application;

[0058] Figure 6 A schematic diagram of a process for performing a system message replacement process according to an embodiment of the present application;

[0059] Figure 7 A schematic diagram of a flow chart of a control system application performing a target processing operation on a target system message provided by an embodiment of the present application;

[0060] Figure 8 A schematic structural diagram of a key control device provided in an embodiment of the present application;

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

[0062] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions 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. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the embodiments of the present application.

[0063] With the rapid development of electronic technology, controlling terminals through physical or virtual buttons has become a common method of operating terminals. However, in special cases, such as banking systems, ATMs (Automated Teller Machines) and bank ATMs require higher-level key operation restrictions to prevent potential security vulnerabilities. Examination and certification systems also require higher-level key operation restrictions on online examination platforms to prevent users from accessing context menus to circumvent improper operations. Similarly, in enterprise and government security applications, higher-level key operation restrictions are also needed to improve the security level of the user interface when handling sensitive information to avoid potential security vulnerabilities.

[0064] In order to solve the above technical problems, an embodiment of the present application provides a key control method, which includes: receiving a trigger operation for a target key, generating a target system message corresponding to the trigger operation at the system level; in response to the target system message, determining the system application corresponding to the target system message; obtaining target processing information for the target system message, and controlling the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information. The key control method provided in the present application performs a target processing operation on the target system message corresponding to the trigger operation of the target key based on the system application at the system level, so as to limit the operation function of the target key at the system level to avoid changes in the terminal configuration.

[0065] See also Figure 1 , Figure 1 This is an exemplary system architecture diagram of a key control method provided in an embodiment of the present application.

[0066] like Figure 1 As shown, the system architecture may include an electronic device 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the electronic device 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, a wired communication link may include an optical fiber, a twisted pair, or a coaxial cable, and a wireless communication link may include a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.

[0067] The electronic device 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the electronic device 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The electronic device 101 can be hardware or software. When the electronic device 101 is hardware, it can be various electronic devices, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the electronic device 101 is software, it can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules (for example: for providing distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.

[0068] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited herein.

[0069] In an embodiment of the present application, the electronic device 101 can receive a trigger operation for a target button, and generate a target system message corresponding to the trigger operation at the system level; in response to the target system message, determine the system application corresponding to the target system message; obtain target processing information for the target system message, and control the system application to perform a target processing operation on the target system message, and the target processing operation matches the target processing information.

[0070] It should be understood that Figure 1 The number of electronic devices, networks, and servers is only illustrative, and any number of electronic devices, networks, and servers may be used as needed. Of course, the system architecture in the embodiments provided herein may not include a server, that is, the server is optional in the system architecture provided herein.

[0071] See also Figure 2 , Figure 2 This is a flowchart of a key control method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be an electronic device that executes the key control method, a processor within the electronic device that executes the key control method, or a key control service within the electronic device that executes the key control method. For ease of description, the specific execution process of the key control method is described below using the processor within the electronic device as an example.

[0072] like Figure 2 As shown, the key control method includes:

[0073] S202: Receive a trigger operation for a target button, and generate a target system message corresponding to the trigger operation at the system level.

[0074] When a user operates an electronic device, they typically control the electronic device through physical or virtual buttons that are paired with the electronic device. Therefore, the electronic device first receives a trigger operation from the user targeting a target button. The target button can be a specific button on the electronic device itself or a specific button on an external device connected to the electronic device. The target button includes, but is not limited to, mouse buttons, keyboard buttons, virtual buttons on a touch screen, and buttons on a controller paired with the electronic device.

[0075] After the electronic device receives a trigger operation for a target button, the electronic device generates a target system message corresponding to the trigger operation at the system level. The target system message corresponding to the trigger operation refers to a system message at the system level corresponding to the button indication signal generated after the trigger operation triggers the target button. For example, when the target button is the right button of the mouse, the target system message refers to a system message at the system level corresponding to the menu indication signal generated after the trigger operation triggers the right button of the mouse. Here, the system level can be understood as the operating system level, which is between the hardware of the electronic device and the user application, and is used to transmit messages between the hardware of the electronic device and the user application.

[0076] Therefore, when the electronic device receives a trigger operation for a target button, if the trigger operation is performed by the user in a user application, the target system message corresponding to the trigger operation is generated at the system level and therefore has not yet been delivered to the user application.

[0077] Optionally, receiving a trigger operation for a target button in S202 and generating a target system message corresponding to the trigger operation at the system level includes:

[0078] A trigger operation for a mouse button is received, and a target system message corresponding to the trigger operation is generated at a system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

[0079] Optionally, receiving a trigger operation for a target button in S202 and generating a target system message corresponding to the trigger operation at the system level includes:

[0080] Receive a trigger operation for a physical target keyboard key or a virtual target keyboard key, and generate a target system message corresponding to the trigger operation at the system level.

[0081] The specific physical target keyboard keys or virtual target keyboard keys may be set based on actual scenario requirements.

[0082] S204: In response to the target system message, determine a system application corresponding to the target system message.

[0083] After the target system is generated, in response to the target system message, a system application corresponding to the target system message is determined at the system level. The system application can control and manage the target system message.

[0084] For example, a system application can be a system-level hook, i.e., a hook procedure. Whenever a specific message is sent, before it reaches the user application's window, the hook procedure captures the message at the system level, giving the hook procedure control. The hook procedure can then modify the message, pass it on without processing, or forcibly terminate the message's delivery. In Windows, the hook procedure can be SetWindowsHookEx; in Linux, it can be XGrabButton.

[0085] S206: Obtain target processing information for the target system message, and control the system application to perform a target processing operation on the target system message, where the target processing operation matches the target processing information.

[0086] The target processing information for the target system message includes the operation message executed on the target system message. Therefore, after obtaining the target processing information, the system application can be controlled to perform a target processing operation on the target system message based on the target processing information. The target processing operation matches the target processing information, that is, the target processing operation corresponds to the operation message executed on the target system message in the target processing information.

[0087] System applications are used to perform targeted processing operations on target system messages at the system level, thereby improving the control level for target buttons.

[0088] See also Figure 3 , Figure 3 This is a schematic diagram of the architecture of a key control method provided in an embodiment of the present application. Figure 3 As shown, after receiving the trigger operation for the target button, the system layer generates a target system message corresponding to the trigger operation, and then the system application performs a target processing operation corresponding to the target processing information on the target system message at the system layer.

[0089] The target processing operation may at least include an interception processing operation, a release processing operation and a system message replacement processing operation. When the target processing operation is an interception processing operation, the target system message is intercepted at the system level and cannot be passed to the application level used to interact with the user. It should be understood that the application level operates on the basis of the system level to achieve interaction with the user. When the target processing operation is a release processing operation, the target system message is released at the system level and can be passed to the application level used to interact with the user and then instruct the user application to respond accordingly. When the target processing operation is an interception processing operation, the target system message is released and replaced at the system level. The replaced message can also be passed to the application level used to interact with the user and then instruct the user application to respond accordingly.

[0090] The key control method provided in this application provides a high-authority level key operation restriction scheme, which realizes the target processing operation of the target system message corresponding to the target key triggering operation based on the system application at the system level, so as to realize the restriction of the operation function of the target key at the system level to avoid changes in the terminal configuration.

[0091] See also Figure 4 , Figure 4 A flow chart of a target processing operation on a target system message provided by an embodiment of the present application. Figure 4 As shown, in S206, target processing information for the target system message is obtained, and the control system application performs a target processing operation on the target system message. The target processing operation matches the target processing information, including:

[0092] S402: Acquire module configuration information of the key control module, and determine target processing information for the target system message based on the module configuration information.

[0093] The key control module is used to perform processing operations corresponding to its module configuration information at the system level for target system messages. The key control module can be set at the system level. To enable the key control module to better interact with the system-level programming language at the system level, the key control module can be created using the system-level programming language at the system level. Furthermore, the module configuration information of the key control module can be modified to update the target processing information for the target system message.

[0094] For example, the Rust language and the Neon project can be used to create a key control module. Here, the Rust language is a widely used safe, fast, multi-paradigm system-level programming language. The Neon project is a high-performance single instruction multiple data stream extension that provides the ability to perform vector operations on ARM (Advanced RISC Machine) processors. By using the tools and libraries provided by the Neon project, the code corresponding to the key control module can be created. These modules can run directly on the ARM processor without relying on the support of external libraries or frameworks. In a feasible implementation, after obtaining the key control module, if the function of the mouse button is restricted based on the key control module, the restriction can be performed using a pre-set mouse button restriction policy library based on the Rust language.

[0095] In addition, the key control module created using the Rust language and the Neon project can be connected to the interface of desktop applications developed with the Electron framework. Electron is an open source framework that allows developers to build cross-platform desktop applications using HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), and JavaScript. These applications typically use Electron's wrapper library to handle the desktop interface and user interaction, and use the Node.js API (Application Programming Interface) to perform background tasks and interact with the system. This allows developers to easily modify the module configuration information of the key control module.

[0096] In an embodiment provided by the present application, before obtaining the module configuration information of the key control module in S402, the method further includes:

[0097] In response to an update operation of the target webpage on the module configuration information in the button control module, the module configuration information is updated based on the update operation.

[0098] The target webpage can be an embedded webpage developed based on the Electron framework. The key control module can provide an API interface to the target webpage, allowing the target webpage to update the module configuration information in the key control module. The target webpage can be based on a pre-programmed preset program, so that when the target webpage is opened, the preset program updates the module configuration information in the key control module. Subsequently, based on the update operation, the module configuration parameters in the module configuration information are updated. Here, the target webpage includes but is not limited to webpages with high security requirements, such as exam webpages, login webpages, and identity verification webpages.

[0099] S404: Controlling the system application program based on the key control module performs a target processing operation on the target system message, where the target processing operation matches the target processing information.

[0100] The key control module can call the API of the system application program, thereby controlling the system application program to perform a target processing operation on the target system message that matches the target processing information. The target processing information records relevant information about the target processing operation.

[0101] For example, see Figure 5 , Figure 5 This is another flow chart of performing target processing operations on target system messages provided by the embodiment of the present application. Figure 5 As shown, in S404, the control system application performs a target processing operation on the target system message based on the key control module, and the target processing operation matches the target processing information, including:

[0102] S502: Analyze the target processing information to determine the processing type of the target processing information.

[0103] The target processing information is subjected to data analysis to obtain analysis data, and then the processing type is determined based on the analysis data.

[0104] Here, the processing type of the target processing information may be determined based on the processing type identifier in the parsed data. The processing type of the target processing information includes at least a first type, a second type, and a third type.

[0105] It should be noted that when the module configuration information in the key control module is updated, the processing type corresponding to the target processing information is modified, such as from the first type to the second type, from the second type to the third type, from the third type to the second type, from the third type to the first type, the first type to the third type, and from the second type to the first type.

[0106] S504: When the processing type is the first type, the system application is controlled based on the key control module to intercept and process the target system message.

[0107] Among them, the processing type is the first type, that is, the target system message is intercepted at the system level. At this time, the target system message can be intercepted and processed at the system level based on the key control module control system application.

[0108] For example, when a user performs an operation on a user application interface, a corresponding target system message is sent based on the right mouse button. In this case, the processing type is the first type, so the key control module intercepts the target system message at the system level. In this case, even if the user triggers the right mouse button multiple times, the user application interface cannot be operated based on the right mouse button.

[0109] Similarly, when a user operates on a user application interface, a target system message is sent based on a target keyboard key on the keyboard. In this case, the processing type is the first type, so the key control module intercepts the target system message at the system level. In this case, even if the user presses the target keyboard key multiple times, the user application interface cannot be operated based on the target system message.

[0110] Specifically, in the banking system scenario, based on the embodiments provided by this solution, operation restrictions can be placed on ATMs and bank teller machines, thereby prohibiting right-click operations to prevent potential security vulnerabilities; in the examination system scenario, prohibiting right-click operations on the online examination platform limits cheating methods, and prohibiting right-click operations to prohibit access to the context menu to avoid improper operations; in enterprise and government security application scenarios, in specific environments where sensitive information is processed, prohibiting right-click operations can provide additional operation interface security measures.

[0111] S506: When the processing type is the second type, the control system application performs a release processing operation on the target system message based on the key control module.

[0112] Among them, the processing type is the first type, that is, the target system message is released at the system level. At this time, the target system message can be released and processed at the system level based on the key control module control system application.

[0113] For example, when the user operates on the user application interface, a corresponding target system message is sent based on the right mouse button. At this time, the processing type is the second type. Therefore, the button control module releases the target system message at the system level. At this time, the user can operate the user application interface based on the right mouse button.

[0114] Similarly, when a user operates on a user application interface, a target system message is sent based on a target keyboard key on the keyboard. In this case, the processing type is the second type. Therefore, the key control module releases the target system message at the system level. At this time, the user can operate the user application interface based on the target keyboard key.

[0115] S508: When the processing type is the third type, the system application program is controlled by the key control module to perform a system message replacement processing operation on the target system message.

[0116] Among them, the processing type is the first type, that is, the target system message is replaced at the system level. At this time, the system application program based on the key control module can perform a system message replacement processing operation on the target system message at the system level.

[0117] For example, when the user operates on the user application interface, a corresponding first target system message is sent based on the right mouse button. At this time, the processing type is the third type. Therefore, the button control module replaces the first target system message corresponding to the right mouse button at the system level, such as replacing the first target system message corresponding to the right mouse button with the second target system message corresponding to the left mouse button. At this time, although the user can operate the user application interface based on the right mouse button, the user is actually operating the user application interface based on the second target system message corresponding to the left mouse button.

[0118] Similarly, when a user operates on a user application interface, a corresponding third target system message is sent based on the first target keyboard key on the keyboard. In this case, the processing type is the third type. Therefore, the key control module replaces the third target system message at the system level, such as replacing the third target system message corresponding to the first target keyboard key with the fourth target system message corresponding to the second target keyboard key. In this case, although the user can operate the user application interface based on the first target keyboard key, the operation is actually based on the fourth target system message corresponding to the second target keyboard key.

[0119] For example, see Figure 6 , Figure 6 A flow chart of a system message replacement process is provided in an embodiment of the present application. Figure 6 As shown, in S508, the key control module controls the system application to perform a system message replacement processing operation on the target system message, including:

[0120] S602: Obtain a preset system message for the third type.

[0121] The third type of preset system message can be obtained from the module configuration information of the key control module, and can be a preset key system message corresponding to a preset key. Preset keys include but are not limited to physical keys and virtual keys. Please refer to the description of the target key for details.

[0122] Here, the preset system message is used to replace the target system message corresponding to the target button at the system level, so as to limit the button function corresponding to the target button.

[0123] S604: Controlling the system application to replace the target system message with a preset system message based on the key control module.

[0124] Among them, after determining the preset system message, the key control module control system application replaces the target system message with the preset system message at the system level to avoid the target system message being received by the application level, thereby improving the security level of the target system message processing.

[0125] For example, when the user operates on the user application interface, a corresponding target system message is sent based on the mouse wheel. At this time, the processing type is the third type. Therefore, the button control module replaces the target system message corresponding to the mouse wheel at the system level, and replaces the target system message corresponding to the mouse wheel with a preset system message. The preset system message can be the system message corresponding to the left mouse button. At this time, although the user can operate the user application interface based on the mouse wheel, the operation is actually based on the preset system message corresponding to the left mouse button.

[0126] Similarly, when a user operates on a user application interface, a target system message corresponding to a target virtual keyboard key on the virtual keyboard is sent. In this case, the processing type is the third type. Therefore, the key control module replaces the target system message at the system level, replacing the target system message corresponding to the target virtual keyboard key with a preset system message. The preset system message can be the system message corresponding to the left mouse button. In this case, although the user can operate the user application interface based on the target virtual keyboard key on the virtual keyboard, the operation is actually based on the preset system message corresponding to the left mouse button.

[0127] See also Figure 7 , Figure 7 A flow chart of a control system application program performing target processing operations on target system messages provided in an embodiment of the present application. Figure 7 As shown, in S206, the control system application performs target processing operations on the target system message, including:

[0128] S702: Obtain the system application program interface of the system application program.

[0129] The system application program interface can be used to interact with the system application program for information or instructions, so as to control the system application program to perform specific operations. The system application program interface of the system application program can be obtained from the module configuration information of the key control module.

[0130] Exemplarily, the system application program interface may be a predefined function, so that when the system application program interface is called, the system application program may be directly controlled to perform a target processing operation on a target system message.

[0131] S704: Calling the system application program interface to control the system application program, so as to perform a target processing operation on the target system message through the system application program.

[0132] The key control module can call the system application interface based on the module configuration information to control the system application, thereby controlling the system application to perform targeted processing operations on the target system message. For example, it can prevent users from accessing the application's debugging function or prohibit the use of the right-click menu to prevent configuration changes in specific environments.

[0133] See also Figure 8 , Figure 8 A structural diagram of a key control device provided in an embodiment of the present application.

[0134] like Figure 8 As shown, the key control device 800 includes:

[0135] The receiving module 810 is adapted to receive a trigger operation for a target key and generate a target system message corresponding to the trigger operation at the system level;

[0136] A response module 820 is adapted to respond to a target system message and determine a system application corresponding to the target system message;

[0137] The acquisition module 830 is adapted to acquire target processing information for a target system message, and control the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information.

[0138] Optionally, the acquisition module 830 includes:

[0139] an acquiring unit adapted to acquire module configuration information of the key control module and determine target processing information for a target system message based on the module configuration information;

[0140] The target processing operation unit is adapted to perform target processing operations on target system messages based on the key control module control system application, wherein the target processing operations match the target processing information.

[0141] Optionally, the target processing operation unit includes:

[0142] The parsing subunit is adapted to parse the target processing information and determine the processing type of the target processing information;

[0143] The first subunit is adapted to, when the processing type is the first type, control the system application program based on the key control module to intercept and process the target system message;

[0144] The second subunit is adapted to perform a release processing operation on the target system message based on the key control module control system application when the processing type is the second type;

[0145] The third subunit is adapted to perform a system message replacement processing operation on the target system message based on the key control module control system application when the processing type is the third type.

[0146] Optionally, the button control device 800 further includes:

[0147] The updating unit is adapted to respond to an updating operation of the target webpage on the module configuration information in the key control module and update the module configuration information based on the updating operation.

[0148] Optionally, the third subunit includes:

[0149] an acquiring subunit, adapted to acquire a preset system message of a third type;

[0150] The replacement subunit is adapted to replace the target system message with a preset system message based on the key control module control system application.

[0151] Optionally, the target processing operation unit includes:

[0152] An interface acquisition subunit adapted to acquire a system application program interface of a system application program;

[0153] The calling subunit is adapted to call the system application program interface to control the system application program, so as to perform a target processing operation on the target system message through the system application program.

[0154] Optionally, the receiving module 810 is further adapted to receive a trigger operation for a mouse button, and generate a target system message corresponding to the trigger operation at the system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

[0155] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, implement any of the above methods.

[0156] See Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 9As shown, the electronic device 900 may include: at least one processor 901 , at least one network interface 904 , a user interface 903 , a memory 905 , and at least one communication bus 902 .

[0157] The communication bus 902 is used to implement connection and communication between these components.

[0158] The user interface 903 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 903 may also include a standard wired interface and a wireless interface.

[0159] The network interface 904 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0160] The processor 901 may include one or more processing cores. The processor 901 utilizes various interfaces and circuits to connect the various components within the entire electronic device 900. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 905, and calling data stored in the memory 905, the processor 901 performs various functions of the electronic device 900 and processes data. Optionally, the processor 901 may be implemented in the form of at least one hardware component selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 901 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 901 and may be implemented separately on a single chip.

[0161] Among them, the memory 905 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 905 includes a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 905 may also be optionally at least one storage device located away from the aforementioned processor 901. As Figure 9 As shown, the memory 905 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a key control program.

[0162] exist Figure 9 In the electronic device 900 shown, the user interface 903 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 901 can be used to call the key control program stored in the memory 905 and specifically perform the following operations:

[0163] Receive the trigger operation for the target button and generate the target system message corresponding to the trigger operation at the system level;

[0164] In response to the target system message, determining a system application corresponding to the target system message;

[0165] Target processing information for a target system message is obtained, and a control system application performs a target processing operation on the target system message, where the target processing operation matches the target processing information.

[0166] Optionally, the processor 901 obtains target processing information for a target system message, controls the control system application to perform a target processing operation on the target system message, and when the target processing operation matches the target processing information, specifically performs the following steps:

[0167] Obtain module configuration information of the key control module, and determine target processing information for the target system message based on the module configuration information;

[0168] The control system application performs a target processing operation on the target system message based on the key control module, and the target processing operation matches the target processing information.

[0169] Optionally, the processor 901 performs a target processing operation on the target system message based on the key control module control system application. When the target processing operation matches the target processing information, the following steps are specifically performed:

[0170] Analyze the target processing information to determine the processing type of the target processing information;

[0171] When the processing type is the first type, the control system application performs an interception and processing operation on the target system message based on the key control module;

[0172] When the processing type is the second type, the control system application performs a release processing operation on the target system message based on the key control module;

[0173] When the processing type is the third type, the key control module controls the system application to perform a system message replacement processing operation on the target system message.

[0174] Optionally, before obtaining the module configuration information of the key control module, the processor 901 further specifically performs the following steps:

[0175] In response to an update operation of the target webpage on the module configuration information in the button control module, the module configuration information is updated based on the update operation.

[0176] Optionally, when the processor 901 executes the system message replacement processing operation on the target system message based on the key control module control system application, the following steps are specifically performed:

[0177] Obtaining a preset system message for the third type;

[0178] The control system application replaces the target system message with the preset system message based on the key control module.

[0179] Optionally, when the processor 901 executes the control system application to perform a target processing operation on the target system message, the following steps are specifically performed:

[0180] Get the system application interface of the system application;

[0181] The system application program interface is called to control the system application program so as to perform a target processing operation on the target system message through the system application program.

[0182] Optionally, when the processor 901 receives a trigger operation for a target button and generates a target system message corresponding to the trigger operation at the system level, the processor 901 specifically performs the following steps:

[0183] A trigger operation for a mouse button is received, and a target system message corresponding to the trigger operation is generated at a system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

[0184] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0185] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.

[0186] In addition, the functional modules in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into a single module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.

[0187] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0188] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.

[0189] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0190] The above is a description of a key control method, device, electronic device and computer-readable storage medium provided in an embodiment of the present application. For those skilled in the art, based on the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.

Claims

1. A key control method, wherein: The method comprises: Receiving a trigger operation for a target button, and generating a target system message corresponding to the trigger operation at the system level; In response to the target system message, determining a system application corresponding to the target system message; Target processing information for the target system message is acquired, and the system application is controlled to perform a target processing operation on the target system message, where the target processing operation matches the target processing information.

2. The method according to claim 1, wherein The acquiring target processing information for the target system message and controlling the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information, includes: Acquire module configuration information of a key control module, and determine target processing information for the target system message based on the module configuration information; The key control module controls the system application to perform a target processing operation on the target system message, where the target processing operation matches the target processing information.

3. The method according to claim 2, wherein: The controlling the system application to perform a target processing operation on the target system message based on the key control module, wherein the target processing operation matches the target processing information, includes: parsing the target processing information to determine a processing type of the target processing information; When the processing type is the first type, controlling the system application to perform an interception processing operation on the target system message based on the key control module; When the processing type is the second type, controlling the system application to perform a release processing operation on the target system message based on the key control module; When the processing type is the third type, the key control module controls the system application to perform a system message replacement processing operation on the target system message.

4. The method according to claim 2, wherein: Before obtaining the module configuration information of the key control module, the method further includes: In response to an update operation of the target webpage on the module configuration information in the key control module, the module configuration information is updated based on the update operation.

5. The method according to claim 3, wherein The controlling the system application to perform a system message replacement processing operation on the target system message based on the key control module includes: Obtaining a preset system message for the third type; The key control module controls the system application to replace the target system message with the preset system message.

6. The method according to claim 1, wherein The controlling the system application to perform a target processing operation on the target system message includes: Obtaining a system application program interface of the system application program; The system application program interface is called to control the system application program, so as to perform a target processing operation on the target system message through the system application program.

7. The method according to claim 1, wherein The receiving a trigger operation for a target button and generating a target system message corresponding to the trigger operation at a system level includes: A trigger operation for a mouse button is received, and a target system message corresponding to the trigger operation is generated at a system level; wherein the mouse button is one of a right mouse button, a left mouse button, and a mouse wheel.

8. A key control device, wherein: The device comprises: A receiving module, adapted to receive a trigger operation for a target button and generate a target system message corresponding to the trigger operation at a system level; a response module, adapted to determine, in response to the target system message, a system application corresponding to the target system message; The acquisition module is adapted to acquire target processing information for the target system message and control the system application to perform a target processing operation on the target system message, wherein the target processing operation matches the target processing information.

9. An electronic device, wherein: The electronic device includes: processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, which, when executed by a processor, implement the method of any one of claims 1 to 7.