Method, device and electronic device for inputting text

By generating and comparing input sequences with standard sequences in user trajectories, the problem that wearable devices in the prior art is difficult to accurately input text, and higher input accuracy and efficiency are achieved.

CN114627478BActive Publication Date: 2025-03-25TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210224506.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2025-03-25
Estimated Expiration
2042-03-07

AI Technical Summary

Technical Problem

Existing wearable devices have difficulty accurately detecting user's text input intentions, resulting in low accuracy and efficiency of input text.

Method used

By obtaining the user's current trajectory, selecting N input points to generate an input sequence, and comparing the input sequence with the sequence in the preset standard sequence library to determine its corresponding text.

Benefits of technology

Accurate recognition of user trajectories is achieved, and the accuracy and efficiency of text input is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627478B_ABST
    Figure CN114627478B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for inputting text, wherein the method comprises: obtaining a current trajectory of user input, selecting N input points from the current trajectory, and generating an input sequence; judging whether the input sequence matches the standard sequence according to the distance between the input sequence and a standard sequence in a preset sequence library, wherein the standard sequence comprises N standard points, and each standard sequence corresponds to a corresponding text; taking the standard sequence in the sequence library that matches the input sequence as a valid sequence, and pushing at least one text corresponding to the valid sequence. By comparing the sequences comprising N points, the method, device and electronic device for inputting text provided by the embodiments of the present invention can more accurately determine which standard sequences the current trajectory of the user input matches, realize accurate recognition of the trajectory, and thus more accurately push text to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, and in particular to a method, device, electronic device and computer-readable storage medium for inputting text. Background Art

[0002] With the development of input technology, wearable devices such as smart rings are gradually coming into the public eye. Input and control based on wearable devices have great application potential in scenarios such as virtual reality, augmented reality, and smart home control.

[0003] Current wearable devices can only detect relatively simple command actions. When simulating input methods based on wearable devices in the hope of inputting text, it is difficult to accurately detect the user's intention, and the accuracy and input efficiency are relatively low. Summary of the invention

[0004] In order to solve the existing technical problems, the embodiments of the present invention provide a method, device, electronic device and computer-readable storage medium for inputting text.

[0005] In a first aspect, an embodiment of the present invention provides a method for inputting text, comprising:

[0006] Obtaining a current trajectory input by a user, selecting N input points from the current trajectory, and generating an input sequence;

[0007] Determining whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character;

[0008] The standard sequence in the sequence library that matches the input sequence is taken as a valid sequence, and at least one character corresponding to the valid sequence is pushed.

[0009] In a second aspect, an embodiment of the present invention further provides a device for inputting text, including:

[0010] An acquisition module, used to acquire a current trajectory input by a user, select N input points from the current trajectory, and generate an input sequence;

[0011] A judgment module, used for judging whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character;

[0012] The processing module is used to take the standard sequence in the sequence library that matches the input sequence as a valid sequence, and push at least one character corresponding to the valid sequence.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, and the computer program, when executed by the processor, implements the steps in any one of the above-described methods for inputting text.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in any one of the above-mentioned methods for inputting text.

[0015] The method, device, electronic device and computer-readable storage medium for inputting text provided by the embodiments of the present invention extract N input points from the current trajectory of the user input to generate an input sequence, and compare the input sequence with a preset standard sequence to determine the text corresponding to the input sequence. The method compares the sequences containing N points, and can more accurately determine which standard sequences the current trajectory of the user input matches, thereby accurately identifying the trajectory, so that the text can be pushed to the user more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0017] Figure 1 A flowchart of a method for inputting text provided by an embodiment of the present invention is shown;

[0018] Figure 2 A schematic diagram of a scenario in which a user inputs text provided by an embodiment of the present invention is shown;

[0019] Figure 3 A schematic diagram showing a current track of a user input provided by an embodiment of the present invention is shown;

[0020] Figure 4 A schematic diagram showing a method of pushing text to a user provided by an embodiment of the present invention is shown;

[0021] Figure 5 A schematic diagram showing the structure of a device for inputting text provided by an embodiment of the present invention is shown;

[0022] Figure 6 A schematic structural diagram of an electronic device for executing a method for inputting text provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0024] Figure 1 FIG. 1 is a flowchart of a method for inputting text provided by an embodiment of the present invention. Based on this method, a user can input text by inputting a track, such as Figure 1 As shown, the method includes:

[0025] Step 101: Obtain the current trajectory input by the user, select N input points from the current trajectory, and generate an input sequence.

[0026] In the embodiment of the present invention, when the user needs to input text, the user can input the corresponding trajectory through the wearable device worn, and the trajectory is referred to as the current trajectory in this embodiment. Figure 2 A schematic diagram of a scenario in which a user inputs text is shown. The user wears a first inertial sensor and a second inertial sensor. The figure shows an example in which the two inertial sensors are in the shape of a ring, and the two inertial sensors are worn on the thumb and index finger of the user respectively. When the user needs to input text, the user can use the keyboard seen or the imaginary keyboard to slide the track corresponding to the text. For example, the thumb is used as a pointer to slide on the index finger (for example, the first joint of the index finger) to draw a track, and then the user completes the operation of inputting the current track.

[0027] After the current trajectory is acquired, the embodiment of the present invention decodes the current trajectory, selects N input points from the current trajectory, and generates an input sequence including the N input points. For example, the current trajectory may be sampled equidistantly to obtain N points on the current trajectory, i.e., N input points. The i-th input point is g i , then the input sequence can be expressed as G = {g1,g2,…,g N}.

[0028] Optionally, since different users may have different trajectories when inputting the same text, in order to more accurately identify the trajectory input by each user, the embodiment of the present invention adjusts the trajectory input by the user to improve the accuracy of subsequent decoding. Specifically, the above step 101 "selecting N input points from the current trajectory to generate an input sequence" includes:

[0029] Step A1: Based on preset adjustment parameters, N original points (x', y') selected from the current trajectory are adjusted in a telescopic manner and / or linearly adjusted to generate N input points (x, y) and an input sequence; the adjustment parameters are parameters obtained based on the statistics of the user's historical behavior data.

[0030] The scaling adjustment includes: (x, y) = (x' / σx ,y' / σ y ), where σ x , σ y The horizontal input standard error and the vertical input standard error are obtained based on the user's historical behavior data.

[0031] The linear adjustment includes: determining the covariance matrix cov of the i-th letter point cloud i , by the covariance matrix cov i Perform SVD matrix decomposition to determine the transformation matrix M of the i-th letter point cloud i ,and: Where SVD() represents SVD matrix decomposition; the i-th letter point cloud is the distribution of the trajectory containing the i-th letter input by the user, i = 1, 2, ..., 26; the original point (x', y') is converted to the input point (x, y), and: (x, y) T =M -1 (x',y') T ;in,

[0032] In the embodiment of the present invention, when it is necessary to identify the input trajectory of a certain user, the behavior data of the user when inputting text before, that is, the historical behavior data, can be counted. The historical behavior data includes multiple trajectories when the user inputs corresponding letters (such as letters a, b, c, etc.). By counting the historical behavior data, the user behavior (such as the accuracy of swiping over a certain key, the accuracy or error in the horizontal and vertical directions, etc.) can be modeled to determine the horizontal input standard error σ of the user. x and the longitudinal input standard error σ y , the trajectory distribution of the user input containing the i-th letter can also be determined, and then the i-th letter point cloud can be determined.

[0033] The horizontal input standard error and the vertical input standard error can be used as adjustment parameters to adjust the original point. The adjusted original point can be used as the input point, and the input point is: (x, y) = (x' / σ x ,y' / σ y ). Alternatively, the i-th letter point cloud can be used as an adjustment parameter, and the transformation matrix M of each letter point cloud can be determined by SVD (Singular Value Decomposition) matrix decomposition. i , and then average the transformation matrices of all letters to obtain the final global transformation matrix M. Based on the global transformation matrix M, the original point is linearly adjusted. The input point obtained after adjustment satisfies: (x, y) T =M -1 (x',y') T .

[0034] Step 102: judging whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character.

[0035] In the embodiment of the present invention, the trajectories of multiple characters are predetermined, which are called standard trajectories in this embodiment. N points, namely N standard points, are also extracted from the standard trajectories, thereby forming a sequence including N standard points, namely a standard sequence, and then a sequence library including multiple standard sequences can be generated; wherein the standard sequence or standard trajectory of each character is different. After obtaining the input sequence input by the user, the distance between the input sequence and each standard sequence is calculated to compare whether the input sequence matches the standard sequence.

[0036] The present embodiment adopts a relative trajectory strategy, that is, the current trajectory or the preset standard trajectory is a trajectory starting from a fixed position. For example, for a QWERTY full keyboard, the trajectory may be a trajectory drawn starting from key position G.

[0037] Step 103: taking the standard sequence in the sequence library that matches the input sequence as a valid sequence, and pushing at least one character corresponding to the valid sequence.

[0038] If the input sequence matches certain standard sequences, these standard sequences can be used as valid sequences. The user is likely to enter the text corresponding to the valid sequence, and these texts are pushed to the user for input or selection. The number of valid sequences can be one or more; when pushing, the text corresponding to all valid sequences can be pushed to the user, or the text corresponding to some valid sequences can be pushed to the user.

[0039] For example, the current trajectory entered by the user is Figure 3 As shown in FIG. 1 , after comparison, it is determined that the sequence of the current trajectory matches the trajectory of the words “think”, “trump”, “jump”, “ink”, “imo”, etc. At this time, these words can be pushed and displayed to the user for the user to select, such as Figure 4 As shown, Figure 4 The method of selecting words by a disc is used as an example. Then, based on the user's selection, the corresponding text is input; for example, if the user inputs a right instruction, it can be considered that the user needs to input "think", and then think can be added to the text box.

[0040] An embodiment of the present invention provides a method for inputting text, extracting N input points from a current trajectory input by a user to generate an input sequence, and comparing the input sequence with a preset standard sequence to determine the text corresponding to the input sequence. The method compares the sequences containing N points, and can more accurately determine which standard sequences the current trajectory input by the user matches, thereby accurately identifying the trajectory, and thus more accurately pushing text to the user.

[0041] Based on the above embodiment, the above step 102 of "determining whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library" includes:

[0042] Step B1: Determine the distance D1(i, j) between the first i input points in the input sequence and the first j standard points in the standard sequence, and the distance D1(i, j) satisfies:

[0043] D1(i,j)=d(g i ,t j )+min{D1(i,j-1),D1(i-1,j),D1(i-1,j-1)};

[0044] Among them, g i represents the i-th input point in the input sequence, t j represents the jth standard point in the standard sequence, d(g i ,t j ) represents the input point g i With standard point t j The distance between them, i, j = 1, 2,…, N.

[0045] Step B2: taking the distance D1(N,N) as the first distance between the input sequence and the standard sequence, and determining that the input sequence matches the standard sequence when the first distance is less than a first preset threshold.

[0046] In the embodiment of the present invention, both the input sequence and the standard sequence are N-dimensional sequences. When determining the distance between the two, the Euclidean distance, Manhattan distance, etc. between the two can be calculated. However, since the lengths of the input sequence and the standard sequence may be different, but both have taken out N points, the input points in the input sequence and the standard points in the standard sequence may not correspond one to one. Therefore, the embodiment of the present invention sets i and j to increase successively, and the values ​​of i and j can be 1, 2, ..., N, and gradually determine the distance D1 (i, j) between the first i input points in the input sequence and the first j standard points in the standard sequence, until i = j = N, and the last determined distance D1 (N, N) is used as the first distance between the input sequence and the standard sequence.

[0047] Where D1(i,j)=d(gi ,t j )+min{D1(i,j-1),D1(i-1,j),D1(i-1,j-1)}, and the distances D1(i,0), D1(0,j), and D1(0,0) are all small values, for example, all are 0. d(g i ,t j ) represents the input point g i With standard point t j The distance between two points can be Euclidean distance, Manhattan distance, etc., or other methods of calculating the distance between two points, such as the distance determined based on the norm, d(g i ,t j )=||g i -t j ||, this embodiment does not limit this. In this embodiment, the first distance between the input sequence and the standard sequence determined in this way can better represent the similarity between the two sequences. The smaller the first distance, the closer the two sequences are, the higher the similarity between the two sequences is, and the more they match each other.

[0048] Optionally, although the first distance calculated above can accurately characterize whether the two sequences match, the calculation process is relatively complex and inefficient; the embodiment of the present invention first simply calculates the second distance between the input sequence and the standard sequence, and then calculates the first distance between the two when the second distance meets the conditions. Specifically, before the above step B1 "determining the distance D1(i,j) between the first i input points in the input sequence and the first j standard points in the standard sequence", the method further includes:

[0049] Step B3: Determine a second distance D2(G, T) between the input sequence G and the standard sequence T, and the second distance D2(G, T) satisfies:

[0050] Step B4: When the second distance D2(G,T) is less than the second preset threshold, the step of determining the distance D1(i,j) between the first i input points in the input sequence and the first j standard points in the standard sequence is performed.

[0051] In the embodiment of the present invention, based on the formula The second distance D2(G, T) between the input sequence G and each standard sequence T is quickly calculated. If the second distance D2(G, T) is less than the second preset threshold, it can be preliminarily determined that the input sequence is similar to the standard sequence and the two may be matched. Then, an accurate judgment is made based on the first distance between the two.

[0052] Among them, the above-mentioned first preset threshold and second preset threshold can be pre-set fixed values, or can be thresholds dynamically determined according to the currently determined first distance or second distance, such as a certain percentile, so as to select only a few standard sequences with the smallest distance.

[0053] In addition, the embodiment of the present invention can also combine the Bayesian language model to determine which characters to push. The above step 103 "pushing at least one character corresponding to a valid sequence" includes:

[0054] Step C1: Determine the probability P(w|context) of selecting the text w corresponding to the valid sequence based on the context context input by the user and the preset Bayesian language model.

[0055] Step C2: modify the probability P(w|context) according to the distance between the input sequence and the valid sequence, and push the text whose modified probability is greater than the preset probability value.

[0056] In the embodiment of the present invention, a Bayesian language model can be pre-trained and set, and the Bayesian language model can be a unigram model, a bigram model, etc. After determining the valid sequence, the text corresponding to the valid sequence is used as the optional text w, and the probability P(w|context) of currently using the optional text w is determined based on the context input by the user (generally only the above context). Moreover, based on the distance between the input sequence and the valid sequence, the probability can be further corrected, so that a more accurate probability value can be obtained, that is, the corrected probability can more accurately predict the possibility of currently selecting the text w, and then push one or more texts with high probability to the user.

[0057] Assuming the input sequence is G, the modified probability P(w|G;context) can be expressed as: P(w|G;context)=D(G,T w )×P(w|context) -α Among them, T w represents the valid sequence corresponding to the word w, and α represents the strength parameter of the Bayesian language model. w ) represents the input sequence G and the effective sequence T w The distance between them can be the first distance mentioned above.

[0058] Based on the above embodiment, the user can input the current trajectory based on multiple inertial sensors; and, in order to avoid erroneous input, this embodiment can collect the current trajectory input by the user after the user triggers the pinch action. Among them, the embodiment of the present invention uses the relative posture between multiple inertial sensors to collect whether the user triggers the pinch action and collect the trajectory input by the user.

[0059] Specifically, taking any two inertial sensors (i.e., the first inertial sensor and the second inertial sensor) as an example, the Euler angle is used to represent the spatial posture of the first inertial sensor and the second inertial sensor (i.e., the posture of each inertial sensor in space, including orientation, rotation, etc.). For any inertial sensor, the Euler angle can be expressed as (φ, θ, ψ), and a rotation matrix DCM (φ, θ, ψ) corresponding to the Euler angle can be expressed as:

[0060]

[0061] Let M r represents the rotation matrix of the first inertial sensor; similarly, the spatial posture collected by the second inertial sensor can also be expressed by Euler angles. Let the rotation matrix of the second inertial sensor be M d Therefore, the relative attitude matrix M of the first inertial sensor relative to the second inertial sensor is R It can be expressed as:

[0062] M R =M r -1 M d

[0063] Since the first inertial sensor and the second inertial sensor are in different coordinate systems, for any vector v0 in the coordinate system of the second inertial sensor, T , which can also be described by the first inertial sensor coordinate system, that is, the coordinate of the vector v0 in the first inertial sensor coordinate system can be expressed as: R v0=M r -1 M d v0.

[0064] Therefore, for any orthogonal vector (e i ,e j ), the projection (x, y) of any three-dimensional vector v0 in the second inertial sensor coordinate system on the plane determined by the orthogonal vector satisfies: (x, y) T =(e i ,e j ) T M R v0; that is, the projection (x, y) can be expressed as the relative attitude matrix M of the first inertial sensor relative to the second inertial sensor R A linear combination of parameters, for example, x = p·m R , y = q·m RSimilarly, the relative position d between the two inertial sensors can also be expressed as the relative attitude matrix M of the first inertial sensor relative to the second inertial sensor: R A linear combination of parameters, for example, d = r·m R Among them, m R The relative posture matrix M R The converted 9-dimensional vector, p and q are also 9-dimensional vectors, and the "·" in the formula represents the dot product operation. p and q are unknown coefficients. After obtaining the coefficients p and q, any relative posture matrix M can be determined R The corresponding projection (x, y). Similarly, r is also an unknown coefficient, hereinafter referred to as the kneading coefficient, and r is also a 9-dimensional vector, for example, a 3×3 relative posture matrix M R The converted 9-dimensional vector m R Can be: [a 11 ,a 12 ,a 13 ,a 21 ,a 22 ,a 23 ,a 31 ,a 32 ,a 33 ], where a ij Represents the relative posture matrix M R The element at row i and column j.

[0065] As described above, if the relative attitude matrix of the first inertial sensor with respect to the second inertial sensor is M R , converting it into a 9-dimensional vector m R , using a certain coefficient r, the position between the first inertial sensor and the second inertial sensor in a certain direction can be expressed. For example, if the pinch coefficient in the pinch direction is r, the position between the first inertial sensor and the second inertial sensor in the pinch direction can be expressed as r·m R . Thus, a loss function can be constructed, and the unknown kneading coefficient r can be obtained by minimizing the loss function. Similarly, using certain coefficients p and q, the coordinates (x, y) in the projection plane corresponding to the relative posture can be expressed.

[0066] Specifically, before step 101 "obtaining the current track of the user input", the method further includes a process of determining whether there is a pinching action, which includes steps D1-D2:

[0067] Step D1: Acquire multiple first current relative postures between the first inertial sensor and the second inertial sensor, determine movement parameters of the multiple first current relative postures in the pinching direction according to a preset pinching coefficient, and determine whether a pinching action is currently triggered according to the size of the movement parameter; the pinching coefficient can represent the relative position of the relative posture between the first inertial sensor and the second inertial sensor in the pinching direction.

[0068] Step D2: when the pinch action is triggered, executing the step of obtaining the current track of the user input;

[0069] Among them, the kneading coefficient is preset in the following way:

[0070] By changing the relative position of the first inertial sensor and the second inertial sensor in the pinching direction for multiple times, a plurality of valid relative posture groups related to the pinching direction are collected, wherein the valid relative posture group includes a first starting relative posture and a first ending relative posture between the first inertial sensor and the second inertial sensor.

[0071] By repeatedly changing the relative position of the first inertial sensor and the second inertial sensor in the preset plane, multiple invalid relative posture groups related to the preset plane are collected, and the invalid relative posture group includes a second starting relative posture and a second ending relative posture between the first inertial sensor and the second inertial sensor; the pinching direction is perpendicular to the preset plane.

[0072] Based on minimizing a preset first loss function by the valid relative posture group and the invalid relative posture group, the pinching coefficient in the first loss function is determined; the first loss function is used to indicate that there is movement in the pinching direction between the first starting relative posture and the first ending relative posture, and there is no movement in the pinching direction between the second starting relative posture and the second ending relative posture.

[0073] In the embodiment of the present invention, the first inertial sensor and the second inertial sensor are two inertial sensors that need to be identified, and the inertial sensor may be a nine-axis attitude sensor, which includes a three-axis accelerometer, a three-axis angular velocity meter, and a three-axis magnetometer. The first inertial sensor and the second inertial sensor are respectively set on different fingers of the user, and the user changes the relative position between the first inertial sensor and the second inertial sensor multiple times, so as to extract the starting relative attitude and the ending relative attitude of each time, and form a relative attitude group including the starting relative attitude and the ending relative attitude.

[0074] Among them, the first inertial sensor and the second inertial sensor are respectively set on different fingers of the user, and the direction corresponding to pinching two fingers or releasing two fingers is called the pinching direction; accordingly, a plane perpendicular to the pinching direction is selected as the preset plane. For example, the first inertial sensor and the second inertial sensor are respectively worn at the base of the thumb and the base of the index finger of the user's right hand in the form of rings. The inertial sensor at the base of the thumb can be used as the first inertial sensor, and the inertial sensor at the base of the index finger can be used as the second inertial sensor. The direction between the tip of the thumb and the tip of the index finger can be used as the pinching direction, and then a preset plane can be selected, for example, the preset plane can be the plane corresponding to the web of the index finger.

[0075] In the embodiment of the present invention, by changing the relative position between the first inertial sensor and the second inertial sensor in the pinching direction, a relative posture group, i.e., a valid relative posture group, can be collected; by changing the relative position between the first inertial sensor and the second inertial sensor in the preset plane, another relative posture group, i.e., an invalid relative posture group, can be collected. It can be understood by those skilled in the art that the "invalid relative posture group" means that the relative posture group has little or no change in the pinching direction, and is invalid for the change in the pinching direction, but this does not mean that the relative posture group is completely useless or invalid.

[0076] Among them, when collecting the relative posture group, the relative posture between the first inertial sensor and the second inertial sensor is first taken as a starting relative posture, that is, the starting relative posture; then the relative position of the first inertial sensor and the second inertial sensor in the pinching direction or on the preset plane is changed, and after the process of changing the relative position is completed, the relative posture between the first inertial sensor and the second inertial sensor is collected again. The relative posture is the relative posture corresponding to the end of the process of changing the relative position, which is called the ending relative posture in this embodiment; each time the relative position is changed, the starting relative posture and the ending relative posture can be collected successively. In this embodiment, the starting relative posture and the ending relative posture are taken as a group to obtain a relative posture group; by changing the relative position of the first inertial sensor and the second inertial sensor multiple times and repeating the above collection process, multiple relative posture groups can be obtained.

[0077] Specifically, when collecting a valid relative posture group, the relative posture between the first inertial sensor and the second inertial sensor before the relative position is changed can be used as the first starting relative posture, and the relative posture between the first inertial sensor and the second inertial sensor after the relative position is changed along the pinching direction can be used as the first ending relative posture. Correspondingly, when collecting an invalid relative posture group, the relative posture between the first inertial sensor and the second inertial sensor before the relative position is changed can be used as the second starting relative posture, and the relative posture between the first inertial sensor and the second inertial sensor after the relative position is changed along the preset plane can be used as the second ending relative posture.

[0078] For example, taking the first inertial sensor and the second inertial sensor as examples, the first starting relative posture is collected when the thumb and index finger are in a released state (open state), and the first ending relative posture is collected when the thumb and index finger are in a pinched state, or the first starting relative posture is collected when the thumb and index finger are in a pinched state, and the first ending relative posture is collected when the thumb and index finger are in a released state (open state). Similarly, the fingertip of the thumb moves from the fingertip of the index finger to the root of the index finger (or from the root of the index finger to the fingertip of the index finger) as a change of relative position, and the second starting relative posture and the second ending relative posture can be collected, so that the invalid relative posture group can be determined. The embodiment of the present invention can collect at least 5 valid relative posture groups by repeating the above process for many times, and can also collect more (for example, 10, 15, etc.) valid relative posture groups, and the number of invalid relative posture groups is also the same, as long as it can ensure that the pinch coefficient can be determined. Among them, in order to better determine the pinch coefficient, in the process of collecting the invalid relative posture group, the first inertial sensor or the second inertial sensor can be moved in different directions in the preset plane.

[0079] In the embodiment of the present invention, the pinch coefficient can represent the corresponding relationship between the relative posture between two inertial sensors (first inertial sensor, second inertial sensor) and the position of the two inertial sensors in the pinch direction, that is, the relative posture between the two inertial sensors can be converted into the position of the two inertial sensors in the pinch direction by using the pinch coefficient. Based on the above process of collecting the effective relative posture group and the invalid relative posture group, it can be known that the process corresponding to the effective relative posture group moves in the pinch direction, so the first starting relative posture and the first ending relative posture move in the pinch direction, for example, the difference between the position corresponding to the first starting relative posture determined based on the pinch coefficient and the position corresponding to the first ending relative posture determined based on the pinch coefficient should not be zero; while the process corresponding to the invalid relative posture group does not move in the pinch direction, so the second starting relative posture and the second ending relative posture do not move in the pinch direction, for example, the difference between the position corresponding to the second starting relative posture determined based on the pinch coefficient and the position corresponding to the second ending relative posture determined based on the pinch coefficient should be zero.

[0080] The first loss function can be solved using multiple valid relative posture groups and invalid relative posture groups to determine the kneading coefficient therein. For example, the kneading coefficient can be solved by the least square method with a regularization term. Among them, the kneading coefficient r is related to the specific form of the first loss function and the sampling method of the valid relative posture group. For example, a position change can be performed from the released state to the pinched state, so that a valid relative posture group can be collected; or, a position change can be performed from the pinched state to the released state, so that another valid relative posture group can be collected. The kneading coefficients r corresponding to these two valid relative posture groups are generally different.

[0081] After the pinch coefficient is determined, when the relative posture between the first inertial sensor and the second inertial sensor is determined based on the data collected by the two, the positions of the two in the pinch direction can be converted, and the movement between the two inertial sensors can be determined based on the changes in multiple positions. Specifically, during use, multiple latest relative postures between the first inertial sensor and the second inertial sensor, that is, the current relative postures, can be obtained, and then the movement parameters between the two inertial sensors in the pinch direction can be determined based on the multiple current relative postures. The movement parameters are used to represent the movement of the two inertial sensors in the pinch direction. For example, if the position of the two inertial sensors in the pinch direction becomes smaller, that is, the user triggers a pinch action, then the movement parameter is positive; if the position of the two inertial sensors in the pinch direction becomes larger, that is, the user triggers a release action, then the movement parameter is negative; and, the larger the movement position of the two inertial sensors in the pinch direction, the larger the absolute value of the movement parameter.

[0082] Conversely, whether a pinch action or a release action is triggered can be determined based on the size of the movement parameter. For example, if the movement parameter is positive and large enough, it can be considered that a pinch action is triggered; if the movement parameter is negative and its absolute value is large enough, it can be considered that a release action is triggered.

[0083] Optionally, the first loss function may include:

[0084]

[0085] Among them, S t Represents the effective relative posture group (u i ,v i ), S represents the invalid relative posture group (x i ,y i ), u i represents the first starting relative posture, v i Indicates the first ending relative posture, x i Indicates the second starting relative posture, y i represents the second end relative posture, r represents the kneading coefficient in the first loss function, λ represents the preset coefficient, and k0 is a non-zero constant; where u i 、v i 、x i ,y i They are all 9-dimensional vectors obtained by transforming the corresponding relative posture matrix.

[0086] In the embodiment of the present invention, L r is a preset first loss function; r is a pinch coefficient in the first loss function that can represent the relationship between the relative posture between the first inertial sensor and the second inertial sensor and the position in the pinching direction; the first starting relative posture in the effective relative posture group collected by the first inertial sensor relative to the second inertial sensor in the pinching direction is set to u i , the first ending relative posture is set to v i ; Set the second starting relative posture in the invalid relative posture group collected by the first inertial sensor relative to the second inertial sensor in the preset plane to x i , the second ending relative posture is set to y i ; i.e. (u i ,v i ) is the i-th valid relative posture group collected, (x i ,y i ) is the i-th invalid relative posture group collected; let S t represents a set of multiple valid relative posture groups, and S represents a set of multiple invalid relative posture groups. i 、v i 、x i ,yi are all 9-dimensional vectors obtained by transforming the corresponding relative posture matrix; k0 can be 1 or other non-zero constants; λ represents a preset coefficient, for example, λ can be less than 1.

[0087] Wherein, k0 represents the expected r·(u i -v i ). For example, the effective relative posture group is collected from the user's release state to the pinch state. If k0=1, it can be considered that when the user is in the release state, the position calibration between the two inertial sensors is 0, and when the user is in the pinch state, the position calibration between the two inertial sensors is 1. In addition, the closer the user's posture is to the pinch state, the closer the dot product between the pinch coefficient r and the relative posture is to 1.

[0088] In the first loss function L of the embodiment of the present invention, r In the equation, the kneading coefficient r and u i -v i Perform a dot product operation to obtain the position change in the kneading direction, and minimize the first loss function L r , so that the kneading coefficient r can make the position change r·(u i -v i ) is close to the preset non-zero coefficient k0 in the pinching direction; since in the pinching direction, the second starting relative posture x i and the second end relative posture y i There is no relative displacement, in this first loss function L r r·(x i -y i ) represents the displacement in the pinching direction corresponding to the invalid relative posture group, which should be close to 0; and, in order to avoid a large value in the pinching coefficient r (the pinching coefficient is a 9-dimensional vector containing 9 values), in the first loss function L p Add a loss term in: λ‖r‖ 2 Therefore, by minimizing the first loss function, the first initial relative posture u determined based on the pinch coefficient r can be i The relative posture v of the first end i The position change in the pinching direction approaches non-zero k0, and the second starting relative posture x i The relative posture y of the second end i The position change in the kneading direction approaches 0, so that the kneading coefficient r after minimizing the first loss function can be finally determined.

[0089] Optionally, the above step 101 of "obtaining the current trajectory of the user input" may include:

[0090] Step E1: obtaining a second current relative posture between the first inertial sensor and the second inertial sensor, determining a current projection in a preset plane corresponding to the second current relative posture according to a preset projection coefficient, and generating a current trajectory according to a plurality of current projections; the projection coefficient is used to represent a relationship between the relative posture between the first inertial sensor and the second inertial sensor and the projection in the preset plane;

[0091] Among them, the projection coefficient is preset in the following way:

[0092] By repeatedly changing the relative position of the first inertial sensor and the second inertial sensor in the horizontal direction, a plurality of horizontal relative posture groups related to the horizontal direction are collected, wherein the horizontal relative posture group includes a horizontal starting relative posture and a horizontal ending relative posture between the first inertial sensor and the second inertial sensor.

[0093] By repeatedly changing the relative position of the first inertial sensor and the second inertial sensor in the vertical direction, a plurality of vertical relative posture groups related to the vertical direction are collected, wherein the vertical relative posture group includes a vertical starting relative posture and a vertical ending relative posture between the first inertial sensor and the second inertial sensor; the horizontal direction is perpendicular to the vertical direction, and both the horizontal direction and the vertical direction are located in a preset plane.

[0094] Based on minimizing a preset second loss function for the horizontal relative posture group and the vertical relative posture group, the projection coefficient in the second loss function is determined; the second loss function is used to express the difference between the projection change amount of the horizontal starting relative posture and the horizontal ending relative posture on the preset plane and the preset change amount in the horizontal direction, and the difference between the projection change amount of the vertical starting relative posture and the vertical ending relative posture on the preset plane and the preset change amount in the vertical direction.

[0095] In an embodiment of the present invention, similar to the above-mentioned collection of valid relative posture groups along the kneading direction, a horizontal relative posture group and a vertical relative posture group can be collected along the horizontal direction and the vertical direction, respectively. Among them, the horizontal direction and the vertical direction are perpendicular to each other, and both are located in the preset plane, that is, the horizontal relative posture group and the vertical relative posture group can be directly used as the above-mentioned invalid relative posture group. Among them, the horizontal direction and the vertical direction are two directions perpendicular to each other in the preset plane, and the "horizontal" and "vertical" are relative to the preset plane, and the "horizontal direction" and "vertical direction" are not limited to the direction parallel to the horizontal plane and the direction perpendicular to the horizontal plane. For example, the preset plane can be parallel to the horizontal plane, and at this time, two perpendicular directions can still be selected from the preset plane as the "horizontal direction" and "vertical direction" in this embodiment.

[0096] For example, taking the first inertial sensor and the second inertial sensor as an example, the direction between the tip of the index finger and the base of the index finger can be taken as the horizontal direction, and the direction perpendicular to the direction between the tip of the index finger and the base of the index finger in the preset plane can be taken as the vertical direction. In the process of collecting the invalid relative posture group, the fingertip of the thumb moves from the tip of the index finger to the base of the index finger (or from the base of the index finger to the tip of the index finger), and the horizontal starting relative posture and the horizontal ending relative posture can be collected, thereby obtaining the horizontal relative posture group; and the thumb is moved from the uppermost position of the middle of the index finger to the lowermost position of the middle of the index finger in the direction perpendicular to the index finger, and the vertical starting relative posture and the vertical ending relative posture can be collected, thereby obtaining the vertical relative posture group.

[0097] In an embodiment of the present invention, the projection coefficient (such as the above-mentioned p and q) can represent the relationship between the relative posture and the projection in a certain plane. Since the sampling is performed based on the horizontal direction and the vertical direction in the above-mentioned steps 101 and 102, the plane determined by the horizontal direction and the vertical direction is used as the preset plane in this embodiment, and the projection coefficient represents the relationship between the relative posture and the projection in the preset plane; wherein, since the horizontal direction is perpendicular to the vertical direction, any plane may be set as the preset plane. Based on the horizontal relative posture group, the projection coefficient can be used to represent the projection change in the horizontal direction on the preset plane. For example, the horizontal direction can be the x-axis, the vertical direction can be the y-axis, the horizontal starting relative posture is m, and the horizontal ending relative posture is n. Then the projection change in the horizontal direction of the horizontal relative posture group can be expressed as p·(mn), and the projection change in the vertical direction can be expressed as q·(mn); similarly, the projection change corresponding to the vertical relative posture group can also be represented based on the projection coefficient.

[0098] In an embodiment of the present invention, a second loss function is preset, in which the projection changes of the horizontal relative posture group and the vertical relative posture group on the preset plane are represented based on the projection coefficient, and the difference between the projection change and the preset change amount is used as the "loss", that is, the second loss function can represent the difference between the projection change amount of the horizontal relative posture group on the preset plane and the preset change amount in the horizontal direction, and the difference between the projection change amount of the vertical relative posture group on the preset plane and the preset change amount in the vertical direction. By minimizing the second loss function, the above-mentioned "loss" can be minimized, and then the projection coefficient in the second loss function when the difference is minimized can be determined. For example, the projection coefficient in the second loss function can be determined by the least squares method.

[0099] Optionally, the second loss function in the method includes:

[0100]

[0101]

[0102] Among them, S h represents the set of horizontal relative posture groups, S v represents the set of vertical relative posture groups, m i Indicates the horizontal starting relative posture, n i Indicates the horizontal end relative posture, a i Indicates the vertical starting relative posture, b i represents the vertical end relative posture, p and q represent the projection coefficients in the second loss function, λ represents the preset coefficient, k1 and k2 are both non-zero constants; where m i 、n i 、a i , b i It is a 9-dimensional vector transformed by the corresponding relative attitude matrix.

[0103] In the embodiment of the present invention, L p With L q is a preset second loss function; p and q are projection coefficients in the second loss function that can represent the relationship between the relative posture between the first inertial sensor and the second inertial sensor and the projection in the preset plane, that is, the weight coefficients of the real acquisition value; the horizontal starting relative posture in the horizontal relative posture group collected by the first inertial sensor relative to the second inertial sensor in the horizontal direction is set to m i , the horizontal ending relative posture is set to n i ; Set the vertical starting relative posture in the vertical relative posture group collected by the first inertial sensor relative to the second inertial sensor in the vertical direction to a i , the vertical ending relative posture is set to b i ; That is (m i ,n i ) is the i-th horizontal relative posture group collected, (a i ,b i ) is the i-th vertical relative posture group collected; let S h represents a set of multiple horizontal relative posture groups, S v It represents a set of multiple vertical relative posture groups. i 、n i 、a i , b i It is a 9-dimensional vector obtained by transforming the corresponding relative posture matrix; and k1 and k2 are both non-zero constants, which can be 1 or other non-zero constants, when k1 corresponds to the preset change in the horizontal direction, k2 corresponds to the preset change in the vertical direction; λ represents a preset coefficient, for example, λ can be less than 1.

[0104] In the second loss function L of the embodiment of the present invention, p In the projection coefficient p and (m i -n i ) performs a dot product operation to obtain the projection change in the horizontal direction, and minimizes the second loss function L p , so that the projection coefficient p can make the projection change in the horizontal direction p·(m i -n i ) is close to the preset change amount k1 in the horizontal direction; since in the horizontal direction, the vertical starting relative posture a i and vertical end relative posture b i There is no relative displacement, so in this second loss function L p Let the projection coefficient p and (a i -b i ) performs a dot product operation, the dot product operation result represents the displacement in the horizontal direction corresponding to the vertical relative posture group, which should be close to 0; and, in order to avoid a large value in the projection coefficient p (the projection coefficient is a 9-dimensional vector containing 9 values), in the second loss function L p Add a loss term in: λ‖p‖ 2 Therefore, by minimizing the second loss function, the horizontal starting relative posture m determined based on the projection coefficient p can be i The relative posture n with respect to the horizontal end i The projection change on the preset plane is close to or coincides with the preset change k1 in the horizontal direction. i The vertical end relative posture b i The projection change on the preset plane approaches 0, so that the projection coefficient p after minimizing the second loss function can be finally determined. Similarly, the second loss function L q The projection coefficient q can also be calculated using the same operation method, which will not be described in detail here.

[0105] In the embodiment of the present invention, based on the preset second loss function L p With L q And the collected multiple relative postures m i 、n i 、a i , b i , the projection coefficients p and q can be determined quickly and easily.

[0106] The embodiment of the present invention can collect multiple valid relative posture groups, invalid relative posture groups, horizontal relative posture groups and vertical relative posture groups by changing the relative positions of the two inertial sensors for multiple times, and minimize the preset loss function based on the relative posture group to obtain the pinching coefficient that can represent the relative position of the relative posture in the pinching direction, and the projection coefficient that can represent the relationship between the relative posture and the projection in the preset plane; after the current relative posture is collected in real time, it can be quickly determined whether there is a pinching action or a release action, and the collected current relative posture can be converted into the current projection in the preset plane in real time, and the relative position of the two inertial sensors in space is represented based on the current projection. The method does not need to directly determine the spatial absolute position or spatial relative position of multiple inertial sensors, nor does it need a unified coordinate system, etc., and can quickly respond to the relative posture changes between multiple inertial sensors, so that the controlled device can quickly respond to the instructions issued by the user by operating multiple inertial sensors; and the sampling process of the method and the process of determining the pinching coefficient and the projection coefficient are relatively simple, and the calibration of the spatial position can be realized simply and quickly.

[0107] The above describes in detail the method for inputting text provided by an embodiment of the present invention. The method can also be implemented by a corresponding device. The following describes in detail the device for inputting text provided by an embodiment of the present invention.

[0108] Figure 5 FIG. 1 is a schematic diagram showing the structure of a device for inputting text provided by an embodiment of the present invention. Figure 5 As shown, the device for inputting text includes:

[0109] The acquisition module 51 is used to acquire the current trajectory of the user input, select N input points from the current trajectory, and generate an input sequence.

[0110] The judgment module 52 is used to judge whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character.

[0111] The processing module 53 is used to take the standard sequence in the sequence library that matches the input sequence as a valid sequence, and push at least one character corresponding to the valid sequence.

[0112] On the basis of the above embodiment, the device further includes: a trigger module;

[0113] The trigger module is used to, before obtaining the current trajectory of the user input, obtain multiple first current relative postures between the first inertial sensor and the second inertial sensor, determine the movement parameters of the multiple first current relative postures in the pinching direction according to a preset pinching coefficient, and determine whether a pinching action is currently triggered according to the size of the movement parameter; the pinching coefficient can represent the relative position of the relative posture between the first inertial sensor and the second inertial sensor in the pinching direction; and, when the pinching action is triggered, execute the step of obtaining the current trajectory of the user input.

[0114] Wherein, the kneading coefficient is preset in the following manner:

[0115] By changing the relative position of the first inertial sensor and the second inertial sensor in the pinching direction for multiple times, a plurality of valid relative posture groups related to the pinching direction are collected, wherein the valid relative posture groups include a first starting relative posture and a first ending relative posture between the first inertial sensor and the second inertial sensor;

[0116] By changing the relative positions of the first inertial sensor and the second inertial sensor in a preset plane for multiple times, a plurality of invalid relative posture groups related to the preset plane are collected, wherein the invalid relative posture groups include a second starting relative posture and a second ending relative posture between the first inertial sensor and the second inertial sensor; the pinching direction is perpendicular to the preset plane;

[0117] Based on minimizing a preset first loss function by the valid relative posture group and the invalid relative posture group, a pinch coefficient in the first loss function is determined; the first loss function is used to indicate that there is movement in the pinch direction between the first starting relative posture and the first ending relative posture, and there is no movement in the pinch direction between the second starting relative posture and the second ending relative posture.

[0118] Based on the above embodiment, the acquisition module 51 acquires the current track of the user input including:

[0119] Acquire a second current relative posture between the first inertial sensor and the second inertial sensor, determine a current projection in a preset plane corresponding to the second current relative posture according to a preset projection coefficient, and generate a current trajectory according to a plurality of the current projections; the projection coefficient is used to represent a relationship between the relative posture between the first inertial sensor and the second inertial sensor and the projection in the preset plane;

[0120] The projection coefficient is preset in the following manner:

[0121] By changing the relative position of the first inertial sensor and the second inertial sensor in the horizontal direction for multiple times, a plurality of horizontal relative posture groups related to the horizontal direction are collected, wherein the horizontal relative posture group includes a horizontal starting relative posture and a horizontal ending relative posture between the first inertial sensor and the second inertial sensor;

[0122] By changing the relative position of the first inertial sensor and the second inertial sensor in the vertical direction for multiple times, a plurality of vertical relative posture groups related to the vertical direction are collected, wherein the vertical relative posture group includes a vertical starting relative posture and a vertical ending relative posture between the first inertial sensor and the second inertial sensor; the horizontal direction is perpendicular to the vertical direction, and both the horizontal direction and the vertical direction are located in the preset plane;

[0123] Based on minimizing a preset second loss function for the horizontal relative posture group and the vertical relative posture group, the projection coefficient in the second loss function is determined; the second loss function is used to express the difference between the projection change amount of the horizontal starting relative posture and the horizontal ending relative posture on the preset plane and the preset change amount in the horizontal direction, and the difference between the projection change amount of the vertical starting relative posture and the vertical ending relative posture on the preset plane and the preset change amount in the vertical direction.

[0124] Based on the above embodiment, the acquisition module 51 selects N input points from the current trajectory to generate an input sequence, including:

[0125] Based on a preset adjustment parameter, N original points (x', y') selected from the current trajectory are adjusted in a telescopic manner and / or linearly adjusted to generate N input points (x, y), and to generate the input sequence; the adjustment parameter is a parameter obtained by statistics based on the historical behavior data of the user;

[0126] The telescopic adjustment includes:

[0127] (x,y)=(x' / σ x ,y' / σ y ), where σ x , σ y The horizontal input standard error and the vertical input standard error are obtained according to the historical behavior data of the user;

[0128] The linear adjustment includes:

[0129] Determine the covariance matrix cov of the i-th letter point cloud i , through the covariance matrix cov i Perform SVD matrix decomposition to determine the transformation matrix M of the i-th letter point cloudi ,and: Wherein SVD() represents SVD matrix decomposition; the i-th letter point cloud is the distribution of the trajectory containing the i-th letter input by the user before, i=1,2,…,26;

[0130] Convert the original point (x',y') to the input point (x,y), and: (x,y) T =M -1 (x',y') T ;

[0131] in,

[0132] On the basis of the above embodiment, the judgment module 52 judges whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, including:

[0133] Determine the distance D1(i, j) between the first i input points in the input sequence and the first j standard points in the standard sequence, and the distance D1(i, j) satisfies:

[0134] D1(i,j)=d(g i ,t j )+min{D1(i,j-1),D1(i-1,j),D1(i-1,j-1)};

[0135] Among them, g i represents the i-th input point in the input sequence, t j represents the jth standard point in the standard sequence, d(g i ,t j ) represents the input point g i With standard point t j The distance between them, i, j = 1, 2, ..., N;

[0136] The distance D1(N,N) is used as a first distance between the input sequence and the standard sequence, and when the first distance is less than a first preset threshold, it is determined that the input sequence matches the standard sequence.

[0137] Based on the above embodiment, the judging module 52 is further used for:

[0138] Before determining the distance D1(i,j) between the first i input points in the input sequence and the first j standard points in the standard sequence, a second distance D2(G,T) between the input sequence G and the standard sequence T is determined, and the second distance D2(G,T) satisfies:

[0139] When the second distance D2(G,T) is less than a second preset threshold, a step of determining the distance D1(i,j) between the first i input points in the input sequence and the first j standard points in the standard sequence is performed.

[0140] Based on the above embodiment, the processing module 53 pushes at least one character corresponding to the valid sequence, including:

[0141] Determine the probability P(w|context) of selecting the word w corresponding to the valid sequence according to the context context input by the user and a preset Bayesian language model;

[0142] The probability P(w|context) is modified according to the distance between the input sequence and the valid sequence, and the text whose modified probability is greater than the preset probability value is pushed.

[0143] In addition, an embodiment of the present invention further provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected via a bus. When the computer program is executed by the processor, each process of the above-mentioned method for inputting text is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0144] For details, see Figure 6 As shown, an embodiment of the present invention further provides an electronic device, which includes a bus 1110 , a processor 1120 , a transceiver 1130 , a bus interface 1140 , a memory 1150 and a user interface 1160 .

[0145] In an embodiment of the present invention, the electronic device further includes: a computer program stored in the memory 1150 and executable on the processor 1120, and when the computer program is executed by the processor 1120, each process of the above-mentioned text input method embodiment is implemented.

[0146] The transceiver 1130 is configured to receive and send data under the control of the processor 1120 .

[0147] In an embodiment of the present invention, the bus architecture (represented by bus 1110), bus 1110 may include any number of interconnected buses and bridges, and bus 1110 connects various circuits including one or more processors represented by processor 1120 and a memory represented by memory 1150.

[0148] Bus 1110 represents one or more of any of several types of bus structures, including a memory bus and memory controller, a peripheral bus, an Accelerate Graphical Port (AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example and not limitation, such architectures include: Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA), Peripheral Component Interconnect (PCI) bus.

[0149] The processor 1120 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processors include: a general-purpose processor, a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a programmable logic array (PLA), a microcontroller unit (MCU) or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. For example, the processor may be a single-core processor or a multi-core processor, and the processor may be integrated into a single chip or located in multiple different chips.

[0150] Processor 1120 can be a microprocessor or any conventional processor. The method steps disclosed in conjunction with the embodiments of the present invention can be directly executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a readable storage medium known in the art, such as a random access memory (RAM), a flash memory (FlashMemory), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a register, etc. The readable storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware.

[0151] The bus 1110 may also connect various other circuits such as peripheral devices, voltage regulators or power management circuits, and the bus interface 1140 provides an interface between the bus 1110 and the transceiver 1130, which are well known in the art. Therefore, the embodiments of the present invention will not be further described.

[0152] The transceiver 1130 may be one element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on a transmission medium. For example, the transceiver 1130 receives external data from other devices, and the transceiver 1130 is used to send data processed by the processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, such as a touch screen, a physical keyboard, a display, a mouse, a speaker, a microphone, a trackball, a joystick, and a stylus.

[0153] It should be understood that in an embodiment of the present invention, the memory 1150 may further include a memory remotely arranged relative to the processor 1120, and these remotely arranged memories may be connected to the server through a network. One or more parts of the above-mentioned network may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless local area network (WLAN), a wide area network (WAN), a wireless wide area network (WWAN), a metropolitan area network (MAN), the Internet, a public switched telephone network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless network, a wireless fidelity (Wi-Fi) network, and a combination of two or more of the above-mentioned networks. For example, the cellular telephone network and the wireless network can be a Global System for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, a LTE Frequency Division Duplex (FDD) system, a LTE Time Division Duplex (TDD) system, an Advanced Long Term Evolution (LTE-A) system, a Universal Mobile Telecommunications (UMTS) system, an Enhanced Mobile Broadband (Enhance Mobile Broadband, eMBB) system, a massive Machine Type of Communication (mMTC) system, an Ultra-Reliable Low Latency Communications (UltraReliable Low Latency Communications, uRLLC) system, etc.

[0154] It should be understood that the memory 1150 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory includes: a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.

[0155] Volatile memory includes: Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as: Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Synchronous Link Dynamic Random Access Memory (SLDRAM) and Direct Rambus RAM (DRRAM). The memory 1150 of the electronic device described in the embodiment of the present invention includes but is not limited to the above and any other suitable types of memory.

[0156] In the embodiment of the present invention, the memory 1150 stores the following elements of the operating system 1151 and the application program 1152: executable modules, data structures, or subsets thereof, or extended sets thereof.

[0157] Specifically, the operating system 1151 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 1152 includes various applications, such as a media player (Media Player) and a browser (Browser), which are used to implement various application services. The program for implementing the method of the embodiment of the present invention may be included in the application 1152. The application 1152 includes applets, objects, components, logic, data structures, and other computer system executable instructions that perform specific tasks or implement specific abstract data types.

[0158] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned method embodiment for inputting text are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0159] Computer readable storage media include: permanent and non-permanent, removable and non-removable media, which are tangible devices that can retain and store instructions for use by instruction execution devices. Computer readable storage media include: electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, and any suitable combination of the above. Computer readable storage media include: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanical encoding devices (such as punched cards or raised structures in grooves with instructions recorded thereon) or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined in the embodiments of the present invention, computer-readable storage media do not include temporary signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (such as light pulses passing through fiber optic cables), or electrical signals transmitted through wires.

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

[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one location or distributed on multiple network units. Some or all of the units may be selected according to actual needs to solve the problem to be solved by the embodiments of the present invention.

[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (including: a personal computer, a server, a data center or other network device) to perform all or part of the steps of the method described in each embodiment of the present invention. The above-mentioned storage medium includes various media that can store program codes as listed above.

[0164] In the description of the embodiments of the present invention, those skilled in the art should know that the embodiments of the present invention can be implemented as methods, devices, electronic devices and computer-readable storage media. Therefore, the embodiments of the present invention can be specifically implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), a combination of hardware and software. In addition, in some embodiments, the embodiments of the present invention can also be implemented in the form of a computer program product in one or more computer-readable storage media, and the computer-readable storage medium contains computer program code.

[0165] The above-mentioned computer-readable storage medium may adopt any combination of one or more computer-readable storage media. Computer-readable storage media include: electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memories, optical fibers, compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices or any combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device, or device.

[0166] The computer program code contained in the above-mentioned computer-readable storage medium can be transmitted using any appropriate medium, including: wireless, wire, optical cable, radio frequency (RF) or any suitable combination thereof.

[0167] The computer program code for performing the operation of the embodiments of the present invention can be written in assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages ​​or a combination thereof, wherein the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The computer program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, and completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer or to an external computer through any type of network, including a local area network (LAN) or a wide area network (WAN).

[0168] The embodiments of the present invention describe the provided methods, devices, and electronic devices through flowcharts and / or block diagrams.

[0169] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer-readable program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified by the boxes in the flowchart and / or block diagram.

[0170] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to work in a specific manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction device product including functions / operations specified in the blocks in the flowchart and / or block diagram.

[0171] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable data processing apparatus to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.

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

Claims

1. A method for inputting text, characterized in that: include: Acquire multiple first current relative postures between the first inertial sensor and the second inertial sensor, determine the movement parameters of the multiple first current relative postures in the pinching direction according to the preset pinching coefficient, and determine whether the pinching action is triggered according to the size of the movement parameter; the pinching coefficient can represent the relative position of the relative posture between the first inertial sensor and the second inertial sensor in the pinching direction; and in the case of triggering the pinching action, perform the step of acquiring the current trajectory of the user input; the first inertial sensor and the second inertial sensor are respectively set on different fingers of the user; the pinching direction is the direction corresponding to pinching or releasing two fingers, and the two fingers are the fingers for setting the first inertial sensor and the second inertial sensor respectively; Wherein, the kneading coefficient is preset in the following manner: By changing the relative position of the first inertial sensor and the second inertial sensor in the pinching direction for multiple times, a plurality of valid relative posture groups related to the pinching direction are collected, wherein the valid relative posture groups include a first starting relative posture and a first ending relative posture between the first inertial sensor and the second inertial sensor; By changing the relative positions of the first inertial sensor and the second inertial sensor in a preset plane for multiple times, a plurality of invalid relative posture groups related to the preset plane are collected, wherein the invalid relative posture groups include a second starting relative posture and a second ending relative posture between the first inertial sensor and the second inertial sensor; the pinching direction is perpendicular to the preset plane; Based on minimizing a preset first loss function of the valid relative posture group and the invalid relative posture group, determining a pinch coefficient in the first loss function; the first loss function is used to indicate that there is movement between the first starting relative posture and the first ending relative posture in the pinch direction, and there is no movement between the second starting relative posture and the second ending relative posture in the pinch direction; Among them, the first loss function is: S t Represents the effective relative posture group (u i ,v i ), S represents the invalid relative posture group (x i ,y i ), u i represents the first starting relative posture, v i Indicates the first ending relative posture, x i Indicates the second starting relative posture, y i represents the second end relative posture, r represents the kneading coefficient in the first loss function, λ represents the preset coefficient, and k0 is a non-zero constant; where u i 、v i 、x i ,y i are all 9-dimensional vectors obtained by converting the corresponding relative attitude matrix; the relative attitude matrix is ​​the relative attitude matrix of the first inertial sensor relative to the second inertial sensor; The obtaining of the current trajectory of the user input is specifically: obtaining a second current relative posture between the first inertial sensor and the second inertial sensor, determining a current projection in a preset plane corresponding to the second current relative posture according to a preset projection coefficient, and generating the current trajectory of the user input according to a plurality of the current projections; the projection coefficient is used to represent the relationship between the relative posture between the first inertial sensor and the second inertial sensor and the projection in the preset plane; The projection coefficient is preset in the following manner: By changing the relative position of the first inertial sensor and the second inertial sensor in the horizontal direction for multiple times, a plurality of horizontal relative posture groups related to the horizontal direction are collected, wherein the horizontal relative posture group includes a horizontal starting relative posture and a horizontal ending relative posture between the first inertial sensor and the second inertial sensor; By changing the relative position of the first inertial sensor and the second inertial sensor in the vertical direction for multiple times, a plurality of vertical relative posture groups related to the vertical direction are collected, wherein the vertical relative posture group includes a vertical starting relative posture and a vertical ending relative posture between the first inertial sensor and the second inertial sensor; the horizontal direction is perpendicular to the vertical direction, and both the horizontal direction and the vertical direction are located in the preset plane; Based on minimizing a preset second loss function of the horizontal relative posture group and the vertical relative posture group, determining a projection coefficient in the second loss function; the second loss function is used to represent the difference between the projection change amount of the horizontal starting relative posture and the horizontal ending relative posture on the preset plane and the preset change amount in the horizontal direction, and the difference between the projection change amount of the vertical starting relative posture and the vertical ending relative posture on the preset plane and the preset change amount in the vertical direction; Among them, the second loss function is: S h represents the set of horizontal relative posture groups, S v represents the set of vertical relative posture groups, m i Indicates the horizontal starting relative posture, n i Indicates the horizontal end relative posture, a i Indicates the vertical starting relative posture, b i represents the vertical end relative posture, p and q represent the projection coefficients in the second loss function, λ represents the preset coefficient, k1 and k2 are both non-zero constants; where m i 、n i 、a i , b i is a 9-dimensional vector transformed by the corresponding relative attitude matrix; L p With L q represents the second loss function; (m i ,n i ) represents the i-th horizontal relative posture group collected, (a i ,b i ) represents the i-th vertical relative posture group collected; λ represents a preset coefficient; Selecting N input points from the current trajectory to generate an input sequence, specifically, performing scaling adjustment and / or linear adjustment on the N original points (x', y') selected from the current trajectory based on a preset adjustment parameter to generate N input points (x, y), and generating the input sequence; the adjustment parameter is a parameter obtained based on statistics of the historical behavior data of the user; The telescopic adjustment includes: (x,y)=(x' / σ x ,y' / σ y ), where σ x , σ y The horizontal input standard error and the vertical input standard error are obtained according to the historical behavior data of the user; The linear adjustment includes: Determine the covariance matrix cov of the i-th letter point cloud i , through the covariance matrix cov i Perform SVD matrix decomposition to determine the transformation matrix M of the i-th letter point cloud i ,and: Wherein SVD() represents SVD matrix decomposition; the i-th letter point cloud is the distribution of the trajectory containing the i-th letter input by the user before, i=1,2,…,26; Convert the original point (x',y') to the input point (x,y), and: (x,y) T =M -1 (x',y') T ; in, Determining whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character; The standard sequence in the sequence library that matches the input sequence is taken as a valid sequence, and at least one character corresponding to the valid sequence is pushed.

2. The method according to claim 1, characterized in that: The determining whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library comprises: Determine the distance D1(i, j) between the first i input points in the input sequence and the first j standard points in the standard sequence, and the distance D1(i, j) satisfies: D1(i,j)=d(g i ,t j )+min{D1(i,j-1),D1(i-1,j),D1(i-1,j-1)}; Among them, g i represents the i-th input point in the input sequence, t j represents the jth standard point in the standard sequence, d(g i ,t j ) represents the input point g i With standard point t j The distance between them, i, j = 1, 2, ..., N; The distance D1(N,N) is used as a first distance between the input sequence and the standard sequence, and when the first distance is less than a first preset threshold, it is determined that the input sequence matches the standard sequence.

3. The method according to claim 2, characterized in that Before determining the distance D1(i, j) between the first i input points in the input sequence and the first j standard points in the standard sequence, the method further includes: A second distance D2(G, T) between the input sequence G and the standard sequence T is determined, and the second distance D2(G, T) satisfies: When the second distance D2(G,T) is less than a second preset threshold, a step of determining the distance D1(i,j) between the first i input points in the input sequence and the first j standard points in the standard sequence is performed.

4. The method according to claim 1, characterized in that The pushing of at least one character corresponding to the valid sequence includes: Determine the probability P(w|context) of selecting the word w corresponding to the valid sequence according to the context context input by the user and a preset Bayesian language model; The probability P(w|context) is modified according to the distance between the input sequence and the valid sequence, and the text whose modified probability is greater than the preset probability value is pushed.

5. A device for inputting text, characterized in that: include: A trigger module, used to obtain multiple first current relative postures between a first inertial sensor and a second inertial sensor, determine movement parameters of the multiple first current relative postures in a pinching direction according to a preset pinching coefficient, and determine whether a pinching action is currently triggered according to the size of the movement parameter; the pinching coefficient can represent the relative position of the relative posture between the first inertial sensor and the second inertial sensor in the pinching direction; the first inertial sensor and the second inertial sensor are respectively set on different fingers of the user; the pinching direction is a direction corresponding to pinching or releasing two fingers, and the two fingers are respectively the fingers for setting the first inertial sensor and the second inertial sensor; Wherein, the kneading coefficient is preset in the following manner: By changing the relative position of the first inertial sensor and the second inertial sensor in the pinching direction for multiple times, a plurality of valid relative posture groups related to the pinching direction are collected, wherein the valid relative posture groups include a first starting relative posture and a first ending relative posture between the first inertial sensor and the second inertial sensor; By changing the relative positions of the first inertial sensor and the second inertial sensor in a preset plane for multiple times, a plurality of invalid relative posture groups related to the preset plane are collected, wherein the invalid relative posture groups include a second starting relative posture and a second ending relative posture between the first inertial sensor and the second inertial sensor; the pinching direction is perpendicular to the preset plane; Based on minimizing a preset first loss function of the valid relative posture group and the invalid relative posture group, determining a pinch coefficient in the first loss function; the first loss function is used to indicate that there is movement between the first starting relative posture and the first ending relative posture in the pinch direction, and there is no movement between the second starting relative posture and the second ending relative posture in the pinch direction; Among them, the first loss function is: S t Represents the effective relative posture group (u i ,v i ), S represents the invalid relative posture group (x i ,y i ), u i represents the first starting relative posture, v i Indicates the first ending relative posture, x i Indicates the second starting relative posture, y i represents the second end relative posture, r represents the kneading coefficient in the first loss function, λ represents the preset coefficient, and k0 is a non-zero constant; where u i 、v i 、x i ,y i are all 9-dimensional vectors obtained by converting the corresponding relative attitude matrix; the relative attitude matrix is ​​the relative attitude matrix of the first inertial sensor relative to the second inertial sensor; an acquisition module, configured to acquire a current trajectory of the user input when the trigger module determines that the pinch action is triggered, specifically: acquiring a second current relative posture between the first inertial sensor and the second inertial sensor, determining a current projection in a preset plane corresponding to the second current relative posture according to a preset projection coefficient, and generating a current trajectory of the user input according to a plurality of the current projections; the projection coefficient is used to represent a relationship between the relative posture between the first inertial sensor and the second inertial sensor and the projection in the preset plane; The projection coefficient is preset in the following manner: By changing the relative position of the first inertial sensor and the second inertial sensor in the horizontal direction for multiple times, a plurality of horizontal relative posture groups related to the horizontal direction are collected, wherein the horizontal relative posture group includes a horizontal starting relative posture and a horizontal ending relative posture between the first inertial sensor and the second inertial sensor; By changing the relative position of the first inertial sensor and the second inertial sensor in the vertical direction for multiple times, a plurality of vertical relative posture groups related to the vertical direction are collected, wherein the vertical relative posture group includes a vertical starting relative posture and a vertical ending relative posture between the first inertial sensor and the second inertial sensor; the horizontal direction is perpendicular to the vertical direction, and both the horizontal direction and the vertical direction are located in the preset plane; Based on minimizing a preset second loss function of the horizontal relative posture group and the vertical relative posture group, determining a projection coefficient in the second loss function; the second loss function is used to represent the difference between the projection change amount of the horizontal starting relative posture and the horizontal ending relative posture on the preset plane and the preset change amount in the horizontal direction, and the difference between the projection change amount of the vertical starting relative posture and the vertical ending relative posture on the preset plane and the preset change amount in the vertical direction; Among them, the second loss function is: S h represents the set of horizontal relative posture groups, S v represents the set of vertical relative posture groups, m i Indicates the horizontal starting relative posture, n i Indicates the horizontal end relative posture, a i Indicates the vertical starting relative posture, b i represents the vertical end relative posture, p and q represent the projection coefficients in the second loss function, λ represents the preset coefficient, k1 and k2 are both non-zero constants; where m i 、n i 、a i , b i is a 9-dimensional vector transformed by the corresponding relative attitude matrix; L p With L q represents the second loss function; (m i ,n i ) represents the i-th horizontal relative posture group collected, (a i ,b i ) represents the i-th vertical relative posture group collected; λ represents a preset coefficient; The acquisition module is used to select N input points from the current trajectory to generate an input sequence. Specifically, based on a preset adjustment parameter, the N original points (x', y') selected from the current trajectory are adjusted in a telescopic manner and / or linearly adjusted to generate N input points (x, y) and generate the input sequence; the adjustment parameter is a parameter obtained by statistics based on the historical behavior data of the user; The telescopic adjustment includes: (x,y)=(x' / σ x ,y' / σ y ), where σ x , σ y The horizontal input standard error and the vertical input standard error are obtained according to the historical behavior data of the user; The linear adjustment includes: Determine the covariance matrix cov of the i-th letter point cloud i , through the covariance matrix cov i Perform SVD matrix decomposition to determine the transformation matrix M of the i-th letter point cloud i ,and: Wherein SVD() represents SVD matrix decomposition; the i-th letter point cloud is the distribution of the trajectory containing the i-th letter input by the user before, i=1,2,…,26; Convert the original point (x',y') to the input point (x,y), and: (x,y) T =M -1 (x',y') T ; in, A judgment module, used for judging whether the input sequence matches the standard sequence according to the distance between the input sequence and the standard sequence in the preset sequence library, wherein the standard sequence includes N standard points, and each standard sequence corresponds to a corresponding character; The processing module is used to take the standard sequence in the sequence library that matches the input sequence as a valid sequence, and push at least one character corresponding to the valid sequence.

6. An electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, wherein: When the computer program is executed by the processor, the steps in the method for inputting text according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method for inputting text according to any one of claims 1 to 4 are implemented.