Handwriting recording and redrawing method and system
By sorting and summarizing the key point sets of handwriting drawn by multiple people at the same time, the problem in the existing technology of being unable to keep lines covering each other when redrawing is solved, and the consistency and accuracy of the handwriting content are improved.
Patent Information
- Application Number
- CN202411503182.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-21
AI Technical Summary
The existing multiple people's simultaneously drawing scheme cannot maintain the characteristics of lines covering each other when redrawing, resulting in the inconsistent screen content seen by users when drawing is inconsistent with the screen content when repainting by software, and handwriting deviations occur.
By obtaining the corresponding key point set for the handwriting created based on the preset handwriting creation rules, and dividing the collaboratively created handwriting and key point set into the same drawing group. When redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rules, and the corresponding sub-handwriting is drawn in sequence according to the drawing group drawing rules to obtain the redrawn handwriting.
When redrawing, the characteristics of lines covering each other are maintained, making the picture more realistic, ensuring the consistency of the handwriting content redrawn by the software and the handwriting content seen by the user when drawing, and improving the efficiency of multiple handwriting redrawings. Accuracy.
Smart Images

Figure CN119336230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a handwriting recording and redrawing method and system. Background Art
[0002] In order to facilitate the display needs in commercial display scenarios (for example, business meetings), existing commercial display devices are equipped with drawing functions. Commercial display devices mainly input through touch frames. Conventional touch frames can support multi-finger input functions, so that multiple people can draw collaboratively on drawing software at the same time.
[0003] Although, when multiple people draw at the same time, each person can draw with his or her own brush effect (color, pen stroke effect, etc. are collectively referred to as brush effect), the existing multiple people drawing at the same time scheme has the following problems: when users draw, the drawing software draws lines based on touch events obtained in real time, so that two lines can be drawn (for example, user 1 draws line A, and user 2 simultaneously draws line B that crosses and covers line A, or user 1 draws cross-covered lines A and B with both hands at the same time, at this time, the drawing software can draw line A and line B at the same time, and make line A and line B appear to cross-cover), so that the two lines cross and cover each other like the DNA double helix structure. When the user triggers a redraw (for example, switching canvases, undoing and redoing, saving and importing, etc. trigger a redraw, or filtering lines, erasing some lines triggers a redraw), the drawing software draws one line at a time, that is, the drawing software can only draw line A first, and then line B in this redraw situation. The effect of drawing two lines in succession is that line A will be completely covered by line B. In other words, the two lines redrawn by the drawing software can only achieve a brush effect in which one line completely covers the other line, and cannot achieve a brush effect of cross-coverage like DNA. This results in the screen content seen by the user when drawing is inconsistent with the screen content when the software redraws, resulting in handwriting deviation.
[0004] Therefore, the prior art needs to be improved. Summary of the invention
[0005] The technical problem to be solved by the present invention is that, in view of the defects of the prior art, the present invention provides a handwriting recording and redrawing method and system to solve the problem that handwriting deviation is prone to occur in the existing scheme of multiple people drawing at the same time.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows: In a first aspect, the present invention provides a handwriting recording and redrawing method for a multi-user collaborative operation drawing scene or a single user multi-finger collaborative operation drawing scene, comprising: For handwriting created based on a preset handwriting creation rule, a key point set corresponding to the handwriting is obtained, and the collaboratively created handwriting and the corresponding key point set are divided into the same drawing group; wherein the key point set is a set of points controlling the handwriting trajectory, and each key point in the key point set is provided with a corresponding timestamp and a corresponding finger number; When redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rule, and the corresponding sub-handwriting is drawn in sequence according to the drawing group drawing rule to obtain the redrawing handwriting.
[0007] In one implementation, the step of obtaining a key point set corresponding to handwriting created based on a preset handwriting creation rule includes: Creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule, and the expanded handwriting creation rule; Get the key point sets corresponding to various handwritings, and record the corresponding timestamp and finger number in each key point.
[0008] In one implementation, the multiple handwritings are created and recorded based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule, and the expanded handwriting creation rule, including: When the key points corresponding to each handwriting are created by the original handwriting creation rule, the current system time is recorded in the corresponding timestamp, and the finger number used by the current user to create the current key point is recorded in the corresponding finger number.
[0009] In one implementation, the creating and recording of multiple handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule, and the expanded handwriting creation rule also includes: When creating key points corresponding to each handwriting by the intercepted handwriting creation rule, searching for the key point before and after the interception starting point on the original handwriting, and searching for the key point before and after the interception end point; All the key points to be found are intercepted from the key point set corresponding to the original handwriting to obtain an intercepted key point set; Calculate the starting point and ending point of the new handwriting; The starting point key point of the new handwriting, the intercepted key point set, and the ending point key point of the new handwriting are combined in sequence to obtain a new handwriting key point set.
[0010] In one implementation, the creating and recording of multiple handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule, and the expanded handwriting creation rule also includes: When creating key points corresponding to each handwriting by using the expanded handwriting creation rule, obtaining any key point and the next key point on the original handwriting; Calculate multiple key points inserted between the two acquired key points to obtain an inserted key point set; The insertion key point set is inserted between the two acquired key points to obtain a new handwriting key point set.
[0011] In one implementation, when redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rule, and corresponding sub-handwritings are drawn in sequence according to the drawing group drawing rule to obtain the redrawing handwriting, including: Take out the key point sets of all handwritings in the drawing group, summarize and sort them according to the real drawing key point sorting rules, and obtain an ordered key point set to be drawn; Take out each key point to be drawn in order, and search for the corresponding key point set of the handwriting recorded in the drawing group and the corresponding key point according to each key point to be drawn; The sub-strokes are drawn using the key point sets and key points corresponding to the key points to be drawn.
[0012] In one implementation, the key point sets of all handwritings in the drawing group are taken out, summarized and sorted according to the real drawing key point sorting rules, and an ordered key point set to be drawn is obtained, including: Taking out the key point set of all handwritings in the drawing group, selecting any two key points, and determining the time and finger number corresponding to each key point; Determine whether the time corresponding to the current key point is greater than the time corresponding to another key point; If it is greater than the time corresponding to another key point, the current key point is placed after the other key point; If it is less than the time corresponding to another key point, the current key point is placed before the other key point; If it is equal to the time corresponding to another key point, determine whether the finger number corresponding to the current key point is greater than the finger number corresponding to another key point; If it is greater than the finger number corresponding to another key point, the current key point is placed after the other key point; If it is less than the finger number corresponding to another key point, the current key point is placed before the other key point.
[0013] In a second aspect, the present invention provides a handwriting recording and redrawing system for multi-user collaborative operation of drawing scenes or single-user multi-finger collaborative operation of drawing scenes, comprising: A handwriting creation module, for obtaining a key point set corresponding to handwriting created based on a preset handwriting creation rule, and dividing the collaboratively created handwriting and the corresponding key point set into the same drawing group; The handwriting redrawing module is used to summarize and sort all key point sets in the same drawing group based on the real drawing key point sorting rule when initiating redrawing, and draw the corresponding sub-handwriting in sequence according to the drawing group drawing rule to obtain the redrawn handwriting.
[0014] In a third aspect, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a handwriting recording and redrawing program, and when the handwriting recording and redrawing program is executed by the processor, it is used to implement the operation of the handwriting recording and redrawing method as described in the first aspect.
[0015] In a fourth aspect, the present invention further provides a medium, which is a computer-readable storage medium, and which stores a handwriting recording and redrawing program. When the handwriting recording and redrawing program is executed by a processor, it is used to implement the operation of the handwriting recording and redrawing method described in the first aspect.
[0016] The present invention adopts the above technical solution to achieve the following effects: The present invention records a variety of handwritings through handwriting creation rules, and redraws each handwriting using real drawing key point sorting rules and drawing group drawing rules, so that the content of lines covering each other can be drawn in the drawing software, and the characteristic of lines covering each other will not be lost during redrawing, making the picture more realistic, ensuring the consistency between the handwriting content redrawn by the software and the handwriting content seen by the user during drawing, and improving the accuracy of redrawing of multiple handwritings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention 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 of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of the handwriting recording and redrawing method in the present invention.
[0019] Figure 2 It is a flow chart of the original handwriting creation rule in the present invention.
[0020] Figure 3It is a flow chart of the rule of intercepting handwriting creation in the present invention.
[0021] Figure 4 It is a flow chart of the copy handwriting creation rule in the present invention.
[0022] Figure 5 It is a flow chart of expanding the handwriting creation rule in the present invention.
[0023] Figure 6 It is a flowchart of a more realistic redrawing method in the present invention.
[0024] Figure 7 It is a flow chart of the real drawing key point sorting rules in the present invention.
[0025] Figure 8 It is a schematic diagram of the redrawing result of the mutually overlapping lines in the present invention.
[0026] Fig. 9 It is a schematic diagram of the redrawing result after creating new handwriting by intercepting handwriting rules in the present invention.
[0027] Fig.10 It is a functional principle diagram of a terminal in one implementation of the present invention.
[0028] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] Exemplary Methods The existing multi-person simultaneous drawing solution still has the following problems: When the user is drawing, the drawing software draws lines based on the touch events obtained in real time, so that two lines can be drawn, making the two lines cross and cover each other like the DNA double helix structure. When the user triggers a redraw, the drawing software draws one line as a unit, that is, the two lines redrawn by the drawing software can only achieve the brush effect of one line completely covering the other line, and cannot achieve the brush effect of cross-covering like DNA. This leads to the inconsistency between the screen content seen by the user when drawing and the screen content when the software redraws, resulting in handwriting deviation.
[0031] In view of the above technical problems, an embodiment of the present invention provides a handwriting recording and redrawing method, which obtains the key point set corresponding to the handwriting created based on the preset handwriting creation rules, and divides the collaboratively created handwriting and the corresponding key point set into the same drawing group; when initiating redrawing, all the key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rules, and the corresponding sub-handwritings are drawn in sequence according to the drawing group drawing rules to obtain the redrawn handwriting. The embodiment of the present invention records multiple handwritings through handwriting creation rules, and redraws each handwriting using the real drawing key point sorting rules and the drawing group drawing rules, thereby ensuring the consistency between the handwriting content redrawn by the software and the handwriting content seen by the user when drawing.
[0032] like Figure 1 As shown, an embodiment of the present invention provides a handwriting recording and redrawing method for multi-user collaborative operation drawing scene or single user multi-finger collaborative operation drawing scene, comprising the following steps: Step S100, for the handwriting created based on the preset handwriting creation rules, obtain the key point set corresponding to the handwriting, and divide the collaboratively created handwriting and the corresponding key point set into the same drawing group; wherein the key point set is a set of points that control the handwriting trajectory, and each key point in the key point set is provided with a corresponding timestamp and a corresponding finger number.
[0033] In this embodiment, the handwriting recording and redrawing method is based on a handwriting recording and redrawing system implementation provided by this embodiment; the handwriting recording and redrawing method can be used for a multi-user collaborative operation drawing scene or a single-user multi-finger collaborative operation drawing scene (for example, a left hand finger and a right hand finger collaborative operation drawing scene, a single-hand multi-finger collaborative operation drawing scene). In this embodiment, a multi-user collaborative operation drawing scene is used for illustration.
[0034] The handwriting recording and redrawing system includes: a terminal device with a simultaneous drawing function for multiple people; as an example, the terminal device can be a split device with a display screen, a touchpad and a host (for example, a computer connected to a touchpad, a smart TV connected to a whiteboard, a commercial display device connected to a touch screen, etc.), and the terminal device can also be an integrated device with a display screen, a touchpad and a host (for example, a mobile phone, a laptop computer, a tablet computer, a learning machine, an all-in-one conference machine, etc.).
[0035] In this embodiment, in order to solve the problem of inconsistency between the screen content (handwriting) seen by the user when drawing and the screen content (handwriting) when the software redraws in a scene where multiple people are drawing at the same time, a universal, better experience, and more realistic handwriting recording and redrawing method is provided, which realizes a more realistic drawing software line drawing solution. The handwriting recording and redrawing method records touch events and uses supporting data structures and interfaces to achieve consistency between the handwriting content redrawn by the software and the handwriting content seen by the user when drawing, thereby improving the accuracy of software redrawing.
[0036] In a scenario where multiple people are drawing at the same time, in order to be able to more realistically record the handwriting input by each user, this embodiment creates multiple handwritings based on multiple handwriting creation rules, and by obtaining the key point sets corresponding to various handwritings, the handwritings created by the same round of user operations and the corresponding key point sets are divided into the same drawing group; for example, during the same round of user operations, user A's handwriting 1 and the corresponding key point set S1, and user B's handwriting 2 and the corresponding key point set S2 are divided into the same drawing group.
[0037] It can be understood that, in this embodiment, for each type of handwriting, there are multiple key points; wherein, the key points are points that control the handwriting trajectory, and when each key point is recorded, the timestamp (i.e., time information) corresponding to the key point and the corresponding finger number will be recorded; in order to facilitate recording and redrawing, in this embodiment, a priority is set for the finger number corresponding to each type of handwriting; wherein, the smaller the finger number, the higher the priority when setting the drawing, for example: when using a touch box as an input device for input, if multiple fingers are drawing at the same time, the earlier the finger touches the screen, the smaller the finger number of the corresponding key point created.
[0038] In this embodiment, after defining the finger number corresponding to each type of handwriting and the priority when drawing, a variety of different handwritings are created and recorded through one or more of the four handwriting creation rules: original handwriting creation rules, intercepted handwriting creation rules, copied handwriting creation rules, and expanded handwriting creation rules.
[0039] Specifically, in an implementation of this embodiment, step S100 includes the following steps: Step S101, creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule and the expanded handwriting creation rule; Step S102, obtaining key point sets corresponding to various handwritings, and recording the corresponding timestamp and finger number in each key point.
[0040] It can be understood that in this embodiment, through a more realistic handwriting recording method, when each user creates a handwriting record, the key point set of the handwriting is recorded. , and, at each key point Record its timestamp in , and finger number Then, the handwriting created by the same round of user operation is divided into the same drawing group. In each round of operation, the user can use one or more handwriting creation rules to create handwriting, which is not limited here.
[0041] In one implementation of this embodiment, when creating key points corresponding to each handwriting using the original handwriting creation rules, it includes: recording the current system time into the corresponding timestamp, and recording the finger number used by the current user to create the current key point into the corresponding finger number.
[0042] like Figure 2 As shown, in an actual application scenario, when recording the handwriting input by the user through the original handwriting creation rule, the following steps are included: Step S11, create key points ; Step S12, setting is the current system timestamp, The finger number used by the user to create this key point.
[0043] It is understandable that in this embodiment, when creating key points through original handwriting, the current system time is recorded as the timestamp. and record the finger number (or virtual finger number) used by the current user to create this key point in the finger number In the above example, we can get the key point set of the original handwriting.
[0044] In one implementation of the present embodiment, when creating key points corresponding to each handwriting by using the intercepted handwriting creation rule, it includes: searching for the previous key point and the next key point of the interception starting point on the original handwriting, and searching for the previous key point and the next key point of the interception end point; intercepting all the searched key points from the key point set corresponding to the original handwriting to obtain an intercepted key point set; calculating the starting key point and the end key point of the new handwriting; and sequentially combining the starting key point of the new handwriting, the intercepted key point set, and the end key point of the new handwriting to obtain a new handwriting key point set.
[0045] like Figure 3 As shown, in an actual application scenario, when recording the handwriting input by the user through the interception handwriting creation rule, the following steps are included: Step S21, find the key point before the interception starting point on the original handwriting With the next key point ; Step S22, find the previous key point of the interception end point And the next key point ; Step S23, from the original handwriting key point set In, according to and Intercept ; Step S24, calculate the key point of the new handwriting starting point , where its timestamp , its finger number ; Step S25, calculate the new handwriting end point key point , where its timestamp , its finger number ; Step S26, combine in order , , , get the new handwriting key point set .
[0046] It is understandable that the purpose of recording handwriting by creating rules through interception of handwriting in this embodiment is to maintain the order of original handwriting drawing to cover each other. The same results in abnormal handwriting coverage order.
[0047] In an implementation of this embodiment, when creating key points corresponding to each handwriting by copying the handwriting creation rule, it includes: directly copying the original handwriting key point set to obtain a new handwriting key point set.
[0048] like Figure 4 As shown, in an actual application scenario, when recording the handwriting input by the user through the copy handwriting creation rule, the following steps are included: Step S31, copying the original handwriting key point set to obtain a new handwriting key point set; Step S32, .
[0049] In one implementation of the present embodiment, when creating key points corresponding to each handwriting by using the expanded handwriting creation rule, it includes: obtaining any key point and the next key point on the original handwriting; calculating multiple key points inserted between the two obtained key points to obtain an inserted key point set; inserting the inserted key point set between the two obtained key points to obtain a new handwriting key point set.
[0050] like Figure 5 As shown, in an actual application scenario, when recording the handwriting input by the user through the expanded handwriting creation rule, the following steps are included: Step S41, record any key point on the original handwriting and its next adjacent key point ; Step S42, assuming that after the handwriting is expanded, and When h key points are inserted between ; Step S43, calculate and insert key points The nth key point in , where its timestamp , its finger number ; Step S44, insert the key point set Insert original handwriting and Between, get .
[0051] If there are multiple places that need to be expanded, repeat steps S41 to S44.
[0052] It is understandable that the purpose of recording handwriting by expanding handwriting creation rules in this embodiment is to maintain the original overlapping order of handwriting drawing, and to prevent the insertion key points generated by expansion from causing abnormal overlapping order of expanded handwriting.
[0053] In this embodiment, different handwritings are created by original handwriting creation rules, intercepted handwriting creation rules, copied handwriting creation rules and expanded handwriting creation rules. Timestamp and finger number information can be added to key points of various handwritings, and the handwriting timestamp information and finger information can be updated and maintained; and according to a round of user operations, the handwritings can be divided into different drawing groups for update and maintenance to improve the performance of subsequent redrawing.
[0054] like Figure 1 As shown, an embodiment of the present invention provides a handwriting recording and redrawing method, comprising the following steps: Step S200, when redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rule, and the corresponding sub-handwritings are drawn in sequence according to the drawing group drawing rule to obtain the redrawing handwriting.
[0055] In this embodiment, after different handwritings are created by the above four handwriting creation rules, when the user initiates redrawing, the handwriting to be redrawn is drawn one group at a time according to the drawing groups recorded in the following more realistic handwriting recording method to obtain redrawn handwriting.
[0056] It can be understood that in this embodiment, the following more realistic handwriting recording method is used. When redrawing, the key points of different handwritings are sorted and the sub-handwritings of different handwritings are drawn in sequence, so that content such as the DNA double helix structure in which lines overlap each other can be redrawn in the drawing software, making the picture more realistic.
[0057] Specifically, in an implementation of this embodiment, step S200 includes the following steps: Step S201, taking out the key point sets of all handwritings in the drawing group, summarizing and sorting them according to the real drawing key point sorting rule, and obtaining an ordered key point set to be drawn; Step S202, taking out each key point to be drawn in order, and searching for the corresponding key point set of the handwriting recorded in the drawing group and the corresponding key point according to each key point to be drawn; Step S203, using the key point sets and key points corresponding to the key points to be drawn that are found in sequence to draw the sub-strokes.
[0058] In this embodiment, since four different handwriting creation rules are used to record, update and maintain handwriting timestamp information and finger information, the orderliness of each handwriting key point set can be guaranteed, so that the merge sort algorithm can be used during redrawing to improve the performance of the four "sorting key points of different handwritings".
[0059] like Figure 6 As shown, in actual application scenarios, when redrawing multiple handwritings based on the following drawing group drawing rules, it includes: Step S51, drawing in groups according to the drawing groups recorded in the more realistic handwriting recording method; Step S52: Get the key point set of all the handwriting in the drawing group , merge and sort according to the real drawing key point sorting rules; Step S53: Obtain an ordered set of key points to be drawn ; Step S54: Take out the key points in the key point set to be drawn in order ; Step S55, according to Find the key point set of the handwriting in the drawing group , and in The corresponding key points ; Step S56, use and Draw the sub-stroke.
[0060] In this embodiment, step S54 is repeatedly executed until All key points have been taken out.
[0061] It can be understood that, in this embodiment, the time required for subsequent sorting and sub-stroke drawing can be greatly reduced by dividing the drawing groups into drawing groups, and the time complexity is better for generating the key point set to be drawn by using merge sort, which reduces the time required for subsequent searching for the next key point for sub-stroke drawing. Therefore, the real drawing key point sorting rule adopted in this embodiment conforms to the brush line drawing logic of high-granularity line segment subdivision in reality.
[0062] In an implementation of this embodiment, step S201 includes the following steps: Step S201a, taking out the key point set of all handwritings in the drawing group, selecting any two key points, and determining the time and finger number corresponding to each key point; Step S201b, determining whether the time corresponding to the current key point is greater than the time corresponding to another key point; Step S201c, if it is greater than the time corresponding to another key point, the current key point is arranged after the other key point; Step S201d, if it is less than the time corresponding to another key point, the current key point is placed before the other key point; Step S201e, if it is equal to the time corresponding to another key point, then determine whether the finger number corresponding to the current key point is greater than the finger number corresponding to another key point; Step S201f, if it is greater than the finger number corresponding to another key point, the current key point is placed after the other key point; Step S201g: If the finger number is smaller than that corresponding to another key point, the current key point is placed before the other key point.
[0063] In this embodiment, after taking out the key point sets of all handwritings in the drawing group, they are summarized and sorted according to the real drawing key point sorting rule; wherein, the real drawing key point sorting rule mainly first determines the size of the timestamps corresponding to the two key points, and then puts the key point with the smaller timestamp in front; if the timestamps of the two key points are equal, determines the size of the finger numbers corresponding to the two key points, and then puts the key point with the smaller finger number in front.
[0064] like Figure 7 As shown, in actual application scenarios, the key points are summarized and sorted by the real drawing sorting rules, including: Step S61, record any two key points , ; Step S62, determine Is it established? If yes, go to step S66; if no, go to step S63; Step S63, determine Is it established? If yes, go to step S65; if no, go to step S64; Step S64, determine Is it established? If yes, go to step S66; if no, go to step S65; Step S65, key points At the key point Before; Step S66, key points At the key point Before.
[0065] In this embodiment, each handwriting is redrawn through the above-mentioned real drawing key point sorting rules and drawing group drawing rules. When redrawing (for example, common operations corresponding to switching canvases, undoing and redoing, saving and importing, etc.), the characteristic of lines covering each other will not be lost. Moreover, when modifying lines by filtering and erasing, the lines will not lose the characteristic of lines covering each other. This makes the redrawn picture more realistic and the user experience is better.
[0066] The handwriting recording and redrawing method in this embodiment is described below through examples of specific implementation in actual use scenarios: Scenario 1 (Creating and redrawing overlapping lines with the original handwriting rules) First, the user draws a red and a blue line that overlap each other on canvas 1 (the simplest polyline is used as an example in this embodiment), where the key point set of the red line is as follows:
[0067] The blue line keypoint set is as follows:
[0068] When the user redraws, the red line and the blue line are in the same drawing group. The key sets of the two are sorted and synthesized according to the real drawing key points to obtain the following ordered key point set to be drawn:
[0069] It can be seen that the smaller the timestamp, the earlier it is in the order. When the timestamps are equal, the smaller the finger number, the earlier it is in the order (for example, red 4 is before blue 4).
[0070] After that, the key points to be drawn are taken out, and the sub-strokes are drawn according to the corresponding key point set and key points. The specific drawing process is as follows: 1. Take out blue 1 and draw blue 1; 2. Take out red 1 and draw red 1; 3. Take out Blue 2 and draw a line connecting Blue 2 and Blue 1; 4. Take out Red 2 and draw a line connecting Red 2 and Red 1; 5. Take out Blue 3 and draw a line connecting Blue 3 and Blue 2; 6. Take out red 3 and draw a line connecting red 3 and red 2; 7. Take out red 4 and draw a line connecting red 4 and red 3; 8. Take out Blue 4 and draw a line connecting Blue 4 and Blue 3.
[0071] Finally, according to the above drawing process, the redrawing result of the mutually overlapping lines is as follows Figure 8 shown.
[0072] Scenario 2 (Creating and redrawing overlapping lines using the interception handwriting rule) First, the user draws a red and a blue line that overlap each other on canvas 1 (the original handwriting is as follows Figure 8 As shown); the red line key point set is as follows:
[0073] The blue line keypoint set is as follows:
[0074] Then, the user erased a small section in the middle of the blue line and a small section at the end of the red line. A part of the blue line between blue 3 and blue 4 was erased, and red 4 was erased. Based on the original blue line, blue line A and blue line B were obtained according to the interception handwriting creation rules. Based on the original red line, red line C was obtained.
[0075] The key point set of blue line A is as follows:
[0076] The key point set of blue line B is as follows:
[0077] The key point set of the red line C is as follows:
[0078] When redrawing, the ordered set of key points to be drawn is synthesized as shown below, and it can be seen that the handwriting coverage relationship is preserved:
[0079] The new handwriting obtained after redrawing is as follows Fig. 9 As shown, the specific drawing process is: 1. Take out blue A1 and draw blue A1; 2. Take out red C1 and draw red C1; 3. Take out blue A2 and draw a line connecting blue A2 and blue A1; 4. Take out red C2 and draw a line connecting red C2 and red C1; 5. Take out blue A3 and draw a line connecting blue A3 and blue A2; 6. Take out blue B1 and draw blue B1; 7. Take out red C3 and draw a line connecting red C3 and red C2; 8. Take out red C4 and draw a line connecting red C4 and red C3; 9. Take out blue A4 and draw a line connecting blue A4 and blue A3; 10. Take out blue B2 and draw a line connecting blue B2 and blue B1.
[0080] The above handwriting recording and redrawing method in this embodiment is consistent with the effect of holding two pen lines of different colors in reality, giving users a more realistic experience; and this method has good versatility, and the same effect can be achieved by simply adding the recording and maintenance of relevant data of this scheme to the original handwriting data recording scheme.
[0081] This embodiment achieves the following technical effects through the above technical solution: This embodiment records multiple handwritings through handwriting creation rules, and redraws each handwriting using real drawing key point sorting rules and drawing group drawing rules, so that the content where lines overlap each other can be drawn in the drawing software, and the characteristic of lines covering each other will not be lost during redrawing, making the picture more realistic, ensuring the consistency between the handwriting content redrawn by the software and the handwriting content seen by the user when drawing, and improving the accuracy of redrawing of multiple handwritings.
[0082] Exemplary Devices Based on the above embodiments, the present invention further provides a handwriting recording and redrawing system, which is used for multi-user collaborative operation of drawing scenes or single-user multi-finger collaborative operation of drawing scenes, comprising: A handwriting creation module, for obtaining a key point set corresponding to a handwriting created based on a preset handwriting creation rule, and dividing the collaboratively created handwriting and the corresponding key point set into the same drawing group; wherein the key point set is a set of points controlling the handwriting trajectory, and each key point in the key point set is provided with a corresponding timestamp and a corresponding finger number; The handwriting redrawing module is used to summarize and sort all key point sets in the same drawing group based on the real drawing key point sorting rule when initiating redrawing, and draw the corresponding sub-handwriting in sequence according to the drawing group drawing rule to obtain the redrawn handwriting.
[0083] In one implementation, the handwriting creation module includes: A handwriting creation unit, used for creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule and the expanded handwriting creation rule; The key point set acquisition unit is used to acquire key point sets corresponding to various handwritings and record the corresponding timestamp and finger number in each key point.
[0084] In one implementation, the handwriting creation unit includes: The original handwriting creation subunit is used to record the current system time into the corresponding timestamp when creating the key points corresponding to each handwriting according to the original handwriting creation rule, and record the finger number used by the current user to create the current key point into the corresponding finger number; The intercepted handwriting creation subunit is used to search for the previous key point and the next key point of the interception starting point on the original handwriting, and search for the previous key point and the next key point of the interception end point when creating the key points corresponding to each handwriting according to the intercepted handwriting creation rule; intercept all the searched key points from the key point set corresponding to the original handwriting to obtain the intercepted key point set; calculate the starting key point and the end key point of the new handwriting; and sequentially combine the starting key point of the new handwriting, the intercepted key point set, and the end key point of the new handwriting to obtain the new handwriting key point set; A handwriting copying subunit is used to copy and obtain a new handwriting key point set; The expanded handwriting creation subunit is used to obtain any key point and the next key point on the original handwriting when creating the key points corresponding to each handwriting through the expanded handwriting creation rule; calculate multiple key points inserted between the two key points obtained to obtain an inserted key point set; insert the inserted key point set between the two key points obtained to obtain a new handwriting key point set.
[0085] In one implementation, the handwriting redrawing module includes: The summarizing and sorting unit is used to extract the key point sets of all handwritings in the drawing group, summarize and sort them according to the real drawing key point sorting rules, and obtain an ordered key point set to be drawn; A key point search unit is used to sequentially retrieve each key point to be drawn, and search for a corresponding key point set of handwriting recorded in the drawing group and a corresponding key point according to each key point to be drawn; The sub-handwriting drawing unit is used to sequentially use the key point sets and key points corresponding to the key points to be drawn that are found to draw the sub-handwriting.
[0086] In one implementation, the inductive sorting unit includes: A selection subunit is used to take out the key point set of all handwritings in the drawing group, select any two key points, and determine the time and finger number corresponding to each key point; A first judging subunit, used to judge whether the time corresponding to the current key point is greater than the time corresponding to another key point; A first sorting subunit is used to sort the current key point after another key point when the time is greater than the time corresponding to the other key point; and to sort the current key point before another key point when the time is less than the time corresponding to the other key point; The second judgment subunit is used to judge whether the finger number corresponding to the current key point is greater than the finger number corresponding to another key point when the time is equal to the time corresponding to another key point; The second sorting subunit is used to sort the current key point after the other key point when the current key point is greater than the finger number corresponding to the other key point; and to sort the current key point before the other key point when the current key point is less than the finger number corresponding to the other key point.
[0087] This embodiment achieves the following technical effects through the above technical solution: This embodiment records multiple handwritings through handwriting creation rules, and redraws each handwriting using real drawing key point sorting rules and drawing group drawing rules, so that the content where lines overlap each other can be drawn in the drawing software, and the characteristic of lines covering each other will not be lost during redrawing, making the picture more realistic, ensuring the consistency between the handwriting content redrawn by the software and the handwriting content seen by the user when drawing, and improving the accuracy of redrawing of multiple handwritings.
[0088] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be as follows: Fig.10 shown.
[0089] The terminal includes: a processor, a memory, an interface, a display screen and a communication module connected through a system bus; wherein the processor of the terminal is used to provide computing and control capabilities; the memory of the terminal includes a storage medium and an internal memory; the storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the storage medium; the interface is used to connect to external devices; the display screen is used to display corresponding information; and the communication module is used to communicate with a cloud server or other devices.
[0090] The computer program is used to implement the operation of the handwriting recording and redrawing method when executed by a processor.
[0091] It can be understood by those skilled in the art that Fig.10 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] In one embodiment, a terminal is provided, which includes: a processor and a memory, wherein the memory stores a handwriting recording and redrawing program, and the handwriting recording and redrawing program is used to implement the operation of the above handwriting recording and redrawing method when executed by the processor.
[0093] In one embodiment, a storage medium is provided, wherein the storage medium stores a handwriting recording and redrawing program, and the handwriting recording and redrawing program is used to implement the operation of the handwriting recording and redrawing method as described above when executed by a processor.
[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and volatile memory.
[0095] In summary, the present invention provides a handwriting recording and redrawing method and system, including: for handwriting created based on preset handwriting creation rules, obtaining the key point set corresponding to the handwriting, and dividing the collaboratively created handwriting and the corresponding key point set into the same drawing group; when initiating redrawing, summarizing and sorting all the key point sets in the same drawing group based on the real drawing key point sorting rule, and drawing the corresponding sub-handwriting in sequence according to the drawing group drawing rule to obtain the redrawn handwriting. The present invention records multiple handwritings through handwriting creation rules, and redraws each handwriting using the real drawing key point sorting rule and the drawing group drawing rule, thereby ensuring the consistency of the handwriting content redrawn by the software and the handwriting content seen by the user when drawing.
[0096] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A handwriting recording and redrawing method, used for multi-user collaborative operation drawing scene or single user multi-finger collaborative operation drawing scene, characterized in that: include: For handwriting created based on a preset handwriting creation rule, a key point set corresponding to the handwriting is obtained, and the collaboratively created handwriting and the corresponding key point set are divided into the same drawing group; wherein the key point set is a set of points controlling the handwriting trajectory, and each key point in the key point set is provided with a corresponding timestamp and a corresponding finger number; When redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rule, and the corresponding sub-handwriting is drawn in sequence according to the drawing group drawing rule to obtain the redrawing handwriting.
2. The handwriting recording and redrawing method according to claim 1, characterized in that: The step of obtaining a key point set corresponding to the handwriting created based on a preset handwriting creation rule comprises: Creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule, and the expanded handwriting creation rule; Get the key point sets corresponding to various handwritings, and record the corresponding timestamp and finger number in each key point.
3. The handwriting recording and redrawing method according to claim 2, characterized in that: The method of creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule and the expanded handwriting creation rule includes: When the key points corresponding to each handwriting are created by the original handwriting creation rule, the current system time is recorded in the corresponding timestamp, and the finger number used by the current user to create the current key point is recorded in the corresponding finger number.
4. The handwriting recording and redrawing method according to claim 2, characterized in that: The method of creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule and the expanded handwriting creation rule further includes: When creating key points corresponding to each handwriting by the intercepted handwriting creation rule, searching for the key point before and after the interception starting point on the original handwriting, and searching for the key point before and after the interception end point; All the key points to be found are intercepted from the key point set corresponding to the original handwriting to obtain an intercepted key point set; Calculate the starting point and ending point of the new handwriting; The starting point key point of the new handwriting, the intercepted key point set, and the ending point key point of the new handwriting are combined in sequence to obtain a new handwriting key point set.
5. The handwriting recording and redrawing method according to claim 2, characterized in that: The method of creating and recording a plurality of handwritings based on one or more of the original handwriting creation rule, the intercepted handwriting creation rule, the copied handwriting creation rule and the expanded handwriting creation rule further includes: When creating key points corresponding to each handwriting by using the expanded handwriting creation rule, obtaining any key point and the next key point on the original handwriting; Calculate multiple key points inserted between the two acquired key points to obtain an inserted key point set; The insertion key point set is inserted between the two acquired key points to obtain a new handwriting key point set.
6. The handwriting recording and redrawing method according to claim 1, characterized in that: When redrawing is initiated, all key point sets in the same drawing group are summarized and sorted based on the real drawing key point sorting rule, and corresponding sub-handwritings are drawn in sequence according to the drawing group drawing rule to obtain redrawing handwritings, including: Take out the key point sets of all handwritings in the drawing group, summarize and sort them according to the real drawing key point sorting rules, and obtain an ordered key point set to be drawn; Take out each key point to be drawn in order, and search for the corresponding key point set of the handwriting recorded in the drawing group and the corresponding key point according to each key point to be drawn; The sub-strokes are drawn using the key point sets and key points corresponding to the key points to be drawn.
7. The handwriting recording and redrawing method according to claim 6, characterized in that: The key point set of all handwritings in the drawing group is taken out, summarized and sorted according to the real drawing key point sorting rule, and an ordered key point set to be drawn is obtained, including: Taking out the key point set of all handwritings in the drawing group, selecting any two key points, and determining the time and finger number corresponding to each key point; Determine whether the time corresponding to the current key point is greater than the time corresponding to another key point; If it is greater than the time corresponding to another key point, the current key point is placed after the other key point; If it is less than the time corresponding to another key point, the current key point is placed before the other key point; If it is equal to the time corresponding to another key point, determine whether the finger number corresponding to the current key point is greater than the finger number corresponding to another key point; If it is greater than the finger number corresponding to another key point, the current key point is placed after the other key point; If it is less than the finger number corresponding to another key point, the current key point is placed before the other key point.
8. A handwriting recording and redrawing system, used for multi-user collaborative operation drawing scene or single user multi-finger collaborative operation drawing scene, characterized in that: include: A handwriting creation module, for obtaining a key point set corresponding to a handwriting created based on a preset handwriting creation rule, and dividing the collaboratively created handwriting and the corresponding key point set into the same drawing group; wherein the key point set is a set of points controlling the handwriting trajectory, and each key point in the key point set is provided with a corresponding timestamp and a corresponding finger number; The handwriting redrawing module is used to summarize and sort all key point sets in the same drawing group based on the real drawing key point sorting rule when initiating redrawing, and draw the corresponding sub-handwriting in sequence according to the drawing group drawing rule to obtain the redrawn handwriting.
9. A terminal, characterized in that: include: A processor and a memory, wherein the memory stores a handwriting recording and redrawing program, and when the handwriting recording and redrawing program is executed by the processor, it is used to implement the operation of the handwriting recording and redrawing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a handwriting recording and redrawing program, and when the handwriting recording and redrawing program is executed by a processor, it is used to implement the operation of the handwriting recording and redrawing method as described in any one of claims 1-7.