Method and system for implementing stylus-down-activated annotation service

By constructing a transparent annotation layer upon startup and recognizing the first stroke event, the annotation interface is activated and strokes are drawn in real time, solving the problem of the annotation function not starting immediately. This enables timely and complete display of the first stroke in any interface, improving user experience and operational smoothness.

WO2026237280A1PCT designated stage Publication Date: 2026-11-19GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/131981
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-16
Filing Date
2025-11-01
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

In existing technologies, annotation functions can only be activated in specific applications or after startup, and cannot be activated instantly in any interface. Furthermore, writing delays or missed strokes are prone to occur, which cannot meet the needs of teaching and emergency meeting scenarios with high real-time requirements.

Method used

By constructing a transparent annotation layer in response to the power-on signal, acquiring and recognizing the first pen stroke event, activating the annotation interface and generating the first handwriting, and using path functions to draw the handwriting in real time, the system ensures that it responds instantly to user pen stroke events on any interface.

Benefits of technology

It enables instant response to the user's first pen stroke event in any interface, ensuring the timely, complete, and accurate display of the first stroke, thus improving the user experience and the smoothness of annotation operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025131981_19112026_PF_FP_ABST
    Figure CN2025131981_19112026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical fields of electronic device input methods and user interface optimization, and provides a method and system for implementing a stylus-down-activated annotation service. The method comprises: in response to a power-on signal, constructing a transparent annotation layer; acquiring a first stylus-down event on the basis of the transparent annotation layer; in response to the first stylus-down event, activating an annotation interface on the basis of the first stylus-down event, and generating on the annotation interface a first drawn stroke corresponding to the first stylus-down event; and in response to a real-time stylus-down event, drawing a stroke on the annotation interface in real time. The method and system for implementing the stylus-down-activated annotation service provided by the present invention enable a timely response to a first stylus-down event and drawing of a stroke on any interface, ensuring timely, complete and accurate display of a first stroke, thereby avoiding the problem that writing delays or missed strokes are prone to occurrence when an annotation function cannot be activated in time on any interface because the annotation function takes effect only within a specific application or only after launching same.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for implementing pen-based annotation services Technical Field

[0001] This invention relates to the field of electronic device input methods and user interface optimization technology, and in particular to a method and system for implementing pen-based annotation services. Background Technology

[0002] In interactive teaching and conferencing systems, real-time annotation has become a core tool for digital collaboration, with wide applications. For example, in classroom teaching, teachers can directly annotate key points in PPT presentations, e-textbooks, or experimental simulations, using different colored pen marks to distinguish knowledge levels. In corporate meetings, participants can annotate design drawings and data reports in real time, using laser pointers for remote emphasis. In remote collaboration scenarios, teams in different locations can write synchronously on shared screens, with some systems supporting the automatic conversion of annotations into structured notes. This cross-interface writing capability can theoretically improve information transmission efficiency by more than 40%, especially in scenarios requiring continuous writing, such as formula derivation and drawing modification, where the value of preserving the entire thought process is particularly prominent.

[0003] However, existing technical solutions still have the following shortcomings: Function triggering is application-bound, requiring users to activate annotations within preset applications such as Word and PDF readers; it cannot be directly invoked on the system desktop, browser, or third-party software interface, leading to frequent window switching during teaching demonstrations. The response mechanism suffers from system-level latency; traditional solutions capture input events at the software layer and then map them to the drawing engine, resulting in significant delays in the first stroke. Laboratory tests show a high rate of lost starting points during rapid writing, making it difficult to guarantee the integrity and accuracy of the first stroke. Cross-platform compatibility is significantly lacking; the offset of handwriting coordinates between Windows / Android / iOS devices can reach 5% to 10% of the screen resolution, and the distortion rate of pressure-sensing data exceeds 25% during cross-system transmission. These technical bottlenecks directly restrict the practical effectiveness of smart education equipment and hybrid office solutions.

[0004] In existing technologies, annotation functions often only take effect in specific applications or after startup, failing to be able to be activated instantly in any interface and guarantee the integrity of the first stroke, easily leading to writing delays or missed strokes. In scenarios with extremely high real-time requirements, such as teaching scenarios (e.g., mathematical formula derivation) and urgent meeting decisions (e.g., real-time revision of paper), existing annotation systems cannot meet the core requirement of "what you see is what you write." Therefore, to meet the needs of real-time annotation and high responsiveness in practical use cases, it is urgent to design an annotation mechanism that can instantly respond to the contact of a stylus pen and immediately start annotation in any interface of the system, while ensuring the accurate display of the first stroke. Summary of the Invention

[0005] This invention aims to provide a method and system for implementing pen-based annotation services, in order to solve the problems in the prior art where annotation functions can only be activated in specific applications or after startup, thus failing to be able to be activated instantly on any interface and ensure the integrity of the first stroke, as well as the technical problems of writing delays or missing strokes. The invention enables the device system to respond instantly to the contact of the "stylus" and immediately start annotation on any interface, while ensuring the accurate and complete display of the first stroke.

[0006] To address the aforementioned technical problems, this invention provides a method for implementing a pen-based annotation service, comprising the following steps:

[0007] In response to the power-on signal, a transparent annotation layer is created;

[0008] Get the first stroke event based on the transparent annotation layer;

[0009] In response to the first stroke event, the annotation interface is activated based on the first stroke event, and the first drawing stroke corresponding to the first stroke event is generated on the annotation interface.

[0010] Responding to real-time pen stroke events, draw real-time pen strokes on the annotation interface.

[0011] The pen-touch annotation service provided by this invention first constructs a transparent annotation layer in response to the power-on signal, so as to respond to the user's first pen touch event in a timely manner on any interface. This enables timely response to the first pen touch event and pen drawing, ensuring the timely, complete and accurate display of the first pen stroke. Furthermore, the annotation interface is activated based on the first pen touch event to immediately start the annotation service. This avoids the problems that annotation functions can only be effective in specific applications or after startup, and cannot be started in a timely manner on any interface, which can easily lead to writing delays or missed strokes.

[0012] Furthermore, in response to the power-on signal, a transparent annotation layer is constructed, including: in response to the power-on signal, initializing the annotation service to obtain the configuration file; and when the configuration file determines that the annotation service is supported, constructing the transparent annotation layer.

[0013] The above solution responds to the power-on signal and initializes the annotation service directly during startup. This creates a globally transparent annotation layer on the top layer, which is invisible but can receive input events. This allows for timely response to user pen touch events on any interface, avoiding the problems that annotation functions can only be activated in specific applications or after startup, and that cannot be activated in any interface in a timely manner, which can easily lead to writing delays or missed strokes. At the same time, it does not affect the user's normal operation of other applications.

[0014] Furthermore, the process of obtaining the first pen stroke event based on the transparent annotation layer includes: obtaining the touch event based on the transparent annotation layer; identifying the touch input type based on the touch event; and when the identified touch input type matches the preset touch type, using the touch event as the first pen stroke event.

[0015] The above solution uses a transparent annotation layer to acquire and analyze touch events to obtain the required initial pen stroke event, laying the basis for subsequent annotation processing and preventing accidental activation of the annotation interface, thus improving the user experience.

[0016] Furthermore, based on touch events, the touch input type is identified. When the identified touch input type matches the preset touch type, the touch event is used as the first pen stroke event, including: identifying the touch input type based on the touch event; when the identified touch input type matches the preset touch type, determining whether the touch event is a starting action; when the touch event is a starting action, obtaining a copy of the starting event and the starting handwriting data based on the touch event; and using the copy of the starting event and the starting handwriting data as the first pen stroke event.

[0017] The above scheme obtains a copy of the starting event and the starting handwriting data by recognizing and judging the starting action, so as to obtain complete data related to the first handwriting, prepare data for the complete and accurate drawing of the first annotation, and ensure the complete and timely display of the first annotation.

[0018] Furthermore, in response to the first stroke event, the annotation interface is activated based on the first stroke event, and the first drawn stroke corresponding to the first stroke event is generated on the annotation interface, including: in response to the first stroke event, activating the annotation interface; generating the first drawn stroke corresponding to the first stroke event on the annotation interface based on the first stroke event and a preset path function, the process of generating the first drawn stroke satisfies the following formula: P n =f(x) n y n p n s n )

[0019] In the formula: P n This represents the path data for the nth point, x. n y n p represents the coordinates of the nth point. n Let s represent the pressure at the nth point. n The value represents the pen width at the nth point, and f() represents the curve generated by the path function.

[0020] The above solution uses path functions to draw annotation strokes in real time, achieving smooth stroke display and rendering, and improving the user experience when making annotations.

[0021] Furthermore, in response to real-time pen touch events, real-time pen strokes are drawn on the annotation interface, including: setting a global flag to enter the annotation processing mode based on the global flag and the annotation interface; obtaining real-time pen touch events based on the annotation processing mode; and drawing real-time pen strokes on the annotation interface in response to real-time pen touch events.

[0022] In the above solution, after responding promptly to the first pen stroke event, a global flag is set through the activated annotation interface to enter the annotation processing mode, which enables the operation of entering the annotation service through any interface, thus meeting the needs of real-time annotation and high responsiveness in actual use scenarios.

[0023] The pen-based annotation service provided by this invention initializes the annotation service via a power-on signal, creates a globally transparent annotation layer, and receives input events to ensure instant pen touch response on any interface, avoiding delays or missed strokes. Simultaneously, the transparent annotation layer analyzes touch events, identifies the first pen touch event to prevent accidental activation, and provides a basis for annotation processing. Furthermore, it acquires handwriting data through initial action recognition, prepares the first complete data entry, ensures the timeliness and accuracy of annotation display, and uses a preset path function to draw the handwriting in real time, achieving a smooth rendering effect and enhancing the overall quality of the annotation. This design improves the smoothness of annotation operations and user satisfaction. Finally, it activates the annotation interface upon the first stroke, setting a global flag to enter annotation mode, meeting the needs for instant annotation and high responsiveness. It enables timely response to the user's first stroke event on any interface, ensuring timely, complete, and accurate display of the first stroke. Furthermore, it activates the annotation interface based on the first stroke event to immediately start the annotation service, avoiding the problems of annotation functions only being effective in specific applications or after startup, failing to start promptly on any interface, and easily experiencing writing delays or missed strokes.

[0024] This invention also provides a system for implementing a pen-based annotation service, which implements the above-mentioned method for implementing a pen-based annotation service, including a layer construction module, an event acquisition module, a first-stroke drawing module, and a real-time annotation module, wherein:

[0025] The layer building module is used to create transparent annotation layers in response to the power-on signal;

[0026] The event acquisition module is used to acquire the first stroke event based on the transparent annotation layer;

[0027] The first stroke drawing module is used to respond to the first stroke event, activate the annotation interface based on the first stroke event, and generate the first drawing stroke corresponding to the first stroke event on the annotation interface.

[0028] The real-time annotation module is used to respond to real-time pen stroke events and draw real-time pen strokes on the annotation interface.

[0029] The pen-writing annotation service system provided by this invention first constructs a transparent annotation layer in response to the power-on signal through a layer construction module. Then, based on the event acquisition module, it promptly responds to the user's first pen stroke event on any interface. Subsequently, based on the first stroke drawing module, it realizes timely response and pen stroke drawing for the first pen stroke event, ensuring the timely, complete, and accurate display of the first pen stroke. Furthermore, it activates the annotation interface based on the first pen stroke event to immediately start the annotation service, avoiding the problems that annotation functions can only be effective in specific applications or after startup, cannot be started in any interface in a timely manner, and are prone to writing delays or missed strokes.

[0030] Furthermore, the layer construction module includes a configuration submodule and a layer construction submodule, wherein: the configuration submodule is used to initialize the annotation service in response to the power-on signal to obtain the configuration file; the layer construction submodule is used to construct a transparent annotation layer when the configuration file determines that the annotation service is supported.

[0031] The above solution configures the submodule to respond to the power-on signal and directly initializes the annotation service during startup. This allows the layer construction submodule to create a globally transparent annotation layer on the top layer through the annotation service. This layer is invisible but can receive input events, enabling timely response to user pen touch events on any interface. This avoids the problem that annotation functions can only be effective in specific applications or after startup, and that they cannot be activated in any interface in a timely manner, which can easily lead to writing delays or missed strokes. At the same time, it does not affect the user's normal operation of other applications.

[0032] Furthermore, the event acquisition module includes a listening submodule and a judgment submodule, wherein: the listening submodule is used to acquire touch events based on the transparent annotation layer; the judgment submodule is used to identify the touch input type based on the touch event, and when the identified touch input type matches the preset touch type, the touch event is taken as the first pen stroke event.

[0033] In the above solution, the acquisition submodule obtains and analyzes touch events based on the transparent annotation layer, and then the judgment submodule determines the first pen touch event required to lay the basis for subsequent annotation processing, so as to prevent accidental activation of the annotation interface and improve the user experience.

[0034] Furthermore, the first stroke drawing module includes an activation submodule and a drawing submodule, wherein: the activation submodule is used to activate the annotation interface in response to the first stroke event; the drawing submodule is used to generate the first drawing stroke corresponding to the first stroke event on the annotation interface based on the first stroke event and a preset path function, and the process of generating the first drawing stroke satisfies the following formula: P n =f(x) n y n p n s n )

[0035] In the formula: P n This represents the path data for the nth point, x. n y n p represents the coordinates of the nth point. n Let s represent the pressure at the nth point. n The value represents the pen width at the nth point, and f() represents the curve generated by the path function.

[0036] The pen-touch annotation service system provided by this invention initializes the annotation service in response to the power-on signal through a layer construction module, creating a globally transparent annotation layer to receive input events and ensure instant pen touch response on any interface, avoiding delays or missed strokes. Simultaneously, an event acquisition module analyzes touch events based on the transparent annotation layer, identifying the first pen touch event to prevent accidental activation and providing a basis for annotation processing. Furthermore, a first-stroke drawing module identifies the initial action and acquires handwriting data, preparing the first complete stroke to ensure the timeliness and accuracy of annotation display. A preset path function is used to draw the handwriting in real time, achieving silk-like clarity. The smooth rendering effect enhances the fluency of annotation operations and user satisfaction. Finally, the real-time annotation module activates the annotation interface after responding to the first stroke, sets a global flag to enter annotation mode, and meets the requirements of instant annotation and high responsiveness. It enables timely response to the user's first stroke event on any interface, ensuring timely response and handwriting drawing for the first stroke event. It ensures the timely, complete, and accurate display of the first stroke and activates the annotation interface based on the first stroke event to immediately start the annotation service. This avoids the problem that the annotation function can only be effective in specific applications or after startup, and cannot be started in any interface in a timely manner, which may easily lead to writing delays or missed strokes. Attached Figure Description

[0037] Figure 1 is a schematic diagram of a pen-writing annotation service implementation method according to an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of the application process of a pen-writing annotation service provided by an embodiment of the present invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] Example 1:

[0041] This embodiment provides a method for implementing a pen-based annotation service, including the following steps:

[0042] S1. In response to the power-on signal, construct a transparent annotation layer;

[0043] S2. Obtain the first stroke event based on the transparent annotation layer;

[0044] S3. In response to the first stroke event, activate the annotation interface based on the first stroke event and generate the first drawing stroke corresponding to the first stroke event on the annotation interface.

[0045] S4. Responds to real-time pen stroke events and draws real-time pen strokes on the annotation interface.

[0046] The pen-writing annotation service provided in this embodiment first constructs a transparent annotation layer in response to the power-on signal, so as to respond to the user's first pen stroke event in a timely manner on any interface. This enables timely response to the first pen stroke event and pen drawing, ensuring the timely, complete and accurate display of the first pen stroke. The annotation interface is activated according to the first pen stroke event to start the annotation service immediately, avoiding the problems that the annotation function can only be effective in specific applications or after startup, and cannot be started in a timely manner on any interface, and are prone to writing delays or missing strokes.

[0047] Optionally, step S1 includes: in response to a power-on signal, performing annotation service initialization to obtain a configuration file; when the configuration file determines that it supports the annotation service, constructing a transparent annotation layer.

[0048] Optionally, this transparent annotation layer is located at the top of the device system being used and is built globally, remaining active throughout the device system interface.

[0049] In practice, during system startup, the operating system responds to the boot signal, initializes the annotation service module, and reads the configuration file during system initialization to determine if the current device supports annotation functionality. If annotation functionality is supported, the annotation service creates a globally transparent annotation layer (Overlay Layer) at the top layer of the system user interface (UI stack). This layer is invisible but can receive input events. Specifically, it calls system APIs such as Android's SurfaceFlinger or WindowManager to create a transparent layer (Surface) and sets its properties to FLAG_NOT_TOUCH_MODAL, FLAG_LAY OUT_IN_SCREEN, and FLAG_NOT_FOCUSABLE. During use, this transparent layer remains active in the system interface and does not affect the user's normal operation of other applications.

[0050] This embodiment responds to the power-on signal and directly initializes the annotation service during startup. This creates a globally transparent annotation layer on the top layer, which is invisible but can receive input events. This enables timely response to the user's pen touch events on any interface, avoiding the problems that annotation functions can only be effective in specific applications or after startup, and that cannot be activated in any interface in a timely manner, which can easily lead to writing delays or missed strokes. At the same time, it does not affect the user's normal operation of other applications.

[0051] Optionally, step S2 includes: obtaining touch events based on the transparent annotation layer; identifying touch input types based on touch events; and when the identified touch input type matches the preset touch type, using the touch event as the first pen stroke event.

[0052] In the specific implementation, touch events are acquired by registering a stylus touch event listener. After the annotation service is initialized, the system registers a dedicated touch listener with the input event framework to detect whether the touch event is of the "stylus" type. This includes the following steps: The system calls InputManager.registerInputListener() and sets the listener parameters to only recognize touch events of the TOOL_TYPE_STYLUS type; the received event is type-determined by reading MotionEvent.getToolType(index) to determine whether it is the preset touch type (TOOL_TYPE_STYLUS); the stylus touch event is sent to the annotation service as a special event (i.e., as the first stylus touch event), overriding the system's default input event distribution process.

[0053] This embodiment uses a transparent annotation layer to acquire and analyze touch events to obtain the required initial pen stroke event, laying the basis for subsequent annotation processing and preventing accidental activation of the annotation interface, thus improving the user experience.

[0054] Optionally, the touch input type is identified based on the touch event. When the identified touch input type matches the preset touch type, the touch event is used as the first pen stroke event, including: identifying the touch input type based on the touch event; when the identified touch input type matches the preset touch type, determining whether the touch event is the starting action; when the touch event is the starting action, obtaining a copy of the starting event and the starting handwriting data based on the touch event; and using the copy of the starting event and the starting handwriting data as the first pen stroke event.

[0055] In the specific implementation process, after the first pen stroke event is detected, event redirection and data forwarding steps are required. That is, after the system framework detects the pen stroke event, it modifies the event distribution path and delivers the event directly to the annotation service: if the event is ACTION_DOWN (starting action), it calls InputDispatcher.injectInputEvent() to send a copy of the starting event to the annotation service; at the same time, it transmits the starting handwriting data such as the event coordinate point (x,y), pressure, and touch width; non-pen events are normally distributed to other applications.

[0056] This embodiment obtains a copy of the starting event and the starting handwriting data by recognizing and judging the starting action, so as to obtain complete data related to the first handwriting, prepare the data for the complete and accurate drawing of the first annotation, and ensure the complete and timely display of the first annotation.

[0057] Optionally, step S3 includes: activating the annotation interface in response to the first stroke event; generating the first drawn stroke corresponding to the first stroke event on the annotation interface based on the first stroke event and a preset path function, wherein the process of generating the first drawn stroke satisfies the following formula: P n =f(x) n y n p n s n )

[0058] In the formula: P n This represents the path data for the nth point, x. n y n p represents the coordinates of the nth point. n Let s represent the pressure at the nth point. n The value represents the pen width at the nth point, and f() represents the curve generated by the path function.

[0059] In the specific implementation process, upon receiving a pen stroke event, the annotation service immediately activates the annotation UI interface and passes the event parameters to the corresponding drawing module for real-time drawing. Activating the annotation interface includes launching the annotation toolbar, color picker, undo, and other functional interfaces, and overlay display. The drawing uses the Canvas mechanism, and the module responds in real time, with the first stroke displayed immediately without being lost.

[0060] In the specific implementation of this process, the display buffer is updated after the handwriting is rendered in real time: Canvas.drawPath() is used to draw to the Bitmap cache and bind it to the transparent annotation layer; OpenGL or Vulkan is used for rendering, with a refresh rate of 16ms to ensure a smooth 60fps, so as to achieve a silky handwriting display experience.

[0061] This embodiment uses path functions to draw annotation strokes in real time, achieving smooth stroke display and rendering, thus improving the user experience when making annotations.

[0062] Optionally, step S4 includes: setting a global flag to enter the annotation processing mode based on the global flag and the annotation interface; acquiring real-time pen touch events based on the annotation processing mode; and drawing real-time pen strokes on the annotation interface in response to the real-time pen touch events.

[0063] In the specific implementation process, after responding to the first pen stroke event, the annotation service status is synchronized and the event distribution is restored. First, the global flag AnnotationMode=true is set so that the annotation processing mode is entered based on the global flag and the annotation interface. All subsequent events are handled by annotations, and the event distribution steps corresponding to the annotation service are performed.

[0064] In practice, the corresponding annotation layers and UI are destroyed after the user exits, restoring the original event path.

[0065] This embodiment responds promptly to the first pen stroke event and enters the annotation processing mode by setting a global flag in the activated annotation interface. This enables the operation of entering the annotation service through any interface, meeting the needs for instant annotation and high responsiveness in actual use scenarios.

[0066] The pen-based annotation service implementation method provided in this embodiment initializes the annotation service through a power-on signal, creates a globally transparent annotation layer, and receives input events to ensure instant pen touch response on any interface, avoiding delays or missed strokes. Simultaneously, the transparent annotation layer analyzes touch events, identifies the first pen touch event to prevent accidental activation, and provides a basis for judgment and recognition in annotation processing. Furthermore, it acquires handwriting data through initial action recognition, prepares the first complete data, ensures the timeliness and accuracy of annotation display, and uses a preset path function to draw the handwriting in real time, achieving a smooth rendering effect and enhancing the annotation experience. This design improves the smoothness of annotation operations and user satisfaction. Finally, it activates the annotation interface upon the first stroke, setting a global flag to enter annotation mode, meeting the needs for instant annotation and high responsiveness. It enables timely response to the user's first stroke event on any interface, ensuring timely, complete, and accurate display of the first stroke. Furthermore, it activates the annotation interface based on the first stroke event to immediately start the annotation service, avoiding the problems of annotation functions only being effective in specific applications or after startup, failing to start promptly on any interface, and easily experiencing writing delays or missed strokes.

[0067] Example 2;

[0068] This embodiment provides an application flow for implementing a pen-based annotation service. The implementation method for a pen-based annotation service, as described above, includes the following steps:

[0069] S21. Power on / start;

[0070] S22. In response to the power-on signal, construct a transparent annotation layer;

[0071] S23. Register a pen touch listener to obtain touch events based on the transparent annotation layer;

[0072] S24. Detect whether it is a stylus based on the touch event: if yes, execute step S25; if no, execute event S251.

[0073] S25. Redirect touch events to the annotation service and obtain the first pen touch event;

[0074] S251, Normal Event Distribution;

[0075] S26. Initiate the annotation interface based on the first pen stroke event;

[0076] S27. Render and display the first drawn stroke in real time based on the first stroke event;

[0077] S28. Continuously receive real-time pen touch events and draw real-time pen strokes on the annotation interface.

[0078] S29. Exit annotation mode, destroy the annotation interface and transparent annotation layer, and restore the system state.

[0079] This embodiment provides an application process for implementing a pen-touch annotation service, which meets the needs of real-time annotation and high responsiveness in actual use scenarios. It realizes an annotation service mechanism that can respond instantly to the contact of a "handwriting pen" and immediately start annotation on any interface of the system, and ensures that the first stroke is accurately displayed. This process can be implemented on an electronic whiteboard all-in-one machine to realize the pen-touch annotation function.

[0080] Example 3:

[0081] This embodiment provides a system for implementing a pen-based annotation service, and implements the above-mentioned method for implementing a pen-based annotation service, including a layer construction module, an event acquisition module, a first-stroke drawing module, and a real-time annotation module, wherein:

[0082] The layer building module is used to create transparent annotation layers in response to the power-on signal;

[0083] The event acquisition module is used to acquire the first stroke event based on the transparent annotation layer;

[0084] The first stroke drawing module is used to respond to the first stroke event, activate the annotation interface based on the first stroke event, and generate the first drawing stroke corresponding to the first stroke event on the annotation interface.

[0085] The real-time annotation module is used to respond to real-time pen stroke events and draw real-time pen strokes on the annotation interface.

[0086] The pen-writing annotation service system provided in this embodiment first constructs a transparent annotation layer in response to the power-on signal through the layer construction module. Then, based on the event acquisition module, it promptly responds to the user's first pen stroke event on any interface. Subsequently, based on the first stroke drawing module, it realizes timely response and pen stroke drawing for the first pen stroke event, ensuring the timely, complete, and accurate display of the first pen stroke. Based on the first pen stroke event, the annotation interface is activated to immediately start the annotation service. This avoids the problems that the annotation function can only be effective in specific applications or after startup, and cannot be started in any interface in a timely manner, which may easily lead to writing delays or missed strokes.

[0087] Optionally, the layer building module includes a configuration submodule and a layer building submodule, wherein: the configuration submodule is used to initialize the annotation service in response to the power-on signal to obtain the configuration file; the layer building submodule is used to build a transparent annotation layer when the configuration file determines that the annotation service is supported.

[0088] The above solution configures the submodule to respond to the power-on signal and directly initializes the annotation service during startup. This allows the layer construction submodule to create a globally transparent annotation layer on the top layer through the annotation service. This layer is invisible but can receive input events, enabling timely response to user pen touch events on any interface. This avoids the problem that annotation functions can only be effective in specific applications or after startup, and that they cannot be activated in any interface in a timely manner, which can easily lead to writing delays or missed strokes. At the same time, it does not affect the user's normal operation of other applications.

[0089] Optionally, the event acquisition module includes a listening submodule and a judgment submodule, wherein: the listening submodule is used to acquire touch events based on the transparent annotation layer; the judgment submodule is used to identify the touch input type based on the touch event, and when the identified touch input type matches the preset touch type, the touch event is taken as the first pen stroke event.

[0090] In the specific implementation process, the acquisition submodule obtains and analyzes touch events based on the transparent annotation layer, and then the judgment submodule determines the first pen touch event required, laying the basis for subsequent annotation processing, so as to prevent accidental activation of the annotation interface and improve the user experience.

[0091] Optionally, the first stroke drawing module includes an activation submodule and a drawing submodule, wherein: the activation submodule is used to activate the annotation interface in response to the first stroke event; the drawing submodule is used to generate the first drawing stroke corresponding to the first stroke event on the annotation interface based on the first stroke event and a preset path function, and the process of generating the first drawing stroke satisfies the following formula: P n =f(x) n y n p n s n )

[0092] In the formula: P n This represents the path data for the nth point, x. n y n p represents the coordinates of the nth point. n Let s represent the pressure at the nth point. n The value represents the pen width at the nth point, and f() represents the curve generated by the path function.

[0093] The pen-based annotation service system provided in this embodiment initializes the annotation service in response to the power-on signal through a layer construction module, creating a globally transparent annotation layer to receive input events and ensure instant pen touch response on any interface, avoiding delays or missed strokes. Simultaneously, an event acquisition module analyzes touch events based on the transparent annotation layer, identifying the first pen touch event to prevent accidental activation and providing a basis for annotation processing. Furthermore, a first-stroke drawing module identifies the initial action, acquires handwriting data, prepares the first complete stroke, ensuring the timeliness and accuracy of annotation display, and uses a preset path function to draw the handwriting in real time. The smooth rendering effect enhances the fluidity of annotation operations and user satisfaction. Finally, the real-time annotation module activates the annotation interface after responding to the first stroke, sets a global flag to enter annotation mode, and meets the requirements of instant annotation and high responsiveness. It enables timely response to the user's first stroke event on any interface, ensuring timely response and handwriting drawing. This guarantees the timely, complete, and accurate display of the first stroke, and activates the annotation interface based on the first stroke event to immediately start the annotation service. This avoids the problems of annotation functions only being effective in specific applications or after startup, and the inability to start them in any interface in a timely manner, which can easily lead to writing delays or missed strokes.

[0094] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for implementing a pen-and-ink annotation service, characterized by, The method comprises the following steps: in response to a start-up signal, a transparent annotation layer is constructed; a first touch event is obtained based on the transparent annotation layer; in response to the first touch event, an annotation interface is activated based on the first touch event and first drawing handwriting corresponding to the first touch event is generated on the annotation interface; in response to a real-time touch event, real-time drawing handwriting is drawn on the annotation interface.

2. The method of claim 1, wherein the method further comprises: The method of constructing the transparent annotation layer in response to the start-up signal comprises the following steps: in response to the start-up signal, annotation service initialization is performed to obtain a configuration file; when the configuration file is determined to support the annotation service, the transparent annotation layer is constructed.

3. The method of claim 1, wherein the method further comprises: The method of obtaining the first touch event based on the transparent annotation layer comprises the following steps: a touch event is obtained based on the transparent annotation layer; a touch input type is identified based on the touch event, and when the identified touch input type meets a preset touch type, the touch event is taken as the first touch event.

4. The method of claim 3, wherein the method further comprises: The method of identifying the touch input type based on the touch event and taking the touch event as the first touch event when the identified touch input type meets the preset touch type comprises the following steps: a touch input type is identified based on the touch event; when the identified touch input type meets a preset touch type, it is determined whether the touch event is a starting action; when the touch event is a starting action, starting event copies and starting handwriting data are obtained based on the touch event; the starting event copies and the starting handwriting data are taken as the first touch event.

5. The method of claim 1, wherein the method further comprises: The method of activating the annotation interface based on the first touch event and generating the first drawing handwriting corresponding to the first touch event on the annotation interface in response to the first touch event comprises the following steps: in response to the first touch event, the annotation interface is activated; first drawing handwriting corresponding to the first touch event is generated on the annotation interface based on the first touch event and a preset path function, and the generation of the first drawing handwriting meets the following formula: P n = f(x n , y n , p n , s n ) where: P n represents path data of the nth point, x n , y n represents coordinates of the nth point, p n represents pressure of the nth point, s n represents pen width of the nth point, f() represents a path function to generate a curve.

6. The method of claim 1, wherein the method further comprises: The method of drawing the real-time drawing handwriting on the annotation interface in response to the real-time touch event comprises the following steps: a global flag is set to enter an annotation processing mode based on the global flag and the annotation interface; a real-time touch event is obtained based on the annotation processing mode; in response to the real-time touch event, real-time drawing handwriting is drawn on the annotation interface.

7. A system for implementing a pen-touch annotation service, characterized by The method for implementing a touch-to-write annotation service according to any one of claims 1 to 6 comprises a layer construction module, an event obtaining module, a first-pen drawing module and a real-time annotation module, wherein: the layer construction module is configured to construct a transparent annotation layer in response to a start-up signal; the event obtaining module is configured to obtain a first touch event based on the transparent annotation layer; the first-pen drawing module is configured to activate an annotation interface based on the first touch event in response to the first touch event and generate first drawing handwriting corresponding to the first touch event on the annotation interface; the real-time annotation module is configured to draw real-time drawing handwriting on the annotation interface in response to a real-time touch event.

8. The system for implementing a pen-touch annotation service according to claim 7, wherein, The layer construction module comprises a configuration submodule and a layer construction submodule, wherein: the configuration submodule is configured to perform annotation service initialization to obtain a configuration file in response to a start-up signal; The layer construction submodule is configured to construct a transparent annotation layer when the configuration file is determined to support an annotation service.

9. The system for implementing a pen- touch annotation service according to claim 7, wherein, The event acquisition module comprises a listening submodule and a judging submodule, wherein: The listening submodule is configured to acquire a touch event based on the transparent annotation layer; The judging submodule is configured to identify a touch input type based on the touch event, and determine the touch event as a first pen touch event when the identified touch input type matches a preset touch type.

10. The system for implementing a pen-touch annotation service according to claim 7, wherein, The first pen drawing module comprises an activating submodule and a drawing submodule, wherein: The activating submodule is configured to activate an annotation interface in response to the first pen touch event; The drawing submodule is configured to generate a first drawing trace corresponding to the first pen touch event on the annotation interface based on the first pen touch event and a preset path function, and the generation of the first drawing trace satisfies the following formula: P n = f(x n , y n , p n , s n ) where: P n represents path data of the nth point, x n , y n represents coordinates of the nth point, p n represents pressure of the nth point, s n represents pen width of the nth point, f() represents a path function to generate a curve.