A method and system for handling a scribe operation
By detecting and analyzing the punctuation marks at the end of the stroke operation, combining historical data to calculate the proportion of the punctuation marks that have been stroked, and automatically determining whether to stroke the punctuation marks, the problem of users having difficulty in accurately stroke punctuation marks is solved, thereby improving the user experience.
Patent Information
- Application Number
- CN201910197397.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-15
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2039-03-15
AI Technical Summary
In existing electronic document reading applications, it is difficult for users to accurately draw the punctuation mark at the end of the line drawing operation, resulting in a poor user experience.
By detecting the punctuation mark at the end of the stroke operation and using the historical data of the server to calculate the proportion s1 of the punctuation mark that is actively stroked, it is determined whether the punctuation mark should be automatically stroked into the line, and the judgment is made in combination with the proportion s2 of the length of the part of the punctuation mark that is stroked.
The difficulty of the user's line drawing operation is reduced, and the accuracy of the line drawing operation and the user experience are improved.
Smart Images

Figure CN111767692B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for processing a line drawing operation. Background Art
[0002] In real life, users need to take notes and underline whether they are reading paper books or electronic documents. Therefore, most electronic document reading applications provide users with the functions of underlining and taking notes.
[0003] In the process of realizing the present invention, the inventors found that there are at least the following problems in the prior art: when users draw lines, they often encounter the problem of whether to draw in the punctuation marks at the end of the line. In today's electronic document reading applications, the processing method for punctuation marks at the end of the line is the same as the method for drawing text, that is, the punctuation mark is only drawn when the user's finger slides to the end of the punctuation mark. However, for electronic documents, due to the coordination limitations of electronic systems such as fingers, electronic pens or mice and the screen, it is difficult to accurately draw in the punctuation marks at the end of the line, resulting in a poor user experience.
[0004] Therefore, there is an urgent need for a method and system for processing a line drawing operation that can reduce the difficulty of the line drawing operation for the user and improve the user experience. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a method and system for processing a line drawing operation, which can reduce the difficulty of the line drawing operation for the user and improve the user experience.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for processing a line drawing operation is provided, comprising:
[0007] Detecting the user's stroke operation on the currently displayed document, and after the user performs the stroke operation, obtaining the punctuation mark corresponding to the end point of the stroke operation;
[0008] Sending a query request to the server to find the proportion s1 corresponding to the current punctuation mark, wherein the server calculates the proportion s1 of one or more punctuation marks actively drawn at the end of the drawing operation based on historical data of the drawing operation;
[0009] Determine whether the punctuation mark is drawn in the current line drawing operation according to the found s1;
[0010] If it is determined that the current punctuation mark is to be drawn, the current punctuation mark is drawn into the line; otherwise, the current punctuation mark is not drawn into the line.
[0011] Optionally, the method for processing a line stroke operation provided by the embodiment of the present invention further includes:
[0012] Obtaining a ratio s2 of the length of the portion of the punctuation mark crossed at the end of the current stroke operation to the length of the current punctuation mark;
[0013] The determining, based on the found s1, whether the punctuation mark is included in the current stroke operation includes:
[0014] Determine whether the punctuation mark is drawn in the current line drawing operation according to s1 and s2.
[0015] Optionally, determining whether the current punctuation mark is marked in the current marking operation according to s1 and s2 includes:
[0016] If s1≥a1, it is determined that the punctuation mark is drawn in the current line drawing operation;
[0017] If a2≤s1<a1, and s2>b1, then it is determined that the punctuation mark in this stroke operation is drawn in; if a2≤s1<a1, and s2≤b1, then it is determined that the punctuation mark in this stroke operation is not drawn in;
[0018] If s1<a2, and s2≥b2, it is determined that the punctuation mark is drawn in this stroke operation; if s1<a2, and s2<b2, it is determined that the punctuation mark is not drawn in this stroke operation.
[0019] Optionally, a1=b2=0.8, a2=b1=0.5.
[0020] Optionally, the calculating, based on the historical data, a ratio s1 of one or more punctuation marks that are actively drawn at the end of the line drawing operation includes:
[0021] Storing the collected historical data of the line-drawing operation in a line-drawing data table, wherein the line-drawing data table includes a first field indicating the punctuation mark at the end of the line-drawing operation and a second field indicating whether the punctuation mark is actively drawn;
[0022] If there is a punctuation mark corresponding to the end of the line stroke operation, the punctuation mark is stored in the first field of the record of the line stroke operation in the line stroke data table;
[0023] If the punctuation mark corresponding to the end of the stroke operation is actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a first value indicating active stroke-in;
[0024] If the punctuation mark corresponding to the end of the stroke operation is not actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a second value indicating passive stroke;
[0025] For the punctuation mark, the s1 is calculated according to the number of first values of the second field corresponding to the punctuation mark and the number of the punctuation mark contained in the first field.
[0026] Optionally, the method for processing a line stroke operation provided by the embodiment of the present invention further includes:
[0027] When the end of the stroke operation corresponds to a punctuation mark but does not include the punctuation mark, if the first character after the end of the stroke operation is a punctuation mark, it is determined that the punctuation mark corresponding to the end of the stroke operation has not been actively drawn in.
[0028] To achieve the above object, according to another aspect of an embodiment of the present invention, a system for processing a line drawing operation is provided, comprising: a processing end and a service end;
[0029] The server is used to collect historical data of the line-drawing operation, and calculate the ratio s1 of one or more punctuation marks that are actively drawn at the end of the line-drawing operation based on the historical data of the line-drawing operation;
[0030] The processing end includes:
[0031] The line punctuation acquisition module is used to detect the user's line operation on the currently displayed document, and after the user performs the line operation, obtain the punctuation mark corresponding to the end of the line operation;
[0032] A data query module is used to send a query request to the server to find the proportion s1 corresponding to the punctuation mark;
[0033] a stroke-in determination module, configured to determine whether the punctuation mark in the current stroke operation is stroked in accordance with the found s1;
[0034] The automatic underlining module is used to, if it is determined that the current punctuation mark is to be underlined, mark the current punctuation mark in the underline; otherwise, not mark the current punctuation mark in the underline.
[0035] Optionally, the processing end further includes:
[0036] a stroke-in ratio acquisition module, configured to acquire a ratio s2 of the length of the portion of the punctuation mark that has been crossed at the end of the current stroke operation to the length of the current punctuation mark;
[0037] The stroke-in determination module is further configured to determine whether the punctuation mark is stroked in the current stroke operation according to s1 and s2.
[0038] Optionally, the inclusion determination module is specifically configured to:
[0039] If s1≥a1, it is determined that the punctuation mark is drawn in the current line drawing operation;
[0040] If a2≤s1<a1, and s2>b1, then it is determined that the punctuation mark in this stroke operation is drawn in; if a2≤s1<a1, and s2≤b1, then it is determined that the punctuation mark in this stroke operation is not drawn in;
[0041] If s1<a2, and s2≥b2, it is determined that the punctuation mark is drawn in this stroke operation; if s1<a2, and s2<b2, it is determined that the punctuation mark is not drawn in this stroke operation.
[0042] Optionally, a1=b2=0.8, a2=b1=0.5.
[0043] Optionally, the server is further configured to:
[0044] Storing the collected historical data of the line-drawing operation in a line-drawing data table, wherein the line-drawing data table includes a first field indicating the punctuation mark at the end of the line-drawing operation and a second field indicating whether the punctuation mark is actively drawn;
[0045] If there is a punctuation mark corresponding to the end of the line stroke operation, the punctuation mark is stored in the first field of the record of the line stroke operation in the line stroke data table;
[0046] If the punctuation mark corresponding to the end of the stroke operation is actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a first value indicating active stroke-in;
[0047] If the punctuation mark corresponding to the end of the stroke operation is not actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a second value indicating passive stroke;
[0048] For the punctuation mark, the s1 is calculated according to the number of first values of the second field corresponding to the punctuation mark and the number of the punctuation mark contained in the first field.
[0049] Optionally, the server is further configured to determine that the punctuation mark corresponding to the end of the stroke operation has not been actively drawn in if the first character after the end of the stroke operation is a punctuation mark when the end of the stroke operation corresponds to a punctuation mark but does not include the punctuation mark.
[0050] To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided an electronic device for processing a scribing operation, comprising:
[0051] one or more processors;
[0052] a storage system for storing one or more programs,
[0053] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the line drawing operation provided by the present invention.
[0054] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for processing the line operation provided by the present invention is implemented.
[0055] A method and system for processing a line-drawing operation in an embodiment of the present invention can determine whether a punctuation mark is drawn in this line-drawing operation based on the ratio of the number of times the punctuation mark is drawn at the end of the line-drawing operation, thereby eliminating the need for the user to manually draw standardized lines that completely correspond to the punctuation mark, thereby reducing the difficulty of the user's line-drawing operation.
[0056] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0058] Figure 1 This is a schematic diagram of the main flow of a method for processing a line drawing operation provided by an embodiment of the present invention;
[0059] Figure 2 1 is a schematic diagram of the main flow of another method for processing a marking operation provided by an embodiment of the present invention;
[0060] Figure 3 1 is a flow chart of obtaining a historical ratio s1 of the number of times a punctuation mark is drawn at the end of a line drawing operation, provided by an embodiment of the present invention;
[0061] Figure 4 1 is a schematic diagram of the main modules of a processing system for a scribing operation provided by an embodiment of the present invention;
[0062] Figure 5 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
[0063] Figure 6 It is a schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0065] like Figure 1 As shown, an embodiment of the present invention provides a method for processing a line operation, including:
[0066] Step 101: Detect the user's line drawing operation on the currently displayed document. After the user draws the line, obtain the punctuation mark corresponding to the end of the line drawing operation.
[0067] The end of the user's stroke operation may include punctuation marks, that is, the punctuation marks are drawn by the user, or may not include punctuation marks, that is, the punctuation marks are not drawn by the user, and the first character after the end of the user's stroke operation may be a punctuation mark or may not be a punctuation mark.
[0068] In this step, when the end of the user's stroke operation contains punctuation marks, or when the end of the user's stroke operation does not contain punctuation marks, but the first character after the end of the stroke operation is a punctuation mark, the punctuation mark is the punctuation mark corresponding to the end of the stroke operation obtained in this step.
[0069] In this step, for example, the user draws a line on the touch screen with his finger. When the finger leaves the screen, the drawing operation ends. The end of the line corresponding to when the finger leaves the screen is the end of the drawing operation. When there is a punctuation mark at the end of the drawing operation, the punctuation mark is obtained, and then step 102 is entered. For example, the punctuation mark obtained in step 101 is "】".
[0070] Step 102: Send a query request to the server to find the proportion s1 corresponding to the current punctuation mark. The server collects historical data of the line-drawing operation and calculates the proportion s1 of one or more punctuation marks that are actively drawn at the end of the line-drawing operation based on the historical data of the line-drawing operation.
[0071] For example, the historical data collected for line drawing operations may include line content and location information corresponding to the line content, i.e., its source, including information such as the book, chapter, paragraph, and paragraph location of the line content. This step calculates the proportion s1 of punctuation marks involved in the line drawing operation that are actively drawn at the end of the line drawing operation based on the historical data of the line drawing operation.
[0072] In this step, the historical ratio s1 of the number of times a punctuation mark is crossed in at the end of a stroke operation refers to the ratio of the number of times the punctuation mark is crossed in by the user at the end of the stroke operation after counting a certain number of stroke operations. For example, the number of strokes corresponding to the punctuation mark "】" at the end of the stroke operation is pre-calculated as i, and the number of times "】" is crossed in as the punctuation mark corresponding to the end of the stroke operation is pre-counted as j, j divided by i is the historical ratio s1 of the number of times "】" is crossed in. The specific process of obtaining the historical ratio s1 of the number of times a punctuation mark is crossed in at the end of a stroke operation will be introduced in detail with examples later.
[0073] Step 103: Determine whether punctuation marks are drawn in this line drawing operation according to s1.
[0074] In this step, for example, according to the statistical results, the historical number of times that “】” is drawn is large, which means that when the user performs the drawing operation, he usually draws the “】” at the end of the drawing. Then, in this drawing operation, the user is also likely to want to draw the “】”. Therefore, it can be determined based on s1 whether the punctuation mark is drawn in this drawing operation, so the user does not need to manually draw out standardized lines that completely correspond to the punctuation marks, reducing the difficulty of the user's drawing operation.
[0075] It should be noted that the execution entity of this step can be a terminal or a server. For example, the terminal obtains the punctuation mark corresponding to the end of the current stroke operation and sends it to the server. After the server obtains the historical ratio s1 of the number of times the punctuation mark was entered at the end of the stroke operation, it can send s1 to the terminal, and the terminal can execute step 103. Alternatively, after obtaining s1, the server directly executes step 103 and then sends the final result of whether the punctuation mark was entered in the current stroke operation to the terminal.
[0076] Based on the result determined in step 103, step 104 is executed. If it is determined that the current punctuation mark is crossed in, the current punctuation mark is crossed in, otherwise the current punctuation mark is not crossed in. For example, if the user does not cross in the punctuation mark corresponding to the end of the crossing operation, or only crosses in a portion of the punctuation mark, but it is determined in step 103 that the current punctuation mark is crossed in, the punctuation mark is completely crossed in. For another example, if the user crosses in the current punctuation mark corresponding to the end of the crossing operation, or only crosses in a portion of the punctuation mark, but it is determined in step 103 that the current punctuation mark is not crossed in, the underline under the punctuation mark is eliminated, and the punctuation mark is not crossed in.
[0077] The method for processing the line drawing operation in the embodiment of the present invention determines whether the punctuation mark is drawn in this line drawing operation based on the ratio of the number of times the punctuation mark is drawn at the end of the line drawing operation, thereby eliminating the need for the user to manually draw standardized lines that completely correspond to the punctuation mark, thereby reducing the difficulty of the user's line drawing operation.
[0078] In one embodiment of the present invention, Figure 2 As shown, the processing method of the above-mentioned line operation also includes:
[0079] Step 1011: Obtain the ratio s2 of the length of the crossed portion of the punctuation mark to the length of the punctuation mark.
[0080] In this step, s2 may be the portion of the punctuation mark graphic that is crossed out, occupying the entire character area occupied by the punctuation mark, including the character graphic and the space between the character graphic and the edge of the character area.
[0081] It should be noted that step 1011 is performed after step 101, and the order between step 1011 and step 102 is not limited.
[0082] Step 103, determining whether punctuation marks are included in the current stroke operation according to s1, includes:
[0083] Step 1030: Determine whether punctuation marks are drawn in this line drawing operation according to s1 and s2.
[0084] Specifically, the ratio s2 of the length of the crossed-out portion of the punctuation mark to the length of the punctuation mark can reflect the user's subjective consciousness during the line-drawing operation, and whether the user wants to draw in the punctuation mark at the end of the line. Therefore, s1 and s2 can be used to jointly determine whether the punctuation mark is drawn in this line-drawing operation, thereby improving the accuracy of the line-drawing operation.
[0085] In one embodiment of the present invention, step 1030 determines whether the punctuation mark in the current stroke operation is drawn according to s1 and s2, including:
[0086] If s1≥a1, it is determined that the punctuation mark is drawn in this line-drawing operation. That is, if a large number of users will draw the punctuation mark, no further judgment is required, and the punctuation mark is directly determined to be drawn in.
[0087] If a2≤s1<a1, and s2>b1, it is determined that the punctuation mark is included in this stroke operation. If a2≤s1<a1, and s2≤b1, it is determined that the punctuation mark is not included in this stroke operation. When a2≤s1<a1, it cannot accurately reflect the intention of a large number of users on whether the punctuation mark is included, and s2 is further used to assist in the judgment.
[0088] If s1<a2, and s2≥b2, it is determined that the punctuation mark is marked in this marking operation. If s1<a2, and s2<b2, it is determined that the punctuation mark is not marked in this marking operation. When s1<a2, it means that it is impossible to determine whether a large number of users are willing to mark the punctuation mark, and s2 is further used to assist in the judgment. Only when s2 is particularly large, it is determined that the punctuation mark is marked in.
[0089] In the present invention, a1 and a2 are parameters for evaluating how many times the punctuation mark has been crossed out in the historical data. b1 and b2 are parameters for evaluating whether the length of the crossed-out portion of the punctuation mark is sufficient to indicate that the user wants to cross out the punctuation mark. a1 is the minimum proportion value that can directly determine that the punctuation mark is crossed out. If s1≥a1, it indicates that a large number of users will cross out the punctuation mark. a2<a1, when a2≤s1<a1 or s1<a2, that is, it cannot be determined that a large number of users will cross out the punctuation mark, at this time, it is necessary to refer to the ratio of the length of the crossed-out portion of the punctuation mark to the length of the punctuation mark and the relationship between b1 or b2 to further determine. In one embodiment of the present invention, a1=b2=0.8, a2=b1=0.5.
[0090] In one embodiment of the present invention, Figure 3 As shown, the processing method of the line operation also includes:
[0091] Step 201: Store the collected historical data of line stroke operations in a line stroke data table. Each line stroke data entry in the line stroke data table is searched, and steps 202 to 205 are performed for each line stroke data entry. The line stroke data table includes a first field indicating the punctuation mark at the end of the line stroke operation and a second field indicating whether the punctuation mark was actively entered.
[0092] Step 202: Determine whether the end of the found line content of the line data contains punctuation marks. If there is a punctuation mark at the end of the line operation, store the punctuation mark in the first field of the record of the line operation in the line data table.
[0093] When the found line content of the line data contains a punctuation mark at the end, the process goes to step 203 to store the punctuation mark in the symbol field corresponding to the found line data, and mark the found line data as having been marked.
[0094] That is, if the punctuation mark corresponding to the end of the stroke operation is actively stroked in, the second field of the record of the stroke operation in the stroke data table is marked as the first value indicating active stroke-in.
[0095] Specifically, for example, the stroke data contains a mark field, that is, a symbol field, which is used to store the punctuation mark at the end of the stroke data. The stroke data contains a type field, which is used to store whether the stroke data contains punctuation marks. When it is found that the stroke content of the stroke data contains punctuation marks at the end, the type field is marked as 1 and the punctuation marks are saved in the mark field.
[0096] When the found line content of the line data does not contain punctuation marks at the end, the process proceeds to step 204 , matches the source of the line content according to the found line content and position information of the line data, and then proceeds to step 205 .
[0097] Specifically, for example, when it is found that the end of the struck-out content of the struck-out data does not contain a punctuation mark, the type field is marked as 0.
[0098] Step 205: If the first character after the source of the underlined content is a punctuation mark, the punctuation mark is stored in the symbol field corresponding to the found underlined data, and the found underlined data is marked as not underlined.
[0099] That is, when the end point of a stroke operation corresponds to a punctuation mark but does not contain the punctuation mark, if the first character after the end point of the stroke operation is a punctuation mark, it is determined that the punctuation mark corresponding to the end point of the stroke operation was not actively stroked in. If the punctuation mark corresponding to the end point of the stroke operation was not actively stroked in, the second field of the record of the stroke operation in the stroke data table is marked as the second value indicating passive stroke.
[0100] Specifically, for example, the punctuation mark is stored in the mark field of the line data in line_table.
[0101] After all the line-drawing data are searched, step 206 is entered, the symbol field corresponding to each line-drawing data in the line-drawing data table is queried, the types of punctuation marks in all symbol fields are counted, different types of punctuation marks are placed in a statistical set, each punctuation mark in the statistical set is searched, the number of line-drawing data whose symbol field in the line-drawing data table is the punctuation mark found is recorded as N, the number of line-drawing data whose symbol field in the line-drawing data table is the punctuation mark found and is marked as having been drawn in is recorded as n, the ratio of the number of times the found punctuation mark is drawn in at the end of the line-drawing operation is determined to be the quotient of n divided by N, and the found punctuation mark and the ratio of the number of times it is drawn in and are stored in the line-drawing count statistics table.
[0102] For example, query all data in line_table, count the types of all punctuation marks stored in the mark field, and store these punctuation marks in a set, which is recorded as collection. Take a punctuation mark X from the collection, query the total number of data in line_table with the mark field being X and record it as N, and query the total number of data with the mark field being X and the type field being 1 and record it as n. Divide n by N to get the value s1, which is the proportion of times the line is drawn at the end of the line drawing operation. Save X and s1 to the scale_table data table for the proportion of times the line is drawn. scale_table contains the mark field and the scale field, with X stored in the mark field and s1 in the scale field. Perform the above process on all punctuation marks in collection, and calculate the proportion of times each punctuation mark is drawn at the end of the line drawing operation for query.
[0103] In step 102, the historical frequency ratio s1 of the punctuation mark corresponding to the end of the current stroke operation being stroked in at the end of the stroke operation is obtained from the stroke-in frequency statistics table.
[0104] It should be noted that the execution entity of steps 201 to 206 is the server.
[0105] Optionally, before the above step 201 of searching for each line data in the line data table, the method further includes: receiving line content and position information thereof; and storing the received line content and position information thereof in the above line data table.
[0106] Specifically, the server collects the user's line data in advance as a basis for subsequent processing to determine whether the punctuation mark at the end of the line is entered.
[0107] like Figure 4 As shown, an embodiment of the present invention further provides a processing system 400 for a line drawing operation, including: a processing end 401 and a service end 406 .
[0108] The server 406 is used to collect historical data of the stroke operation, and calculate the ratio s1 of one or more punctuation marks that are actively drawn at the end of the stroke operation based on the historical data of the stroke operation.
[0109] The processing end 401 includes: a line marking and punctuation acquisition module 402, a data query module 403, a line inclusion determination module 404, and an automatic line marking module 405.
[0110] The line-marking punctuation acquisition module 402 is used to detect the user's line-marking operation on the currently displayed document, and after the user performs the line-marking operation, obtain the current punctuation mark corresponding to the end of the current line-marking operation. The data query module 403 is used to send a query request to the server to find the proportion s1 corresponding to the current punctuation mark. The line-in determination module 404 is used to determine whether the current punctuation mark is drawn in the current line-marking operation based on the found s1. The automatic line-marking module 405 is used to draw the current punctuation mark into the line if it is determined that the current punctuation mark is drawn in, otherwise the current punctuation mark is not drawn in the line.
[0111] The processing system for the line drawing operation can apply the above-mentioned processing method for the line drawing operation. The specific principle is the same as that in the above-mentioned embodiment and will not be repeated here.
[0112] The processing system for the line drawing operation in the embodiment of the present invention determines whether the punctuation mark is drawn in this line drawing operation based on the ratio of the number of times the punctuation mark is drawn at the end of the line drawing operation, thereby eliminating the need for the user to manually draw standardized lines that completely correspond to the punctuation mark, thereby reducing the difficulty of the user's line drawing operation.
[0113] Optionally, the processing end further includes: a stroke-in ratio acquisition module, configured to acquire a ratio s2 of the length of the portion of the punctuation mark that has been crossed at the end of the stroke operation to the length of the punctuation mark.
[0114] The stroke-in determination module is further used to determine whether the punctuation mark is stroked in this stroke operation according to s1 and s2.
[0115] The classification determination module is further used to:
[0116] If s1≥a1, it is determined that the punctuation mark is drawn in this line-drawing operation;
[0117] If a2≤s1<a1, and s2>b1, then it is determined that the punctuation mark is included in the current stroke operation; if a2≤s1<a1, and s2≤b1, then it is determined that the punctuation mark is not included in the current stroke operation;
[0118] If s1<a2, and s2≥b2, it is determined that the punctuation mark is drawn in this stroke operation; if s1<a2, and s2<b2, it is determined that the punctuation mark is not drawn in this stroke operation.
[0119] Optionally, a1=b2=0.8, a2=b1=0.5.
[0120] Optionally, the server is further configured to:
[0121] Storing the collected historical data of the line-drawing operation in a line-drawing data table, the line-drawing data table including a first field indicating the punctuation mark at the end of the line-drawing operation and a second field indicating whether the punctuation mark is actively drawn;
[0122] If there is a punctuation mark at the end of the line operation, the punctuation mark is stored in the first field of the record of the line operation in the line data table;
[0123] If the punctuation mark corresponding to the end of the stroke operation is actively stroked in, then the second field of the record of the stroke operation in the stroke data table is marked as a first value indicating active stroke-in;
[0124] If the punctuation mark corresponding to the end of the stroke operation is not actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a second value indicating passive stroke;
[0125] For punctuation marks, s1 is calculated according to the number of first values of the corresponding second field and the number of punctuation marks in the first field.
[0126] Optionally, the server is further configured to determine that the punctuation mark corresponding to the end of the stroke operation has not been actively drawn in if the first character after the end of the stroke operation is a punctuation mark when the end of the stroke operation corresponds to a punctuation mark but does not include the punctuation mark.
[0127] Figure 5 An exemplary system architecture 500 is shown to which a method for processing a line stroke operation or a system for processing a line stroke operation according to an embodiment of the present invention can be applied.
[0128] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0129] Users can use terminal devices 501, 502, 503 to interact with server 505 via network 504 to receive or send messages, etc. Various reading clients and communication client applications can be installed on terminal devices 501, 502, 503.
[0130] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0131] The server 505 may be a server that provides various services, such as a background management server that updates a line data table and updates a line-in number statistics table.
[0132] It should be noted that the processing method for the line drawing operation provided in the embodiment of the present invention is generally executed by the terminal devices 501, 502, and 503. In the processing system for the line drawing operation, the processing end is generally set in the terminal devices 501, 502, and 503, and the service end is generally set in the server 505.
[0133] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0134] Reference below Figure 6 , which shows a schematic structural diagram of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0135] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the system 600 are also stored in the RAM 603. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0136] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage section 608 as needed.
[0137] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing submodule (CPU) 601, the above-mentioned functions defined in the system of the present invention are performed.
[0138] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, system, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.
[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The modules described in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, the processor may be described as comprising a line and punctuation acquisition module, a line-in number acquisition module, a line-in determination module, a line-in ratio acquisition module, a line-in data table update module, and a line-in number statistics table update module. The names of these modules do not, in some cases, limit the modules themselves.
[0141] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently without being incorporated into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device includes:
[0142] Detecting the user's stroke operation on the currently displayed document, and after the user performs the stroke operation, obtaining the punctuation mark corresponding to the end point of the stroke operation;
[0143] Sending a query request to the server to find the proportion s1 corresponding to the current punctuation mark, wherein the server calculates the proportion s1 of one or more punctuation marks actively drawn at the end of the drawing operation based on historical data of the drawing operation;
[0144] Determine whether the punctuation mark is drawn in the current line drawing operation according to the found s1;
[0145] If it is determined that the current punctuation mark is to be drawn, the current punctuation mark is drawn into the line; otherwise, the current punctuation mark is not drawn into the line.
[0146] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for processing a line drawing operation, characterized in that: include: Detecting the user's stroke operation on the currently displayed document, and after the user performs the stroke operation, obtaining the punctuation mark corresponding to the end point of the stroke operation; Sending a query request to the server to find the proportion s1 corresponding to the current punctuation mark, wherein the server calculates the proportion s1 of one or more punctuation marks actively drawn at the end of the drawing operation based on historical data of the drawing operation; Determine whether the punctuation mark is drawn in the current line drawing operation according to the found s1; If it is determined that the current punctuation mark is to be drawn, the current punctuation mark is drawn into the line; otherwise, the current punctuation mark is not drawn into the line.
2. The method according to claim 1, characterized in that Also includes: Obtaining a ratio s2 of the length of the portion of the punctuation mark crossed at the end of the current stroke operation to the length of the current punctuation mark; The determining, based on the found s1, whether the punctuation mark is included in the current stroke operation includes: Determine whether the punctuation mark is drawn in the current line drawing operation according to s1 and s2.
3. The method according to claim 2, characterized in that The determining, according to s1 and s2, whether the current punctuation mark is included in the current stroke operation includes: If s1≥a1, it is determined that the punctuation mark is drawn in the current line drawing operation; If a2≤s1<a1, and s2>b1, then it is determined that the punctuation mark in this stroke operation is drawn in; if a2≤s1<a1, and s2≤b1, then it is determined that the punctuation mark in this stroke operation is not drawn in; If s1<a2, and s2≥b2, it is determined that the punctuation mark is drawn in this stroke operation; if s1<a2, and s2<b2, it is determined that the punctuation mark is not drawn in this stroke operation.
4. The method according to claim 3, characterized in that a1=b2=0.8, a2=b1=0.
5.
5. The method according to any one of claims 1 to 4, characterized in that The calculating, based on the historical data, the ratio s1 of one or more punctuation marks that are actively drawn at the end of the line drawing operation comprises: Storing the collected historical data of the line-drawing operation in a line-drawing data table, wherein the line-drawing data table includes a first field indicating the punctuation mark at the end of the line-drawing operation and a second field indicating whether the punctuation mark is actively drawn; If there is a punctuation mark corresponding to the end of the line stroke operation, the punctuation mark is stored in the first field of the record of the line stroke operation in the line stroke data table; If the punctuation mark corresponding to the end of the stroke operation is actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a first value indicating active stroke-in; If the punctuation mark corresponding to the end of the stroke operation is not actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a second value indicating passive stroke; For the punctuation mark, the s1 is calculated according to the number of first values of the second field corresponding to the punctuation mark and the number of the punctuation mark contained in the first field.
6. The method according to claim 5, characterized in that Also includes: When the end of the stroke operation corresponds to a punctuation mark but does not include the punctuation mark, if the first character after the end of the stroke operation is a punctuation mark, it is determined that the punctuation mark corresponding to the end of the stroke operation has not been actively drawn in.
7. A processing system for a marking operation, characterized in that: include: Processing end and service end; The server is used to collect historical data of the line-drawing operation, and calculate the ratio s1 of one or more punctuation marks that are actively drawn at the end of the line-drawing operation based on the historical data of the line-drawing operation; The processing end includes: The line punctuation acquisition module is used to detect the user's line operation on the currently displayed document, and after the user performs the line operation, obtain the punctuation mark corresponding to the end of the line operation; A data query module is used to send a query request to the server to find the proportion s1 corresponding to the punctuation mark; a stroke-in determination module, configured to determine whether the punctuation mark in the current stroke operation is stroked in accordance with the found s1; The automatic underlining module is used to, if it is determined that the current punctuation mark is to be underlined, mark the current punctuation mark in the underline; otherwise, not mark the current punctuation mark in the underline.
8. The system according to claim 7, characterized in that The processing end also includes: a stroke-in ratio acquisition module, configured to acquire a ratio s2 of the length of the portion of the punctuation mark that has been crossed at the end of the current stroke operation to the length of the current punctuation mark; The stroke-in determination module is further configured to determine whether the punctuation mark is stroked in the current stroke operation according to s1 and s2.
9. The system according to claim 8, characterized in that The inclusion determination module is further configured to: If s1≥a1, it is determined that the punctuation mark is drawn in the current line drawing operation; If a2≤s1<a1, and s2>b1, then it is determined that the punctuation mark in this stroke operation is drawn in; if a2≤s1<a1, and s2≤b1, then it is determined that the punctuation mark in this stroke operation is not drawn in; If s1<a2, and s2≥b2, it is determined that the punctuation mark is drawn in this stroke operation; if s1<a2, and s2<b2, it is determined that the punctuation mark is not drawn in this stroke operation.
10. The system according to claim 9, characterized in that a1=b2=0.8, a2=b1=0.
5.
11. The system according to any one of claims 7 to 10, characterized in that The server is further configured to: Storing the collected historical data of the line-drawing operation in a line-drawing data table, wherein the line-drawing data table includes a first field indicating the punctuation mark at the end of the line-drawing operation and a second field indicating whether the punctuation mark is actively drawn; If there is a punctuation mark corresponding to the end of the line stroke operation, the punctuation mark is stored in the first field of the record of the line stroke operation in the line stroke data table; If the punctuation mark corresponding to the end of the stroke operation is actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a first value indicating active stroke-in; If the punctuation mark corresponding to the end of the stroke operation is not actively stroked in, marking the second field of the record of the stroke operation in the stroke data table as a second value indicating passive stroke; For the punctuation mark, the s1 is calculated according to the number of first values of the second field corresponding to the punctuation mark and the number of the punctuation mark contained in the first field.
12. The system according to claim 11, wherein: The server is further configured to determine that the punctuation mark corresponding to the end of the stroke operation has not been actively drawn in if the first character after the end of the stroke operation is a punctuation mark when the end of the stroke operation corresponds to a punctuation mark but does not include the punctuation mark.
13. An electronic device for processing a scribing operation, characterized in that: include: one or more processors; a storage system for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
14. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Recognition of scribed indicia on a user interface
WO2005033856A2