Page data processing method, electronic equipment, computer storage medium and computer program product

By adding a custom gesture recognizer to the page, it can recognize and respond to user touch movement events in real time, and solve the problem of poor response delay and real-time performance when labeling by hand-drawn pages, and achieve an efficient drawing annotation experience.

CN119690314APending Publication Date: 2025-03-25UC MOBILE CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411524005.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, when user hand-drawn page marking, the response delay is high, and the real-time display of hand-drawn content is poor, affecting the user experience.

Method used

By adding a custom gesture recognizer to the current page, identifying touch movement events and calling the corresponding touch movement processing method, add drawing annotation data in real time based on the touch track information.

Benefits of technology

It effectively reduces the response delay of user drawing operations, improves the timeliness of drawing content, realizes the effect of drawing as soon as you finish the stroke, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690314A_ABST
    Figure CN119690314A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a page data processing method, electronic equipment, a computer storage medium and a computer program product, and the data processing method comprises the steps: in a current page display process, carrying out touch movement event recognition through a user-defined gesture recognizer added to a current page; and in response to the identified touch movement event, calling a touch movement processing method corresponding to the touch movement event, and adding drawing annotation data in the current page through the touch movement processing method according to the touch track information generated in the touch movement process. According to the embodiment of the invention, the response delay aiming at the drawing operation of the user is effectively reduced, and the display timeliness of the drawing annotation content is improved, so that the effect of drawing once the user drops a pen is achieved, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a page data processing method, an electronic device, a computer storage medium, and a computer program product. Background Art

[0002] With the continuous development of technologies related to page processing, the page annotation function open to users, as one of the increasingly important functions of client devices such as mobile phones and tablet computers, has been widely used in people's daily life and work, effectively improving people's data processing efficiency. For example: when reading a PDF (Portable Document Format) page, a user can slide his finger on the screen to add page annotation data in the form of drawings (such as hand-drawn curves, handwritten text, etc.) to the page to show his understanding of the content of the page.

[0003] However, in the process of adding hand-drawn annotations to the page through the relevant technical solutions, there is a relatively obvious delay from the time the user touches the screen to the end of the sliding process, that is, the response delay to the user's hand-drawn operation is relatively high, and the real-time display of the hand-drawn content is relatively poor, which has a relatively poor impact on the user experience. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a page data processing solution to at least partially solve the above-mentioned problem.

[0005] According to a first aspect of an embodiment of the present application, a page data processing method is provided, including:

[0006] During the display of the current page, touch movement events are recognized through the custom gesture recognizer added to the current page;

[0007] In response to identifying a touch movement event, a touch movement processing method corresponding to the touch movement event is called, and drawing annotation data is added to the current page according to touch track information generated during the touch movement process through the touch movement processing method.

[0008] According to a second aspect of an embodiment of the present application, another page data processing method is provided, which is applied to a client device, including:

[0009] Receiving original page data from a server device, and performing page display based on the original page data;

[0010] In response to a touch movement event being recognized by a custom gesture recognizer added to the current page during display of the current page, a touch movement processing method corresponding to the touch movement event is called to add drawing annotation data to the current page according to touch track information generated during the touch movement process;

[0011] Based on the drawing annotation data, page increment information is sent to the server device, so that the server device updates the original page data based on the page increment information and saves the updated page data.

[0012] According to the third aspect of an embodiment of the present application, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect or the second aspect.

[0013] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0014] According to the page data processing solution provided in the embodiment of the present application, during the display of the current page, touch movement events are recognized through a custom gesture recognizer added to the current page; when a touch movement event is recognized, a touch movement processing method corresponding to the touch movement event is called, and through the touch movement processing method, drawing annotation data is added to the current page according to the touch trajectory information generated during the touch movement process.

[0015] The solution provided by the embodiment of the present application adds a newly created custom gesture recognizer capable of drawing gesture recognition in the current page in advance, and predefines a touch movement processing method corresponding to the touch movement event, so that the touch movement event can be recognized (that is, the drawing gesture is recognized) by the above custom gesture recognizer, and the above touch movement processing method is immediately called to add the drawing annotation data to the current page when the touch movement event is recognized. The above process is that during the display of the current page, the touch movement event is continuously recognized by the above custom gesture recognizer, and then, when the touch movement event is recognized, a labeling response is performed: the drawing annotation data is added. Therefore, in the embodiment of the present application, when the user starts to touch and move on the screen, the device starts to add drawing annotation data to the current page, which effectively reduces the response delay to the user's drawing operation and improves the timeliness of the display of the drawing annotation content, thereby achieving the effect of drawing as soon as the pen is put down, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0017] Figure 1 A flowchart of a method for processing page data according to an embodiment of the present application;

[0018] Figure 2 A schematic diagram of a scenario of a method for processing page data according to an embodiment of the present application;

[0019] Figure 3 A schematic diagram of an exemplary system applicable to the page data processing method of an embodiment of the present application;

[0020] Figure 4 A flowchart of another method for processing page data according to an embodiment of the present application;

[0021] Figure 5 A structural block diagram of a page data processing device provided according to an embodiment of the present application;

[0022] Figure 6 It is a structural block diagram of another page data processing device provided according to an embodiment of the present application;

[0023] Figure 7 The present invention is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0025] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.

[0026] Refer to the figure, Figure 1 The following is a flowchart of a method for processing page data according to an embodiment of the present application. The method for processing page data provided by an embodiment of the present application may include the following steps:

[0027] Step 102 : During the display of the current page, a touch movement event is recognized by using a custom gesture recognizer added to the current page.

[0028] Step 104, in response to identifying a touch movement event, calling a touch movement processing method corresponding to the touch movement event, and adding drawing annotation data to the current page according to the touch track information generated during the touch movement process through the touch movement processing method.

[0029] Specifically, to facilitate screen interaction, the operating system provides a set of predefined classes: gesture recognizers, which are used to create, recognize and process various user gestures. However, the native gesture classes provided by the operating system are usually used for simple gesture recognition such as click gestures and drag gestures.

[0030] As for the scenario of adding drawing annotation data, the user's gestures are usually cumbersome and complicated. Therefore, in an embodiment of the present application, a custom gesture recognizer is created according to the application scenario requirements. The custom gesture recognizer can be used to perform drawing gesture (operation) recognition, and when the gesture is recognized, the operation of adding drawing annotation data is immediately started. The specific implementation process of the custom gesture recognizer may include: determining whether the user has performed a drawing gesture by monitoring the touch movement event, when the user's touch movement event on the screen is monitored, it is determined that the user's drawing gesture is recognized, and the touch movement event processing method is called at this time, and the operation of adding drawing annotation data is performed through this method, so as to visually convert the user's touch trajectory in the current page into drawing annotation data added to the current page.

[0031] The current page in the embodiment of the present application can be a page in any format, for example, it can be a page in PDF format, it can also be a page in web page format, and so on.

[0032] In addition, in the embodiment of the present application, for adding drawing annotation data to the current page according to the touch trajectory information generated during the touch movement process, the specific implementation method of this step is not limited. Exemplarily, for example, as an optional scheme: during the touch movement process, a preset sampling rule can be used to collect the touch point position information in the touch trajectory, and then a curve fitting is performed for each touch point position information collected to obtain a curve corresponding to the touch trajectory, and the curve is displayed in the current page in the form of a drawing annotation. For another example: after the touch point position information is collected, a relevant curve algorithm (such as a Bezier curve) can be used based on the information to draw the curve, so that a smooth drawn curve is displayed in the current page.

[0033] In the related art, the recognition of continuous operations (gestures) such as drawing and moving, as well as the recognition of discrete operations such as clicking and deleting are usually placed in the same recognition task. During the execution of the above tasks, the recognition of discrete operations will be performed first, and the recognition of continuous operations will not begin until the recognition of discrete operations fails. In addition, with regard to the continuous operation of drawing, the related art usually considers whether the moving distance meets the conditions during its recognition process. Therefore, the moment when the drawing operation is recognized usually lags behind the moment when the user actually starts drawing, and then there are problems such as: the response delay to the user's drawing operation is high, and the real-time display of the drawing content is poor. The above problems have a poor impact on the user experience.

[0034] The solution provided by the embodiment of the present application adds a newly created custom gesture recognizer capable of drawing gesture recognition to the current page in advance, and predefines the touch movement processing method corresponding to the touch movement event, so that the touch movement event can be recognized (that is, the drawing gesture is recognized) by the above custom gesture recognizer, and the above touch movement processing method is immediately called when the touch movement event is recognized, so as to perform the operation of adding drawing annotation data in the current page. On the one hand, the above process does not start the recognition of drawing gestures after discrete operation recognition, but during the display process of the current page, the touch movement event (that is, the drawing gesture) is continuously recognized by the above custom gesture recognizer; on the other hand, once the touch movement event is recognized, the annotation response is performed: the drawing annotation data is added, without considering the influence of the subsequent movement distance on the recognition result. Therefore, compared with the above related technologies, in the embodiment of the present application, when the user starts to touch and move on the screen, the device starts to add drawing annotation data to the current page, which effectively reduces the response delay to the user's drawing operation and improves the timeliness of the display of the drawing annotation content, thereby achieving the effect of drawing as soon as the pen is put down, and improving the user experience.

[0035] The data processing method provided in the embodiment of the present application can be executed by any appropriate device with data processing capabilities, including but not limited to: a PC and a server.

[0036] Optionally, in some of the embodiments, the page data processing method may further include:

[0037] Create a custom gesture recognizer by inheriting from the basic gesture recognizer;

[0038] Create an instance of the custom gesture recognizer in the view controller and add it to the page view corresponding to the current page.

[0039] Specifically, the process of creating a custom gesture recognizer by inheriting the basic gesture recognizer may include: creating a custom gesture recognizer that inherits the basic gesture recognizer; rewriting the basic touch movement processing method provided in the basic gesture recognizer to obtain the touch movement processing method of the custom gesture recognizer. The touch movement processing method is used to add drawing annotation data to the current page according to the touch track information generated during the touch movement process.

[0040] The basic gesture recognizer provides the basic framework and functions of gesture recognition, including the processing of touch events and the management of gesture states. By inheriting this basic gesture recognizer, custom gesture recognizers can obtain these functions without having to implement them from scratch. More importantly, the basic gesture recognizer defines a set of standard interfaces. For example, the standard interfaces in the IOS system usually include: touchesBegan, a processing method for touch events, touchesMoved, a processing method for touch move events, and so on. By inheriting the basic gesture recognizer, custom gesture recognizers can efficiently implement the processing methods corresponding to the above standard interfaces, thereby conveniently completing the touch interaction process.

[0041] Taking iOS as an example, the process of creating a custom gesture recognizer may include:

[0042] Create a custom gesture class. That is, define a new class that inherits from UIGestureRecognizer.

[0043] According to the actual scene requirements, the touch event processing method is implemented. In the drawing and annotation scene, the touch event processing method to be implemented may include: a touch movement event processing method touchesMoved, which can be implemented as follows: when a touch movement event is detected, the processing method will be called to add drawing and annotation data to the current page according to the generated touch track information during the touch movement process.

[0044] Optionally, in some of the embodiments, the number of gesture recognizers added to the current page is multiple; after adding the instance to the page view corresponding to the current page, the page processing method may further include:

[0045] Adjust the priority of the gesture recognizers added to the current page so that the custom gesture recognizers are executed first.

[0046] Specifically, when multiple gesture recognizers of different types are added to a view, by default, the priority of gesture recognizer execution is determined by the order in which they are added to the view: the gesture recognizers added first will also be executed first. Therefore, if the gesture recognizers added to the current page are not only the custom gesture recognizers in the embodiments of the present application, but also include gesture recognizers for performing other gesture recognitions, in the above embodiments of the present application, after executing the recognizer addition operation, the execution priority of each gesture recognizer is adjusted so that the custom gesture recognizer can be executed first. Through the above priority adjustment process, no matter how many gesture recognizers are added to the current page view, it can be guaranteed that the custom gesture recognizer can be executed first, thereby further reducing the response delay to the user's drawing operations and improving the timeliness of the display of drawing annotation content.

[0047] Optionally, in some of the embodiments, after adding the instance to the page view corresponding to the current page, the scene information of the current page can also be obtained, and the enabling state of the custom gesture class can be determined based on the scene information; the enabling property of the custom gesture class can be adjusted according to the enabling state; the enabling state includes: an activated state and a disabled state; if the enabling state is an activated state, touch movement event recognition and subsequent drawing annotation data addition and other operations are performed through the custom gesture recognizer; conversely, if the enabling state is a disabled state, recognition and annotation data addition and other operations are no longer performed through the custom gesture recognizer.

[0048] Specifically, in the above embodiment, the enabling state of the custom gesture recognizer can be adjusted in combination with the current page scene, so that when drawing annotation is to be performed (such as in the page annotation mode scene), the custom gesture recognizer is started to quickly add drawing annotation data through the recognizer, and when drawing annotation is not required (such as in the page turning scene), the custom gesture recognizer is disabled to avoid misidentifying other touch movement operations of the user in the page (such as page turning gestures) as drawing gestures, thereby mistakenly adding drawing annotation data to the page. In the above embodiment, by adjusting the enabling state of the custom gesture recognizer, the effect of Robbie and Drawing can be achieved in the drawing annotation scene, and in other non-drawing annotation scenes, page display errors caused by gesture misrecognition can be avoided. In summary, the above embodiments of the present application can further enhance the user experience.

[0049] Optionally, in some of the embodiments, the process of adding drawing annotation data to the current page according to the touch track information generated during the touch movement process may specifically include:

[0050] Using preset sampling rules, the touch point position information is sampled from the touch trajectory information generated during the touch movement process; curve fitting is performed based on the position information of each touch point to obtain the touch curve position information corresponding to the touch trajectory; based on the touch curve position information, the touch curve is drawn in the current page to complete the drawing annotation data adding operation.

[0051] Specifically, in the embodiment of the present application, during the touch movement process, touch point sampling can be performed to collect touch point position information in the touch trajectory, and then curve fitting is performed for each collected touch point position information to obtain a curve corresponding to the touch trajectory, and the curve is displayed in the current page in the form of a drawing annotation. Furthermore, after the touch point position information is collected, a related Bezier curve algorithm can be used to draw the curve, so that the annotated curve is displayed in the current page.

[0052] In the above process, the touch point sampling operation is first performed on the touch track, which can effectively reduce the amount of data to be processed, thereby improving the efficiency of drawing annotation. In addition, the Bezier curve algorithm is relatively simple, easy to implement, and has high operating efficiency. It is suitable for the real-time drawing scenario of the embodiment of the present application, which helps to further reduce the drawing delay; and the noise generated by the Bezier curve is continuous, which means that the interpolation between any two points is smooth without abrupt jumps, which can ensure that the final generated drawing curve is smooth, thereby effectively improving the user's visual experience.

[0053] Optionally, in some of the embodiments, the number of annotation types provided for the current page is multiple;

[0054] During the current page display process, touch movement events are recognized by adding a custom gesture recognizer to the current page, including:

[0055] In the current page display process, in response to identifying a touch start event through the custom gesture recognizer, calling a touch start processing method corresponding to the touch start event to perform a to-be-added annotation type determination operation;

[0056] If it is determined that the annotation type to be added is a drawing annotation, the touch movement event is recognized through a custom gesture recognizer;

[0057] If it is determined that the annotation type to be added is a non-drawing annotation, a predefined non-drawing annotation method corresponding to the non-drawing annotation is called to add corresponding non-drawing annotation data to the page.

[0058] Specifically, in the above embodiment of the present application, corresponding annotation methods are predefined for different annotation types; in the current page display process, the touch start event is first identified by the custom gesture recognizer, and when the touch start event is identified, the type of annotation to be added is determined by the touch start processing method corresponding to the touch start event, and when it is determined that the annotation type to be added is a drawing annotation, the above step 102 and subsequent steps are executed to complete the drawing annotation data adding operation, and when it is determined that the annotation type to be added is a non-drawing annotation (such as selecting a click annotation, deleting an annotation, etc.), the corresponding non-drawing annotation method is called to add the non-drawing annotation data to the page.

[0059] In the above embodiment of the present application, the annotation methods corresponding to different annotation types are predefined in the custom gesture recognizer. Later, in the actual application process, when a touch start event is recognized, the annotation type to be added is first determined by the touch start processing method, and then the annotation data adding operation corresponding to the type is performed according to the determined type. The above method can realize the recognition and response of a variety of different user gestures, enriching the user's annotation experience; in addition, the recognition and response of a variety of different gestures are realized by a custom gesture recognizer. Through the reasonable design of the internal processing logic of the custom gesture recognizer, the complexity of gesture recognition can be effectively reduced and the recognition conflicts in the process of multiple different gesture recognition can be avoided.

[0060] Optionally, in some of the embodiments, calling a touch start processing method corresponding to the touch start event to perform a to-be-added annotation type determination operation includes:

[0061] Calling a touch start processing method corresponding to a touch start event, obtaining selection information of a user on a markup menu provided by the page, and determining a markup type to be verified based on the selection information;

[0062] Obtain the target page data at the current touch position, and perform type verification on the annotation type to be verified according to the target page data;

[0063] If the verification is successful, the annotation type to be verified is determined as the annotation type to be added;

[0064] If the verification fails, the type of annotation to be added is re-determined based on the target page data.

[0065] Specifically, for applications that support page annotation, an annotation menu containing multiple annotation types is usually displayed on the page during page display, so that users can select the annotation type to be added according to actual needs. For example, the annotation menu may include: adding text annotations, drawing annotations, moving annotations, deleting annotations, etc. When the user wants to draw by hand on the current page, he can select drawing annotations from the above annotation menu.

[0066] However, in some scenarios, the annotation type selected by the user from the annotation menu may not match the annotation type that the user actually wants to perform, or, after the user selects the annotation type from the annotation menu, the annotation type that the user wants changes, that is, for various reasons, the annotation type selected by the user from the annotation menu is inconsistent with the annotation type that is actually to be performed. In this case, if the annotation operation is performed according to the annotation type selected from the annotation menu, it may not meet the user's needs, or even result in annotation errors.

[0067] To avoid the above problems, in the above embodiments of the present application, after determining the annotation type through the selection information of the annotation menu provided by the user on the page, the above annotation type is also verified for the second time based on the target page data at the current touch position. If the verification passes, the subsequent annotation data adding operation is performed according to the annotation type. Otherwise, if the verification fails, the annotation type to be added is re-determined based on the above target page data.

[0068] In the embodiment of the present application, when the type verification is performed on the annotation type to be verified according to the target page data, the specific verification method adopted is not limited and can be customized according to the actual situation. For example, the type verification can be performed according to whether the target page data is the annotation data that has been added previously. Specifically: if the annotation type to be verified is determined to be a drawing annotation according to the selection information of the annotation menu provided by the user to the page, but the target page data is the annotation data that has been added, that is: when there is already text annotation data at the current touch position, the type verification fails (indicating that the annotation type that the user actually wants to add is not a drawing annotation, but to continue to add a text annotation), then the text annotation can be used as the re-determined annotation type to perform the subsequent annotation data adding operation. Type verification can also be performed based on whether the target page data is empty (i.e., whether text is displayed at the current touch position). Specifically: if the annotation type to be verified is determined to be a drawing annotation based on the user's selection information of the annotation menu provided for the page, but the target page data is not empty (i.e., text is displayed at the current touch position), the type verification fails (indicating that the annotation type the user actually wants to add is not a drawing annotation), then the annotation type to be added can be re-determined based on the specific content of the above target page data, and so on.

[0069] Through the above-mentioned embodiments of the present application, the annotation type to be added that is finally determined can be as close to the user's actual annotation needs as possible, thereby further improving the user's annotation experience.

[0070] Optionally, in some of the embodiments, when it is determined that the annotation type to be verified is a drawing annotation by calling the touch start processing method, the specific type verification process may include:

[0071] If the target page data is empty, or the target page data is the added drawing annotation data, the verification is determined to be successful; if the target page data is the added non-drawing annotation data, the verification fails. At this time, the annotation type corresponding to the added non-drawing annotation data can be re-determined as the annotation type to be added.

[0072] Specifically, when the type of annotation to be added is a drawing annotation, if the target page data at the current touch position is empty, it means that the user has touched a blank position in the page. At this time, it can be inferred that the user's real intention is to add a drawing annotation. Therefore, in this case, it can be determined that the verification is passed, and drawing annotation data can be added at the touch position later. In addition, there may be a situation where the user has previously added drawing annotation data at the touch position, and this time he wants to continue a new round of drawing annotation based on the above drawing annotation data. Therefore, it can also be determined that the verification is passed when it is determined that the target page data is the added drawing annotation data.

[0073] On the contrary, when the target page data is the non-drawing annotation data that has been added, it indicates that other annotation data (such as text annotation data, etc.) that is different from the drawing annotation data has been added at this touch position. At this time, it can be inferred that the user's true intention may be to continue the above-mentioned non-drawing annotation data adding operation, that is: to continue the previous non-drawing annotation, rather than making a new drawing annotation at the current touch position. Therefore, in the above embodiment of the present application, when the target page data is the non-drawing annotation data that has been added, the verification fails, and then the annotation type corresponding to the added non-drawing annotation data can be re-determined as the annotation type to be added.

[0074] Through the verification scheme for the annotation types to be verified provided in the above-mentioned embodiments of the present application, the annotation types to be added that are finally verified can be more in line with the user's real intention, thereby further improving the user experience.

[0075] Optionally, in some of the embodiments, after the touch movement event is recognized by the custom gesture recognizer, the method further includes:

[0076] If no touch movement event is recognized within a preset time, a predefined annotation adding method corresponding to a single-click gesture is called, and annotation data corresponding to the single-click gesture is added to the current page through the annotation adding method corresponding to the single-click operation.

[0077] Specifically, after the touch start event is recognized and the type of annotation to be added is determined to be a drawing annotation, the occurrence of the touch move event is not recognized for a long time. At this time, it indicates that the user's actual intention may not be to make a drawing annotation, but to click the annotation type corresponding to the gesture. Therefore, in the above embodiment of the present application, if the touch move event is not recognized within the preset time, the determined type of annotation to be added is modified again. Through the above embodiment of the present application, the annotation data finally added to the current page can be as close to the actual needs of the user as possible, thereby further improving the user's annotation experience.

[0078] Optionally, in some of the embodiments, the page data processing method may further include:

[0079] During the process of adding drawing annotation data, in response to identifying a touch end event through a custom gesture recognizer, a touch end processing method corresponding to the touch end event is called to generate drawing annotation log information to perform a current page data update operation based on the drawing annotation log information.

[0080] Specifically, the above process can stop the drawing and annotation operation in time after the user's drawing gesture ends by monitoring the touch end event and calling the touch end processing method when the touch end time is detected, so that the drawing and annotation data finally presented on the page is more in line with the user's actual drawing gesture, improving the accuracy of the drawing and annotation. In addition, when the touch ends, the drawing and annotation log information can also be generated to record the intermediate data generated during the drawing process, so as to facilitate the update of the current page data.

[0081] Furthermore, the page data processing method may also include: in the process of adding drawing annotation data, in response to identifying a touch cancel event through the custom gesture recognizer, calling a touch cancel method corresponding to the touch cancel event to perform a data cleaning operation.

[0082] See also Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a scenario of a method for processing page data according to an embodiment of the present application. Figure 2 The schematic diagram shown in the figure uses a specific scenario as an example to illustrate the page data processing method provided by the above embodiment:

[0083] During the display of the current page, the touch move event can be identified through a custom gesture recognizer; when a touch move event is identified, the touch move processing method TouchesBegan corresponding to the touch move event can be called, and the type of annotation to be verified is determined through TouchesBegan according to the selection information of the annotation menu provided by the user for the page; if the type of annotation to be verified determined here is a drawing annotation, the touch move event can be identified through a custom gesture recognizer; when a touch move event is identified, the touch move processing method TouchesMoved corresponding to the touch move event can be called, and drawing annotation data can be added to the current page through TouchesMoved according to the touch track information generated during the touch move process; during the process of adding the drawing annotation data, if a touch end event is identified, the corresponding touch end processing method TouchesEnded is called to generate drawing annotation log information, so as to update the current page data based on the drawing annotation log information.

[0084] On the contrary, if the touch movement event is not recognized (or not recognized within the preset time), a predefined annotation adding method corresponding to the single-click gesture is called, and annotation data corresponding to the single-click gesture is added to the current page through the annotation adding method.

[0085] See also Figure 3 , Figure 3 This is a schematic diagram of an exemplary system applicable to the page data processing method of the embodiment of the present application. For ease of understanding, first combine Figure 3 The application scenario of the page data processing method provided in the embodiment of the present application is explained.

[0086] like Figure 3 As shown, the system 300 may include a server 302, a communication network 304 and / or one or more user devices (ie, client devices) 306. Figure 3 The example in FIG. 1 is a plurality of user devices.

[0087] The server 302 may be any suitable device for storing page data, including but not limited to a server cluster, a computing cloud server cluster, etc. In some embodiments, the server 302 may perform any suitable function. For example, in some embodiments, the server 302 may receive a page data request sent by the user device 306 to return the corresponding page data to the user device 506 for the user to view.

[0088] In some embodiments, the communication network 304 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 304 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN) and / or any other suitable communication network. The user device 306 can be connected to the communication network 304 via one or more communication links (e.g., communication link 312), and the communication network 304 can be linked to the server 302 via one or more communication links (e.g., communication link 314). The communication link can be any communication link suitable for transmitting data between the user device 306 and the server 302, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.

[0089] User equipment 306 may include any one or more user equipment suitable for data processing. In some embodiments, user equipment 306 may include any suitable type of equipment. For example, in some embodiments, user equipment 306 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, and / or any other suitable type of user equipment.

[0090] Reference Figure 4 , Figure 4 FIG. 1 is a flowchart of another method for processing page data according to an embodiment of the present application. The method for processing page data provided by the embodiment of the present application can be Figure 3 The server 302 in the system shown in the figure executes. Specifically, the page data processing method provided in this embodiment includes the following steps:

[0091] Step 402, receiving original page data from the server device, and performing page display based on the original page data.

[0092] Specifically, when a user wants to browse a page, the user may send a page data acquisition request to the server device through the client device to receive original page data for page display from the server device.

[0093] Step 404, during the display of the current page, in response to the touch movement event being recognized by the custom gesture recognizer added to the current page, a touch movement processing method corresponding to the touch movement event is called to add drawing annotation data to the current page according to the touch track information generated during the touch movement process.

[0094] Specifically, the specific implementation of each process in this step can refer to the description of the corresponding parts in the aforementioned method embodiment, and will not be repeated here.

[0095] Step 406, based on the drawing annotation data, the page increment information is sent to the server device, so that the server device updates the original page data based on the page increment information and saves the updated page data.

[0096] Specifically, after adding drawing annotation data to the current page through the page data processing method provided by the embodiment of the present application, page increment information can be generated according to the drawing annotation data in the page, and the page increment information can ensure that the newly added page data after drawing annotation is compared with the original page data. Afterwards, the page increment information can be returned to the server device, so that the server device updates the page data based on the page increment information, thereby obtaining the updated page data.

[0097] Optionally, in some of the embodiments, after sending the page increment information to the server device, the method further includes:

[0098] Send a page data acquisition request to the server device;

[0099] Receive the updated page data returned by the server device, and display the page based on the updated page data.

[0100] Specifically, after the server device receives the page increment information, it can modify and update the original page data according to the page increment information, thereby obtaining updated page data updated by the user's annotation operation. Afterwards, when the client device sends a page data acquisition request to the server device again, the server device can return the updated page data to the client device to show the user the page after adding the drawing annotation.

[0101] In the solution provided by the embodiment of the present application, the client device pre-adds a newly created custom gesture recognizer capable of drawing gesture recognition in the current page, and pre-defines a touch movement processing method corresponding to the touch movement event, so that the touch movement event can be recognized (that is, the drawing gesture is recognized) through the above custom gesture recognizer, and the above touch movement processing method is immediately called to add the drawing annotation data to the current page when the touch movement event is recognized. The above process is that during the display of the current page, the touch movement event is continuously recognized by the above custom gesture recognizer, and then, when the touch movement event is recognized, a labeling response is performed: the drawing annotation data is added. Therefore, in the embodiment of the present application, when the user starts to touch and move on the screen, the device starts to add drawing annotation data to the current page, which effectively reduces the response delay to the user's drawing operation and improves the timeliness of the display of the drawing annotation content, thereby achieving the effect of drawing as soon as the pen is put down, and improving the user experience.

[0102] In addition, after the drawing annotation data is added, the client device also generates corresponding page increment information and returns the information to the server device so that the server device updates the original page data. In this way, when the client device requests page data again, it can be guaranteed that the latest page after the previous drawing annotation data is added is displayed to the user.

[0103] Figure 5 The following is a structural block diagram of a page data processing device provided according to an embodiment of the present application. The page data processing device provided by the embodiment of the present application includes:

[0104] The recognition module 502 is used to recognize touch movement events by using a custom gesture recognizer added to the current page during the display of the current page;

[0105] The drawing module 504 is used to call a touch movement processing method corresponding to the touch movement event in response to identifying a touch movement event, and add drawing annotation data to the current page according to the touch track information generated during the touch movement process through the touch movement processing method.

[0106] Optionally, in some of the embodiments, the page data processing device further includes:

[0107] The recognizer adding module is used to create a custom gesture recognizer by inheriting the basic gesture recognizer; create an instance of the custom gesture recognizer in the view controller and add the instance to the page view corresponding to the current page.

[0108] Optionally, in some of the embodiments, the number of gesture recognizers added to the current page is multiple; after the step of adding the instance to the page view corresponding to the current page, the recognizer adding module is further used to:

[0109] Adjust the priority of the gesture recognizers added to the current page so that the custom gesture recognizers are executed first.

[0110] Optionally, in some embodiments, the number of annotation types provided for the current page is multiple; the identification module 502 is specifically used to:

[0111] During the current page display process, in response to recognizing a touch start event through a custom gesture recognizer, a touch start processing method corresponding to the touch start event is called to perform an operation of determining the type of annotation to be added; if it is determined that the annotation type to be added is a drawing annotation, a touch move event is recognized through the custom gesture recognizer; if it is determined that the annotation type to be added is a non-drawing annotation, a predefined non-drawing annotation method corresponding to the non-drawing annotation is called to add the corresponding non-drawing annotation data to the page.

[0112] Optionally, in some embodiments, the identification module 502, when executing the call of the touch start processing method corresponding to the touch start event to perform the operation step of determining the type of annotation to be added, is specifically used to:

[0113] Call the touch start processing method corresponding to the touch start event, obtain the user's selection information of the annotation menu provided for the page, and determine the annotation type to be verified based on the selection information; obtain the target page data at the current touch position, and perform type verification on the annotation type to be verified according to the target page data; if the verification passes, determine the annotation type to be verified as the annotation type to be added; if the verification fails, redetermine the annotation type to be added according to the target page data.

[0114] Optionally, in some of the embodiments, the page data processing device further includes:

[0115] The single-click annotation module is used to call a predefined annotation adding method corresponding to a single-click gesture if no touch movement event is recognized within a preset time after the touch movement event is recognized by a custom gesture recognizer. The annotation data corresponding to the single-click gesture is added to the current page through the annotation adding method corresponding to the single-click operation.

[0116] Optionally, in some embodiments, the identification module 502 is further configured to:

[0117] During the process of adding drawing annotation data, in response to identifying a touch end event through a custom gesture recognizer, a touch end processing method corresponding to the touch end event is called to generate drawing annotation log information to perform a current page data update operation based on the drawing annotation log information.

[0118] The page data processing device of this embodiment is used to implement the corresponding page data processing method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here. In addition, the functional implementation of each module in the page data processing device of this embodiment can refer to the description of the corresponding part in the above-mentioned method embodiment, which will not be described in detail here.

[0119] Figure 6 The following is a block diagram of another page data processing device provided according to an embodiment of the present application. The page data processing device provided in an embodiment of the present application is applied to a client device, including:

[0120] The page display module 602 is used to receive the original page data from the server device and perform page display based on the original page data;

[0121] The annotation module 604 is used for, in response to a touch movement event being recognized by a custom gesture recognizer added to the current page during the display process of the current page, calling a touch movement processing method corresponding to the touch movement event to add drawing annotation data to the current page according to touch track information generated during the touch movement process;

[0122] The information sending module 606 is used to send page increment information to the server device based on the drawing annotation data, so that the server device updates the original page data based on the page increment information and saves the updated page data.

[0123] Optionally, in some embodiments, after sending the page increment information to the server device, the page display module 602 is further configured to:

[0124] Send a page data acquisition request to the server device; receive the updated page data returned by the server device, and display the page based on the updated page data.

[0125] The page data processing device of this embodiment is used to implement the corresponding page data processing method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here. In addition, the functional implementation of each module in the page data processing device of this embodiment can refer to the description of the corresponding part in the above-mentioned method embodiment, which will not be described in detail here.

[0126] Reference Figure 7, shows a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.

[0127] like Figure 7 As shown, the electronic device may include: a processor (processor) 702 , a communication interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0128] in:

[0129] The processor 702 , the communication interface 704 , and the memory 706 communicate with each other via a communication bus 708 .

[0130] The communication interface 704 is used to communicate with other electronic devices or servers.

[0131] The processor 702 is used to execute the program 710, and specifically can execute the relevant steps in the above method embodiment.

[0132] Specifically, the program 710 may include program codes, which include computer operation instructions.

[0133] The processor 702 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0134] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0135] The program 710 may include multiple computer instructions. Specifically, the program 710 may enable the processor 702 to execute operations corresponding to the method described in any of the aforementioned method embodiments through the multiple computer instructions.

[0136] The specific implementation of each step in program 710 can refer to the corresponding description of the corresponding steps and units in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.

[0137] The present application also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes but is not limited to: a compact disc read-only memory (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk or a magneto-optical disk, etc.

[0138] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the above-mentioned multiple method embodiments.

[0139] In addition, it should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0140] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0141] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.

[0142] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0143] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.

Claims

1. A page data processing method, comprising: During the display of the current page, touch movement events are recognized through the custom gesture recognizer added to the current page; In response to identifying a touch movement event, a touch movement processing method corresponding to the touch movement event is called, and drawing annotation data is added to the current page according to touch track information generated during the touch movement process through the touch movement processing method.

2. The method according to claim 1, wherein: The method further comprises: Create a custom gesture recognizer by inheriting from the basic gesture recognizer; Create an instance of the custom gesture recognizer in the view controller, and add the instance to the page view corresponding to the current page.

3. The method according to claim 2, wherein: The creation of a custom gesture recognizer by inheriting from the basic gesture recognizer includes: Create a custom gesture recognizer that inherits from the base gesture recognizer; The basic touch movement processing method provided in the basic gesture recognizer is rewritten to obtain the touch movement processing method of the custom gesture recognizer, wherein the touch movement processing method is used to add drawing annotation data to the current page according to the touch track information generated during the touch movement process.

4. The method according to claim 2, wherein: The number of gesture recognizers added to the current page is multiple; after adding the instance to the page view corresponding to the current page, the method further includes: The priority of the gesture recognizers added to the current page is adjusted so that the custom gesture recognizer is executed first.

5. The method according to any one of claims 1 to 4, wherein: The adding of drawing annotation data to the current page according to the touch track information generated during the touch movement process includes: Using a preset sampling rule, sampling the touch track information generated during the touch movement process to obtain the touch point position information; Perform curve fitting according to the position information of each touch point to obtain the touch curve position information corresponding to the touch trajectory; According to the touch curve position information, the touch curve is drawn in the current page to complete the drawing annotation data adding operation.

6. The method according to any one of claims 1 to 4, wherein: There are multiple types of annotations provided for the current page; In the process of displaying the current page, the touch movement event recognition is performed by adding a custom gesture recognizer to the current page, including: In the current page display process, in response to identifying a touch start event through the custom gesture recognizer, calling a touch start processing method corresponding to the touch start event to perform an operation of determining the type of annotation to be added; If it is determined that the type of annotation to be added is a drawing annotation, performing touch movement event recognition through the custom gesture recognizer; If it is determined that the annotation type to be added is a non-drawing annotation, a predefined non-drawing annotation method corresponding to the non-drawing annotation is called to add corresponding non-drawing annotation data to the page.

7. A page data processing method, applied to a client device, the method comprising: Receiving original page data from a server device, and performing page display based on the original page data; In response to a touch movement event being recognized by a custom gesture recognizer added to the current page during display of the current page, a touch movement processing method corresponding to the touch movement event is called to add drawing annotation data to the current page according to touch track information generated during the touch movement process; Based on the drawing annotation data, page increment information is sent to the server device, so that the server device updates the original page data based on the page increment information and saves the updated page data.

8. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 7.

9. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method according to any one of claims 1 to 7.