A method for generating a page with annotations, an electronic device, and a storage medium

CN116204254BActive Publication Date: 2026-09-08HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210009782.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-30
Filing Date
2022-01-06
Publication Date
2026-09-08
Estimated Expiration
2042-01-06

AI Technical Summary

Technical Problem

[0006]可见,目前在页面上添加批注的方式不够灵活,效率低且用户体验较差

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204254B_ABST
    Figure CN116204254B_ABST
Patent Text Reader

Abstract

The application provides a method for generating a page with comments, an electronic device and a storage medium. In the method, the electronic device displays a first interface, and the first interface includes a first page. In response to a first instruction, the electronic device creates a comment layer, and the comment layer is located on the upper layer of the first page. The electronic device receives a first operation triggered by a user, and the first operation is an operation of adding comment content on the first interface by the user. The electronic device displays the comment content in the comment layer. In response to a second instruction, the electronic device obtains a target picture, and the target picture includes a picture generated according to the first page. The electronic device performs a synthesis process on the target picture and the comment layer to obtain a page with comments. According to the scheme, the user can add comment content in the first interface displayed by the electronic device without manually performing operations such as screenshot, and a page with comments is generated, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference of related applications

[0002] This application claims priority to Chinese Patent Application No. 202111447211.6, filed on November 30, 2021, entitled "A Method for Generating Annotation Pages, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of terminal technology, and in particular to a method for generating annotation pages, an electronic device, and a storage medium. Background Technology

[0004] A stylus is a common auxiliary input device used in electronic devices such as smartphones and tablets. A stylus allows for handwriting input on the screen of a smartphone or tablet.

[0005] When an electronic device is displaying an application page, and the user wants to add annotations to that page using a stylus, the electronic device first needs to take a screenshot of the currently displayed application page. The user then edits the screenshot using the stylus to add annotations.

[0006] It is evident that the current method of adding annotations on the page is not flexible enough, inefficient, and provides a poor user experience. Summary of the Invention

[0007] This application provides a method for generating annotation pages, an electronic device, and a storage medium, which can flexibly enable the addition of annotations to the display interface of an electronic device, thereby improving the user experience.

[0008] Firstly, this application provides a method for generating annotation pages, which can be applied to electronic devices. The method includes: the electronic device displaying a first interface, the first interface including a first page; responding to a first instruction, the electronic device creating an annotation layer, the annotation layer being located above the first page; the electronic device receiving a first operation triggered by a user, the first operation being the user adding annotation content on the first interface, the electronic device displaying the annotation content in the annotation layer; responding to a second instruction, the electronic device acquiring a target image, the target image including an image generated based on the first page; the electronic device performing a composite processing on the target image and the annotation layer to obtain an annotation page.

[0009] In the above method, when the electronic device displays the first interface, it can create an annotation layer in response to the first instruction. This adds an annotation layer to the first interface to display user annotations, eliminating the need for manual screenshotting or other user actions to add annotations to the currently displayed first interface. In response to the second instruction, the electronic device can acquire a target image generated from the first page and perform composite processing on the target image and the annotation layer to obtain an annotation page. This results in an annotation page containing the page content of the first page and the user-added annotations, improving the user experience.

[0010] In one possible design, before acquiring the target image in response to the second instruction, the method further includes: receiving a second operation triggered by the user, the second operation being a swipe or zoom operation triggered by the user on the first interface; moving or zooming the first page and the annotation layer; displaying a second interface, the second interface including the moved first page and the moved annotation layer, or the second interface including the zoomed first page and the zoomed annotation layer.

[0011] With this design, when a user triggers a swipe or zoom operation on the first interface, the annotation layer moves or zooms synchronously with the first page, thereby maintaining the relative position of the first page and the annotation layer and preventing the user's added annotations from being misaligned with the first page, which would affect the user experience.

[0012] In one possible design, creating the annotation layer includes: creating an annotation layer with the same size as the first interface;

[0013] Before moving or scaling the first page and the annotation layer, the method further includes: determining the movement distance or scaling ratio of the annotation layer according to the second operation, and expanding the annotation layer according to the movement distance or the scaling ratio.

[0014] With this design, the electronic device can expand the annotation layer based on the second operation triggered by the user, so that the annotation layer can completely cover the display area of ​​the electronic device, thereby ensuring that the annotation layer can display the annotation content added by the user at any position in the interface displayed on the electronic device.

[0015] In one possible design, the first interface includes the first page and a first portion of the annotation layer;

[0016] Before acquiring the target image in response to the second instruction, the method further includes: receiving a third operation triggered by the user, the third operation being used to switch the first page to the second page; moving the annotation layer by a preset length in a preset direction so that the second part of the moved annotation layer fits with the second page; the preset length being the length or width of the first page; displaying a third interface, the third interface including the second page and the second part of the annotation layer; wherein, the target image further includes an image generated based on the second page.

[0017] This design allows the electronic device to move the annotation layer when a user triggers a third action to switch pages, until the second part of the annotation layer aligns with the switched second page. This creates a new area in the annotation layer to display the user's annotations on the second page. Furthermore, when acquiring the target image, the electronic device can also acquire an image generated based on the second page, ensuring that the final annotation page includes the content of both the first and second pages, making it convenient for users to view the page content and its corresponding annotations.

[0018] In one possible design, creating the annotation layer includes: creating an annotation layer with the same size as the first interface;

[0019] Before moving the annotation layer by a preset length in a preset direction, the method further includes: obtaining the length or width of the second page, and expanding the annotation layer in the preset direction according to the length or width of the second page, wherein the expanded portion of the annotation layer is the second part of the annotation layer.

[0020] With this design, the electronic device can expand the annotation layer according to the length or width of the second page, so that the second part of the annotation layer can fit with the second page, thereby ensuring that the annotation layer can display the annotation content added by the user to the second page.

[0021] In one possible design, creating the annotation layer includes: obtaining the size information of the first page, and creating an annotation layer with the same size as the first page based on the size information of the first page.

[0022] With this design, electronic devices can create an annotation layer of the same size as the first page. When the user triggers a move or zoom operation, the first page and the annotation layer can be moved or zoomed directly without having to resize the annotation layer.

[0023] In one possible design, after receiving the first operation triggered by the user, the method further includes: determining the type of the first operation as an annotation operation according to at least one of the following methods: detecting that the user triggered the first operation by using a stylus touch, and determining the type of the first operation as an annotation operation; dividing the annotation layer into an input area and a control area, detecting the position where the user triggered the first operation, and if the position where the user triggered the first operation is located in the input area, then determining the type of the first operation as an annotation operation; detecting the trajectory of the first operation, calculating the sliding speed and sliding direction of the first operation based on the trajectory of the first operation, and determining the target angle between the sliding direction and the scrollable direction of the currently displayed page; if the sliding speed is less than a preset speed threshold, or the target angle is greater than a preset angle threshold, then determining the type of the first operation as an annotation operation.

[0024] In one possible design, after receiving the second operation triggered by the user, the method further includes: determining the type of the second operation as a control operation according to at least one of the following methods: detecting that the user triggered the second operation by finger touch, and determining the type of the second operation as a control operation; dividing the annotation layer into an input area and a control area, detecting the position where the user triggered the second operation, and if the position where the user triggered the second operation is located in the control area, then determining the type of the second operation as a control operation; detecting the trajectory of the second operation, calculating the sliding speed and sliding direction of the second operation based on the trajectory of the second operation, and determining the target angle between the sliding direction and the scrollable direction of the currently displayed page; if the sliding speed is greater than or equal to a preset speed threshold, and / or the target angle is less than or equal to a preset angle threshold, then determining the type of the second operation as a control operation.

[0025] With the above design, when an electronic device receives an operation triggered by a user, it can determine the type of operation based on the method, location, and trajectory of the operation, automatically identify annotation or control operations, and then execute the corresponding response actions for different types of operations, thereby improving the user experience.

[0026] In one possible design, the annotation layer is a system-level layer.

[0027] With this design, the annotation layer created by the electronic device is a system-level layer. This means that the electronic device can enable annotation mode when displaying any page, and the annotation layer can be added on top of the layer containing any page, allowing users to add annotations on any page displayed by the electronic device.

[0028] Secondly, this application provides an electronic device comprising multiple functional modules; the multiple functional modules interact to implement the methods shown in any of the above aspects and their respective embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0029] Thirdly, this application provides an electronic device including at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the methods shown in any of the above aspects and their various embodiments.

[0030] Fourthly, this application also provides a computer program that, when run on a computer, causes the computer to perform the methods shown in any of the above aspects and their respective embodiments.

[0031] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to perform the methods shown in any of the above aspects and their embodiments.

[0032] Sixthly, this application also provides a chip for reading a computer program stored in a memory and executing the methods shown in any of the above aspects and their embodiments.

[0033] Seventhly, this application also provides a chip system including a processor for supporting a computer device in implementing the methods shown in any of the above aspects and their embodiments. In one possible design, the chip system further includes a memory for storing programs and data necessary for the computer device. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0034] Figure 1 This is a schematic diagram illustrating a scenario applicable to an embodiment of this application;

[0035] Figure 2 This is a diagram illustrating a method for adding annotations to an application page.

[0036] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0037] Figure 4 A software structure block diagram of an electronic device provided in an embodiment of this application;

[0038] Figure 5A flowchart illustrating a method for generating annotation pages provided in this application embodiment;

[0039] Figure 6 A schematic diagram of layers included in an electronic interface provided in an embodiment of this application;

[0040] Figure 7 A schematic diagram illustrating an electronic device displaying user-added annotations, provided as an embodiment of this application;

[0041] Figure 8 A schematic diagram of an annotation layer provided in an embodiment of this application;

[0042] Figure 9 This application provides a schematic diagram of the trajectory of a target operation as illustrated in an embodiment.

[0043] Figure 10 A schematic diagram of the first page and annotation layer after a user triggers a movement operation, provided in an embodiment of this application;

[0044] Figure 11 A schematic diagram of the first page and annotation layer after a user triggers a zoom operation, provided in an embodiment of this application;

[0045] Figure 12 A schematic diagram of the page and annotation layer after a user triggers a page switching operation, provided in an embodiment of this application;

[0046] Figure 13 A schematic diagram of an annotation page provided for an embodiment of this application;

[0047] Figure 14 This is another illustration of an annotation page provided in the embodiments of this application;

[0048] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0049] Figure 16 A flowchart illustrating a method for generating annotation pages, as provided in an embodiment of this application. Detailed Implementation

[0050] To facilitate understanding of the embodiments of this application, the following terms related to the embodiments of this application are introduced:

[0051] Layers are used to hold display elements such as text or graphics. Multiple layers are stacked and combined to form the final effect of the display interface. Optionally, when a layer is opaque, the layer above will obscure the content of the layer below. Different layers in the display interface of an electronic device can hold different page content. For example, the wallpaper layer of an electronic device is used to display the wallpaper of the electronic device. When a user selects an application to open on the electronic device, the electronic device adds an application page layer to display the application's page. At this time, the application page layer is above the wallpaper layer, and the application page layer obscures the wallpaper layer.

[0052] A stylus is a common auxiliary input device used in electronic devices such as smartphones and tablets. A stylus allows for handwriting input on the screen of a smartphone or tablet.

[0053] Figure 1 This is a schematic diagram illustrating a scenario applicable to an embodiment of this application. (Refer to...) Figure 1 The scenario includes a user 11, a stylus 12, and an electronic device 13 that supports the stylus. The stylus 12 can connect to the electronic device 13 via wireless connection technologies such as Bluetooth. After the stylus 12 is connected to the electronic device 13, the electronic device 13 can receive input operations from the stylus 12 on its screen. For example, the user 11 can use the stylus 12 to draw on the screen of the electronic device 13; or, for example, the user 11 can use the stylus 12 to click on an icon displayed on the screen of the electronic device 13, triggering the electronic device 13 to execute the corresponding action.

[0054] When electronic device 13 is displaying an application page on the screen, and user 11 wants to add annotations to that page using stylus 12, electronic device 13 first needs to take a screenshot of the currently displayed application page. User 11 then edits and adds annotations to the screenshot taken by electronic device 13 using stylus 12. For example, Figure 2 This is a diagram illustrating a method for adding annotations to an application page. (Reference) Figure 2 Suppose an electronic device is currently displaying a picture in a photo album application. The user triggers a command to add an annotation to the currently displayed photo album application page. The electronic device takes a screenshot of the currently displayed photo album application page, and the user uses a stylus to add the annotation "action points" to the screenshot.

[0055] It is evident that the current method of adding annotations on the page is not flexible enough, inefficient, and provides a poor user experience.

[0056] To address the aforementioned issues, this application provides a method for generating annotation pages. In this method, when an electronic device displays a first interface including a first page, it creates an annotation layer in response to a first instruction. This annotation layer is located above the first page and can be used to record annotations added by the user. The electronic device receives a first operation triggered by the user, which is the user adding annotations to the first interface. The electronic device then displays the annotations in the annotation layer. In response to a second instruction, the electronic device acquires a target image, which includes an image generated based on the first page. The electronic device then performs a composite processing on the target image and the annotation layer to obtain the annotation page. This method allows for flexible addition of annotations to the display interface of the electronic device, improving the user experience.

[0057] The following describes an electronic device and embodiments for using such an electronic device. The electronic device in this application embodiment can be a device that supports stylus input, such as a tablet computer, mobile phone, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wearable device, etc. This application embodiment does not limit the specific type of electronic device.

[0058] Figure 3 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. 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.

[0059] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the electronic device 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has recently used or is repeatedly used. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.

[0060] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140, providing power to processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0061] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. 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 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 some other embodiments, the antennas can be used in conjunction with tuning switches.

[0062] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0063] 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. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0064] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via 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-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0065] The display screen 194 is used to display the display interface of an application, such as the display page of an application installed on the electronic device 100. 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 Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0066] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0067] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application program. The data storage area may store data generated during the use of electronic device 100 (e.g., captured images, recorded videos, 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.

[0068] 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. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external memory card.

[0069] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0070] The sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.

[0071] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194.

[0072] Touch sensor 180C, also known as a "touch panel," can be located on display screen 194. The touch sensor 180C and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180C detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In this embodiment, touch sensor 180C can also be used to detect clicks, swipes, and other operations on the display screen by a stylus connected to electronic device 100. Optionally, touch sensor 180C can transmit operations triggered by the user using a stylus to the application processor, which can determine whether the received operation is an annotation operation or a control operation. In other embodiments, touch sensor 180C may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0073] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button inputs and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, touch operations applied to different applications (such as taking photos, playing audio, etc.) can correspond to different vibration feedback effects. Touch vibration feedback effects can also be customized. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100.

[0074] Understandable Figure 3 The components shown do not constitute a specific limitation on the electronic device 100. The electronic device may also include more or fewer components than shown, or combine some components, or separate some components, or have different component arrangements. Furthermore, Figure 3 The combination / connection relationships between the components can also be adjusted and modified.

[0075] Figure 4 This is a software structure block diagram of an electronic device provided in an embodiment of this application. For example... Figure 4 As shown, the software architecture of an electronic device can be a layered architecture. For example, the software can be divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer (framework, FWK), the runtime and system libraries, and the kernel layer.

[0076] The application layer can include a series of application packages. For example... Figure 4 As shown, the application layer can include a camera, settings, skin modules, user interface (UI), stylus tools / drawing board, and third-party applications. These third-party applications can include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0077] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer can include some predefined functions. For example... Figure 4As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, stylus framework, input manager, etc.

[0078] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture screenshots. The content provider stores and retrieves data, making this data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0079] 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.

[0080] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).

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

[0082] 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.

[0083] The input manager can detect the type of action triggered by the user, causing the electronic device to perform the corresponding response. For example, the input manager might detect that the user triggered an annotation action using a stylus, or a control action triggered by a finger tap.

[0084] The input manager may also include a stylus frame, which provides electronic devices with the ability to support stylus input. When the input manager detects that a user-triggered action is an annotation, it can distribute the action to the stylus frame, which can then execute the corresponding response based on the received action.

[0085] The runtime includes the core libraries and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.

[0086] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core libraries of the operating system. The application layer and application framework layer run in the 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.

[0087] 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.

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

[0089] 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.

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

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

[0092] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, and a touchscreen driver. In this embodiment, the touchscreen driver can be a touchscreen driver that supports stylus input. The touchscreen driver can recognize stylus touch events, mark the touch events as stylus touch events, and then report the stylus touch events to the input manager.

[0093] The hardware layer can include various types of sensors, such as accelerometers, gyroscopes, and touch sensors.

[0094] The annotation page generation method provided in the embodiments of this application will be further described below. Figure 5 A flowchart illustrating a method for generating annotation pages provided in this application embodiment. This method can be performed by someone with... Figure 3 or Figure 4 The electronic device with the structure shown performs this operation. (Refer to...) Figure 5 The method includes the following steps:

[0095] S501: The electronic device displays the first interface.

[0096] The first interface may include a first page, which may be an application page or a system page.

[0097] S502: The electronic device responds to the first instruction and creates an annotation layer.

[0098] Optionally, the first instruction can be used to trigger the electronic device to receive and display user-input annotations. In some embodiments of this application, the first instruction can be used to trigger the electronic device to enable annotation mode, which is a mode in which the user can add annotations on the currently displayed first interface of the electronic device. In these embodiments, the annotations added by the user can be handwritten text, doodles, or other content added by the user on the currently displayed first interface, or text boxes, images, or other content added by the user on the page. The user can perform these operations using a stylus or finger, and this application does not limit this.

[0099] In some implementations, the user can trigger the first command using a stylus. For example, the user can press a button on the stylus to trigger the first command; or, the user can click or double-click a specific location on the stylus to trigger the first command; or, the user can use the stylus to slide or draw a preset shape on the display screen of the electronic device to trigger the first command.

[0100] In other embodiments, the user can also trigger the first instruction by clicking a function entry on the electronic device; for example, the function entry corresponding to the annotation mode can be a shortcut icon on the main interface or the negative one screen of the electronic device, and the user can click the shortcut icon to trigger the first instruction; another example is that the user can click the function entry corresponding to the annotation mode in the settings interface of the electronic device to trigger the first instruction. Of course, there are other ways to trigger the electronic device to enable the annotation mode, and the embodiments of this application do not limit this.

[0101] When the electronic device receives a first command triggered by the user while displaying the first interface, it creates an annotation layer. This annotation layer can be a system-level layer used to record user annotations, and it can be located above the first page. After the electronic device creates the annotation layer, the first interface displayed by the electronic device includes both the first page and the annotation layer.

[0102] Optionally, the first interface displayed on the screen of the electronic device may include multiple layers. These multiple layers are superimposed to achieve the effect of the first interface. For example, the first page in the first interface may be one layer, and the annotation layer may be another layer. The display effect seen by the user when observing the first interface is the superimposed display of the first page and the annotation layer. For instance, assuming the first page is an application page, after adding an annotation layer to the electronic device, the layers included in the first interface displayed by the electronic device can be as follows: Figure 6 As shown. Reference Figure 6 The bottom layer of the first interface can be the wallpaper layer, which displays the wallpaper of the electronic device. Above the wallpaper layer is the application page layer corresponding to the application currently running in the foreground of the electronic device. Above the application page layer is a system-level annotation layer, which can be a transparent layer. When this annotation layer is overlaid on the application page layer, it will not obscure the content displayed in the application page layer.

[0103] It should be noted that the annotation layer created by the electronic device in this application embodiment is a system-level layer. That is to say, the electronic device can enable annotation mode when displaying any page, and the annotation layer can be added on top of the layer where any page is located, so that users can add annotations on any page displayed by the electronic device.

[0104] S503: The electronic device receives the first operation triggered by the user and displays the annotation content in the annotation layer.

[0105] Optionally, the user can trigger a first operation on the first interface to add annotations. The electronic device then displays the user-added annotations on the annotation layer. Since the annotation layer is transparent, the user-added annotations can be opaque or semi-transparent, allowing them to be displayed on the first page. For example, Figure 7 This is a schematic diagram illustrating an electronic device displaying user-added annotations, as provided in an embodiment of this application. (Reference) Figure 7 After a user adds annotations to the first screen displayed on an electronic device, the effect the user sees is as follows: Figure 7 As shown in (a) in the image, Figure 7 The display effect shown in (a) is the result of overlaying the chat application page layer and the annotation layer, as shown in the image. Figure 7 (b) in the image represents a layer on the chat application page. Figure 7 (c) in the text represents the annotation layer.

[0106] In this embodiment, since the electronic device has created an annotation layer, when the electronic device receives an operation triggered by the user, it needs to determine the type of the operation. For example, if the user-triggered operation is an annotation operation, the electronic device needs to display the user-inputted annotation content on the annotation layer; if the user-triggered operation is a control operation, the electronic device needs to execute the corresponding response action. The control operation can be a swipe or zoom operation triggered by the user on the first interface, or an operation to switch from the first page to the second page, etc.

[0107] In one optional implementation, when the electronic device determines that the user-triggered operation is a control operation, the annotation layer of the electronic device can transmit the control operation to the first page, and the first page responds to the control operation by executing the corresponding response action. For example, if the user triggers a swipe operation, the annotation layer transmits the swipe operation to the first page, the first page moves, and the electronic device displays a second interface, which includes the moved first page. As another example, if the user clicks an icon on the first page to switch to the second page, the annotation layer transmits the user's click control operation to the first page, and the electronic device displays a third interface, which includes the second page.

[0108] Optionally, taking a user-triggered action as the target action as an example, the electronic device can determine the type of the user-triggered target action based on at least one of the following methods:

[0109] Method 1: Determine the type of target operation based on whether the user triggers the target operation by using a stylus or finger.

[0110] Optionally, the electronic device can detect whether the user triggers the target operation by using a stylus or a finger. When the electronic device determines that the target operation is triggered by the user using a stylus, the electronic device can determine that the type of the target operation is an annotation operation; when the electronic device determines that the target operation is triggered by the user using a finger, the electronic device can determine that the type of the target operation is a control operation.

[0111] Method 2: Determine the type of target operation based on the location where the user triggers the target operation.

[0112] Optionally, the electronic device can divide the annotation layer into different regions, for example... Figure 8 This is a schematic diagram of an annotation layer provided in an embodiment of this application. (Reference) Figure 8 The electronic device can divide the annotation layer into an input area and a control area. The control area includes the area corresponding to the position of the scroll bar control on the page currently displayed by the electronic device, while the input area includes the area corresponding to the scrollable page and the area corresponding to the non-scrollable page.

[0113] In some embodiments, after receiving a target operation triggered by a user using a stylus, the electronic device determines the location where the user triggered the target operation. When the location where the user triggered the target operation is within a control area, the electronic device can determine that the type of the target operation is a control operation. When the location where the user triggered the target operation is within an input area, the electronic device can determine that the type of the target operation is an annotation operation. In this implementation, the electronic device can identify the coordinates of the starting point of the stylus on the screen. When the starting point is within a control area, the type of the target operation is determined to be a control operation; when the starting point is within an input area, the type of the target operation is determined to be an annotation operation. Optionally, if the stylus passes through a control area on the screen where the starting point is not the starting point, it is not necessary to identify the type of the target operation again.

[0114] When determining the input and control areas of the annotation layer, the electronic device can divide the input and control areas according to the current page layout of the electronic device. For example, the area of ​​the annotation layer corresponding to the position of each control in the current page of the electronic device can be divided into the control area, and the remaining area can be divided into the input area.

[0115] In one optional implementation, the application page layout and display of the electronic device are handled by the layout management module of the application framework. The layout management module parses the application's layout elements and displays them on the screen according to display parameters. The electronic device can obtain the layout information of the first page through the layout management module, determine the positions of controls on the first page based on this layout information, determine the control area in the annotation layer based on the control positions on the first page, and use the remaining area as the input area.

[0116] In another alternative implementation, the electronic device can identify the location of controls on the first page using the AccessibilityService. In this implementation, the electronic device can call the AccessibilityService interface to iterate through all controls on the first page and determine their positions. Based on the control positions on the first page, the electronic device can determine the control area in the annotation layer and use the remaining area as the input area.

[0117] Method 3: Detect the trajectory of the target operation triggered by the user's stylus and determine the type of the target operation.

[0118] Optionally, when the electronic device divides the annotation layer into, as follows: Figure 8 When the control area and input area are shown, the user can also trigger the control page sliding operation in the area corresponding to the scrollable page. At this time, the electronic device can determine the type of target operation based on the trajectory of the target operation.

[0119] In one alternative implementation, Figure 9This is a schematic diagram of the trajectory of a target operation provided in an embodiment of this application. (Reference) Figure 9 When the electronic device determines that the starting point of the target operation is located in the corresponding area of ​​the scrollable page, the electronic device obtains the starting point time T1 when the user triggers the target operation with a stylus, the starting point coordinates (X1, Y1), and the ending point time T2 when the user pauses or lifts their hand with the stylus, and the ending point coordinates (X2, Y2). Based on the starting and ending points, the electronic device calculates the sliding speed and direction of the target operation, and calculates the target angle between the sliding direction and the scrollable direction of the current page. When the target angle is less than or equal to a preset angle threshold, and / or the sliding speed is greater than or equal to a preset speed threshold, the electronic device can determine that the target operation is a control operation; when the target angle is greater than the preset angle threshold or the sliding speed is less than the preset speed threshold, the electronic device can determine that the target operation is an annotation operation.

[0120] In this embodiment, the control operation may include operations for controlling the movement or scaling of the first page, and may also include operations for the user to control page switching. The electronic device performs different response actions on the first page and the annotation layer according to the different control operations received. The response actions performed by the electronic device after receiving different control operations are described below:

[0121] First, the electronic device receives a second operation triggered by the user. The second operation is a swipe operation triggered by the user on the first interface, which moves the first page and the annotation layer.

[0122] Optionally, if the first page is a long page or a large page, due to the limited display area of ​​the electronic device, only a portion of the long or large page content can be displayed on the first interface. In this case, the user can trigger a swipe or zoom operation on the first interface. For example, if the user swipes their finger upwards on the screen of the electronic device to trigger a second operation, the electronic device determines that the second operation triggered by the user is a control operation, moves the first page upwards, and then displays a second interface, which includes the moved first page.

[0123] It is understandable that the annotation content in the annotation layer corresponds to the content on the first page. After receiving the second operation, to maintain the relative position of the first page and the annotation layer, the electronic device can perform the same movement operation on both the first page and the annotation layer, ensuring that the annotation layer and the first page are aligned. In other words, when the electronic device displays the first interface, the first interface includes the first page and the first part of the annotation layer. After the user triggers the second operation, the electronic device moves the first page and the annotation layer and displays the second interface, which includes the moved first page and the moved annotation layer.

[0124] In one optional implementation, when the first page displayed by the electronic device is displaced, the electronic device performs the same movement operation as the second operation on the annotation layer based on the movement direction and distance of the first page. Optionally, when creating the annotation layer, the electronic device can create an annotation layer of the same size as the first interface, with the annotation layer on top of the first page. If, after performing the movement operation on the annotation layer, the annotation layer cannot completely cover the display area of ​​the electronic device, the electronic device can determine the movement distance of the annotation layer based on the second operation and expand the annotation layer according to this movement distance so that the annotation layer covers the display area. For example, Figure 10 This is a schematic diagram illustrating the first page and annotation layer after a user triggers a movement operation, as provided in an embodiment of this application. (Reference) Figure 10 In (a) of this example, assuming the first page currently displayed on the electronic device is an information application page, and the user swipes down on the application page, the page shifts downwards. (See reference...) Figure 10 In (b) of this example, the electronic device performs the same movement operation on the annotation layer based on the page's movement direction and distance. The electronic device can expand the annotation layer upwards based on the movement distance, such as... Figure 10 In (b), area A of the annotation layer can be the expanded portion of the annotation layer. In this case, the annotation layer in the second interface displayed on the electronic device can be... Figure 10 The area within the solid-line box in (b) of the text.

[0125] In another optional implementation, when creating the annotation layer, the electronic device can also obtain the size information of the first page and generate an annotation layer of the same size as the first page. This ensures that the annotation layer and the first page are the same size, and when the user triggers a movement operation on the first interface, the electronic device can directly move the first page and the annotation layer to ensure that the annotation content fits the page.

[0126] Second, the electronic device receives a second operation triggered by the user. The second operation is a zoom operation triggered by the user on the first interface. The electronic device zooms the first page and the annotation layer.

[0127] Optionally, some pages displayed on the electronic device can be scaled, such as a map page. Users can scale the map page to change its display ratio and size. When the electronic device receives a second operation to control the scaling of the first page, it can execute the corresponding response action of the second operation on the first page and the annotation layer to make the first page and the annotation layer scaled the same. At this time, the electronic device displays a second interface, which includes the scaled first page and the scaled annotation layer.

[0128] In one optional implementation, when creating an annotation layer, the electronic device can create an annotation layer with the same size as the first interface, with the annotation layer on top of the first page. When the electronic device shrinks the annotation layer, if the shrunk annotation layer cannot completely cover the display area of ​​the electronic device, the electronic device can determine the scaling ratio of the annotation layer according to a second operation, and expand the annotation layer according to the scaling ratio so that the annotation layer can cover the display area. For example, Figure 11 This is a schematic diagram illustrating the first page and annotation layer after a user triggers a zoom operation, as provided in an embodiment of this application. It is assumed that the first page currently displayed on the electronic device is an image page. (See reference...) Figure 11 In (a), the user triggers a zoom-out operation on the first screen, and the electronic device zooms out the first page. (See reference) Figure 11 In (b) of the diagram, when the electronic device shrinks the annotation layer, it expands the annotation layer according to the scaling ratio and the size information of the first interface, as shown by the diagonal line in the figure, which represents the expanded area of ​​the annotation layer. At this time, the annotation layer in the second interface displayed on the electronic device can be... Figure 11 The area within the solid-line box in (b) of the text.

[0129] In another alternative implementation, when creating the annotation layer, the electronic device can obtain the size information of the first page and create an annotation layer of the same size as the first page. When the user triggers a zoom operation on the first interface, the electronic device can directly zoom the first page and the annotation layer to ensure that the annotation layer fits the currently displayed page.

[0130] Third, the electronic device receives a third operation triggered by the user. The third operation is used to switch the first page to the second page. The electronic device moves the annotation layer by a preset length in a preset direction so that the second part of the moved annotation layer fits with the second page. The electronic device displays a third interface, which includes the second page and the second part of the annotation layer.

[0131] Optionally, the first page of the first interface displayed by the electronic device may include a page jump entry corresponding to the second page. After the user clicks on the page jump entry, the electronic device displays a third interface including the second page on the screen.

[0132] In one optional implementation, when the electronic device switches from displaying a first page to a second page, the electronic device can move the annotation layer by a preset length in a preset direction, so that the second part of the moved annotation layer fits snugly against the switched second page. The preset length can be the length or width of the currently displayed page. In other words, after the electronic device switches the displayed page, it can move the annotation layer until a new area of ​​the annotation layer is displayed on the screen. This new area is the second part of the annotation layer, and the user's annotations for the second page are displayed in this new area.

[0133] Optionally, after moving the annotation layer, the electronic device can obtain the length or width of the second page and expand the annotation layer in a preset direction according to the length or width of the second page until the annotation layer covers the display area. The expanded portion of the annotation layer is called the second part of the annotation layer. This can be understood as the electronic device adding a second part of the annotation layer in a preset direction, the same size as the switched second page, and displaying a third interface. The third interface includes the second page and the second part of the annotation layer, thus making the second part of the annotation layer fit snugly with the switched second page.

[0134] For example, Figure 12 This is a schematic diagram illustrating the page and annotation layer after a user triggers a page switching operation, as provided in an embodiment of this application. (Reference) Figure 12 In (a), the user triggers a third operation to switch pages, and the page displayed on the electronic device changes from page A to page B. (See reference) Figure 12 In (b), the electronic device adds an area B at the bottom of the annotation layer, the same size as the switched page B, and moves the annotation layer so that area B fits the page B. Area B of the annotation layer is the second part of the annotation layer, used to display the annotations added by the user on page B.

[0135] S504: The electronic device responds to the second instruction and acquires the target image.

[0136] Optionally, the second instruction can be used to trigger the electronic device to stop receiving user-inputted annotations. In some embodiments of this application, the second instruction can be used to trigger the electronic device to end the annotation mode.

[0137] In some implementations, the user can trigger a second command using a stylus. For example, the user can press a button on the stylus to trigger a second command; or the user can click or double-click a specific location on the stylus to trigger a second command; or the user can use the stylus to slide or draw a preset shape on the display screen of the electronic device to trigger a second command.

[0138] In other embodiments, the user can also trigger the second instruction by clicking a function entry on the electronic device; for example, the function entry corresponding to the annotation mode can be a shortcut icon on the main interface or the negative one screen of the electronic device, and the user can click the shortcut icon to trigger the second instruction; as another example, the user can click the function entry corresponding to the annotation mode in the settings interface of the electronic device to trigger the second instruction. Of course, there are other ways to trigger the electronic device to end the annotation mode, and the embodiments of this application do not limit this.

[0139] Upon detecting the second instruction, the electronic device acquires the target image. The target image may include an image generated from the first page. Optionally, if the electronic device does not switch pages while in annotation mode, that is, if the electronic device displays the first page while in annotation mode, then the target image is a cropped image of the first page. The first page can be a long page, a scalable page, or a draggable page displayed by the electronic device in annotation mode. If the electronic device receives a second operation triggered by the user to switch pages while in annotation mode and switches the displayed page, then the target image may include both an image generated from the first page and an image generated from the second page. For example, the target image may include both an image cropped from the first page and an image cropped from the second page.

[0140] S505: The electronic device performs composite processing on the target image and the annotation layer to obtain the annotation page.

[0141] After acquiring the target image, the electronic device merges the target image and the annotation layer to obtain the annotation page. Optionally, if the electronic device receives a second operation triggered by the user to switch pages during the annotation mode, and switches the displayed page, then when merging the target image and the annotation layer, the electronic device can stitch together the image generated from the first page and the image generated from the second page according to the page display order, and then synthesize the stitched image and the annotation layer to obtain the annotation page. Since in this embodiment, when the electronic device adds annotation content according to the user's annotation operation, the annotation layer maintains the same displacement as the page displayed by the electronic device, the relative positional relationship between the annotation layer and the page displayed by the electronic device remains unchanged. Therefore, after merging the target image and the annotation layer, the resulting annotation page can completely retain the user's annotation content and the position of the annotation content relative to the display page of the electronic device, improving the user experience.

[0142] For example, when the electronic device is in annotation mode, the first page of the first interface displayed by the electronic device is... Figure 10 The image (a) shows a long, scrollable page. The user adds annotations to the first screen. When the user triggers a second command, the electronic device captures the content of the first page to obtain a target image, and merges the target image and the annotation layer to obtain an annotation page that includes the user's annotations and the content displayed on the long page. At this point, the annotation page can be scrolled as shown in image (a). Figure 13 As shown.

[0143] For example, when an electronic device is in annotation mode, the first page of the first interface displayed by the electronic device is... Figure 12Page A is shown in (a) above, and annotations are added to page A. After the user clicks to switch pages, the electronic device displays a second interface, which includes... Figure 12 Page B is shown in (a) above. When the user triggers the second command, the electronic device acquires multiple pages (page A and page B) displayed in the annotation mode, extracts the page content of page A and page B, and splices the extracted page content of page A and page B in the order of page display. Then, it merges the spliced ​​image and annotation layer to obtain an annotation page that includes the page content of multiple pages and the user's annotation content. At this time, the annotation page can be displayed as follows: Figure 14 As shown.

[0144] It should be noted that the annotation page obtained in this embodiment may be different from the first page in the first interface displayed on the electronic device; the annotation page may be an image. In other words, after obtaining the annotation page, the user can view the page content and annotations, but the annotation page is not used for user interaction.

[0145] In one optional implementation, after the user triggers a third operation to switch the first page to the second page, the electronic device can also create a new annotation layer on the switched second page. This new annotation layer is used to display the annotations added by the user to the second page. Upon receiving a second instruction, the electronic device can acquire the target image generated from the first page and the corresponding annotation layer for the first page, as well as the target image generated from the second page and the corresponding annotation layer for the second page. The electronic device can perform a composite processing on the target image and the annotation layer. Optionally, the electronic device can stitch the target image and the annotation layer separately to obtain a single annotation page, or it can perform a composite processing on the target image and its corresponding annotation layer separately to obtain two annotation pages.

[0146] In some embodiments, if compositing the target image and annotation layer takes time, the process of simulating the generation of the annotation page can be displayed on the screen of the electronic device during the compositing process. For example, when the first page is a long page, after receiving the second instruction, the electronic device can simulate scrolling the first page vertically to capture its content, while the annotation layer and the first page maintain the same movement operation, showing the user the screen showing the first page being saved with added annotations. As another example, when the first page is a scalable or draggable page, after receiving the second instruction, the electronic device can expand the first page according to the maximum zoom and drag distances and capture its content, and perform the same expansion operation on the annotation layer, showing the user the screen showing the complete content of the first page being saved and the corresponding annotation content.

[0147] Based on the same inventive concept, the various steps in the annotation page generation method provided in this application can be executed by different functional modules of the electronic device. The following describes the various functional modules included in the electronic device and the function of each functional module:

[0148] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. (Reference) Figure 15 The electronic device includes a handwriting recognition module 1501, an input distribution module 1502, a sliding control module 1503, a stylus annotation module 1504, and an annotation synthesis module 1505.

[0149] The handwriting recognition module 1501 can be used to detect and recognize the type of target operation triggered by the user, and to identify whether the user's target operation is an annotation operation or a control operation.

[0150] The input distribution module 1502 is used to distribute the target operation recognized by the handwriting recognition module 1501 to different modules, so that the electronic device can perform response actions corresponding to different types of target operations. Specifically, the input distribution module 1502 can distribute annotation operations to the stylus annotation module 1504 and control operations to the slide control module 1503.

[0151] The sliding control module 1503 is used to detect the displacement of the first page displayed by the electronic device in response to the user's control operation, and to perform the same movement operation on the annotation layer.

[0152] The stylus annotation module 1504 is used to generate annotations based on the annotation operations triggered by the user using the stylus.

[0153] The annotation compositing module 1505 is used to acquire the target image and perform compositing processing on the target image and the annotation layer to obtain the annotation page, which is used to save the complete page content and the user-added annotation content, while ensuring that the page content and the annotation content are aligned.

[0154] The following is an example. Figure 15 The annotation page generation method performed by the electronic device shown will be further described. Figure 16 This is a flowchart illustrating a method for generating an annotation page according to an embodiment of this application. In this method, after a stylus is connected to an electronic device, the user can trigger a first command, and the electronic device will activate annotation mode. At this time, the electronic device creates an annotation layer. This annotation layer can be a system-level transparent layer that can be overlaid on the first page of the currently displayed first interface on the electronic device without obscuring the content of the first page. Optionally, the annotation layer may also include a stylus toolbar to allow the user to adjust the input pen type, color, thickness, etc. using the stylus toolbar. (Reference) Figure 16After the electronic device is in annotation mode, the annotation page generation method provided in this application embodiment may include the following steps:

[0155] S1601: The handwriting recognition module detects the type of the target operation triggered by the user and determines that the type of the target operation is an annotation operation.

[0156] S1602: The handwriting recognition module sends the target operation and the type of the target operation (annotation operation) to the input distribution module.

[0157] S1603: The input distribution module distributes annotation operations to the stylus annotation module.

[0158] S1604: The handwriting annotation module generates annotation content on the annotation layer based on the annotation operation triggered by the user.

[0159] S1605: The handwriting recognition module detects the type of the target operation triggered by the user and determines that the type of the target operation is a control operation.

[0160] S1606: The handwriting recognition module sends the target operation and the type of the target operation (control operation) to the input distribution module.

[0161] S1607: The input distribution module distributes control operations to the sliding control module.

[0162] S1608: The sliding control module detects the page displacement corresponding to the control operation triggered by the user, and performs the same movement operation on the annotation layer as the page displacement.

[0163] S1609: In response to the second instruction, the annotation compositing module captures the page content of the electronic device display page in annotation mode, obtains the target image, and performs compositing processing on the target image and the annotation layer to obtain the annotation page.

[0164] Based on the above embodiments, this application also provides an electronic device, which includes multiple functional modules; the multiple functional modules interact to implement the methods described in the embodiments of this application. For example, when executed... Figure 5 The annotation page generation method in the illustrated embodiment, or execution Figure 16 The annotation page generation method in the illustrated embodiment. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0165] Based on the above embodiments, this application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the methods described in the embodiments of this application. For example, when executing... Figure 5 The annotation page generation method in the illustrated embodiment.

[0166] Based on the above embodiments, this application also provides a computer program that, when run on a computer, causes the computer to execute the methods described in the embodiments of this application.

[0167] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the embodiments of this application.

[0168] Based on the above embodiments, this application also provides a chip for reading computer programs stored in a memory to implement the methods described in the embodiments of this application.

[0169] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the embodiments of this application. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete devices.

[0170] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0171] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0172] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0173] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0174] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for generating annotation pages, applied to electronic devices, characterized in that, The method includes: Display a first interface, which includes a first page; In response to a first instruction, the size information of the first page is obtained, and a system-level annotation layer with the same size as the first page is created based on the size information of the first page. The annotation layer is located on top of the first page. Receive a first operation triggered by the user, the first operation being the user adding annotation content on the first interface, and display the annotation content in the annotation layer; Receive a third operation triggered by the user, the third operation being used to switch the first page to the second page; Obtain the length or width of the second page, and expand the annotation layer according to a preset direction so that the second part of the expanded annotation layer fits the second page; wherein, the preset direction is the switching direction when the first page is switched to the second page, and the second part is the newly added area after the annotation layer is expanded; A third interface is displayed, which includes the second page and a second part of the annotation layer; In response to the second instruction, a target image is obtained, the target image including an image generated based on the first page and an image generated based on the second page; The images generated from the first page and the images generated from the second page are stitched together in the order they are displayed on the page. The stitched image is then combined with the enlarged annotation layer to obtain the annotation page.

2. The method as described in claim 1, characterized in that, Before acquiring the target image in response to the second instruction, the method further includes: Receive a second operation triggered by the user, wherein the second operation is a swipe operation or a zoom operation triggered by the user on the first interface; Move or scale the first page and the annotation layer; Display a second interface, which may include the moved first page and the moved annotation layer, or the second interface may include the scaled first page and the scaled annotation layer.

3. The method as described in claim 1 or 2, characterized in that, After receiving the first user-triggered operation, the method further includes: The type of the first operation is determined to be an annotation operation according to at least one of the following methods: The system detects that the user triggered the first operation by using a stylus, and determines that the type of the first operation is an annotation operation. The annotation layer is divided into an input area and a control area. The location where the user triggers the first operation is detected. If the location where the user triggers the first operation is in the input area, the type of the first operation is determined to be an annotation operation. The trajectory of the first operation is detected, and the sliding speed and sliding direction of the first operation are calculated based on the trajectory of the first operation. The target angle between the sliding direction and the scrollable direction of the currently displayed page is determined. If the sliding speed is less than a preset speed threshold, or the target angle is greater than a preset angle threshold, then the type of the first operation is determined to be an annotation operation.

4. The method as described in claim 2, characterized in that, After receiving the second operation triggered by the user, the method further includes: The type of the second operation is determined to be a control operation according to at least one of the following methods: The system detects that the user triggered the second operation via finger touch, and determines that the type of the second operation is a control operation; or The annotation layer is divided into an input area and a control area. The location where the user triggers the second operation is detected. If the location where the user triggers the second operation is located in the control area, the type of the second operation is determined to be a control operation. The trajectory of the second operation is detected, and the sliding speed and sliding direction of the second operation are calculated based on the trajectory of the second operation. The target angle between the sliding direction and the scrollable direction of the currently displayed page is determined. If the sliding speed is greater than or equal to a preset speed threshold, and / or the target angle is less than or equal to a preset angle threshold, then the type of the second operation is determined to be a control operation.

5. An electronic device, characterized in that, It includes at least one processor coupled to at least one memory, the at least one processor being configured to read a computer program stored in the at least one memory to perform the method as described in any one of claims 1-4.

6. An electronic device, characterized in that, It includes multiple functional modules; the multiple functional modules interact with each other to implement the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Annotation adding method and electronic device

    CN110196675A