CN115718578A - Comment drawing method and device, terminal device and storage medium - Google Patents

Comment drawing method and device, terminal device and storage medium Download PDF

Info

Publication number
CN115718578A
CN115718578A CN202211431632.4A CN202211431632A CN115718578A CN 115718578 A CN115718578 A CN 115718578A CN 202211431632 A CN202211431632 A CN 202211431632A CN 115718578 A CN115718578 A CN 115718578A
Authority
CN
China
Prior art keywords
annotation
target
view
drawing data
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211431632.4A
Other languages
Chinese (zh)
Inventor
万力超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huasheng Software Technology Co ltd
Original Assignee
Shenzhen Huasheng Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huasheng Software Technology Co ltd filed Critical Shenzhen Huasheng Software Technology Co ltd
Priority to CN202211431632.4A priority Critical patent/CN115718578A/en
Publication of CN115718578A publication Critical patent/CN115718578A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a comment drawing method, a comment drawing device, terminal equipment and a storage medium, wherein real-time drawing data input based on a target comment view is captured; when a drawing ending instruction is received, sending target drawing data captured based on the target annotation view to a system layer; calling a system layer to draw the target drawing data, generating target annotation information, and updating a target annotation view according to the target annotation information; according to the technical scheme, the drawing data are captured in the annotation process, and the system layer is called to draw according to the captured target drawing data when a drawing finishing instruction is received, so that the screen refreshing times in the annotation drawing process are reduced, the problem of writing performance caused by insufficient system resources is solved, and the problem of annotation drawing blockage is solved.

Description

Annotation drawing method and device, terminal device and storage medium
Technical Field
The invention relates to the technical field of display data processing, in particular to a batch annotation drawing method and device, terminal equipment and a storage medium.
Background
The intelligent display screen is a liquid crystal display device with an Android operating system and a touch interactive system, and human-computer interaction is achieved through the touch system. The most basic function of the intelligent display screen of the touch interactive system is that the intelligent display screen can support writing and displaying characters on the screen directly by fingers or other objects, and an application program for realizing the functions is whiteboard software. With the popularization of the Android system, the application of the intelligent display screen equipment is more and more common. Writing is used as a core function of the intelligent display screen, and the writing experience of the intelligent display screen is increasingly valued by users, which includes the response speed of writing, the fluency of handwriting and the like.
The existing annotation drawing work mechanism based on the native android graph drawing system is as follows: the system triggers redrawing after receiving an input event, remeasures a drawing area through a processor to generate a drawing path, gives the drawing path and the drawing area to a graphics processor to mix and render layers to obtain a drawing graph, finally copies the drawing graph to a hardware frame buffer area, and refreshes and displays when a hardware frame buffer area refreshing period signal arrives; the existing annotation drawing method depends on a processor and a graphic processor to draw paths in real time, and the writing speed is more and more unsmooth when the writing content is too much or the resources are insufficient.
Disclosure of Invention
The embodiment of the invention provides a comment drawing method, a comment drawing device, terminal equipment and a storage medium, and aims to solve the problem of blockage of the conventional comment drawing method.
In one aspect, an embodiment of the present invention provides a method for drawing annotations, where the method includes:
capturing real-time rendering data input based on the target annotation view;
when a drawing end instruction is received, sending target drawing data captured based on the target annotation view to a system layer;
and calling the system layer to draw the target drawing data, generating target annotation information, and updating the target annotation view according to the target annotation information.
In another aspect, an embodiment of the present invention provides a batch annotation drawing apparatus, where the apparatus includes:
the data capturing module is used for capturing real-time drawing data input based on the target annotation view;
the data transmission module is used for sending the target drawing data captured based on the target annotation view to a system layer when a drawing ending instruction is received;
and the annotation drawing module is used for calling the system layer to draw the target drawing data, generating target annotation information and updating the target annotation view according to the target annotation information.
In another aspect, an embodiment of the present invention provides a terminal device, including a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to execute the operation in the annotation drawing method.
In another aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to perform steps in the annotation rendering method.
The embodiment of the invention captures real-time drawing data input based on the target annotation view; when a drawing ending instruction is received, target drawing data captured based on the target annotation view is sent to a system layer; calling a system layer to draw the target drawing data, generating target annotation information, and updating a target annotation view according to the target annotation information; in the annotation process, drawing data are captured, and the system layer is called to draw according to the captured target drawing data when a drawing finishing instruction is received, so that the screen refreshing times in the annotation drawing process are reduced, the problem of writing performance caused by insufficient system resources is solved, and the problem of annotation drawing blockage is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of an embodiment of an annotation rendering method provided by an embodiment of the present invention;
fig. 2 is a schematic diagram of an annotation icon provided by an embodiment of the present invention on a display interface;
FIG. 3 is a schematic diagram of an annotation page provided by an embodiment of the invention;
fig. 4 is a schematic structural diagram of an annotation drawing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a middle shield device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As described in the background art, the existing annotation drawing mechanism based on the native Android graphics drawing system needs to call a CPU (central processing unit, chinese) and a GPU (graphics processing unit, chinese) to draw input annotation data, and needs to regularly refresh a screen according to a screen refresh rate of a terminal device, so as to draw and store the annotation data.
Based on this, in order to solve the problem of stagnation in the annotation process and improve the annotation efficiency, the embodiment of the invention provides an annotation drawing method, in the annotation process, drawing data is captured, and when a drawing end instruction is received, a system layer is called to draw according to the captured target drawing data, so that the screen refreshing frequency in the annotation drawing process is reduced, the writing performance problem caused by insufficient system resources is improved, and the problem of stagnation in the annotation drawing process is improved.
As shown in fig. 1, fig. 1 is a schematic flow chart of an embodiment of an annotation drawing method provided in an embodiment of the present invention, and the illustrated annotation drawing method includes steps 101 to 103:
and 101, capturing real-time rendering data input based on the target annotation view.
The target annotation view can be a view for displaying a document, a view for displaying a picture, or a blank view.
In some embodiments of the present invention, the drawing data may be input text, input drawing such as a horizontal line, an underline, or a drawing trace of a handwriting input.
In some embodiments of the present invention, the drawing data may be touch point coordinates or may be a drawing path composed of touch point coordinates, where a touch point refers to a touch point on the target annotation view.
In some embodiments of the present invention, a monitoring thread of the terminal device may be started, and when an annotation event input based on the target annotation view is monitored by the monitoring thread, real-time rendering data input based on the target annotation view is captured.
In some embodiments of the present invention, real-time rendering data input based on a target annotation view may be captured in response to an annotation command. The annotation instruction may be triggered based on the annotation option on the target annotation view, for example, the annotation option is clicked, touched, or slid to trigger the annotation instruction, and it should be noted that the specific form of the annotation option is not limited in the embodiment of the present invention, and for example, the annotation option may be a block diagram, or may be a floating button.
And 102, when a drawing end instruction is received, sending the target drawing data captured based on the target annotation view to the system layer.
In some embodiments of the present invention, there are multiple triggering manners of the end-of-drawing instruction, which exemplarily include:
the triggering of the rendering end instruction may be accomplished in response to a triggering event entered based on an end option on the target annotation view.
The triggering of the rendering end instruction may be achieved by responding to an end triggering event input based on the target annotation view. In some embodiments of the invention, the end departure event may be a triggering of a lift-off operation.
It should be noted that the above triggering manner of the drawing end instruction is only an exemplary illustration, and does not constitute a limitation on the annotation drawing method, and the triggering manner of the drawing end instruction may be determined according to an actual application scenario, for example, by voice triggering, gesture recognition triggering, and the like.
In some embodiments of the present invention, the system layer is a system framework layer in the terminal device, and may implement the call of the CPU and the GPU in the terminal device.
The target drawing data may be set data of real-time drawing data of a real-time drawing end instruction input based on the target annotation view captured during a period from when the annotation instruction is responded to when the drawing end instruction is triggered.
And 103, calling a system layer to draw the target drawing data, generating target annotation information, and updating the target annotation view according to the target annotation information.
The target annotation information can be a drawing track or input characters.
In some embodiments of the present invention, invoking the system layer to render the target rendering data comprises: calling a system layer to call a CPU and a GPU to process target drawing data to obtain a drawing path, transferring the drawing path to a graphic display service (SurfaceFlinger) to mix and render layers to obtain target annotation information, calling the system layer to write the target annotation information into a hardware frame buffer (FrameBuffer), and refreshing a screen when a hardware frame buffer refreshing cycle signal of a graphic is waited, so that a target annotation view is updated.
In the annotation process, the drawing data are captured, and the system layer is called to draw according to the captured target drawing data when a drawing finishing instruction is received, so that the screen refreshing times in the annotation drawing process are reduced, the problem of writing performance caused by insufficient system resources is solved, and the problem of annotation drawing blockage is solved.
In some embodiments of the present invention, before step 101, when responding to an annotation request, a screenshot is performed on a display interface currently displayed by a terminal device to obtain a target annotation view, and the target annotation view is displayed on an annotation page by inputting the target annotation view into the annotation page.
In some embodiments of the present invention, the annotation request may be triggered by triggering an annotation option in the display interface, or may be triggered by voice.
In some embodiments of the present invention, when a screenshot is performed on a display interface, when an icon such as a toolbar, a floating icon, or a notification bar is displayed in a current display interface, the current display interface is directly subjected to the screenshot, so that the acquired icon such as the toolbar, the floating icon, or the notification bar exists on a target annotation view, and the target annotation view is blocked, based on which, in order to acquire a target annotation view with five blocks, in an embodiment of the present invention, when an annotation request is responded, the icon such as the toolbar, the floating icon, or the notification bar in the current display interface is hidden, and when it is determined that the current display interface is not blocked by the icon, a screenshot operation is performed to obtain the target annotation view, specifically, the screenshot method includes:
(1) And responding to the annotation request, hiding the icon on the display interface, and performing screenshot on the display interface after the icon is hidden to obtain a target annotation view.
(2) And displaying the target annotation view.
Icons include, but are not limited to, screen-cast codes, sidebars, toolbars, source switching and notification bars.
In some embodiments of the present invention, after responding to the annotation request, detecting whether an icon exists on the display interface; if the icon does not exist, screenshot is conducted on the current display interface to obtain a target annotation view; and if the icon exists, hiding the icon, and performing screenshot on the display interface after the icon is hidden to obtain a target annotation view.
In some embodiments of the present invention, in consideration of the time required for hiding the icon, if the screenshot is directly performed after the icon hiding is performed, the target annotation view obtained by the screenshot may be blocked by the icon, so that after the icon is hidden, waiting is performed, and when the waiting time is greater than or equal to the preset time, the screenshot is performed on the current display interface.
In some embodiments of the invention, after the icon is hidden, whether the icon is successfully hidden is detected, and if the icon is successfully hidden, the current display interface is subjected to screenshot to obtain a target annotation view; and if the target annotation view is not successfully hidden, destroying the process corresponding to the icon, and performing screenshot on the display interface after the icon is destroyed to obtain the target annotation view.
In some embodiments of the invention, in order to reduce memory and resource consumption, whether the icon is hidden successfully or not is detected, if the icon is hidden successfully, screenshot is performed on the current display interface, and the hidden icon is destroyed after the target annotation view is obtained.
In some embodiments of the present invention, after a target annotation view is obtained by screenshot on a display interface after an icon is hidden, the target annotation view is displayed on an annotation page by entering the annotation page.
In some embodiments of the present invention, after displaying the target annotation view, annotation state detection is started, and if it is monitored that the annotation exits, the annotation page is closed, the display interface before executing the screenshot is displayed, and the icon is displayed.
In some embodiments of the present invention, if an annotation quit request is received, it is determined that the annotation normally quits, and the annotation page is closed, and the display interface before the screenshot is executed is displayed, and the icon is displayed.
In some embodiments of the present invention, the survival status of the annotation process may be detected at a predetermined interval, and if the survival status of the annotation is closed and the page for closing the annotation is not received, the display interface before the screenshot is executed is displayed, and the icon is displayed, it is determined that the annotation exits abnormally, the page for annotating is closed, the display interface before the screenshot is executed is displayed, and the icon is displayed.
In some embodiments of the present invention, the annotation request may be triggered based on an annotation icon on the display interface, for example, in response to a triggering event based on an annotation option on the annotation icon on the display interface, a posting request may be generated.
In some embodiments of the present invention, considering that a single side of an existing annotation icon is displayed on a display interface and that a triggering operation is not convenient, in the embodiments of the present invention, annotation icons are symmetrically displayed on two sides of a view of the display interface, as shown in fig. 2, fig. 2 is a schematic diagram of the annotation icon provided in the embodiments of the present invention on the display interface, the illustrated annotation icon includes functional options such as an annotation option and a return option, it should be noted that the functional options on the annotation icon shown in fig. 2 are only exemplary illustrations, and more or fewer annotation icons than the functional options shown in fig. 2 may be set in practical application. In some embodiments of the present invention, when it is monitored that an annotation option on an annotation icon is triggered, an annotation request may be responded, and specifically, a response method of the annotation request includes:
(1) And symmetrically displaying the annotation icons on two sides of the view of the display interface.
(2) Responding to a trigger event based on any annotation icon, and symmetrically displaying functional options included by the annotation icons on two sides of a view of the display interface; the function options include annotation options.
(3) Responding to an annotation request input based on the annotation options.
In some embodiments of the present invention, in order to reduce the obstruction of the functional options of the annotation icon to the display interface, as shown in fig. 2, an annotation icon with a pull-down function is set, as shown in fig. 2 (a), when the annotation icon does not respond to the trigger event, the annotation icon does not display the functional options in the display interface, and when the annotation icon responds to the trigger event, the diagram is switched to fig. 2 (b), and the functional options included in the annotation icon are displayed on the display interface. It should be noted that, in the embodiment of the present invention, a specific form of the trigger event is not limited, and for example, the trigger event may be a click trigger, a sliding trigger, or the like.
In some embodiments of the present invention, in order to facilitate opening and closing of an annotation function on a target annotation view, when the target annotation view is displayed, an annotation toolbar may be displayed on the target annotation view, and the annotation function is opened based on triggering of the annotation toolbar to capture input real-time rendering data, specifically, the method for capturing real-time rendering data includes:
(1) Displaying an annotation toolbar in the target annotation view; wherein the annotation toolbar includes an annotation start option.
(2) And responding to the operation based on the annotation starting option, and starting the annotation function.
(3) Responding to a drawing operation input based on the target annotation view, and acquiring touch data corresponding to a touch point of the drawing operation to obtain real-time drawing data; the drawing operation comprises a touch pressing operation and a touch moving operation.
The operation includes, but is not limited to, a touch operation, a click operation, and a slide operation.
In some embodiments of the present invention, the annotation toolbar function option, illustratively shown in fig. 3, fig. 3 is a schematic diagram of an annotation page provided in embodiments of the present invention, where the annotation tool includes an annotation start option, a wipe option, a confirm option, a cancel option, and an exit option. The comment starting option is used for starting comments and setting comment parameters, the erasing option is used for erasing target comment information drawn on the target comment view, the confirming option is used for confirming the first comment information, the canceling option is used for deleting the first comment information, and the quitting option is used for realizing comment quitting. The annotation parameters include, but are not limited to, drawing track color, drawing line size information, size information of the input font, color information of the input font, and type of the input font. For example, when a trigger event based on the annotation starting option is monitored, an annotation function is started, an annotation parameter setting page is output, and annotation parameters input based on the annotation parameter setting page are acquired; and when a trigger event based on the erasing option is monitored, starting a drawing data erasing function.
In some embodiments of the present invention, in consideration that when the position of the annotation toolbar is fixed on the annotation page, the drawing operation of the target annotation view may be affected, so as to reduce the flexibility of annotation drawing, when the annotation toolbar provided in an embodiment of the present invention can respond to the touch movement event, the annotation toolbar is moved to the target position on the target annotation view according to the touch movement event, so that each view area on the target annotation view can be drawn as an annotation, specifically, the method includes:
(1) And responding to the touch movement event input based on the annotation toolbar, and determining a movement distance corresponding to the touch movement event.
(2) And if the moving distance is greater than or equal to a preset distance threshold, determining the target position of the annotation toolbar in the target annotation view according to the moving track corresponding to the touch moving event.
(3) And moving the annotation toolbar to the target position in the target annotation view.
In some embodiments of the present invention, in consideration of a shaking effect generated when a view is frequently refreshed during a movement process of an annotation toolbar, and a shadow and a blur phenomenon occur, after a touch movement event input based on the annotation toolbar is responded, a movement distance corresponding to the touch movement event is compared with a preset distance threshold value in the embodiments of the present invention; when the moving distance is larger than or equal to a preset distance threshold, determining a target position of the annotation toolbar in the target annotation view according to a moving track corresponding to the touch moving event; and when the moving distance is smaller than a preset distance threshold value, keeping the current position of the annotation toolbar unchanged.
In some embodiments of the present invention, when a touch down event input based on the annotation toolbar is monitored, a first coordinate of a touch point of the touch down event is recorded, and when a touch move event input based on the annotation toolbar is monitored, a second coordinate of the touch point of the touch move event is recorded, and a moving distance corresponding to the touch move event is determined according to a horizontal coordinate difference or a vertical coordinate difference between the first coordinate and the second coordinate; when the moving distance corresponding to the touch moving event is larger than a preset distance threshold, a coordinate moving sequence is obtained according to a second coordinate of a contact in the touch moving event, a moving track is obtained according to the coordinate moving sequence, the target position of the annotation toolbar in the target annotation view is determined, the annotation toolbar is moved to the target position in the target annotation view, a system layer is called to draw a new target annotation view, and the new target annotation view is displayed to update the target annotation view.
In some embodiments of the present invention, the coordinate toolbar may move on the target annotation view according to the movement track, when a touch up event is monitored, the target position in the target annotation view of the annotation toolbar is determined according to the first coordinate and the third coordinate, according to the third coordinate of the touch point of the touch up event, the annotation toolbar is moved to the target position in the target annotation view, the system layer is called to draw a new target annotation view, and the new target annotation view is displayed to update the target annotation view.
In some embodiments of the present invention, in consideration of the size limitation of the display screen of the terminal device, in order to enable the movement trajectory of the annotation toolbar to be in the display screen of the terminal device, when the target position of the annotation toolbar in the target annotation view is determined according to the movement trajectory corresponding to the touch movement event, a first horizontal distance threshold, a second horizontal distance threshold, a first vertical distance threshold, and a second vertical distance threshold are determined according to the first coordinate and the size of the display screen, and the distance of the movement trajectory of the annotation toolbar is compared with the first horizontal distance threshold, the second horizontal distance threshold, the first vertical distance threshold, and the second vertical distance threshold, respectively; if the distance of the moving track of the annotation toolbar is larger than or equal to a first horizontal distance threshold, setting a first preset coordinate as a horizontal coordinate of the annotation toolbar in the target annotation view; if the distance of the moving track of the annotation toolbar is larger than or equal to a second horizontal distance threshold value, setting a second preset coordinate as a horizontal coordinate of the annotation toolbar in the target annotation view; if the distance of the moving track of the annotation toolbar is larger than or equal to the first vertical distance threshold, setting the third preset coordinate as a vertical coordinate of the annotation toolbar in the target annotation view; if the distance of the moving track of the annotation toolbar is larger than or equal to the second vertical distance threshold, setting the fourth preset coordinate as the vertical coordinate of the annotation toolbar in the target annotation view; and determining the target position of the annotation toolbar in the target annotation view according to the horizontal coordinate and the vertical coordinate of the annotation toolbar in the target annotation view.
In some embodiments of the present invention, in order to display annotation information in an annotation drawing process, after an annotation function is started through an annotation toolbar, real-time drawing data may be obtained by recording coordinates of a touch point of a touch down operation and a touch point coordinate sequence of a touch move operation on a target annotation view, the real-time drawing data is transmitted to a display buffer area, the real-time drawing data is drawn on the target annotation view through the display buffer area for display, and when a drawing end instruction is received, a system layer is called to perform annotation drawing and update of the target annotation view, so that the target drawing data is stored. It should be noted that, when the real-time rendering data is transferred to the display buffer area and the real-time rendering data is rendered on the target annotation view for display through the display buffer area, the CPU/GPU of the terminal device is not called to perform view refreshing. In some embodiments of the present invention, in order to implement the drawing of the real-time drawing data without calling a system layer in the annotation drawing process, a system runtime library layer is added in the embodiments of the present invention, the real-time drawing data is transferred to a display buffer area through the system runtime library layer, and then the real-time drawing data is drawn to the target annotation view without calling a CPU/GPU of the terminal device, and specifically, the drawing method of the real-time drawing data includes:
(1) And calling a system operation library layer to draw the captured real-time drawing data to obtain first batch annotation information.
(2) And displaying the first annotation information on the target annotation view.
In some embodiments of the present invention, the system runtime layer may be a native layer acceleration library, where the native layer acceleration library is used to implement access to the display buffer and data read-write.
In some embodiments of the present invention, the real-time rendering data captured based on the target annotation view may be transferred to the system runtime layer in a JNI (fully-known as Java Native Interface, chinese: writing Interface) manner, and the system runtime layer is invoked to write the real-time rendering data captured based on the target annotation view into the display buffer for storage.
In some embodiments of the present invention, when the real-time drawing data captured by the target annotation view is written into the display buffer for storage, the system runtime may be invoked to perform video memory drawing based on the captured real-time drawing data, so as to obtain the first annotation information.
In some embodiments of the present invention, after the first annotation information is rendered, the first annotation information is displayed on the target annotation view.
In some embodiments of the present invention, after the first batch of annotation information is displayed on the target annotation view, it is determined whether a drawing end instruction is received, if the drawing end instruction is received, the real-time drawing data stored in the memory buffer is set as target drawing data, the target drawing data is transmitted to the system layer, the system layer is invoked to draw based on the received target drawing data to obtain target annotation information, the target annotation information is transmitted to the memory buffer, and a refresh event is invoked to update the target annotation view, the target annotation information is displayed on the updated target annotation view, and the updated target annotation view is displayed.
In some embodiments of the present invention, the system runtime layer may be invoked to write the real-time rendering data captured based on the target annotation view into the display buffer for storage. Wherein the display buffer may be a hardware frame buffer.
In some embodiments of the invention, after storing the real-time rendering data, it is detected whether a rendering determination operation is received; if so, responding to drawing determination operation input based on the target annotation view, and generating a drawing ending instruction; and if not, continuously capturing the real-time drawing data and continuously drawing according to the drawing method of the real-time drawing data. In some embodiments of the present invention, when an operation based on a determination option in an annotation toolbar on a target annotation view is monitored, a drawing end instruction may be generated in response to a drawing determination operation.
In some embodiments of the present invention and after the first annotation information is displayed on the target annotation view, the real-time rendering data in the display buffer may be deleted and the first annotation information may be cleared on the target annotation view while monitoring a rendering cancellation operation input based on the target annotation view. In some embodiments of the present invention, the input of the drawing cancellation operation may be achieved by triggering a cancellation option on the annotation toolbar.
In some embodiments of the present invention, after storing the real-time rendering data, it may be determined whether a touch up operation is monitored; if the touch lifting operation is monitored, determining that a drawing ending instruction is received; and if the touch lifting operation is not received, continuously capturing the real-time drawing data, and continuously drawing according to the drawing method of the real-time drawing data.
In some embodiments of the present invention, when a drawing end instruction is received, the system runtime layer is invoked to read the real-time drawing data stored in the display cache area to obtain target drawing data captured based on the target annotation view, the target drawing data captured based on the target annotation view is sent to the system layer, the system layer is invoked to draw the target drawing data according to step 103, target annotation information is generated, and the target annotation view is updated according to the target annotation information.
In some embodiments of the present invention, when the drawing end instruction is received, if the drawing end instruction is a touch lifting operation, coordinates of a touch point of the touch lifting operation are obtained, the system runtime library layer is called to read real-time drawing data based on the data stored in the display cache area, and target drawing data captured based on the target annotation view is obtained according to the real-time drawing data and the coordinates of the touch point of the touch lifting operation.
In some embodiments of the present invention, a system layer may be called to call a Canvas (chinese: canvas) drawing path for drawing target drawing data, so as to obtain target annotation information.
In some embodiments of the present invention, after the target annotation view is updated, if an annotation quit instruction is received, the updated target annotation view and the target drawing data are saved, the annotation page is closed, and the display interface when the annotation request is responded is displayed.
In some embodiments of the present invention, after the target annotation view is updated, if the annotation quit instruction is not received, the steps 101 to 103 are continuously executed, and new target annotation information is drawn on the updated target annotation view until the annotation quit instruction is received.
In some embodiments of the present invention, after updating the target annotation view, if an annotation quit instruction is not received, the state of the annotation process is detected according to a preset time; if the state of the annotation process is normal, continuing to execute the steps 101 to 103, and drawing new target annotation information on the updated target annotation view until an annotation quit instruction is received; and if the state of the annotation process is abnormal, closing the annotation process, storing the updated target annotation view and the target drawing data, closing an annotation page, and displaying a display interface when responding to the annotation request.
In some embodiments of the present invention, the state of the annotation process may be determined by detecting one or more parameters of session congestion time, memory occupancy, and CPU usage of the annotation process. Illustratively, when the session congestion time is greater than or equal to a preset congestion time threshold, the memory occupancy rate is greater than or equal to a preset occupancy rate threshold, and/or the CPU utilization rate is greater than or equal to a preset utilization rate threshold, determining that the state of the annotation process is abnormal; and when the session blocking time is smaller than a preset blocking time threshold, the memory occupancy rate is smaller than a preset occupancy rate threshold, and/or the CPU utilization rate is smaller than a preset utilization rate threshold, determining that the state of the annotation process is normal.
According to the annotation drawing method provided by the embodiment of the invention, the drawing data is captured in the annotation process, and the system layer is called to draw according to the captured target drawing data when a drawing finishing instruction is received, so that the screen refreshing times in the annotation drawing process are reduced, the writing performance problem caused by insufficient system resources is improved, and the annotation drawing blockage problem is improved.
In order to better implement the annotation drawing method, on the basis of an embodiment of the annotation drawing method, an embodiment of the present invention provides an annotation drawing apparatus, as shown in fig. 4, where fig. 4 is a schematic structural diagram of the annotation drawing apparatus provided in the embodiment of the present invention, and the illustrated annotation drawing apparatus includes:
the data capturing module is used for capturing real-time drawing data input based on the target annotation view;
the data transmission module is used for sending the target drawing data captured based on the target annotation view to the system layer when a drawing ending instruction is received;
and the annotation drawing module is used for calling the system layer to draw the target drawing data, generating target annotation information and updating the target annotation view according to the target annotation information.
In some embodiments of the present invention, the annotation drawing device includes:
the video memory drawing module is used for calling a system operation library layer to draw the captured real-time drawing data to obtain first batch annotation information; displaying the first annotation information on the target annotation view.
In some embodiments of the invention, the data transfer module is configured to:
calling a system operation library layer to write real-time drawing data captured based on the target annotation view into a display buffer area for storage;
when a drawing ending instruction is received, calling a system operation library layer to read real-time drawing data stored in a display buffer area to obtain target drawing data captured based on a target annotation view;
and sending the target drawing data captured based on the target annotation view to a system layer.
In some embodiments of the invention, the data transfer module is configured to:
calling a system operation library layer to write real-time drawing data captured based on the target annotation view into a display buffer area for storage;
responding to drawing determination operation input based on the target annotation view, and generating a drawing ending instruction; or,
and responding to a drawing canceling operation input based on the target annotation view, deleting the real-time drawing data in the display buffer area, and clearing the first annotation information on the target annotation view.
In some embodiments of the invention, the data capture module is to:
responding to the annotation request, hiding the icon on the display interface, and carrying out screenshot on the display interface after the icon is hidden to obtain a target annotation view;
and displaying the target annotation view.
In some embodiments of the invention, the data capture module is to:
displaying an annotation toolbar in the target annotation view; the annotation toolbar comprises an annotation starting option;
responding to the operation based on the annotation starting option, and starting an annotation function;
responding to a drawing operation input based on the target annotation view, and collecting touch data corresponding to a touch point of the drawing operation to obtain real-time drawing data; the drawing operation includes a touch down operation and a touch move operation.
In some embodiments of the invention, the data capture module is to:
responding to a touch movement event input based on the annotation toolbar, and determining a movement distance corresponding to the touch movement event;
if the moving distance is larger than or equal to a preset distance threshold, determining a target position of the annotation toolbar in the target annotation view according to a moving track corresponding to the touch moving event;
and moving the annotation toolbar to the target position in the target annotation view.
In some embodiments of the invention, the data capture module is to:
symmetrically displaying annotation icons on two sides of a view of a display interface;
responding to a trigger event based on any annotation icon, and symmetrically displaying functional options included by the annotation icons on two sides of a view of the display interface; the function options include annotation options;
in response to an annotation request entered based on the annotation options.
The annotation drawing device provided by the embodiment of the invention captures drawing data in the annotation process, and calls the system layer to draw according to the captured target drawing data when a drawing finishing instruction is received, so that the screen refreshing times in the annotation drawing process are reduced, the problem of writing performance caused by insufficient system resources is solved, and the problem of annotation drawing blockage is solved.
Accordingly, an embodiment of the present invention further provides a terminal device, as shown in fig. 5, the terminal device may include Radio Frequency (RF) circuit 501, memory 502 including one or more computer-readable storage media, input unit 503, display unit 504, sensor 505, audio circuit 506, wireless Fidelity (WiFi) module 507, processor 508 including one or more processing cores, and power supply 509. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 501 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information from a base station and then sending the received downlink information to the one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general, RF circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 501 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Messaging Service (SMS), etc.
The memory 502 may be used to store software programs and modules, and the processor 508 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 508 and the input unit 503 access to the memory 502.
The input unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 503 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 503 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 504 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 508 to determine the type of touch event, and then the processor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal device may also include at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that turns off the display panel and/or the backlight when the terminal device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of identifying the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal device, detailed description is omitted here.
Audio circuitry 506, a speaker, and a microphone may provide an audio interface between the user and the terminal device. The audio circuit 506 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into audio data, and then the audio data is processed by the audio data output processor 508, and then sent to another terminal device through the RF circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of peripheral headphones with the terminal device.
WiFi belongs to short-distance wireless transmission technology, and terminal equipment can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a WiFi module 507, and provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 507, it is understood that it does not belong to the essential constitution of the terminal device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the terminal device, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal device and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile phone. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The terminal device also includes a power supply 509 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 508 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal device may further include a camera, a bluetooth module, and the like, which are not described herein. Specifically, in this embodiment, the processor 508 in the terminal device loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 runs the application program stored in the memory 502, thereby implementing various functions:
capturing real-time rendering data input based on the target annotation view;
when a drawing ending instruction is received, target drawing data captured based on the target annotation view is sent to a system layer;
and calling a system layer to draw the target drawing data, generating target annotation information, and updating the target annotation view according to the target annotation information.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute steps in any annotation drawing method provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
capturing real-time rendering data input based on the target annotation view;
when a drawing ending instruction is received, target drawing data captured based on the target annotation view is sent to a system layer;
and calling a system layer to draw the target drawing data, generating target annotation information, and updating the target annotation view according to the target annotation information.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any annotation drawing method provided in the embodiment of the present invention, the beneficial effects that can be achieved by any annotation drawing method provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The method, the apparatus, the terminal device and the storage medium for batch annotation rendering provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. A method of batch rendering, the method comprising:
capturing real-time rendering data input based on the target annotation view;
when a drawing ending instruction is received, sending target drawing data captured based on the target annotation view to a system layer;
and calling the system layer to draw the target drawing data, generating target annotation information, and updating the target annotation view according to the target annotation information.
2. The annotation rendering method according to claim 1, wherein before sending target rendering data captured based on the target annotation view to a system layer upon receiving a rendering end instruction, the method comprises:
calling a system operation library layer to draw the captured real-time drawing data to obtain first batch annotation information;
and displaying the first comment information on the target comment view.
3. The annotation rendering method of claim 2, wherein before the calling system runtime layer renders the captured real-time rendering data to obtain the first annotation information, the method comprises:
calling a system operation library layer to write real-time drawing data captured based on the target annotation view into a display buffer area for storage;
after the displaying the first annotation information on the target annotation view, the method comprises:
responding to drawing determination operation input based on the target annotation view, and generating a drawing ending instruction; or,
and responding to a drawing canceling operation input based on the target annotation view, deleting the real-time drawing data in the display buffer area, and clearing the first annotation information on the target annotation view.
4. The annotation drawing method according to claim 1, wherein before sending, to a system layer, target drawing data captured based on the target annotation view upon receiving a drawing end instruction, the method further comprises:
calling a system operation library layer to write real-time drawing data captured based on the target annotation view into a display buffer area for storage;
when a drawing end instruction is received, sending the target drawing data captured based on the target annotation view to a system layer comprises:
when a drawing ending instruction is received, calling the system operation library layer to read real-time drawing data stored in the display buffer area to obtain target drawing data captured based on the target annotation view;
and sending the target drawing data captured based on the target annotation view to a system layer.
5. The annotation rendering method according to any one of claims 1 to 4, wherein before capturing the real-time rendering data input based on the target annotation view, the method comprises:
responding to the annotation request, hiding the icon on the display interface, and carrying out screenshot on the display interface after the icon is hidden to obtain a target annotation view;
and displaying the target annotation view.
6. The annotation rendering method of claim 5, wherein capturing real-time rendering data input based on the target annotation view comprises:
displaying an annotation toolbar in the target annotation view; the annotation toolbar comprises an annotation starting option;
responding to the operation based on the annotation starting option, and starting an annotation function;
responding to a drawing operation input based on the target annotation view, and acquiring touch data corresponding to a touch point of the drawing operation to obtain real-time drawing data; the drawing operation comprises a touch pressing operation and a touch moving operation.
7. The annotation rendering method of claim 6, wherein after displaying an annotation toolbar in the target annotation view, the method comprises:
responding to a touch movement event input based on the annotation toolbar, and determining a movement distance corresponding to the touch movement event;
if the moving distance is larger than or equal to a preset distance threshold, determining a target position of the annotation toolbar in the target annotation view according to a moving track corresponding to the touch moving event;
and moving the annotation toolbar to a target position in the target annotation view.
8. The annotation rendering method of claim 5, wherein the responding to the annotation request comprises:
symmetrically displaying annotation icons on two sides of the view of the display interface;
responding to a trigger event based on any one annotation icon, and symmetrically displaying functional options included by the annotation icon on two sides of a view of the display interface; the functional options include annotation options;
responding to an annotation request input based on the annotation option.
9. An apparatus for batch rendering, the apparatus comprising:
the data capturing module is used for capturing real-time drawing data input based on the target annotation view;
the data transmission module is used for sending the target drawing data captured based on the target annotation view to a system layer when a drawing ending instruction is received;
and the annotation drawing module is used for calling the system layer to draw the target drawing data, generating target annotation information and updating the target annotation view according to the target annotation information.
10. A terminal device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operation of the annotation drawing method according to any one of claims 1 to 8.
11. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the annotation rendering method of any one of claims 1 to 8.
CN202211431632.4A 2022-11-15 2022-11-15 Comment drawing method and device, terminal device and storage medium Pending CN115718578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211431632.4A CN115718578A (en) 2022-11-15 2022-11-15 Comment drawing method and device, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211431632.4A CN115718578A (en) 2022-11-15 2022-11-15 Comment drawing method and device, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN115718578A true CN115718578A (en) 2023-02-28

Family

ID=85255290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211431632.4A Pending CN115718578A (en) 2022-11-15 2022-11-15 Comment drawing method and device, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN115718578A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116740235A (en) * 2023-08-14 2023-09-12 福昕鲲鹏(北京)信息科技有限公司 Text annotation rendering method and device based on format document

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116740235A (en) * 2023-08-14 2023-09-12 福昕鲲鹏(北京)信息科技有限公司 Text annotation rendering method and device based on format document

Similar Documents

Publication Publication Date Title
US11137876B2 (en) Information display method, device and terminal for displaying progress on application icon
CN111984165B (en) Method and device for displaying message and terminal equipment
JP6130926B2 (en) Gesture conversation processing method, apparatus, terminal device, program, and recording medium
US20180152765A1 (en) Method for controlling multimedia playing, apparatus thereof and storage medium
CN108062190B (en) Application running state control method and mobile terminal
CN108549519B (en) Split screen processing method and device, storage medium and electronic equipment
WO2017129031A1 (en) Information acquisition method and device
US11658932B2 (en) Message sending method and terminal device
US20140365892A1 (en) Method, apparatus and computer readable storage medium for displaying video preview picture
WO2022105425A1 (en) Display method, electronic device, and readable storage medium
CN109960584A (en) CPU frequency modulation control method, terminal and computer readable storage medium
WO2020192322A1 (en) Display method and terminal device
US10320730B2 (en) Method and device for displaying message
CN108900407B (en) Method and device for managing session record and storage medium
WO2021031717A1 (en) Screen capturing method and terminal device
EP2876539A1 (en) Method, device and terminal apparatus for responding to a sliding operation
CN108052258B (en) Terminal task processing method, task processing device and mobile terminal
CN115718578A (en) Comment drawing method and device, terminal device and storage medium
CN111030918A (en) Message processing method, electronic equipment and server
CN110647506B (en) Picture deleting method and terminal equipment
CN112199141A (en) Message processing method, terminal and computer readable storage medium
WO2022267430A1 (en) Screen capture interaction method, and mobile terminal and storage medium
CN111639004B (en) User interface card pause monitoring method and device and storage medium
US11360579B2 (en) Capturing pen input by a pen-aware shell
CN109308164B (en) System migration method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination