Input method and device, electronic equipment and storage medium
By calling the soft keyboard on the smart terminal device and using action data for character input, the input difficulty of projection keyboard in a contactless plane environment is solved, and more flexible and accurate character input is achieved, improving the user experience.
Patent Information
- Application Number
- CN202311805222.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
When smart terminal devices input characters, the use of projection keyboards is limited, especially in a non-contact plane environment, the projected virtual keyboard cannot be accurately detected, and the projected virtual keyboard cannot be imaged at certain angles, resulting in difficulty in inputting.
By responding to the input to the second electronic device, the soft keyboard of the first electronic device is called, and the action data of the target object is obtained by using the second electronic device, and character input is input based on the action data of the corresponding keys on the soft keyboard.
Compared with projection keyboards, there is no limit on the usage environment for calling soft keyboards, and it can perform character input more flexibly and accurately, improving the user experience.
Smart Images

Figure CN120215720A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of terminals, and in particular, to an input method, apparatus, electronic device, and storage medium. Background Art
[0002] With the continuous development of science and technology, terminal electronic products have become increasingly popular, and intelligent terminal devices such as smart TVs have entered people's daily lives. However, due to different usage scenarios, keyboards are required for character input in some scenarios, while keyboards are not needed in other scenarios. Therefore, these intelligent terminals do not always have a hardware keyboard for input like a computer, and at the same time, character input is inevitable. As a result, the problem of character input on intelligent terminal devices has become increasingly serious.
[0003] In some scenarios, a projection keyboard is often used for character input on intelligent devices. However, the projection keyboard has problems such as large volume and inconvenient carrying. Generally, such a keyboard projects a virtual keyboard on a contact plane, and when a finger clicks on a button on the virtual keyboard, it is determined that the button has been pressed. However, such a projection keyboard has a major defect that it is necessary to accurately detect the position of the button where the user's finger presses the projection button to determine whether the button has been pressed. However, when the projection keyboard is located on a non-contact plane such as the back of the user's hand, it is impossible to accurately detect the button pressed by the finger, and when the light of the virtual keyboard projected by the projection keyboard is almost parallel to the projection contact plane, the projected virtual keyboard can hardly form an image and is severely deformed, making it impossible to perform button input. Thus, the limitations of using the projected virtual keyboard for character input are relatively large, resulting in a poor user experience. Summary of the Invention
[0004] Embodiments of the present application provide an input method, apparatus, and terminal, which can solve the problem of relatively large limitations in using the projected virtual keyboard for character input.
[0005] In a first aspect, an input method is provided, including: in response to a first input to a second electronic device, invoking a soft keyboard; using the second electronic device to obtain motion data of a target object; and driving corresponding keys on the soft keyboard for character input according to the motion data.
[0006] In a second aspect, an input apparatus is provided, including: a first electronic device and a second electronic device, where the first electronic device and the second electronic device are connected; the second electronic device is used to obtain motion data of a target object; the first electronic device is used to, in response to a first input to the second electronic device, invoke a soft keyboard, and drive corresponding keys on the soft keyboard for character input according to the motion data obtained by the second electronic device.
[0007] In a third aspect, an input device is provided, including: a calling module, configured to call the soft keyboard of a first electronic device in response to a first input to a second electronic device; an obtaining module, configured to obtain the motion data of a target object by using the second electronic device; and an input module, configured to drive the corresponding keys on the soft keyboard to perform character input according to the motion data.
[0008] In a fourth aspect, an electronic device is provided. The terminal includes a processor and a memory. The memory stores a program or instructions that can run on the processor. When the program or instructions are executed by the processor, the steps of the method according to the first aspect are implemented.
[0009] In a fifth aspect, a readable storage medium is provided. A program or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, the steps of the method according to the first aspect are implemented.
[0010] In a sixth aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or instructions to implement the method according to the first aspect.
[0011] In a seventh aspect, a computer program / program product is provided. The computer program / program product is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the steps of the input method according to the first aspect.
[0012] In the embodiments of the present application, by responding to a first input to a second electronic device, the soft keyboard is called, then the motion data of the target object is obtained by using the second electronic device, and finally the corresponding keys on the soft keyboard are driven to perform character input according to the motion data. In this way, the soft keyboard of the first electronic device is called by the second electronic device. Since the soft keyboard is the one of the first electronic device itself, there is no restriction on the use environment. As long as the motion data of the target object obtained by the second electronic device is used, the corresponding keys on the soft keyboard of the first electronic device can be driven to perform character input. Compared with the strict requirements of the projection keyboard for the projection contact plane, the limitation of using the software keyboard of the first electronic device for character input is smaller, which improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic structural diagram of an input device provided by an embodiment of the present application is shown.
[0014] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present application is shown;
[0015] Figure 3 A schematic diagram of a soft keyboard provided by an embodiment of the present application is shown;
[0016] Figure 4A schematic diagram of a scene showing the first position of a soft keyboard provided by an embodiment of the present application;
[0017] Figure 5 A schematic diagram of coordinates showing the coordinate origin provided by an embodiment of the present application;
[0018] Figure 6 A schematic diagram of a scene showing the second position of a soft keyboard provided by an embodiment of the present application;
[0019] Figure 7 A schematic diagram of coordinates showing the starting position and the ending position provided by an embodiment of the present application;
[0020] Figure 8 A schematic diagram of a flowchart of an input method provided by an embodiment of the present application;
[0021] Figure 9 A schematic diagram of the structure of another input device provided by an embodiment of the present application;
[0022] Figure 10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0023] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0024] The terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are usually of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.
[0025] Figure 1The structural block diagram of an input device to which the embodiments of the present application can be applied is shown. The input device 10 includes a first electronic device 11 and a second electronic device 12, and the first electronic device 11 and the second electronic device 12 are connected, which can be wireless connection or wired connection specifically. Among them, the first electronic device 11 can be a mobile phone, a tablet personal computer, a laptop computer or a notebook computer, a personal digital assistant (PDA), a handheld computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, a vehicle-mounted device (VUE), a pedestrian terminal (PUE), a game console, a personal computer (PC), a teller machine or a self-service machine and other terminal-side devices. The wearable devices include: smart watches, smart bracelets, smart earphones, smart glasses, smart wristbands, smart clothing, etc. It should be noted that in the embodiments of the present application, the specific type of the first electronic device 11 is not limited, and it can be any type of terminal with a display screen and a soft keyboard in its own system. The second electronic device 12 can be a wearable device, such as a smart ring, a smart watch, a smart bracelet and a smart wristband, etc.
[0026] For the first electronic device 11 and the second electronic device 12, the second electronic device 12 is used to obtain the motion data of the target object, and the first electronic device 11 is used to call the soft keyboard in response to a first input to the second electronic device 12, and drive the corresponding keys on the soft keyboard to perform character input according to the motion data obtained by the second electronic device 12. As an alternative implementation, the call of the soft keyboard can also be initiated by the first electronic device 11, and then the operation of the soft keyboard is realized in response to the information of the second electronic device.
[0027] Specifically, the target object can be a movable object such as a finger, a wrist, an electronic pen, etc. The motion data of the target object includes but is not limited to the predetermined motion of the target object and the movement data of the target object, etc. The predetermined motion includes but is not limited to clicking, rotating, swiping up, etc. The movement data includes but is not limited to the movement direction and the movement distance, etc. For example Figure 2As shown, taking the target object as a finger and the second electronic device 12 as a smart ring for example, the smart ring can be worn on the user's finger. When the finger moves on the contact plane, the smart ring can collect the motion data of the finger. After establishing a connection between the first electronic device 11 and the second electronic device 12, the user can perform a first input on the second electronic device 12. Among them, the first input can be to turn on the switch button on the second electronic device 12. When the switch button of the second electronic device 12 is turned on, it means that the input function of the second electronic device 12 is enabled, thereby invoking the soft keyboard on the first electronic device 11. Or clicking on the virtual button of the soft keyboard on the second electronic device means that the input function of the second electronic device 12 is enabled, and clicking on this virtual button means invoking the soft keyboard on the first electronic device 11. Among them, the form of the soft keyboard can be as Figure 3 shown. Further, after the user performs a first input on the second electronic device 12, the soft keyboard of the first electronic device is invoked and the soft keyboard is displayed on the first electronic device.
[0028] Further, after invoking the soft keyboard on the first electronic device 11, character input is performed by determining the corresponding key on the soft keyboard on the first electronic device 11 according to the motion data of the target object obtained by the second electronic device. For example, the user wears the smart ring on the finger, and the finger makes a click action at a certain position on the contact plane (the contact plane can be a desktop, the back of the hand, the palm, a wall, etc.). The second electronic device detects that the finger has made a click action, and then the second electronic device determines the position where the finger makes a click action as the starting position. Immediately afterwards, the finger moves a certain distance in the right direction from the starting position on the contact plane and stops, and makes two click actions at the position where it stops on the contact plane. Then the second electronic device determines the position where the finger makes two click actions as the ending position. The second electronic device sends the starting position, the ending position, the moving direction, and the moving distance to the first electronic device. The first electronic device maps the corresponding position of the starting position on the soft keyboard as the coordinate origin, and starts from this coordinate origin to drive the soft keyboard cursor to move the moving distance in the moving direction to reach the target position on the soft keyboard. The first electronic device performs the click action of the corresponding key at the target position according to the two click actions of the user's finger for character input. It should be noted that the type of motion data can also be determined according to the actual situation, and the embodiments of the present application do not limit this here.
[0029] Among them, the second electronic device 12 includes, but is not limited to, a power module, an image acquisition module, an acceleration sensor, a pick-up, a vibration sensor, a distance sensor, a gyroscope, a magnetic sensor, a communication module, a memory, a processor, etc. Among them, the image acquisition module can be a camera, which is used to acquire image data of the target object during movement. The target object can be a finger, an electronic pen, a wrist, etc. The acceleration sensor is used to acquire acceleration data of the target object during movement, the pick-up is used to acquire sound data of the target object when performing a predetermined action, and the vibration sensor is used to acquire vibration data of the target object when performing a predetermined action. The gyroscope is used to obtain attitude data of the target object, etc.
[0030] Through the technical solution provided by the embodiments of the present application, by responding to the first input to the second electronic device, the soft keyboard is called, and then the second electronic device is used to obtain the action data of the target object. Finally, according to the action data, the corresponding keys on the soft keyboard are driven for character input. In this way, the soft keyboard of the first electronic device is called through the second electronic device. Since the soft keyboard is of the first electronic device itself, there is no restriction on the use environment. As long as the action data of the target object obtained by the second electronic device is used, the corresponding keys on the soft keyboard of the first electronic device can be driven for character input. Compared with the strict requirements of the projection keyboard for the projection contact plane, the limitation of using the software keyboard of the first electronic device for character input is smaller, improving the user experience.
[0031] In a possible implementation manner, the second electronic device includes an acceleration sensor, a pick-up, and a vibration sensor; the pick-up and the vibration sensor are used to obtain the first predetermined action and the second predetermined action of the target object. The first predetermined action marks the starting position of the target object's action, and the second predetermined action marks the ending position of the target object's action; the acceleration sensor is used to acquire the acceleration data of the target object moving from the starting position to the ending position; the second electronic device is further used to determine the moving direction and moving distance of the target object according to the acceleration data, the starting position, and the ending position. The action data includes the first predetermined action, the second predetermined action, the moving direction, and the moving distance.
[0032] Specifically, the first predetermined action and the second predetermined action can be rotation, clicking on the contact plane N times, etc., where N is a natural number greater than or equal to 1. When the target object performs the first predetermined action, it marks the starting position of the movement of the target object. For example, when the user's finger clicks on the contact plane 3 times, the finger impacts the contact plane, and the sound during the impact is detected by the pickup, and the vibration during the impact is detected by the vibration sensor. The second electronic device locates the contact point where the finger makes this action as the starting position. Immediately afterwards, when the target object starts to move from rest at the starting position and performs the second predetermined action after the movement is completed, it marks the ending position of the movement of the target object. For example, when the user's finger clicks on the contact plane once, the finger impacts the contact plane, and the sound during the impact is detected by the pickup, and the vibration during the impact is detected by the vibration sensor. The second electronic device locates the contact point where the finger makes this action as the ending position.
[0033] Furthermore, the acceleration sensor can be used to measure the movement and direction of the target object. The acceleration data includes the duration from the starting position to the ending position of the target object's movement, the magnitude of the acceleration when the target object is moving, and the direction of the acceleration. The second electronic device determines the moving direction of the target object based on the direction of the acceleration, and determines the moving distance of the target object based on the direction of the target acceleration, the magnitude of the acceleration, and the duration. In this way, the position and moving direction of the target object detected by the acceleration sensor are only the relative position and relative movement of the target object. It does not require an absolute position, nor does it have a projected virtual keyboard, which avoids the problem of errors in absolute positioning and improves the efficiency and accuracy of character input.
[0034] In a possible implementation, the second predetermined action can also be that the target object slides after leaving the contact plane by a first predetermined distance. For example, the user raises the finger and leaves the contact plane by 1 - 2 cm and slides, and performs a sliding input on the key corresponding to the ending position on the soft keyboard through the air slide. Furthermore, the target object exits the sliding input after leaving the contact plane by a second predetermined distance. For example, the user raises the finger again by 2 - 3 cm, and the sliding input ends.
[0035] In a possible implementation, the second electronic device includes an acceleration sensor, a pickup, a vibration sensor, and an image acquisition module; the pickup and the vibration sensor are used to obtain the first predetermined action and the second predetermined action of the target object. The first predetermined action marks the starting position of the target object's action, and the second predetermined action marks the ending position of the target object's action; the image acquisition module is used to acquire the image data of the target object moving from the starting position to the ending position; the second electronic device is also used to determine the moving direction and moving distance of the target object based on the image data, the starting position, and the ending position. The action data includes the first predetermined action, the second predetermined action, the moving direction, and the moving distance.
[0036] Specifically, the first predetermined action and the second predetermined action can be rotation, clicking on the contact plane N times, etc., where N is a natural number greater than or equal to 1. When the target object performs the first predetermined action, it marks the starting position of the movement of the target object. For example, when the user's finger clicks on the contact plane 3 times, the finger hits the contact plane, and the sound during the impact is detected by the pickup, and the vibration during the impact is detected by the vibration sensor. The second electronic device locates the contact point where the finger makes this action as the starting position. Immediately afterwards, when the target object moves from rest at the starting position and then performs the second predetermined action after the movement is completed, it marks the ending position of the movement of the target object. For example, when the user's finger clicks on the contact plane once, the finger hits the contact plane, and the sound during the impact is detected by the pickup, and the vibration during the impact is detected by the vibration sensor. The second electronic device locates the contact point where the finger makes this action as the ending position.
[0037] In a possible implementation, the second predetermined action can also be that the target object slides after leaving the contact plane by a first predetermined distance. For example, the user raises the finger 1 - 2 cm away from the contact plane and slides, and slides to input the key corresponding to the ending position on the soft keyboard through the in-air slide. Further, the target object exits the slide input after leaving the contact plane by a second predetermined distance. For example, when the user raises the finger again 2 - 3 cm, the slide input ends.
[0038] Furthermore, the image acquisition module can be a camera. The camera acquires the image data of the target object at the starting position, and also acquires the image data of the target object during the process of moving from the starting position to the ending position in real time, as well as the image data of the target object at the ending position. The image data includes the texture, image brightness, and patterns on the contact plane, etc. By comparing the image data of the target object at the starting position, the image data during the movement process, and the image data at the ending position acquired by the camera with the pre-set image of the entire contact plane, the moving direction and moving distance of the target object can be determined. In this way, the position and moving direction of the target object acquired by the image acquisition module are only the relative position of the target object and the relative movement of the target object. It does not require an absolute position, nor a projected virtual keyboard, which avoids the problem of errors caused by absolute positioning errors and improves the character input efficiency and accuracy.
[0039] In a possible implementation, the first electronic device is also used to determine the first position on the soft keyboard where the starting position is mapped; move the moving distance from the first position on the soft keyboard in the moving direction to the second position; and perform character input on the key corresponding to the second position according to the second predetermined action.
[0040] Specifically, the first electronic device maps the starting position of the target object to the corresponding first position on the soft keyboard as the coordinate origin, and starts driving the soft keyboard cursor from this coordinate origin to move the moving distance in the moving direction to reach the second position on the soft keyboard. The first electronic device performs the second predetermined action of the key corresponding to the second position according to the second predetermined action performed by the target object for character input.
[0041] For example, the user wears the smart ring on the finger, and the finger makes a click action at a certain position on the contact plane (the contact plane can be a desktop, the back of the hand, the palm, a wall, etc.). The second electronic device detects that the finger has made a click action, then the second electronic device determines the position where the finger makes a click action as the starting position. Immediately afterwards, the finger moves a certain distance in the right direction from the starting position on the contact plane and stops, and makes two click actions at the position where it stops on the contact plane. Then the second electronic device determines the position where the finger makes two click actions as the end position. The second electronic device sends the starting position, the end position, the moving direction and the moving distance to the first electronic device.
[0042] The first electronic device maps the starting position of the finger to the corresponding first position on the soft keyboard as the coordinate origin. As Figure 4 shown, the position where the cursor is at the key 5 is the position corresponding to the coordinate origin. The coordinate origin is at FO as Figure 5 shown. Starting from the position of the key 5, drive the soft keyboard cursor to move the moving distance in the moving direction to reach the second position on the soft keyboard. For example, the second position is at the position where the keys of WXYZ are located as Figure 6 shown. The first electronic device performs the click action of the key corresponding to the second position according to the two click actions performed by the user's finger for character input. For example, as Figure 7 shown, the smart ring detects that the starting position of the finger is at the M1 position (fx1, fy1), and the smart ring detects that the end position of the finger is at the M2 position (fx2, fy2). The displacement between the starting position and the end position is as follows:
[0043] dx = fx2 - fx1
[0044] dy = fy2 - fy1
[0045] where dx is the moving displacement in the FX direction, and dy is the moving displacement in the FY direction.
[0046] As Figure 6As shown, the first position is N1, which corresponds to the starting position M1, the second position is N2, which corresponds to the ending position M2. The user makes a first predetermined action to define the starting position M1 of the finger. The user's finger slides 1.414 cm diagonally down to the right, that is, slides 1 cm to the right and 1 cm down and then stops. The ending position is M2. The intelligent ring detects the direction and distance of the finger movement and sends the direction and distance to the second electronic device. The second electronic device drives the cursor to move from the first position N1 corresponding to the starting position M1 to the second position N2 corresponding to the ending position M2.
[0047] In a possible implementation, the first electronic device includes a display screen. The first electronic device is further configured to determine the moving pixels corresponding to the moving distance according to the mapping relationship between the preset moving distance of the target object and the preset moving pixels of the display screen; move the moving pixels from the first position to the second position in the moving direction on the soft keyboard.
[0048] Further, in order to enable the accurate movement of the cursor on the software keyboard, a mapping relationship between the moving distance of the target object and the pixels of the display screen of the second electronic device can be established. The mapping relationship can be expressed by the following formula:
[0049] cx2 = cx1 + dx * σ1
[0050] cy2 = cy1 - dy * σ1
[0051] Where σ1 is a proportionality coefficient, representing the ratio between the actual moving distance of the target object and the pixels of the display screen, that is, the actual moving distance of the target object and the pixels of the display screen are in a proportional relationship. σ1 can be determined according to the actual situation, and the embodiments of the present application do not make any limitations here. The minus sign is used before dy * σ1 because Figure 6 the Y-axis coordinate direction of Figure 7 is opposite to the Y-axis coordinate direction of
[0052] For example, the user wears an intelligent ring on the right index finger, activates the input function of the intelligent ring, the intelligent ring is connected to the terminal device, the terminal device displays the soft keyboard and defines the cursor position. The user makes a preset gesture action to define the starting position of the index finger. The user's right index finger slides 1.414 cm diagonally down to the right, that is, slides 1 cm to the right and 1 cm down and then stops. The intelligent ring detects the finger movement direction and moving distance. In this embodiment, the proportionality coefficient σ1 = 1 is taken. When σ1 = 1, moving 1 cm is equivalent to moving 100 pixels on the display screen, that is, dx = 100 and dy = -100.
[0053] The original position of the cursor on the display screen is cx1 = 500 pixels and cy1 = 600 pixels. After the user's finger slides 1 cm to the right and 1 cm down, the cursor on the display screen also moves a certain number of pixels correspondingly. The new position on the display screen is as follows:
[0054] cx2 = cx1 + dx * σ1 = 500 + 100 * 1 = 600
[0055] cy2 = cy1 - dy * σ1 = 600 - (-100) * 1 = 700
[0056] It should be noted that if the number of pixels by which the cursor moves on the display screen cannot reach the corresponding key on the soft keyboard, the proportionality coefficient can be increased, such as σ1 = 1.5, or σ1 = 2, etc., and vice versa.
[0057] In an implementable embodiment, after the second predetermined action is completed, the starting position of the target object is updated to the position of the contact point where the user makes the second predetermined action on the contact plane, and the first position on the soft keyboard is also updated. For example Figure 6 the position of the WXYZ keys is updated to the first position (i.e., the coordinate origin), and the next finger movement detection is implemented with this as the coordinate origin. In this way, the detection error does not accumulate each time the target object moves, improving the input accuracy.
[0058] In an implementable embodiment, when the second electronic device detects a third predetermined action of the target object, the input function of the second electronic device is turned off, that is, the soft keyboard of the first electronic device is no longer called. The third predetermined action can be a gesture for ending input by the target object (for example, on the contact plane, the user's finger continuously clicks on the contact plane 3 times, or rotates the finger, or touches a special position of the second electronic device (which can be the switch button of the second electronic device or the virtual button for turning off the input function on the display screen of the second electronic device)), and the first electronic device side no longer drives the cursor to move on the soft keyboard.
[0059] Next, in combination with the accompanying drawings, the input method provided by the embodiments of the present application will be described in detail through some embodiments and their application scenarios.
[0060] As Figure 8 shown, an embodiment of the present invention provides an input method. This method can be executed by the first electronic device. In other words, this method can be executed by software or hardware installed in the first electronic device. The method includes the following steps:
[0061] Step S801: In response to a first input to the second electronic device, call the soft keyboard.
[0062] Specifically, the user can perform a first input on the second electronic device. The first input can be to turn on the switch button on the second electronic device. When the switch button of the second electronic device is turned on, it indicates that the input function of the second electronic device is enabled, thereby invoking the soft keyboard on the first electronic device. Or it can be to click on the virtual button of the soft keyboard on the second electronic device, which indicates that the input function of the second electronic device is enabled, and clicking on the virtual button means invoking the soft keyboard on the first electronic device. Further, after the user performs a first input on the second electronic device, the soft keyboard of the first electronic device is invoked and displayed on the first electronic device. The second electronic device can be a wearable device, such as a smart ring, a smart watch, a smart bracelet, and a smart wristband, etc. Further, after the user performs a first input on the second electronic device, the soft keyboard of the first electronic device is invoked and displayed on the first electronic device.
[0063] Step S803: Use the second electronic device to obtain the motion data of the target object.
[0064] Specifically, the target object can be a movable object such as a finger, a wrist, an electronic pen, etc. The motion data of the target object includes but is not limited to the predetermined actions of the target object and the movement data of the target object, etc. The predetermined actions include but are not limited to clicking, rotating, swiping up, etc. The movement data includes but is not limited to the movement direction and the movement distance, etc. As shown in the above embodiment Figure 2 Taking the target object as a finger and the second electronic device as a smart ring as an example, the smart ring can be worn on the user's finger. When the finger moves, the smart ring can collect the motion data of the finger.
[0065] In a possible implementation manner, use the second electronic device to obtain the first predetermined action and the second predetermined action of the target object. The first predetermined action marks the starting position of the target object's action, and the second predetermined action marks the ending position of the target object's action; use the second electronic device to collect the acceleration data of the target object moving from the starting position to the ending position; use the second electronic device to determine the movement direction and the movement distance of the target object. The movement direction and the movement distance are determined by the second electronic device according to the acceleration data, the starting position, and the ending position. The motion data includes the first predetermined action, the second predetermined action, the movement direction, and the movement distance.
[0066] Specifically, the first predetermined action and the second predetermined action can be rotation, clicking on the contact plane N times, etc., where N is a natural number greater than or equal to 1. When the target object performs the first predetermined action, it marks the starting position of the movement of the target object. For example, when the user's finger clicks on the contact plane 3 times, the finger impacts the contact plane, and the second electronic device locates the contact point where the finger makes this action as the starting position. Immediately afterwards, when the target object starts to move from rest at the starting position and performs the second predetermined action after the movement is completed, it marks the ending position of the movement of the target object. For example, when the user's finger clicks on the contact plane once, the finger impacts the contact plane, and the second electronic device locates the contact point where the finger makes this action as the ending position.
[0067] Furthermore, the acceleration data includes the duration from the starting position to the ending position of the target object's movement, the magnitude of the acceleration when the target object is moving, and the direction of the acceleration. The second electronic device determines the moving direction of the target object based on the direction of the acceleration, and determines the moving distance of the target object based on the direction of the acceleration, the magnitude of the acceleration, and the duration of the target object. In this way, the position and the moving direction of the target object detected by the second electronic device are only the relative position and the relative movement of the target object. It does not require an absolute position, nor does it have a projected virtual keyboard, which avoids the problem of errors in absolute positioning and improves the efficiency and accuracy of character input.
[0068] In a possible implementation, obtaining the action data of the target object by using the second electronic device includes: obtaining the first predetermined action and the second predetermined action of the target object by using the second electronic device, where the first predetermined action marks the starting position of the target object's action, and the second predetermined action marks the ending position of the target object's action; collecting the image data of the target object moving from the starting position to the ending position by using the second electronic device; determining the moving direction and the moving distance of the target object by using the second electronic device, where the moving direction and the moving distance are determined by the second electronic device based on the image data, the starting position, and the ending position, and the action data includes the first predetermined action, the second predetermined action, the moving direction, and the moving distance.
[0069] Specifically, the first predetermined action and the second predetermined action can be rotation, clicking on the contact plane N times, etc., where N is a natural number greater than or equal to 1. When the target object performs the first predetermined action, it marks the starting position of the movement of the target object. For example, when the user's finger clicks on the contact plane 3 times, the finger impacts the contact plane, and the second electronic device locates the contact point where the finger makes this action as the starting position. Immediately afterwards, when the target object starts to move from rest at the starting position and performs the second predetermined action after the movement is completed, it marks the ending position of the movement of the target object. For example, when the user's finger clicks on the contact plane once, the finger impacts the contact plane, and the second electronic device locates the contact point where the finger makes this action as the ending position.
[0070] In a possible implementation, the second predetermined action may also be sliding after the target object leaves the contact plane by a first predetermined distance. For example, the user raises a finger to leave the contact plane by 1 - 2 cm and slides, and performs a sliding input on the key corresponding to the end position on the soft keyboard through the in-air sliding. Further, the sliding input ends after the target object leaves the contact plane by a second predetermined distance. For example, when the user raises the finger again by 2 - 3 cm, the sliding input ends.
[0071] Further, the image data includes the image data of the target object at the starting position, the image data of the target object during the process of moving from the starting position to the ending position, and the image data of the target object at the ending position. The image data includes textures, image brightness, and patterns on the contact plane. By comparing the image data of the target object at the starting position, the image data during the movement process, and the image data at the ending position with the pre-set image of the entire contact plane, the moving direction and moving distance of the target object are determined. In this way, the position and moving direction of the target object are only the relative position and relative movement of the target object, without the need for absolute position and no projected virtual keyboard, which avoids the problem of errors in absolute positioning and improves the character input efficiency and accuracy.
[0072] Step S805: Drive the corresponding keys on the soft keyboard for character input according to the action data.
[0073] Specifically, map the starting position of the target object to the corresponding position on the soft keyboard as the coordinate origin. Starting from this coordinate origin, drive the cursor on the soft keyboard to move this moving distance in this moving direction to reach the final position on the soft keyboard, and drive the key corresponding to the second position for character input according to the second predetermined action performed by the target object.
[0074] In a possible implementation, driving the corresponding keys on the soft keyboard for character input according to the action data includes: determining the first position on the soft keyboard where the starting position is mapped; moving the moving distance from the first position on the soft keyboard in the moving direction to the second position; and performing character input on the key corresponding to the second position according to the second predetermined action.
[0075] Map the starting position of the target object to the corresponding first position on the soft keyboard as the coordinate origin. Starting from this coordinate origin, drive the soft keyboard cursor to move this moving distance in this moving direction to reach the second position on the soft keyboard, and perform character input by executing the second predetermined action of the key corresponding to the second position according to the second predetermined action performed by the target object.
[0076] For example, the user wears the smart ring on the finger, and the finger makes a click action at a certain position on the contact plane (the contact plane can be a desktop, the back of the hand, the palm, a wall, etc.). When the second electronic device detects that the finger has made a click action, the second electronic device determines the position where the finger makes the click action as the starting position. Immediately afterwards, the finger moves a certain distance in the right direction from the starting position on the contact plane and then stops, and makes two click actions at the position where it stops on the contact plane. Then the second electronic device determines the position where the finger makes the two click actions as the ending position. The second electronic device sends the starting position, the ending position, the moving direction, and the moving distance to the first electronic device.
[0077] The first electronic device maps the starting position of the finger to the corresponding first position on the soft keyboard as the coordinate origin. As Figure 4 shown, the cursor is at the position of key 5, which is the position corresponding to the coordinate origin. The coordinate origin is at FO as Figure 5 shown. Starting from this coordinate origin, the soft keyboard cursor is driven to move the moving distance in the moving direction to reach the second position on the soft keyboard. For example, the second position is at the position where the keys of WXYZ are located as Figure 6 shown. The first electronic device performs the click action of the key corresponding to the second position for character input according to the two click actions made by the user's finger. For example, as Figure 7 shown, the smart ring detects that the starting position of the finger is at position M1 (fx1, fy1), and the smart ring detects that the ending position of the finger is at position M2 (fx2, fy2). The displacement between the starting position and the ending position is as follows:
[0078] dx = fx2 - fx1
[0079] dy = fy2 - fy1
[0080] where dx is the moving displacement in the FX direction and dy is the moving displacement in the FY direction.
[0081] As Figure 6 shown, the first position is N1, which corresponds to the starting position M1, and the second position is N2, which corresponds to the ending position M2. The user makes the first predetermined action to define the starting position M1 of the finger. The user's finger slides 1.414 cm to the lower right, that is, slides 1 cm to the right and 1 cm downward and then stops. The ending position is M2. The smart ring detects the moving direction and distance of the finger and sends this direction and distance to the second electronic device. The second electronic device drives the cursor to move from the first position N1 corresponding to the starting position M1 to the second position N2 corresponding to the ending position M2.
[0082] In a possible implementation, moving a moving distance from a first position to a second position on a soft keyboard in a moving direction includes: determining moving pixels corresponding to the moving distance according to a mapping relationship between a preset moving distance of a target object and preset moving pixels of a display screen; and moving the moving pixels from the first position to the second position on the soft keyboard in the moving direction.
[0083] Specifically, in order to enable precise movement of the cursor on the software keyboard, a mapping relationship can be established between the moving distance of the target object and the pixels of the display screen of the second electronic device, and the mapping relationship can be expressed by the following formula:
[0084] cx2 = cx1 + dx * σ1
[0085] cy2 = cy1 - dy * σ1
[0086] Where σ1 is a proportionality coefficient, representing the ratio between the actual moving distance of the target object and the pixels of the display screen, that is, the actual moving distance of the target object is proportional to the pixels of the display screen. σ1 can be determined according to the actual situation, and this application embodiment does not make any limitation here. The minus sign is used before dy * σ1 because Figure 6 the Y-axis coordinate direction of Figure 7 is opposite to the Y-axis coordinate direction of
[0087] For example, the user wears a smart ring on the right index finger, activates the input function of the smart ring, the smart ring is connected to the terminal device, the terminal device displays the soft keyboard and defines the cursor position, the user makes a preset gesture to define the starting position of the index finger, and the user's right index finger slides 1.414 cm to the lower right, that is, slides 1 cm to the right and 1 cm downward and then stops. The smart ring detects the moving direction and moving distance of the finger. In this embodiment, the proportionality coefficient σ1 = 1 is taken. When σ1 = 1, moving 1 cm is equivalent to moving 100 pixels on the display screen, that is, dx = 100 and dy = -100.
[0088] The original position of the cursor on the display screen is cx1 = 500 pixels and cy1 = 600 pixels. After the user's finger slides 1 cm to the right and 1 cm downward, the cursor also moves a certain number of pixels correspondingly on the display screen. The new position on the display screen is as follows:
[0089] cx2 = cx1 + dx * σ1 = 500 + 100 * 1 = 600
[0090] cy2 = cy1 - dy * σ1 = 600 - (-100) * 1 = 700
[0091] It should be noted that if the pixels where the cursor moves on the display screen cannot reach the corresponding keys on the soft keyboard, the proportionality coefficient can be increased, such as σ1 = 1.5, or σ1 = 2, etc., and vice versa.
[0092] Through the technical solution disclosed in the embodiments of the present application, by responding to the first input to the second electronic device, the soft keyboard is called, and then the second electronic device is used to obtain the motion data of the target object. Finally, according to the motion data, the corresponding keys on the soft keyboard are driven to perform character input. In this way, the soft keyboard of the first electronic device is called through the second electronic device. Since the soft keyboard is the one of the first electronic device itself, there is no restriction on the use environment. As long as the motion data of the target object obtained by the second electronic device is used, the corresponding keys on the soft keyboard of the first electronic device can be driven to perform character input. Compared with the strict requirements of the projection keyboard for the projection contact plane, the limitation of using the software keyboard of the first electronic device for character input is smaller, improving the user experience.
[0093] In an implementable embodiment, after the second predetermined action is completed, the starting position of the target object is updated to the position of the contact point where the user makes the second predetermined action on the contact plane, and the first position on the soft keyboard is also updated. For example, Figure 6 the positions of the WXYZ keys are updated to the first position (i.e., the coordinate origin), and the next finger movement detection is realized with this as the coordinate origin. In this way, the detection error during each movement of the target object will not accumulate, improving the input accuracy.
[0094] In an implementable embodiment, when the second electronic device detects a third predetermined action of the target object, the input function of the second electronic device is turned off, that is, the call of the soft keyboard of the first electronic device is stopped. The third predetermined action can be a gesture for the target object to end the input (for example, on the contact plane, the user's finger continuously clicks the contact plane 3 times, or rotates the finger, or touches a special position of the second electronic device (which can be the switch button of the second electronic device or the virtual button for turning off the input function on the display screen of the second electronic device)). On the first electronic device side, the cursor is no longer driven to move on the soft keyboard.
[0095] It should be noted that for the input method provided in the embodiments of the present application, the execution subject can be an input device. In the embodiments of the present application, taking the input device as an example to execute the loading input method, the data processing device provided in the embodiments of the present application is described.
[0096] Figure 9 is a schematic structural diagram of an input device according to an embodiment of the present invention. As Figure 9As shown in the figure, the input device 900 includes: a calling module 901, configured to call the soft keyboard of the first electronic device in response to a first input to the second electronic device; an obtaining module 902, configured to obtain motion data of a target object by using the second electronic device; and an input module 903, configured to drive corresponding keys on the soft keyboard to perform character input according to the motion data.
[0097] In an embodiment of the present application, by responding to a first input to the second electronic device, calling the soft keyboard, then obtaining motion data of the target object by using the second electronic device, and finally driving corresponding keys on the soft keyboard to perform character input according to the motion data. In this way, the soft keyboard of the first electronic device is called by the second electronic device. Since the soft keyboard is of the first electronic device itself, there is no limitation on the usage environment. As long as the motion data of the target object obtained by the second electronic device is used, the corresponding keys on the soft keyboard of the first electronic device can be driven to perform character input. Compared with the strict requirements of the projection keyboard for the projection contact plane, the limitation of using the software keyboard of the first electronic device to perform character input is smaller, improving the user experience.
[0098] In a possible implementation manner, the obtaining module 902 is further configured to obtain a first predetermined motion and a second predetermined motion of the target object by using the second electronic device, where the first predetermined motion indicates the starting position of the target object's motion, and the second predetermined motion indicates the ending position of the target object's motion; collect acceleration data of the target object moving from the starting position to the ending position by using the second electronic device; determine the moving direction and moving distance of the target object by using the second electronic device, where the moving direction and moving distance are determined by the second electronic device according to the acceleration data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
[0099] In a possible implementation manner, the obtaining module 902 is further configured to obtain a first predetermined motion and a second predetermined motion of the target object by using the second electronic device, where the first predetermined motion indicates the starting position of the target object's motion, and the second predetermined motion indicates the ending position of the target object's motion; collect image data of the target object moving from the starting position to the ending position by using the second electronic device; determine the moving direction and moving distance of the target object by using the second electronic device, where the moving direction and moving distance are determined by the second electronic device according to the image data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
[0100] In a possible implementation manner, the input module 903 is further configured to determine a first position on the soft keyboard where the starting position is mapped; move a moving distance from the first position on the soft keyboard in the moving direction to a second position; and perform character input on the key corresponding to the second position according to the second predetermined motion.
[0101] In a possible implementation, the input module 903 is further configured to determine the moving pixels corresponding to the moving distance according to the mapping relationship between the preset moving distance of the target object and the preset moving pixels of the display screen; and move the moving pixels from the first position to the second position in the moving direction on the soft keyboard.
[0102] The input device provided by the embodiments of the present application can implement Figure 8 each process implemented by the method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein again.
[0103] Optionally, as Figure 10 shown, the embodiments of the present application further provide an electronic device 1000, including a processor 1001 and a memory 1002. A program or instruction that can run on the processor 1001 is stored on the memory 1002. When the program or instruction is executed by the processor 1001, it implements each step of the above input method embodiment, and can achieve the same technical effects.
[0104] The embodiments of the present application further provide a readable storage medium. A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, it implements each process of the above input method embodiment, and can achieve the same technical effects. To avoid repetition, details are not described herein again.
[0105] Wherein, the processor is the processor in the terminal in the above embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disc, etc.
[0106] The embodiments of the present application further provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or instruction to implement each process of the above input method embodiment, and can achieve the same technical effects. To avoid repetition, details are not described herein again.
[0107] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system or system-on-chip, etc.
[0108] The embodiments of the present application further provide a computer program / program product. The computer program / program product is stored in a storage medium. The computer program / program product is executed by at least one processor to implement each process of the above input method embodiment, and can achieve the same technical effects. To avoid repetition, details are not described herein again.
[0109] It should be noted that, in this document, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0110] From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present application.
[0111] The embodiments of the present application have been described above with reference to the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. An input method, characterized in that, Applied to a first electronic device, the input method includes: In response to a first input to a second electronic device, call up a soft keyboard; Use the second electronic device to obtain motion data of a target object; Drive corresponding keys on the soft keyboard for character input according to the motion data.
2. The input method according to claim 1, wherein The using the second electronic device to obtain motion data of a target object includes: Use the second electronic device to obtain a first predetermined motion and a second predetermined motion of the target object, where the first predetermined motion marks the starting position of the target object's motion, and the second predetermined motion marks the ending position of the target object's motion; Use the second electronic device to collect acceleration data of the target object moving from the starting position to the ending position; Use the second electronic device to determine the moving direction and moving distance of the target object, where the moving direction and the moving distance are determined by the second electronic device according to the acceleration data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
3. The input method according to claim 1, wherein The using the second electronic device to obtain motion data of a target object includes: Use the second electronic device to obtain a first predetermined motion and a second predetermined motion of the target object, where the first predetermined motion marks the starting position of the target object's motion, and the second predetermined motion marks the ending position of the target object's motion; Use the second electronic device to collect image data of the target object moving from the starting position to the ending position; Use the second electronic device to determine the moving direction and moving distance of the target object, where the moving direction and the moving distance are determined by the second electronic device according to the image data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
4. The input method according to claim 2 or 3, characterized in that, The driving corresponding keys on the soft keyboard for character input according to the motion data includes: Determine a first position on the soft keyboard where the starting position is mapped; On the soft keyboard, move the moving distance from the first position in the moving direction to a second position; Perform character input on the key corresponding to the second position according to the second predetermined motion.
5. The input method according to claim 4, characterized in that, The moving the moving distance from the first position in the moving direction to the second position on the soft keyboard includes: According to the mapping relationship between the preset moving distance of the target object and the preset moving pixels of the display screen, determine the moving pixels corresponding to the moving distance; On the soft keyboard, move the moving pixels from the first position in the moving direction to the second position.
6. An input device, characterized in that, The input device includes: a first electronic device and a second electronic device, where the first electronic device and the second electronic device are connected; The second electronic device is used to obtain motion data of a target object; The first electronic device is configured to, in response to a first input to the second electronic device, call up a soft keyboard and drive corresponding keys on the soft keyboard to perform character input according to the motion data obtained by the second electronic device.
7. The input device according to claim 6, wherein The second electronic device includes an acceleration sensor, a pickup, and a vibration sensor; The pickup and the vibration sensor are configured to obtain a first predetermined motion and a second predetermined motion of the target object, where the first predetermined motion indicates the starting position of the target object's motion, and the second predetermined motion indicates the ending position of the target object's motion; The acceleration sensor is configured to collect acceleration data of the target object moving from the starting position to the ending position; The second electronic device is further configured to determine the moving direction and moving distance of the target object according to the acceleration data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
8. The input device according to claim 6, characterized in that, The second electronic device includes an acceleration sensor, a pickup, a vibration sensor, and an image acquisition module; The pickup and the vibration sensor are configured to obtain a first predetermined motion and a second predetermined motion of the target object, where the first predetermined motion indicates the starting position of the target object's motion, and the second predetermined motion indicates the ending position of the target object's motion; The image acquisition module is configured to collect image data of the target object moving from the starting position to the ending position; The second electronic device is further configured to determine the moving direction and moving distance of the target object according to the image data, the starting position, and the ending position, and the motion data includes the first predetermined motion, the second predetermined motion, the moving direction, and the moving distance.
9. The input device according to claim 7 or 8, characterized in that The first electronic device is further configured to determine a first position on the soft keyboard where the starting position is mapped; Move the moving distance from the first position on the soft keyboard in the moving direction to a second position; Perform character input on the key corresponding to the second position according to the second predetermined motion.
10. The input device according to claim 9, wherein, The first electronic device includes a display screen, and the first electronic device is further configured to determine moving pixels corresponding to the moving distance according to a mapping relationship between a preset moving distance of the target object and preset moving pixels of the display screen; Move the moving pixels from the first position on the soft keyboard in the moving direction to the second position.
11. An input device, characterized in that, The input device includes: A calling module, configured to call up the soft keyboard of the first electronic device in response to a first input to the second electronic device; An obtaining module, configured to obtain motion data of a target object by using the second electronic device; An input module, configured to drive corresponding keys on the soft keyboard to perform character input according to the motion data.
12. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the input method according to any one of claims 1 to 5 are implemented.
13. A readable storage medium, characterized in that, The program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the input method described in any one of claims 1 to 5 are implemented.