Data input method and device of intelligent POS with silica gel keyboard

By configuring a silicone keyboard on the outside of the smart POS and detecting and adjusting the touch window matrix, the data input problem for visually impaired users and users wearing gloves is solved, achieving higher input accuracy and a wider range of application scenarios.

CN120653174BActive Publication Date: 2025-11-04FEITIAN TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511164189.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-11-04
Estimated Expiration
2045-08-20

AI Technical Summary

Technical Problem

Existing smart POS devices cannot meet the data input needs of visually impaired users and users in special scenarios where gloves must be worn. Traditional virtual keyboards cannot accurately sense input data, and full-screen touch is not applicable.

Method used

A silicone keyboard is installed on the outside of the smart POS device. By detecting the presence of the silicone keyboard and adjusting the touch window matrix on the display screen, the user operation is judged and the key value is determined to realize data input.

Benefits of technology

It improves the accuracy of data input for visually impaired users, expands the application scenarios of smart POS, is suitable for special environments where gloves are worn, and is easy to use without affecting the operation of ordinary users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653174B_ABST
    Figure CN120653174B_ABST
Patent Text Reader

Abstract

The application discloses a data input method and device of a smart POS with a silica gel keyboard, and the method comprises the following steps: when the smart POS detects that there is a silica gel keyboard outside, confirming the key area and touch window matrix of the silica gel keyboard on the display screen of the smart POS, adjusting the touch window on the display screen according to the touch window matrix, waiting for user operation, obtaining the coordinate information of the user touch position when a touch signal is received, judging whether the user operation is in the key area of the silica gel keyboard on the display screen of the smart POS according to the coordinate information, if yes, determining the key value corresponding to the user touch position according to the key matrix corresponding to each key of the silica gel keyboard and the coordinate information, and saving the key value in a storage area. The technical scheme of the application does not need to make any modification on the application program in the smart POS, is suitable for not only ordinary users but also visually impaired users and outdoor special scenes, and is safe and convenient to use.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent terminals, in particular to a data input method and device of an intelligent POS with a silica gel keyboard. BACKGROUND

[0002] With the development of computer technology, traditional industrial or commercial terminal devices (such as POS) are iterated to intelligent terminal devices, that is, traditional terminal devices with physical keys are replaced by full-screen touch intelligent terminals (such as intelligent POS). When the intelligent terminal is used, a virtual keyboard is popped up on the display screen, and the user directly clicks on the virtual keyboard for input. However, for special groups of people with visual impairment, it is difficult to accurately perceive whether the input data is correct. In addition, the full-screen touch intelligent POS is not suitable for special scenarios where users must wear gloves to work (for example, outdoor work in cold weather). Therefore, it is urgent to provide an implementation scheme for inputting data on an intelligent POS suitable for visually impaired users or special scenarios where gloves are worn to work. SUMMARY

[0003] The purpose of the present application is to overcome the shortcomings of the prior art and provide a data input method and device of an intelligent POS with a silica gel keyboard.

[0004] In a first aspect, the present application provides a data input method of an intelligent POS with a silica gel keyboard, comprising:

[0005] Step S1: When the intelligent POS detects that there is a silica gel keyboard outside, confirm the key area and touch window matrix of the silica gel keyboard on the display screen of the intelligent POS;

[0006] Step S2: The intelligent POS adjusts the touch window on the display screen according to the touch window matrix;

[0007] Step S3: The intelligent POS waits for user operation, acquires coordinate information of the user touch position when a touch signal is received, and determines whether the user operation is in the key area of the silica gel keyboard on the display screen of the intelligent POS according to the coordinate information. If yes, execute step S4, otherwise perform corresponding operation according to the coordinate information;

[0008] Step S4: The intelligent POS determines the key value corresponding to the user touch position according to the key matrix corresponding to each key of the silica gel keyboard saved internally and the coordinate information;

[0009] Step S5: The intelligent POS saves the key value in the storage area.

[0010] In a second aspect, the present application further provides a data input device of an intelligent POS with a silica gel keyboard, comprising:

[0011] The confirmation module is configured to confirm a key area and a touch window matrix of the silica gel keyboard on the display screen of the smart POS when the silica gel keyboard outside the smart POS is detected.

[0012] The adjustment module is configured to adjust the touch window on the display screen according to the touch window matrix.

[0013] The acquisition judgment module is configured to wait for a user operation, acquire coordinate information of a user touch position when a touch signal is received, and judge whether the user operation is in the key area of the silica gel keyboard on the display screen of the smart POS according to the coordinate information.

[0014] The determination module is configured to determine a key value corresponding to the user touch position according to a key matrix corresponding to each key of the silica gel keyboard and the coordinate information.

[0015] The storage module is configured to save the key value in a storage area.

[0016] In a third aspect, an electronic device is provided, the electronic device including at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor to implement the method described above.

[0017] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium including a computer program that, when executed on an electronic device, causes the electronic device to perform the method described above.

[0018] In a fifth aspect, a chip system is provided, the chip system including a chip coupled with a memory, the chip configured to execute a computer program stored in the memory to perform the method described above.

[0019] Compared with the prior art, the present application has the following advantages:

[0020] The technical scheme of the present application, when the intelligent POS is normally used, the user inputs data on the pop-up keyboard, when used by a visually impaired user, a silica gel keyboard is configured outside the intelligent POS, the silica gel keyboard has protruding keys, the visually impaired user inputs data through the keys, greatly improving the data input accuracy; and in a special scene (for example, outdoor work in cold weather), the user wearing gloves can also operate the display screen through the keys on the silica gel keyboard, which can expand the application scene of the intelligent POS, and the silica gel keyboard can be removed, and the intelligent POS can be normally used, which is convenient to use. The technical scheme of the present application does not need to modify the application program in the intelligent POS, when the silica gel keyboard is connected, the touch area of the intelligent POS becomes smaller, and when the silica gel keyboard is removed, the touch area of the intelligent POS returns to the original state, which is not only suitable for ordinary users, but also suitable for visually impaired users and outdoor special scenes, and is safe and convenient to use. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 A data input method of the intelligent POS with a silica gel keyboard provided by the first embodiment of the present application is provided.

[0022] Figure 2 A structure diagram of the silica gel keyboard provided by the second embodiment of the present application is provided.

[0023] Figure 3 A structure diagram of the intelligent POS provided by the second embodiment of the present application is provided.

[0024] Figure 4 A structure diagram of the intelligent POS with a silica gel keyboard provided by the second embodiment of the present application is provided.

[0025] Figure 5 A data input method of the intelligent POS with a silica gel keyboard provided by the second embodiment of the present application is provided.

[0026] Figure 6 An interrupt processing flowchart in the data input method of the intelligent POS with a silica gel keyboard provided by the second embodiment of the present application is provided.

[0027] Figure 7 A listening sub-thread operation flowchart in the data input method of the intelligent POS with a silica gel keyboard provided by the second embodiment of the present application is provided.

[0028] Figure 8 A position diagram of the silica gel key on the key area of the display screen of the intelligent POS provided by the second embodiment of the present application is provided. DETAILED DESCRIPTION

[0029] The application provides a data input method and device of a smart POS with a silica gel keyboard. The specific embodiments of the application are described in detail below with reference to the accompanying drawings. The examples of the embodiments are shown in the drawings. The embodiments described below with reference to the drawings are exemplary and are used to explain the application, but cannot be interpreted as a limitation of the application.

[0030] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such herein.

[0031] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application are further described in detail below with reference to the accompanying drawings. Embodiment One

[0032] The embodiment one of the present application provides a data input method of a smart POS with a silica gel keyboard, which is suitable for a smart POS with a configurable silica gel keyboard. The silica gel keyboard and the smart POS can be fixed and connected in communication through a pogopin connector, or can be fixed through a magnet. When fixed through the magnet, the smart POS can detect the silica gel keyboard outside through a light sensor or a hall sensor or an NFC module.

[0033] As shown in FIG. 1, the method of the embodiment includes: Figure 1

[0034] Step S1: When the smart POS detects the silica gel keyboard outside, confirm the key area and touch window matrix of the silica gel keyboard on the display screen of the smart POS.

[0035] In the embodiment, the smart POS can adapt to various silica gel keyboards. Therefore, step S1 includes: when the smart POS detects the silica gel keyboard outside, obtaining the silica gel keyboard identifier from the silica gel keyboard, and confirming the key area and touch window matrix of the corresponding silica gel keyboard on the display screen of the smart POS according to the silica gel keyboard identifier.

[0036] Optionally, the silica gel keyboard identifier can be a silica gel keyboard device identifier, a device model or a device size.

[0037] ​Optionally, the matching silicone key's key area on the display screen of the smart POS and the touch window matrix are pre-stored in the smart POS, for example, if the smart POS is compatible with one silicone keyboard, step S1 is replaced by: when the smart POS detects the silicone keyboard outside, the saved silicone keyboard's key area on the display screen of the smart POS and the touch window matrix are obtained; if the smart POS is compatible with multiple silicone keyboards, step S1 is replaced by: when the smart POS detects the silicone keyboard outside, the silicone keyboard identifier is obtained from the silicone keyboard, and the corresponding silicone keyboard's key area on the display screen of the smart POS and the touch window matrix are obtained from the smart POS according to the silicone keyboard identifier.

[0038] In the embodiment, if the silicone keyboard is fixed and connected to the smart POS through the pogopin connector, the smart POS detecting the silicone keyboard outside in step S1 includes: after the kernel of the smart POS detects the change of the external voltage through the detection pin, the interrupt processing function is called to enter the interrupt processing, and the interrupt processing includes:

[0039] Step R1: the kernel of the smart POS delays for a first time length, the input state of the detection pin is obtained, and it is judged whether the input state of the detection pin is low; if yes, step R2 is executed, otherwise step R3 is executed.

[0040] Optionally, if the smart POS is compatible with multiple silicone keyboards, before step R2 is executed in step R1, the kernel of the smart POS further obtains the silicone keyboard identifier from the silicone keyboard.

[0041] Step R2: the kernel creates a listening sub-thread, starts to listen to the external USB device registration event through the listening sub-thread, and exits the interrupt processing.

[0042] Step R3: the kernel judges whether the silicone keyboard state is inserted; if yes, the silicone keyboard state is recorded as pulled out, the silicone keyboard state switching notification is generated according to the silicone keyboard state and reported to the upper application of the smart POS, and the interrupt processing is exited, otherwise the interrupt processing is directly exited.

[0043] When the listening sub-thread listens to the USB device registration event, step A1 is executed.

[0044] Step A1: the listening sub-thread judges whether there is a accessory loading thread in the accessory list according to the accessory list; if yes, step A4 is executed, otherwise step A2 is executed.

[0045] Step A2: the listening sub-thread judges whether there is a accessory loading thread in the accessory list within a second time length; if yes, step A4 is executed, otherwise the delay time is updated, and step A3 is executed.

[0046] Step A3: The monitoring sub-thread determines whether the delay time reaches the second preset value. If yes, the monitoring sub-thread exits; otherwise, it returns to step A1.

[0047] Step A4: The monitoring sub-thread records the silica gel keyboard state as inserted, generates a silica gel keyboard state switching notification according to the silica gel keyboard state, and reports it to the upper-layer application. The monitoring sub-thread exits.

[0048] Optionally, if the smart POS is adapted to multiple silica gel keyboards, step A4 includes: the monitoring sub-thread records the silica gel keyboard state as inserted, generates a silica gel keyboard state switching notification according to the silica gel keyboard identifier and the silica gel keyboard state, and reports it to the upper-layer application. The monitoring sub-thread exits.

[0049] The upper-layer application of the smart POS receives the silica gel keyboard state switching notification. If the silica gel keyboard state in the silica gel keyboard state switching notification is inserted, it is determined that there is a silica gel keyboard outside the smart POS. If the silica gel keyboard state in the silica gel keyboard state switching notification is pulled out, it is determined that there is no silica gel keyboard outside the smart POS.

[0050] If the smart POS in the embodiment detects the silica gel keyboard outside through the optical sensor or the Hall sensor or the NFC module, the smart POS detects the silica gel keyboard outside in step S1, which specifically includes: when the kernel of the smart POS detects the change of the external voltage through the detection pin, it calls the interrupt processing function to enter the interrupt processing. The interrupt processing includes:

[0051] Step M: The kernel obtains the detection pin level of the optical sensor, determines whether the detection pin level is low, and if yes, reports a silica gel keyboard state switching notification containing the silica gel keyboard state as inserted to the upper-layer application of the smart POS, and exits the interrupt. If not, it reports a silica gel keyboard state switching notification containing the silica gel keyboard state as pulled out to the upper-layer application of the smart POS, and exits the interrupt.

[0052] Alternatively, step N: the kernel obtains the state feedback of the Hall sensor, determines whether the detection pin in the state feedback of the Hall sensor is high, and if yes, reports a silica gel keyboard state switching notification containing the silica gel keyboard state as inserted to the upper-layer application of the smart POS, and exits the interrupt. If not, it reports a silica gel keyboard state switching notification containing the silica gel keyboard state as pulled out to the upper-layer application of the smart POS, and exits the interrupt.

[0053] Or, step L: the kernel sends a silica gel keyboard data acquisition request to the silica gel keyboard through the NFC module, receives the NFC tag information returned by the silica gel keyboard through the NFC module and parses it, judges whether the silica gel keyboard identifier obtained by parsing is the first preset data, and if yes, reports a switch silica gel keyboard state notification containing the silica gel keyboard state as inserted to the upper application of the smart POS, exits the interruption, otherwise, reports a switch silica gel keyboard state notification containing the silica gel keyboard state as pulled out to the upper application of the smart POS, and exits the interruption;

[0054] The upper application of the smart POS receives the switch silica gel keyboard state notification, and determines that there is a silica gel keyboard outside the smart POS if the silica gel keyboard state in the switch silica gel keyboard state notification is inserted, and determines that there is no silica gel keyboard outside the smart POS if the silica gel keyboard state in the switch silica gel keyboard state notification is pulled out.

[0055] Optionally, if the smart POS is adapted to multiple silica gel keyboards, when the determination in step N is yes, the kernel confirms the silica gel keyboard identifier through the state of the Hall sensor, writes the silica gel keyboard identifier into a node, and the upper application reads the silica gel keyboard identifier in the node after receiving the switch silica gel keyboard state notification; or, when the determination in step L is yes, the kernel writes the silica gel keyboard identifier obtained by parsing into a node, and the upper application reads the silica gel keyboard identifier in the node after receiving the switch silica gel keyboard state notification.

[0056] Optionally, if the smart POS is adapted to multiple silica gel keyboards, the confirmation of the key area and the touch window matrix of the silica gel keyboard on the display screen of the smart POS in step S1 comprises: the upper application confirms the key area and the touch window matrix of the corresponding silica gel keyboard on the display screen of the smart POS according to the silica gel keyboard identifier.

[0057] In the embodiment, before step S1, the method further comprises:

[0058] Step T1: the kernel is loaded, and the kernel parses the device tree to obtain the information of the detection foot;

[0059] Step T2: the kernel registers an interrupt processing function required for the detection foot to generate an interruption, and initializes the interrupt processing function according to the information of the detection foot.

[0060] Optionally, if the smart POS is adapted to multiple silica gel keyboards and the pixel size of each silica gel keyboard is saved internally, step S1 comprises: acquiring the silica gel keyboard identifier from the silica gel keyboard when the smart POS detects that there is a silica gel keyboard outside, acquiring the pixel size of the corresponding silica gel keyboard according to the silica gel keyboard identifier, calculating the key area of the silica gel keyboard on the display screen of the smart POS according to the pixel size of the silica gel keyboard, and calculating the touch window matrix according to the key area;

[0061] Or the size of each silica gel keyboard is not saved in the smart POS, and the step S1 comprises: acquiring the pixel size of the silica gel keyboard from the silica gel keyboard when the smart POS detects that there is a silica gel keyboard outside, calculating the key area of the silica gel keyboard on the display screen of the smart POS according to the pixel size of the silica gel keyboard, and calculating the touch window matrix according to the key area;

[0062] The touch window matrix in the embodiment comprises window size and window position information.

[0063] Step S2: The smart POS adjusts the touch window on the display screen according to the touch window matrix;

[0064] In the embodiment, the step S2 comprises: the smart POS delivers the touch window size and the touch window position information of the touch window matrix to the SurfaceFlinger process of the operating system through the window manager, the operating system draws the touch window by running the SurfaceFlinger process, and renders the touch window image through OpenGL and displays;

[0065] Step S3: The smart POS waits for user operation, acquires the coordinate information of the user touch position when receiving the touch signal, judges whether the user operation is in the key area of the silica gel keyboard on the display screen of the smart POS according to the coordinate information, executes step S4 if yes, and otherwise performs corresponding operation according to the coordinate information;

[0066] Specifically, in the embodiment, the step S3 comprises: the kernel of the smart POS waits for user operation, acquires the coordinate information of the user touch position when receiving the touch signal, judges whether the user operation is in the key area of the silica gel keyboard on the display screen of the smart POS according to the coordinate information, executes step S4 if yes, and otherwise returns the coordinate information to the upper application of the smart POS, and the upper application performs corresponding operation according to the coordinate information;

[0067] Step S4: The smart POS determines the key value corresponding to the coordinate information according to the key matrix corresponding to each key of the silica gel keyboard and the coordinate information saved internally;

[0068] Correspondingly, the step S4 comprises: the kernel determines the key value corresponding to the coordinate information according to the key matrix corresponding to each key of the silica gel keyboard saved internally, and reports the determined key value to the upper application through the input subsystem;

[0069] Optionally, if the smart POS adapts to multiple silica gel keyboards, the step S4 comprises: the smart POS acquires the key matrix corresponding to each key of the silica gel keyboard saved internally according to the silica gel keyboard identifier, and determines the key value corresponding to the coordinate information according to the acquired key matrix corresponding to each key of the silica gel keyboard and the coordinate information;

[0070] Step S5: the smart POS saves the key value in the storage area;

[0071] In this embodiment, step S5 includes that the upper application of the smart POS saves the received key value in the storage area.

[0072] In this embodiment, if the data input by the user is a password, step S5 includes that the smart POS saves the key value in the password storage area, judges whether the password input is successfully completed, if yes, prompts the user that the password input is successful, and ends, otherwise, returns to step S3;

[0073] Further, step S5 specifically includes that the smart POS judges the type of the key corresponding to the key value, if it is a cancel key, prompts the user to cancel the operation, clears the data in the password storage area, and ends, if it is a character key, saves the key value in sequence in the password storage area, prompts the user that the current number input is completed, and returns to step S3, if it is a confirmation key, judges whether the length of the data in the password storage area meets the requirement, if yes, prompts the user that the password input is completed, and ends, otherwise, reports an error;

[0074] Optionally, prompting the user that the current number input is completed specifically includes that the smart POS voice broadcasts the serial number of the key value in the password storage area; prompting the user to cancel the operation and prompting the user that the password input is completed specifically include voice prompting.

[0075] Alternatively, prompting the user that the current number input is completed specifically includes that the smart POS displays a preset character on the display screen; prompting the user to cancel the operation and prompting the user that the password input is completed specifically include voice prompting or displaying a text prompt on the display screen of the smart POS.

[0076] Optionally, in this embodiment, if the user removes the silica gel keyboard, the smart POS confirms that the key area is 0 and restores the touch window to the size of the display screen, and the implementation process includes steps P1-P3.

[0077] Step P1: when the smart POS detects that the external silica gel keyboard is removed, according to the state of the silica gel keyboard, confirms that the pixel size of the key area of the silica gel keyboard on the display screen of the smart POS is 0;

[0078] Step P2: the smart POS restores the touch window to full screen according to the pixel size of the key area and the resolution of the display screen of the smart POS;

[0079] Specifically, step P2 includes that the smart POS calls an interface to restore the touch window to full screen according to the pixel size of the key area and the resolution of the display screen of the smart POS, that is, the user can perform full-screen touch operation;

[0080] Step P3: the smart POS waits for user operation, and when receiving operation information that the user touches the display screen, corresponding operation is performed.

[0081] In the embodiment, when the smart POS is normally used, the user inputs data on the popped-up keyboard, and when used by a visually impaired user, a silica gel keyboard is configured outside the smart POS, the silica gel keyboard has protruding keys, the visually impaired user inputs data through the keys, and the data input correctness is greatly improved; and in a special scene (for example, outdoor work in cold weather), the user wearing gloves can also operate the display screen through the keys on the silica gel keyboard, the application scene of the smart POS can be expanded, and the smart POS can be normally used when the silica gel keyboard is removed, and the use is convenient. The method of the embodiment does not need to make any modification to the application program in the smart POS, the touch area of the smart POS becomes smaller when the silica gel keyboard is connected, and the touch area of the smart POS returns to the original state when the silica gel keyboard is removed, so that the method is not only suitable for ordinary users, but also suitable for visually impaired users and outdoor special scenes, and the use is safe and convenient. Embodiment two

[0082] The embodiment two of the application provides a data input method of a smart POS with a silica gel keyboard, and is suitable for a smart POS with a silica gel keyboard. As shown in Figure 2 The upper half of the front of the silica gel keyboard is hollowed out 22, and the lower half is a silica gel key 21, which can include number keys (1, 2, 3, 4, 5, 6, 7, 8, 9, 0) and function keys (such as up, down, cancel, delete, enter, etc.). As shown in Figure 3 The front of the smart POS is a display screen 30. As shown in Figure 4 The silica gel keyboard is sleeved on the front of the smart POS for use. Specifically, the silica gel keyboard is fixed and connected in communication with the smart POS through a pogopin connector.

[0083] The smart POS in the embodiment includes a kernel and an upper layer application, and the smart POS is adapted to multiple silica gel keyboards, as shown in Figure 5 The method of the embodiment includes the following steps.

[0084] Step 201: when the kernel detects that there is a silica gel keyboard outside, a switching silica gel keyboard state notification containing a silica gel keyboard state of insertion is sent to the upper layer application;

[0085] In the embodiment, if the silica gel keyboard state is a first preset value, it indicates that the silica gel keyboard is inserted.

[0086] In the embodiment, step 201 includes: after the kernel detects that the external voltage changes through the detection foot, an interrupt processing function is called through an interrupt controller to enter interrupt processing, and the specific process of the interrupt processing is as shown in Figure 6 The specific process includes the following steps.

[0087] Step 301: the kernel delays for a first time duration, acquires the input state of the detection foot, and judges whether the input state of the detection foot is low; if yes, step 302 is executed; otherwise, step 304 is executed;

[0088] Specifically, the first time duration in the embodiment is 500 ms;

[0089] Step 302: the kernel acquires the silica gel keyboard identifier from the silica gel keyboard;

[0090] Step 303: the kernel creates a listening sub-thread, starts to listen to the USB device registration event through the listening sub-thread, and exits the interrupt processing;

[0091] The listening sub-thread in the embodiment is used to listen to the registration event of the USB device, as shown in FIG. 5, when the listening sub-thread listens to the USB device registration event, step A1 is executed; Figure 7

[0092] Step A1: the listening sub-thread judges whether there is a accessory loading thread according to the accessory list; if yes, step A4 is executed; otherwise, step A2 is executed;

[0093] Step A2: the listening sub-thread judges whether a accessory loading thread in the accessory list is detected within a second time duration; if yes, step A4 is executed; otherwise, the delay times is updated, and step A3 is executed;

[0094] The second time duration in the embodiment is 1 s; the delay times is updated specifically as follows: the delay times is increased by 1;

[0095] Step A3: the listening sub-thread judges whether the delay times reaches a second preset value; if yes, the listening sub-thread exits; otherwise, step A1 is returned;

[0096] The second preset value in the embodiment is 4;

[0097] Step A4: the listening sub-thread records the silica gel keyboard state as inserted, generates a switching silica gel keyboard state notification according to the silica gel keyboard identifier and the silica gel keyboard state, and reports the switching silica gel keyboard state notification to the upper application, and the listening sub-thread exits;

[0098] Optionally, in the embodiment, the flag is set to 1, indicating that the silica gel keyboard state is inserted; if the flag is 0, it indicates that the silica gel keyboard state is pulled out; the switching silica gel keyboard state notification in step A4 contains flag=1;

[0099] Step 304: the kernel judges whether the silica gel keyboard state is inserted; if yes, the silica gel keyboard state is recorded as pulled out, a switching silica gel keyboard state notification is generated according to the silica gel keyboard state, and is reported to the upper application, and the interrupt processing is exited; otherwise, the interrupt processing is directly exited;

[0100] ​Specifically, the step 304 comprises: the kernel judging whether the flag is 1, if yes, assigning the flag as 0, reporting the switching silica gel keyboard state notification containing the flag=0 to the upper layer application, exiting the interrupt processing, otherwise, directly exiting the interrupt processing.

[0101] Specifically, the step 201 in the embodiment comprises:

[0102] The step T1: the kernel is loaded, and the kernel parses the device tree to obtain the information of the detection pin;

[0103] In the embodiment, the device tree is pre-set in the smart POS, the device tree contains the detection pin corresponding to the pin on the chip, the driving capacity (how much current is needed) required by the detection pin, and the smart POS configures the detection pin as the corresponding mode in the use and sleep processes, the mode comprising: high resistance, pull-up, and pull-down;

[0104] The step T2: the kernel registers the interrupt processing function required by the detection pin to generate the interrupt, and initializes the interrupt processing function according to the information of the detection pin;

[0105] In the embodiment, the step T2 comprises: the kernel sets the pin corresponding to the detection pin on the CPU chip as the input state, registers the interrupt processing function, and initializes the interrupt processing function according to the information of the detection pin;

[0106] The step 202: when the upper layer application receives the switching silica gel keyboard state notification, the pixel size of the corresponding saved silica gel keyboard is obtained according to the silica gel keyboard identifier in the switching silica gel keyboard state notification, the key area size and the touch window matrix of the silica gel keyboard on the display screen of the smart POS are calculated according to the obtained pixel size of the silica gel keyboard;

[0107] The touch window matrix in the embodiment comprises the touch window size and the touch window position information;

[0108] Optionally, in the embodiment, if the pixel size of the silica gel keyboard is not saved in the smart POS in advance, the pixel size of the silica gel keyboard is directly obtained from the silica gel keyboard, that is, obtaining the pixel size of the corresponding saved silica gel keyboard according to the silica gel keyboard identifier in the switching silica gel keyboard state notification is replaced by: when the kernel detects that there is a silica gel keyboard outside, the silica gel keyboard identifier and the pixel size of the silica gel keyboard are obtained from the silica gel keyboard and saved in the node;

[0109] Specifically, in the embodiment, step 202 comprises: when the upper-layer application receives the switching silica gel keyboard state notification, obtaining the corresponding path according to the silica gel keyboard identifier, reading the pixel size of the silica gel keyboard according to the path, obtaining the saved resolution of the display screen of the smart POS, determining the key area of the silica gel keyboard on the display screen of the smart POS according to the pixel size of the silica gel keyboard, and calculating the touch window size and the touch window position information according to the resolution of the display screen of the smart POS and the size of the key area.

[0110] Further, the upper-layer application finds the corresponding / proc / keyvoard_sleeve node according to the silica gel keyboard identifier, reads the pixel size of the silica gel keyboard from the found node using the standard read method of java, obtains the saved resolution of the display screen of the smart POS, takes the pixel size of the silica gel keyboard as the size of the key area of the silica gel keyboard on the display screen of the smart POS, calculates the touch window size according to the resolution of the display screen of the smart POS and the size of the key area, and determines the touch window position information according to the preset rule and the touch window size.

[0111] For example, the silica gel keyboard identifier is F310P-6.5, the saved resolution of the display screen of the smart POS adapted to the silica gel keyboard is 720*1600, the corresponding pixel size of the silica gel keyboard obtained according to the silica gel keyboard identifier is 720*800, the size of the key area of the silica gel keyboard on the display screen of the smart POS is determined as 720*800, and the corresponding touch window size is 720*800. The pixel size of the silica gel keyboard mentioned in the embodiment refers to the size of the front of the silica gel keyboard that can block the display screen of the smart POS.

[0112] For example, the silica gel keyboard identifier is F20-5.5, the saved resolution of the display screen of the smart POS adapted to the silica gel keyboard is 720*1280, the corresponding pixel size of the silica gel keyboard obtained according to the silica gel keyboard identifier is 720*800, the size of the key area of the silica gel keyboard on the display screen of the smart POS is determined as 720*800, and the corresponding touch window size is 720*480.

[0113] Optionally, the preset rule is related to the resolution and size of the display screen of the smart POS, and specifically, the square root of the sum of the square of the horizontal resolution and the square of the vertical resolution of the display screen is obtained as a first calculation result, the first calculation result is divided by the diagonal length of the display screen of the smart POS to obtain a second calculation result, the pixel density is obtained from a pixel density list according to the second calculation result in an upward filing manner, and the touch window position information is obtained according to the preset rule and the pixel density.

[0114] According to the pixel density, the touch window position information is obtained according to the preset rule, and the specific method is as follows: the start point horizontal and vertical coordinates are: the distance between the control placement position and the left and upper edges * (pixel density / reference density), and the end point coordinates are: the start point coordinates + control size * (pixel density / reference density); the start point horizontal and vertical coordinates are: the distance between the control placement position and the right and lower edges * (pixel density / reference density), and the end point horizontal and vertical coordinates are: the start point coordinates + control size * (pixel density / reference density);

[0115] For example, the resolution of the display screen of the smart POS is 720x1600, wherein 720 is the width of the display screen of the smart POS, 1600 is the height of the display screen of the smart POS, the size of the display screen of the smart POS is 6.5 inches (screen diagonal length), the first calculation result (i.e. pixel px) is 1754, and the second calculation result obtained by dividing 1754 by 6.5 is approximately equal to 270. According to 270, the pixel density xhdpi (320 dpi) is obtained from the pixel density list (ldpi (120 dpi), dpi (reference density 160), hdpi (240 dpi), xhdpi (320 dpi), xxhdpi (480 dpi), xxxhdpi (640 dpi)) according to the upward filing mode, i.e. 160 dp (reference density) = 320 px (pixel density);

[0116] Specifically, the silicone keyboard identification F310P-6.5 is taken as an example for description, the preset rule is 1 dp (device-independent pixel) = 2 px (pixel density), and the positions of the left and the upper are each 20 dp. Therefore, the touch window is arranged at the position of the upper left corner (40 px, 40 px), and the touch window occupies the size of the display screen 720 px * 800 px.

[0117] In step 203, the upper application sends the touch window size and the touch window position information of the touch window matrix to the SurfaceFlinger process of the operating system through the window manager, and the operating system draws the touch window by running the SurfaceFlinger process.

[0118] In this embodiment, the upper application confirms the placement area and the size of the touch window on the display screen through the touch window size and the position information, the operating system predicts the view tree, calculates the positions and sizes of various windows in the DecorView, creates a Surface (i.e. a content canvas to be displayed on the screen, using the confirmed rectangle), measures, lays out and draws the canvas, and then notifies the WMS to display the calculated window size, and the positions of various controls are redrawn.

[0119] Step 204: The upper-layer application renders and displays the touch window image using OpenGL (Open Graphics Library).

[0120] Optionally, when a silicone keyboard is connected to a smart POS, if the starting point of the touch window placement position in the preset rules is the upper left corner, the icons on the lower part of the touch screen may be obscured by the silicone keyboard; if the starting point of the touch window placement position in the preset rules is the lower right corner, the icons on the upper part of the touch screen may be moved off the touch screen.

[0121] Step 205: The kernel waits for user operation. When the kernel receives a touch signal, it obtains the coordinate information of the user's touch position. Based on the coordinate information, it determines whether the user's operation is within the key area of ​​the silicone keyboard on the smart POS display screen. If yes, proceed to step 206; otherwise, proceed to step 208.

[0122] Step 206: The kernel determines the key value corresponding to the coordinate information based on the key matrix corresponding to each key of the silicone keyboard that is stored internally and corresponds to the silicone keyboard identifier, and reports the determined key value to the upper layer application through the input subsystem;

[0123] like Figure 8 As shown, the positions of the silicone buttons (1, 2, 3, 4, 5, 6, 7, 8, 9, 0, Scroll Up, Scroll Down, Cancel, Delete, Enter) in the button area are as follows: {(70,1060)(110,1095)}, {(245,1060),(300,1095)}, {(425,1060),(480,1095)}, {(70,1160),(110,1230)}, {(245,1160),(300,1230)}, {(425,1160),(480,1230)}, {(70,130)} 0),(110,1330)},{(245,1300),(300,1330)},{(425,1300),(480,1330)},{(245,1400),(300,1450)},{(70,1400),(110,1450)},{(425,1400),(480,1450)},{(615,1060),(660,1095)},{(615,1180),(660,1220)},{(615,1300),(660,1435)};

[0124] The keys on the silicone keyboard in this embodiment may also include character keys, such as English characters and / or special characters (&, #, etc.);

[0125] Specifically, in this embodiment, the kernel reports the determined key value to the upper-layer application through a system function input_report_key.

[0126] Step 207: The upper-layer application receives the key value and saves it in the password storage area, judges whether the password input is successfully completed, if yes, prompts the user that the password input is successful, and ends, otherwise returns to step 205.

[0127] Specifically, in this embodiment, step 207 includes: the upper-layer application receives the key value, judges the key type corresponding to the key value, if the key type is the cancel key, the user is prompted by voice to cancel the operation, the data in the password storage area is cleared, and the process ends, if the key type is the character key, the received key value is saved in the password storage area in sequence, and the sequence number (such as the sixth, which the visually impaired user hears to know that the confirmation key needs to be pressed to confirm the completion of password input) of the key value in the password storage area is broadcasted by voice, and the process returns to step 205, if the key type is the confirmation key, it is judged whether the length of the data in the password storage area meets the requirement (such as judging whether the length of the data in the password storage area is 6), if yes, the user is prompted by voice that the password input is completed, and the process ends, otherwise, an error is reported.

[0128] Optionally, if the length of the data in the password storage area does not meet the requirement, the data in the password storage area is cleared, the user is prompted to re-input, and the process returns to step 205.

[0129] Optionally, if the upper-layer application judges that the key type corresponding to the key value is the character key, the method of the embodiment further includes: the upper-layer application displays a preset character on the display screen of the smart POS; for example, the preset character is *.

[0130] Step 208: The kernel reports the coordinate information and the current touch state to the upper-layer application.

[0131] In this embodiment, the touch state includes lifting or pressing.

[0132] Step 209: The upper-layer application receives the coordinate information and performs corresponding operations according to the coordinate information.

[0133] For example, the user triggers the menu return key, and the upper-layer application returns and displays the previous pattern.

[0134] Optionally, in this embodiment, if the user pulls out the silica gel keyboard, the smart POS restores full-screen display, and steps 210-212 are executed.

[0135] Step 210: The upper-layer application parses the switching silica gel keyboard state notification to obtain the silica gel keyboard state as pulled out, generates a window state switching notification according to the silica gel keyboard state, and sends the notification to the input event callback of the PWM (English full name: PhoneWindowManager).

[0136] For example, in the embodiment, the silica gel keyboard state flag=0 parsed in step 210 is obtained;

[0137] Specifically, in the embodiment, the upper-layer application listens to the silica gel keyboard state notification through the InputReader thread; the input notification is distributed to the onInputEvent() callback of the PWM through the InputDispatcher;

[0138] Step 211: the PWM receives the window state switching notification and parses it, saves the parsed silica gel keyboard state, confirms that the pixel size of the key area of the silica gel keyboard on the display screen of the smart POS is 0X00 according to the silica gel keyboard state, and restores the touch window to full screen according to the pixel size of the key area and the resolution of the display screen of the smart POS by calling an interface;

[0139] In the embodiment, step 211 includes: the PWM calling a preset method setCoverState() to save the pulled-out silica gel keyboard state in the window state switching notification, and calling updateDisplayConfiguration{} to update the touch window of the smart POS;

[0140] Specifically, calling updateDisplayConfiguration{} to update the touch window of the smart POS includes: determining the height of the key area of the silica gel keyboard on the display screen of the smart POS to be 0 according to the silica gel keyboard state, and triggering window relayout by calling WindowManagerService.relayoutWindow() according to the height of the shielding area;

[0141] Further, triggering window relayout by calling WindowManagerService.relayoutWindow() according to the height of the shielding area includes: adjusting the rectangular area Rect of the lower margin in the WindowManagerService.relayoutWindow() method, mDisplayFrame.bottom-=coverHeight, traversing all WindowStates by performing LayoutAndPlaceSurfacesLocked(), calling computeFrameLw() to calculate the new position of the touch window, generating mWinAnimator.mSurfaceController of WindowStateAnimator to update parameters, and calling SurfaceFlinger through JNI to update the interface of the touch window of the smart POS;

[0142] The smart POS touch window is updated by the JNI to call the SurfaceFlinger to update the graphical interface, specifically, the WindowMangerService calls the setGeometry() method of the SurfaceComposerClient in the SurfaceFlinger through the nativeSetGeometry() method of the SurfaceControl, updates the mBounds of the Layer through the SurfaceFlinger, and marks eGeometryChanged at the same time, triggers the INVALIDATE stage of the onMessageReceived(), completes the graphical synthesis rebuildLayerStacks(), and restores the smart POS full-screen touch window through the rendering of the GPU (English full name: Graphics Processing Unit, Chinese full name: Graphics Processing Unit) and the display of the HWC (English full name: Hardware Composer, Chinese full name: Hardware Composer).

[0143] In the present example, when the silica gel keyboard is pulled out, the size of the touch window (i.e. the display screen) is 720 * 1600, and the starting coordinates of the touch window are (40px, 40px). The touch window is set at the upper left corner (40px, 40px), and the touch window occupies the size of 720px * 1600px of the screen. Embodiment Three

[0144] The embodiment three of the present application provides a data input device of a smart POS with a silica gel keyboard, which is suitable for a system comprising a silica gel keyboard and a smart POS. The silica gel keyboard and the smart POS can be fixed and connected in communication through a pogopin connector, or can be fixed through a magnet. When fixed through the magnet, the smart POS can detect the silica gel keyboard outside through an optical sensor or a Hall sensor or an NFC module.

[0145] The device of the present embodiment comprises:

[0146] The confirmation module is configured to confirm the key area and the touch window matrix of the silica gel keyboard on the display screen of the smart POS when detecting that the silica gel keyboard is outside the smart POS.

[0147] In the present embodiment, the smart POS can adapt to various silica gel keyboards. The confirmation module is specifically configured to acquire the silica gel keyboard identifier from the silica gel keyboard when detecting that the silica gel keyboard is outside, and confirm the key area and the touch window matrix of the corresponding silica gel keyboard on the display screen of the smart POS according to the silica gel keyboard identifier.

[0148] Optionally, the silica gel keyboard identifier can be a silica gel keyboard device identifier, a device model, or a device size.

[0149] Optionally, the matching silicone key's key area on the display screen of the smart POS and the touch window matrix are pre-stored in the smart POS, for example, the smart POS can adapt to one silicone keyboard, and the confirmation module is specifically configured to acquire the stored silicone key's key area on the display screen of the smart POS and the touch window matrix when it is detected that the silicone keyboard is outside the smart POS; or the smart POS can adapt to multiple silicone keyboards, and the confirmation module is specifically configured to acquire the silicone keyboard identifier from the silicone keyboard when it is detected that the silicone keyboard is outside the smart POS, and acquire the silicone key's key area on the display screen of the smart POS and the touch window matrix corresponding to the silicone keyboard identifier from the smart POS;

[0150] In the embodiment, the silicone keyboard is fixed and connected to the smart POS through the pogopin connector, and the confirmation module detects that the silicone keyboard is outside the smart POS, specifically: when the kernel detects that the external voltage changes through the detection pin, the confirmation module calls the interrupt processing function to enter the interrupt processing, and the interrupt processing includes:

[0151] Step R1: the kernel delays for a first time length, acquires the input state of the detection pin, and determines whether the input state of the detection pin is low; if yes, step R2 is performed; otherwise, step R3 is performed.

[0152] Optionally, if the smart POS adapts to multiple silicone keyboards, when the determination in step R1 is yes, the kernel further acquires the silicone keyboard identifier from the silicone keyboard.

[0153] Step R2: the kernel creates a listening sub-thread, starts to listen to the USB device registration event outside through the listening sub-thread, and exits the interrupt processing.

[0154] Step R3: the kernel determines whether the silicone keyboard state is inserted; if yes, the silicone keyboard state is recorded as pulled out, the silicone keyboard state switching notification is generated according to the silicone keyboard state and is reported to the upper-layer application, the interrupt processing is exited, otherwise, the interrupt processing is directly exited.

[0155] When the listening sub-thread listens to the USB device registration event, step A1 is performed.

[0156] Step A1: the listening sub-thread determines whether there is a accessory loading thread according to the accessory list; if yes, step A4 is performed; otherwise, step A2 is performed.

[0157] Step A2: the listening sub-thread determines whether the accessory loading thread in the accessory list is detected within a second time length; if yes, step A4 is performed; otherwise, the delay time is updated, and step A3 is performed.

[0158] Step A3: The monitoring sub-thread determines whether the delay number reaches the second preset value. If yes, the monitoring sub-thread exits; otherwise, it returns to step A1.

[0159] Step A4: The monitoring sub-thread records the silica gel keyboard state as inserted, generates a silica gel keyboard state switching notification according to the silica gel keyboard state, and reports it to the upper-layer application. The monitoring sub-thread exits.

[0160] Optionally, if the smart POS is adapted to multiple silica gel keyboards, step A4 includes: the monitoring sub-thread records the silica gel keyboard state as inserted, generates a silica gel keyboard state switching notification according to the silica gel keyboard identifier and the silica gel keyboard state, and reports it to the upper-layer application. The monitoring sub-thread exits.

[0161] The upper-layer application receives the silica gel keyboard state switching notification. If the silica gel keyboard state in the silica gel keyboard state switching notification is inserted, it is determined that there is a silica gel keyboard outside the smart POS. If the silica gel keyboard state in the silica gel keyboard state switching notification is pulled out, it is determined that there is no silica gel keyboard outside the smart POS.

[0162] If the smart POS in the embodiment detects the silica gel keyboard outside through the optical sensor or the Hall sensor or the NFC module, it is detected that there is a silica gel keyboard outside the smart POS, which specifically includes: when the kernel of the smart POS detects that the external voltage changes through the detection pin, it calls the interrupt processing function to enter the interrupt processing. The interrupt processing includes:

[0163] Step M: The kernel obtains the detection pin level of the optical sensor, determines whether the detection pin level is low, and if yes, reports a silica gel keyboard state switching notification containing the silica gel keyboard state as inserted to the upper-layer application of the smart POS, and exits the interrupt. If not, it reports a silica gel keyboard state switching notification containing the silica gel keyboard state as pulled out to the upper-layer application of the smart POS, and exits the interrupt.

[0164] Alternatively, step N: the kernel obtains the state fed back by the Hall sensor, determines whether the detection pin in the state fed back by the Hall sensor is high, and if yes, reports a silica gel keyboard state switching notification containing the silica gel keyboard state as inserted to the upper-layer application of the smart POS, and exits the interrupt. If not, it reports a silica gel keyboard state switching notification containing the silica gel keyboard state as pulled out to the upper-layer application of the smart POS, and exits the interrupt.

[0165] Alternatively, step L: the kernel sends a silica gel keyboard data acquisition request to the silica gel keyboard through the NFC module, receives the NFC tag information returned by the silica gel keyboard through the NFC module and parses it, determines whether the silica gel keyboard identifier obtained by parsing is the first preset data, and if yes, reports a silica gel keyboard state switching notification containing the silica gel keyboard state as inserted to the upper-layer application of the smart POS, and exits the interrupt. If not, it reports a silica gel keyboard state switching notification containing the silica gel keyboard state as pulled out to the upper-layer application of the smart POS, and exits the interrupt.

[0166] The upper-layer application receives the notification of switching the silicone keyboard state, and determines that there is a silicone keyboard outside the smart POS when the silicone keyboard state in the notification of switching the silicone keyboard state is insertion, and determines that there is no silicone keyboard outside the smart POS when the silicone keyboard state in the notification of switching the silicone keyboard state is pull-out.

[0167] Optionally, when the determination in step N is yes, the kernel confirms the silicone keyboard identifier according to the state fed back by the Hall sensor, writes the silicone keyboard identifier into a node, and the upper-layer application reads the silicone keyboard identifier in the node after receiving the notification of switching the silicone keyboard state; or, when the determination in step L is yes, the kernel writes the silicone keyboard identifier obtained by the analysis into a node, and the upper-layer application reads the silicone keyboard identifier in the node after receiving the notification of switching the silicone keyboard state.

[0168] Optionally, when the smart POS is adapted to multiple silicone keyboards, the confirmation of the key area and the touch window matrix of the silicone keyboard on the display screen of the smart POS in step S1 comprises: the upper-layer application confirms the key area and the touch window matrix of the corresponding silicone keyboard on the display screen of the smart POS according to the silicone keyboard identifier.

[0169] In this embodiment, the confirmation module is further configured to, after the kernel is loaded, obtain information of the detection pin by the kernel analyzing the device tree; and register, by the kernel, an interrupt processing function required for the detection pin to generate an interrupt, and initialize the interrupt processing function according to the information of the detection pin.

[0170] Optionally, when the smart POS is adapted to multiple silicone keyboards, and the pixel size of each silicone keyboard is saved in the smart POS, the confirmation module is specifically configured to: when it is detected that there is a silicone keyboard outside the smart POS, obtain the silicone keyboard identifier from the silicone keyboard, obtain the pixel size of the corresponding silicone keyboard according to the silicone keyboard identifier, calculate the key area of the silicone keyboard on the display screen of the smart POS according to the pixel size of the silicone keyboard, and calculate the touch window matrix according to the key area, wherein the touch window matrix comprises window size and window position information.

[0171] Or, the size of each silicone keyboard is not saved in the smart POS, and the confirmation module is specifically configured to: when it is detected that there is a silicone keyboard outside the smart POS, obtain the pixel size of the silicone keyboard from the silicone keyboard, calculate the key area of the silicone keyboard on the display screen of the smart POS according to the pixel size of the silicone keyboard, and calculate the touch window matrix according to the key area.

[0172] The touch window matrix in this embodiment comprises window size and window position information.

[0173] The adjustment module is configured to adjust the touch window on the display screen according to the touch window matrix.

[0174] In the embodiment, the adjusting module is specifically configured to send the touch window size and the touch window position information of the touch window matrix to a SurfaceFlinger process of an operating system through a window manager, and the operating system draws the touch window by running the SurfaceFlinger process, renders a touch window image through OpenGL, and displays the touch window image.

[0175] The obtaining and judging module is configured to wait for a user operation, obtain coordinate information of a user touch position when a touch signal is received, and judge whether the user operation is in a corresponding key region of the silicone keyboard on the display screen of the POS according to the coordinate information. If yes, the determining module is triggered. Otherwise, corresponding operation is performed according to the coordinate information.

[0176] Specifically, in the embodiment, the obtaining and judging module is specifically configured to wait for a user operation through a kernel, obtain coordinate information of a user touch position when a touch signal is received, and judge whether the user operation is in a corresponding key region of the silicone keyboard on the display screen of the POS according to the coordinate information. If yes, the determining module is triggered. Otherwise, the coordinate information is returned to an upper application of the intelligent POS, and the upper application performs corresponding operation according to the coordinate information.

[0177] The determining module is configured to determine a key value corresponding to the coordinate information according to a key matrix corresponding to each key of the silicone keyboard corresponding to the silicone keyboard identifier and the coordinate information.

[0178] Correspondingly, the determining module is specifically configured to determine the key value corresponding to the coordinate information according to the key matrix corresponding to each key of the silicone keyboard through the kernel, and report the determined key value to the upper application through an input subsystem.

[0179] Optionally, the intelligent POS is adapted to multiple silicone keyboards, and the determining module is specifically configured to obtain the key matrix corresponding to each key of the silicone keyboard corresponding to the silicone keyboard identifier according to the silicone keyboard identifier, and determine the key value corresponding to the coordinate information according to the obtained key matrix corresponding to each key of the silicone keyboard and the coordinate information.

[0180] The storage module is configured to save the key value in a storage area.

[0181] In the embodiment, the storage module is specifically configured to receive the key value through the upper application and save the key value in the storage area.

[0182] In the embodiment, if the data input by the user is a password, the storage module is specifically configured to save the key value in a password storage area, judge whether the password input is successfully completed, prompt the user that the password input is successful if yes, and end. Otherwise, the obtaining and judging module is triggered.

[0183] Furthermore, the storage module is specifically used to determine the key type corresponding to the key value. If it is a cancel key, it prompts the user to cancel the operation, clears the data in the password storage area, and ends. If it is a character key, it saves the key value in the password storage area in sequence, prompts the user to complete the current number input, and triggers the retrieval and judgment module. If it is a confirm key, it determines whether the length of the data in the password storage area meets the requirements. If it does, it prompts the user to complete the password input and ends; otherwise, it reports an error.

[0184] Optionally, if a visually impaired user enters a password on the smart POS via a silicone keyboard, and the smart POS determines that the key type corresponding to the key value is a character key, it will prompt the user that the current number input is complete. Specifically, the smart POS will announce the key value's serial number in the password storage area via voice broadcast.

[0185] Specifically, prompting the user to cancel the operation and prompting the user to complete the password input will be done via voice prompts.

[0186] Optionally, if a regular user enters a password on the smart POS using a silicone keyboard, and the smart POS determines that the key type corresponding to the key value is a character key, it will prompt the user that the current number input is complete. Specifically, the smart POS will display a preset character on the screen.

[0187] Specifically, prompting users to cancel operations and prompting users to complete password input involves either voice prompts or text displays on the smart POS screen.

[0188] Optionally, in this embodiment, the device further includes:

[0189] The pull-out confirmation module is used to confirm that the pixel size of the key area of ​​the silicone keyboard on the display screen of the smart POS is 0 when the removal of the silicone keyboard on the outside of the smart POS is detected.

[0190] The recovery module is used to call the interface to restore the touch window to full screen based on the pixel size of the button area and the display resolution of the smart POS.

[0191] The operation module is used to wait for user operation and perform corresponding operations when it receives operation information from the user touching the display screen.

[0192] Optionally, the embodiments of the present application further provide an electronic device, which comprises at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor, and the at least one processor executes the instructions to implement the data input method of the smart POS with a silica gel keyboard in the above embodiments. When the electronic device is a chip system, the chip system can be composed of a chip or can comprise the chip and other discrete devices, and the embodiments of the present application do not make specific limitations thereon; the chip is coupled with the memory and is used to execute the computer program stored in the memory to execute the data input method of the smart POS with a silica gel keyboard disclosed in the above embodiments.

[0193] In the above embodiments, the implementation can be achieved by software, hardware, firmware or any combination thereof, entirely or partially. When implemented by software, the implementation can be achieved in the form of a computer program product, entirely or partially. The computer program product comprises one or more computer programs. When the computer program is loaded and executed on an electronic device, the flow or function described in the embodiments of the present application is generated entirely or partially. The computer program can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program can be transmitted from one base station, electronic device, server or data center to another base station, electronic device, server or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by the electronic device or a data storage device comprising one or more servers, data centers, etc. integrated with the medium. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc. In the embodiments of the present application, the electronic device can comprise the apparatus described above.

[0194] Although the present application is described herein in conjunction with various embodiments, those skilled in the art will appreciate that other variations of the disclosed embodiments are possible in light of the description and drawings, and the appended claims, and that changes can be made in the embodiments described without departing from the scope of the application. In the claims, the word "comprising" does not exclude other components or steps, and the indefinite article "a" or "an" does not exclude a plurality. A single processor or other unit can fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.

[0195] Although the present application has been described in connection with certain specific features and embodiments thereof, it is to be understood that it is provided as an exemplification of the application and is not intended to limit the scope of the application, which is defined in the claims. Various modifications and changes can be made thereto without departing from the spirit and scope of the application. Accordingly, it is intended that all such modifications and changes be included within the scope of the application as claimed. Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A data input method for a smart POS with a silicone keyboard, characterized in that, include: Step S1: When the smart POS detects a silicone keyboard on the outside, it confirms the key area and touch window matrix of the silicone keyboard on the smart POS display screen; Step S2: The smart POS adjusts the touch windows on the display screen according to the touch window matrix; Step S3: The smart POS waits for user operation. When a touch signal is received, the coordinate information of the user's touch position is obtained. Based on the coordinate information, it is determined whether the user operation is within the key area of ​​the silicone keyboard on the smart POS display screen. If yes, step S4 is executed; otherwise, the corresponding operation is performed based on the coordinate information. Step S4: The smart POS determines the key value corresponding to the user's touch position based on the key matrix corresponding to each key of the silicone keyboard stored internally and the coordinate information; Step S5: The smart POS stores the key value in the storage area.

2. The method as described in claim 1, characterized in that, Step S1 is replaced by: when the smart POS detects a silicone keyboard on the outside, acquiring the saved key area and touch window matrix of the silicone keyboard on the smart POS display screen; Alternatively, when the smart POS detects a silicone keyboard on the outside, it obtains a silicone keyboard identifier from the silicone keyboard and, based on the silicone keyboard identifier, retrieves the corresponding key area and touch window matrix of the silicone keyboard on the smart POS's display screen.

3. The method as described in claim 1, characterized in that, Step S1 includes: when the smart POS detects a silicone keyboard on the outside, obtaining a silicone keyboard identifier from the silicone keyboard, and confirming the corresponding key area and touch window matrix of the silicone keyboard on the display screen of the smart POS based on the silicone keyboard identifier.

4. The method as described in claim 1, characterized in that, The smart POS detects the presence of a silicone keyboard on the outside, including: when the smart POS's core detects a voltage change through a detection pin, it calls an interrupt handling function to enter interrupt handling, the interrupt handling including: Step R1: The kernel of the smart POS delays for a first duration, the kernel obtains the input state of the detection pin, and determines whether the input state of the detection pin is low. If yes, step R2 is executed; otherwise, step R3 is executed. Step R2: The kernel creates a listening sub-thread, which starts listening for external USB device registration events and exits interrupt handling. Step R3: The kernel determines whether the silicone keyboard is inserted. If so, it records the silicone keyboard as removed, generates a notification to switch the silicone keyboard status based on the silicone keyboard status, reports it to the upper-layer application of the smart POS, and exits the interrupt processing; otherwise, it exits the interrupt processing. When the listening sub-thread detects a USB device registration event, step A1 is executed; Step A1: The listening sub-thread determines whether there is a component loading thread based on the component list. If yes, proceed to step A4; otherwise, proceed to step A2. Step A2: The listening sub-thread determines whether the accessory loading thread is detected in the accessory list within the second time period. If yes, proceed to step A4; otherwise, update the delay count and proceed to step A3. Step A3: The listening sub-thread determines whether the number of delays has reached the second preset value. If yes, the listening sub-thread exits; otherwise, step A1 is executed. Step A4: The listening sub-thread records the silicone keyboard state as "inserted", generates a notification to switch the silicone keyboard state based on the silicone keyboard state and reports it to the upper layer application, and then the listening sub-thread exits. The upper-layer application of the smart POS receives the notification of switching silicone keyboard status. If the silicone keyboard status in the notification is "inserted", it is determined that there is a silicone keyboard on the outside of the smart POS. If the silicone keyboard status in the notification is "removed", it is determined that there is no silicone keyboard on the outside of the smart POS.

5. The method as described in claim 4, characterized in that, Also includes: Before executing step R2 in step R1, the kernel obtains the silicone keyboard identifier from the silicone keyboard. Step A4 includes: the listening sub-thread records the silicone keyboard state as inserted, generates a notification to switch the silicone keyboard state based on the silicone keyboard identifier and the silicone keyboard state and reports it to the upper layer application, and the listening sub-thread exits. The step of confirming the key area and touch window matrix of the silicone keyboard on the display screen of the smart POS includes: the upper-layer application of the smart POS confirming the key area and touch window matrix of the corresponding silicone keyboard on the display screen of the smart POS according to the silicone keyboard identifier.

6. The method as described in claim 1, characterized in that, The smart POS detects the presence of a silicone keyboard on the outside by: when the core of the smart POS detects a change in external voltage through a detection pin, it calls an interrupt handling function to enter interrupt handling, which includes: Step M: The kernel acquires the detection pin level of the light sensor, determines whether the detection pin level is low, and if so, reports a notification to the upper-layer application of the smart POS indicating that the silicone keyboard is inserted, and exits the interrupt; otherwise, it reports a notification to the upper-layer application of the smart POS indicating that the silicone keyboard is removed, and exits the interrupt. Step N: The kernel obtains the status feedback from the Hall sensor, determines whether the detection pin in the Hall sensor feedback status is high, and if so, reports a notification to the upper-layer application of the smart POS indicating that the silicone keyboard is inserted, and exits the interrupt; otherwise, reports a notification to the upper-layer application of the smart POS indicating that the silicone keyboard is removed, and exits the interrupt; or Step L: The kernel sends a request to the silicone keyboard to obtain silicone keyboard data through the NFC module, receives and parses the NFC tag information returned by the silicone keyboard through the NFC module, and determines whether the parsed silicone keyboard identifier is the first preset data. If it is, it reports a silicone keyboard status switching notification containing the silicone keyboard status as inserted to the upper layer application of the smart POS and exits the interrupt; otherwise, it reports a silicone keyboard status switching notification containing the silicone keyboard status as unplugged to the upper layer application of the smart POS and exits the interrupt. The upper-layer application of the smart POS receives the notification of switching silicone keyboard status. If the silicone keyboard status in the notification is "inserted", it is determined that there is a silicone keyboard on the outside of the smart POS. If the silicone keyboard status in the notification is "removed", it is determined that there is no silicone keyboard on the outside of the smart POS.

7. The method as described in claim 6, characterized in that, Also includes: When the determination is true in step N, the kernel confirms the silicone keyboard identifier through the status feedback from the Hall sensor, writes the silicone keyboard identifier into the node, and the upper layer application reads the silicone keyboard identifier in the node after receiving the notification to switch the silicone keyboard status. When the determination in step L is true, the kernel writes the parsed silicone keyboard identifier into the node, and the upper-layer application reads the silicone keyboard identifier in the node after receiving the notification to switch the silicone keyboard state. The step of confirming the key area and touch window matrix of the silicone keyboard on the display screen of the smart POS includes: the upper-layer application confirming the key area and touch window matrix of the corresponding silicone keyboard on the display screen of the smart POS based on the silicone keyboard identifier.

8. The method as described in claim 4 or 6, characterized in that, The procedure preceding step S1 also includes: Step T1: The kernel is loaded, and the kernel parses the device tree to obtain the information of the detection pin; Step T2: The kernel registers the interrupt handling function required for the detection pin to generate an interrupt, and initializes the interrupt handling function according to the information of the detection pin.

9. The method as described in claim 1, characterized in that, Step S1 includes: when the smart POS detects a silicone keyboard on the outside, obtaining a silicone keyboard identifier from the silicone keyboard; obtaining the corresponding saved pixel size of the silicone keyboard based on the silicone keyboard identifier; calculating the key area of ​​the silicone keyboard on the smart POS display screen based on the pixel size of the silicone keyboard; and calculating a touch window matrix based on the key area. The touch window matrix includes window pixel size and window position information, or... When the smart POS detects a silicone keyboard on the outside, it obtains the pixel size of the silicone keyboard from the silicone keyboard, determines the key area of ​​the silicone keyboard on the display screen of the smart POS based on the pixel size of the silicone keyboard, and calculates the touch window matrix based on the key area.

10. The method as described in claim 9, characterized in that, Step S2 includes: the smart POS sends the window pixel size and window position information to the SurfaceFlinger process of the operating system through the window manager; the operating system draws the touch window by running the SurfaceFlinger process; and renders and displays the touch window image through OpenGL.

11. The method as described in claim 1, characterized in that, Step S3 includes: the kernel of the smart POS waits for user operation, and when a touch signal is received, it obtains the coordinate information of the user's touch position. Based on the coordinate information, it determines whether the user operation is within the key area of ​​the silicone keyboard on the display screen of the smart POS. If yes, step S4 is executed; otherwise, the coordinate information is returned to the upper-layer application of the smart POS, and the upper-layer application performs corresponding operations based on the coordinate information. Step S4 includes: the kernel determines the key value corresponding to the coordinate information based on the key matrix corresponding to each key of the silicone keyboard stored internally, and reports the key event and the determined key value to the upper layer application of the smart POS through the input subsystem; Step S5 includes: the upper-layer application of the smart POS stores the received key value in the storage area.

12. The method as described in claim 1, characterized in that, Step S4 includes: the smart POS obtains the key matrix corresponding to each key of the internally stored silicone keyboard according to the silicone keyboard identifier, and determines the key value corresponding to the coordinate information according to the obtained key matrix corresponding to each key.

13. The method as described in claim 1, characterized in that, If the user inputs a password, step S5 includes: the smart POS stores the key value in the password storage area, determines whether the password input is successful, and if so, prompts the user that the password input is successful and ends; otherwise, returns to step S3.

14. The method as described in claim 13, characterized in that, Step S5 specifically includes: the smart POS determines the key type corresponding to the key value. If it is a cancel key, it prompts the user to cancel the operation, clears the data in the password storage area, and ends. If it is a character key, it saves the key value in the password storage area in sequence, prompts the user that the current number input is complete, and returns to step S3. If it is a confirm key, it determines whether the length of the data in the password storage area meets the requirements. If yes, it prompts the user that the password input is complete and ends; otherwise, it reports an error.

15. The method as described in claim 14, characterized in that, If the smart POS determines that the key type corresponding to the key value is a character key, the prompt to the user that the current number input is complete is specifically: the smart POS announces the serial number of the key value in the password storage area, and / or the smart POS displays a preset character on the display screen.

16. The method as described in claim 1, characterized in that, Also includes: Step P1: When the smart POS detects that the outer silicone keyboard has been pulled out, it confirms that the pixel size of the key area of ​​the silicone keyboard on the smart POS display screen is 0x00 based on the status of the silicone keyboard. Step P2: The smart POS restores the touch window to full screen based on the pixel size of the button area and the display resolution of the smart POS screen; Step P3: The smart POS waits for user operation and performs the corresponding operation when it receives operation information from the user's touch screen.

17. A data input device for a smart POS with a silicone keyboard, characterized in that, include: The confirmation module is used to confirm the key area and touch window matrix of the silicone keyboard on the display screen of the smart POS when a silicone keyboard is detected on the outside of the smart POS. An adjustment module is used to adjust the touch windows on the display screen according to the touch window matrix; The acquisition and judgment module is used to wait for user operation. When a touch signal is received, it acquires the coordinate information of the user's touch position and determines whether the user operation is within the key area of ​​the silicone keyboard on the display screen of the smart POS based on the coordinate information. If yes, the determination module is triggered; otherwise, the corresponding operation is performed based on the coordinate information. The determining module is used to determine the key value corresponding to the user's touch position based on the key matrix corresponding to each key of the silicone keyboard and the coordinate information stored internally. A storage module is used to store the key value in a storage area.

18. An electronic device, characterized in that, The electronic device includes at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor, the at least one processor executing the instructions to implement the method of any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 16.

20. A chip system, characterized in that, The device includes a chip coupled to a memory for executing a computer program stored in the memory to perform the method according to any one of claims 1-16.

Citation Information

Patent Citations

  • Touch screen information input method of intelligent equipment and intelligent equipment

    CN116627311A

  • Blind person input implementation method and device

    CN118466893A