Note shuffling method, device, electronic device and storage medium
By obtaining the insert function block instruction in the note application of the ink screen device or smart terminal, splitting the handwritten block and inserting the new function block, the problem of note confusion is solved, the correct sorting of function blocks is achieved when the notes are exported, and the practicality and user experience are improved.
Patent Information
- Application Number
- CN202111550971.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-12-17
AI Technical Summary
In the prior art, in note-taking applications on ink screen devices or other smart terminals with handwriting functions, inserting function blocks causes confusion in the notes and prevents them from being exported normally, affecting practicality and user experience.
By obtaining the instruction to insert a function block and determining the insertion position, the handwritten block is split and the new function block is inserted at the split point. The vertical coordinate value of each function block is adjusted to ensure that the function blocks in the note interface do not overlap. The handwriting track area and the split point selected by the user are used for splitting and inserting operations.
The correct sorting and positioning of function blocks in the note interface are achieved, ensuring that the function blocks are not confused when notes are exported, and improving the practicality and user experience of the note application.
Smart Images

Figure CN114283427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent terminal technology, and in particular to a note shuffling method, device, electronic device and storage medium. Background Art
[0002] Note-taking apps can be used to record learning content, daily life, and memos, allowing users to record anytime, anywhere without the need for pen and paper. Note-taking apps are particularly popular on e-ink devices, as they offer a paper-like display, making them easier for users to read and write.
[0003] Currently, the handwriting block in note-taking apps on e-ink devices or other smart terminals with handwriting capabilities supports inserting functional blocks such as images, audio recordings, and text. However, inserting other functional blocks into the handwriting block can cause functional block confusion when exporting notes to other formats, making note export impossible and thus affecting the practicality of note-taking apps. Summary of the Invention
[0004] The present invention provides a note shuffling method, device, electronic device and storage medium, which are used to solve the defect in the prior art that notes cannot be exported after a function block is inserted into a handwriting block.
[0005] The present invention provides a note shuffling method, comprising:
[0006] Obtaining an insert function block instruction and determining an insertion position indicated by the insert function block instruction;
[0007] In the case that the insertion position is in a handwriting block, the handwriting block is segmented, and the newly added function block corresponding to the insert function block instruction is inserted into the segmented position of the handwriting block.
[0008] According to a note shuffling method provided by the present invention, segmenting the handwritten blocks includes:
[0009] Determining an end position, wherein the end position is a position where handwriting is stopped before acquiring the insert function block instruction;
[0010] Based on the end position, locate the handwriting track area in the handwriting block, and obtain a first vertical coordinate value of the bottom edge of the handwriting track area;
[0011] The handwritten block is segmented based on the first vertical coordinate value.
[0012] According to a note shuffling method provided by the present invention, the first vertical coordinate value is determined based on the following steps:
[0013] Obtaining the coordinates of a track point of the current handwriting in the handwriting block, and updating the maximum vertical coordinate value in the handwriting track area based on the coordinates of the track point of the current handwriting;
[0014] The maximum vertical coordinate value updated based on the last handwriting is determined as the first vertical coordinate value, and the last handwriting is the handwriting with the end position as the end point.
[0015] According to a note shuffling method provided by the present invention, the step of segmenting the handwritten blocks further includes:
[0016] Delete the blank handwriting blocks obtained after segmentation;
[0017] The method further includes inserting the newly added function block corresponding to the insert function block instruction into the segmentation of the handwritten block:
[0018] Obtain a second vertical coordinate value of the bottom edge of the newly added functional block;
[0019] Based on the second vertical coordinate value, a newly constructed handwriting block is inserted.
[0020] According to a note shuffling method provided by the present invention, the method further comprises: obtaining an insert function block instruction and determining an insert position indicated by the insert function block instruction; and then:
[0021] When the insertion position is before or after any function block, a new function block corresponding to the insert function block instruction is inserted based on the target vertical coordinate value of the top edge or the bottom edge of any function block.
[0022] A note shuffling method according to the present invention further includes:
[0023] When a height change of any text block is detected, obtaining a coordinate change value of the text block, the coordinate change value being a change in a vertical coordinate value of a bottom edge of the text block;
[0024] Based on the coordinate change value, the vertical coordinate value of each function block following any one text block is adjusted.
[0025] A note shuffling method according to the present invention further includes:
[0026] Obtaining a delete function block instruction, and determining a function block to be deleted corresponding to the delete function block instruction;
[0027] The function block to be deleted is deleted, and based on the block height of the function block to be deleted, vertical coordinate values of each function block after the function block to be deleted are adjusted.
[0028] A note shuffling method according to the present invention further includes:
[0029] Obtaining a move function block instruction, and determining a function block to be moved corresponding to the move function block instruction;
[0030] The function block to be moved is moved to a target position corresponding to the move function block instruction, and based on the block height of the function block to be moved, vertical coordinate values of each function block after the function block to be moved before the movement are adjusted.
[0031] A note shuffling method according to the present invention further includes:
[0032] Obtaining a replacement function block instruction, and determining a replaced function block and a to-be-replaced function block corresponding to the replacement function block instruction;
[0033] Deleting the replaced functional block and inserting the to-be-replaced functional block at the deleted position;
[0034] Based on the block height of the replaced functional block and the block height of the functional block to be replaced, the vertical coordinate values of each functional block following the functional block to be replaced are adjusted.
[0035] A note shuffling method according to the present invention further includes:
[0036] Get the note export instruction and obtain the overall bitmap image of the handwriting block to be exported;
[0037] Determine a third vertical coordinate value of a top edge of a handwriting area in the handwriting block to be exported, and a fourth vertical coordinate value of a bottom edge of the handwriting area;
[0038] Based on the third vertical coordinate value and the fourth vertical coordinate value, intercepting the entire bitmap image to obtain a target bitmap image;
[0039] The target bitmap image is sent to the import end, so that the import end fills the target bitmap image into the target handwriting block of the import end, and the height of the target handwriting block is determined by the height of the target bitmap image.
[0040] The present invention also provides a note shuffling device, comprising:
[0041] A determination module, configured to obtain an insert function block instruction and determine an insertion position indicated by the insert function block instruction;
[0042] The segmentation module is used to segment the handwriting block when the insertion position is in the handwriting block, and insert the new function block corresponding to the insert function block instruction into the segmentation position of the handwriting block.
[0043] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described note mixing methods are implemented.
[0044] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described note mixing methods.
[0045] The note mixing method, device, electronic device and storage medium provided by the present invention insert a new functional block into a handwriting block, first divide the handwriting block, and then insert the new functional block at the division of the handwriting block. Compared with directly superimposing the new functional block on the handwriting block, the present invention can prevent the functional blocks in the note interface from overlapping, thereby facilitating the positioning of the functional blocks in the note interface. Furthermore, when exporting notes, the functional blocks in the note interface can be positioned so that the functional blocks in the exported notes are sorted normally, thereby improving the practicality and usage experience of the note application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 This is one of the flow charts of the note shuffling method provided by the present invention;
[0048] Figure 2 This is one of the schematic diagrams of mixed arrangement of notes provided by the present invention;
[0049] Figure 3 This is the second schematic diagram of the mixed arrangement of notes provided by the present invention;
[0050] Figure 4 1 is a flow chart of the handwriting block segmentation method provided by the present invention;
[0051] Figure 5 This is the second flow chart of the note shuffling method provided by the present invention;
[0052] Figure 6 This is the third flow chart of the note shuffling method provided by the present invention;
[0053] Figure 7 This is the fourth flow chart of the note shuffling method provided by the present invention;
[0054] Figure 8This is the fifth flow chart of the note shuffling method provided by the present invention;
[0055] Figure 9 This is the sixth flow chart of the note shuffling method provided by the present invention;
[0056] Figure 10 This is the seventh flow chart of the note shuffling method provided by the present invention;
[0057] Figure 11 This is the eighth flow chart of the note shuffling method provided by the present invention;
[0058] Figure 12 It is a structural schematic diagram of the note mixing device provided by the present invention;
[0059] Figure 13 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0061] At present, the initial state of the note application on the ink screen device is mostly a full-screen handwriting block. If the user needs to insert other function blocks such as picture blocks, recording blocks, text blocks, etc. in the full-screen handwriting block later, the corresponding new function blocks will be directly superimposed on the full-screen handwriting block, resulting in the inability to locate the inserted new function blocks. As a result, when the notes are exported to other formats, function block confusion may occur, resulting in the failure of note export, or garbled characters or function block confusion when the exported notes are displayed on other devices. Similarly, when a new function block is inserted into any handwriting block later, the function block confusion problem will occur. Therefore, the note export function cannot be realized after inserting a function block in the handwriting block, which affects the practicality of the note application and thus affects the user experience.
[0062] In response to the above problems, the present invention provides a note mixing method, which can be applied to ink screen devices and other smart terminals with handwriting functions, such as smart phones, tablet computers, etc. Figure 1 This is one of the flow charts of the note shuffling method provided by the present invention, such as Figure 1 As shown, the method includes:
[0063] Step 110: Obtain an insert function block instruction and determine an insert position indicated by the insert function block instruction.
[0064] Here, the insert function block instruction (also known as the new function block instruction) is an instruction generated in response to the user's function block insertion operation through the application device of an embodiment of the present invention. For example, the user triggers the corresponding insert function block instruction by clicking on the ink screen of the ink screen device. At this time, the ink screen device obtains the insert function block instruction.
[0065] The Insert Function Block command is used to insert a new function block into the current note interface. Specifically, the Insert Function Block command can be used to indicate the function block type of the new function block, for example, the function block type includes handwriting block, picture block, recording block, text block, etc. The Insert Function Block command can also be used to indicate the insertion position of the new function block, for example, the Insert Function Block command can be used to indicate the insertion position of the new function block as within a handwriting block, after a function block, before a function block, or within a text block, etc.
[0066] It should be noted that the note interface (note area) is the area for taking notes in the application device of the embodiment of the present invention. The note interface can be composed of functional blocks such as handwriting blocks, picture blocks, recording blocks, text blocks, etc. arranged and combined in order of position, and the functional blocks in the note interface do not overlap in position. Specifically, the functional blocks are sorted and combined according to the vertical position to form the note interface, thereby achieving the purpose of mixed note arrangement. More specifically, each functional block in the note interface can be arranged in the vertical coordinate order of the block height, so that each functional block in the note interface can be positioned, and then when the notes are exported, each functional block can be exported based on the positioning result, thereby preventing the problem of functional block confusion.
[0067] For example, Figure 2 This is one of the note mixing diagrams provided by the present invention, such as Figure 2 As shown, in the note interface 200, there are a handwriting block 210 containing handwriting, a picture block 220, a handwriting block 230 containing handwriting, a recording block 240, and a text block 250. At this time, if the insertion position indicated by the insert function block instruction is between the second and third rows of the handwriting block 210, and the newly added function block corresponding to the insert function block instruction is a handwriting block, then after completing the insert function block instruction, a newly constructed handwriting block is obtained. Specifically, Figure 3 This is the second schematic diagram of the mixed arrangement of notes provided by the present invention, such as Figure 3 As shown, in the note interface 200, there are a handwriting block 211 containing handwriting, a newly added handwriting block 212, a handwriting block 213 containing handwriting, a picture block 220, a handwriting block 230 containing handwriting, and a recording block 240, while a text block 250 is displayed in the next note interface. Figure 2 and Figure 3 As shown, the function blocks in the note interface can be displayed and deployed in a mixed manner, and the function blocks will not overlap or overlap. The insert function block instruction can be triggered in a variety of ways. In one way, each function block is displayed in the form of an icon (such as a button) on the note interface. When the user needs to insert any function block, he clicks the corresponding icon. At this time, the application device of the embodiment of the present invention obtains and responds to the insert function block instruction; because the corresponding insert function block instruction is triggered by clicking the icon corresponding to each function block, the application device can determine the type of the newly added function block based on the insert function block instruction, thereby implementing the insert function block operation based on the type of the newly added function block. In another way, it can be triggered in the function block management pop-up window. Specifically, long press any function block in the function block management pop-up window, then click the insert icon (also called the add icon), and then select the type of function block to be inserted. At this time, the application device of the embodiment of the present invention obtains and responds to the insert function block instruction; or long press the handwriting block or text block in the function block management pop-up window, and then click the insert icon corresponding to the add function block (for example, click the icon corresponding to the insert handwriting block). At this time, the application device of the embodiment of the present invention obtains and responds to the insert function block instruction. This method is usually used to split the handwriting block or text block to insert other function blocks at the split. Of course, the insert function block instruction can also be triggered by other methods, which will not be repeated here.
[0068] It should be noted that in order to facilitate the management of the various function blocks in the note interface, a management icon (such as a management button) can be set on the note interface to trigger the management mechanism through the management icon, and a function block management pop-up window will pop up on the screen. The function block management pop-up window is used to display thumbnails of each function block in the note interface, and the order of the thumbnails can be the same as the order of each function block in the note interface. Specifically, a pop-up window pop-up instruction is obtained, and a function block management pop-up window pops up on the screen. The function block management pop-up window can be used for operations such as moving function blocks, inserting function blocks, splitting function blocks, replacing function blocks, or deleting function blocks.
[0069] The insertion position indicated by the insert function block instruction may be in a handwriting block, after a function block, before a function block, or in a text block, etc.
[0070] In one case, the insert function block instruction is triggered in the note interface. Specifically, if the current note input position is in the handwriting block and the insert function block instruction is triggered at the same time, the insertion position indicated by the insert function block instruction is in the handwriting block. For example, the position where the handwriting is stopped before the insert function block instruction is obtained is the note input position; if the current note input position is before or after a certain function block and the insert function block instruction is triggered at the same time, the insertion position indicated by the insert function block instruction is before or after the certain function block. For example, the position where the cursor stops before the insert function block instruction is obtained is the note input position. The cursor can stop before or after the picture block, before or after the recording block, before or after the text block, before or after the handwriting block, etc.; if a certain function block is currently selected in the note interface , and the insert function block instruction is triggered at the same time. At this time, the insertion position indicated by the insert function block instruction is before the certain function block or after the certain function block. As for whether it is before the certain function block or after the certain function block, it can be set according to actual needs and is not limited here; if the current note input position (usually displayed in the form of a cursor) is in the text block, and the insert function block instruction is triggered at the same time, the insertion position indicated by the insert function block instruction is in the text block; if a split point is selected in the handwriting block or the text block, and the insert function block instruction is triggered at the same time, the insertion position indicated by the insert function block instruction is in the handwriting block or the text block, and the specific insertion position is the split point, which can be selected by the user.
[0071] In another case, the insert function block instruction is triggered in the function block management pop-up window. Specifically, if you long press a function block in the function block management pop-up window, select the insert icon of the corresponding function block type, and trigger the corresponding insert function block instruction, then the insertion position indicated by the insert function block instruction is before the function block or after the function block. As for whether it is before or after the function block, it can be set according to actual needs and is not limited here. For example, when you click to add a picture block, handwriting block, recording block or text block, a new picture block, handwriting block, recording block or text block is added below the function block; if you click in the function block management pop-up window, the insertion position indicated by the insert function block instruction is before or after the function block. After long pressing a handwriting block in the window, select the insert icon of the corresponding function block type to trigger the corresponding insert function block instruction, the insertion position indicated by the insert function block instruction is located in the handwriting block; if you long press a text block in the function block management pop-up window, select the insert icon of the corresponding function block type to trigger the corresponding insert function block instruction, the insertion position indicated by the insert function block instruction is located in the text block; if the insert function block instruction is directly triggered in a divided handwriting block or text block, the insertion position indicated by the insert function block instruction is located in the handwriting block or the text block.
[0072] In another case, the Insert Function Block command is triggered in the note interface, and each function block in the note interface can be selected or long-pressed. Specifically, the insertion position indicated by the Insert Function Block command is basically the same as the insertion position indicated by the Insert Function Block command triggered in the function block management pop-up window mentioned above, and will not be repeated here.
[0073] Of course, it also includes inserting function block instructions triggered by other methods and inserting positions indicated by other methods, which will not be described here one by one.
[0074] Step 120 : When the insertion position is in a handwriting block, the handwriting block is segmented, and the newly added function block corresponding to the insert function block instruction is inserted into the segmented portion of the handwriting block.
[0075] Here, the division points of the handwriting block can be determined by the handwriting trajectory area or by user-selected division points. The handwriting trajectory area is the area from the end point of the current handwriting to the beginning of the handwriting block. The end point is the point where the handwriting stopped before the insert function block instruction was received.
[0076] Specifically, the handwriting block is segmented below the handwriting track area or at the segmentation point, resulting in a first handwriting block containing the handwriting track area, or a first handwriting block before the segmentation point, and a second handwriting block containing the area below the handwriting track area, or a second handwriting block after the segmentation point. The second handwriting block can be a blank handwriting block or a handwriting block containing a handwriting track, which is not limited here.
[0077] In one embodiment, the position of the first handwriting block does not change, that is, the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the bottom edge of the handwriting track area, or the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the split point, and the vertical coordinate value of the top edge of the first handwriting block is the vertical coordinate value of the top edge of the handwriting block before splitting; the vertical coordinate value of the bottom edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwriting block plus the block height of the newly added functional block, and the vertical coordinate value of the top edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwriting block. Of course, if there is a certain distance between the first handwriting block and the newly added functional block, the distance can be added accordingly; the vertical coordinate value of the bottom edge of the second handwriting block is the vertical coordinate value of the bottom edge of the newly added functional block plus the block height of the second handwriting block, and the vertical coordinate value of the top edge of the second handwriting block is the vertical coordinate value of the bottom edge of the newly added functional block. Of course, if there is a certain distance between the second handwriting block and the newly added functional block, the distance can be added accordingly.
[0078] In another embodiment, if the second handwriting block is a blank handwriting block, the second handwriting block is deleted. At this time, the position of the first handwriting block does not change, that is, the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the bottom edge of the handwriting track area, or the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the split point, and the vertical coordinate value of the top edge of the first handwriting block is the vertical coordinate value of the top edge of the handwriting block before splitting; the vertical coordinate value of the bottom edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwriting block plus the block height of the newly added functional block, and the vertical coordinate value of the top edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwriting block plus the block height of the newly added functional block, and the vertical coordinate value of the top edge of the newly added functional block is the vertical coordinate value of the first handwriting block. The vertical coordinate value of the bottom edge. Of course, if there is a certain distance between the first handwritten block and the newly added functional block, the distance can be added accordingly; afterward, the newly constructed new handwritten block is inserted after the newly added functional block, and the vertical coordinate value of the bottom edge of the new handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block plus the block height of the new handwritten block. The vertical coordinate value of the top edge of the new handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block. Of course, if there is a certain distance between the newly added functional block and the new handwritten block, the distance can be added accordingly. The block height of the new handwritten block can be set to a preset value by default, or it can be set by the user.
[0079] Here, the newly added functional blocks include but are not limited to: handwriting blocks, picture blocks, text blocks, recording blocks and other functional blocks.
[0080] If the newly added function block is a handwriting block, the block height of the newly added handwriting block can be a default value or can be set by the user. If the newly added function block is a recording block, the height of the newly added recording block can be a default value or can be set by the user. If the newly added function block is a picture block, the height of the newly added picture block can be set according to the pixels of the picture, or can be a default value. If the newly added function block is a text block, the height of the newly added text block can be set according to the vertical distance between the first and last characters, or can be a default value or can be set by the user; specifically, if there are already characters in the newly added text block, it can be set according to the vertical distance between the first and last characters; if there are no characters in the newly added text block, it can be a default value or can be set by the user.
[0081] It can be understood that since the newly added recording block is inserted at the division point, the functional blocks in the note interface are not superimposed. Compared with the prior art where the inserted recording block cannot be positioned and only one recording block can be inserted, the embodiment of the present invention can insert multiple recording blocks, and the user can record the recording at any position as needed, thereby improving the efficiency of note recording.
[0082] Furthermore, the newly added function block corresponding to the insert function block instruction is inserted into the division of the handwritten block, and then the following steps are further included:
[0083] Based on the block height of the newly added function block, the vertical coordinate values of each function block following the newly added function block are adjusted.
[0084] Here, the vertical coordinate value may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0085] Specifically, the vertical coordinate values of each function block after the newly added function block are added to the block height of the newly added function block to obtain the adjusted vertical coordinate value. Of course, if there is a certain distance between the newly added function block and other function blocks before and after, and this distance is increased compared to the note interface before the newly added function block is inserted, the increased distance can be added accordingly.
[0086] Furthermore, after the above step 110, the following steps are also included:
[0087] In the case where the insertion position is in a text block, the text block is segmented based on the acquired segmentation points, and the newly added function block corresponding to the insert function block instruction is inserted into the segmentation position of the text block.
[0088] The split point may be selected by the user, or the split point is the position where the note is input before the insert function block instruction is obtained, such as the position where the cursor ends.
[0089] It can be understood that if it is necessary to insert a new function block in a text block, first split the text block, and then insert the new function block at the split of the text block. Compared with directly superimposing the new function block on the text block, the embodiment of the present invention can prevent the function blocks in the note interface from overlapping, thereby facilitating the positioning of the function blocks in the note interface. Further, when exporting notes, the function blocks in the note interface can be positioned so that the function blocks in the exported notes are sorted normally, thereby improving the practicality and usage experience of the note application.
[0090] In this embodiment, the specific execution steps of text block segmentation and inserting new function blocks are substantially similar to the execution steps of the above-mentioned handwriting blocks, and are not described in detail here.
[0091] The method provided by the embodiment of the present invention inserts a new functional block into a handwriting block, first divides the handwriting block, and then inserts the new functional block at the division of the handwriting block. Compared with directly superimposing the new functional block on the handwriting block, the embodiment of the present invention can prevent the functional blocks in the note interface from overlapping, thereby facilitating the positioning of the functional blocks in the note interface. Furthermore, when exporting notes, the functional blocks in the note interface can be positioned so that the functional blocks in the exported notes are sorted normally, thereby improving the practicality and usage experience of the note application.
[0092] Based on the above embodiments, Figure 4FIG. 1 is a flow chart of the handwriting block segmentation method provided by the present invention, as shown in FIG. Figure 4 As shown, the segmentation position of the handwriting block is determined by the handwriting trajectory area. In this method, in the above step 120, segmenting the handwriting block includes:
[0093] Step 121, determining the end position, the end position being the position where handwriting stops before acquiring the insert function block instruction;
[0094] Step 122: Locate the handwriting trace area in the handwriting block based on the end position, and obtain a first vertical coordinate value of the bottom edge of the handwriting trace area;
[0095] Step 123: Segment the handwritten block based on the first vertical coordinate value.
[0096] Here, the handwriting trace area is the area from the end point of the current handwriting to the beginning of the handwriting block. The end point is where the handwriting stopped before receiving the insert function block instruction. This handwriting trace area is used to determine the position of the segmentation within the handwriting block and the specific insertion position of the new function block corresponding to the insert function block instruction.
[0097] In certain situations, a handwriting block may contain blank areas, which are areas where no writing has occurred. Specifically, a handwriting trace area is a regular rectangular area. For example, if a handwriting block contains 10 lines of handwriting, the current end position is line 5, and the first five lines have handwriting traces, while the last five lines do not, then the handwriting trace area is the first five lines of handwriting.
[0098] In a specific embodiment, the handwriting block is a full-screen handwriting block initialized in the note interface, and the handwriting track area is the area from the beginning to the end position of the full-screen handwriting block.
[0099] Specifically, the handwriting block can be horizontally split directly at the first vertical coordinate value, or the handwriting block can be horizontally split below the first vertical coordinate value. That is, the handwriting block is split below the handwriting track area to obtain a first handwriting block containing the handwriting track area and a second handwriting block containing the area below the handwriting track area.
[0100] The method provided by the embodiment of the present invention helps to improve the accuracy of handwriting track area positioning by determining the end position where handwriting is stopped before obtaining the instruction to insert a function block, and then divides the handwriting block based on the vertical coordinate value of the bottom edge of the handwriting track area, which helps to improve the accuracy of handwriting block segmentation, thereby ensuring the successful insertion of the new function block and preventing overlap between function blocks, and ultimately preventing overlap between function blocks in the note interface.
[0101] Based on the above embodiment, the first vertical coordinate value of the bottom edge of the handwriting trace area is determined based on the following steps:
[0102] Acquire the coordinates of the track point of the current handwriting in the handwriting block, and update the maximum vertical coordinate value in the handwriting track area based on the coordinates of the track point of the current handwriting;
[0103] The maximum vertical coordinate value obtained by updating the last handwriting is determined as the first vertical coordinate value, where the last handwriting is the handwriting with the end position as the end point.
[0104] Specifically, the user's handwriting input information (such as electromagnetic signals) is received in the handwriting block, and the handwriting input information is converted into track point coordinates (i.e., screen coordinates). Then, the track point coordinates of each handwriting are recorded. If the track point coordinates of the current handwriting are greater than the maximum vertical coordinate value, the maximum vertical coordinate value is updated to the track point coordinates of the current handwriting. If handwriting continues, the maximum vertical coordinate value is updated based on the track point coordinates of each handwriting until the handwriting stops, and the maximum vertical coordinate value obtained by the update of the last handwriting is obtained.
[0105] In addition, the first vertical coordinate value of the bottom edge of the handwriting track area can be determined when handwriting stops, or can be determined when the first vertical coordinate value needs to be obtained.
[0106] The method provided by an embodiment of the present invention obtains the coordinates of the track points of the handwriting in the handwriting block and updates the maximum vertical coordinate value in the handwriting track area in real time, which helps to obtain the first vertical coordinate value of the bottom edge of the handwriting track area at the end position where the handwriting stops, thereby ensuring the accuracy of the handwriting block segmentation based on the first vertical coordinate value.
[0107] Based on any of the above embodiments, another embodiment of the note shuffling method of the present invention is proposed. Specifically, for the case where blank handwriting blocks exist after segmentation, in this embodiment, the handwriting blocks are segmented in the above step 120, and then the following steps are further included:
[0108] Delete the blank handwriting blocks obtained after segmentation;
[0109] In the above step 120, the newly added function block corresponding to the insert function block instruction is inserted into the division of the handwritten block, and then the following steps are further included:
[0110] Obtain a second vertical coordinate value of the bottom edge of the newly added functional block;
[0111] Based on the second vertical coordinate value, a newly constructed handwriting block is inserted.
[0112] Here, the blank handwriting block obtained after segmentation is the second handwriting block. The second handwriting block is obtained by segmenting the handwriting block below the handwriting track area or at the segmentation point, including the second handwriting block below the handwriting track area, or the second handwriting block after the segmentation point.
[0113] Specifically, the newly constructed handwriting block can be directly inserted at the second vertical coordinate value; or the newly constructed handwriting block can be inserted at a position below the second vertical coordinate value, that is, there is a certain distance between the newly added function block and the newly constructed handwriting block.
[0114] For the newly constructed handwriting block, its block height can be the default value, or it can be set by the user, or its block height can be the same as the block height of the previously deleted blank handwriting block, or it can be adaptively adjusted according to the situation of the note interface. There is no limitation here.
[0115] Furthermore, based on the second vertical coordinate value, a newly constructed handwritten block is inserted, and then the following steps are further included:
[0116] Based on the block height of the newly constructed handwriting block, the vertical coordinate values of each functional block following the newly constructed handwriting block are adjusted.
[0117] Here, the vertical coordinate value may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0118] Specifically, the vertical coordinate values of each functional block following the newly constructed handwriting block are added to the block height of the newly constructed handwriting block to obtain the adjusted vertical coordinate value. Of course, if there is a certain distance between the newly constructed handwriting block and other functional blocks before and after, and this distance is increased compared to the note interface before the newly constructed handwriting block is inserted, the increased distance can be added accordingly.
[0119] In a specific embodiment, Figure 5 This is the second flow chart of the note shuffling method provided by the present invention, such as Figure 5 As shown, the method includes: step 510, initial full-screen handwriting block.
[0120] Here, the handwriting block is a full-screen handwriting block initialized in the note interface.
[0121] Step 520: Receive electromagnetic signals input by the user in real time.
[0122] Here, electromagnetic signals input by the user are received in real time in the handwriting block.
[0123] Step 530: Convert the electromagnetic signal into screen coordinate values.
[0124] Here, the electromagnetic signal is converted into screen coordinate values (i.e., track point coordinate values). At the same time, the track point coordinates of each handwriting can be recorded. If the track point coordinates of the current handwriting are greater than the maximum vertical coordinate value, the maximum vertical coordinate value is updated to the track point coordinates of the current handwriting. If handwriting continues, the maximum vertical coordinate value is updated based on the track point coordinates of each handwriting until handwriting stops, and the maximum vertical coordinate value obtained by the update of the last handwriting is obtained.
[0125] Step 540: Determine whether to insert a new functional block.
[0126] Here, it is determined whether an insert function block instruction is obtained.
[0127] If yes, proceed to step 550 below; if no, return to step 520.
[0128] Step 550: Determine the height coordinates of the handwriting track area in the handwriting block.
[0129] Here, the vertical coordinate value of the bottom edge of the handwriting track area in the handwriting block is determined.
[0130] Step 560: Segment the handwriting blocks and delete the blank handwriting blocks.
[0131] Here, below the handwriting track area, the handwriting block is segmented to obtain a first handwriting block including the handwriting track area and a second handwriting block including the area below the handwriting track area. The blank handwriting block obtained after segmentation is the second handwriting block.
[0132] Step 570: insert a new functional block.
[0133] Here, a new function block is inserted at the split point. The new function block is the function block corresponding to the insert function block instruction.
[0134] Step 580: Identify the height coordinates of the previous function block and automatically insert the handwritten block.
[0135] Here, the newly constructed handwriting block can be inserted at the vertical coordinate value of the bottom edge of the newly added functional block; or the newly constructed handwriting block can be inserted at a position below the vertical coordinate value of the bottom edge of the newly added functional block, that is, there is a certain distance between the newly added functional block and the newly constructed handwriting block.
[0136] The method provided by an embodiment of the present invention deletes the blank handwriting block if the segmented handwriting block contains a blank handwriting block, and after inserting the new functional block, inserts the newly constructed handwriting block based on the vertical coordinate value of the bottom edge of the new functional block to ensure that handwriting operations can still be performed after inserting the new functional block, thereby further improving the practicality and usage experience of the note-taking application.
[0137] Based on any of the above embodiments, Figure 6This is the third flow chart of the note shuffling method provided by the present invention, such as Figure 6 As shown, in this method, after the above step 110, the following steps are further included:
[0138] Step 130 : If the insertion position is before or after any function block, then based on the target vertical coordinate value of the top edge or bottom edge of any function block, insert a new function block corresponding to the insert function block instruction.
[0139] Specifically, when the insertion position is before any function block, the new function block corresponding to the insert function block instruction is inserted based on the target vertical coordinate value of the top edge of any function block; when the insertion position is after any function block, the new function block corresponding to the insert function block instruction is inserted based on the target vertical coordinate value of the bottom edge of any function block.
[0140] There are two implementations for inserting a new functional block. In one implementation, the new functional block can be inserted directly at the target vertical coordinate value. In another implementation, the new functional block can be inserted at a position below the target vertical coordinate value, i.e., there may be a certain distance between the new functional block and the functional blocks above and below it.
[0141] Here, the newly added functional blocks include but are not limited to: handwriting blocks, picture blocks, text blocks, recording blocks and other functional blocks.
[0142] If the newly added function block is a handwriting block, the block height of the newly added handwriting block can be a default value or can be set by the user. If the newly added function block is a recording block, the height of the newly added recording block can be a default value or can be set by the user. If the newly added function block is a picture block, the height of the newly added picture block can be set according to the pixels of the picture, or can be a default value. If the newly added function block is a text block, the height of the newly added text block can be set according to the vertical distance between the first and last characters, or can be a default value or can be set by the user; specifically, if there are already characters in the newly added text block, it can be set according to the vertical distance between the first and last characters; if there are no characters in the newly added text block, it can be a default value or can be set by the user.
[0143] It can be understood that since the newly added recording block is inserted at the division point, the functional blocks in the note interface are not superimposed. Compared with the prior art where the inserted recording block cannot be positioned and only one recording block can be inserted, the embodiment of the present invention can insert multiple recording blocks, and the user can record the recording at any position as needed, thereby improving the efficiency of note recording.
[0144] Furthermore, the method further includes inserting a new function block corresponding to the insert function block instruction, and then further including the following steps:
[0145] Based on the block height of the newly added function block, the vertical coordinate values of each function block following the newly added function block are adjusted.
[0146] Here, the vertical coordinate value may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0147] Specifically, the vertical coordinate values of each function block after the newly added function block are added to the block height of the newly added function block to obtain the adjusted vertical coordinate value. Of course, if there is a certain distance between the newly added function block and other function blocks before and after, and this distance is increased compared to the note interface before the newly added function block is inserted, the increased distance can be added accordingly.
[0148] The method provided by the embodiment of the present invention inserts a new function block corresponding to the insert function block instruction based on the target vertical coordinate value of the top edge or bottom edge of any function block. Compared with directly superimposing the new function block on any function block, the embodiment of the present invention can prevent the function blocks in the note interface from overlapping, thereby facilitating the positioning of the function blocks in the note interface. Furthermore, when exporting notes, the function blocks in the note interface can be positioned so that the function blocks in the exported notes are sorted normally, thereby improving the practicality and usage experience of the note application.
[0149] Based on any of the above embodiments, Figure 7 This is the fourth flow chart of the note shuffling method provided by the present invention, such as Figure 7 As shown, the method further includes:
[0150] Step 710: When a height change of any text block is detected, a coordinate change value of the text block is obtained, where the coordinate change value is a change in the vertical coordinate value of the bottom edge of the text block.
[0151] Step 720: Adjust the vertical coordinate values of each function block following any text block based on the coordinate change value.
[0152] It should be noted that if the text content of any text block is added or reduced, or the block height of any text block is manually adjusted, the height of any text block will change.
[0153] Here, the vertical coordinate value of each functional block may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0154] Specifically, the vertical coordinate value of each functional block following any text block is added to the coordinate change value to obtain the adjusted vertical coordinate value.
[0155] The method provided by an embodiment of the present invention, when detecting a height change of any text block, adjusts the vertical coordinate values of each functional block after any text block based on the coordinate change value of any text block, thereby maintaining the compactness of the arrangement of each functional block, and preventing the functional blocks in the note interface from overlapping, so that the functional blocks in the note interface do not overlap, thereby helping to locate the functional blocks in the note interface, and then when exporting notes, by locating the functional blocks in the note interface, the functional blocks in the exported notes can be sorted normally, thereby further improving the practicality and usage experience of the note application.
[0156] Based on any of the above embodiments, Figure 8 This is the fifth flow chart of the note shuffling method provided by the present invention, such as Figure 8 As shown, the method further includes:
[0157] Step 810: Obtain a delete function block instruction, and determine a function block to be deleted corresponding to the delete function block instruction;
[0158] Step 820: Delete the function block to be deleted, and adjust the vertical coordinate values of each function block after the function block to be deleted based on the block height of the function block to be deleted.
[0159] Here, the delete function block instruction can be triggered in a variety of ways. In one way, the delete function block instruction is triggered in the note interface. For example, after selecting the function block to be deleted, the delete function block instruction is triggered to delete the function block to be deleted. In another way, the delete function block instruction is triggered in the function block management pop-up window. For example, long press any function block in the function block management pop-up window, and then click the delete icon to delete any function block (that is, the function block to be deleted). Of course, the delete function block instruction can also be triggered in other ways, which will not be repeated here.
[0160] Here, the vertical coordinate value of each functional block may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0161] Specifically, the vertical coordinate values of each functional block after the functional block to be deleted are added to the block height to obtain the adjusted vertical coordinate values. In other words, each functional block after the functional block to be deleted is moved up by the block height of the functional block to be deleted.
[0162] The method provided in an embodiment of the present invention adjusts the vertical coordinate values of each functional block after the functional block to be deleted based on the block height of the functional block to be deleted, which helps to maintain the compactness of the arrangement of each functional block, thereby further improving the practicality and user experience of the note-taking application.
[0163] Based on any of the above embodiments, Figure 9 This is the sixth flow chart of the note shuffling method provided by the present invention, such as Figure 9 As shown, the method further includes:
[0164] Step 910: Obtain a move function block instruction, and determine a function block to be moved corresponding to the move function block instruction;
[0165] Step 920 : Move the function block to be moved to the target position corresponding to the move function block instruction, and adjust the vertical coordinate values of each function block after the function block to be moved based on the block height of the function block to be moved.
[0166] Here, the move function block instruction can be triggered in a variety of ways. In one way, the move function block instruction is triggered in the note interface, for example, the function block to be moved is selected and moved until it is moved to the target position. In another way, the move function block instruction is triggered in the function block management pop-up window, for example, any function block can be dragged up and down to the target position. Specifically, when the function block to be moved is clicked and a moving trend is generated, the function block to be moved is set to movable. When it is moved to the target position, the function block to be moved is inserted into the target position. Of course, the move function block instruction can also be triggered in other ways, which will not be described here one by one.
[0167] If the move function block command is triggered in the function block management pop-up window, all function block views in the function block management pop-up window and all function blocks in the note interface will be moved.
[0168] Here, the vertical coordinate value of each functional block may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0169] Specifically, the vertical coordinate values of each functional block after the functional block to be moved and before the target position are added to the block height of the functional block to be moved to obtain the adjusted vertical coordinate value. That is, each functional block after the functional block to be moved and before the target position is moved up by the block height of the functional block to be moved.
[0170] The method provided in an embodiment of the present invention adjusts the vertical coordinate values of each function block after the function block to be moved based on the block height of the function block to be moved, which can prevent the function blocks in the note interface from overlapping, so that the function blocks in the note interface do not overlap, thereby helping to locate the function blocks in the note interface. Furthermore, when exporting notes, the function blocks in the note interface can be located so that the function blocks in the exported notes are sorted normally, thereby further improving the practicality and usage experience of the note application.
[0171] Based on any of the above embodiments, Figure 10 This is the seventh flow chart of the note shuffling method provided by the present invention, such as Figure 10 As shown, the method further includes:
[0172] Step 1010: Obtain a replacement function block instruction, and determine the replaced function block and the to-be-replaced function block corresponding to the replacement function block instruction.
[0173] Here, the replace function block instruction is used to delete the replaced function block and insert the function block to be replaced. Specifically, it can be used to determine the function block to be replaced and the function block type of the function block to be replaced. For example, the function block type of the function block to be replaced includes a handwriting block, a picture block, a recording block, a text block, etc.
[0174] The Replace Function Block command can be triggered in a variety of ways. In one method, the Replace Function Block command is triggered in the note interface, for example, by selecting the function block to be replaced and choosing the replacement icon and the function block type of the function block to be replaced. In another method, the Replace Function Block command is triggered in the Function Block Management pop-up window, for example, by long-pressing the function block to be replaced and choosing the replacement icon and the function block type of the function block to be replaced. Of course, there are other ways to trigger the Move Function Block command, which will not be detailed here.
[0175] Here, the functional blocks to be replaced include but are not limited to: handwriting blocks, picture blocks, text blocks, recording blocks and other functional blocks.
[0176] If the functional block to be replaced is a handwriting block, the block height of the handwriting block can be a default value or can be set by the user. If the functional block to be replaced is a recording block, the height of the recording block can be a default value or can be set by the user. If the functional block to be replaced is a picture block, the height of the picture block can be set according to the pixels of the picture, or can be a default value. If the functional block to be replaced is a text block, the height of the text block can be set according to the vertical distance between the first and last characters, or can be a default value or can be set by the user; specifically, if there are already characters in the text block, it can be set according to the vertical distance between the first and last characters; if there are no characters in the text block, it can be a default value or can be set by the user.
[0177] Step 1020: Delete the replaced functional block and insert the to-be-replaced functional block at the deleted position.
[0178] Step 1030 : Based on the block height of the replaced functional block and the block height of the functional block to be replaced, adjust the vertical coordinate values of each functional block after the functional block to be replaced.
[0179] Here, the deletion position may be the vertical coordinate value of the top edge of the replaced functional block. Meanwhile, the vertical coordinate value of the top edge of the functional block to be replaced after insertion is also the deletion position.
[0180] Specifically, a block height change value is determined based on the block height of the replaced functional block and the block height of the functional block to be replaced. Based on the block height change value, vertical coordinate values of each functional block following the functional block to be replaced are adjusted. The block height change value is the difference between the block height of the functional block to be replaced and the block height of the functional block to be replaced.
[0181] If the block height change value is greater than 0, the vertical coordinate values of each functional block following the to-be-replaced functional block are added to the block height change value to obtain the adjusted vertical coordinate value, i.e., the block height change value for the downward movement of each functional block following the to-be-replaced functional block. If the block height change value is less than 0, the vertical coordinate values of each functional block following the to-be-replaced functional block are subtracted from the block height change value to obtain the adjusted vertical coordinate value, i.e., the absolute value of the block height change value for the upward movement of each functional block following the to-be-replaced functional block. If the block height change value is equal to 0, the vertical coordinate values of each functional block following the to-be-replaced functional block do not need to be adjusted.
[0182] Here, the vertical coordinate value of each functional block after the functional block to be replaced may be the vertical coordinate value of the top edge of each functional block, or may be the vertical coordinate value of the bottom edge of each functional block.
[0183] The method provided by the embodiment of the present invention adjusts the vertical coordinate values of each function block after the function block to be replaced based on the block height of the replaced function block and the block height of the function block to be replaced, which can prevent the function blocks in the note interface from overlapping, so that the function blocks in the note interface do not overlap, thereby helping to locate the function blocks in the note interface. Furthermore, when exporting notes, by locating the function blocks in the note interface, the function blocks in the exported notes can be sorted normally, thereby further improving the practicality and usage experience of the note application.
[0184] Based on any of the above embodiments, Figure 11 This is the eighth flow chart of the note shuffling method provided by the present invention, such as Figure 11 As shown, the method further includes:
[0185] Step 1110, obtain the note export instruction, and obtain the overall bitmap image of the handwriting block to be exported.
[0186] Here, there may be multiple handwriting blocks to be exported. This embodiment describes one handwriting block to be exported, and the other handwriting blocks to be exported are not described in detail. At the same time, other functional blocks to be exported may also be included, for example, exporting several picture blocks, several text blocks, several recording blocks, etc.
[0187] Here, the overall bitmap image includes image information of the handwritten block to be exported, as well as position information of the handwritten block to be exported. This position information can be the vertical coordinate value of the handwritten block to be exported, and the vertical coordinate value of the bottom edge of the handwritten block to be exported can also be the vertical coordinate value of the top edge of the handwritten block to be exported. Of course, this position information can also include other position data, which will not be detailed here.
[0188] Step 1120: Determine a third vertical coordinate value of the top edge of the handwriting area in the handwriting block to be exported, and a fourth vertical coordinate value of the bottom edge of the handwriting area.
[0189] Here, the handwriting area is the area from the first occurrence of a handwriting track to the last occurrence of a handwriting track in the handwriting block to be exported. Furthermore, the handwriting area is a regular rectangular area. For example, if the handwriting block to be exported contains a total of 10 lines of handwriting-capable area, with the first 5 lines having handwriting tracks and the last 5 lines not having handwriting tracks, then the handwriting area is the first 5 lines of handwriting-capable area.
[0190] The steps for determining the fourth vertical coordinate value of the bottom edge of the handwriting area are substantially the same as the steps for determining the first vertical coordinate value, and are not described in detail here.
[0191] Step 1130 : Based on the third vertical coordinate value and the fourth vertical coordinate value, the entire bitmap image is intercepted to obtain a target bitmap image.
[0192] Specifically, a target bitmap image having the same height as the handwriting area is intercepted from the entire bitmap image. The target bitmap image is the bitmap image corresponding to the handwriting area.
[0193] Here, the target bitmap image includes image information of the handwritten area and also includes position information of the handwritten area. The position information can be the vertical coordinate value of the handwritten area. The vertical coordinate value of the handwritten area can be the vertical coordinate value of the bottom edge of the handwritten area or the vertical coordinate value of the top edge of the handwritten area. Of course, the position information can also include other position data, which will not be detailed here.
[0194] Step 1140: Send the target bitmap image to the import end, so that the import end fills the target bitmap image into the target handwriting block of the import end, and the height of the target handwriting block is determined by the height of the target bitmap image.
[0195] Specifically, the import end resets the height of the target handwriting block generated in the import end according to the height of the target bitmap image, so that the final height of the target handwriting block is the height of the handwriting area, ensuring that the handwriting area can be exported normally and the blank area can be removed.
[0196] In addition, the above steps 1120 to 1140 can also be executed at the importing end, that is, the exporting end sends the entire bitmap image of the handwriting block to be exported to the importing end, and the importing end intercepts the entire bitmap image to obtain the target bitmap image.
[0197] The method provided by the embodiment of the present invention converts the handwriting block to be exported into an overall bitmap image. Compared with directly exporting handwriting information, the embodiment of the present invention can improve the efficiency of note export. In addition, the overall bitmap image is further intercepted into a target bitmap image containing the handwriting area, and the height of the target handwriting block on the import end is determined by the height of the target bitmap image, so that the blank area can be removed, thereby making the target handwriting block more compact, thereby further improving the practicality and user experience of the note application. In addition, the use of bitmap images helps to locate the handwriting blocks, so that the handwriting blocks in the exported notes are sorted normally, thereby further improving the practicality and user experience of the note application.
[0198] The note mixing device provided by the present invention is described below. The note mixing device described below and the note mixing method described above can be referenced to each other, and will not be described one by one here.
[0199] Based on any of the above embodiments, Figure 12 This is a schematic diagram of the structure of the note mixing device provided by the present invention. Figure 12 As shown, the device includes:
[0200] The determining module 1210 is configured to obtain an insert function block instruction and determine an insertion position indicated by the insert function block instruction;
[0201] The segmentation module 1220 is configured to segment the handwriting block when the insertion position is within the handwriting block, and insert the newly added function block corresponding to the insert function block instruction into the segmented position of the handwriting block.
[0202] The device provided by the embodiment of the present invention inserts a new functional block into a handwriting block, first divides the handwriting block, and then inserts the new functional block at the division of the handwriting block. Compared with directly superimposing the new functional block on the handwriting block, the embodiment of the present invention can prevent the functional blocks in the note interface from overlapping, thereby facilitating the positioning of the functional blocks in the note interface. Furthermore, when exporting notes, the functional blocks in the note interface can be positioned so that the functional blocks in the exported notes are sorted normally, thereby improving the practicality and usage experience of the note application.
[0203] Figure 13 An example of a physical structure diagram of an electronic device is shown below. Figure 13As shown, the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330, and a communication bus 1340, wherein the processor 1310, the communication interface 1320, and the memory 1330 communicate with each other via the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute a note shuffling method, which includes: obtaining an insert function block instruction and determining an insertion position indicated by the insert function block instruction; when the insertion position is in a handwriting block, segmenting the handwriting block and inserting a new function block corresponding to the insert function block instruction into the segmented portion of the handwriting block.
[0204] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0205] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the note mixing method provided by the above methods, which includes: obtaining an insert function block instruction and determining the insertion position indicated by the insert function block instruction; when the insertion position is in a handwriting block, dividing the handwriting block and inserting the new function block corresponding to the insert function block instruction into the division of the handwriting block.
[0206] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the note mixing method provided by the above-mentioned methods, the method comprising: obtaining an insert function block instruction, and determining the insertion position indicated by the insert function block instruction; when the insertion position is in a handwriting block, dividing the handwriting block, and inserting the new function block corresponding to the insert function block instruction into the division of the handwriting block.
[0207] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0208] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A note shuffling method, characterized in that: include: Obtaining an insert function block instruction and determining an insert position indicated by the insert function block instruction; the function block includes a handwriting block, a picture block, a text block, and a recording block; When the insertion position is in a handwriting block, the handwriting block is divided to obtain a first handwriting block before the division point and a second handwriting block after the division point, and the newly added function block corresponding to the insert function block instruction is inserted into the division position of the handwriting block; the second handwriting block is a blank handwriting block or a handwriting block containing a handwriting track; the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the division point, and the vertical coordinate value of the top edge of the first handwriting block is the vertical coordinate value of the top edge of the handwriting block before division; the vertical coordinate value of the bottom edge of the newly added function block is the vertical coordinate value of the bottom edge of the first handwriting block plus the block of the newly added function block Height, the vertical coordinate value of the top edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwritten block. If there is a certain distance between the first handwritten block and the newly added functional block, the vertical coordinate values of the top and bottom edges of the newly added functional block will be increased by the distance accordingly; the vertical coordinate value of the bottom edge of the second handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block plus the block height of the second handwritten block. The vertical coordinate value of the top edge of the second handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block. If there is a certain distance between the second handwritten block and the newly added functional block, the vertical coordinate values of the top and bottom edges of the second handwritten block will be increased by the distance accordingly.
2. The note shuffling method according to claim 1, wherein segmenting the handwritten blocks comprises: Determining an end position, wherein the end position is a position where handwriting is stopped before acquiring the insert function block instruction; Based on the end position, locate the handwriting track area in the handwriting block, and obtain a first vertical coordinate value of the bottom edge of the handwriting track area; The handwritten block is segmented based on the first vertical coordinate value.
3. The note shuffling method according to claim 2, wherein the first vertical coordinate value is determined based on the following steps: Obtaining the coordinates of a track point of the current handwriting in the handwriting block, and updating the maximum vertical coordinate value in the handwriting track area based on the coordinates of the track point of the current handwriting; The maximum vertical coordinate value updated based on the last handwriting is determined as the first vertical coordinate value, and the last handwriting is the handwriting with the end position as the end point.
4. The note shuffling method according to any one of claims 1 to 3, wherein if the second handwriting block is a blank handwriting block, the step of segmenting the handwriting block further comprises: Delete the blank handwriting blocks obtained after segmentation; The method further includes inserting the newly added function block corresponding to the insert function block instruction into the segmentation of the handwritten block: Obtain a second vertical coordinate value of the bottom edge of the newly added functional block; Based on the second vertical coordinate value, a newly constructed handwriting block is inserted.
5. The note shuffling method according to any one of claims 1 to 3, wherein the step of obtaining an insert function block instruction and determining an insert position indicated by the insert function block instruction further comprises: When the insertion position is before or after any function block, a new function block corresponding to the insert function block instruction is inserted based on the target vertical coordinate value of the top edge or the bottom edge of any function block.
6. The note shuffling method according to any one of claims 1 to 3, characterized in that: Also includes: When a height change of any text block is detected, obtaining a coordinate change value of the text block, the coordinate change value being a change in a vertical coordinate value of a bottom edge of the text block; Based on the coordinate change value, the vertical coordinate value of each function block following the any text block is adjusted.
7. The note shuffling method according to any one of claims 1 to 3, characterized in that: Also includes: Obtaining a delete function block instruction, and determining a function block to be deleted corresponding to the delete function block instruction; The function block to be deleted is deleted, and based on the block height of the function block to be deleted, vertical coordinate values of each function block after the function block to be deleted are adjusted.
8. The note shuffling method according to any one of claims 1 to 3, characterized in that: Also includes: Obtaining a move function block instruction, and determining a function block to be moved corresponding to the move function block instruction; The function block to be moved is moved to a target position corresponding to the move function block instruction, and based on the block height of the function block to be moved, vertical coordinate values of each function block after the function block to be moved before the movement are adjusted.
9. The note shuffling method according to any one of claims 1 to 3, characterized in that: Also includes: Obtaining a replacement function block instruction, and determining a replaced function block and a to-be-replaced function block corresponding to the replacement function block instruction; Deleting the replaced functional block and inserting the to-be-replaced functional block at the deleted position; Based on the block height of the replaced functional block and the block height of the functional block to be replaced, the vertical coordinate values of each functional block following the functional block to be replaced are adjusted.
10. The note shuffling method according to any one of claims 1 to 3, characterized in that: Also includes: Get the note export instruction and obtain the overall bitmap image of the handwriting block to be exported; Determine a third vertical coordinate value of a top edge of a handwriting area in the handwriting block to be exported, and a fourth vertical coordinate value of a bottom edge of the handwriting area; Based on the third vertical coordinate value and the fourth vertical coordinate value, intercepting the entire bitmap image to obtain a target bitmap image; The target bitmap image is sent to the import end, so that the import end fills the target bitmap image into the target handwriting block of the import end, and the height of the target handwriting block is determined by the height of the target bitmap image.
11. A note shuffling device, characterized in that: include: A determination module, configured to obtain an insert function block instruction and determine an insertion position indicated by the insert function block instruction; the function blocks include a handwriting block, a picture block, a text block, and a recording block; A segmentation module is used to segment the handwriting block when the insertion position is in the handwriting block, obtain a first handwriting block before the segmentation point and a second handwriting block after the segmentation point, and insert the newly added function block corresponding to the insert function block instruction into the segmentation position of the handwriting block; the second handwriting block is a blank handwriting block or a handwriting block containing a handwriting track; the vertical coordinate value of the bottom edge of the first handwriting block is the vertical coordinate value of the segmentation point, the vertical coordinate value of the top edge of the first handwriting block is the vertical coordinate value of the top edge of the handwriting block before segmentation; the vertical coordinate value of the bottom edge of the newly added function block is the vertical coordinate value of the bottom edge of the first handwriting block plus the vertical coordinate value of the newly added function block. The block height of the block, the vertical coordinate value of the top edge of the newly added functional block is the vertical coordinate value of the bottom edge of the first handwritten block. If there is a certain distance between the first handwritten block and the newly added functional block, the vertical coordinate values of the top and bottom edges of the newly added functional block will be increased by the distance accordingly; the vertical coordinate value of the bottom edge of the second handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block plus the block height of the second handwritten block, and the vertical coordinate value of the top edge of the second handwritten block is the vertical coordinate value of the bottom edge of the newly added functional block. If there is a certain distance between the second handwritten block and the newly added functional block, the vertical coordinate values of the top and bottom edges of the second handwritten block will be increased by the distance.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the note shuffling method as described in any one of claims 1 to 10 are implemented.
13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the note shuffling method as described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Information-editing method and device of electronic equipment
CN104182385A
Handwriting track display method, device, equipment and storage medium
CN107516334A