Cursor insertion method and device and electronic equipment

By responding to the user's click operation in an electronic device, obtaining the initial cursor position and determining the cursor insertion position based on the text source of the long string of numbers, the problem of inaccurate cursor insertion position is solved, and the accuracy and user experience of cursor insertion are improved.

CN119902687APending Publication Date: 2025-04-29HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311408906.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In electronic devices, when a user edits Chinese text, the click-insert operation of the cursor can easily lead to misinterference caused by mistake, resulting in the cursor insertion position that does not match the desired position of the user.

Method used

Retrieve the click position and determine the initial cursor position by responding to the user's first click operation in the text input control. When the initial position of the cursor is a long string of numbers, the text source of the number is obtained and the cursor insertion position is determined based on it, thereby improving the accuracy of cursor insertion.

Benefits of technology

This method can accurately insert the cursor according to the source of long strings of numbers, reducing the number of times the user clicks to insert the cursor and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902687A_ABST
    Figure CN119902687A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cursor insertion method and device and electronic equipment, in the cursor insertion method, the electronic equipment responds to a first click operation of a user in a text input control, a first click position of the user in the text input control is obtained, and according to the first click position, a cursor is inserted in a current display interface of the electronic equipment. The method comprises the following steps: determining an initial position of a cursor, when the initial position of the cursor is a long string of digits, acquiring a text source of the long string of digits by the electronic equipment, determining a cursor insertion position according to the text source of the long string of digits and the initial position of the cursor, and displaying the cursor at the cursor insertion position, thereby being capable of displaying the cursor according to different sources of the long string of digits. By inserting the cursor into the long string of numbers, not only can the accuracy of inserting the cursor into the long string of numbers be improved, but also the operation times of inserting the cursor into the long string of numbers by a user can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of smart terminal technology, and in particular to a cursor insertion method, device and electronic device. Background Art

[0002] The interaction mode of text input controls directly affects the user's experience of editing Chinese text in electronic devices (such as smartphones). Among them, single-click insertion of the cursor is the most important way for users to interact with text input controls. Single-click insertion on the electronic device side usually has the purpose of deleting text, expanding articles, and / or modifying the text before the cursor position. In contrast, double-clicking to select all, the user's purpose is often to select the smallest semantic unit or entity for subsequent operations, including overall replacement, rewriting, copying, or searching. However, when single-clicking the screen to insert the cursor, due to the small screen of the electronic device, the user's finger width is often larger than the character size, resulting in accidental touches and wrong insertions, and the final insertion position of the cursor does not match the position the user expects to insert. Summary of the invention

[0003] The embodiments of the present application provide a cursor insertion method, device and electronic device. The embodiments of the present application also provide a computer-readable storage medium to improve the accuracy of cursor insertion and reduce the number of times a user clicks to insert a cursor.

[0004] In a first aspect, the present application provides a cursor insertion method, comprising: in response to a first single-click operation of a user in a text input control, obtaining a first single-click position of the user in the text input control; based on the first single-click position, determining an initial cursor position in a current display interface of an electronic device; when the initial cursor position is a long string of numbers, obtaining a text source of the long string of numbers; determining a cursor insertion position based on the text source of the long string of numbers and the initial cursor position; and displaying a cursor at the cursor insertion position.

[0005] In the above-mentioned cursor insertion method, the electronic device responds to the user's first click operation in the text input control, obtains the user's first click position in the text input control, and determines the cursor initial position in the current display interface of the electronic device based on the above-mentioned first click position. When the above-mentioned initial cursor position is a long string of numbers, the electronic device obtains the text source of the long string of numbers, determines the cursor insertion position based on the above-mentioned text source of the long string of numbers and the above-mentioned initial cursor position, and displays the cursor at the above-mentioned cursor insertion position, so that the cursor can be inserted in the long string of numbers according to the different sources of the long string of numbers, which can not only improve the accuracy of the cursor insertion in the long string of numbers, but also reduce the number of operations of the user inserting the cursor in the long string of numbers.

[0006] In one possible implementation, determining the cursor insertion position according to the text source of the long string of numbers and the initial position of the cursor includes: when the long string of numbers is a long string of numbers input by a user, determining the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor.

[0007] In one possible implementation, determining the cursor insertion position according to the text source of the long string of numbers and the initial position of the cursor includes: when the text source of the long string of numbers is optical character recognition, if the initial position of the cursor is not in the head area and the tail area of ​​the long string of numbers, determining the cursor insertion position as the initial position of the cursor; or, when the text source of the long string of numbers is optical character recognition, if the initial position of the cursor is located in the head area of ​​the long string of numbers, determining the cursor insertion position as the starting position of the long string of numbers; if the initial position of the cursor is located in the tail area of ​​the long string of numbers, determining the cursor insertion position as the ending position of the long string of numbers.

[0008] In one possible implementation, determining the cursor insertion position according to the text source of the long string of numbers and the initial position of the cursor includes: when the long string of numbers is a long string of numbers copied by a user, determining the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor.

[0009] In one possible implementation, after displaying the cursor at the cursor insertion position, it also includes: in response to the user's second click operation on the text input control, obtaining the user's second click position in the text input control; if the distance between the second click position and the first click position is less than or equal to a distance threshold, and the difference between the occurrence time of the second click operation and the occurrence time of the first click operation is less than or equal to a duration threshold, then when the second click position is not in the head area and the tail area of ​​the long string of numbers, determining the position where the cursor is inserted again as the second click position; when the second click position is in the head area of ​​the long string of numbers, determining the position where the cursor is inserted again as the starting position of the long string of numbers; when the second click position is in the tail area of ​​the long string of numbers, determining the position where the cursor is inserted again as the end position of the long string of numbers; and displaying the cursor at the position where the cursor is inserted again.

[0010] In one possible implementation, after determining the initial cursor position in the current display interface of the electronic device based on the first single-click position, the method further includes: displaying the cursor at the initial cursor position; after the user inputs the left half symbol of a paired symbol at the displayed position of the cursor, performing entity recognition and text analysis on the text at the displayed position of the cursor, and predicting the position of the right half symbol of the paired symbol in the text.

[0011] In one possible implementation, after predicting the position of the right half symbol in the paired symbols in the text, the method further includes: displaying the right half symbol at the predicted position of the right half symbol, and in response to the user's confirmation operation, determining to input the right half symbol at the predicted position of the right half symbol; or, displaying a floating selection box above or below the predicted position of the right half symbol, wherein the floating selection box includes the right half symbol; in response to the user's selection operation on the floating selection box, inputting the right half symbol in the floating selection box selected by the user into the text; or, in response to the user's selection operation on the text The third click operation of this input control obtains the third click position of the user in the text input control, and displays the cursor at the third click position; based on the display position of the cursor and the predicted position of the right half symbol, displays a floating selection box, wherein the floating selection box includes the right half symbol; in response to the user's selection operation on the floating selection box, inputs the right half symbol in the floating selection box selected by the user into the text; or, displays the predicted position of the right half symbol in the text, and in response to the user's operation on the displayed predicted position of the right half symbol, inserts the cursor at the predicted position operated by the user.

[0012] In one possible implementation, after determining the initial cursor position in the current display interface of the electronic device based on the first single-click position, the method further includes: displaying the cursor at the initial cursor position; after the user adds or modifies a subtitle at the display position of the cursor, performing text analysis on the text at the display position of the cursor and predicting the position of the subtitle in the text.

[0013] In one possible implementation, after predicting the position of the subtitle in the text, it also includes: displaying the subtitle at the predicted position of the subtitle, the format of the displayed subtitle is the same as the format of the subtitle newly added or modified by the user; in response to the user's confirmation operation, determining to input the displayed subtitle at the predicted position of the subtitle; or, displaying a floating selection box above or below the predicted position of the subtitle, the floating selection box including the subtitle to be input, the format of the subtitle to be input is the same as the format of the subtitle newly added or modified by the user; in response to the user's operation on the floating selection box, inputting the subtitle to be input in the floating selection box at the predicted position of the subtitle; or, displaying the predicted position of the subtitle in the text, and in response to the user's operation on the predicted position of the displayed subtitle, inserting a cursor at the predicted position operated by the user.

[0014] In a second aspect, an embodiment of the present application provides a cursor insertion device, which is included in an electronic device, and has the function of implementing the electronic device behavior in the first aspect and the possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, an acquisition module, a determination module, and a display module, etc.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the method provided in the first aspect.

[0016] It should be understood that the second and third aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method provided in the first aspect.

[0019] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of an example of a click position and a cursor insertion position provided in the prior art;

[0021] Figure 2 A schematic diagram of an example of a cursor display position when dragging with two fingers provided in the prior art;

[0022] Figure 3 A schematic diagram of another example of a click position and a cursor insertion position provided by the prior art;

[0023] Figure 4 A schematic diagram of another example of a click position and a cursor insertion position provided by the prior art;

[0024] Figure 5 A schematic diagram of an example of a cursor insertion position when modifying a subtitle provided by the prior art;

[0025] Figure 6 A schematic diagram of another example of a click position and a cursor insertion position provided in the prior art;

[0026] Figure 7 A schematic diagram of another example of a cursor display position when dragging with two fingers provided in the prior art;

[0027] Figure 8 A schematic diagram of another example of a click position and a cursor insertion position provided in the prior art;

[0028] Fig. 9 A schematic diagram of an example of a cursor display position in the prior art;

[0029] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0030] Fig.11 A flowchart of a cursor insertion method provided by one embodiment of the present application;

[0031] Fig.12 A schematic diagram of a cursor at an insertion position of a long string of numbers provided by an embodiment of the present application;

[0032] Fig.13 A schematic diagram of a cursor at an insertion position of a long string of numbers provided in another embodiment of the present application;

[0033] Fig.14 A schematic diagram of a cursor at an insertion position of a long string of numbers provided in yet another embodiment of the present application;

[0034] Fig.15 A flowchart of a cursor insertion method provided by another embodiment of the present application;

[0035] Fig.16 A schematic diagram of interaction when inputting paired symbols provided by one embodiment of the present application;

[0036] Fig.17 A schematic diagram of interaction when inputting paired symbols provided by another embodiment of the present application;

[0037] Fig.18 A schematic diagram of interaction when inputting paired symbols provided by yet another embodiment of the present application;

[0038] Fig.19 A schematic diagram of interaction when inputting paired symbols provided by yet another embodiment of the present application;

[0039] Fig. 20 A flowchart of a cursor insertion method provided in yet another embodiment of the present application;

[0040] Fig.21 An interactive schematic diagram of inputting a subtitle provided for an embodiment of the present application;

[0041] Fig. 22 An interactive schematic diagram of inputting a subtitle provided in another embodiment of the present application;

[0042] Fig.23 An interactive schematic diagram of inputting a subtitle provided in yet another embodiment of the present application;

[0043] Fig.24 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application;

[0044] Fig.25 A schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0045] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0046] In order to solve the problem that the final insertion position of the cursor does not match the user's expected position, in a solution provided by the existing related technology, the user's interaction with the cursor is divided into two types: single-finger single-click insertion and two-finger dragging.

[0047] In the case of single-finger single-click insertion, the electronic device (for example, a smartphone) first calculates the physical coordinates of the user touching the screen and then segments the Chinese text into words, and determines the final position of the cursor based on the granularity of the word. The word segmentation is based on the natural language processing (NLP) word segmentation or part-of-speech analysis algorithm, combined with the human factors post-processing algorithm logic based on the experience dimension. Figure 1 A schematic diagram of an example of a click position and a cursor insertion position provided in the prior art, such as Figure 1 As shown, the sentence "Tomorrow morning at ten o'clock go to LuOne Kaide Plaza Hippocampus Photo Studio to take pictures" will first be segmented into [tomorrow, morning, ten, go, LuOne, Kaide, Plaza, Hippocampus, Photo Studio, take pictures]. When the click position falls between "morning" and "up" after the physical coordinate conversion, the cursor will finally be inserted at the end of "morning", between "morning" and "ten". In this scheme, whether the specific cursor appears at the head or end of the word depends on the click position and the length of the word. If the click position is about a quarter of the length of the word, the cursor appears at the beginning of the word, otherwise, it appears at the end of the word.

[0048] Figure 2 The following is a schematic diagram of an example of the cursor display position when two fingers are dragged in the prior art. Figure 2 As shown, in the case of two-finger dragging, the user touches the screen with two fingers to enter the cursor dragging mode. The user can then move the cursor by dragging one finger on the screen (one finger can be released or one finger is sufficient), and release the finger to confirm the last position of the cursor, as shown in FIG. Figure 2 shown.

[0049] In this solution, a long string of numbers will be recognized as a whole word, and the cursor will appear at the beginning and end of the number after the user clicks on the number, such as Figure 3 As shown in the figure, when the user clicks in the middle of a long string of numbers, the cursor is finally inserted at the end of the long string of numbers, which makes it impossible for the user to modify the number in the middle of the long string of numbers by clicking to insert the cursor in the middle of the number. At this time, the user can only move the cursor to the desired position by long pressing to call the magnifying glass or dragging the cursor with two fingers, which increases the user's operation workload. Figure 3 A schematic diagram of another example of a click position and a cursor insertion position provided in the prior art.

[0050] In addition, in the above solution, when the user adds a pair of symbols to the text that has been entered, the user needs to insert the cursor twice, one at the position corresponding to the left half of the pair of symbols and the other at the position corresponding to the right half of the pair of symbols. However, due to the result of word-granular text segmentation, it is often easy to insert the left half of the symbol, but difficult to insert the right half of the symbol. Figure 4As shown, "My favorite novel is *Tian Long Ba Bu*" will be split into [I, most, like, of, novel, is, Tian Long, Ba, Bu]. When the user clicks near "Bu", the cursor is likely to land in front of "Bu", making it difficult to insert the cursor when the user inputs the right angle bracket of the book title. Figure 4 A schematic diagram showing another example of the click position and the cursor insertion position provided by the existing related technology.

[0051] Furthermore, when the user needs to modify the number and format of the article subtitle, it involves multiple single clicks of the cursor for insertion. However, the size of a single punctuation mark is much smaller than the finger width, and a single click is likely to cause the cursor to be inserted incorrectly. In the case where the user has multiple requirements for single-click insertion of the cursor, the experience is poor. Figure 5 A schematic diagram showing an example of the cursor insertion position when modifying the subtitle provided by the existing related technology, as Figure 5 shown, when the user wants to delete the right parenthesis for each subtitle number, the cursor needs to be inserted three times between the right parenthesis and the dot. Since the interval between the right parenthesis and the dot is very small, it is difficult to insert the cursor at this position.

[0052] In another solution provided by the existing related technology, the interaction between the user and the cursor is divided into two types: single-finger click insertion and single-finger drag.

[0053] In the case of single-finger click insertion, first, after calculating the physical coordinates touched by the user on the screen, the cursor is directly inserted at the corresponding position. As Figure 6 shown, "Go to the海马体照相馆 at LuOne Capital Mall to take pictures at 10 o'clock tomorrow morning", when the click position falls between "早" and "上" after being converted by the physical coordinates, the cursor will be directly inserted between "早" and "上". Figure 6 A schematic diagram showing another example of the click position and the cursor insertion position provided by the existing related technology.

[0054] In the case of single-finger drag, the user clicks on the circle below the cursor with a single finger to enter the cursor drag mode. Subsequently, the user can move the cursor by dragging the finger on the screen and release the finger to confirm the final position of the cursor, as Figure 7 shown, Figure 7 A schematic diagram showing another example of the cursor display position during two-finger drag provided by the existing related technology.

[0055] However, in this solution, although the cursor can be inserted arbitrarily between long strings of numbers, since the finger width is often larger than the digital characters, the error rate is extremely high. Especially in the high-frequency scenario where the user wants to insert the cursor at the beginning or end of the number, it is easy to misinsert the cursor in the middle of the number, as Figure 8 shown, Figure 8 A schematic diagram showing another example of the click position and the cursor insertion position provided by the existing technology.

[0056] In addition, in this solution, when the user adds a paired symbol to the text that has already been entered, the left and right paired symbols will appear together after the user enters the left half of the paired symbol, and the cursor will be placed between the left and right symbols, such as Fig. 9 As shown, Fig. 9 The schematic diagram of an example of the cursor display position in the prior art. In this case, in order to insert the right half symbol in the correct place, the user needs to first move the cursor rightward once to delete the current right half symbol, and click the position to be inserted of the right half symbol to insert the right half symbol.

[0057] Based on the above problems, an embodiment of the present application provides a cursor insertion method. The embodiment of the present application aims to propose interactive improvements for three scenarios: inserting a cursor into a long string of numbers, inserting a cursor when inputting paired symbols, and multiple cursor insertions caused by modifying the subheading number content format. By using the current mature natural language processing algorithm, intelligence is introduced into the text control to help users insert the cursor more accurately, so as to reduce the number of times the user clicks to insert the cursor or eliminate the need for the user to long press and drag the cursor.

[0058] The cursor insertion method provided in the embodiments of the present application can be applied to electronic devices, wherein the above-mentioned electronic devices can be smart phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (PDA) and other devices; the embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0059] For example, Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown as follows: Fig.10As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0060] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0061] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0062] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0063] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0064] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0065] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0066] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0067] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0068] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0071] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0072] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0073] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0074] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0075] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0076] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0077] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0078] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0079] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0080] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0081] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0082] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0083] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0084] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0085] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0086] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0087] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0088] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0089] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0090] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0091] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0092] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0093] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0094] For ease of understanding, the following embodiments of the present application will be described in detail with Fig.10 Taking the electronic device with the structure shown as an example, the cursor insertion method provided in the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.

[0095] The cursor insertion method provided in the embodiment of the present application is suitable for editing text in a system input control using an electronic device 100 with a touch-sensitive display screen, and is combined with the existing cursor single-click insertion interaction to further enhance the user experience in the cursor insertion scenarios shown in Table 1.

[0096] Table 1

[0097]

[0098] Fig.11 A flowchart of a cursor insertion method provided by an embodiment of the present application is as follows: Fig.11 As shown, the above cursor insertion method may include:

[0099] Step 1101: the electronic device 100 obtains the first click position of the user in the text input control in response to the first click operation of the user in the text input control.

[0100] Among them, the input control is a control that allows the user to input information. As the name implies, the text input control can be a control for the user to input text. For example, the text input control can include a control used by the user to input text in a "memo" or a control used by the user to input text in a dialog box of an instant messaging tool.

[0101] Step 1102 : The electronic device 100 determines an initial cursor position in the current display interface of the electronic device 100 according to the first click position.

[0102] Step 1103: when the initial position of the cursor is a long string of numbers, the electronic device 100 obtains the text source of the long string of numbers.

[0103] Step 1104 , the electronic device 100 determines the cursor insertion position according to the text source of the long string of numbers and the initial cursor position.

[0104] Step 1105: The electronic device 100 displays a cursor at the above cursor insertion position.

[0105] In this embodiment, after obtaining the first click position of the user in the text input control, the initial cursor position is determined according to the first click position. When the initial cursor position is a long string of numbers, the electronic device 100 obtains the text source of the long string of numbers, and determines the final cursor insertion position according to the text source of the long string of numbers and the initial cursor position. In this embodiment, the sources of the long string of numbers are divided into three categories, namely, long strings of numbers input by the user, optical character recognition, and long strings of numbers copied by the user. The following takes text input in "Memo" as an example to explain the cursor insertion position in a long string of numbers.

[0106] In one implementation, when the long string of numbers is a long string of numbers input by the user, the electronic device 100 can determine the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor. Specifically, for the long string of numbers input by the user, the user generally corrects the error during the input process, so the probability of the user inserting the cursor into a long string of numbers that has been input is small. Therefore, in this implementation, when the long string of numbers is a long string of numbers input by the user, the electronic device 100 can determine the cursor insertion position as the two ends of the long string of numbers according to the relative position of the initial position of the cursor and the long string of numbers. Fig.12 A schematic diagram of a cursor at the insertion position of a long string of numbers provided in one embodiment of the present application, such as Fig.12 As shown, when the cursor is at the initial position (i.e. Fig.12 When the cursor is initially located in the first half of the long string of numbers, the cursor is initially located in the first half of the long string of numbers, the cursor is initially located in the first half of the long string of numbers.

[0107] In another implementation, when the text source of a long string of numbers is optical character recognition, if the initial cursor position is not in the head area and the tail area of ​​the long string of numbers, the electronic device 100 determines the cursor insertion position as the initial cursor position; or, when the text source of the long string of numbers is optical character recognition, if the initial cursor position is located in the head area of ​​the long string of numbers, the electronic device 100 determines the cursor insertion position as the starting position of the long string of numbers; if the initial cursor position is located in the tail area of ​​the long string of numbers, the electronic device 100 determines the cursor insertion position as the ending position of the long string of numbers. Fig.13 A schematic diagram of a cursor at the insertion position of a long string of numbers provided in another embodiment of the present application, such as Fig.13 As shown in the figure, when the text source of a long string of numbers is optical character recognition (OCR), due to the limited accuracy of OCR recognition, the result is often noisy and requires the user to actively correct it. Therefore, when the user clicks at this time, the cursor will be directly inserted into the corresponding number, such as Fig.13 However, when the user clicks at the beginning or end of a long string of numbers or near the beginning or end (e.g., the first two numbers or the last two numbers), the user's intention is often to insert the cursor before or after the long string of numbers. At this time, the electronic device 100 will directly place the cursor at the beginning or end of the long string of numbers to avoid incorrect insertion due to small digits. Fig.13 As shown in the middle right picture.

[0108] In another implementation, when the long string of numbers is a long string of numbers copied by the user, the electronic device 100 can determine the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor. In some examples, when the long string of numbers is a long string of numbers copied by the user, after the electronic device 100 displays the cursor at the cursor insertion position, the electronic device 100 can also respond to the user's second click operation in the text input control to obtain the user's second click position in the text input control. If the distance between the second click position and the first click position is less than or equal to the distance threshold, and the difference between the occurrence time of the second click operation and the occurrence time of the first click operation is less than or equal to the duration threshold, then when the second click position is not in the head area and the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the second click position; when the second click position is located in the head area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the starting position of the long string of numbers; when the second click position is located in the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the ending position of the long string of numbers; then, the electronic device 100 displays the cursor at the position where the cursor is inserted again. The sizes of the distance threshold and the duration threshold can be set according to the implementation requirements during specific implementation. This embodiment does not limit the sizes of the distance threshold and the duration threshold.

[0109] That is, for the long string of text copied by the user, the user's need to modify it is not clear, and it is impossible to infer whether the user needs to insert the cursor into the number for editing. In this case, the electronic device 100 first assumes that the user does not need to edit the number, such as Fig.14 As shown in the middle left figure, when the first click position is in the middle of a long string of numbers, the initial cursor position can be Fig.14 The position indicated by the hand in the left figure, at this time, the electronic device 100 can first determine the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor, for example: Fig.14 In the left figure, the cursor insertion position is the beginning position of the long string of numbers. When the user clicks for the second time at the same or similar position within a short period of time, the electronic device 100 determines that the user needs to insert the cursor in the middle of the long string of numbers. At this time, the electronic device 100 processes the long string of numbers as if the text source is OCR, that is, when the second click position is not in the head area or the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the second click position. Fig.14 In the right picture, the second click position is the middle of the long string of numbers, so the position where the cursor is inserted again is the second click position. Fig.14A schematic diagram of a cursor at an insertion position of a long string of numbers provided in another embodiment of the present application. In addition, when the second click position is located in the head area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the starting position of the long string of numbers; when the initial position of the cursor is located in the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the ending position of the long string of numbers.

[0110] It should be noted that, for the long string of numbers copied by the user, after the electronic device 100 determines that the user needs to insert a cursor in the middle of the long string of numbers, if the user clicks the long string of numbers again, the electronic device 100 will process the long string of numbers as if the text source is OCR. In addition, in this implementation, the first click operation is the first click operation of the user on the text input control, the first click position is the position where the user performs the first click operation, the second click operation is the second click operation of the user on the text input control, and the second click position is the position where the user performs the second click operation.

[0111] In the above-mentioned cursor insertion method, the electronic device 100 obtains the first click position of the user in the text input control in response to the user's first click operation in the text input control, and determines the initial cursor position in the current display interface of the electronic device 100 based on the above-mentioned first click position. When the above-mentioned initial cursor position is a long string of numbers, the electronic device 100 obtains the text source of the long string of numbers, determines the cursor insertion position based on the text source of the above-mentioned long string of numbers and the above-mentioned initial cursor position, and displays the cursor at the above-mentioned cursor insertion position, so that the cursor can be inserted in the long string of numbers according to the different sources of the long string of numbers, which can not only improve the accuracy of the cursor insertion in the long string of numbers, but also reduce the number of operations of the user inserting the cursor in the long string of numbers.

[0112] Fig.15 A flowchart of a cursor insertion method provided in another embodiment of the present application is shown in FIG. Fig.15 As shown, this application Fig.11 In the illustrated embodiment, after step 1102, the following may also be included:

[0113] Step 1501: the electronic device 100 displays a cursor at an initial cursor position.

[0114] Step 1502, after the user inputs the left half symbol of the paired symbol at the display position of the cursor, the electronic device 100 performs entity recognition and text analysis on the text at the display position of the cursor, and predicts the position of the right half symbol of the paired symbol in the text.

[0115] Step 1503: display the right half symbol at the predicted position of the right half symbol, and in response to the user's confirmation operation, the electronic device 100 determines to input the right half symbol at the predicted position of the right half symbol; or, display a floating selection box above or below the predicted position of the right half symbol, the floating selection box includes the right half symbol, and in response to the user's selection operation on the floating selection box, the electronic device 100 inputs the right half symbol in the floating selection box selected by the user into the text; or, in response to the user's third click operation on the text input control, the electronic device 100 obtains The user clicks the third position in the above-mentioned text input control, displays a cursor at the above-mentioned third click position, displays a floating selection box according to the display position of the above-mentioned cursor and the predicted position of the right half symbol, and the above-mentioned floating selection box includes the above-mentioned right half symbol. In response to the user's selection operation on the above-mentioned floating selection box, the electronic device 100 inputs the right half symbol in the floating selection box selected by the user into the text; or, displays the predicted position of the right half symbol in the above-mentioned text, and in response to the user's operation on the displayed predicted position of the right half symbol, the electronic device 100 inserts the cursor at the predicted position operated by the above-mentioned user.

[0116] Specifically, in this embodiment, after the user performs the first click operation in the text input control, the electronic device 100 obtains the first click position, and then determines the initial cursor position in the current display interface according to the first click position, and then displays the cursor at the initial cursor position, thereby realizing the input of the cursor in the text after the user's first click. Then, the user can enter the left half symbol of the paired symbol at the cursor displayed by the electronic device 100, and then the electronic device 100 performs entity recognition and text analysis on the text at the display position of the cursor, and predicts the position of the right half symbol in the above-mentioned paired symbol. In this embodiment, the electronic device 100 reduces the number of user operations through 4 kinds of interactions. Among them, interactions one to three are intended to reduce the number of user operations by directly recommending after prediction, and interaction four reduces the number of user operations by more accurately inserting the second cursor.

[0117] Interaction 1: directly recommend the right half symbol at the predicted position of the right half symbol in a font color different from that of the main text (e.g., gray), and the user presses the space bar to confirm the input, thereby inputting the right half symbol at the predicted position of the right half symbol; if the user inputs other characters except the space bar, the electronic device 100 cancels the recommendation. Fig.16 A schematic diagram of interaction when inputting paired symbols is provided for one embodiment of the present application, such as Fig.16As shown, after the user performs a first click operation in the text input control, the electronic device 100 determines the initial cursor position according to the first click position, and then displays the cursor at the initial cursor position. Then the user inputs a left angle bracket at the cursor position, and the electronic device 100 directly recommends a right angle bracket at the predicted position of the right symbol (behind the character "部"). In response to the user's confirmation operation of pressing the space bar, the electronic device 100 inserts the right angle bracket behind the character "部".

[0118] Interaction Two: Display a floating selection box above or below the predicted position of the right symbol. The floating selection box includes the right symbol. In response to the user's selection operation on the floating selection box, input the right symbol in the floating selection box selected by the user into the above text. See Fig.17 , Fig.17 which is an interaction schematic diagram for inputting paired symbols provided by another embodiment of this application. Fig.17 In, after the user inputs a left angle bracket, the electronic device 100 predicts three possible positions where the right angle bracket may appear, which are respectively behind the characters "龙", "部", and "册". The electronic device 100 displays three floating selection boxes respectively above and to the right of these three characters. Each floating selection box includes a right angle bracket. After the user selects a floating selection box, the electronic device 100 can input the right angle bracket in the floating selection box selected by the user into the above text. For example, assuming the user selects the floating selection box above and to the right of the character "部", the electronic device 100 inserts the right angle bracket in the floating selection box above and to the right of the character "部" behind the character "部".

[0119] Interaction Three: In response to the user's third click operation in the above text input control, the electronic device 100 obtains the third click position of the user in the text input control, displays the cursor at the third click position, and displays a floating selection box according to the display position of the cursor and the predicted position of the right symbol. The floating selection box includes the above right symbol. In response to the user's selection operation on the floating selection box, the electronic device 100 inputs the right symbol in the floating selection box selected by the user into the above text. It can be understood that the third click operation in this embodiment is only for convenience of description, and does not refer to the third click operation of the user in the text input control, but the second click operation after the first click operation. That is to say, the first click operation in step 1101 of this embodiment is the first click operation of the user in the text input control, and the third click operation in step 1503 is the second click operation of the user in the text input control. Fig.18 which is an interaction schematic diagram for inputting paired symbols provided by yet another embodiment of this application, as Fig.18As shown, after the user clicks on the insertion cursor for the first time and enters the left angle bracket of a pair of symbols, and then clicks on the insertion cursor for the second time, the electronic device 100 can display a floating selection box at the predicted position closest to the cursor. Fig.18 In Fig.18 , the cursor inserted by the second click is behind the character "八", so the electronic device 100 displays a floating selection box at the predicted position closest to the cursor, that is, above and to the right of the character "部". The above floating selection box includes the right angle bracket of the pair of symbols. After the user selects the above floating selection box, the electronic device 100 enters the right angle bracket in the floating selection box selected by the user behind the character "部".

[0120] Interaction Four: After the user enters the left half of a pair of symbols, the predicted positions of all the right halves of the symbols are displayed in the text. In response to the user's operation on the predicted positions of the right halves of the symbols displayed, the electronic device 100 inserts a cursor at the predicted position of the above user operation. Fig.19 This is an interaction schematic diagram for inputting paired symbols provided by another embodiment of the present application. As Fig.19 shown in the left figure of Fig.19 , after the user enters the left angle bracket of a pair of symbols behind the character "是", the electronic device 100 displays the predicted positions of all the right angle brackets of the pair of symbols, as Fig.19 shown by the dots in the right figure. At this time, the user can directly insert the cursor at the predicted position by simply clicking on the predicted position or a character to the left or right of the predicted position, which can facilitate the user to enter the right angle bracket at the position of the inserted cursor subsequently. Fig.19 In the right figure, the user clicks on the character "第" to the right of the predicted position. In response to the user's operation, the electronic device 100 inserts a cursor at the predicted position to the left of the character "第", which can facilitate the user to enter the right angle bracket to the left of the character "第" subsequently.

[0121] In this embodiment, after the user enters the left half of a pair of symbols, the position of the right half of the symbol in the text is predicted, which can facilitate the user to accurately insert the right half of the symbol at the predicted position and reduce the number of user operations.

[0122] Fig. 20 This is a flowchart of a cursor insertion method provided by another embodiment of the present application. As Fig. 20 shown, in the embodiment shown in the present application Fig.11 after step 1102, it may further include:

[0123] Step 2001, the electronic device 100 displays a cursor at the initial position of the above cursor.

[0124] Step 2002, after the user adds or modifies a subtitle at the display position of the above cursor, the electronic device 100 performs text analysis on the text at the display position of the above cursor and predicts the position of the subtitle in the above text.

[0125] Step 2003, the electronic device 100 displays a subtitle at the predicted position of the above-mentioned subtitle, the format of the displayed subtitle is the same as the format of the subtitle added or modified by the user, and in response to the user's confirmation operation, determines to input the displayed subtitle at the predicted position of the above-mentioned subtitle; or, the electronic device 100 displays a floating selection box above or below the predicted position of the above-mentioned subtitle, the above-mentioned floating selection box includes a subtitle to be input, the format of the above-mentioned subtitle to be input is the same as the format of the subtitle added or modified by the user, and in response to the user's operation on the floating selection box, the subtitle to be input in the above-mentioned floating selection box is input at the predicted position of the above-mentioned subtitle; or, the electronic device 100 displays the predicted position of the above-mentioned subtitle in the above-mentioned text, and in response to the user's operation on the predicted position of the displayed subtitle, inserts the cursor at the predicted position operated by the user.

[0126] Specifically, in this embodiment, after the user performs the first click operation in the text input control, the electronic device 100 obtains the first click position, and then determines the initial position of the cursor in the current display interface according to the first click position, and then displays the cursor at the initial position of the cursor, thereby realizing the input of the cursor in the text after the user clicks for the first time. After the user adds or modifies a subtitle at the display position of the above-mentioned cursor, the electronic device 100 performs text analysis on the text at the display position of the above-mentioned cursor to predict the position of the subtitle in the above-mentioned text. Then, the electronic device 100 reduces the number of user operations through 3 kinds of interactions. Among them, interaction one and interaction two are intended to reduce the number of user operations by predicting direct recommendations, and interaction three reduces the number of user operations by more accurately inserting the second cursor.

[0127] Interaction 1: Recommend changes corresponding to the current subtitle in the predicted position of the subtitle in a font color different from that of the main text (e.g. gray). If there is no operation for a long time, the input is defaulted, or the user can confirm the input by double-clicking the spacebar for a short time. If the user enters other characters, the recommendation is canceled. Fig.21 The interactive diagram of inputting a subtitle according to an embodiment of the present application is provided. After the user performs a first click operation in the text input control, the electronic device 100 determines the initial cursor position according to the first click position, and then displays the cursor at the initial cursor position. Then, as shown in FIG. Fig.21As shown in the left figure, there were originally no subtitles in front of the text "Subtitle 1", "Subtitle 2" and "Subtitle 3". The user inputs "1)." at the cursor display position, and the electronic device 100 displays "2)." and "3)." in front of the text "Subtitle 2" and "Subtitle 3", respectively. That is, the electronic device 100 displays the subtitles at the predicted positions of the subtitles, and the format of the displayed subtitles is the same as the format of the subtitles newly added or modified by the user. In this way, in response to the user's short double-click operation, the electronic device 100 inputs "2)." and "3)." in front of the text "Subtitle 2" and "Subtitle 3".

[0128] Likewise, Fig.21 As shown in the right figure, in front of the text "Subtitle 1", "Subtitle 2" and "Subtitle 3", the original subtitles are "1)", "2)" and "3)" respectively. After the electronic device 100 displays the cursor at the initial cursor position, the user adds "." after "1)", so the electronic device 100 displays "." after "2)" and "3)" respectively. In this way, in response to the user's short double-click operation, the electronic device 100 enters "." after "2)" and "3)".

[0129] Interaction 2: The electronic device 100 displays a floating selection box above or below the predicted position of the subtitle, and the floating selection box includes a subtitle to be input. The format of the subtitle to be input is the same as the format of the subtitle added or modified by the user. In response to the user's operation on the floating selection box, the subtitle to be input in the floating selection box is input at the predicted position of the subtitle. Fig. 22 This is a schematic diagram of an interaction for inputting a subtitle provided by another embodiment of the present application. After the user performs a first click operation in the text input control, the electronic device 100 determines the initial cursor position according to the first click position, and then displays the cursor at the initial cursor position. Then, as shown in FIG. Fig. 22 As shown in the left figure, there were originally no subtitles in front of the text "Subtitle 1", "Subtitle 2" and "Subtitle 3". The user inputs "1)." at the cursor display position, and the electronic device 100 displays floating selection boxes in front of and above the text "Subtitle 2" and "Subtitle 3", and displays "2)." and "3)." in the floating selection boxes. In this way, in response to the user's single-click operation on the above-mentioned floating selection boxes, the electronic device 100 inputs "2)." and "3)." in front of the text "Subtitle 2" and "Subtitle 3".

[0130] Likewise, Fig. 22As shown in the right figure, in front of the text "Sub-title 1", "Sub-title 2" and "Sub-title 3", the original sub-titles are "1)", "2)" and "3)" respectively. After the electronic device 100 displays the cursor at the initial cursor position, the user adds "." after "1)", so the electronic device 100 displays floating selection boxes at the upper and rear of "2)" and "3)" respectively, and displays "." in the floating selection boxes. In this way, in response to the user's single-click operation on the above-mentioned floating selection boxes, the electronic device 100 enters "." after "2)" and "3)".

[0131] Interaction three: the electronic device 100 displays the predicted position of the subtitle in the text, and in response to the user's operation on the displayed predicted position of the subtitle, inserts a cursor at the predicted position operated by the user. Fig.23 This is a schematic diagram of an interaction for inputting a subtitle provided in another embodiment of the present application. After the user performs a first click operation in the text input control, the electronic device 100 determines the initial cursor position according to the first click position, and then displays the cursor at the initial cursor position. Then, as shown in FIG. Fig.23 As shown in the left figure, there were originally no subtitles in front of the text "Subtitle 1", "Subtitle 2" and "Subtitle 3". The user inputs "1)." at the cursor display position, and the electronic device 100 displays dots in front of and below the text "Subtitle 2" and "Subtitle 3", respectively. The dots are the predicted positions of the subtitles. The user clicks the dots to insert the cursor at the dots, so that the user can subsequently input subtitles "2)." and "3)." at the cursor insertion position.

[0132] Likewise, Fig.23 As shown in the right figure, in front of the text "Subtitle 1", "Subtitle 2" and "Subtitle 3", the original subtitles are "1)", "2)" and "3)" respectively. After the electronic device 100 displays the cursor at the initial cursor position, the user adds "." after "1)", so the electronic device 100 displays dots at the bottom of "2)" and "3)" respectively to indicate the predicted positions of the subtitles. The user clicks the above dots to insert the cursor at the dots, which makes it convenient for the user to enter "." at the cursor insertion position later.

[0133] In this embodiment, after the user adds or modifies a subheading in the text, the electronic device 100 predicts the position of the subheading in the text, thereby facilitating the user to add or modify the subheading at the predicted position and reducing the number of user operations.

[0134] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.

[0135] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.

[0136] This embodiment can divide the electronic device into functional modules according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0137] Fig.24 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application, in which each functional module is divided according to each function, Fig.24 A possible schematic diagram of the composition of the electronic device 2400 involved in the above embodiment is shown. Fig.24 As shown, the electronic device 2400 may include: an acquisition module 2401, a determination module 2402 and a display module 2403;

[0138] The acquisition module 2401 is used to acquire the first click position of the user in the text input control in response to the first click operation of the user in the text input control;

[0139] A determination module 2402 is used to determine an initial cursor position in a current display interface of the electronic device according to the first click position;

[0140] The acquisition module 2401 is further used to acquire the text source of the long string of numbers when the initial position of the cursor is a long string of numbers;

[0141] The determination module 2402 is further used to determine the cursor insertion position according to the text source of the long string of numbers and the initial cursor position;

[0142] The display module 2403 is used to display the cursor at the above cursor insertion position.

[0143] In one implementation of some examples, the determination module 2402 is specifically used to determine, when the long string of numbers is a long string of numbers input by the user, that the cursor insertion position is the starting position or the ending position of the long string of numbers according to the initial position of the cursor.

[0144] In another implementation, the determination module 2402 is specifically used to determine the cursor insertion position as the initial cursor position when the text source of the long string of numbers is optical character recognition, if the initial cursor position is not in the head area and tail area of ​​the long string of numbers; or, when the text source of the long string of numbers is optical character recognition, if the initial cursor position is located in the head area of ​​the long string of numbers, then the cursor insertion position is determined to be the starting position of the long string of numbers; if the initial cursor position is located in the tail area of ​​the long string of numbers, then the cursor insertion position is determined to be the ending position of the long string of numbers.

[0145] In another implementation, the determination module 2402 is specifically used to determine the cursor insertion position as the starting position or the ending position of the long string of numbers according to the initial position of the cursor when the long string of numbers is copied by the user.

[0146] The acquisition module 2401 is further configured to acquire a second click position of the user in the text input control in response to a second click operation of the user in the text input control after the display module 2403 displays the cursor at the cursor insertion position;

[0147] The determination module 2402 is further configured to, when the distance between the second click position and the first click position is less than or equal to the distance threshold, and the difference between the occurrence time of the second click operation and the occurrence time of the first click operation is less than or equal to the duration threshold, if the second click position is not in the head area and the tail area of ​​the long string of numbers, determine the position where the cursor is inserted again as the second click position; if the second click position is in the head area of ​​the long string of numbers, determine the position where the cursor is inserted again as the starting position of the long string of numbers; if the second click position is in the tail area of ​​the long string of numbers, determine the position where the cursor is inserted again as the ending position of the long string of numbers;

[0148] The display module 2403 is further configured to display the cursor at the position where the cursor is inserted again.

[0149] It should be noted that this application Figure 11 to Figure 14 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0150] The electronic device 2400 provided in this embodiment is used to execute the present application Figure 11 to Figure 14 The cursor insertion method provided by the illustrated embodiment can therefore achieve the same effect as the above method.

[0151] Fig.25 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application, Fig.24 The electronic device shown is different in that Fig.25 The electronic device 2400 shown may also include: a prediction module 2404 and an input module 2405;

[0152] In some examples, the display module 2403 is further configured to display the cursor at the initial cursor position after the determination module 2402 determines the initial cursor position in the current display interface of the electronic device according to the first click position;

[0153] The prediction module 2404 is used to perform entity recognition and text analysis on the text at the display position of the cursor after the user inputs the left half symbol of the paired symbol at the display position of the cursor, and predict the position of the right half symbol of the paired symbol in the text.

[0154] The display module 2403 is further configured to display the right half symbol at the predicted position of the right half symbol in the paired symbols after the prediction module 2404 predicts the position of the right half symbol in the text;

[0155] The determination module 2402 is further used to determine, in response to a confirmation operation of the user, to input a right half symbol at the predicted position of the right half symbol;

[0156] The display module 2403 is further configured to display a floating selection box above or below the predicted position of the right half symbol, wherein the floating selection box includes the right half symbol;

[0157] An input module 2405 is used for inputting the right half symbol in the floating selection box selected by the user into the text in response to the user's selection operation on the floating selection box;

[0158] The acquisition module 2401 is used for acquiring the third click position of the user in the text input control in response to the third click operation of the user in the text input control;

[0159] The display module 2403 is further used to display a cursor at the third click position, and display a floating selection box according to the display position of the cursor and the predicted position of the right half symbol, wherein the floating selection box includes the right half symbol;

[0160] The input module 2405 is further used to input the right half symbol in the floating selection box selected by the user into the text in response to the user's selection operation on the floating selection box;

[0161] The display module 2403 is further used to display the predicted position of the right half symbol in the above text;

[0162] The input module 2405 is used to insert a cursor at the predicted position of the user operation in response to the user's operation on the predicted position of the displayed right half symbol.

[0163] In some other examples, the prediction module 2404 is also used to perform text analysis on the text at the display position of the cursor and predict the position of the subheading in the text after the user adds or modifies a subheading at the display position of the cursor.

[0164] The display module 2403 is further used to display the subtitle at the predicted position of the subtitle after the prediction module 2404 predicts the position of the subtitle in the text, and the format of the displayed subtitle is the same as the format of the subtitle added or modified by the user;

[0165] An input module 2405, for determining to input the displayed subtitle at the predicted position of the subtitle in response to a confirmation operation of the user;

[0166] The display module 2403 is further used to display a floating selection box above or below the predicted position of the subtitle, wherein the floating selection box includes the subtitle to be input, and the format of the subtitle to be input is the same as the format of the subtitle added or modified by the user;

[0167] The input module 2405 is further used to input the subtitle to be input in the floating selection box at the predicted position of the subtitle in response to the user's operation on the floating selection box;

[0168] The display module 2403 is also used to display the predicted position of the subtitle in the above text;

[0169] The input module 2405 is further configured to, in response to a user operation on the predicted position of the displayed subtitle, insert a cursor at the predicted position operated by the user.

[0170] It should be noted that this application Figures 11 to 23 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0171] The electronic device 2400 provided in this embodiment is used to execute the present application Figures 11 to 23 The cursor insertion method provided by the illustrated embodiment can therefore achieve the same effect as the above method.

[0172] It should be understood that the electronic device 2400 may correspond to Fig.10 The electronic device 100 shown in FIG. Among them, the functions of the acquisition module 2401, the determination module 2402, the prediction module 2404 and the input module 2405 can be Fig.10 The processor 110 in the electronic device 100 shown in FIG. 24 is implemented; the function of the display module 2403 can be implemented by Fig.10 The processor 110 and the display screen 194 in the electronic device 100 are shown to be implemented.

[0173] In the case of adopting an integrated unit, the electronic device 2400 may include a processing module, a storage module, and a communication module.

[0174] The processing module can be used to control and manage the actions of the electronic device 2400, for example, it can be used to support the electronic device 2400 to execute the steps executed by the above modules. The storage module can be used to support the electronic device 2400 to store program codes and data, etc. The communication module can be used to support the communication between the electronic device 2400 and other devices.

[0175] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip and / or a Wi-Fi chip.

[0176] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 2400 involved in this embodiment can be a Fig.10 Device of the structure shown.

[0177] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the present application. Figures 11 to 23 The method provided by the illustrated embodiment.

[0178] The present application also provides a computer program product, which includes a computer program, which, when executed on a computer, enables the computer to execute the present application. Figures 11 to 23 The method provided by the illustrated embodiment.

[0179] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0180] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0181] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0182] In several embodiments provided in the present application, any function can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0183] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A cursor insertion method, characterized in that: include: In response to a first click operation of a user in a text input control, obtaining a first click position of the user in the text input control; Determining an initial cursor position in a current display interface of the electronic device according to the first click position; When the cursor is initially located at a long string of numbers, obtaining the text source of the long string of numbers; Determine the cursor insertion position according to the text source of the long string of numbers and the initial cursor position; A cursor is displayed at the cursor insertion position.

2. The method according to claim 1, characterized in that Determining the cursor insertion position according to the text source of the long string of numbers and the initial cursor position comprises: When the long string of numbers is a long string of numbers input by a user, the cursor insertion position is determined to be the starting position or the ending position of the long string of numbers according to the initial cursor position.

3. The method according to claim 1, characterized in that Determining the cursor insertion position according to the text source of the long string of numbers and the initial cursor position comprises: When the text source of the long string of numbers is optical character recognition, if the initial cursor position is not in the head area and the tail area of ​​the long string of numbers, the cursor insertion position is determined to be the initial cursor position; or, When the text source of the long string of numbers is optical character recognition, if the initial cursor position is located in the head area of ​​the long string of numbers, the cursor insertion position is determined to be the starting position of the long string of numbers; if the initial cursor position is located in the tail area of ​​the long string of numbers, the cursor insertion position is determined to be the ending position of the long string of numbers.

4. The method according to claim 1, characterized in that: Determining the cursor insertion position according to the text source of the long string of numbers and the initial cursor position comprises: When the long string of numbers is a long string of numbers copied by a user, the cursor insertion position is determined to be the starting position or the ending position of the long string of numbers according to the initial cursor position.

5. The method according to claim 4, characterized in that After displaying the cursor at the cursor insertion position, the method further comprises: In response to a second single-click operation of the user on the text input control, acquiring a second single-click position of the user in the text input control; If the distance between the second single-click position and the first single-click position is less than or equal to a distance threshold, and the difference between the occurrence time of the second single-click operation and the occurrence time of the first single-click operation is less than or equal to a duration threshold, then when the second single-click position is not in the head area and the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the second single-click position; when the second single-click position is in the head area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the starting position of the long string of numbers; when the second single-click position is in the tail area of ​​the long string of numbers, the position where the cursor is inserted again is determined to be the ending position of the long string of numbers; The cursor is displayed at the position where the cursor is inserted again.

6. The method according to claim 1, characterized in that After determining the initial cursor position in the current display interface of the electronic device according to the first click position, the method further includes: Displaying a cursor at the initial cursor position; After the user inputs the left half symbol of the paired symbols at the display position of the cursor, entity recognition and text analysis are performed on the text at the display position of the cursor, and the position of the right half symbol of the paired symbols in the text is predicted.

7. The method according to claim 6, characterized in that After predicting the position of the right half symbol in the paired symbols in the text, the method further includes: displaying the right half symbol at the predicted position of the right half symbol, and determining to input the right half symbol at the predicted position of the right half symbol in response to a confirmation operation of the user; or, Displaying a floating selection box above or below the predicted position of the right half symbol, wherein the floating selection box includes the right half symbol; in response to the user's selection operation on the floating selection box, inputting the right half symbol in the floating selection box selected by the user into the text; or, In response to the user's third click operation on the text input control, obtaining the user's third click position in the text input control, and displaying a cursor at the third click position; displaying a floating selection box according to the display position of the cursor and the predicted position of the right half symbol, wherein the floating selection box includes the right half symbol; in response to the user's selection operation on the floating selection box, inputting the right half symbol in the floating selection box selected by the user into the text; or, The predicted position of the right half symbol is displayed in the text, and in response to the user's operation on the displayed predicted position of the right half symbol, a cursor is inserted at the predicted position operated by the user.

8. The method according to claim 1, characterized in that After determining the initial cursor position in the current display interface of the electronic device according to the first click position, the method further includes: Displaying a cursor at the initial cursor position; After the user adds or modifies a subtitle at the display position of the cursor, a text analysis is performed on the text at the display position of the cursor, and the position of the subtitle in the text is predicted.

9. The method according to claim 8, characterized in that After predicting the position of the subheading in the text, the method further includes: Displaying a subtitle at the predicted position of the subtitle, wherein the format of the displayed subtitle is the same as the format of the subtitle added or modified by the user; in response to a confirmation operation by the user, determining to input the displayed subtitle at the predicted position of the subtitle; or, Displaying a floating selection box above or below the predicted position of the subtitle, the floating selection box including a subtitle to be input, the format of the subtitle to be input being the same as the format of the subtitle added or modified by the user; in response to the user's operation on the floating selection box, inputting the subtitle to be input in the floating selection box at the predicted position of the subtitle; or, The predicted position of the subtitle is displayed in the text, and in response to the user's operation on the displayed predicted position of the subtitle, a cursor is inserted at the predicted position operated by the user.

10. A cursor insertion device, characterized in that: include: An acquisition module, configured to acquire a first click position of the user in the text input control in response to a first click operation of the user in the text input control; A determination module, configured to determine an initial cursor position in a current display interface of the electronic device according to the first click position; The acquisition module is further used to acquire the text source of the long string of numbers when the initial position of the cursor is a long string of numbers; The determination module is further used to determine the cursor insertion position according to the text source of the long string of numbers and the initial position of the cursor; A display module is used to display a cursor at the cursor insertion position.

11. An electronic device, characterized in that: include: one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to perform the method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 9.