Text input method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202210625062.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-02
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2042-06-02
AI Technical Summary
当两次输入上屏行为出现时序交叉时,可能发生输入法上屏的候选结果与用户预期选择的候选结果不一致,或者丢失用户按键输入内容的问题
[0021]本申请实施例具有以下有益效果:在用户进行第一输入操作之后,在当前界面的候选区域显示至少一个候选词,并继续获取用户针对目标候选词的候选选择操作和第二输入操作,如果候选选择操作与第二输入操作的时序交叉,则基于所显示的目标候选词确定上屏文本并对上屏文本进行上屏处理。如此,通过对用户的候选选择操作和第二输入操作两种行为进行监测,准确判断用户的上屏意图,保证了输入法上屏的候选结果与用户预期选择的候选结果一致,且不会丢失用户的按键输入内容,从而提升了用户快速输入上屏的使用体验。
Smart Images

Figure CN116991251B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and includes, but is not limited to, a text input method, apparatus, device, and storage medium. Background Technology
[0002] When quickly inputting and clicking on a candidate to display, the input method's candidate display strategy needs to accurately judge the user's intention to display the candidate, especially when both hands are operating simultaneously, such as when the left hand selects a candidate and the right hand simultaneously presses a key. It needs to accurately judge the user's intention to display the candidate result that matches the user's intention.
[0003] In related technologies, when a user types quickly and inputs text, there may be instances where the timing of two keystroke input actions overlaps. When these two input actions overlap, the candidate results displayed by the input method may not match the candidate results the user expects to select, or the user's keystroke input may be lost. Summary of the Invention
[0004] This application provides a text input method, apparatus, device, and storage medium, which are at least applicable to the field of input methods. When there is a time overlap between two input screen input actions, it can ensure that the candidate results displayed by the input method are consistent with the candidate results expected by the user, and will not lose the user's key input content.
[0005] The technical solution of this application embodiment is implemented as follows: This application provides a text input method, the method comprising: In response to the user's first input, display at least one candidate word in the candidate area of the current interface; Obtain the user's candidate selection operation and second input operation for the target candidate word among the at least one candidate words; If the candidate selection operation and the second input operation overlap in time, the text to be displayed is determined based on the displayed target candidate words; The text displayed on the screen is shown in the input box of the current interface.
[0006] This application provides a text input device, the device comprising: A first display module is configured to display at least one candidate word in a candidate area of the current interface in response to a user's first input operation; an acquisition module is configured to acquire a user's candidate selection operation and a second input operation for a target candidate word among the at least one candidate words; a determination module is configured to determine the text to be displayed based on the displayed target candidate word if the candidate selection operation and the second input operation have a temporal overlap; and a second display module is configured to display the text to be displayed in the input box of the current interface.
[0007] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the second input operation includes a second input press operation and a second input release operation; the time of executing the candidate selection press operation is the candidate start time, and the time of executing the candidate selection release operation is the candidate end time; the time of executing the second input press operation is the input start time, and the time of executing the second input release operation is the input end time; the candidate selection operation and the second input operation have a timing overlap, including any one of the following: the input start time is located between the candidate start time and the candidate end time; the candidate start time is located between the input start time and the input end time.
[0008] In some embodiments, the determining module is further configured to: if the input start time is located between the candidate start time and the candidate end time, determine the candidate word as the text to be displayed; correspondingly, the device further includes: a first content determining module, configured to determine the input content corresponding to the second input operation; and determine the input content as the valid input content after the text to be displayed.
[0009] In some embodiments, the determining module is further configured to: if the candidate start time is located between the input start time and the input end time, determine the target candidate word as the text to be displayed; correspondingly, the device further includes: a first invalid content determining module, configured to determine that the input content corresponding to the second input operation is invalid content; and a first clearing module, configured to clear the invalid content.
[0010] In some embodiments, the determining module is further configured to: upon receiving the candidate selection operation, determine the currently displayed target candidate word as the text to be displayed.
[0011] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the determining module is further configured to: determine the candidate start time corresponding to the candidate selection press operation; determine the candidate start time as the user's screen-on intention start time; determine the target candidate word selected by the candidate selection operation at the screen-on intention start time as the screen-on text; correspondingly, the device further includes: a screen-on processing module, configured to perform screen-on processing on the screen-on text in response to the candidate selection release operation.
[0012] In some embodiments, the user has a candidate behavior state; the candidate behavior state includes: a first candidate state representing a candidate selection pressed state and a second candidate state representing a candidate selection raised state; the determining module is further configured to: determine the user's current candidate behavior state when receiving the second input operation; if the candidate behavior state is the first candidate state, determine the target candidate word selected by the candidate selection operation as the text to be displayed; correspondingly, the device further includes: a second content determining module, configured to determine the input content corresponding to the second input operation; and determine the input content as the valid input content after the text to be displayed.
[0013] In some embodiments, the second input operation includes a second input press operation and a second input release operation; the determining module is further configured to: determine the current candidate behavior state of the user when the second input press operation is received.
[0014] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the device further includes: a first receiving module, configured to receive a key start callback message when the candidate selection press operation is detected; a first setting module, configured to set the candidate behavior state to the first candidate state when the key start callback message is received; the first receiving module is further configured to receive a key end callback message when the candidate selection release operation is detected; the first setting module is further configured to set the candidate behavior state to the second candidate state when the key end callback message is received.
[0015] In some embodiments, the user has an input behavior state; the input behavior state includes: a first input state representing an input pressed state and a second input state representing an input raised state; the determining module is further configured to: determine the user's current input behavior state when the candidate selection operation is received; if the input behavior state is the first input state, determine the target candidate word selected by the candidate selection operation as the text to be displayed; correspondingly, the device further includes: a second invalid content determining module, configured to determine that the input content corresponding to the second input operation is invalid content; and a second clearing module, configured to clear the invalid content.
[0016] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the determining module is further configured to: determine the current input behavior state of the user when the candidate selection press operation is received.
[0017] In some embodiments, the second input operation includes a second input press operation and a second input release operation; the device further includes: a second receiving module, configured to receive a key start callback message when the second input press operation is detected; a second setting module, configured to set the input behavior state to the first input state when the key start callback message is received; the second receiving module is further configured to receive a key end callback message when the second input release operation is detected; the second setting module is further configured to set the input behavior state to the second input state when the key end callback message is received.
[0018] This application provides a text input device, including: The memory is used to store executable instructions; the processor is used to implement the above-mentioned text input method when executing the executable instructions stored in the memory.
[0019] This application provides a computer program product or computer program, which includes executable instructions stored in a computer-readable storage medium; wherein, when the processor of the text input device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the above-described text input method is implemented.
[0020] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the above-described text input method.
[0021] The embodiments of this application have the following beneficial effects: After the user performs a first input operation, at least one candidate word is displayed in the candidate area of the current interface, and the user's candidate selection operation and second input operation for the target candidate word are continuously acquired. If the candidate selection operation and the second input operation overlap in time, the text to be displayed is determined based on the displayed target candidate word, and the text to be displayed is processed. In this way, by monitoring both the user's candidate selection operation and the second input operation, the user's intention to display the text is accurately determined, ensuring that the candidate result displayed by the input method is consistent with the candidate result expected by the user, and without losing the user's key input content, thereby improving the user's experience of quickly displaying text. Attached Figure Description
[0022] Figure 1 This is an optional architecture diagram of the text input system provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the text input device provided in the embodiments of this application; Figure 3 This is an optional flowchart illustrating the text input method provided in an embodiment of this application; Figure 4 This is another optional flowchart illustrating the text input method provided in the embodiments of this application; Figure 5 This is another optional flowchart illustrating the text input method provided in the embodiments of this application; Figure 6 This is a flowchart illustrating a normal input screen operation provided in an embodiment of this application; Figure 7 This is a schematic diagram of touch event relationships provided in an embodiment of this application; Figure 8 This is a schematic diagram illustrating a case where the timing of two button presses on the screen overlaps, as provided in an embodiment of this application. Figure 9 This is a schematic diagram illustrating another case of overlapping timing of two key presses on the screen, provided in an embodiment of this application. Figure 10 This is a schematic diagram illustrating another case of overlapping timing of two key presses on the screen, as provided in an embodiment of this application. Figure 11 This is an interface diagram of the candidate on-screen error situation that the method of this application embodiment aims to solve; Figure 12 This is an interface diagram illustrating the problem of lost subsequent input keys that the method of this application embodiment aims to solve. Figure 13 This is a flowchart illustrating the text input method according to an embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit the application.
[0025] Before describing the solutions of the embodiments of this application, the terms involved in the embodiments of this application will be explained first: (1) Kernel: The module in the input method that processes the key input value of the user and then outputs the corresponding word.
[0026] (2) Candidate (also called candidate word): The word that appears above the keyboard of the input method during typing.
[0027] (3) Candidate conversion: The process by which the kernel processes key input and outputs the corresponding word.
[0028] (4) Candidate Press: When a user selects a typing result and presses their finger on the screen while typing with the input method.
[0029] (5) Candidate finger lift: When a user selects a typing result and lifts their finger off the screen while typing with the input method.
[0030] (6) Candidate display: The process of displaying the candidate selected by the user in the input box, such as the chat input box.
[0031] (7) Candidate refresh: When a user types using an input method, the input method displays the typing results and the process of change.
[0032] Before explaining the text input method of the embodiments of this application, the methods in related technologies will be described first.
[0033] When users type quickly, there may be instances where two keystrokes overlap in timing. When these two input actions overlap, the candidate results displayed by the input method may not match the user's expected selection, or keystrokes may be lost.
[0034] For example, when the second key press (i.e., the second input operation) occurs before the first input is displayed (i.e., the candidate selection operation), this scenario generally consists of three stages of user operation. Throughout this process, the results displayed in the keyboard candidate area are the candidate results of the first input (e.g., inputting 'a'). In the first stage, the user types 'a' for the first time, the input method refreshes the candidates, and displays the candidate results for 'a' in the keyboard candidate area. In the second stage, the user quickly types again, pressing key 'b'. At this time, the kernel in a sub-thread converts the two inputs 'ab'. In the third stage, due to candidate refresh or a delay in human reaction, the user sees the candidate results for 'a' displayed on the keyboard after pressing key 'b' and clicks to display the candidate. When the user lifts their hand, the kernel has already completed the conversion between 'ab' and 'a'. The candidate result obtained at this time may be incorrect; the user expects the candidate result for 'a' to be displayed, but the candidate result for 'ab' is displayed instead.
[0035] For example, if the second key press occurs after the first key press but before the user releases their finger after the first key press, the kernel has already completed the conversion of the second key press. This scenario generally involves four stages of user operation, throughout which the keyboard candidate area displays the candidate results for the first key press of 'a'. In the first stage, the user types 'a', the input method refreshes the candidates, and displays the candidate results for 'a' in the keyboard candidate area. In the second stage, the user sees the target candidate result, clicks on it, and presses the target candidate for 'a'. In the third stage, the user continues typing and presses the key 'b'. At this point, the kernel in a sub-thread converts the two key presses of 'ab'. In the fourth stage, the user displays the target candidate for 'a', lifts their finger, and the kernel has already completed the conversion of 'ab', refreshing the candidate data to the candidate results for 'ab'. Therefore, the displayed candidate result is incorrect; the user expects the candidate result for 'a', but instead displays the candidate result for 'ab'.
[0036] For example, a second key press occurs after the first key press and before the user releases their finger after the first key press. The kernel hasn't yet completed the conversion of the second key press. This scenario generally involves four stages of user operation. Throughout this process, the keyboard candidate area displays the candidate results for the first key press of 'a'. In the first stage, the user types 'a', the input method refreshes the candidates, and displays the candidate results for 'a' in the keyboard candidate area. In the second stage, the user sees the target candidate result, clicks on it, and presses the target candidate for 'a'. In the third stage, the user continues typing and presses key 'b'. At this point, the kernel in a sub-thread converts the two key presses 'ab'. In the fourth stage, the user displays the target candidate for 'a', lifts their finger, and before the kernel completes the conversion of the candidate results for 'ab', the kernel's input data is cleared after displaying the candidate result for 'a', thus losing the second key press of 'b'.
[0037] It is evident that the problem with the solutions in the relevant technologies is that when users quickly input and display information (i.e., perform candidate selection operations), especially when both hands are operating simultaneously, such as when the left hand displays information and the right hand simultaneously presses the next key, the timing of the two key-pressing and displaying actions may overlap. This may result in the candidate result displayed by the input method being inconsistent with the candidate result expected by the user, or the key input being lost, which greatly affects the user's input experience.
[0038] To address the problems existing in related technologies, this application provides a text input method. This method describes the input method's candidate display strategy when a user quickly inputs and clicks on a candidate. Especially when both hands are operating simultaneously, such as the left hand selecting a candidate while the right hand simultaneously inputs a key, accurate judgment of the user's display intention is necessary. The method monitors the user's key press and release actions, as well as candidate selection press and release actions. If the user selects a currently displayed candidate result between a key press and release, it is considered that the input method has provided the desired candidate result, and this key press is unnecessary. The selected candidate result is directly displayed, and the key input data in the kernel is cleared. If the user selects a currently displayed candidate and performs another key press between the finger press and release, the method determines at the key press timing whether the user has already selected a candidate. If so, the already selected candidate is displayed first, and then the current key input process continues; otherwise, a normal key input process is directly performed.
[0039] In the text input method provided in this application embodiment, firstly, in response to the user's first input operation, at least one candidate word is displayed in the candidate area of the current interface; then, the user's candidate selection operation and second input operation for the target candidate word among the at least one candidate word are obtained; and if the candidate selection operation and the second input operation overlap in timing, the text to be displayed is determined based on the displayed target candidate word; finally, the text to be displayed is displayed in the input box of the current interface. Thus, by detecting both the user's candidate selection operation and the second input operation, the user's intention to display the text is accurately determined, ensuring that the candidate results displayed by the input method are consistent with the candidate results expected by the user, and without losing the user's key input content, thereby improving the user experience of quickly displaying text.
[0040] The following describes exemplary applications of the text input device according to embodiments of this application. The text input device provided in this application can be implemented as a terminal or a server. In one implementation, the text input device provided in this application can be implemented as any terminal capable of running input method applications or requiring text typing input, such as a laptop, tablet, desktop computer, mobile device (e.g., mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable gaming device), smart robot, smart home appliance, and smart vehicle device. In another implementation, the text input device provided in this application can also be implemented as a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application embodiment. The following will describe exemplary applications when the text input device is implemented as a server.
[0041] See Figure 1 , Figure 1This is an optional architecture diagram of the text input system provided in this application embodiment. To support any input method application, at least one input method application is installed on the terminal in this application embodiment, enabling text input. The text input system 10 includes at least a terminal 100, a network 200, and a server 300, where the server 300 is the server for the input method application. The server 300 can constitute the text input device in this application embodiment. The terminal 100 is connected to the server 300 through the network 200, which can be a wide area network (WAN), a local area network (LAN), or a combination of both. When running an input method application to input text, terminal 100 obtains the user's first input operation through the input method application's client and sends the first input operation to server 300 via network 200. Server 300 generates candidate words in response to the user's first input operation and sends the candidate words to terminal 100 so that terminal 100 displays the candidate words in the candidate area of the current interface. Then, terminal 100 continues to obtain the user's candidate selection operation and second input operation for the candidate words through the input method application's client and sends the candidate selection operation and second input operation to server 300 via network 200. If the candidate selection operation and the second input operation overlap in timing, the text to be displayed is determined based on the displayed candidate words and sent to terminal 100 so that terminal 100 displays the text to be displayed in the input box of the current interface.
[0042] In some embodiments, the text input method can also be implemented by the terminal 100. That is, the terminal acts as the execution subject to respond to the user's first input operation, display candidate words in the candidate area of the current interface; and obtain the user's candidate selection operation and second input operation for the candidate words; in response to the timing intersection of the candidate selection operation and the second input operation, determine the text to be displayed based on the displayed candidate words; and finally display the text to be displayed in the input box of the current interface.
[0043] The text input method provided in this application embodiment can also be implemented based on a cloud platform and through cloud technology. For example, the server 300 mentioned above can be a cloud server. The cloud server generates candidate words in response to the user's first input operation, or determines the text to be displayed based on the displayed candidate words, etc.
[0044] In some embodiments, a cloud storage device may also be included, which can store candidate words corresponding to the first input operation, or the candidate selection operation and the second input operation, or the text displayed on the screen. In this way, when determining the text displayed on the screen or selecting candidate words, a rapid judgment can be made based on the information stored in the cloud storage device, achieving efficient and accurate text input.
[0045] It's important to clarify that cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied in the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0046] Figure 2 This is a schematic diagram of the structure of the text input device provided in the embodiments of this application. Figure 2 The text input device shown includes at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330. The various components of the text input device are coupled together via a bus system 340. It is understood that the bus system 340 is used to implement communication between these components. In addition to a data bus, the bus system 340 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 340.
[0047] The processor 310 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0048] User interface 330 includes one or more output devices 331 that enable the presentation of media content, and one or more input devices 332.
[0049] Memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 350 may optionally include one or more storage devices physically located remote from processor 310. Memory 350 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 350 described in this application embodiment is intended to include any suitable type of memory. In some embodiments, memory 350 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below.
[0050] Operating system 351 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 352 is used to reach other computing devices via one or more (wired or wireless) network interfaces 320, exemplary network interfaces 320 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. The input processing module 353 is used to detect and translate one or more user inputs or interactions from one or more input devices 332.
[0051] In some embodiments, the apparatus provided in this application may be implemented in software. Figure 2 A text input device 354 stored in memory 350 is shown. This text input device 354 can be a text input device within a text input apparatus, and can be software in the form of programs and plug-ins, including the following software modules: a first display module 3541, an acquisition module 3542, a determination module 3543, and a second display module 3544. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.
[0052] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the text input method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0053] The text input methods provided in the embodiments of this application can be executed by a text input device. The text input device can be any terminal that can run an input method application or needs to perform text typing input, or it can be a server. That is, the text input methods in the embodiments of this application can be executed by a terminal, by a server, or by interaction between a terminal and a server.
[0054] See Figure 3 , Figure 3 This is an optional flowchart illustrating a text input method provided in an embodiment of this application. The following will be combined with... Figure 3 The steps shown will be explained. It should be noted that... Figure 3 The text input method in this example is illustrated using a server as the execution entity.
[0055] Step S301: In response to the user's first input operation, at least one candidate word is displayed in the candidate area of the current interface.
[0056] Users can perform their first input operation through the input method application's client. The first input operation refers to the operation of inputting the first character during the current text input process, before any other input operations or candidate selection operations have been performed, and no candidate words are currently displayed on the interface. In other words, the first input operation refers to the operation of inputting the first character during the current text input process, i.e., the initial input operation during the current text input process.
[0057] In this embodiment, candidate words can be presented in any language form. For example, candidate words can be Chinese characters, English letters, or any other foreign language characters. The first input operation can be an input operation corresponding to any input form such as Pinyin input, stroke input, English letter input, or Wubi input.
[0058] In this embodiment, candidate words are words corresponding to the first input operation. Each first input operation corresponds to at least one candidate word. One or more candidate words can be displayed in the candidate area of the current interface. Multiple candidate words can be arranged and displayed in the candidate area according to certain arrangement rules. For example, based on the user's historical input data, the number of times or selection frequency of the user selected each candidate word under the first input operation can be determined. The candidate words are then sorted according to the number of selections and selection frequency to form a candidate word sequence. Then, each candidate word is displayed sequentially in the candidate area according to the order of the candidate words in the candidate word sequence. In this embodiment, the number of candidate words that can be displayed in the candidate area can be a fixed value, or it can be determined based on the user's settings parameters, or it can be determined based on the font size of the user interface.
[0059] Step S302: Obtain the user's candidate selection operation and second input operation for at least one target candidate word among the candidate words.
[0060] Here, the candidate selection operation is used to select any target candidate word from multiple candidate words displayed in the candidate area. The candidate selection operation can be any type of interface interaction operation such as click operation, long press operation, double click operation, swipe operation, drag operation, etc.
[0061] The second input operation operates in the same way as the first input operation, and its purpose is also the same: to input new content. The content input in the second input operation can be the same as or different from the content input in the first input operation. The second input operation occurs after the first input operation.
[0062] The second input operation can be performed before or after the candidate selection operation, and the timing of the candidate selection operation and the second input operation overlaps.
[0063] Step S303: If the candidate selection operation and the second input operation overlap in timing, determine the text to be displayed based on the displayed target candidate words.
[0064] Here, the timing overlap between the candidate selection operation and the second input operation means that the second input operation is executed during the execution of the candidate selection operation, or the candidate selection operation is executed during the execution of the second input operation. In other words, the second input operation begins while the candidate selection operation is being executed but not yet completed, or the candidate selection operation begins while the second input operation is being executed but not yet completed.
[0065] In this embodiment, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation, and the second input operation includes a second input press operation and a second input release operation. The time when the candidate selection press operation is executed is the candidate start time, and the time when the candidate selection release operation is executed is the candidate end time; the time when the second input press operation is executed is the input start time, and the time when the second input release operation is executed is the input end time. Therefore, the timing overlap between the candidate selection operation and the second input operation includes any one of the following: the input start time is located between the candidate start time and the candidate end time, or the candidate start time is located between the input start time and the input end time.
[0066] In some embodiments, when a second input operation is received during the process of receiving a candidate selection operation, the timing of the candidate selection operation and the second input operation can be judged to determine whether there is a timing overlap between the candidate selection operation and the second input operation; or, when a candidate selection operation is received during the process of receiving the second input operation, the timing of the candidate selection operation and the second input operation can also be judged to determine whether there is a timing overlap between the candidate selection operation and the second input operation.
[0067] In other embodiments, when a candidate selection operation is received, it can be determined whether there is an incomplete second input operation. That is, it can be determined whether there is a second input operation and whether the second input operation has only performed the second input press operation and has not yet performed the second input release operation. If the determination result is yes, it indicates that the timing of the candidate selection operation and the second input operation overlaps. Alternatively, when a second input operation is received, it can be determined whether there is an incomplete candidate selection operation. That is, it can be determined whether there is a candidate selection operation and whether the candidate selection operation has only performed the candidate selection press operation and has not yet performed the candidate selection release operation. If the determination result is yes, it indicates that the timing of the candidate selection operation and the second input operation overlaps.
[0068] When the timing of the candidate selection operation and the second input operation is determined to overlap, the text to be displayed is determined based on the displayed target candidate word. Here, the displayed target candidate word can be directly determined as the text to be displayed, and the subsequent text processing procedure is determined based on the actual operation content of the second input operation (the subsequent text processing procedure will be explained below for different timing overlap scenarios). The text to be displayed refers to the text that needs to be displayed in the input box, which can be, for example, a chat box in a chat application, a search box in a search application, or a text area in a document application.
[0069] Step S304: Display the text to be displayed in the input box of the current interface.
[0070] In this embodiment of the application, after determining the text to be displayed, it indicates that the user's intention is to display the text. Therefore, the text to be displayed is shown in the input box of the current interface.
[0071] The text input method provided in this application displays at least one candidate word in the candidate area of the current interface after the user performs a first input operation. It then continues to acquire the user's candidate selection operation and second input operation for the target candidate word. If the candidate selection operation and the second input operation overlap in timing, the text to be displayed is determined based on the displayed target candidate word, and the displayed text is then processed for display. In this way, by monitoring both the user's candidate selection operation and the second input operation, the method accurately determines the user's intention to display the text, ensuring that the candidate results displayed by the input method are consistent with the user's expected selection, and without losing the user's key input content, thereby improving the user experience of quickly displaying text.
[0072] In some embodiments, the text input system includes at least a terminal and a server, with a text input application (i.e., an input method application) running on the terminal, through which text input can be achieved.
[0073] Figure 4 This is another optional flowchart illustrating the text input method provided in the embodiments of this application, such as... Figure 4 As shown, the method includes the following steps: Step S401: The terminal obtains the user's first input operation.
[0074] Here, the first input operation refers to the input operation of entering the first character in the current text input flow.
[0075] In step S402, the terminal sends the first input operation to the server.
[0076] In step S403, the server responds to the user's first input operation by generating at least one candidate word corresponding to the first input operation.
[0077] In step S404, the server sends each candidate word to the terminal.
[0078] In step S405, the terminal displays each candidate word in the candidate area of the current interface.
[0079] In this embodiment, after acquiring multiple candidate words, the terminal can sort them to form a candidate word sequence. The sorting is based on the user's degree of intent towards each candidate word; that is, it can analyze the multiple candidate words generated after the user performs the first input operation, where each candidate word represents the probability value of the user's intended word for performing that first input operation. Then, the multiple candidate words are sorted in descending order of probability value to form the candidate word sequence.
[0080] When displaying candidate words in the candidate area, you can display all candidate words or only some candidate words. You can also display the top N candidate words in the candidate word sequence in the candidate area, where N is an integer greater than or equal to 1.
[0081] Step S406: The terminal obtains the user's candidate selection operation and second input operation for the target candidate word.
[0082] In step S407, the terminal sends the candidate selection operation and the second input operation to the server.
[0083] In this embodiment, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation. The candidate selection press operation refers to the action of pressing down with a finger when the user selects a target candidate word. In this embodiment, the candidate selection press operation can be the finger clicking on the position where the target candidate word is displayed in the candidate area. The candidate selection release operation refers to the action of pressing down with a finger and then releasing it when the user selects a target candidate word. In this embodiment, the candidate selection release operation can be the finger leaving the position where the target candidate word is displayed in the candidate area. On the timeline, the candidate selection press operation precedes the candidate selection release operation. One candidate selection press operation and one candidate selection release operation constitute a complete candidate selection operation. Since different users operate differently on the terminal, there is a duration between the candidate selection press operation and the candidate selection release operation. This duration can be any value, and it can be the same or different for different users or for different candidate selection operations.
[0084] The moment a candidate selection is pressed is the candidate start time, and the moment a candidate selection is released is the candidate end time. The candidate start time precedes the candidate end time, and the duration between the candidate start and candidate end times can be any value. The execution time and duration of the candidate selection operation can be determined based on the candidate start and candidate end times. The start time of the candidate selection operation can be determined based on the candidate start time, and the completion time of the candidate selection operation can be determined based on the candidate end time.
[0085] The second input operation includes a second input press operation and a second input release operation. The second input press operation refers to the action when a user presses their finger down to input text again. In this embodiment, the second input press operation can be the finger clicking on the target key on the virtual keyboard. The second input release operation refers to the action when a user presses and then releases their finger after pressing the target key. In this embodiment, the second input release operation can be the finger leaving the target key position on the virtual keyboard. On the timeline, the second input press operation precedes the second input release operation. One second input press operation and one second input release operation constitute a complete second input operation. Since different users operate differently on the terminal, there is a duration between the second input press operation and the second input release operation. This duration can be any value, and it can be the same or different for different users or for different second input operations.
[0086] The moment the second input is pressed is the input start time, and the moment the second input is released is the input end time. The input start time precedes the input end time, and the duration between the input start time and the input end time can be any value. The execution time and duration of the second input operation can be determined based on the input start time and the input end time. The execution start time of the second input operation can be determined based on the input start time, and the execution completion time of the second input operation can be determined based on the input end time.
[0087] In step S408, if the candidate selection operation and the second input operation overlap in timing, the server determines the text to be displayed based on the displayed target candidate words.
[0088] Here, the timing overlap between the candidate selection operation and the second input operation includes any of the following cases: Case 1: The input start time is located between the candidate start time and the candidate end time.
[0089] Case 2: The candidate start time is located between the input start time and the input end time.
[0090] In some embodiments, when the timing of the candidate selection operation and the second input operation overlaps as described in Case 1 above, step S408 can be implemented as follows: When the input start time is between the candidate start time and the candidate end time, it indicates that the user has already performed the candidate selection operation before executing the second input operation to input new text, and the candidate selection operation has not yet been completed. Furthermore, a target candidate word has been selected through this candidate selection operation. Therefore, the target candidate word can be determined as the text to be displayed. After determining the text to be displayed, the input content corresponding to the second input operation following the candidate selection operation is also determined, and this input content is determined as the valid input content after the text to be displayed. In other words, the content entered by the second input operation is not invalid content and will not be deleted.
[0091] In some embodiments, when the timing of the candidate selection operation and the second input operation overlaps as described in Case 2 above, step S408 can be implemented as follows: when the candidate start time is between the input start time and the input end time, it indicates that before performing the candidate selection operation to select any candidate word displayed in the current interface, the user has already performed the second input operation, and the second input operation has not yet been completed, and new content has been entered through the second input operation. Therefore, the target candidate word can be determined as the text to be displayed. After determining the text to be displayed, the input content corresponding to the second input operation is determined as invalid content, and the invalid content is cleared. In other words, since the user performed a second input operation before executing the candidate selection operation to select any candidate word displayed on the current screen, and this second input operation has not yet been completed, it can be said that the user performed the second input operation and the candidate selection operation too quickly, thus making extra input while seeing the target candidate word displayed on the current screen. The candidate selection operation for the target candidate word is the user's intention to put the screen on, but because the background data processing process has not yet completed responding to the user's second input operation and has not updated the input content corresponding to the second input operation to the candidate area of the current screen, the content entered in the second input operation is invalid.
[0092] In some embodiments, when a candidate selection operation is received, the currently displayed target candidate word can be directly determined as the text to be displayed.
[0093] In some embodiments, the candidate start time corresponding to the candidate selection press operation can be determined and set as the user's screen display intention start time. Thus, when determining the screen display text based on the displayed target candidate words, the target candidate word selected by the candidate selection operation at the screen display intention start time can be determined as the screen display text. Furthermore, after determining the screen display text, the screen display process can be performed in response to the user's candidate selection raise operation.
[0094] Here, "screening" refers to displaying the text to be displayed in the input box of the current interface of the terminal.
[0095] In step S409, the server sends the displayed text to the terminal.
[0096] In step S410, the terminal displays the text to be displayed in the input box of the current interface.
[0097] In the text input method provided in this application embodiment, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation, and the second input operation includes a second input press operation and a second input release operation. Furthermore, the time of executing the candidate selection press operation is the candidate start time, and the time of executing the candidate selection release operation is the candidate end time; the time of executing the second input press operation is the input start time, and the time of executing the second input release operation is the input end time. Thus, based on the candidate start time, candidate end time, input start time, and input end time, the timing overlap between the candidate selection operation and the second input operation can be accurately determined, as well as the exact order in which they begin. This allows for a more accurate assessment of timing overlap, thereby accurately determining the user's screen input intention and providing a precise response to that intention.
[0098] Figure 5 This is another optional flowchart illustrating the text input method provided in the embodiments of this application, such as... Figure 5 As shown, the method includes the following steps: Step S501: The terminal obtains the user's first input operation.
[0099] In step S502, the terminal sends the first input operation to the server.
[0100] In step S503, the server responds to the user's first input operation by generating at least one candidate word corresponding to the first input operation.
[0101] In step S504, the server sends each candidate word to the terminal.
[0102] Step S505: The terminal displays each candidate word in the candidate area of the current interface.
[0103] Step S506: The terminal obtains the user's candidate selection operation and second input operation for the target candidate word.
[0104] In step S507, the terminal sends the candidate selection operation and the second input operation to the server.
[0105] In this embodiment, a user corresponds to a candidate behavior state, which includes a first candidate state representing the candidate selection pressed state and a second candidate state representing the candidate selection released state. That is, when the user's candidate behavior state is the first candidate state, it indicates that the user has performed a candidate selection operation, specifically the candidate selection pressed operation, but has not yet performed the candidate selection released operation; when the user's candidate behavior state is the second candidate state, it indicates that the user has performed a candidate selection operation, having already performed both the candidate selection pressed and released operations, thus completing a full candidate selection operation.
[0106] Therefore, in one implementation, the method may also include the following steps: Step S508: Upon receiving the second input operation, determine the user's current candidate behavior state.
[0107] In some embodiments, the second input operation includes a second input press operation and a second input release operation. The user's current candidate behavior state can be determined upon receiving a second input press operation.
[0108] Here, when the second input press operation is received, it indicates that the user needs to input new content. At this time, by determining the current candidate behavior state of the user, we can analyze whether the user has performed a candidate selection operation and whether the candidate selection operation has been completed. In this way, we can determine whether there is a time sequence overlap between the candidate selection operation that has been executed and the second input operation that is about to be completed.
[0109] Step S509: If the candidate behavior state is the first candidate state, the target candidate word selected by the candidate selection operation is determined as the text to be displayed.
[0110] Here, if the candidate behavior state is the first candidate state, it indicates that the user has already performed a candidate selection operation, specifically the "press" action, but not the "release" action, meaning the candidate selection operation is not yet complete. In this case, the second input operation performed at this time overlaps with the incomplete candidate selection operation in time. The overlap occurs when the second input operation is performed during the candidate selection operation. In this scenario, the target candidate word selected by the candidate selection operation can be identified as the text to be displayed, and the input content corresponding to the second input operation can be further processed.
[0111] Step S510: Determine the input content corresponding to the second input operation.
[0112] Step S511: Determine the input content as the valid input content after the text is displayed on the screen.
[0113] Here, after determining the text to be displayed, we can also analyze the input content of the second input operation, because the second input operation is the valid content that the user enters again after making a candidate selection.
[0114] This application embodiment further provides a method for determining a first candidate state and a second candidate state, including the following steps (not shown in the figure): Step S11: When a candidate selection is detected to be pressed, a button start callback message is received.
[0115] Step S12: Upon receiving the button start callback message, set the candidate behavior state to the first candidate state.
[0116] Step S13: When a candidate selection lift-up operation is detected, receive the button end callback message.
[0117] Step S14: Upon receiving the button press end callback message, set the candidate behavior state to the second candidate state.
[0118] In some embodiments, a user corresponds to an input behavior state, which includes a first input state representing an input press state and a second input state representing an input release state. That is, when the user's input behavior state is the first input state, it indicates that the user has performed a second input operation, specifically the second input press operation, but has not yet performed the second input release operation; when the user's input behavior state is the second input state, it indicates that the user has performed a second input operation, having completed both the second input press and release operations, meaning a complete second input operation has been completed.
[0119] In another implementation, the method may also include the following steps: Step S512: Upon receiving a candidate selection operation, determine the current input behavior state of the user.
[0120] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation. The user's current input behavior state can be determined upon receiving a candidate selection press operation.
[0121] Here, when a candidate selection is pressed, it indicates that the user has selected the target candidate word. At this time, by determining the user's current input behavior state, we can analyze whether the user has performed a second input operation and whether the second input operation has been completed. This allows us to determine whether there is a temporal overlap between the already executed second input operation and the candidate selection operation that is currently to be completed.
[0122] Step S513: If the input behavior state is the first input state, the target candidate word selected by the candidate selection operation is determined as the text to be displayed.
[0123] Here, if the input behavior state is the first input state, it indicates that the user has already performed the second input operation, specifically the second input press operation, but has not yet performed the second input release operation; that is, the second input operation is not yet complete. In this case, the candidate selection operation being performed overlaps with the incomplete second input operation in time. Specifically, the candidate selection operation is performed during the execution of the second input operation. In this situation, the target candidate word selected by the candidate selection operation can be identified as the text to be displayed, and the input content corresponding to the second input operation can be further processed.
[0124] Step S514: Determine that the input content corresponding to the second input operation is invalid.
[0125] Step S515: Remove invalid content.
[0126] Here, after determining the text to be displayed, the input content of the second input operation can also be analyzed. Since the second input operation is invalid content that the user enters again before making a candidate selection, the invalid content that has been obtained in the input method kernel can be cleared.
[0127] This application embodiment further provides a method for determining a first input state and a second input state, including the following steps (not shown in the figure): Step S21: When a second input press operation is detected, a key press start callback message is received.
[0128] Step S22: Upon receiving the key press start callback message, set the input behavior state to the first input state.
[0129] Step S23: When the second input hand-raise operation is detected, receive the button press end callback message.
[0130] Step S24: Upon receiving the button press end callback message, set the input behavior state to the second input state.
[0131] In step S516, the server sends the displayed text to the terminal.
[0132] Step S517: The terminal displays the text to be displayed in the input box of the current interface.
[0133] The text input method provided in this application monitors the user's candidate behavior state and input behavior state, thereby accurately analyzing the timing between the user's second input operation and candidate input operation, accurately determining the user's screen input intention, and thus responding accurately to the user's screen input intention.
[0134] In some embodiments, the user's candidate behavior state and input behavior state can be updated in real time upon detecting each operation. For example, upon detecting a candidate selection press operation, the candidate behavior state can be set to a first candidate state; upon detecting a candidate selection release operation, the candidate behavior state can be set to a second candidate state; upon detecting a second input press operation, the input behavior state can be set to a first input state; and upon detecting a second input release operation, the input behavior state can be set to a second input state. In this way, by updating the user's candidate behavior state and input behavior state in real time, different user operations can be accurately recorded and analyzed, avoiding errors in temporal cross-analysis.
[0135] In some embodiments, each candidate behavior state and input behavior state has a status identifier, which can be used to quickly confirm the user's candidate behavior state and input behavior state. Thus, performing time-series cross-analysis based on the status identifiers of candidate behavior states and input behavior states not only improves analysis efficiency but also enhances analysis accuracy.
[0136] In some embodiments, the server provides at least one sub-thread to respond to the user's candidate selection operation and second input operation. That is, the server provides at least a candidate selection sub-thread for responding to and processing candidate selection operations, and an input sub-thread for responding to and processing second input operations. Upon receiving a user's candidate selection operation or second input operation, the corresponding sub-thread can respond promptly to the user's input.
[0137] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0138] This application provides a text input method, which is a candidate display strategy of the input method when a user uses an input method to quickly input and click on a candidate to display. Especially when both hands are operating simultaneously, such as the left hand selecting a candidate while the right hand simultaneously inputs a key, it is necessary to accurately determine the user's intention to display the candidate. The method detects the user's key press and release actions, as well as candidate selection press and release actions. If the user clicks and selects a currently displayed candidate result between a key press and release, it is considered that the input method has provided the user with the desired candidate result, and this key press is useless; the selected candidate result is directly displayed, and the key input data in the kernel is cleared. If the user clicks and selects a currently displayed candidate, and then performs another key press between a key press and release, the method determines at the key press timing whether the user has already selected a candidate; if so, the already selected candidate is displayed first, and then the current key input process continues; otherwise, a normal key input process is directly performed.
[0139] Figure 6 This is a flowchart illustrating a normal input screen operation provided in an embodiment of this application, such as... Figure 6 As shown, the method includes the following steps: Step S601: The user types "a" and presses the key (i.e., performs the initial input press operation of the first input operation).
[0140] Step S602: The input method kernel converts the typing results.
[0141] Step S603: Update the candidate data for a.
[0142] Step S604: The user types "a" and releases the key (i.e., the initial input release operation for the first input operation).
[0143] This completes the first input operation, that is, the input of 'a'.
[0144] Step S605: The input method candidate displays the candidate results for 'a'.
[0145] Step S606: The user clicks to select a target candidate and presses down with their finger (i.e., performs the candidate selection press operation).
[0146] Step S607: The user clicks to select a target candidate and lifts their finger (i.e., the candidate selection lifting operation is performed).
[0147] Step S608: The input method candidate is determined to be a valid screen entry, and the target candidate is obtained.
[0148] Step S609: Display target candidates on the screen.
[0149] Step S610: Clear the current input data of the input method candidate.
[0150] The logic for displaying input on screen under normal input timing is as follows: Figure 6 As shown, a normal user input behavior generally involves four processes: The first process is the typing stage. The user presses the key 'a', and the input method, in a sub-thread, hands the key 'a' over to the kernel for candidate conversion, obtaining and caching the candidate results for 'a'. The second process is also the typing stage. The user releases the key 'a', and the input method refreshes the candidate results obtained in the previous step, displaying them in the keyboard's candidate area. The third process is the candidate display stage. The user sees the target candidate, clicks to select it, and presses their finger down. At this point, the input method does not perform any display processing. The fourth process is also the candidate display stage. The user clicks to select the target candidate and releases their finger. If the input method determines this is a valid display behavior, it performs the display operation, and the target candidate is displayed in the current input box, while simultaneously clearing the kernel's current input data.
[0151] To optimize key response time, after a user presses a key, the input method immediately hands the key information to the kernel for candidate result conversion.
[0152] After the user lifts their hand after pressing a key, the keyboard candidate area results are updated and displayed. For example... Figure 7 The diagram shown is a schematic representation of touch event relationships provided in an embodiment of this application. Various gestures, such as long presses and swipes, may be triggered between a user's finger pressing and lifting. In this case, the user's intention is not to perform a key input operation, so the candidate refresh display timing can be determined as after the user lifts their finger from the key. However, if the timing of the user lifting their finger to select a candidate is taken as the user's on-screen response timing, the input method needs to accurately determine the user's actual click on the candidate and perform the on-screen operation at the appropriate time. Please continue to refer to... Figure 7 Between the pressing and lifting of a finger, users may trigger a series of gestures due to actions such as swiping or prolonged pressing. If a long press or swipe gesture is triggered during a single on-screen operation, the on-screen action is considered invalid, and the corresponding gesture action is executed. Because gesture recognition occurs between the user's finger pressing and lifting, to accurately identify the user's true intention—whether to click on a candidate to display or to swipe the candidate bar to find more candidates, etc.—normally, the timing of the user clicking on a candidate and lifting their hand can be used as the response timing for selecting and displaying the word. That is, the input method does not process the on-screen operation when the candidate is pressed; it only determines whether a valid on-screen action is triggered when the user lifts their hand. If no gesture is triggered, it is considered a valid on-screen action, and the user's selected candidate is displayed.
[0153] However, when users are typing quickly, there may be instances where the timing of two keystroke input actions overlaps. When these two input actions overlap, the candidate results displayed by the input method may not match the user's expected selection, or keystrokes may be lost. An example is provided below.
[0154] Figure 8 This is a schematic diagram illustrating a case where the timing of two button presses on the screen overlaps, as provided in an embodiment of this application. Figure 8 As shown, the timing sequence of the two button presses that overlap on screen includes: Step S801: The user types "a" and presses the key.
[0155] Step S802: The input method kernel converts the typing results.
[0156] Step S803: Update the candidate data for a.
[0157] Step S804: The user types "a" and releases the key.
[0158] Step S805: Display the candidate results for a.
[0159] Step S806: The user types "b" and presses the key (i.e., performs the second input operation).
[0160] Step S807: The input method kernel converts the typing results.
[0161] In step S808, the user clicks to select the target candidate 'a' and presses down with their finger.
[0162] Step S809: Update the candidate data for ab.
[0163] In step S810, the user clicks to select the target candidate 'a' and lifts their finger.
[0164] Step S811: The input method candidate is determined to be a valid screen display and the target candidate is obtained.
[0165] Step S812: Display target candidates on the screen.
[0166] Step S813: Clear the ab input data.
[0167] like Figure 8In the scenario depicted, the second key press occurs before the first key is displayed. This situation generally involves three stages of user interaction, throughout which the keyboard candidate area displays the candidate results for the first key input, 'a'. In the first stage, the user types 'a', the input method refreshes the candidates, and displays 'a' as a candidate in the keyboard candidate area. In the second stage, the user quickly types again, pressing key 'b'. At this point, the kernel in a sub-thread converts the two inputs, 'ab'. In the third stage, due to candidate refresh or a delay in human reaction, the user sees the currently displayed 'a' candidate after pressing key 'b' and clicks to display the candidate. By the time the user releases their hand, the kernel has already completed the 'ab' conversion. At this point, the displayed candidate result may be incorrect; the user expects 'a' as a candidate, but instead sees 'ab' as a candidate.
[0168] Figure 9 This is a schematic diagram illustrating another case of overlapping timing of two key presses on the screen, as provided in the embodiments of this application. Figure 9 As shown, the timing sequence of the two button presses that overlap on screen includes: Step S901: The user types "a" and presses the key.
[0169] Step S902: The input method kernel converts the typing results.
[0170] Step S903: Update the candidate data for a.
[0171] Step S904: The user types "a" and releases the key.
[0172] Step S905: Display the candidate results for a.
[0173] In step S906, the user clicks to select the target candidate 'a' and presses down with their finger.
[0174] Step S907: The user types "b" and presses the key.
[0175] Step S908: The input method kernel converts the typing result of ab.
[0176] Step S909: Update the candidate data for ab.
[0177] In step S910, the user clicks to select the target candidate 'a' and lifts their finger.
[0178] Step S911: The input method candidate is determined to be a valid screen entry, and the target candidate is obtained.
[0179] Step S912: Display target candidates on the screen.
[0180] Step S913: Clear the ab input data.
[0181] like Figure 9 In the scenario described, the second key press occurs after the first key press and before the user releases their finger after the first key press. The kernel has already completed the conversion of the second key press. This scenario can be roughly divided into four stages of user operation. Throughout this process, the keyboard candidate area displays the candidate results for the first key press of 'a'. In the first stage, the user types 'a' for the first time, the input method refreshes the candidates, and displays the candidate results for 'a' in the keyboard candidate area. In the second stage, the user sees the target candidate result, clicks on the candidate to display, and presses the target candidate for 'a'. In the third stage, the user continues typing and presses the key 'b'. At this time, the kernel in a sub-thread converts the two key presses of 'ab'. In the fourth stage, the user displays the target candidate for 'a', lifts their finger, and the kernel has already completed the conversion of 'ab', refreshing the candidate data to the candidate results for 'ab'. Therefore, the displayed candidate result is incorrect; the user expects the candidate result for 'a' to be displayed, but the candidate result for 'ab' is displayed instead.
[0182] Figure 10 This is a schematic diagram illustrating another case of overlapping timing of two key presses on the screen, as provided in the embodiments of this application. Figure 10 As shown, the timing sequence of the two button presses that overlap on screen includes: Step S101: The user types "a" and presses the key.
[0183] Step S102: The input method kernel converts the typing results.
[0184] Step S103: Update the candidate data for a.
[0185] Step S104: The user types "a" and releases the key.
[0186] Step S105: Display the candidate results for a.
[0187] In step S106, the user clicks to select the target candidate 'a' and presses down with their finger.
[0188] Step S107: The user types "b" and presses the key.
[0189] Step S108: The input method kernel converts the typing result of ab.
[0190] In step S109, the user clicks to select the target candidate 'a' and lifts their finger.
[0191] Step S110: The input method candidate is determined to be a valid screen display and the target candidate is obtained.
[0192] Step S111: Display target candidates on the screen.
[0193] Step S112: Clear the ab input data.
[0194] like Figure 10 In the scenario depicted, the second key press occurs after the first key press and before the user releases their finger after the first key press. The kernel hasn't yet completed the conversion of the second key press. This scenario can be roughly divided into four stages of user operation. Throughout this process, the keyboard candidate area displays the candidate results for the first key press of 'a'. In the first stage, the user types 'a' for the first time, the input method refreshes the candidates, and displays the candidate results for 'a' in the keyboard candidate area. In the second stage, the user sees the target candidate result, clicks on it, and presses the target candidate for 'a'. In the third stage, the user continues typing and presses the key 'b'. At this point, the kernel in a sub-thread converts the two key presses 'ab'. In the fourth stage, the user displays the target candidate for 'a', lifts their finger, and before the kernel completes the conversion of the candidate results for 'ab', the kernel's input data is cleared after displaying the candidate result for 'a', thus losing the second key press of 'b'.
[0195] Based on the above situations, this application provides a text input method to solve the problem of candidate input errors or key loss caused by the timing overlap of two key input actions when a user quickly inputs text onto the screen.
[0196] The text input method provided in this application requires accurate judgment of the user's intention to upload the text. The first principle of this judgment is WYSIWYG (What You See Is What You Get). Because of the dual-threaded design of the input method's display and input data conversion, there may be inconsistencies between the candidate data displayed on the keyboard and the candidate data converted by the kernel. That is, the keyboard might currently display candidate results for key input 'a', while key input 'b' is performed simultaneously. The kernel, in a sub-thread, performs the conversion, resulting in candidate results for 'ab'. In this case, the candidate results currently displayed on the keyboard should be considered the ones the user actually wants to upload. The user will only click to upload the text after seeing the desired candidate result; other key input operations on the keyboard at this point are considered subsequent input operations after the text is uploaded. The second principle is to take the moment when the user presses the candidate as the starting point of the user's intention to appear on the screen. The user's touch operation on the phone is generally divided into three stages: pressing the finger, swiping the finger, and lifting the finger. Among them, swiping the finger is not necessary and will only be triggered when the user needs to swipe. However, pressing the finger and lifting the finger are two processes that the user must go through when performing a touch event on the phone. The user will only click to press the candidate when he sees the candidate he wants. Therefore, the moment when the user presses the candidate is taken as the starting point of the intention to appear on the screen, and the candidate seen when pressing is the user's intention candidate.
[0197] Figure 11 This is an interface diagram of the candidate on-screen error situation that the method of this application embodiment aims to solve, such as... Figure 11 As shown in the left diagram of Figure 11 , when solving the problem of candidate candidate commit error, if the user intends to input " Xiaoxue (primary school)", the user will continuously input "9426983" on the 9-key keyboard. When the user has input "94269", "Xiaoxue" is already displayed as a result in the candidate area. Due to input inertia, the user continues to press the key "8", and then finds that "Xiaoxue", the desired result, is in the candidate area, and taps the candidate "Xiaoxue". At this time, the kernel has already performed result conversion for "942698" and refreshed the candidate result, and the candidate result is refreshed to
[0198] Figure 12 the result shown in the right diagram of . In the embodiment of the present application, the candidate that the user sees when pressing with the finger for selecting a candidate is used as the user's intended candidate. If the user clicks and selects a candidate between the pressing and lifting of the key (at this time, the candidate display in the keyboard area has not been updated), it is considered that the candidate currently seen by the user has met the user's demand, and the subsequent unprocessed input is useless input. In this case, the strategy of directly committing the candidate selected by the user when pressing and ignoring subsequent input is adopted, that is, "Xiaoxue" is directly committed, and the input data "942698" that has been converted subsequently by the kernel is cleared. Figure 12 As shown in the left diagram of , when solving the problem of subsequent input key loss, if the user intends to input "Abao", on the 26-key keyboard, the user first inputs "a", and at this time "A" is displayed in the candidate area of the keyboard, and the user's left hand presses with the finger to select the candidate "A". Meanwhile, the user's right hand continues to press the key "b" with the finger, and the kernel starts to perform candidate conversion for "ab". When the finger selecting the candidate "A" lifts, "A" is committed, and the key input data "ab" in the kernel is cleared at the same time, resulting in the problem that the key "b" is lost and not input normally. In this case, since the input of key "b" occurs after the candidate "A" is selected, it is considered that the user intends to continue inputting "b" after selecting "A". Therefore, when the key "b" is pressed, the candidate "A" selected by the user is committed first, and then the input of key "b" is processed subsequently, and handed over to the kernel for normal candidate conversion and refreshing.
[0199] Figure 13 is a schematic flow diagram of the text input method according to the embodiment of the present application, as shown in Figure 13 , the method comprises the following steps: Step S131: the user inputs "a" by typing, and the key is pressed.
[0200] Step S132: the input method kernel converts the typing result.
[0201] Step S133: the candidate data of "a" is updated.
[0202] Step S134: The user types "a" and releases the key.
[0203] Step S135: Display the candidate results for a.
[0204] Step S136: The user clicks to select the target candidate 'a' and presses down with their finger.
[0205] Step S137: The user types "b" and presses the key.
[0206] In step S138, the user clicks to select target candidate a and lifts their finger.
[0207] Step S139: The user types "b" and releases the key.
[0208] In this embodiment, when a user performs rapid input and on-screen actions, the timing of two input and on-screen cycles overlaps, primarily involving the actions of pressing and releasing a key, and pressing and releasing a candidate selection key. This overlap of four action sequences necessitates precise judgment of the user's on-screen intention. Analysis reveals two main problem scenarios: first, the user selects a currently displayed candidate result between pressing and releasing a key; second, the user performs another key input between pressing and releasing a key and selecting a currently displayed candidate. In these scenarios, following the normal on-screen processing logic—that is, responding to the on-screen action when the user selects a candidate and releases their hand—can lead to incorrect candidate result display or lost key input. This embodiment addresses these two problems by designing the following solution: detecting the user's key input pressing and releasing actions, and candidate selection pressing and releasing actions. On-screen logic is then performed at the timing of candidate pressing and key pressing.
[0209] Here, when detecting the user's selection of a candidate, the user's candidate touch behavior is detected. When the user presses a candidate, the text input system receives a TouchBegan message callback (i.e., key press start callback message). The input method detects this message to determine that the user has pressed a candidate selection button and sets the user's candidate behavior state to c_state1. When the user releases their hand after selecting a candidate, the text input system receives a TouchEnd message callback (i.e., key press end callback message). The input method detects this message to determine that the user has released their hand after selecting a candidate and sets the user's candidate behavior state to c_state2.
[0210] When detecting user key input, the system monitors the user's key touch behavior. When a user presses a key, the text input system receives a TouchBegan message callback. The input method detects this message to determine that the user is pressing a key and sets the user's key behavior state (i.e., input behavior state) to k_state1. When the user lifts their finger from a key, the text input system receives a TouchEnd message callback. The input method detects this message to determine that the user has lifted their hand from a key and sets the user's key behavior state to k_state2.
[0211] When determining the timing of candidate key presses for display, the timing of the key press can be determined by detecting whether the current state is k_state1. If so, it means that the user clicked on the candidate between pressing and releasing a key. At this point, it is considered that the input method has already provided the user with the desired candidate result, and this key press is useless. Figure 11 The example describes how the system directly displays the candidate result selected by the user and clears the kernel's key input data. If the user is not in state k_state1, the system follows the normal logic of displaying the candidate when the user releases their hand, meaning the currently selected candidate is displayed only after the user releases their hand.
[0212] When determining the timing of key presses for display, the user inputs and presses a key. Based on the above detection of candidate selection behavior, it is determined whether the current state is c_state1. If so, it means that this key press is a continuation of input after the current key press, so the user's already selected candidate is displayed first, and then the current key press input process is proceeded. Otherwise, a normal key press input process is directly performed.
[0213] The text input method provided in this application detects user key input and candidate selection behavior, accurately determining the user's intention to input text at the timing of candidate presses and key presses. This solves the problem of candidate input errors and key input loss caused by the overlapping timing of two input cycles in scenarios involving rapid typing. This improves the user experience for rapid text input.
[0214] It is understood that in the embodiments of this application, if the content involving user information, such as the first input operation, candidate selection operation, second input operation, candidate words, and on-screen text, involves data related to user information or enterprise information, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0215] The following continues to describe the exemplary structure of the text input device 354 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the text input device 354 includes: A first display module is configured to display at least one candidate word in a candidate area of the current interface in response to a user's first input operation; an acquisition module is configured to acquire a user's candidate selection operation and a second input operation for a target candidate word among the at least one candidate words; a determination module is configured to determine the text to be displayed based on the displayed target candidate word if the candidate selection operation and the second input operation have a temporal overlap; and a second display module is configured to display the text to be displayed in the input box of the current interface.
[0216] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the second input operation includes a second input press operation and a second input release operation; the time of executing the candidate selection press operation is the candidate start time, and the time of executing the candidate selection release operation is the candidate end time; the time of executing the second input press operation is the input start time, and the time of executing the second input release operation is the input end time; the candidate selection operation and the second input operation have a timing overlap, including any one of the following: the input start time is located between the candidate start time and the candidate end time; the candidate start time is located between the input start time and the input end time.
[0217] In some embodiments, the determining module is further configured to: if the input start time is located between the candidate start time and the candidate end time, determine the candidate word as the text to be displayed; correspondingly, the device further includes: a first content determining module, configured to determine the input content corresponding to the second input operation; and determine the input content as the valid input content after the text to be displayed.
[0218] In some embodiments, the determining module is further configured to: if the candidate start time is located between the input start time and the input end time, determine the target candidate word as the text to be displayed; correspondingly, the device further includes: a first invalid content determining module, configured to determine that the input content corresponding to the second input operation is invalid content; and a first clearing module, configured to clear the invalid content.
[0219] In some embodiments, the determining module is further configured to: upon receiving the candidate selection operation, determine the currently displayed target candidate word as the text to be displayed.
[0220] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the determining module is further configured to: determine the candidate start time corresponding to the candidate selection press operation; determine the candidate start time as the user's screen-on intention start time; determine the target candidate word selected by the candidate selection operation at the screen-on intention start time as the screen-on text; correspondingly, the device further includes: a screen-on processing module, configured to perform screen-on processing on the screen-on text in response to the candidate selection release operation.
[0221] In some embodiments, the user has a candidate behavior state; the candidate behavior state includes: a first candidate state representing a candidate selection pressed state and a second candidate state representing a candidate selection raised state; the determining module is further configured to: determine the user's current candidate behavior state when receiving the second input operation; if the candidate behavior state is the first candidate state, determine the target candidate word selected by the candidate selection operation as the text to be displayed; correspondingly, the device further includes: a second content determining module, configured to determine the input content corresponding to the second input operation; and determine the input content as the valid input content after the text to be displayed.
[0222] In some embodiments, the second input operation includes a second input press operation and a second input release operation; the determining module is further configured to: determine the current candidate behavior state of the user when the second input press operation is received.
[0223] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the device further includes: a first receiving module, configured to receive a key start callback message when the candidate selection press operation is detected; a first setting module, configured to set the candidate behavior state to the first candidate state when the key start callback message is received; the first receiving module is further configured to receive a key end callback message when the candidate selection release operation is detected; the first setting module is further configured to set the candidate behavior state to the second candidate state when the key end callback message is received.
[0224] In some embodiments, the user has an input behavior state; the input behavior state includes: a first input state representing an input pressed state and a second input state representing an input raised state; the determining module is further configured to: determine the user's current input behavior state when the candidate selection operation is received; if the input behavior state is the first input state, determine the target candidate word selected by the candidate selection operation as the text to be displayed; correspondingly, the device further includes: a second invalid content determining module, configured to determine that the input content corresponding to the second input operation is invalid content; and a second clearing module, configured to clear the invalid content.
[0225] In some embodiments, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the determining module is further configured to: determine the current input behavior state of the user when the candidate selection press operation is received.
[0226] In some embodiments, the second input operation includes a second input press operation and a second input release operation; the device further includes: a second receiving module, configured to receive a key start callback message when the second input press operation is detected; a second setting module, configured to set the input behavior state to the first input state when the key start callback message is received; the second receiving module is further configured to receive a key end callback message when the second input release operation is detected; the second setting module is further configured to set the input behavior state to the second input state when the key end callback message is received.
[0227] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment; therefore, it will not be repeated. For technical details not disclosed in this apparatus embodiment, please refer to the description of the method embodiment of this application for understanding.
[0228] This application provides a computer program product or computer program that includes executable instructions, which are computer instructions; the executable instructions are stored in a computer-readable storage medium. When the processor of a text input device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the text input device performs the method described in this application embodiment.
[0229] This application provides a storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figure 3 The method shown.
[0230] In some embodiments, the storage medium may be a computer-readable storage medium, such as a ferromagnetic random access memory (FRAM), 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), flash memory, magnetic surface memory, optical disc, or a compact disk-read-only memory (CD-ROM); or it may be a device that includes one or any combination of the above-mentioned memories.
[0231] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0232] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file containing other programs or data, for example, in one or more scripts within a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files storing one or more modules, subroutines, or code sections). As an example, executable instructions may be deployed to execute on a single computing device (which may be a job runtime-determined device), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0233] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A text input method, characterized in that, The method includes: In response to the user's first input, display at least one candidate word in the candidate area of the current interface; Obtain the user's candidate selection operation and second input operation for the target candidate word among the at least one candidate words; The candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the second input operation includes a second input press operation and a second input release operation; the time of executing the candidate selection press operation is the candidate start time, and the time of executing the candidate selection release operation is the candidate end time; the time of executing the second input press operation is the input start time, and the time of executing the second input release operation is the input end time. If the candidate selection operation and the second input operation have a temporal overlap, the text to be displayed is determined based on the displayed target candidate word, including any of the following cases: if the input start time is between the candidate start time and the candidate end time, the target candidate word is determined as the text to be displayed; Alternatively, if the candidate start time is located between the input start time and the input end time, the target candidate word is determined as the text to be displayed. The text displayed on the screen is shown in the input box of the current interface.
2. The method according to claim 1, characterized in that, If the input start time is located between the candidate start time and the candidate end time, the method further includes: Determine the input content corresponding to the second input operation; The input content is determined as the valid input content after the text is displayed on the screen.
3. The method according to claim 1, characterized in that, If the candidate start time is located between the input start time and the input end time, the method further includes: The input content corresponding to the second input operation is determined to be invalid. Remove the invalid content.
4. The method according to claim 1, characterized in that, The step of determining the text to be displayed based on the displayed target candidate words includes: Upon receiving the candidate selection operation, the currently displayed target candidate word is determined as the text to be displayed on the screen.
5. The method according to claim 1, characterized in that, The step of determining the text to be displayed based on the displayed target candidate words includes: Determine the candidate start time corresponding to the candidate selection press operation; The candidate start time is determined as the start time of the user's screen entry intention; At the start time of the screen display intention, the target candidate word selected by the candidate selection operation is determined as the screen display text; Correspondingly, the method further includes: In response to the candidate selection gesture, the text to be displayed is processed for display.
6. The method according to claim 1, characterized in that, The user has a candidate behavior state; The candidate behavior states include: a first candidate state representing the candidate selection pressed state, and a second candidate state representing the candidate selection raised state; if the candidate selection operation and the second input operation have temporal overlap, determining the text to be displayed based on the displayed target candidate word includes: Upon receiving the second input operation, determine the user's current candidate behavior state; If the candidate behavior state is the first candidate state, the target candidate word selected by the candidate selection operation is determined as the text to be displayed on the screen. Correspondingly, the method further includes: Determine the input content corresponding to the second input operation; The input content is determined as the valid input content after the text is displayed on the screen.
7. The method according to claim 6, characterized in that, Determining the user's current candidate behavior state upon receiving the second input operation includes: Upon receiving the second input press operation, the user's current candidate behavior state is determined.
8. The method according to claim 6, characterized in that, The method further includes: When the candidate selection is detected to be pressed, a key start callback message is received. Upon receiving the button start callback message, the candidate behavior state is set to the first candidate state; When the candidate selection raise operation is detected, a button end callback message is received; Upon receiving the button press end callback message, the candidate behavior state is set to the second candidate state.
9. The method according to claim 1, characterized in that, The user has an input behavior state; The input behavior states include: a first input state representing the input pressed state and a second input state representing the input released state; if the candidate selection operation and the second input operation have temporal overlap, determining the text to be displayed based on the displayed target candidate words includes: Upon receiving the candidate selection operation, determine the user's current input behavior state; If the input behavior state is the first input state, the target candidate word selected by the candidate selection operation is determined as the text to be displayed on the screen; Correspondingly, the method further includes: The input content corresponding to the second input operation is determined to be invalid. Remove the invalid content.
10. The method according to claim 9, characterized in that, Determining the user's current input behavior state upon receiving the candidate selection operation includes: Upon receiving the candidate selection press operation, the user's current input behavior state is determined.
11. The method according to claim 9, characterized in that, The method further includes: When the second input press operation is detected, a key press start callback message is received; Upon receiving the button start callback message, the input behavior state is set to the first input state; When the second input hand-raise operation is detected, a button press end callback message is received; Upon receiving the button press end callback message, the input behavior state is set to the second input state.
12. A text input device, characterized in that, The device includes: The first display module is used to display at least one candidate word in the candidate area of the current interface in response to the user's first input operation; The acquisition module is used to acquire the user's candidate selection operation and second input operation for the target candidate word among the at least one candidate words; wherein, the candidate selection operation includes a candidate selection press operation and a candidate selection release operation; the second input operation includes a second input press operation and a second input release operation; the time of executing the candidate selection press operation is the candidate start time, and the time of executing the candidate selection release operation is the candidate end time; the time of executing the second input press operation is the input start time, and the time of executing the second input release operation is the input end time; The determination module is used to determine the text to be displayed based on the displayed target candidate word if there is a temporal overlap between the candidate selection operation and the second input operation, wherein any one of the following situations applies: if the input start time is located between the candidate start time and the candidate end time, the target candidate word is determined as the text to be displayed; Alternatively, if the candidate start time is located between the input start time and the input end time, the target candidate word is determined as the text to be displayed. The second display module is used to display the text on the screen in the input box of the current interface.
13. The apparatus according to claim 12, characterized in that, The device further includes: The first content determination module is used to determine the input content corresponding to the second input operation if the input start time is between the candidate start time and the candidate end time; and to determine the input content as the valid input content after the text is displayed on the screen.
14. The apparatus according to claim 12, characterized in that, The device further includes: The first invalid content determination module is used to determine that the input content corresponding to the second input operation is invalid content if the candidate start time is located between the input start time and the input end time. The first clearing module is used to clear the invalid content.
15. The apparatus according to claim 12, characterized in that, The determining module is further configured to, upon receiving the candidate selection operation, determine the currently displayed target candidate word as the text to be displayed.
16. The apparatus according to claim 12, characterized in that, The determining module is further configured to determine the candidate start time corresponding to the candidate selection press operation; determine the candidate start time as the user's screen-on intention start time; and determine the target candidate word selected by the candidate selection operation at the screen-on intention start time as the screen-on text. Correspondingly, the device further includes: The on-screen processing module is used to process the on-screen text in response to the candidate selection raise operation.
17. The apparatus according to claim 12, characterized in that, The user has a candidate behavior state; The candidate behavior states include: a first candidate state representing the candidate selection pressed state, and a second candidate state representing the candidate selection raised state. The determining module is further configured to determine the current candidate behavior state of the user when the second input operation is received; if the candidate behavior state is the first candidate state, the target candidate word selected by the candidate selection operation is determined as the text to be displayed. Correspondingly, the device further includes: The second content determination module is used to determine the input content corresponding to the second input operation; and to determine the input content as the valid input content after the text is displayed on the screen.
18. A text input device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the text input method according to any one of claims 1 to 11.
19. A computer-readable storage medium, characterized in that, The device stores executable instructions for causing a processor to execute the executable instructions to implement the text input method according to any one of claims 1 to 11.
20. A computer program product comprising executable instructions, characterized in that, When the executable instructions are executed by the processor, they implement the text input method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Vocabulary input method for mobile terminal and mobile terminal
CN106406565A
Input method, input device, electronic equipment and medium
CN113076010A