Secure keyboard input method and device, equipment and medium

By performing initialization, screenshot protection, scrambling, and encrypted transmission during keyboard input, the method solves the problem of low security in existing secure keyboard input methods, achieving higher security and privacy.

CN120822246APending Publication Date: 2025-10-21SHENZHEN LEXIN SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510679352.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing secure keyboard input methods rely on third-party plug-ins, which poses a security risk of user information leakage, resulting in low security during keyboard input.

Method used

By acquiring user input trigger events, keyboard initialization, screenshot protection, keyboard reordering, input mask display, and encrypted transmission are performed to generate secure input content.

Benefits of technology

It effectively prevents viruses from taking screenshots or recording screens, reduces the risk of attacks such as keyloggers and shoulder spying, and improves the security and data privacy of the secure keyboard.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822246A_ABST
    Figure CN120822246A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of webpage development, and discloses a safe keyboard input method and device, equipment and a medium, and the method comprises the following steps: obtaining an input trigger event of a user by utilizing a current input page, and carrying out keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page; performing screen capture protection on the primary keyboard page to obtain a secondary keyboard page; carrying out keyboard disorder on the secondary keyboard page to obtain a safe keyboard page; acquiring a keyboard input event of a user by using the secure keyboard page, and performing input mask display on the secure keyboard page according to the keyboard input event; and extracting input content from the keyboard input event, and carrying out encryption transmission on the input content to obtain safe input content. According to the invention, the security risk of user information leakage can be reduced, so that the security during keyboard input is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of web page development, and in particular to a secure keyboard input method, device, equipment and medium. Background Art

[0002] In application scenarios with high security requirements, such as financial transactions and logins, a secure keyboard is required for text input to enhance application security. This effectively reduces the risk of sensitive information leakage and improves application security and user experience.

[0003] Most existing secure keyboard input methods are based on third-party plug-ins, that is, they use third-party publicly available keyboard plug-ins for input. In actual applications, methods based on third-party plug-ins are expensive, and third-party software development kits may pose security risks of user information leakage, which may lead to lower security when performing keyboard input. Summary of the Invention

[0004] The present invention provides a secure keyboard input method, device and computer-readable storage medium, the main purpose of which is to solve the problem of low security during keyboard input.

[0005] To achieve the above-mentioned purpose, the present invention provides a secure keyboard input method, comprising: Using the current input page to obtain a user input trigger event, and performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page; Performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page; Performing keyboard shuffling on the secondary keyboard page to obtain a secure keyboard page; Utilizing the secure keyboard page to obtain a keyboard input event of the user, and displaying an input mask on the secure keyboard page according to the keyboard input event; Input content is extracted from the keyboard input event, and the input content is encrypted and transmitted to obtain secure input content.

[0006] Optionally, performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page includes: Performing event source analysis on the input trigger event to obtain event source attributes; Performing page environment detection on the current input page to obtain a page environment type; Generate a page type according to the event source attribute and the page environment type; Determine whether the page type is a native type; If yes, then secure keyboard mounting is performed on the current input page to obtain a primary keyboard page; If not, hiding the system keyboard of the current input page to obtain a hidden input page; The hidden input page is loaded with a keyboard pop-up window to obtain a primary keyboard page.

[0007] Optionally, the performing screenshot protection on the primary keyboard page to obtain the secondary keyboard page includes: Performing window detection on the primary keyboard page to obtain a page window; Performing window privacy configuration on the page window to obtain a privacy window; The primary keyboard page is screen-shot and protected according to the privacy window to obtain a secondary keyboard page.

[0008] Optionally, performing keyboard scrambling on the secondary keyboard page to obtain a secure keyboard page includes: Extracting key values ​​from the secondary keyboard page to obtain a keyboard key value sequence; Randomly arranging the keyboard key value sequence to obtain a random key value sequence; The secondary keyboard page is updated by using the random key value sequence to obtain a secure keyboard page.

[0009] Optionally, the randomly arranging the keyboard key value sequence to obtain a random key value sequence includes: Selecting two keyboard key values ​​in the keyboard key value sequence as keyboard key value pairs in the order of the serial numbers of the keyboard key value sequence; Generate random numbers in disorder using the preset random number function; Determine whether the random number is greater than a preset random threshold; If not, returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as a keyboard key value pair; If so, swapping the order of the two keyboard key values ​​in the keyboard value pair to obtain a swapped key value pair, updating the keyboard key value sequence with the swapped key value pair, and returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as the keyboard key value pair; Until the keyboard value pair is the last two keyboard key values ​​in the keyboard key value sequence, the keyboard key value sequence is treated as a random key value sequence.

[0010] Optionally, displaying an input mask on the secure keyboard page according to a keyboard input event includes: Extracting input content from the keyboard input event; Generate mask content according to the input content; The mask content is used to input and display the secure keyboard page.

[0011] Optionally, encrypting and transmitting the input content to obtain secure input content includes: Performing symmetrical encryption on the input content to obtain encrypted content; Performing a hash check on the encrypted content to obtain a verified encrypted content; Handshake transmission is performed on the verification encrypted content to obtain secure input content.

[0012] In order to solve the above problems, the present invention further provides a secure keyboard input device, the device comprising: A keyboard initialization module is used to obtain a user input trigger event using the current input page, and initialize the keyboard of the current input page according to the input trigger event to obtain a primary keyboard page; A screenshot protection module, configured to perform screenshot protection on the primary keyboard page to obtain a secondary keyboard page; A keyboard scrambling module, configured to scramble the secondary keyboard page to obtain a secure keyboard page; a mask input module, configured to obtain keyboard input events of the user using the secure keyboard page, and perform input mask display on the secure keyboard page according to the keyboard input events; The encryption transmission module is used to extract input content from the keyboard input event and encrypt and transmit the input content to obtain secure input content.

[0013] In order to solve the above problem, the present invention further provides an electronic device, comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the above-mentioned secure keyboard input method.

[0014] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned secure keyboard input method.

[0015] The embodiment of the present invention obtains the user's input trigger event by utilizing the current input page, and can respond to the customer's input needs in real time. By initializing the keyboard of the current input page according to the input trigger event, a primary keyboard page is obtained, which can hide the system keyboard and pop up a security keyboard, thereby realizing the introduction of the security keyboard. By performing screenshot protection on the primary keyboard page, a secondary keyboard page is obtained, which can prevent virus programs or embedded programs from taking screenshots or recording the screen when entering the password, thereby causing privacy leakage. By performing keyboard scrambling on the secondary keyboard page to obtain a security keyboard page, the risk of keyboard recorders, touch position memory, shoulder peeking and other attack methods from stealing user input can be effectively reduced, thereby improving the security of the security keyboard.

[0016] By utilizing the secure keyboard page to obtain the user's keyboard input events and displaying the secure keyboard page with an input mask based on the keyboard input events, the input content can be effectively hidden, preventing the risk of stealing the user's input through attacks such as shoulder peeking, thereby improving the security of the secure keyboard. By encrypting the input content for transmission to obtain secure input content, the content entered on the secure keyboard can be prevented from being leaked during transmission, further protecting data security and improving data privacy and security. Therefore, the secure keyboard input method, device, equipment, and medium proposed in the present invention can solve the problem of low security during keyboard input. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of a secure keyboard input method provided by one embodiment of the present invention; Figure 2 A schematic diagram of a process for generating a secondary keyboard page according to an embodiment of the present invention; Figure 3 A schematic diagram of a process for generating a secure keyboard page according to an embodiment of the present invention; Figure 4 A diagram illustrating the structure of a secure keyboard input device according to an embodiment of the present invention; Figure 5 A schematic structural diagram of an electronic device for implementing the secure keyboard input method provided by an embodiment of the present invention.

[0018] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0019] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0020] The embodiment of the present application provides a secure keyboard input method. The execution subject of the secure keyboard input method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the secure keyboard input method can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN for short), and basic cloud computing services such as big data and artificial intelligence platforms.

[0021] Reference Figure 1 FIG. 1 is a flow chart of a secure keyboard input method according to an embodiment of the present invention. In this embodiment, the secure keyboard input method includes: S1. Utilize the current input page to obtain a user input trigger event, and perform keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page.

[0022] In detail, the current input page refers to the page in the application where content needs to be entered, which can be a mobile phone page of personal information such as home address and an account password login page. The input trigger event refers to a focus event used to trigger user input, such as the onfocus or onclick event corresponding to the user clicking the input box in the current input page with his finger.

[0023] In an embodiment of the present invention, the step of initializing the keyboard of the current input page according to the input trigger event to obtain a primary keyboard page includes: Performing event source analysis on the input trigger event to obtain event source attributes; Performing page environment detection on the current input page to obtain a page environment type; Generate a page type according to the event source attribute and the page environment type; Determine whether the page type is a native type; If yes, then secure keyboard mounting is performed on the current input page to obtain a primary keyboard page; If not, hiding the system keyboard of the current input page to obtain a hidden input page; The hidden input page is loaded with a keyboard pop-up window to obtain a primary keyboard page.

[0024] Specifically, the event source analysis refers to analyzing the event source attributes corresponding to the DOM node corresponding to the input trigger event, that is, the target attribute of the event. The event source attributes include native page attributes and non-native page attributes, wherein the native page attributes refer to the attributes corresponding to the native page controls, such as EditText, Button, and SeekBar target attributes, and the non-native page attributes refer to the attributes corresponding to the page controls developed based on HTML, CSS, and JavaScript, such as <input> 、 <button>as well as <option>.

[0025] In detail, the page environment detection refers to detecting the page rendering engine of the current input page, and the page environment type includes native page type and non-native page type, wherein the native page type refers to the page type corresponding to the NativeUI rendering engine, and the non-native page type refers to the page type corresponding to the WebView environment.

[0026] Specifically, the page native type includes native type and non-native type, and generating the page type according to the event source attribute and the page environment type means that when the page environment type is a native page type and the event source attribute is the native page attribute, the page type is a native type.

[0027] Specifically, mounting a secure keyboard refers to displaying a custom secure keyboard using the customKeyboard property of the input box. The system keyboard can be hidden using the inputMethod.getController().stopInputSession() method. InputMethod.getController() refers to the core object of the input method, typically a controller that is an instance of InputMethodManager or a similar class. This object is responsible for managing the lifecycle of the input method, such as starting and ending input sessions and providing a communication interface between the input method and the system and applications. stopInputSession() is used to stop the current input session and release the current system keyboard.

[0028] Specifically, the keyboard pop-up loading refers to using the promptAction.openCustomDialog method of Hongmeng's application programming interface to pop up the secure keyboard, where promptAction is used to represent objects related to prompt operations, and is usually used to encapsulate logic that needs to trigger prompt boxes, dialog boxes, etc. in user interactions. openCustomDialog() is a method of the promptAction object, which is used to open a custom dialog box, that is, the dialog box corresponding to the secure keyboard.

[0029] In an embodiment of the present invention, by utilizing the current input page to obtain the user's input trigger event, it is possible to respond to the customer's input needs immediately. By initializing the keyboard of the current input page according to the input trigger event, a primary keyboard page is obtained, which can hide the system keyboard and pop up a security keyboard, thereby realizing the introduction of the security keyboard.

[0030] S2. Screen capture the primary keyboard page to obtain a secondary keyboard page.

[0031] For details, refer to Figure 2 As shown, the primary keyboard page is protected by screenshot to obtain a secondary keyboard page, including: S21, performing window detection on the primary keyboard page to obtain a page window; S22, performing window privacy configuration on the page window to obtain a privacy window; S23. Screen capture the primary keyboard page according to the privacy window to obtain a secondary keyboard page.

[0032] Specifically, the window detection refers to extracting the page window corresponding to the primary keyboard page, which can be achieved by using the WindowManager method. The window privacy configuration refers to setting the page window as a privacy window, which can be achieved by the following code: WindowOperateAction.SET_PRIVACY_MODE, true: WindowOperateAction is an enumeration class or constant class that defines a set of window-related behaviors and is used to describe the type of window operation, such as setting privacy mode, full screen, locking, and other functions. SET_PRIVACY_MODE is the enumeration value of WindowOperateAction, which identifies the operation of performing privacy setting mode. The privacy setting mode can prevent the screen content from being recorded or screenshotted, control the hiding of window content in multi-screen display or mirroring, and blur or block sensitive content of the window. True is a Boolean value, indicating that privacy mode is enabled.

[0033] In detail, the windowClass.operateWindow method may be used to perform screenshot protection, wherein windowClass is an object for window management, and operateWindow is a method of the windowClass object for executing the above-mentioned window privacy configuration method.

[0034] In an embodiment of the present invention, by performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page, it is possible to prevent virus programs or embedded programs from taking screenshots or recording the screen when entering a password, thereby preventing privacy leakage.

[0035] S3. Perform keyboard shuffling on the secondary keyboard page to obtain a secure keyboard page.

[0036] In the embodiment of the present invention, referring to Figure 3 As shown, the step of performing keyboard scrambling on the secondary keyboard page to obtain a secure keyboard page includes: S31, extracting key values ​​from the secondary keyboard page to obtain a keyboard key value sequence; S32, randomly arranging the keyboard key value sequence to obtain a random key value sequence; S33. Perform keyboard update on the secondary keyboard page using the random key value sequence to obtain a secure keyboard page.

[0037] Specifically, the key value may be extracted by using the enent.key event or monitoring the click event, and each keyboard key value in the keyboard key value sequence corresponds to each key value in the keyboard in the secondary keyboard page.

[0038] Specifically, the randomly arranging the keyboard key value sequence to obtain a random key value sequence includes: Selecting two keyboard key values ​​in the keyboard key value sequence as keyboard key value pairs in the order of the serial numbers of the keyboard key value sequence; Generate random numbers in disorder using the preset random number function; Determine whether the random number is greater than a preset random threshold; If not, returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as a keyboard key value pair; If so, swapping the order of the two keyboard key values ​​in the keyboard value pair to obtain a swapped key value pair, updating the keyboard key value sequence with the swapped key value pair, and returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as the keyboard key value pair; Until the keyboard value pair is the last two keyboard key values ​​in the keyboard key value sequence, the keyboard key value sequence is treated as a random key value sequence.

[0039] In detail, the random number function may be a random() function, the disordered random number may be a random number between -1 and 1, and the disorder threshold may be 0.

[0040] Specifically, the keyboard key value sequence is randomly arranged in shuffled order to obtain a shuffled key value sequence. For example, when the shuffled random number is 0.3 and the keyboard key value pair is A, B, the exchanged key value pair after the sequence exchange is B, A.

[0041] In an embodiment of the present invention, by performing keyboard scrambling on the secondary keyboard page to obtain a secure keyboard page, the risk of stealing user input through attacks such as keyloggers, touch position memory, and shoulder peeking can be effectively reduced, thereby improving the security of the secure keyboard.

[0042] S4. Utilize the secure keyboard page to obtain keyboard input events of the user, and perform input mask display on the secure keyboard page according to the keyboard input events.

[0043] Specifically, the keyboard input event refers to an input event corresponding to a user clicking on each keyboard key value in the secure keyboard page. The keyboard input event may be an onKeyDown, onKeyUp, onInput, onClick, or other such event.

[0044] In an embodiment of the present invention, the step of displaying an input mask on the secure keyboard page according to a keyboard input event includes: Extracting input content from the keyboard input event; Generate mask content according to the input content; The mask content is used to input and display the secure keyboard page.

[0045] In detail, the keyboard input event can be bound by a key value acquisition method to extract the input content. The input content refers to the user's input key value, and the input content can be obtained by using the target.dataset.key method.

[0046] Specifically, generating mask content according to the input content means that when the input content is a delete key, the mask content is deleted; when the input content is a general key value, a mask character of a corresponding length is generated as the mask content according to the byte length of the input content, and the mask character can be an asterisk or a dot.

[0047] In an embodiment of the present invention, by utilizing the secure keyboard page to obtain the keyboard input events of the user and displaying the input mask of the secure keyboard page according to the keyboard input events, the input content can be effectively hidden, preventing the risk of stealing the user's input through attacks such as shoulder peeking, thereby improving the security of the secure keyboard.

[0048] S5. Extract input content from the keyboard input event, and encrypt and transmit the input content to obtain secure input content.

[0049] Specifically, the method of extracting input content from the keyboard input event is the same as that in the above step S4, and will not be repeated here.

[0050] In an embodiment of the present invention, before encrypting and transmitting the input content to obtain secure input content, the method further includes: extracting the end content from the input content; determining whether the end content is a submit key value; if not, returning to the step of obtaining the user's keyboard input event using the secure keyboard page, wherein the end content refers to the last key value of the input content, and the submit key value is the enter key value.

[0051] In detail, the encrypted transmission of the input content to obtain secure input content includes: Performing symmetrical encryption on the input content to obtain encrypted content; Performing a hash check on the encrypted content to obtain a verified encrypted content; Handshake transmission is performed on the verification encrypted content to obtain secure input content.

[0052] Specifically, symmetric encryption algorithms such as AES, ChaCha20 and 3DES can be used for symmetric encryption. The hash check refers to calculating the hash summary of the encrypted content and concatenating the hash summary after the encrypted content to obtain the verified encrypted content.

[0053] In detail, the handshake transmission refers to using algorithms such as SSL / TLS handshake to perform handshake communication and data transmission, and transmit the verified encrypted content to the backend.

[0054] In the embodiment of the present invention, by encrypting the input content for transmission, secure input content is obtained, which can prevent the content input by the secure keyboard from being leaked during transmission, further protect data security, and improve data privacy and security.

[0055] The embodiment of the present invention obtains the user's input trigger event by utilizing the current input page, and can respond to the customer's input needs in real time. By initializing the keyboard of the current input page according to the input trigger event, a primary keyboard page is obtained, which can hide the system keyboard and pop up a security keyboard, thereby realizing the introduction of the security keyboard. By performing screenshot protection on the primary keyboard page, a secondary keyboard page is obtained, which can prevent virus programs or embedded programs from taking screenshots or recording the screen when entering the password, thereby causing privacy leakage. By performing keyboard scrambling on the secondary keyboard page to obtain a security keyboard page, the risk of keyboard recorders, touch position memory, shoulder peeking and other attack methods from stealing user input can be effectively reduced, thereby improving the security of the security keyboard.

[0056] By utilizing the secure keyboard page to obtain the user's keyboard input events and displaying the secure keyboard page with an input mask based on the keyboard input events, the input content can be effectively hidden, preventing the risk of stealing the user's input through attacks such as shoulder peeking, thereby improving the security of the secure keyboard. By encrypting the input content for transmission to obtain secure input content, the content entered on the secure keyboard can be prevented from being leaked during transmission, further protecting data security and improving data privacy and security. Therefore, the secure keyboard input method proposed in the present invention can solve the problem of low security during keyboard input.

[0057] like Figure 4 FIG. 1 is a diagram showing the structure of a secure keyboard input device according to an embodiment of the present invention.

[0058] The secure keyboard input device 100 of the present invention can be installed in an electronic device. Depending on the functionality implemented, the secure keyboard input device 100 may include a keyboard initialization module 101, a screenshot protection module 102, a keyboard scrambling module 103, a masked input module 104, and an encrypted transmission module 105. A module, also referred to as a unit, is a series of computer program segments that can be executed by an electronic device processor and perform a fixed function, and is stored in the electronic device's memory.

[0059] In this embodiment, the functions of each module / unit are as follows: The keyboard initialization module 101 is used to obtain a user input trigger event using the current input page, and initialize the keyboard of the current input page according to the input trigger event to obtain a primary keyboard page; The screenshot protection module 102 is used to perform screenshot protection on the primary keyboard page to obtain a secondary keyboard page; The keyboard scrambling module 103 is used to scramble the secondary keyboard page to obtain a secure keyboard page; The mask input module 104 is configured to obtain keyboard input events of the user using the secure keyboard page, and perform input mask display on the secure keyboard page according to the keyboard input events; The encryption transmission module 105 is used to extract input content from the keyboard input event and encrypt and transmit the input content to obtain secure input content.

[0060] In detail, each module in the secure keyboard input device 100 of the embodiment of the present invention is used in the same manner as above. Figures 1 to 3 The secure keyboard input method described in the present invention has the same technical means and can produce the same technical effects, so it will not be repeated here.

[0061] like Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a secure keyboard input method according to an embodiment of the present invention.

[0062] The electronic device 1 may include a processor 10 , a memory 11 , a communication bus 12 , and a communication interface 13 , and may further include a computer program stored in the memory 11 and executable on the processor 10 , such as a secure keyboard input program.

[0063] In some embodiments, the processor 10 may be comprised of an integrated circuit, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device using various interfaces and circuits. It executes or runs programs or modules stored in the memory 11 (e.g., executing a secure keyboard input program) and accesses data stored in the memory 11 to perform various functions of the electronic device and process data.

[0064] The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device. Furthermore, the memory 11 may include both an internal storage unit of the electronic device and an external storage device. The memory 11 can be used not only to store application software installed in the electronic device and various types of data, such as code for a secure keyboard input program, but also to temporarily store data that has been output or is about to be output.

[0065] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0066] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0067] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0068] For example, although not shown, the electronic device may further include a power source (e.g., a battery) to power various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby enabling functions such as charge management, discharge management, and power consumption management via the power management device. The power source may further include any of one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, and the like, which are not further detailed here.

[0069] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0070] The secure keyboard input program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When executed in the processor 10, it can achieve the following: Using the current input page to obtain a user input trigger event, and performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page; Performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page; Performing keyboard shuffling on the secondary keyboard page to obtain a secure keyboard page; Utilizing the secure keyboard page to obtain a keyboard input event of the user, and displaying an input mask on the secure keyboard page according to the keyboard input event; Input content is extracted from the keyboard input event, and the input content is encrypted and transmitted to obtain secure input content.

[0071] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0072] Furthermore, if the modules / units integrated into the electronic device 1 are implemented as software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. The computer-readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0073] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor of an electronic device, the computer program can implement: Using the current input page to obtain a user input trigger event, and performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page; Performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page; Performing keyboard shuffling on the secondary keyboard page to obtain a secure keyboard page; Utilizing the secure keyboard page to obtain a keyboard input event of the user, and displaying an input mask on the secure keyboard page according to the keyboard input event; Input content is extracted from the keyboard input event, and the input content is encrypted and transmitted to obtain secure input content.

[0074] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.

[0075] 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 units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0076] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0077] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0078] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.

[0079] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, techniques, and application devices that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0080] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in an apparatus embodiment may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.< / option> < / button>

Claims

1. A secure keyboard input method, characterized in that: The method comprises: Using the current input page to obtain a user input trigger event, and performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page; Performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page; Performing keyboard shuffling on the secondary keyboard page to obtain a secure keyboard page; Utilizing the secure keyboard page to obtain a keyboard input event of the user, and displaying an input mask on the secure keyboard page according to the keyboard input event; Input content is extracted from the keyboard input event, and the input content is encrypted and transmitted to obtain secure input content.

2. The secure keyboard input method according to claim 1, wherein: The step of performing keyboard initialization on the current input page according to the input trigger event to obtain a primary keyboard page includes: Performing event source analysis on the input trigger event to obtain event source attributes; Performing page environment detection on the current input page to obtain a page environment type; Generate a page type according to the event source attribute and the page environment type; Determine whether the page type is a native type; If yes, then secure keyboard mounting is performed on the current input page to obtain a primary keyboard page; If not, hiding the system keyboard of the current input page to obtain a hidden input page; The hidden input page is loaded with a keyboard pop-up window to obtain a primary keyboard page.

3. The secure keyboard input method according to claim 1, wherein: The step of performing screenshot protection on the primary keyboard page to obtain a secondary keyboard page includes: Performing window detection on the primary keyboard page to obtain a page window; Performing window privacy configuration on the page window to obtain a privacy window; The primary keyboard page is screen-shot and protected according to the privacy window to obtain a secondary keyboard page.

4. The secure keyboard input method according to claim 1, wherein: The step of performing keyboard scrambling on the secondary keyboard page to obtain a secure keyboard page includes: Extracting key values ​​from the secondary keyboard page to obtain a keyboard key value sequence; Randomly arranging the keyboard key value sequence to obtain a random key value sequence; The secondary keyboard page is updated by using the random key value sequence to obtain a secure keyboard page.

5. The secure keyboard input method according to claim 1, wherein: The randomly arranging the keyboard key value sequence to obtain a random key value sequence includes: Selecting two keyboard key values ​​in the keyboard key value sequence as keyboard key value pairs in the order of the serial numbers of the keyboard key value sequence; Generate random numbers in disorder using the preset random number function; Determine whether the random number is greater than a preset random threshold; If not, returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as a keyboard key value pair; If so, swapping the order of the two keyboard key values ​​in the keyboard value pair to obtain a swapped key value pair, updating the keyboard key value sequence with the swapped key value pair, and returning to the step of selecting two keyboard key values ​​in the keyboard key value sequence one by one in sequence as the keyboard key value pair; Until the keyboard value pair is the last two keyboard key values ​​in the keyboard key value sequence, the keyboard key value sequence is treated as a random key value sequence.

6. The secure keyboard input method according to claim 1, wherein: The step of displaying an input mask on the secure keyboard page according to a keyboard input event includes: Extracting input content from the keyboard input event; Generate mask content according to the input content; The mask content is used to input and display the secure keyboard page.

7. The secure keyboard input method according to claim 1, wherein: The step of encrypting and transmitting the input content to obtain secure input content includes: Performing symmetrical encryption on the input content to obtain encrypted content; Performing a hash check on the encrypted content to obtain a verified encrypted content; Handshake transmission is performed on the verification encrypted content to obtain secure input content.

8. A secure keyboard input device, characterized in that: The device comprises: A keyboard initialization module is used to obtain a user input trigger event using the current input page, and initialize the keyboard of the current input page according to the input trigger event to obtain a primary keyboard page; A screenshot protection module, configured to perform screenshot protection on the primary keyboard page to obtain a secondary keyboard page; A keyboard scrambling module, configured to scramble the secondary keyboard page to obtain a secure keyboard page; a mask input module, configured to obtain keyboard input events of the user using the secure keyboard page, and perform input mask display on the secure keyboard page according to the keyboard input events; The encryption transmission module is used to extract input content from the keyboard input event and encrypt and transmit the input content to obtain secure input content.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the secure keyboard input method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the secure keyboard input method according to any one of claims 1 to 7 is implemented.