Handwriting recognition method, device, computer equipment and storage medium

By collecting and matching the user's writing handwriting characteristics, using a personalized font database to improve the accuracy of handwriting font recognition, the problem of low handwriting font recognition accuracy in the existing technology is solved, and a more efficient recognition effect is achieved.

CN116959000BActive Publication Date: 2024-11-05KUIXING HLDG (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310919082.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2024-11-05
Estimated Expiration
2043-07-24

AI Technical Summary

Technical Problem

The existing handwritten font recognition technology has low accuracy and cannot effectively deal with the writing styles and complexity of Chinese characters of different users.

Method used

By collecting user's writing handwriting, using feature extraction algorithms to extract handwriting features, and matching and recognition is performed based on personalized font databases to improve recognition accuracy.

Benefits of technology

The recognition accuracy and efficiency of handwritten fonts are improved, and the user's writing style is more accurately identified through personalized database matching, reducing the amount of feature recognition data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116959000B_ABST
    Figure CN116959000B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of handwriting recognition, and provides a handwriting recognition method, device, equipment and medium. The method collects the handwriting of the current written text of the target user, extracts the handwriting features of the current written text, and then matches and recognizes the handwriting features according to the personalized font database corresponding to the target user, thereby realizing the recognition of the current written text, reducing the data volume of feature recognition, and improving the recognition efficiency of handwritten fonts; at the same time, the personalized font database constructed according to the writing habits of the target user, wherein the first font feature is closer to the handwriting feature of the current user's written text, the feature matching degree is higher, and the recognition accuracy of handwritten text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of handwriting recognition, and in particular to a handwriting recognition method, device, computer equipment and storage medium. Background Art

[0002] Handwriting recognition refers to the process of converting the ordered trajectory generated when writing on a handwriting device into Chinese character internal code. In fact, it is a mapping process from the coordinate sequence of the handwriting trajectory to the internal code of the Chinese character. It is one of the most natural and convenient means of human-computer interaction.

[0003] At present, the recognition of handwritten fonts is usually achieved through image processing methods and deep neural network technology. However, different people have different writing styles, users' writing styles are random and irregular, and the character level of Chinese characters is relatively complex and highly variable, resulting in low handwritten font recognition accuracy.

[0004] Therefore, how to solve the current low recognition accuracy of handwritten fonts has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present invention is to provide a handwriting recognition method, device, equipment and computer-readable storage medium, aiming to solve the current technical problem of low recognition accuracy of handwritten fonts.

[0006] To achieve the above object, the present invention provides a handwriting recognition method, the handwriting recognition method comprising:

[0007] Collect the handwriting of the target user's current writing text;

[0008] Based on the feature extraction algorithm, the features corresponding to the handwriting are extracted to obtain the handwriting features of the current written text;

[0009] Based on the personalized font database corresponding to the target user, matching the first font feature corresponding to the handwriting feature;

[0010] When the first font feature corresponding to the handwriting feature exists in the personalized font database, the currently written text is determined to be the target text corresponding to the first font feature.

[0011] In addition, to achieve the above object, the present invention also provides a handwriting recognition device, the handwriting recognition device comprising:

[0012] A handwriting collection module is used to collect the handwriting of the target user's current writing text;

[0013] A handwriting feature acquisition module, used to extract the features corresponding to the handwriting based on a feature extraction algorithm to obtain the handwriting features of the current written text;

[0014] A first font feature matching module, used for matching a first font feature corresponding to the handwriting feature based on a personalized font database corresponding to the target user;

[0015] The target text determination module is used to determine that the currently written text is the target text corresponding to the first font feature when the first font feature corresponding to the handwriting feature exists in the personalized font database.

[0016] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a processor, a memory, and a handwriting recognition program stored in the memory and executable by the processor, wherein when the handwriting recognition program is executed by the processor, the steps of the handwriting recognition method as described above are implemented.

[0017] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a handwriting recognition program is stored, wherein when the handwriting recognition program is executed by a processor, the steps of the handwriting recognition method as described above are implemented.

[0018] The present invention provides a handwriting recognition method, the method collects the handwriting of the target user's current writing; based on a feature extraction algorithm, extracts the features corresponding to the handwriting to obtain the handwriting features of the current writing; based on a personalized font database corresponding to the target user, matches the first font features corresponding to the handwriting features; when the first font features corresponding to the handwriting features exist in the personalized font database, determines that the current writing is the target text corresponding to the first font features. In the above manner, by collecting the handwriting of the target user's current writing and extracting the handwriting features of the current writing, and then matching and identifying the handwriting features according to the personalized font database corresponding to the target user, the current writing is recognized, the amount of data for feature recognition is reduced, and the recognition efficiency of handwritten fonts is improved; at the same time, the personalized font database constructed according to the writing habits of the target user, wherein the first font features are closer to the handwriting features of the current user's writing, the feature matching degree is higher, and the recognition accuracy of handwritten text is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of the hardware structure of a computer device involved in an embodiment of the present invention;

[0020] Figure 2 It is a flowchart of the first embodiment of the handwriting recognition method of the present invention;

[0021] Figure 3 This is a detailed flow chart of step 20 in the first embodiment of the handwriting recognition method of the present invention;

[0022] Figure 4 It is a flowchart of a second embodiment of the handwriting recognition method of the present invention;

[0023] Figure 5 It is a flowchart of a third embodiment of the handwriting recognition method of the present invention;

[0024] Figure 6 A schematic diagram of a process for extracting and recognizing handwriting font features provided by an embodiment of the present invention;

[0025] Figure 7 It is a flowchart of a fourth embodiment of the handwriting recognition method of the present invention;

[0026] Figure 8 A schematic diagram of a process for extracting features of standard text handwriting provided by an embodiment of the present invention;

[0027] Fig. 9 It is a schematic diagram of the functional modules of the first embodiment of the handwriting recognition device of the present invention.

[0028] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0029] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0030] The handwriting recognition method involved in the embodiment of the present invention is mainly applied to computer equipment, which may be a device with display and processing functions such as a PC, a portable computer, or a mobile terminal.

[0031] Reference Figure 1 , Figure 1Schematic diagram of the hardware structure of the computer device involved in the embodiment of the present invention. In the embodiment of the present invention, the computer device may include a processor 1001 (such as a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0032] Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0033] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and a handwriting recognition program.

[0034] exist Figure 1 In the embodiment, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the handwriting recognition program stored in the memory 1005 and execute the handwriting recognition method provided by the embodiment of the present invention.

[0035] The embodiment of the present invention provides a handwriting recognition method.

[0036] Reference Figure 2 , Figure 2 FIG. 4 is a flow chart of the first embodiment of the handwriting recognition method of the present invention.

[0037] In this embodiment, the handwriting recognition method comprises the following steps:

[0038] Step S10, collecting the handwriting of the target user's current writing;

[0039] In one embodiment, when a user writes text, a third-party device is used to collect handwriting.

[0040] In one embodiment, handwriting collection is a process of converting the ordered trajectory generated by the user writing on the handwriting device into the internal code of Chinese characters, which is actually a mapping process from the coordinate sequence of the handwriting trajectory to the internal code of the Chinese character.

[0041] In one embodiment, the electronic device for collecting handwriting may include but is not limited to a tablet, an electromagnetic pen, a dot matrix pen, a reading pen, and other devices with handwriting restoration effects.

[0042] Step S20, extracting features corresponding to the handwriting based on a feature extraction algorithm to obtain handwriting features of the current handwriting;

[0043] In one embodiment, handwriting features are various signs of personal writing habits in handwriting, including handwriting general features, local arrangement features, character writing features, typos, matching features, proportion features, and stroke order features.

[0044] In one embodiment, the feature extraction algorithm can be a handwriting coordinate extraction algorithm and a stroke order feature extraction algorithm. The coordinate extraction algorithm can extract the starting point coordinates of each stroke of the current handwriting, and the stroke order feature extraction algorithm can extract the stroke order information of each stroke of the current handwriting.

[0045] Furthermore, if Figure 3 As shown, the step S20 specifically includes:

[0046] Step S21, extracting the point coordinates of the starting position of each stroke of the handwriting and the stroke order information of each stroke of the handwriting based on the feature extraction algorithm;

[0047] In one embodiment, the collected user handwriting is imported, and the imported data includes the handwriting time sequence of each written font. Therefore, it can be arranged and restored according to the data collected for each stroke and the time sequence. Then, each stroke of the font is arranged as separate data, and the data with a timestamp is restored for each stroke. The position of its starting point is marked according to the number, so as to obtain the writing order of the starting position of each stroke, that is, the stroke order information.

[0048] In one embodiment, because the handwriting is collected within the screen range of the electronic device, the writing area where the user writes the text is also the screen range of the electronic device. Therefore, the screen range can be regarded as a two-dimensional coordinate plane, and when collecting handwriting, the coordinate values ​​of each stroke of the current writing text in the two-dimensional coordinate plane can be collected.

[0049] Step S22: based on the point coordinates corresponding to each stroke of the handwriting and the stroke order information, draw a feature graph of the current handwriting to obtain the handwriting features of the current handwriting.

[0050] In one embodiment, after determining the point coordinates of the starting positions of each stroke of the currently written text and the stroke order corresponding to each point coordinate, a straight line can be used to connect the point coordinates of each starting position according to the stroke order by point-to-point directional vectors.

[0051] In one embodiment, because the point coordinates of the starting positions of each stroke of each Chinese character may be repeated, but the stroke order of different Chinese characters may be different, vector lines are used to connect the coordinates of the starting points of the strokes, so that the handwriting features corresponding to each Chinese character have directionality, which is used to distinguish the stroke order, and then the vector handwriting feature graphics of each Chinese character can be distinguished, thereby obtaining the unique handwriting features corresponding to each Chinese character.

[0052] Step S30, matching a first font feature corresponding to the handwriting feature based on a personalized font database corresponding to the target user;

[0053] In one embodiment, the personalized font database is established according to the user's personal writing habits, and stores the handwriting features of the user's personal writing, which belongs to the exclusive font database. The first font feature is the handwriting feature of the Chinese characters written by the target user stored in the personalized font database. Therefore, the personalized font database is used to perform feature matching of the target user's current writing, and the recognition accuracy of the text is the highest.

[0054] In one embodiment, the first font feature stored in the personalized font database of the target user is the vector handwriting feature graph of the Chinese characters written by the target user, so the matching of the handwriting feature is also the matching of the vector handwriting feature graph, including the matching of the stroke starting point coordinates and stroke order information.

[0055] In one embodiment, according to the stroke starting point coordinates and stroke order information, the relative position information of each point in the handwriting feature can also be obtained according to the vector handwriting feature image, and then the Chinese character layout feature is obtained as a basis for feature matching.

[0056] Furthermore, if Figure 4 As shown, before step S30, the following steps are also included:

[0057] Step S301, calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database;

[0058] In one embodiment, the feature similarity calculation between the handwriting feature and the first font feature can be calculated from the feature vector number and the vector feature. For example, the number of graphics in the handwriting feature of the current written text, that is, the number of strokes of the current written text, is first determined to narrow the matching range. Then, starting from the starting point of the first stroke, the vector direction similarity corresponding to each stroke is calculated in turn, thereby calculating the feature similarity between the handwriting feature and the first font feature.

[0059] Step S302: When there is at least one feature whose similarity is greater than or equal to a preset similarity threshold, determine that the first font feature corresponding to the handwriting feature exists in the personalized font database.

[0060] In one embodiment, if the similarity between the first font feature in the personalized font database and the handwriting feature of the current written text is greater than or equal to a preset similarity threshold, such as 90%, it can be determined that the handwriting feature of the current written text exists in the personalized font database.

[0061] In one embodiment, if there are multiple first font features and handwriting features whose similarities are greater than a similarity threshold, the first font feature with the highest similarity is selected to correspond to the handwriting feature.

[0062] Step S40, when the first font feature corresponding to the handwriting feature exists in the personalized font database, determining that the currently written text is the target text corresponding to the first font feature.

[0063] In one embodiment, when a first font feature matching the handwriting feature of the current written text is queried in the personalized font database, it means that the handwriting feature of the current written text has been included in the personalized font database. Therefore, it can be determined that the text corresponding to the first font feature is the current written text.

[0064] Furthermore, when the first font feature corresponding to the handwriting feature exists in the personalized font database, after determining that the currently written text is the target text corresponding to the first font feature, it also includes: based on the handwriting feature corresponding to the currently written text, replacing the first font feature corresponding to the currently written text in the personalized font database to update the personalized font data.

[0065] In one embodiment, each person has different writing habits, and their handwriting will be different. Even when the same user writes the same Chinese character, there will be differences. At the same time, the user can improve his Chinese character writing ability through practice, or change the writing font, such as changing from Kaiti to Songti, and the handwriting characteristics will also be significantly different. Therefore, for the personalized font database, it is necessary to update the data synchronously with the user's Chinese character writing habits, so as to more accurately identify the handwriting characteristics of the user's written text.

[0066] In one embodiment, when the personalized font database matches the first font feature corresponding to the handwriting feature of the target user's current writing, that is, the handwriting feature and the first font feature correspond to the same text, at this time, the handwriting feature can be stored in the personalized font database to replace the first font feature, thereby completing the iterative update of the personalized handwriting feature of the current writing.

[0067] The present embodiment provides a handwriting recognition method, which collects the handwriting of the target user's current writing, extracts the handwriting features of the current writing, and then matches and identifies the handwriting features according to the personalized font database corresponding to the target user, thereby realizing the recognition of the current writing, reducing the amount of data for feature recognition and improving the recognition efficiency of handwritten fonts; at the same time, the personalized font database constructed according to the writing habits of the target user, wherein the first font feature is closer to the handwriting feature of the current user's writing, has a higher feature matching degree, and improves the recognition accuracy of handwritten text.

[0068] Please refer to Figure 5 , Figure 5 FIG. 4 is a flow chart of a third embodiment of a handwriting recognition method according to the present invention.

[0069] like Figure 5 As shown, based on the above Figure 2 In the illustrated embodiment, after step S30, the following steps are further included:

[0070] Step S31: when the first font feature corresponding to the handwriting feature does not exist in the personalized font database, matching the second font feature corresponding to the handwriting feature based on the standard font database;

[0071] In one embodiment, the personalized font database is established based on the handwriting features of the collected user-written characters. Since the user will not actively write all Chinese characters for handwriting collection and collection, the user's handwriting features stored in the personalized font database are updated in real time, that is, each time the handwriting features of the user's written Chinese characters are collected, the handwriting feature data in the personalized font database is synchronously updated once. The updated handwriting features include the handwriting features of the collected characters, and also include the handwriting features of the uncollected characters. Therefore, the handwriting features collected in the personalized font database are not complete and cannot cover all Chinese characters.

[0072] In one embodiment, since the personalized font database cannot cover the handwriting features of all characters, there is a situation where the first font feature corresponding to the handwriting feature of the current written text cannot be queried. At this time, the standard font database is called to recognize the handwriting features of the current written text.

[0073] In one embodiment, the standard font database includes handwriting features corresponding to the standard fonts of all Chinese characters. When the handwriting features of the current written text cannot be matched in the personalized font database, feature matching is performed through the standard font database.

[0074] In one embodiment, the feature matching process is a process of calculating the similarity between the handwriting feature of the current written text and the second font feature corresponding to each standard text in the standard font database. If the feature similarity is greater than or equal to a preset similarity threshold, it is determined that the second font feature corresponding to the handwriting feature of the current written text exists in the standard font database, and the recognition of the current written text can be completed.

[0075] For example, Figure 6 As shown, after collecting the handwriting font of the target user, the starting point of each stroke is extracted, and then the starting points of each stroke are sequentially connected using a directional straight line according to the stroke order of each stroke to obtain the handwriting feature graph corresponding to the handwriting font. Then, the handwriting feature graph of the handwriting font is compared with the handwriting feature graph of the standard font to calculate the similarity of the two feature graphs. If the similarity is greater than the similarity threshold, it is determined that the handwriting font corresponds to the standard font.

[0076] In one embodiment, the similarity threshold corresponding to the standard font database and the similarity threshold corresponding to the personalized font database may be different. Because the font features in the personalized font database are derived from the handwriting features of the target user's handwriting, the feature similarity threshold can be set higher, such as 90%; while the font features in the standard font database are derived from the handwriting features of the standard font, so the feature similarity threshold can be set lower, such as 75%.

[0077] It is understandable that the feature similarity threshold needs to be set according to the actual application results. The feature similarity threshold provided in this application is to facilitate those skilled in the art to understand the examples cited and is not intended to be a limiting value.

[0078] Step S32: when the second font feature corresponding to the handwriting feature exists in the standard font database, determine that the currently written text is the standard text corresponding to the second font feature.

[0079] In one embodiment, when the handwriting feature of the current written text matches the second font feature in the standard font database, the current written text is recognized as the text corresponding to the second font feature, and the recognition of the current written text is completed.

[0080] Furthermore, when the second font feature corresponding to the handwriting feature exists in the standard font database, after determining that the currently written text is the standard text corresponding to the second font feature, it also includes: based on the personalized font database, storing the handwriting feature corresponding to the currently written text to improve the personalized font database.

[0081] It is understandable that matching the handwriting features of the currently written text through the standard font database means that the handwriting features of the text are not included in the personalized font database of the target user, or there is a significant change in the way the target user writes the text.

[0082] In one embodiment, when the handwriting features of the current written text do not exist in the personalized font database of the target user or the handwriting features of the current written text stored historically have lost their recognition function, the current handwriting features of the current written text are stored in the personalized font database of the target user, thereby improving the personalized font database of the target user and improving the text recognition accuracy of the personalized font database.

[0083] Further, continue as Figure 5 As shown, the step S31 further includes:

[0084] Step S33: when the second font feature corresponding to the handwriting feature does not exist in the standard font database, a prompt pop-up window is generated to remind the target user to input the standard text corresponding to the handwriting feature of the current written text;

[0085] In one embodiment, the handwriting features stored in the standard font database are the handwriting features of all standard Chinese fonts, including features such as stroke order. However, when the target user writes Chinese characters, the stroke order may be incorrect, or there may be abbreviations, cursive writing and other writing methods, which results in the collected handwriting features being unable to point to the target text, and both the personalized font database and the standard font database are unable to recognize it.

[0086] In one embodiment, when both the personalized font database and the standard font database are unable to recognize the handwriting features of the current written text, the electronic device generates a pop-up reminder window to remind the user that the recognition of the current written text has failed.

[0087] In one embodiment, the reminder pop-up window may provide the user with options such as “rewrite”, “keyboard input” and “cancel”.

[0088] In one embodiment, if the user selects "rewrite", the current written text and its handwriting features are cleared, and a blank writing board is provided for the user to rewrite the current written text and re-collect the handwriting features for comparison and recognition.

[0089] In one embodiment, if the user selects "keyboard input", a virtual keyboard is displayed on the display screen of the electronic device, so that the user can input the standard text corresponding to the current written text through the keyboard in a manner such as pinyin.

[0090] In one embodiment, if the user selects "Cancel", the recognition of the current written text is terminated, and the data such as the handwriting features of the current written text is cleared.

[0091] Step S34: after determining the standard text corresponding to the handwriting features of the currently written text, based on the personalized font database, the handwriting features of the currently written text are stored to improve the personalized font database.

[0092] In one embodiment, after the user selects the keyboard to input the standard text corresponding to the handwriting characteristics of the current written text, the text recognition of the current written text is completed. At this time, the handwriting characteristics of the current written text are stored in the personalized font database of the target user, and the handwriting characteristics are corresponding to the standard text to improve the personalized font database.

[0093] Please refer to Figure 7 , Figure 7 FIG. 4 is a flow chart of a fourth embodiment of a handwriting recognition method according to the present invention.

[0094] like Figure 7 As shown, the handwriting recognition method provided by the present application also includes:

[0095] Step S01, extracting the stroke sequence of each stroke of at least one standard character and the starting position coordinates of each stroke based on the feature extraction algorithm;

[0096] In one embodiment, because the shape characteristics of each font are different, it is necessary to build a corresponding database according to the font category. When creating a standard font database, it is necessary to obtain standard Chinese characters and their stroke order information, and then build a dictionary key-value pair for each Chinese character to store the characteristic information of each Chinese character.

[0097] In one embodiment, a feature extraction algorithm is adopted to extract the stroke order of standard Chinese characters and the coordinates of the starting positions of each stroke. Among them, the stroke order information includes the font form of each stroke and the set of all previous strokes until a complete Chinese character is formed. Therefore, "points" are taken at the starting positions of each stroke and need to be marked. Secondly, the marked points on the left and right are connected by directed vectors point-to-point using straight lines in the order of the stroke order, so that the starting points of each stroke of the standard Chinese character have directionality, thereby improving the distinguishability of the handwriting features of different Chinese characters.

[0098] Step S02: Based on the stroke order of each stroke of the standard text and the coordinates of the starting positions of each stroke, draw the feature graph corresponding to the standard text to obtain the handwriting feature corresponding to the standard text;

[0099] In one embodiment, according to the stroke order of the standard writing, the starting position points of each stroke are sequentially connected by directed straight lines to obtain the standard handwriting features of each standard text.

[0100] Exemplarily, as Figure 8 shown, when extracting the standard handwriting features of the character "宇", after importing the regular script Chinese character "宇", the stroke order data "(upper) dot, (left) dot, horizontal hook, (short) horizontal, (long) horizontal, vertical hook" is imported at the same time; then the starting points of the above-mentioned strokes are numbered and marked according to the stroke order data, and the numbers are written in the order of the stroke order. For the standard handwriting feature data extraction of the character "宇", including linearly connecting the numbered marked points by vectors, an open-loop graph will be formed, which is the handwriting vectorization data, and at the same time, the graphic data after connection is extracted, which is the instantiated graph.

[0101] Step S03: Based on the handwriting features corresponding to each standard text, construct a standard font database.

[0102] In one embodiment, the stroke order and Chinese character data of each standard Chinese character are imported, and through feature extraction and instantiation of the handwriting features, the "handwriting vectorization and graphic vectorization" data of each standard Chinese character are obtained, thereby establishing a standard font database.

[0103] In one embodiment, because there are various fonts of Chinese characters, the writing methods of the same Chinese character in different fonts are different, and the corresponding handwriting features also have differences. Therefore, standard font databases corresponding to different fonts can be established, such as standard font databases for regular script, Song typeface, official script, etc.

[0104] In one embodiment, if standard font databases for different fonts are established, the handwriting features corresponding to the same Chinese character in each database can be associated, so as to facilitate the rapid matching and recognition of the handwriting features of handwritten Chinese characters.

[0105] In addition, an embodiment of the present invention also provides a handwriting recognition device.

[0106] Reference Fig. 9 , Fig. 9 It is a schematic diagram of the functional modules of the first embodiment of the handwriting recognition device of the present invention.

[0107] In this embodiment, the handwriting recognition device includes:

[0108] A handwriting collection module 10 is used to collect the handwriting of the target user's current writing text;

[0109] A handwriting feature acquisition module 20, for extracting features corresponding to the handwriting based on a feature extraction algorithm to obtain the handwriting features of the current written text;

[0110] A first font feature matching module 30, configured to match a first font feature corresponding to the handwriting feature based on a personalized font database corresponding to the target user;

[0111] The target text determination module 40 is used to determine that the current written text is the target text corresponding to the first font feature when the first font feature corresponding to the handwriting feature exists in the personalized font database.

[0112] In one embodiment, the handwriting feature acquisition module 20 includes:

[0113] A feature extraction unit, used to extract the point coordinates of the starting position of each stroke of the handwriting and the stroke order information of each stroke of the handwriting based on the feature extraction algorithm;

[0114] The handwriting feature acquisition unit is used to draw a feature graph of the current written text based on the point coordinates corresponding to each stroke of the written handwriting and the stroke order information, so as to obtain the handwriting features of the current written text.

[0115] In one embodiment, the handwriting recognition device further includes a second font feature matching module, and the second font feature matching module includes:

[0116] A second font feature matching unit, configured to match a second font feature corresponding to the handwriting feature based on a standard font database when the first font feature corresponding to the handwriting feature does not exist in the personalized font database;

[0117] The standard text determination unit is used to determine that the current written text is the standard text corresponding to the second font feature when the second font feature corresponding to the handwriting feature exists in the standard font database.

[0118] In one embodiment, the handwriting recognition device further includes a database improvement module for storing the handwriting features corresponding to the current written text based on the personalized font database to improve the personalized font database.

[0119] In one embodiment, the handwriting recognition device further includes an input recognition module, and the input recognition module includes:

[0120] A pop-up window reminder unit, used for generating a prompt pop-up window to remind the target user to input the standard text corresponding to the handwriting feature of the current written text when the second font feature corresponding to the handwriting feature does not exist in the standard font database;

[0121] The handwriting feature storage unit is used to store the handwriting features of the current written text based on the personalized font database after determining the standard text corresponding to the handwriting features of the current written text, so as to improve the personalized font database.

[0122] In one embodiment, the handwriting recognition device further includes a standard database establishment module, and the standard database establishment module includes:

[0123] A standard character feature extraction unit, used to extract the stroke sequence of each stroke of at least one standard character and the starting position coordinates of each stroke based on the feature extraction algorithm;

[0124] A standard character feature obtaining unit, used to draw a feature graph corresponding to the standard character based on the stroke sequence of each stroke of the standard character and the starting position coordinates of each stroke, so as to obtain the handwriting feature corresponding to the standard character;

[0125] The standard font database construction unit is used to construct a standard font database based on the handwriting features corresponding to each of the standard characters.

[0126] In one embodiment, the handwriting recognition device further includes a feature similarity calculation module, and the feature similarity calculation module includes:

[0127] A feature similarity calculation unit, used for calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database;

[0128] The feature similarity screening unit is used to determine that the first font feature corresponding to the handwriting feature exists in the personalized font database when there is at least one feature similarity greater than or equal to a preset similarity threshold.

[0129] Among them, each module in the above-mentioned handwriting recognition device corresponds to each step in the above-mentioned handwriting recognition method embodiment, and its function and implementation process will not be repeated here one by one.

[0130] In addition, an embodiment of the present invention further provides a computer-readable storage medium.

[0131] The computer-readable storage medium of the present invention stores a handwriting recognition program, wherein when the handwriting recognition program is executed by a processor, the steps of the handwriting recognition method described above are implemented.

[0132] The method implemented when the handwriting recognition program is executed can refer to the various embodiments of the handwriting recognition method of the present invention, and will not be described in detail here.

[0133] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0134] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0135] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0137] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A handwriting recognition method, It is characterized in that The handwriting recognition method comprises the following steps: Collect the handwriting of the target user's current writing text; Based on the feature extraction algorithm, extract the point coordinates of the starting position of each stroke of the handwriting and the stroke order information of each stroke of the handwriting; Based on the point coordinates and stroke order information corresponding to each stroke of the handwriting, the point coordinates of each starting point are connected point-to-point by directional vectors using a straight line in the stroke order, a feature graph of the current handwriting is drawn, and the handwriting features of the current handwriting are obtained; Based on the personalized font database corresponding to the target user, matching the first font feature corresponding to the handwriting feature; Calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database; When there is at least one feature whose similarity is greater than or equal to a preset similarity threshold, determining that the first font feature corresponding to the handwriting feature exists in the personalized font database; When the first font feature corresponding to the handwriting feature exists in the personalized font database, determining that the currently written text is the target text corresponding to the first font feature; When the first font feature corresponding to the handwriting feature does not exist in the personalized font database, matching the second font feature corresponding to the handwriting feature based on the standard font database; When the second font feature corresponding to the handwriting feature exists in the standard font database, determining that the current written text is the standard text corresponding to the second font feature; When the second font feature corresponding to the handwriting feature does not exist in the standard font database, a prompt pop-up window is generated to remind the target user to input the standard text corresponding to the handwriting feature of the current written text; After determining the standard text corresponding to the handwriting feature of the current written text, based on the personalized font database, the handwriting feature of the current written text is stored to improve the personalized font database; The step of calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database comprises: Determine the appropriate number of graphics in the handwriting feature of the current written text; wherein the appropriate number of graphics is the number of strokes of the current written text; Starting from the starting point of the first stroke, the vector direction similarity corresponding to each stroke is calculated in turn, so as to obtain the feature similarity between the handwriting feature and the first font feature.

2. The handwriting recognition method according to claim 1, It is characterized in that When the second font feature corresponding to the handwriting feature exists in the standard font database, after determining that the current written text is the standard text corresponding to the second font feature, the method further includes: Based on the personalized font database, the handwriting features corresponding to the current written text are stored to improve the personalized font database.

3. The handwriting recognition method according to claim 1, It is characterized in that Before collecting the handwriting of the target user's current written text, the method further includes: Based on the feature extraction algorithm, extracting the stroke sequence of each stroke of at least one standard character and the starting position coordinates of each stroke; Based on the stroke sequence of each stroke of the standard character and the starting position coordinates of each stroke, a feature graph corresponding to the standard character is drawn to obtain the handwriting feature corresponding to the standard character; A standard font database is constructed based on the handwriting features corresponding to each of the standard characters.

4. A handwriting recognition device, It is characterized in that The handwriting recognition device comprises: A handwriting collection module is used to collect the handwriting of the target user's current writing text; A handwriting feature acquisition module, for extracting the point coordinates of the starting position of each stroke of the handwriting and the stroke order information of each stroke of the handwriting based on a feature extraction algorithm; based on the point coordinates and the stroke order information corresponding to each stroke of the handwriting, using a directional straight line to sequentially connect the starting points of each stroke, draw a feature graph of the current handwriting, and obtain the handwriting features of the current handwriting; A first font feature matching module, used for matching a first font feature corresponding to the handwriting feature based on a personalized font database corresponding to the target user; a feature similarity calculation module, used for calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database; when there is at least one feature similarity greater than or equal to a preset similarity threshold, determining that the first font feature corresponding to the handwriting feature exists in the personalized font database; A target text determination module, configured to determine that the currently written text is the target text corresponding to the first font feature when the first font feature corresponding to the handwriting feature exists in the personalized font database; A second font feature matching module is used to match the second font feature corresponding to the handwriting feature based on the standard font database when the first font feature corresponding to the handwriting feature does not exist in the personalized font database; and to determine that the current written text is the standard text corresponding to the second font feature when the second font feature corresponding to the handwriting feature exists in the standard font database; An input recognition module is used to generate a prompt pop-up window to remind the target user to input the standard text corresponding to the handwriting feature of the current written text when the second font feature corresponding to the handwriting feature does not exist in the standard font database; after determining the standard text corresponding to the handwriting feature of the current written text, store the handwriting feature of the current written text based on the personalized font database to improve the personalized font database; The step of calculating the feature similarity between the handwriting feature and each of the first font features in the personalized font database comprises: Determine the appropriate number of graphics in the handwriting feature of the current written text; wherein the appropriate number of graphics is the number of strokes of the current written text; Starting from the starting point of the first stroke, the vector direction similarity corresponding to each stroke is calculated in turn, so as to obtain the feature similarity between the handwriting feature and the first font feature.

5. A computer device, It is characterized in that The computer device includes a processor, a memory, and a handwriting recognition program stored in the memory and executable by the processor, wherein when the handwriting recognition program is executed by the processor, the steps of the handwriting recognition method as described in any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a handwriting recognition program, wherein when the handwriting recognition program is executed by a processor, the steps of the handwriting recognition method according to any one of claims 1 to 3 are implemented.