Handwriting input method and electronic device

CN122990702APending Publication Date: 2026-10-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510528966.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0043]第五方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在通信装置上运行时,使得该通信装置执行如第一方面或第一方面的任一种可能的实现方式中描述的手写输入方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990702A_ABST
    Figure CN122990702A_ABST
Patent Text Reader

Abstract

The handwriting input method and the electronic device provided in the embodiments of the present application can automatically identify the wrongly written words, phrases and the like in the handwriting input process through the error correction function, and mark the wrongly written words, phrases and the like through marking by lines and the like, thereby prompting the user of the existence of the wrongly written words in the handwriting process, improving the accuracy of the user's handwriting, and improving the user's confidence in handwriting input. In the case that the user needs, the correct word recommendation can be provided, thereby reducing the input burden of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a handwriting input method and electronic device. Background Technology

[0002] With the widespread use of electronic devices and technological advancements, users can create notes and record various content using note-taking applications on their devices. Since handwriting input records the user's own handwriting and preserves their unique writing style, it is gradually becoming a trend to meet user input needs. However, due to the similarities in form, sound, and stroke complexity of Chinese characters, and the similarities and near-homophones in English spelling, handwriting input inevitably leads to typos and misspellings. How to correct these errors during handwriting input is a problem that needs to be addressed. Summary of the Invention

[0003] This application provides a handwriting input method and electronic device that can identify and correct erroneous words that occur during handwriting input, thereby improving the user's handwriting input experience.

[0004] Firstly, this application provides a handwriting input method that can be applied to electronic devices (such as mobile phones, tablets, etc.). The method includes:

[0005] Display the first user interface;

[0006] Receive a first handwriting input operation and display the first handwriting ink mark in response to the first handwriting input operation;

[0007] When a preset condition is triggered, the first handwritten ink mark is corrected and a first mark is displayed, wherein the first mark is used to identify the first incorrect word in the first handwritten ink mark.

[0008] For example, the preset conditions being triggered include, but are not limited to: not receiving a handwriting input operation within a preset time, receiving input of preset characters (such as punctuation marks like commas (,), periods (.), exclamation marks (!), question marks (?), etc.), receiving input of preset gestures, etc.

[0009] For example, the first handwriting input operation can be a handwriting input operation via a stylus.

[0010] It is understandable that errors may occur during handwriting input, but users are sometimes unaware of these mistakes. If these errors are not corrected promptly, it can lead to a negative experience of difficulty in handwriting. Therefore, in this embodiment, the electronic device can correct the handwritten ink marks corresponding to the handwriting input, displaying indicators to identify incorrect words in the handwritten ink marks. This helps users correct their handwriting errors and improves their handwriting input experience.

[0011] It is also understandable that real-time full error correction has a significant impact on power consumption, which can lead to issues such as lag and performance problems with the marker flashing light. Furthermore, to save power consumption during error correction, this embodiment of the application incorporates preset conditions based on potential phenomena during handwriting input. Error correction is performed when these preset conditions are triggered, thereby reducing power consumption and improving performance.

[0012] In one possible implementation of the first aspect, the method further includes:

[0013] In response to a first operation on the area where the first marker is located, a first pop-up window is displayed, wherein the first pop-up window includes the first correct word corresponding to the first incorrect word.

[0014] In this method, to help users better correct misspelled words, the correct word corresponding to the misspelled word can be displayed according to the user's needs.

[0015] In one possible implementation of the first aspect, the method further includes:

[0016] In response to a second operation on the first correct word, the first incorrect word in the first handwritten ink is replaced with the first correct word, wherein the first correct word has a handwritten form.

[0017] In this method, to help users better correct misspelled words and increase the frequency of users using handwritten notes, misspelled words can be replaced with the corresponding correct words according to the user's needs.

[0018] In one possible implementation of the first aspect, the method further includes:

[0019] In response to a third operation on the first handwritten ink mark, a first region is determined, wherein the first region belongs to the area in the first handwritten ink mark where the ink mark is altered;

[0020] If the first region and the region containing the first misspelled word overlap, the first marker will not be displayed.

[0021] In this method, when the ink is altered, the altered area can be compared with the area containing the erroneous word, allowing for timely removal of the mark and avoiding power waste caused by re-identification. Furthermore, in peripheral functional scenarios, cached data is used as the basis for the disappearance of the erroneous word underline after area changes, instead of triggering multiple correction changes to the underline. This reduces power consumption while ensuring accurate and rapid disappearance of the underline.

[0022] In one possible implementation of the first aspect, in response to a first operation on the area where the first marker is located, a first pop-up window is displayed, including:

[0023] Upon receiving a first operation on the area where the first mark is located, and if it is determined that the movement distance corresponding to the first operation is less than or equal to a preset threshold, the first pop-up window is displayed.

[0024] For example, when the first operation is a click operation via a stylus, the movement distance can be the radius of the stylus stroke. In this method, during the complete interaction of the intelligent error correction function, the user can click on the canvas to trigger and view the error correction result. The electronic device can comprehensively identify the user's click intention through the stylus stroke radius and / or pressure sensitivity, thereby effectively distinguishing between click events and ink marks of "dots," facilitating user operation.

[0025] In one possible implementation of the first aspect, correcting the first handwritten ink mark and displaying the first marker includes:

[0026] Perform text recognition on the first handwritten ink mark to obtain the first recognition result;

[0027] The first recognition result is input into the error correction model to obtain the first error correction result, wherein the first error correction result includes the first wrong word in the first recognition result and the first correct word corresponding to the first wrong word;

[0028] Cache the first error correction result;

[0029] The first mark is displayed based on the first error correction result.

[0030] In one possible implementation of the first aspect, the first user interface includes a first layer and a second layer, the first layer being used to display the first handwritten ink mark, and the second layer being used to display the first mark;

[0031] The method further includes:

[0032] After displaying the first handwritten ink mark, a second handwritten input operation is received;

[0033] The second handwriting ink is displayed in response to the second handwriting input operation;

[0034] When the preset conditions are triggered, text recognition is performed on the second handwritten ink mark to obtain a second recognition result;

[0035] The second recognition result is input into the error correction model to obtain the second error correction result, wherein the second error correction result includes the second wrong word in the second recognition result and the second correct word corresponding to the second wrong word;

[0036] Cache the second error correction result;

[0037] The first layer is refreshed based on the first correction result and the second correction result, and the first mark and the second mark are displayed in the first layer, wherein the second mark is used to identify the second wrong word.

[0038] This method uses a cached error correction result, and only performs error correction on appended ink marks after the trigger condition, which greatly reduces power consumption while meeting the user's error correction needs.

[0039] Secondly, an electronic device is provided in the embodiments of this application, the electronic device comprising: one or more processors; a memory; wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the handwriting input method described in the first aspect or any possible implementation of the first aspect.

[0040] Thirdly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to execute the handwriting input method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0041] In one possible implementation, the chip or chip system described above in the embodiments of this application further includes at least one memory, which stores instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0042] Fourthly, embodiments of this application provide a computer storage medium storing a computer program that, when executed by a processor, causes the computer to perform the handwriting input method as described in the first aspect or any possible implementation thereof.

[0043] Fifthly, embodiments of this application provide a computer program product that, when run on a communication device, causes the communication device to execute the handwriting input method as described in the first aspect or any possible implementation thereof.

[0044] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0045] The accompanying drawings used in the embodiments of this application are described below.

[0046] Figure 1 This is a schematic diagram of an electronic device displaying handwritten ink, provided in an embodiment of this application;

[0047] Figure 2 An exemplary schematic diagram of the architecture of an error correction and recognition system 10 is shown;

[0048] Figure 3 An exemplary schematic diagram of the hardware structure of an electronic device 100 is shown;

[0049] Figure 4 An exemplary schematic diagram of the software architecture of an electronic device 100 is shown;

[0050] Figures 5A to 5G An example is shown in the form of a set of user interface diagrams displaying misspellings;

[0051] Figures 6A to 6D An example is shown in the user interface diagram of a set of functions related to misspelling;

[0052] Figure 7 This is a flowchart illustrating a handwriting input method provided in an embodiment of this application. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described below with reference to the accompanying drawings.

[0054] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0055] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0056] The term "user interface (UI)" used in the specification, claims, and drawings of this application refers to the medium through which an application or operating system interacts and exchanges information with a user. It converts the internal form of information into a form acceptable to the user. The user interface is also called an interface. An application's user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content such as images, text, and buttons. Controls, also called widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined through tags or nodes, such as in XML. <textview> 、 <imgview> 、 <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a web page is also defined through tags or nodes in the web page source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>To define the elements and attributes of a webpage.

[0057] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0058] To better understand the technical solutions provided in the embodiments of this application, the background involved in the embodiments of this application will be introduced first.

[0059] With the widespread adoption of smart devices and the rapid development of communication technologies, using electronic devices such as tablets for content / note-taking has gradually become a trend. Because handwriting input is quite similar to pen-and-paper writing, using a finger or stylus to input content on the screen of an electronic device is also becoming a common method of human-computer interaction. Please see [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of an electronic device displaying handwritten ink, provided in an embodiment of this application. Figure 1 As shown, taking stylus 200 as an example, stylus 200, as an option of electronic device 100, can simulate the user's actual handwriting. In handwritten notes in a note-taking application, the user can achieve functions such as instant recording and drawing creation through interaction between stylus 200 and electronic device 100. For example, when stylus 200 touches the display screen of electronic device 100 and moves on the screen, the display screen monitors the points generated by stylus 200 at a certain sampling frequency, draws the points, and connects adjacent points, thereby generating and displaying the handwritten ink marks of stylus 200 (e.g.,...). Figure 1 (As shown in the example of "Xiaoming"). It is understandable that, compared with text input, handwriting input, with its freer writing style, can better preserve the user's personalized characteristics and better reflect their thoughts and thought processes.

[0060] However, due to the similarity in form, sound, and strokes of Chinese characters, and the numerous spelling errors in English words, users inevitably make mistakes such as misspellings, incorrect words, and misspelled words during handwriting input. Electronic devices can then display these errors, potentially hindering the user's handwriting input process and leading to a poor user experience. Today, advancements in artificial intelligence technology have significantly improved the accuracy and speed of handwriting recognition. Based on this, this application provides a handwriting input method that automatically identifies incorrectly written words and phrases through intelligent error correction, marking them with underlines or other methods. This provides feedback to the user during writing, improving accuracy and boosting confidence. When needed, correct word recommendations can also be provided to reduce the user's input burden. The term "intelligent error correction" can be referred to as smart error correction or other names; this application makes no limitation on this terminology.

[0061] In this embodiment of the application, handwriting input operation includes the operation of a user touching the display screen or moving the pen on the display screen with their finger or stylus.

[0062] In the embodiments of this application, for ease of description, incorrect words, incorrect idioms, incorrect characters, and incorrectly written / spelled words can be simply referred to as wrong words.

[0063] First, let me introduce an error correction and recognition system 10 involved in the embodiments of this application.

[0064] Figure 2 An exemplary schematic diagram of the architecture of an error correction and recognition system 10 is shown.

[0065] like Figure 2 As shown, the error correction and recognition system 10 may include an electronic device 100, a stylus 200, and a network device 300. Optionally, when a user performs handwriting input using their finger, the error correction and recognition system 10 may not include the stylus 200. Exemplarily, the electronic device 100 may communicate with the stylus 200 and the network device 300 via wired (e.g., universal serial bus, twisted pair, coaxial cable, and fiber optic cable, etc.) and / or wireless (e.g., wireless local area networks (WLAN), Bluetooth, and cellular communication networks, etc.) means. In one implementation, the user can control the electronic device 100 by operating the stylus 200. Wherein:

[0066] In this application embodiment, the electronic device 100 may be a mobile phone, tablet computer, all-in-one computer, handheld computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), as well as smart home devices such as smart TVs and projectors, extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR), or in-vehicle devices. This application embodiment does not impose any special restrictions on the specific type of electronic device 100.

[0067] In this embodiment of the application, the stylus 200 can also be referred to as a digital pen or a stylus. The stylus can be a capacitive pen, such as an active capacitive pen or a passive capacitive pen. A capacitive pen is a pen made of conductive materials, possessing conductive properties, used for touching capacitive screens to complete human-computer interaction operations. It is an auxiliary device that uses conductive materials to mimic the human body (usually the human finger) to complete human-computer interaction. The tip material of an active capacitive stylus uses polyacetal, which has high strength, high impact resistance, and smoothness. Based on the properties of polyacetal, the tip of an active capacitive pen has a better smoothness. A passive capacitive pen is an auxiliary device that mimics the touch effect of a finger. The tip can be made of conductive materials that can affect capacitance changes, such as conductive foam, metal, or a brush. The tip of a passive capacitive pen is relatively thick.

[0068] In one implementation, taking the handwriting input operation performed by the stylus 200 as an example, the user performs a handwriting input operation on the electronic device 100 by operating / using the stylus 200, such as writing, etc. The electronic device can collect the reporting point information generated by the handwriting input operation. Specifically, when the stylus 200 touches the display screen of the electronic device 100, the electrodes in the stylus 200 generate a sensing capacitance with the electrodes on the sensing channel and the driving channel. The display screen of the electronic device 100 forms a reporting point of the stylus 200 at the location where the sensing capacitance is generated. The sensing channel of the touch layer reports the generated sensing capacitance to the display driving circuit. The display driving circuit obtains the X-axis coordinate of the stylus reporting point based on the capacitance change of the sensing channel. The driving channel reports the generated sensing capacitance to the display driving circuit. The display driving circuit obtains the Y-axis coordinate of the stylus 200 reporting point based on the capacitance change of the driving channel. The kernel layer obtains the reporting point information of the stylus 200 by obtaining the X-axis coordinate and Y-axis coordinate of the reporting point obtained by the display driving circuit. Based on the above reporting point information, reporting points are drawn and adjacent reporting points are connected to generate and display the handwritten ink marks of the stylus 200.

[0069] Network device 300 may include at least one server. In one embodiment, any server may be a hardware server; in another embodiment, any server may be a cloud server. In one embodiment, network device 300 may be a Linux server, a Windows server, or other server device that can provide simultaneous access for multiple devices. In one embodiment, network device 300 may be a server cluster composed of multiple regions, multiple data centers, and multiple servers. Optionally, network device 300 includes an error correction model, which is a model trained based on a neural network and can be used for error correction, including but not limited to artificial intelligence (AI) models.

[0070] In one embodiment, electronic device 100 receives a handwriting input operation, displays a first handwritten ink mark in response to the handwriting input operation, and identifies the first handwritten ink mark to obtain a first recognition result. Optionally, electronic device 100 sends the first recognition result to network device 300, network device 300 corrects the first recognition result to obtain a first error correction result, and sends the first error correction result to electronic device 100. Electronic device 100 marks erroneous handwritten ink marks in the first handwritten ink mark based on the first error correction result. In another embodiment, electronic device 100 has an error correction model installed / built locally and has sufficient computing power to run the error correction model. Electronic device 100 does not need to send the first recognition result to network device 300; electronic device 100 can identify the first recognition result locally. In this case, error correction and recognition system 10 may not include network device 300.

[0071] Understandably, Figure 2 The number and form of the electronic devices shown are merely examples. In a specific implementation, the number may be more or less. For example, the error correction and recognition system 10 may also include other electronic devices. This application does not limit this.

[0072] The structure of the exemplary electronic device 100 provided in the embodiments of this application will be described below.

[0073] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0074] Figure 3 An exemplary schematic diagram of the hardware structure of an electronic device 100 is shown.

[0075] like Figure 3 As 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, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.

[0076] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0077] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0078] The processor 110 may also include a memory for storing instructions and data. In one embodiment, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0079] In one embodiment, the power management module 141 and the charging management module 140 may also be housed in the same device.

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

[0081] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In another embodiment, the antenna can be used in conjunction with a tuning switch.

[0082] The mobile communication module 150 can provide wireless communication solutions for electronic devices 100, including second-generation (2G), third-generation (3G), fourth-generation (4G), fifth-generation (5G), and sixth-generation (6G) technologies.

[0083] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module.

[0084] In one embodiment, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0085] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0086] 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 (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In one embodiment, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0087] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0088] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

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

[0090] Electronic device 100 can implement audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0091] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In one embodiment, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In one embodiment, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.

[0092] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, a layered architecture software system could be Android. TM The system can be the Harmony operating system (OS), or other future new systems, such as an AI-based operating system. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interactions. In an electronic device, the operating system connects downwards to the physical hardware layer and provides a runtime environment for application software. This application uses the layered architecture of the Android system as an example to illustrate the software structure of the electronic device 100.

[0093] Figure 4 An exemplary schematic diagram of the software architecture of an electronic device 100 is shown.

[0094] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In one implementation, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. System functions can be tailored, added, or combined at the subsystem level depending on the deployment scenario of different device types, and each subsystem can also be tailored, added, or combined at the functional granularity level.

[0095] The application layer can include a range of applications. These applications can include system applications and third-party applications.

[0096] like Figure 4 As shown, the application can include camera, gallery, music, calendar, SMS, calls, Bluetooth, memos, notes, and more.

[0097] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0098] like Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0099] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0100] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0101] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0102] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0103] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0104] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0105] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0106] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0107] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0108] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0109] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0110] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0111] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0112] A 2D graphics engine is a graphics engine for 2D drawing.

[0113] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0114] The following example, using a handwriting input scenario, illustrates the workflow of the software and hardware of electronic device 100.

[0115] When the electronic device 100 is in handwriting input mode, and the touch sensor 180K receives a handwriting input operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the handwriting input operation into a raw input event (including the position information of the touch point, the timestamp of the touch point, etc.). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a handwriting input operation and the control corresponding to the handwriting input operation as the handwriting input page of a note-taking application as an example, the note-taking application calls the interface of the application framework layer, and then determines the handwritten ink based on the position information and timestamp of each point. By calling the kernel layer to control the display driver, the handwritten ink is displayed on the display screen 194. Furthermore, in the intelligent error correction function, when typos or misspellings are detected in the handwritten ink, the typos or misspellings can be marked on the display screen 194.

[0116] The following describes the application scenarios involved in the embodiments of this application and the user interface diagrams in these scenarios.

[0117] Figures 5A to 5G An example is shown in the form of a set of user interface diagrams displaying misspellings.

[0118] like Figure 5A As shown, the electronic device 100 displays a user interface 510. Taking handwritten notes in a note-taking application as an example, the user interface 510 is the handwritten note interface of the note-taking application. The user interface 510 includes a toolbar 511, undo controls, redo controls, save controls, add bookmark controls, and search controls, etc. The toolbar 511 can include multiple tool controls, and the column divider 512 in the toolbar 511 can divide the display area of ​​the toolbar 511 into two parts, namely a first display area 5111 and a second display area 5112. Optionally, when the electronic device 100 is facing the user, from the user's perspective, the electronic device 100 can display the first display area 5111 and the second display area 5112 of the toolbar 511 in a side-by-side manner from left to right. The first display area 5111 includes, but is not limited to, the following tool controls: AI Notes control 111, Brush control 112, Marker control 113, Eraser control 114, Lasso control 115, Insert Shape control 116, Insert Image control 117, Insert Text Box control 118, Insert Formula control 119, Laser Pointer control 12A, Ruler control 12B, Magnifier control 122, Add Page control 123, and Settings control 124. AI Notes control 111 provides AI functions, such as intelligent error correction. Brush control 112 provides various types of brushes for handwriting and drawing, such as fountain pens, pencils, and ballpoint pens. Brush parameters (such as color, transparency, and tip shape) can be adjusted to meet different needs. Marker control 113 provides the function of marking key content. Eraser control 114 provides the function of erasing handwritten or hand-drawn content. Lasso control 115 provides the function of selecting content and copying, deleting, and dragging the selected content. Optionally, the tool controls in the first display area 5111 can be added, deleted, or replaced according to user needs.

[0119] In one implementation, the tool control displayed by the electronic device 100 in the second display area 5112 is a sub-control corresponding to the tool control in the first display area 5111. This means that if a tool control in the first display area 5111 is selected, then the sub-control corresponding to that tool control is displayed in the second display area 5112. For example, taking the selected tool control as AI note control 111... Figure 5A As shown, when the AI ​​Notes Control 111 is selected, it can be highlighted, bolded, or enlarged. In this case, the electronic device 100 can display the sub-controls corresponding to the AI ​​Notes Control 111 in the second display area. The sub-controls include, but are not limited to, the intelligent error correction control 1112, other controls 1113, etc. In response to the operation of the intelligent error correction control 1112, the electronic device 100 can enable the intelligent error correction function when the intelligent error correction control 1112 is selected. Alternatively, it can be said that the electronic device 100 is in an intelligent error correction state / mode, in which the electronic device 100 has intelligent error correction capabilities.

[0120] In one implementation, electronic device 100 receives and responds to an operation (such as a click) on brush control 112, and can display, for example... Figure 5B The user interface 520 is shown. Figure 5B In the user interface 520 shown, the electronic device 100 is in a writing state / writing mode. The user interface 520 includes a toolbar 511, which includes a first display area 5111 and a second display area 5112. When the brush control 112 is selected, the brush control 112 can be highlighted, thickened, or enlarged. The electronic device 100 can display the corresponding sub-controls of the brush control 112 in the second display area 5112, including but not limited to a first thickness control 1121, a second thickness control 1122, a first color control 1123, and a second color control 1124. For example, the first thickness control 1121 provides / indicates a first thickness of the writing, the second thickness control provides / indicates a second thickness of the writing, the first color control 1123 provides / indicates a first color of the writing (e.g., black), and the second color control 1124 provides / indicates a second color of the writing (e.g., red). It is understood that the first color control 1123 is selected, meaning the current writing color is the first color. Optionally, the thickness and color controls displayed by the electronic device 100 in the second display area 5112 may be determined according to the user's usage frequency (for example, the thickness and color that the user uses most frequently), or may be set by the user.

[0121] In one implementation, such as Figure 5B As shown, in writing state / writing mode, taking the handwriting input operation performed by the stylus 200 as an example, when the stylus 200 approaches the screen of the electronic device 100 but has not yet made contact, the electronic device 100 can display a circular cursor 210. This circular cursor 210 can indicate the hovering position of the pen tip in real time, thereby helping the user locate the pen's placement point and improving the accuracy of writing / drawing. Furthermore, at the first moment, the electronic device 100 receives and responds to the first handwriting input operation of the stylus 200. Optionally, with the help of the circular cursor 210, the user can write in the writing area 521 using the stylus 200, thereby displaying... Figure 5C The user interface shown is 530.

[0122] like Figure 5C As shown, the first handwriting input operation includes continuous handwriting input from a first moment to a second moment, that is, the electronic device 100 continuously receives handwriting input from the stylus 200 during the time period from the first moment to the second moment. For example, "continuous" means continuously monitoring the points generated by the stylus 200 according to a preset sampling frequency. For example, in response to continuous handwriting input from the stylus 200 during the time period from the first moment to the second moment, the electronic device 100 can display a first handwritten ink mark on the user interface 530, which includes the following content: "On a sunny morning, Xiaoming and his friends decided to go to the park." At / after the second moment, after the user lifts the stylus 200, that is, after the stylus 200 moves away from the display screen of the electronic device 100, if the electronic device 100 does not receive any writing input from the stylus 200 within a preset time, the intelligent error correction function can be triggered, displaying as shown below. Figure 5D The user interface 540 shown is illustrated. For example, the preset time may include 2 seconds, 3 seconds, or 7 seconds; however, this embodiment does not impose any limitation on the specific value of the preset time.

[0123] like Figure 5D As shown, the electronic device 100 does not display a circular cursor. Under the intelligent error correction function, the electronic device 100 can intelligently correct the first handwritten ink, displaying at least one error mark, such as mark 1 and mark 2. Exemplarily, the error marks are used to identify incorrect words, incorrect idioms, and incorrect characters in the first handwritten ink by drawing lines; that is, the error mark can be a horizontal line displayed below the incorrect word, incorrect idiom, and incorrect character. Optionally, this horizontal line can be a dotted line with color (such as red). It is understood that from... Figure 5D It can be seen that according to common conventions, "yang guang ming mei" (written incorrectly as "阳光明眉") is an idiom, and the correct writing of this idiom is "阳光明媚". Therefore, "阳光明眉" in the first handwritten ink is an erroneous idiom, and then mark 1 can be displayed under "阳光明眉". "绝定" is an erroneous word in this sentence, and the correct word in this sentence is "决定". Therefore, "绝定" in the first handwritten ink is an erroneous word, and then mark 2 can be displayed under "绝定".

[0124] In one embodiment, if the user continues writing, the electronic device 100 may display a circular cursor. The electronic device 100 receives and responds to the second handwritten input operation of the stylus 200, displaying as Figure 5E the user interface 550 shown in the following. As shown in Figure 5E the following, the second handwritten input operation includes a continuous handwritten input operation from a moment after the second moment to the third moment, that is, the electronic device 100 can continuously receive the handwritten input operation of the stylus 200 within the time period from a moment after the second moment to the third moment. Exemplarily, in response to the continuous handwritten input of the stylus 200 within the time period from a moment after the second moment to the third moment, the electronic device 100 may display a second handwritten ink on the user interface 550, and the second handwritten ink includes the following content: "They set off cheerfully, talking and laughing happily all the way, very happy. When they arrived at the park, they saw the colorful flowers and stopped one after another". The user interface 550 further includes the first handwritten ink corresponding to the first handwritten input operation between the first moment and the second moment, mark 1 and mark 2. At or after the third moment, after the user lifts the stylus 200, that is, the stylus 200 is far away from the display screen of the electronic device 100, and the electronic device 100 does not receive the writing input operation of the stylus 200 within a preset time, the intelligent error correction function may be triggered, and displaying as Figure 5F the user interface 560 shown in the following.

[0125] As shown in Figure 5F the following, the electronic device 100 does not display a circular cursor. Under the intelligent error correction function, the electronic device 100 may perform intelligent error correction on the second handwritten ink, and display at least one wrong word mark, such as mark 3, mark 4 and mark 5. It can be understood that from Figure 5F It can be seen that according to common conventions, "兴高彩烈" is an idiom, and the correct writing of this idiom in the sentence is "兴高采烈", so "兴高彩烈" in the second handwritten ink trace is a wrong idiom, and then mark 3 can be displayed under "绝定". "欢生笑语" is an idiom, and the correct writing of this idiom in the sentence is "欢声笑语", so "欢生笑语" in the second handwritten ink trace is a wrong idiom, and then mark 4 can be displayed under "欢生笑语". "五彦六色" is an idiom, and the correct writing of this idiom in the sentence is "五颜六色", so "五彦六色" in the second handwritten ink trace is a wrong idiom, and then mark 5 can be displayed under "五彦六色".

[0126] It can be understood that, in Figure 5F the user interface 560 shown, the user interface 560 includes a first handwritten ink trace and a second handwritten ink trace, and the second handwritten ink trace belongs to incremental content relative to the first handwritten ink trace. Since the electronic device 100 has performed intelligent error correction on the first handwritten ink trace, to save energy consumption, the electronic device 100 may store the error correction result corresponding to the first handwritten ink trace, and the error correction result includes wrong words / wrong characters obtained through error correction and correct words. In terms of error correction content, the electronic device 100 only performs intelligent error correction on the incremental content, that is, performs error correction on the second handwritten ink trace to obtain an error correction result, and stores the error correction result corresponding to the second handwritten ink trace. Since the layer where the handwritten ink trace is located is different from the layer where the wrong word mark is located, it is necessary to refresh the layer where the wrong word mark is located when displaying the wrong word mark. In one implementation, when displaying the wrong word mark, the layer where the wrong word mark is located may be refreshed based on the cached error correction results (including the error correction result corresponding to the first handwritten ink trace and the error correction result corresponding to the second handwritten ink trace), so as to display Figure 5F the mark 1, mark 2, mark 3, mark 4 and mark 5 shown.

[0127] In an implementation manner, at a certain moment after the third moment, when the user continues writing and intelligent error correction is triggered, Figure 5G the user interface 570 shown may be displayed. As shown in Figure 5G , compared with the user interface 560 shown in Figure 5F , the user interface 570 adds a third handwritten ink trace "足欣赏,小明建义去滑船,大家都同意了.". In the embodiment of the present application, when performing intelligent error correction, the electronic device 100 performs intelligent error correction on the line data where the handwritten ink trace is located, from Figure 5G It can be seen that the line where the third handwritten ink trace is located also includes the data "the flowers, all stop" in the second handwritten ink trace. Therefore, the electronic device 100 performs intelligent error correction on the recognition results corresponding to these handwritten ink traces "the flowers, all stop to appreciate, Xiao Ming suggests to go boating, everyone agrees", so as to display mark 6, mark 7 and mark 8. The mark 6 is used to identify the wrong word "stop", the mark 7 is used to identify the wrong word "suggests", and the mark 8 is used to identify the wrong word "boating".

[0128] Figure 6A and Figure 6D exemplarily shows a set of schematic diagrams of user interfaces related to the wrong word marking function.

[0129] In a possible implementation, the electronic device 100 receives an operation (for example, a click operation) on the error mark. Since the nib of the stylus 200 is relatively smooth, in order to accurately determine the event intention corresponding to the click operation, for example, the electronic device 100 receives a click operation on the handwritten ink trace "bright sun and beautiful spring", the click operation may be used to add a underline on the handwritten ink trace "bright sun and beautiful spring", and the click operation may also be used to click the error mark area to view the error correction result. In an implementation, the electronic device 100 may determine whether the moving distance corresponding to the operation is within a threshold range. If it is determined that the moving distance is not within the threshold range, the electronic device 100 may determine that the intention of the operation is not a click, and then draw / generate a handwritten ink trace according to the corresponding reporting point of the operation. If it is determined that the moving distance is within the threshold range, the electronic device 100 may determine that the intention of the operation is a click, and may display an error correction result pop-up window.

[0130] For example, as shown in Figure 6A , the electronic device 100 receives a click operation from the stylus 200. When the stylus 200 first contacts the display screen of the electronic device 100 from a non-contact state, the electronic device 100 may record the first coordinate a1(X1,Y1) in the user interface 610. Since the nib of the stylus 200 is relatively smooth, when the stylus 200 contacts the display screen of the electronic device 100, it may move from the first coordinate to the second coordinate a2(X2,Y2). In the case where the electronic device 100 calculates that the moving distance L is within a preset range according to the first coordinate a1(X1,Y1) and the second coordinate a2(X2,Y2), the electronic device may display Figure 6B the user interface 620 shown in. As shown in Figure 6B , the user interface 620 includes a first pop-up window 571, and the first pop-up window 571 includes a correct word control 5711 (bright sunshine and beautiful spring) corresponding to the wrong word (bright sun and beautiful spring) identified by mark 1 and an ignore control 5712. Optionally, the electronic device 100 may stop displaying the first pop-up window 571 after displaying the first pop-up window 571 for a preset time.

[0131] In one implementation, the electronic device 100 receives and responds to Figure 6B the operation (for example, a click operation) on the correct word control 5711 shown in the figure, which can replace the wrong word corresponding to the mark 1 with the correct word, and display the user interface 630 as shown in Figure 6C the figure. Figure 6C As shown in the figure, the electronic device 100 may display the correct word (Sunny Day) in the form of handwritten ink. Optionally, to distinguish it from other handwritten ink with no wrong words, the electronic device 100 may display the correct word in the form of handwritten ink. Further, when or after the word is replaced with the correct word, the mark 1 is no longer displayed.

[0132] In one implementation, the electronic device 100 receives and responds to an operation on the ignore control 5712, which can ignore the wrong word prompt, and further, the mark 1 of the wrong word may not be displayed.

[0133] In one possible embodiment, in handwritten notes, the electronic device 100 may provide one or more functions that can be used to modify handwritten ink, such as an eraser control, an undo control, a lasso control, and other functions. Exemplarily, the eraser control is used to erase handwritten ink, similar to a physical eraser. The undo control is used to return to the previous input step during the handwritten input process. The lasso function is used to select content in the handwritten ink by enclosing it, and the selected content can be edited (for example, moved, scaled, copied, format adjusted, etc.). It can be seen that all the above functions can cause changes to regional ink in the handwritten ink. In the case where the region where the ink is modified in the handwritten ink overlaps with the region where the wrong word is located, the wrong word mark can be canceled, that is, the wrong word mark is not displayed.

[0134] For example, as shown in Figure 6D the figure, the eraser control 114 is selected. Under the eraser function, the electronic device 100 receives and responds to an erasure operation on the handwritten ink. In conjunction with Figure 6C and Figure 6D it can be seen that "Zu Xinshang, Xiao Ming" in the handwritten ink is erased. Since the first region 6401 where "Zu Xinshang, Xiao Ming" is located overlaps with the region of the wrong word (i.e., "Zhu Zu") identified by mark 6 (that is, the region where the character "Zu" is located overlaps), the electronic device 100 can directly cancel mark 6, that is, mark 6 is not displayed in the user interface 620 shown in Figure 6D the figure.

[0135] Referring to Figure 7 , Figure 7 which is a schematic flowchart of a handwritten input method provided in the embodiments of the present application, and the method can be applied to the above-mentioned electronic device. The method includes but is not limited to the following steps:

[0136] Step S701: The electronic device displays a first user interface.

[0137] For example, the first user interface could be the handwritten note interface within a note-taking / memo app. It's understood that note-taking apps offer various note-taking options, such as text recording, handwritten notes, and so on. In handwritten notes, users can record their handwriting using their finger or a stylus, preserving their unique writing style. For instance, the first user interface could be... Figure 5A The user interface 510 shown.

[0138] Step S702: The electronic device receives the first handwriting input operation and displays the first handwriting ink mark in response to the first handwriting input operation.

[0139] For example, when displaying the first user interface, a user can record content by writing on the screen of an electronic device using a finger or stylus. The electronic device can then receive the first handwriting input operation from the finger or stylus, monitor the movement of the first handwriting input operation on the screen to generate a marker, draw the marker, and connect adjacent markers, thereby generating and displaying the first handwritten ink mark. For instance, the first handwritten ink mark could be... Figure 5C The image shows "On a sunny day, Xiaoming and his friends decided to go to the park to play."

[0140] Step S703: When the preset conditions are triggered, correct the first handwritten ink mark and display the first mark.

[0141] The first mark is used to identify the first misspelled word in the first handwritten ink mark.

[0142] For example, handwritten notes can provide an AI note-taking service, in which the electronic device possesses one or more AI functions, such as intelligent error correction. It is understood that when intelligent error correction is enabled, the electronic device 100 can intelligently correct handwritten ink. That is, when preset conditions are triggered, the electronic device corrects the first handwritten ink entry, displaying a first marker. This first marker is used to identify the first incorrect word in the first handwritten ink entry. For example, the first marker could be... Figure 5D The labels 1 and 2 are shown.

[0143] In this embodiment, intelligent error correction is triggered only when preset conditions are met or triggered. It is understood that handwriting input simulates user input. When writing continuously, if the handwritten ink is a complete sentence, there is usually no obvious pause between each character. However, when continuously inputting a sentence or line, regardless of whether the complete semantic segment ends or a new line is started, the pen-lifting pause time is often too long. A long pen-lifting pause time can indicate the end of a user input segment. Providing a more complete semantic error correction input at this time is beneficial to the accuracy of the error correction result. Displaying a misspelled word marker (i.e., the first marker) at this time can achieve timely error correction while avoiding interference with the user's writing process. Therefore, in one implementation, the preset condition being triggered may include, but is not limited to: no handwritten input is received within a preset time (e.g., within 2 seconds, 3 seconds, or 5 seconds). For example, Figure 5C The second moment shown is when the user lifts the stylus but does not put it down to input anything 2 seconds afterward; or when a character (such as a comma (,) or a period (.)) is received.

[0144] In one possible implementation, the electronic device performs text recognition on the first handwritten ink mark to obtain a first recognition result. The first recognition result includes the text result corresponding to the first handwritten ink mark. Further, the electronic device can store the text result line by line (e.g., one, two, or three lines, etc.) according to the text recognition. The stored text result includes, but is not limited to, the text content within each line and the area where each character is located, etc. Then, the electronic device uses the string result of the text recognition result as input and inputs it into an error correction model (e.g., a vocabulary big data model). In this error correction model, a first error correction result is obtained according to the priority of form, similarity of sound, common words in the context, or word matching. The first error correction result includes incorrect words and their corresponding correct words. Further, to save storage space, the first recognition result can be deleted upon / after obtaining the first error correction result. Further still, the electronic device can display a first marker based on the first error correction result.

[0145] In this embodiment of the application, the user interface for handwritten notes (e.g.) Figures 5A to 5G The user interfaces 510 to 570 shown, and Figures 6A to 6D The user interfaces 610 to 640 shown include a first layer and a second layer. The first layer is used to display handwritten ink marks (such as first handwritten ink mark, second handwritten ink mark, etc.), and the second layer is used to display error marks (such as first mark).

[0146] In one possible implementation, regarding the error correction content, the electronic device corrects errors in the line containing the incrementally written content. That is, after displaying the first handwritten ink mark, it receives a second handwritten input operation and displays the second handwritten ink mark in response. Further, when a preset condition is triggered, the electronic device performs text recognition on the line containing the second handwritten ink mark to obtain a second recognition result; then, it inputs the second recognition result into the error correction model to obtain a second error correction result, wherein the second error correction result includes the second incorrect word in the second recognition result and the second correct word corresponding to the second incorrect word. The electronic device caches the second error correction result, refreshes the first layer based on the cached first and second error correction results, and displays a first marker in the first layer.

[0147] Understandably, considering users' desire for immersive writing—such as long sentences, paragraphs, or short essays—and their reluctance to interrupt their writing process to check for errors midway, electronic devices need to consistently display all error correction results. However, because error markers are displayed on the same layer, this layer needs to be refreshed each time they are displayed. Since error markers are determined / obtained based on the recognition of handwriting ink, performing full-text error correction every time preset conditions are triggered is wasteful and time-consuming. For example, from... Figures 5F to 5G It can be seen that the first handwritten ink mark, "It's quite pleasing to the eye, Xiaoming suggested going boating, and everyone agreed," is an incremental writing content compared to the second handwritten ink mark, "On a sunny morning, Xiaoming and his friends decided to go to the park. They set off happily, laughing and chatting along the way. When they arrived at the park, they saw colorful flowers and stopped to admire them." Before displaying the second handwritten ink mark, the electronic device had already displayed error markers for the first handwritten ink mark, such as marker 1, marker 2, marker 3, marker 4, and marker 5. It can be seen that the electronic device has completed the error correction for the first handwritten ink mark. After displaying the second handwritten ink mark, in order to display all the error correction results (i.e., the error correction results of the first and second handwritten ink marks), if the error recognition of the first handwritten ink mark is re-examined, it will add duplicate error correction content. If writing continues in this way, there will be more and more duplicate error corrections. It's understandable that if writing a new line consecutively triggers one error correction by lifting the pen / hand, then writing N lines can be considered as N times the pen / hand is lifted. Therefore, the data subject to error correction is (N+1)*N / 2, where the number of repeated error corrections reaches (N-1)*N / 2, and N is a positive integer. Thus, electronic devices can cache existing recognition results (e.g., the first recognition result corresponding to the first written ink mark). When appending writing, only the data of the line containing the writing is appended for intelligent error correction, and the cached data containing duplicates or overlaps is cleaned according to the newly added error correction result. Figures 5F to 5G It can be seen that, when displaying the first writing ink, under the condition that a preset condition is triggered, error correction and recognition are performed on the first writing ink, the error correction result is cached and wrong words are identified by marks. The second writing ink is displayed, under the condition that the preset condition is triggered, error correction and recognition are performed on the line data where the second writing ink is located, the error correction result is cached and saved, and finally the layer where the marks are located is refreshed as a whole according to the cached error correction result, to display as Figure 5G Mark 1, Mark 2, Mark 3, Mark 4, Mark 5, Mark 6, Mark 7 and Mark 8 as shown in the figure.

[0148] In a possible implementation, the method further includes: Step S704 and / or Step S705.

[0149] Step S704: In response to a first operation on the area where the first mark is located, the electronic device displays a first pop-up window.

[0150] Wherein, the first pop-up window includes a first correct word corresponding to the first wrong word, and optionally, the first pop-up window may further include an ignore control. For example, the first pop-up window may be Figure 6B the first pop-up window 571 as shown in the figure.

[0151] It can be understood that the canvas / layer of handwritten notes is used for the service attribute of writing ink. Under intelligent error correction, when a user wants to view the error correction result of the marked underline, a click operation needs to be performed, and the click event generated by the electronic device in response to the click operation needs to be responded on the canvas. There is a phenomenon of unclear boundary and mutual contradiction between this click event and the superimposed writing ink in the wrong word area. For example, when a user clicks the display screen, the electronic device receives the click operation, and needs to determine whether the click operation is used to additionally input the character point "、" on the ink of the wrong word "住足", or to click the area identified by the mark to view the error correction result. To this end, the embodiments of the present application conduct different analyses for the handwriting input of a stylus and the handwriting input of a finger.

[0152] In an implementation, the electronic device receives a first operation (for example, a click operation) on the area where the first mark is located via a stylus, and determines a movement distance (which may also be referred to as a movement diameter) corresponding to the first operation, for example Figure 6A The distance between coordinates a1 and a2 is shown. If the distance is less than or equal to a preset threshold (i.e., within the preset threshold), the intention of the operation is determined to be a click, and a first pop-up window can be displayed. For example, the preset threshold can be 5 pixels, 7 pixels, 10 pixels, etc., and this application does not impose any restrictions on the specific value of the preset threshold. It is understood that the corresponding preset threshold may be different for different electronic devices. If the distance is greater than the preset threshold, the intention of the operation is determined not to be a click, and handwritten ink can be drawn according to the operation. In another implementation, the electronic device can learn and record the pressure sensitivity of the stylus. By learning the user's click operation when using the stylus to click on function options in the menu, the pressure sensitivity range R of the user's stylus click can be learned, which can be used to correct the judgment of click events. Optionally, the pressure sensitivity data corresponds to significant user differences and can be customized according to the user's click pressure sensitivity range using the stylus.

[0153] In another implementation, since the contact area of ​​a finger is relatively large and it lacks pressure sensitivity, the electronic device can listen for click events corresponding to finger clicks via the `onclick` function. Optionally, the electronic device can also determine whether it is a click event based on the movement distance corresponding to the finger click operation. If the movement distance is less than a preset threshold, it is determined to be a click event. The preset threshold can be any pixel value less than 30 pixels, such as 28 pixels.

[0154] In one possible implementation, the electronic device, in response to a second operation on the first correct word, replaces the first incorrect word in the first handwritten ink with the first correct word, and does not display the first mark. The first correct word has a handwritten form. For example, a description of this section can be found... Figure 6B and Figure 6C The relevant descriptions will not be repeated here.

[0155] Step S705: In response to the third operation on the first handwritten ink mark, the electronic device does not display the first mark.

[0156] The third operation includes operations that alter the first handwritten ink mark, such as eraser, undo, and lasso operations. Understandably, using any of these functions (eraser, undo, lasso, etc.) may change the ink mark displayed on the canvas. For example, the eraser can remove a portion of the original handwritten ink mark. Since these functions all involve changes based on the original, normal handwritten ink mark, performing text recognition and error correction on the incomplete ink mark, and then canceling the displayed mark, not only increases the difficulty of recognition but also increases power consumption. In one implementation, the electronic device, in response to the third operation on the first handwritten ink mark, determines a first region, where the first region is the area in the first handwritten ink mark where the ink mark has been altered. If the first region overlaps with the area containing the first erroneous word, the first mark is not displayed. In other words, electronic devices can promptly cancel displayed markers by comparing whether the cached error correction results intersect / overlap with the areas where the ink has changed. This reduces the power consumption of requesting intelligent error correction and further improves the timeliness of marker cancellation, preventing situations where historical erroneous word markers remain in areas already erased by the eraser. Similarly, when using undo and lasso, it is only necessary to check whether the corresponding ink area intersects with the erroneous word area in the cached error correction result set. If they intersect, the electronic device can promptly cancel the underlined markers of the intersecting erroneous words.

[0157] It should be noted that the execution order of steps S704 and S705 is not limited in the embodiments of this application.

[0158] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.

[0159] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0160] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0161] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. A handwriting input method, characterized in that, The method includes: Display the first user interface; Receive a first handwriting input operation and display the first handwriting ink mark in response to the first handwriting input operation; When a preset condition is triggered, the first handwritten ink mark is corrected and a first mark is displayed, wherein the first mark is used to identify the first incorrect word in the first handwritten ink mark.

2. The method according to claim 1, characterized in that, The method further includes: In response to a first operation on the area where the first marker is located, a first pop-up window is displayed, wherein the first pop-up window includes the first correct word corresponding to the first incorrect word.

3. The method according to claim 2, characterized in that, The method further includes: In response to a second operation on the first correct word, the first incorrect word in the first handwritten ink is replaced with the first correct word, wherein the first correct word has a handwritten form.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a third operation on the first handwritten ink mark, a first region is determined, wherein the first region belongs to the area in the first handwritten ink mark where the ink mark is altered; If the first region and the region containing the first misspelled word overlap, the first marker will not be displayed.

5. The method according to any one of claims 2 to 4, characterized in that, In response to a first operation on the area where the first marker is located, a first pop-up window is displayed, including: Upon receiving a first operation on the area where the first mark is located, and if it is determined that the movement distance corresponding to the first operation is less than or equal to a preset threshold, the first pop-up window is displayed.

6. The method according to any one of claims 1 to 5, characterized in that, The step of correcting the first handwritten ink mark and displaying the first marker includes: Perform text recognition on the first handwritten ink mark to obtain the first recognition result; The first recognition result is input into the error correction model to obtain the first error correction result, wherein the first error correction result includes the first wrong word in the first recognition result and the first correct word corresponding to the first wrong word; Cache the first error correction result; The first mark is displayed based on the first error correction result.

7. The method according to claim 6, characterized in that, The first user interface includes a first layer and a second layer, wherein the first layer is used to display the first handwritten ink mark and the second layer is used to display the first mark; The method further includes: After displaying the first handwritten ink mark, a second handwritten input operation is received; The second handwriting ink is displayed in response to the second handwriting input operation; When the preset conditions are triggered, text recognition is performed on the second handwritten ink mark to obtain a second recognition result; The second recognition result is input into the error correction model to obtain the second error correction result, wherein the second error correction result includes the second wrong word in the second recognition result and the second correct word corresponding to the second wrong word; Cache the second error correction result; The first layer is refreshed based on the first correction result and the second correction result, and the first mark and the second mark are displayed in the first layer, wherein the second mark is used to identify the second wrong word.

8. An electronic device, characterized in that, The electronic device includes: one or more processors; a memory; wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 7.

9. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 7.

11. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 7.