Storage method of annotation data, electronic equipment and storage medium
By configuring the processor in the electronic device, recording user operation parameters and intercepting mixed pages, the problem of cumbersome annotation data storage method in the prior art is solved, and efficient storage and display of multiple page data is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202311341582.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing annotation data storage method can only process the data of the current page each time it is saved, and you need to exit the annotation mode when switching to the next page, which has a poor user experience.
By introducing processor configuration into electronic devices, recording the bottom parameters and annotation parameters in response to user operations, intercepting mixed pages and splicing the annotated media resources, batch storage and displaying of multiple page data is achieved.
It simplifies user operation steps, avoids the problem of saving annotated data on a page-by-page basis, improves the user experience, and realizes efficient storage and display of data on multiple pages.
Smart Images

Figure CN119854561A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for storing annotation data, an electronic device, and a storage medium. Background Art
[0002] Annotating media resources displayed on electronic devices and synchronously saving annotation data and media resources can improve efficiency in collaboration, learning, and work.
[0003] The current annotation data saving scheme usually annotates the media resources in the current screen page, then takes a screenshot of the media resources displayed on the current screen and the annotation data entered by the user, and saves the annotation data and media resources in the current page. However, this annotation data saving method can only save the annotation data and media resources in the current page each time it is saved, and if you want to annotate and save the media resources in the next page, you need to exit the annotation mode first, then display the media resources on the next page, and then start the annotation mode again to annotate and save, etc. The process is cumbersome and the user experience is poor. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a method for saving annotation data, an electronic device and a storage medium, which can improve the user experience.
[0005] In a first aspect, the present application provides an electronic device, including a processor and a display, wherein the processor and the display are communicatively connected;
[0006] The processor is configured as:
[0007] In response to an operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter; the bottom parameter is a parameter recorded when the user operates the bottom view, and the annotation parameter is a parameter recorded when the user operates the annotation view; the mixed page includes a bottom page corresponding to the bottom view and an annotation page corresponding to the annotation view; the bottom page is used for the media resource, and the annotation page is used to display the annotation data corresponding to the media resource;
[0008] splicing at least one mixed page to obtain annotated media resources;
[0009] The display is configured to display the annotated media resource.
[0010] In some embodiments, the electronic device further comprises a touch component, the touch component being communicatively connected to the display;
[0011] The touch component is configured to: in response to a user's operation of turning on the annotation mode, monitor touch events based on the annotation view; the annotation view is covered on the upper layer of the bottom view;
[0012] The processor is also configured to:
[0013] When a first touch event is detected, a bottom parameter corresponding to the first touch event is recorded, and the first touch event and the bottom parameter are distributed to the bottom view;
[0014] Respond to the first touch event based on the bottom view and the bottom parameters.
[0015] In some embodiments, the processor is further configured to:
[0016] In the case of monitoring the second touch event, recording the annotation parameter corresponding to the second touch event; the second touch event is used to operate the annotation view;
[0017] Based on the annotation view and the annotation parameters, respond to the second touch event.
[0018] In some embodiments, the bottom parameter includes a sliding distance, and the annotation parameter includes a track point coordinate and a track point length;
[0019] The processor is specifically configured as follows:
[0020] Determine the target bottom page corresponding to the target track point based on the track point length of the target track point; the target track point is any track point;
[0021] Draw annotations in the annotation page corresponding to the target bottom page based on the track point coordinates.
[0022] In some embodiments, the processor is further configured to: add a listening event to the annotation view to listen to touch events.
[0023] In some embodiments, the processor is specifically configured to:
[0024] In response to an operation of saving the annotation data of the media resource, a saving operation is performed on the bottom view and the annotation view according to the bottom parameter and the annotation parameter to obtain at least one mixed page;
[0025] Among them, the saving operation includes: A. Controlling the bottom view to slide to the target bottom page based on the bottom parameters; B. Controlling the annotation view to display the target annotation page based on the annotation parameters; C. Intercepting the target bottom page and the target annotation page to obtain the target mixed page; D. When the target bottom page is not the target page, looping steps AC until the target page is reached to obtain at least one mixed page; wherein the target bottom page is any annotated bottom page, the target annotation page is the annotation page corresponding to the target bottom page, and the target page is the last annotated target bottom page in the target bottom page.
[0026] In some embodiments, the bottom parameter includes a sliding distance, and the processor is specifically configured to:
[0027] When the target bottom page is the first annotated bottom page, the sum of the sliding distances corresponding to all bottom pages before the current bottom page is determined as the sliding length;
[0028] Control the bottom view to slide in the direction of the target bottom page by the sliding length to reach the target bottom page.
[0029] In some embodiments, the processor is specifically configured to: splice at least one mixed page in the interception order to obtain the annotated media resource.
[0030] In a second aspect, the present application provides a method for storing annotation data, comprising:
[0031] In response to an operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter; the bottom parameter is a parameter recorded when the user operates the bottom view, and the annotation parameter is a parameter recorded when the user operates the annotation view; the mixed page includes a bottom page corresponding to the bottom view and an annotation page corresponding to the annotation view; the bottom page is used to display the media resource, and the annotation page is used to display the annotation data corresponding to the media resource;
[0032] splicing at least one mixed page to obtain annotated media resources;
[0033] Displays the annotated media resource.
[0034] In some embodiments, in response to the operation of saving the annotation data of the media resource, before intercepting at least one mixed page according to the bottom parameter and the annotation parameter, the method further includes:
[0035] In response to the user's operation of turning on the annotation mode, the touch event is monitored based on the annotation view; the annotation view is covered on the upper layer of the bottom view;
[0036] In the case of monitoring the first touch event, recording the bottom parameter corresponding to the first touch event, and distributing the first touch event and the bottom parameter to the bottom view; the first touch event is used to operate the bottom view;
[0037] Respond to the first touch event based on the bottom view and the bottom parameters.
[0038] In some embodiments, after listening to the touch event based on the annotation view, the method further includes:
[0039] In the case of monitoring the second touch event, recording the annotation parameter corresponding to the second touch event; the second touch event is used to operate the annotation view;
[0040] Based on the annotation view and the annotation parameters, respond to the second touch event.
[0041] In some embodiments, the bottom parameter includes a sliding distance, and the annotation parameter includes a track point coordinate and a track point length; and the method for responding to a second touch event based on the annotation view and the annotation parameter includes:
[0042] Determine the target bottom page corresponding to the target track point based on the track point length of the target track point; the target track point is any track point;
[0043] Draw annotations in the annotation page corresponding to the target bottom page based on the track point coordinates.
[0044] In some embodiments, before monitoring the touch event based on the annotation view, the method further includes: adding a monitoring event for the annotation view to monitor the touch event.
[0045] In some embodiments, in response to an operation of saving annotation data of a media resource, intercepting at least one mixed page according to the bottom parameter and the annotation parameter includes:
[0046] In response to an operation of saving the annotation data of the media resource, a saving operation is performed on the bottom view and the annotation view according to the bottom parameter and the annotation parameter to obtain at least one mixed page;
[0047] Among them, the saving operation includes: A. Controlling the bottom view to slide to the target bottom page based on the bottom parameters; B. Controlling the annotation view to display the target annotation page based on the annotation parameters; C. Intercepting the target bottom page and the target annotation page to obtain the target mixed page; D. When the target bottom page is not the target page, looping steps AC until the target page is reached to obtain at least one mixed page; wherein the target bottom page is any annotated bottom page, the target annotation page is the annotation page corresponding to the target bottom page, and the target page is the last annotated target bottom page in the target bottom page.
[0048] In some embodiments, the bottom parameter includes a sliding distance, and when the target bottom page is the first annotated bottom page, controlling the bottom view to slide to the target bottom page based on the bottom parameter includes:
[0049] The sum of the sliding distances corresponding to all bottom pages before the current bottom page is determined as the sliding length;
[0050] Control the bottom view to slide in the direction of the target bottom page by the sliding length to reach the target bottom page.
[0051] In some embodiments, splicing at least one mixed page to obtain annotated media resources includes: splicing at least one mixed page in an interception order to obtain annotated media resources.
[0052] In a third aspect, the present application provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computing device, the computing device executes a method for saving annotation data as provided in any embodiment of the second aspect.
[0053] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer executes the method for saving annotation data provided in any embodiment of the second aspect.
[0054] Compared with the prior art, the technical solution provided by this application has the following advantages:
[0055] In the above scheme, in response to the operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter, and then at least one mixed page is spliced to obtain and display the annotated media resource. Among them, the bottom parameter is the parameter recorded when the user operates the bottom view, and the annotation parameter is the parameter recorded when the user operates the annotation view; the mixed page includes the bottom page corresponding to the bottom view and the annotation page corresponding to the annotation view; the bottom page is used to display the media resource, and the annotation page is used to display the annotation data corresponding to the media resource. In this way, when saving the annotation data, multiple mixed pages can be intercepted for splicing and saving, avoiding the problem that when the media resource has multiple display pages, the annotation data can only be saved page by page, thereby improving the user experience. In addition, it also avoids the need to exit the annotation mode first, then display the media resource of the next page, and then start the annotation mode to annotate and save when you want to annotate and save the display page of the next media resource, which simplifies the user's operation steps and further improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0058] Figure 1 A schematic diagram of an application scenario architecture of a method for storing annotation data provided in an embodiment of the present application;
[0059] Figure 2 A schematic diagram of the hardware configuration of an electronic device provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of software configuration of an electronic device provided in an embodiment of the present application;
[0061] Figure 4 One of the flowcharts of the method for saving annotation data provided in the embodiment of the present application;
[0062] Figure 5 A schematic diagram of the positional relationship between the bottom view and the annotation view provided in the embodiment of the present application;
[0063] Fig. 6A One of the page structure diagrams provided in the embodiment of the present application;
[0064] Figure 6B A second schematic diagram of a page structure provided in an embodiment of the present application;
[0065] Figure 7 A third schematic diagram of a page structure provided in an embodiment of the present application;
[0066] Figure 8 A second flowchart of a method for storing annotation data provided in an embodiment of the present application;
[0067] Fig. 9 A third flowchart of the method for storing annotation data provided in an embodiment of the present application;
[0068] Fig.10 A fourth schematic diagram of a page structure provided in an embodiment of the present application;
[0069] Fig.11 A fourth flowchart of a method for storing annotation data provided in an embodiment of the present application;
[0070] Fig.12 A fifth schematic diagram of a page structure provided in an embodiment of the present application;
[0071] Fig.13 A fifth flowchart of a method for storing annotation data provided in an embodiment of the present application;
[0072] Fig.14 Flow chart six of the method for saving annotation data provided in the embodiment of the present application;
[0073] Fig.15 Flow chart of the method for saving annotation data provided in the embodiment of the present application, No. 7;
[0074] Fig.16 A schematic diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0076] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0077] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0078] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0079] The electronic device provided in the embodiments of the present application may have various implementation forms, for example, it may be a mobile phone, a computer, a tablet computer, a television, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc.
[0080] Figure 1 Schematic diagram of an application scenario of the method for saving annotation data provided in the embodiment of the present application. Figure 1 As shown, the scenario includes a user 100 and an electronic device 200. The user 100 can control the electronic device 200 through input operations. For example, the user 100 can browse media resources on the electronic device 200, and add annotations to the media resource display page and save the annotated media resources. In response to the operation of saving the annotation data of the media resource, the electronic device 200 intercepts at least one mixed page according to the bottom parameters and the annotation parameters, and splices at least one mixed page to obtain and display the annotated media resource. In this way, multiple mixed pages can be intercepted and spliced and saved, avoiding the problem that when the media resource has multiple display pages, the annotation data can only be saved page by page, simplifying the user's operation steps and improving the user experience.
[0081] In some embodiments, the user 100 can control the electronic device 200 by performing input operations on the electronic device 200 through the control device. The control device and the electronic device 200 can be connected to each other by wired or wireless communication. For example, when the control device is a device such as a mouse, a keyboard, a stylus, etc., the mouse, keyboard, stylus, etc. and the electronic device 200 can be connected by a Universal Serial Bus (USB) or by a Bluetooth protocol communication. In this way, the user can control the electronic device 200 by performing input operations by directly drawing and writing with a mouse button, a keyboard button, or a stylus.
[0082] In some embodiments, the electronic device 200 may not use the above-mentioned control device to receive instructions, but may receive control from the user 100 through touch or gestures.
[0083] In some embodiments, the electronic device 200 can also be controlled in a manner other than a control device. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the electronic device 200, or the user's voice command control can be received through a voice control device set outside the electronic device 200.
[0084] Figure 2 FIG. 2 is a schematic diagram of a hardware configuration of an electronic device 200 provided in an embodiment of the present application. Figure 2 The electronic device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0085] The display 260 may include a touch component for providing an entry for interactive operation input for the user to realize the interaction between the electronic device 200 and the user. For example, the touch component responds to the user's operation of turning on the annotation mode and monitors the touch event based on the annotation view. The display 260 also includes a display screen component for presenting the picture, and a driving component for driving the image display, which is used to receive the image signal output from the controller, display the video content, image content and the menu control interface component and the user control UI interface.
[0086] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0087] The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The electronic device 200 can establish the transmission and reception of control signals and data signals with an external control device or server through the communicator 220.
[0088] The user interface can be used to receive control signals input by the user through a control device (such as a mouse, keyboard, stylus, etc.) or touch or gesture.
[0089] The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0090] The external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0091] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
[0092] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0093] The controller 250 controls the operation of the electronic device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the electronic device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform an operation related to the object selected by the user command.
[0094] In some embodiments, the controller 250 includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a RAM Random Access Memory (RAM), a ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.
[0095] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
[0096] "User interface" is the medium interface for interaction and information exchange between applications or operating systems and users. It realizes the conversion between the internal form of information and the form acceptable to users. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to the user interface related to computer operation displayed in a graphical way. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.
[0097] Figure 3 A software configuration diagram of an electronic device provided in an embodiment of the present application. Figure 3 In some embodiments, the operating system of the electronic device 200 is divided into four layers, namely, from top to bottom, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.
[0098] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0099] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0100] like Figure 3 As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to applications currently installed on the device; a notification manager (Notification Manager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0101] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).
[0102] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0103] In some embodiments, the kernel layer is a layer between hardware and software. Figure 3 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0104] In some embodiments, the processor in the controller 250 of the electronic device 200 intercepts at least one mixed page according to the bottom parameters and the annotation parameters in response to the operation of saving the annotation data of the media resource, and then splices at least one mixed page to obtain and display the annotated media resource. Among them, the bottom parameters are the parameters recorded when the user operates the bottom view, and the annotation parameters are the parameters recorded when the user operates the annotation view; the mixed page includes the bottom page corresponding to the bottom view and the annotation page corresponding to the annotation view; the bottom page is used for the media resource, and the annotation page is used to display the annotation data corresponding to the media resource. The ability to intercept multiple mixed pages for splicing and saving avoids the problem that when the media resource has multiple display pages, the annotation data can only be saved page by page, simplifies the user's operation steps, and improves the user experience.
[0105] Figure 4 A flowchart diagram of a method for storing annotation data provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the method for saving annotation data includes the following steps:
[0106] S11 . In response to an operation of saving annotation data of a media resource, intercept at least one mixed page according to bottom parameters and annotation parameters.
[0107] First, the bottom view is a view of the electronic device displaying media resources, and the annotation view is a transparent view superimposed on the top of the bottom view when the annotation mode of the electronic device is turned on, which is used to respond to the user's annotations on the media resources. Figure 5 A schematic diagram of the positional relationship between the bottom view and the annotation view provided in the embodiment of the present application, such as Figure 5 As shown, the annotation view 22 is a transparent view superimposed on the bottom view 21. The media resources in this application can be resources such as videos, pictures, articles, etc. that can be displayed on the screen of an electronic device.
[0108] The electronic device can display the media resource in the bottom view to generate a bottom page corresponding to the media resource in the bottom view. Similarly, when the annotation mode is turned on, the electronic device can display the user's annotation data on the media resource in the annotation view to generate an annotation page corresponding to the media resource in the annotation view.
[0109] For example, Fig. 6A A bottom page schematic diagram provided for an embodiment of the present application includes a bottom view 30 and a media resource 31 , wherein the bottom view 30 and the media resource 31 constitute a bottom page corresponding to the media resource 31 in the bottom view 30 . Figure 6B A schematic diagram of an annotation page provided in an embodiment of the present application includes an annotation view 40 and annotation data 41 . The annotation view 40 and the annotation data 41 constitute an annotation page corresponding to the media resource 31 in the annotation view 40 .
[0110] The mixed page includes a bottom page corresponding to the bottom view and an annotation page corresponding to the annotation view. The bottom page is used to display media resources, and the annotation page is used to display annotation data corresponding to the media resources. For example, Figure 7 A schematic diagram of a mixed page provided in an embodiment of the present application includes Fig. 6A The bottom page consisting of the bottom view 30 (located at the bottom layer, overlapping with the annotation view 40) and the media resource 31, and Figure 6B The annotation page consists of an annotation view 40 (located at the top layer, overlapping with the bottom view 30) and annotation data 41.
[0111] Afterwards, since at least one mixed page needs to be intercepted according to the bottom parameter and the annotation parameter, the bottom parameter and the annotation parameter need to be obtained first.
[0112] In some embodiments, the bottom parameters are parameters recorded when the user operates the bottom view, and the annotation parameters are parameters recorded when the user operates the annotation view. Therefore, the bottom parameters can be obtained by the electronic device recording the bottom parameters in addition to responding to the user's operation on the bottom view when the user operates the bottom view. Similarly, the annotation parameters can be obtained by the electronic device recording the annotation parameters in addition to responding to the user's operation on the annotation view when the user operates the annotation view.
[0113] In some embodiments, Figure 8 As shown, the electronic device responds to the user's operation on the bottom view and records the bottom parameters in a manner that may include the following steps:
[0114] S08. In response to the user's operation of turning on the annotation mode, a touch event is monitored based on the annotation view.
[0115] Among them, the annotation view is covered on the top layer of the bottom view.
[0116] In some embodiments, Fig. 9 As shown, in response to the user's operation of turning on the annotation mode, before listening to the touch event based on the annotation view, it also includes:
[0117] S05. Add a monitoring event to the annotation view to monitor touch events.
[0118] In this way, when the user turns on the annotation mode, the listening event of the annotation view automatically listens to the touch event, and when the touch event is listened to, it is determined whether the touch event is the first touch event.
[0119] In the above solution, a monitoring event can be added to the annotation view to facilitate subsequent monitoring of touch events and distribution, so that the user can directly switch the screen in the annotation mode, thereby improving the user experience.
[0120] S09: When a first touch event is monitored, record a bottom parameter corresponding to the first touch event, and distribute the first touch event and the bottom parameter to the bottom view.
[0121] The first touch event is used to operate the bottom view.
[0122] First, it is determined that a first touch event is monitored.
[0123] In some embodiments, the first touch event corresponds to a user operation that is pre-stored. For example, the user operation corresponding to the first touch event is a two-finger slide of the user. Thus, when the listener event of the annotation view listens to the two-finger slide event of the user, it determines that the first touch event is detected. Exemplarily, when the first touch event corresponds to a two-finger slide of the user, Fig.10 A schematic diagram of a first touch event scenario provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, when the monitoring event monitors a down event in which two fingers touch the screen, it is determined that the first touch event is monitored.
[0124] Afterwards, the bottom parameter corresponding to the first touch event is recorded.
[0125] In some embodiments, the bottom parameter includes a sliding distance and a sliding direction. The sliding distance is the distance that the user slides on the annotation view, and the sliding direction is the direction that the user slides on the annotation view.
[0126] Exemplarily, when the first touch event corresponds to a two-finger sliding operation, Fig.10 A schematic diagram of a first touch event scenario provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, when the event monitoring first monitors the down event of two fingers touching the screen, it is determined that the first touch event is monitored, and at this time, the sliding distance and sliding direction of the user's two fingers are started to be tracked; when the touch move event is monitored, it is determined that the user starts to slide with two fingers, and at this time, the sliding distance and sliding direction of the user's two fingers are continued to be tracked; when the touch up event is monitored, it is determined that the user's two fingers slide ends, and at this time, the tracking of the sliding distance and sliding direction of the user's two fingers slide ends, and the sliding direction and sliding distance of this two-finger slide are recorded, and it is determined that the first touch event is ended.
[0127] In some embodiments, a queue is used to record the bottom parameter corresponding to the first touch event. For example, a HashMap is used.<key,value> The queue records the bottom parameter corresponding to the first touch event, wherein HashMap is used to represent the queue for recording the bottom parameter, the key is used to represent the sliding direction, and the value is used to represent the sliding distance.
[0128] After that, the first touch event and the bottom parameter are distributed to the bottom view.
[0129] In some embodiments, the first touch event and the bottom parameter are distributed to the bottom view based on the annotation view by using a preset interface, which is a communication interface between the annotation view and the bottom view.
[0130] S10. Respond to a first touch event based on the bottom view and the bottom parameter.
[0131] In some embodiments, based on the bottom view and the bottom parameters, the way to respond to the first touch event may be that the bottom view controls the bottom page to slide in the direction corresponding to the sliding direction according to the bottom parameters, and slides the device distance corresponding to the sliding distance. The device distance corresponding to the sliding distance may be a distance determined by the electronic device based on the sliding distance and the distance ratio; the distance ratio is preconfigured, for example, it may be a default value, or a ratio preset by relevant personnel according to the situation of the device. Exemplarily, when the distance ratio is 1:1, the sliding distance is the same as the device distance, that is, when the user slides 1 centimeter (cm) on the screen, the electronic device controls the bottom page to slide 1 cm when responding to the first touch event.
[0132] In some embodiments, when responding to the first touch event based on the bottom view and the bottom parameters, the method further includes: shielding the writing and erasing functions on the annotation view to prevent the annotation view from affecting the user's experience when the user operates the bottom view.
[0133] In the above scheme, when the user turns on the annotation mode, the electronic device can monitor touch events based on the annotation view, and when monitoring the first touch event, record the bottom parameter corresponding to the first touch event, distribute the first touch event and the bottom parameter to the bottom view, and respond to the first touch event based on the bottom view and the bottom parameter. In this way, in the annotation mode, the user can directly switch screens, avoiding the problem that when the user wants to browse the next screen in the annotation mode, he needs to exit the annotation mode first and then display the media resources of the next page, which simplifies the user's operation steps and further improves the user experience.
[0134] In some embodiments, Fig.11 As shown, the electronic device responds to the user's operation on the annotation view and records the annotation parameters in a manner that may include the following steps:
[0135] S06. When a second touch event is monitored, record annotation parameters corresponding to the second touch event.
[0136] First, it is determined that a second touch event is monitored, wherein the second touch event is used to operate the annotation view.
[0137] In some embodiments, the second touch event corresponds to a user operation that is pre-stored. For example, the user operation corresponding to the second touch event is a single-finger slide of the user. In this way, when the listener event of the annotation view listens to the single-finger slide event of the user, it determines that the second touch event is detected. Exemplarily, when the user operation corresponding to the second touch event is a single-finger slide, Fig.12 A schematic diagram of a second touch event scenario provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, when the monitoring event monitors a down event in which a single finger touches the screen, it is determined that a second touch event is monitored.
[0138] Afterwards, the annotation parameters corresponding to the second touch event are recorded, wherein the bottom parameter includes the sliding distance, and the annotation parameters include the track point coordinates and the track point length.
[0139] In some embodiments, the track point coordinates are the coordinates of the track point in the annotation view, and the track point length is the sum of all sliding distances before the track point is generated, which is used to characterize the position of the track point in the bottom page corresponding to the bottom view.
[0140] Exemplarily, when the second touch event corresponds to a single-finger sliding operation, Fig.12 A schematic diagram of a second touch event scenario provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, when the monitoring event first monitors the down event of a single finger touching the screen, it is determined that the first touch event is monitored, and at this time, the coordinates of the trajectory points of the user's single finger moving on the screen are recorded, and the length of the trajectory points is calculated and recorded accordingly; when the touch move event is monitored, it is determined that the user starts to slide with a single finger, and at this time, the coordinates of the trajectory points of the user's single finger moving on the screen and the length of the trajectory points are continued to be recorded; when the touch up event is monitored, it is determined that the user's single finger sliding ends, and at this time, the recording of the coordinates of the trajectory points of the user's single finger moving on the screen and the length of the trajectory points is stopped, and it is determined that the second touch event is ended.
[0141] In some embodiments, when recording the coordinates of the track points, the application does not limit the establishment of the coordinate system. However, it should be noted that the coordinate system used by all track points should be the same coordinate system to avoid the problem of being unable to draw due to the change of the coordinate system when drawing the track later.
[0142] S07. Respond to a second touch event based on the annotation view and the annotation parameters.
[0143] In some embodiments, Fig.13 As shown, based on the annotation view and the annotation parameters, the way to respond to the second touch event can be:
[0144] S071. Determine a target bottom page corresponding to the target track point based on the track point length of the target track point.
[0145] Among them, the target trajectory point is any trajectory point.
[0146] Exemplarily, assume that the user operation corresponding to the first touch event is a two-finger slide, and the user operation corresponding to the second touch event is a single-finger slide. The user starts the annotation mode on the bottom page A. The sliding distance of the first two-finger slide is a. At this time, due to the insufficient sliding distance of the two-finger slide, the bottom view is still on the bottom page A; the sliding distance of the second two-finger slide is b. At this time, the bottom view slides to the bottom page B in response to the first touch event. Afterwards, the user slides with a single finger through the first track point (x1, y1), the second track point (x2, y2), and the third track point (x3, y3) in sequence. Then the track point lengths of the first track point (x1, y1), the second track point (x2, y2), and the third track point (x3, y3) are all a+b, and the target bottom pages corresponding to the first track point (x1, y1), the second track point (x2, y2), and the third track point (x3, y3) are all bottom page B.
[0147] S072. Draw annotations in the annotation page corresponding to the target bottom page based on the coordinates of the track point.
[0148] In some embodiments, the method of drawing annotations in the annotation page corresponding to the target bottom page based on the track point coordinates can be to determine the drawing method of the annotation according to the drawing tool selected by the user, and then use the determined drawing method to draw the annotations in the annotation page corresponding to the target bottom page according to the track point coordinates.
[0149] In some embodiments, the drawing mode of drawing annotations includes at least writing annotations and erasing annotations. The selection of the drawing mode depends on the drawing tool selected by the user. For example, when the drawing tool selected by the user is a pen, the drawing mode is determined to be writing annotations; when the drawing tool selected by the user is an eraser, the drawing mode is determined to be erasing annotations.
[0150] In the above scheme, the bottom page corresponding to the track point can be determined according to the length of the track point, and then the annotation is drawn on the annotation page corresponding to the bottom page according to the coordinates of the track point. In this way, the problem of the annotation page not corresponding to the bottom page is avoided, and the user experience is improved.
[0151] Afterwards, in response to an operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter.
[0152] In some embodiments, the user's operation of saving the annotation data of the media resource may be that the user triggers a save control to save the annotation data of the media resource; or the user triggers a save as control to store the annotation data of the media resource to another path, etc.
[0153] Finally, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter.
[0154] In some embodiments, in response to an operation to save annotation data of a media resource, a method of intercepting at least one mixed page according to bottom parameters and annotation parameters may be: in response to an operation to save annotation data of a media resource, a save operation is performed on a bottom view and an annotation view according to the bottom parameters and annotation parameters to obtain at least one mixed page.
[0155] Among them, Fig.14 As shown, the save operation includes the following steps:
[0156] A: Control the bottom view to slide to the target bottom page based on the bottom parameters.
[0157] The target bottom page is any annotated bottom page.
[0158] In some embodiments, the method of controlling the bottom view to slide to the target bottom page based on the bottom parameters can be to control the bottom view to slide to each target bottom page in turn according to the order in which the annotations are drawn based on the bottom parameters, and then execute step BD for each target bottom page to obtain at least one mixed page.
[0159] In some embodiments, Fig.15 As shown, when the target bottom page is the first annotated bottom page, the bottom view is controlled to slide to the target bottom page based on the bottom parameter, including:
[0160] S1111. Determine the sum of the sliding distances corresponding to all bottom pages before the current bottom page as the sliding length.
[0161] For example, assuming that the current bottom page is bottom page D, and there are bottom page A, bottom page B, and bottom page C before bottom page D, that is, when the user browses the media resources, the first annotated page is bottom page A, followed by bottom page B, bottom page C, and bottom page D. Among them, when the sliding distance of bottom page A includes sliding distance a and sliding distance b, the sliding distance of bottom page B includes sliding distance c, and the sliding distance of bottom page C includes sliding distance d, the sum of the sliding distances corresponding to all bottom pages before bottom page D is a+b+c+d, that is, the sliding length is a+b+c+d.
[0162] S1112. Control the bottom view to slide in the direction of the target bottom page by a sliding length to reach the target bottom page.
[0163] Exemplarily, when the sliding length is a+b+c+d, the bottom view slides a+b+c+d in the direction of the target bottom page to reach the target bottom page.
[0164] In the above solution, the first annotated bottom page can be located according to the bottom parameter, so as to facilitate the subsequent saving operation to capture multiple mixed pages.
[0165] B. Control the annotation view to display the target annotation page based on the annotation parameters.
[0166] Among them, the target annotation page is the annotation page corresponding to the target bottom page.
[0167] In some embodiments, the method of controlling the annotation view to display the target annotation page based on the annotation parameters can be: first, determine the target annotation parameters corresponding to the target annotation page in the annotation parameters based on the target bottom page; then draw the annotation on the target annotation page according to the track point coordinates in the target annotation parameters to display the target annotation page including the annotation data.
[0168] C. Intercept the target bottom page and the target annotation page to obtain the target mixed page.
[0169] Specifically, since the annotation view of the target annotation page is superimposed on the upper layer of the bottom view of the target bottom page, the electronic device can obtain the target mixed page by directly intercepting the current interface.
[0170] D. When the target bottom page is not the target page, loop through steps AC; when the target bottom page is the target page, obtain at least one mixed page.
[0171] The target page is the target bottom page that is annotated last in the target bottom page.
[0172] First, determine whether the target bottom page is the target page.
[0173] In some embodiments, the method for determining whether the target bottom page is the target page can be to query whether there is corresponding annotation data in the subsequent bottom pages after the target bottom page. If there is annotation data in any subsequent bottom page, it is determined that the target bottom page is not the target page; if there is no annotation data in all subsequent bottom pages, it is determined that the target bottom page is the target page.
[0174] Afterwards, when the target bottom page is not the target page, steps AC are executed in a loop, and when the target bottom page is the target page, at least one mixed page is obtained.
[0175] The at least one mixed page includes a target mixed page corresponding to each target bottom page, that is, one target bottom page corresponds to one target mixed page.
[0176] In the above scheme, in response to the operation of saving the annotation data of the media resource, the bottom view can be controlled to slide to each target bottom page in turn according to the order of annotation drawing based on the bottom parameters, and then the interception operation is performed for each target bottom page and its corresponding target annotation page to obtain at least one mixed page. In this way, when the user triggers a save operation, multiple mixed pages can be directly obtained, avoiding the problem of only being able to save annotation data page by page when the media resource has multiple display pages, thereby improving the user experience.
[0177] S12. Splice at least one mixed page to obtain annotated media resources.
[0178] In some embodiments, the method of splicing at least one mixed page to obtain the annotated media resource may be to splice at least one mixed page in the order in which the mixed pages were intercepted to obtain the annotated media resource. In this way, at least one mixed page can be spliced in the order in which the mixed pages were intercepted to obtain the annotated media resource. This avoids the problem of confusion in the pages of the annotated media resource obtained when the mixed pages are not spliced in order, and further improves the user experience.
[0179] S13. Display the annotated media resources.
[0180] In the above scheme, in response to the operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter, and then at least one mixed page is spliced to obtain and display the annotated media resource. Among them, the bottom parameter is the parameter recorded when the user operates the bottom view, and the annotation parameter is the parameter recorded when the user operates the annotation view; the mixed page includes the bottom page corresponding to the bottom view and the annotation page corresponding to the annotation view; the bottom page is used to display the media resource, and the annotation page is used to display the annotation data corresponding to the media resource. In this way, when saving the annotation data, multiple mixed pages can be intercepted for splicing and saving, avoiding the problem that when the media resource has multiple display pages, the annotation data can only be saved page by page, thereby improving the user experience. In addition, it also avoids the need to exit the annotation mode first, then display the media resource of the next page, and then start the annotation mode to annotate and save when you want to annotate and save the display page of the next media resource, which simplifies the user's operation steps and further improves the user experience.
[0181] The embodiment of the present application can divide the storage device of the annotation data into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0182] An embodiment of the present application further provides a device for storing annotation data, which is applied to electronic devices and includes a capture module, a splicing module, and a display module.
[0183] The interception module is used to intercept at least one mixed page according to the bottom parameter and the annotation parameter in response to the operation of saving the annotation data of the media resource; the bottom parameter is the parameter recorded when the user operates the bottom view, and the annotation parameter is the parameter recorded when the user operates the annotation view; the mixed page includes the bottom page corresponding to the bottom view and the annotation page corresponding to the annotation view; the bottom page is used to display the media resource, and the annotation page is used to display the annotation data corresponding to the media resource;
[0184] A splicing module, used for splicing at least one mixed page to obtain annotated media resources;
[0185] The display module is used to display the annotated media resources.
[0186] In some embodiments, the storage device for annotation data further includes a monitoring module, a distribution module, and a response module;
[0187] A monitoring module, used for responding to the user's operation of opening the annotation mode, and monitoring the touch event based on the annotation view; the annotation view is covered on the upper layer of the bottom view;
[0188] a distribution module, configured to, when a first touch event is monitored, record a bottom parameter corresponding to the first touch event, and distribute the first touch event and the bottom parameter to the bottom view; the first touch event is used to operate the bottom view;
[0189] The response module is used to respond to the first touch event based on the bottom view and the bottom parameter.
[0190] In some embodiments, the device for storing annotation data further includes a recording module and a response module.
[0191] A recording module, used for recording annotation parameters corresponding to the second touch event when a second touch event is monitored; the second touch event is used to operate the annotation view;
[0192] The response module is used to respond to the second touch event based on the annotation view and the annotation parameters.
[0193] In some embodiments, the bottom parameter includes a sliding distance, and the annotation parameter includes a track point coordinate and a track point length;
[0194] Response module, specifically used for:
[0195] Determine the target bottom page corresponding to the target track point based on the track point length of the target track point; the target track point is any track point;
[0196] Draw annotations in the annotation page corresponding to the target bottom page based on the track point coordinates.
[0197] In some embodiments, the device for storing annotation data further includes a processing module; the processing module is used to add a monitoring event to the annotation view, and is used to monitor touch events.
[0198] In some embodiments, the interception module is specifically configured to:
[0199] In response to an operation of saving the annotation data of the media resource, a saving operation is performed on the bottom view and the annotation view according to the bottom parameter and the annotation parameter to obtain at least one mixed page;
[0200] Among them, the saving operation includes: A. Controlling the bottom view to slide to the target bottom page based on the bottom parameters; B. Controlling the annotation view to display the target annotation page based on the annotation parameters; C. Intercepting the target bottom page and the target annotation page to obtain the target mixed page; D. When the target bottom page is not the target page, looping steps AC until the target page is reached to obtain at least one mixed page; wherein the target bottom page is any annotated bottom page, the target annotation page is the annotation page corresponding to the target bottom page, and the target page is the last annotated target bottom page in the target bottom page.
[0201] In some embodiments, the bottom parameter includes a sliding distance, and the interception module is specifically used to:
[0202] The sum of the sliding distances corresponding to all bottom pages before the current bottom page is determined as the sliding length;
[0203] Control the bottom view to slide in the direction of the target bottom page by the sliding length to reach the target bottom page.
[0204] In some embodiments, the splicing module is specifically used to splice at least one mixed page according to the interception order to obtain the annotated media resource.
[0205] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and its role will not be repeated here.
[0206] like Fig.16 As shown, an embodiment of the present application also provides a chip system, which can be applied to the electronic device 200 in the aforementioned embodiment. The chip system includes at least one processor 1601 and at least one interface circuit 1602. The processor 1601 can be the processor in the above-mentioned electronic device 200. The processor 1601 and the interface circuit 1602 can be interconnected through a line. The processor 1601 can receive and execute computer instructions from the memory of the above-mentioned electronic device 200 through the interface circuit 1602. When the computer instructions are executed by the processor 1601, the electronic device 200 can execute the various steps performed by the electronic device 200 in the above-mentioned embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0207] The embodiment of the present application also provides a computer-readable storage medium for storing computer instructions executed by the above-mentioned electronic device 200.
[0208] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An electronic device, characterized in that: It includes a processor and a display, wherein the processor and the display are communicatively connected; The processor is configured to: In response to an operation of saving the annotation data of the media resource, at least one mixed page is intercepted according to the bottom parameter and the annotation parameter; the bottom parameter is a parameter recorded when the user operates the bottom view, and the annotation parameter is a parameter recorded when the user operates the annotation view; the mixed page includes a bottom page corresponding to the bottom view and an annotation page corresponding to the annotation view; the bottom page is used for the media resource, and the annotation page is used to display the annotation data corresponding to the media resource; splicing the at least one mixed page to obtain annotated media resources; The display is configured to display the annotated media resources.
2. The electronic device according to claim 1, characterized in that: The electronic device further comprises a touch component, wherein the touch component is communicatively connected with the display; The touch component is configured to: in response to a user's operation of opening the annotation mode, monitor a touch event based on the annotation view; The annotation view is overlaid on the upper layer of the bottom view; The processor is further configured to: In the case of monitoring a first touch event, recording a bottom parameter corresponding to the first touch event, and distributing the first touch event and the bottom parameter to a bottom view; The first touch event is used to operate the bottom view; Based on the bottom view and the bottom parameters, respond to the first touch event.
3. The electronic device according to claim 2, characterized in that: The processor is further configured to: In the case of monitoring a second touch event, recording an annotation parameter corresponding to the second touch event; the second touch event is used to operate the annotation view; The second touch event is responded to based on the annotation view and the annotation parameters.
4. The electronic device according to claim 3, characterized in that: The bottom parameters include sliding distance, and the annotation parameters include track point coordinates and track point length; The processor is specifically configured to: Determine the target bottom page corresponding to the target trajectory point based on the trajectory point length of the target trajectory point; the target trajectory point is any trajectory point; Draw annotations in the annotation page corresponding to the target bottom page based on the track point coordinates.
5. The electronic device according to claim 2, characterized in that: The processor is further configured to add a monitoring event to the annotation view for monitoring touch events.
6. The electronic device according to any one of claims 1 to 5, characterized in that: The processor is specifically configured to: In response to an operation of saving the annotation data of the media resource, a saving operation is performed on the bottom view and the annotation view according to the bottom parameter and the annotation parameter to obtain at least one mixed page; Among them, the saving operation includes: A. controlling the bottom view to slide to the target bottom page based on the bottom parameters; B. controlling the annotation view to display the target annotation page based on the annotation parameters; C. intercepting the target bottom page and the target annotation page to obtain a target mixed page; D. when the target bottom page is not the target page, looping through steps AC until the target page is reached to obtain at least one mixed page; wherein, the target bottom page is any annotated bottom page, the target annotation page is the annotation page corresponding to the target bottom page, and the target page is the last annotated target bottom page in the target bottom page.
7. The electronic device according to claim 6, characterized in that: The bottom parameter includes a sliding distance, and the processor is specifically configured to: When the target bottom page is the first annotated bottom page, the sum of the sliding distances corresponding to all bottom pages before the current bottom page is determined as the sliding length; The bottom view is controlled to slide in the direction of the target bottom page by the sliding length to reach the target bottom page.
8. The electronic device according to any one of claims 1 to 5 and 7, characterized in that: The processor is specifically configured to: splice the at least one mixed page in the interception order to obtain the annotated media resource.
9. A method for storing annotation data, characterized in that: include: In response to an operation of saving the annotation data of the media resource, intercepting at least one mixed page according to the bottom parameter and the annotation parameter; The bottom parameters are parameters recorded when the user operates the bottom view, and the annotation parameters are parameters recorded when the user operates the annotation view; the mixed page includes a bottom page corresponding to the bottom view and an annotation page corresponding to the annotation view; the bottom page is used to display the media resource, and the annotation page is used to display the annotation data corresponding to the media resource; splicing the at least one mixed page to obtain annotated media resources; Displays the annotated media resource.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the method for saving annotation data according to claim 9.
Citation Information
Patent Citations
Document annotation method and apparatus, and electronic device
CN107797971A
Method for adding annotations and electronic equipment
CN115185445A
Windowed annotation method and device, storage medium and electronic equipment
CN115858056A
Annotation page generation method, electronic equipment and storage medium
CN116204254A