Text recognition method and device based on displacement sensor, equipment and medium

By building a displacement sensor into the smart pen, acquiring writing data and matching text using a standard database, the problem of text recognition in paperless or screenless environments is solved, effective text recognition is achieved, and recognition efficiency is improved.

CN115061587BActive Publication Date: 2025-10-14SHENZHEN WATER WORLD INFORMATION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210769842.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-10-14
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In the prior art, text recognition cannot be performed in the absence of paper or a corresponding screen.

Method used

By building a displacement sensor into the smart pen, writing data is obtained, the number of strokes is calculated, and the text is matched using a preset standard database, and the text is recognized one by one.

Benefits of technology

It achieves effective text recognition in paperless or screenless environments, improving recognition efficiency and applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061587B_ABST
    Figure CN115061587B_ABST
Patent Text Reader

Abstract

The character recognition method based on the displacement sensor of the application can effectively solve the problem that the accurate recognition of characters cannot be completed in the scene without paper or corresponding screen.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent identification and correction, in particular to a character recognition method and device based on displacement sensor, equipment and medium. BACKGROUND

[0002] In the prior art, the image of the current character is usually obtained by the camera built-in the smart pen, and the character is recognized by image recognition technology, so the technical solution of recognizing the character by image recognition technology needs to cooperate with the paper or screen presenting the character, so in the scene without paper or corresponding screen, the character recognition cannot be performed. SUMMARY

[0003] The present application provides a character recognition method and device based on displacement sensor, equipment and medium, aiming at solving the problem that in the prior art, the character recognition cannot be performed in the scene without paper or corresponding screen.

[0004] In order to solve the above technical problem, in the first aspect, the present application provides a character recognition method based on displacement sensor, comprising:

[0005] obtaining the writing data generated by the displacement sensor built-in the smart pen when the smart pen writes the to-be-recognized character;

[0006] calculating the number of strokes of the to-be-recognized character according to the writing data, and generating the to-be-recognized character stroke number;

[0007] traversing the preset standard database to obtain the character in the preset standard database with the same stroke number as the to-be-recognized character stroke number, and obtaining the to-be-matched character;

[0008] collecting all the to-be-matched characters to generate a to-be-matched character list;

[0009] comparing the writing data of the to-be-recognized character with the standard writing data of the to-be-matched character in the to-be-matched character list one by one to obtain the matched character.

[0010] Preferably, before the step of obtaining the writing data generated by the displacement sensor built-in the smart pen when the smart pen writes the to-be-recognized character, the method comprises:

[0011] obtaining the standard writing data of the standard character, wherein the standard writing data comprises standard numerical value change information and standard direction change information of the displacement sensor, the standard numerical value change information is mapped to the stroke number of the standard character, and the standard direction change information is mapped to the stroke feature of the standard character;

[0012] the standard writing data is one-to-one corresponding to the standard character and stored in the standard database.

[0013] Preferably, the step of comparing the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters further includes:

[0014] parsing the written data to obtain direction change information and value change information of the character to be recognized;

[0015] Calculating the similarity between the direction change information and the value change information of the to-be-recognized character and the standard direction change information and the standard value change information of all the to-be-matched characters in the to-be-matched character list;

[0016] Obtain the text with the greatest similarity among all the texts to be matched in the text list to generate matching text.

[0017] Preferably, it is characterized in that the step of calculating the number of strokes of the character to be recognized based on the writing data to generate the number of strokes of the character to be recognized includes:

[0018] Parsing the written data to obtain the value change information of the character to be recognized;

[0019] Counting the value change information to obtain the number of value changes;

[0020] The number of times the numerical value changes is increased by one to obtain the number of strokes of the character to be recognized.

[0021] Preferably, the step of comparing the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters comprises:

[0022] parsing the writing data to obtain direction change information of the displacement sensor;

[0023] generating stroke features of the character to be recognized according to the direction change information;

[0024] Comparing the stroke features of the characters to be matched in the list of characters to be matched with the stroke features of the characters to be recognized;

[0025] The characters to be matched whose stroke features match the stroke features of the characters to be recognized in the list of characters to be matched are obtained to obtain matching characters.

[0026] Preferably, after the step of generating the stroke features of the character to be recognized according to the direction change information, the method further comprises:

[0027] sequentially calculating the proportional relationship between the stroke features of each character to be matched in the list of characters to be matched and the stroke features of the character to be recognized;

[0028] If the proportional relationships between multiple identical stroke features are consistent, matching text is obtained.

[0029] Preferably, after the step of obtaining the text with the greatest similarity among all the texts to be matched in the text list to be matched and generating the matching text, the following steps are included:

[0030] Obtaining the voice of the matching text and performing voice broadcasting;

[0031] Obtaining and parsing a first feedback message from a user;

[0032] When the first feedback message is error information, arranging the remaining characters to be matched in the list of characters to be matched in descending order of similarity;

[0033] Obtaining the remaining voices of the characters to be matched in the list of characters to be matched in descending order of similarity and announcing them;

[0034] Obtain and parse the second feedback message fed back by the user;

[0035] When the second feedback message is correct, stop broadcasting;

[0036] When the second feedback message is error information, determining the similarity and a minimum similarity threshold;

[0037] When the similarity is less than the minimum similarity threshold, the user is reminded to perform recognition again.

[0038] In a second aspect, the present application further provides a text recognition device based on a displacement sensor, comprising:

[0039] A writing data acquisition module, configured to acquire writing data generated by a displacement sensor built into the smart pen when the smart pen writes characters to be recognized;

[0040] A stroke acquisition module, configured to calculate the number of strokes of the character to be recognized based on the writing data, and generate the number of strokes of the character to be recognized;

[0041] A module for obtaining characters to be matched is used to traverse a preset standard database to obtain characters in the preset standard database with the same number of strokes as the character to be recognized, thereby obtaining the characters to be matched;

[0042] A list module is used to collect all the characters to be matched and generate a list of characters to be matched;

[0043] The comparison module is used to compare the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters.

[0044] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the above-mentioned displacement sensor-based text recognition methods are implemented.

[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned displacement sensor-based text recognition methods.

[0046] The present application provides a text recognition method based on a displacement sensor, comprising: obtaining writing data generated by a displacement sensor built into the smart pen when the smart pen writes text to be recognized; calculating the number of strokes of the text to be recognized based on the writing data to generate the number of strokes of the text to be recognized; traversing a preset standard database to obtain text in the preset standard database with the same number of strokes as the text to be recognized, to obtain text to be matched; collecting all the text to be matched to generate a list of text to be matched; comparing the writing data of the text to be recognized with the standard writing data of the text to be matched in the list of text to be matched one by one to obtain matching text; by using a displacement sensor built into the smart pen, the writing data generated by the displacement sensor end when writing text is obtained and compared and recognized with the writing data of the text in the preset standard database, without the need for paper or screen to present text, and can effectively solve the problem that text recognition cannot be performed in scenarios where there is no paper or corresponding screen. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 1 is a flow chart of a method for character recognition based on a displacement sensor according to an embodiment;

[0048] Figure 2 Schematic diagram of the structure of a text recognition device based on a displacement sensor according to an embodiment;

[0049] Figure 3 The figure is a schematic block diagram of the structure of a computer device according to an embodiment.

[0050] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0052] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the use of the term "include" in the specification of the present application means that the presence of a feature, integer, step, operation, element, unit, unit and / or assembly, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, units, units, assemblies and / or combinations thereof. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be intermediate elements. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of the associated listed items.

[0053] Those skilled in the art can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as that generally understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.

[0054] Reference Figure 1 The method for recognizing characters based on displacement sensors provided in an embodiment of the present application includes:

[0055] S1: obtaining writing data generated by a displacement sensor built in a smart pen when the smart pen writes a to-be-recognized character;

[0056] S2: calculating the number of strokes of the to-be-recognized character according to the writing data, and generating a to-be-recognized character stroke number;

[0057] S3: traversing a preset standard database to obtain characters in the preset standard database having the same number of strokes as the to-be-recognized character stroke number, and obtaining to-be-matched characters;

[0058] S4: collecting all the to-be-matched characters to generate a to-be-matched character list;

[0059] S5: comparing the writing data of the to-be-recognized character with standard writing data of the to-be-matched characters in the to-be-matched character list one by one to obtain a matched character.

[0060] As described in steps S1-S2 above, the smart pen in this solution has a built-in displacement sensor, wherein the displacement sensor includes a horizontal displacement sensor and a vertical displacement sensor. The working principle of the displacement sensor is as follows: the potentiometer-type displacement sensor converts the mechanical displacement of the smart pen into an electrical value (resistance, current, or voltage) output that is linear or has an arbitrary functional relationship with the mechanical displacement of the smart pen through the potentiometer element; the displacement of the smart pen can cause a change in the resistance, current, or voltage at the moving end of the potentiometer. The change in resistance, current, or voltage can be used to reflect the magnitude of the displacement. An increase or decrease in resistance, current, or voltage indicates the direction of the displacement, i.e., the direction of the stroke. When using the smart pen, an increase in the resistance, current, or voltage of the horizontal displacement sensor can be defined as a rightward stroke of the smart pen, while a decrease in the resistance, current, or voltage of the horizontal displacement sensor can be defined as a leftward stroke of the smart pen. Similarly, if the vertical displacement sensor resistance, current or voltage increases, it indicates that the smart pen is swiping upward, and if the vertical displacement sensor resistance, current or voltage decreases, it indicates that the smart pen is swiping downward. For strokes in the oblique direction, the increase or decrease in the vertical displacement sensor resistance, current or voltage of the horizontal displacement sensor and the vertical displacement sensor can be combined to determine the occurrence of a stroke. The generation of current or voltage indicates that a stroke has occurred. When the smart pen is lifted during writing, no current or voltage is generated by the resistance of the moving end of the potentiometer. Therefore, the number of strokes of the written text can be determined by the number of times the pen is lifted (the number of times the resistance generates current or voltage during writing). Therefore, when copying or writing text to be recognized, the writing data (the value and direction of the current or voltage) generated by the displacement sensor built into the smart pen can be used to obtain the stroke characteristics and number of strokes of the text to be recognized.

[0061] As described in the above steps S3-S5, after the writing data of the character to be recognized is obtained by using the smart pen to write and copy the character to be recognized, the character to be recognized can be placed in a pre-set standard database to traverse and search for characters with the same number of strokes. If the number of strokes of several standard characters in the standard database is the same as that of the character to be recognized, it means that the character to be recognized is one of these standard characters. These characters will be collected to generate a list of characters to be matched. When the character to be recognized and the characters to be matched in the list of characters to be matched are compared one by one, that is, when the character to be recognized is written by the smart pen, a set of writing data including the current value or voltage value of the direction will be generated according to the stroke order of the character to be recognized. Each character has a unique set of such writing data. Therefore, by comparing the writing data of the character to be recognized with the standard writing data of the character to be matched in the list of characters to be matched, the written character can be correctly identified.

[0062] Furthermore, the standard database contains all the characters and corresponding writing data, among which the characters and data can be added by users by copying and writing themselves, or they can be obtained through the Internet. Users can edit, add, delete and correct the standard characters in the standard database according to actual needs.

[0063] In one embodiment, before the step of obtaining writing data generated by a displacement sensor built into the smart pen when the smart pen writes the text to be recognized, the step includes:

[0064] Acquiring standard writing data of a standard character, wherein the standard writing data includes standard value change information and standard direction change information of the displacement sensor, the standard value change information is mapped to the number of strokes of the standard character, and the standard direction change information is mapped to the stroke features of the standard character;

[0065] The standard writing data is matched one-to-one with the standard characters and stored in a standard database.

[0066] As mentioned above, before performing text recognition, the horizontal displacement sensor and vertical displacement sensor built into the smart pen can be used to construct a standard database, wherein the standard writing data includes the standard numerical value change information and standard direction change information of the displacement sensor; wherein the standard numerical value change information indicates whether corresponding current and voltage values ​​are generated, which corresponds to the number of strokes of the text, and the standard direction change information indicates the change in the moving direction of the displacement sensor, which corresponds to the stroke characteristics of the text. The specific construction method is: open the construction standard database mode of the smart pen, use the smart pen to write or copy the text, such as the word "good", write it once with the smart pen, and obtain the "good" character. During the writing process, the smart pen The horizontal displacement sensor and vertical displacement sensor built into the smart pen will generate characteristic data when writing the character "好". The stroke order of the character "好" is: "stroke dot, stroke, horizontal stroke, horizontal stroke / horizontal hook, vertical hook, horizontal stroke"; for example, when writing the first stroke "stroke dot", referring to the above definition, when using the smart pen, an increase in the resistance, current or voltage of the horizontal displacement sensor can be defined as the smart pen swiping to the right, and a decrease in the resistance, current or voltage of the horizontal displacement sensor can be defined as the smart pen swiping to the left. Similarly, an increase in the resistance, current or voltage of the vertical displacement sensor indicates that the smart pen is swiping upward, and a decrease in the resistance, current or voltage of the vertical displacement sensor indicates that the smart pen is swiping downward. Therefore, when using the smart pen to write "stroke dot", this embodiment The current value is used as an example for explanation, but in specific usage scenarios, you can also use the voltage or resistance value and direction change generated when the displacement sensor moves to define it yourself; the smart pen first slides from the upper left to the lower left and then to the lower right; the current value of its horizontal sensor is "negative, positive", and the current value of the vertical sensor is "negative, negative". When writing the stroke "撇", the smart pen will lift the pen to the upper right and then slide it to the lower left. Therefore, the corresponding current value of the horizontal sensor is "positive, negative", and the current value of the vertical sensor is "positive, negative". The corresponding number of pen lifts is 1, so the corresponding number of strokes is the number of pen lifts + 1, which means that the number of pen lifts is 1, the smart pen wrote two strokes. Similarly, the remaining "horizontal, horizontal stroke / horizontal hook, vertical hook, horizontal" follow the same principle and will not be elaborated here. Since the writing strokes and order of each character are fixed, each character has a unique set of writing data. The change in the current or voltage value can be used to reflect the number of strokes of the character, and the direction of the current or voltage can be used to reflect the stroke characteristics of the character (the stroke characteristics are the stroke direction of the smart pen when writing the character) to establish a standard database, where characters and data can be written and added by users themselves, or obtained through the Internet. Users can edit, add, delete and correct the standard characters in the standard database according to actual needs.

[0067] In one embodiment, the step of comparing the writing data of the to-be-recognized character with the standard writing data of the to-be-matched characters in the to-be-matched character list one by one to obtain matching characters further includes:

[0068] parsing the written data to obtain direction change information and value change information of the character to be recognized;

[0069] Calculating the similarity between the direction change information and the value change information of the to-be-recognized character and the standard direction change information and the standard value change information of all the to-be-matched characters in the to-be-matched character list;

[0070] Obtain the text with the greatest similarity among all the texts to be matched in the text list to generate matching text.

[0071] As described above, in some embodiments, if there are too many characters to be matched in the list of characters to be matched obtained in the above step S4, such as more than 5 characters to be matched, if they are matched one by one directly, although the corresponding characters can be matched at the last moment, the recognition efficiency may be relatively slow. Therefore, the smart pen will directly compare the direction change information and numerical change information of the written characters with the direction change information and numerical change information of the 5 characters to be matched, and calculate the similarity between the characters to be recognized and various features in the standard database. The character to be matched with the highest similarity will be determined as the final result, which can improve the recognition efficiency.

[0072] In one embodiment, the step of calculating the number of strokes of the character to be recognized based on the writing data to generate the number of strokes of the character to be recognized includes:

[0073] Parsing the written data to obtain the value change information of the character to be recognized;

[0074] Counting the value change information to obtain the number of value changes;

[0075] The number of times the numerical value changes is increased by one to obtain the number of strokes of the character to be recognized.

[0076] As mentioned above, when writing continuous strokes, a corresponding change will occur in the resistance of the displacement sensor, that is, a corresponding current or voltage value will be generated when writing. When the smart pen is lifted, the current value is zero. Therefore, the number of strokes of the text can be calculated by counting the number of times the smart pen is lifted. If the corresponding number of pen lifts when writing is 1, the corresponding number of strokes is the number of pen lifts + 1, which means that when the number of pen lifts is 1, the smart pen wrote two strokes.

[0077] In one embodiment, the step of comparing the writing data of the to-be-recognized character with the standard writing data of the to-be-matched characters in the to-be-matched character list one by one to obtain matching characters includes:

[0078] parsing the writing data to obtain direction change information of the displacement sensor;

[0079] generating stroke features of the character to be recognized according to the direction change information;

[0080] Comparing the stroke features of the characters to be matched in the list of characters to be matched with the stroke features of the characters to be recognized;

[0081] The characters to be matched whose stroke features match the stroke features of the characters to be recognized in the list of characters to be matched are obtained to obtain matching characters.

[0082] As mentioned above, when the smart pen writes the text to be recognized, a unique set of writing data will be generated. For example, the stroke order of the word "女" is: "撇点, 撇, 横". The smart pen first moves from the upper left to the lower left and then to the lower right; the current value of its horizontal sensor is "negative, positive", and the current value of the vertical sensor is "negative, negative". When writing the stroke "撇", the smart pen will lift the pen to the upper right and then move it to the lower left. Therefore, the corresponding current value of the horizontal sensor is "positive, negative", and the current value of the vertical sensor is "positive, negative". Then, the smart pen will lift the pen to the upper left and write "横" to the right. At this time, the current value of the horizontal sensor is "negative, positive", and the current value of the vertical sensor is "positive, negative". Among them, "-" means there is current or electricity Pressure is generated, but the current or voltage does not change (because the vertical sensor does not move in the vertical direction when writing "horizontal", which means that the smart pen is lifted upward and then stroked horizontally to the right. Then, after writing the character "女", the change data of the current or voltage value of the horizontal sensor is "negative, positive, positive, negative, negative, positive", while the change data of the current or voltage value of the vertical sensor is "negative, negative, positive, negative, positive, -". The comma in each set of data represents the number of times the pen is lifted. For the same character, the number of commas in the data generated by the horizontal sensor and the vertical sensor are the same. The positive or negative value corresponds to the stroke characteristics of the character. Therefore, the character to be recognized and the character to be matched can be compared by comparing the data of the horizontal sensor and the vertical sensor to determine the recognized character;

[0083] Further, because the word "female" can be a single word, but also can be the component of other words, therefore, the interval time after writing a complete word can be used to distinguish whether it is a component or a single word. Generally, for example, the word "like", when female is a component, after writing the component "female", the word "mouth" is written continuously, therefore, the interval time during this period can be set to 0.1-0.5 milliseconds, while when female is a single word, the interval time after writing the word "female" can be set to 0.6-1 milliseconds for the identification of the next word.

[0084] In one embodiment, after the step of generating the stroke features of the to-be-recognized word according to the direction change information, the method further comprises:

[0085] sequentially calculating the proportional relationship between the stroke features of each to-be-matched word in the to-be-matched word list and the stroke features of the to-be-recognized word;

[0086] if the proportional relationship between multiple same stroke features is consistent, obtaining a matched word.

[0087] As described above, because the writing habits of different people are different, some people are used to writing large characters, and some people are used to writing small characters, therefore, the size of the stroke features of the actually written word and the stroke features of the standard word in the standard database is different, and after the step of generating the stroke features of the to-be-recognized word according to the direction change information, the proportional relationship between the stroke features of each to-be-matched word in the to-be-matched word list and the stroke features of the to-be-recognized word is sequentially calculated, if the proportional relationship between multiple stroke features of the stroke features of the to-be-recognized word and the stroke features of the to-be-matched word is the same, it indicates that the stroke features of the to-be-recognized word after a certain proportional relationship of enlargement or reduction are the same as the stroke features of the to-be-matched word, therefore, it can be judged that the to-be-matched word is the to-be-recognized word, and the enlargement or reduction of the stroke features of the to-be-matched word in the to-be-matched word list according to a certain proportional relationship of the stroke features of the to-be-recognized word can meet the use of people who are used to writing different size characters, and improve the applicability.

[0088] In one embodiment, after the step of obtaining the to-be-matched word with the maximum similarity in the to-be-matched word list and generating a matched word, the method further comprises:

[0089] obtaining the voice of the matched word and performing voice broadcast;

[0090] obtaining and analyzing the first feedback message fed back by the user;

[0091] when the first feedback message is error information, arranging the remaining to-be-matched words in the to-be-matched word list in descending order of similarity.

[0092] Obtaining the remaining voices of the characters to be matched in the list of characters to be matched in descending order of similarity and announcing them;

[0093] Obtain and parse the second feedback message fed back by the user;

[0094] When the second feedback message is correct, stop broadcasting;

[0095] When the second feedback message is error information, determining the similarity and a minimum similarity threshold;

[0096] When the similarity is less than the minimum similarity threshold, the user is reminded to perform recognition again.

[0097] As mentioned above, after obtaining the text to be matched with the highest similarity, the smart pen will obtain the voice of the best matching text and broadcast it, and obtain user feedback information, which can be specifically whether to rewrite it, or use the confirm / negative button set on the smart pen to determine whether the recognized text is correct. If it is incorrect, the smart pen will broadcast the pronunciation of the remaining 4 words in descending order of similarity until the user confirms that the voice is correct.

[0098] When the voice has finished reading the pronunciation of the character with the highest similarity and the user feedback is correct, the smart pen will stop reading, wait for the user to write the next character and continue to recognize the next character according to the above recognition process; if the user feedback is incorrect, the smart pen will read the pronunciation of the remaining 4 characters in descending order of similarity, and judge the similarity of the remaining 4 characters with the character to be recognized. For example, the similarity of the first character is 99%, the second is 95%, the third is 90%, the fourth is 85%, and the fifth character is 80%. The user can set the minimum similarity threshold for smart reading. For example, if the minimum threshold is set to 90%, the smart pen will read the first, second, and third characters in succession. If it is still not the correct answer, the smart pen will stop reading, indicating that the user may have written it incorrectly, and will remind the user to write again and recognize it.

[0099] Reference Figure 2 In a second aspect, the present application further provides a text recognition device based on a displacement sensor, comprising:

[0100] A writing data acquisition module 100 is used to acquire writing data generated by a displacement sensor built into the smart pen when the smart pen writes the text to be recognized;

[0101] A stroke acquisition module 200 is used to calculate the number of strokes of the character to be recognized based on the writing data and generate the number of strokes of the character to be recognized;

[0102] The to-be-matched character acquisition module 300 is configured to traverse the to-be-recognized character in a preset standard database, obtain characters in the preset standard database that have the same number of strokes as the to-be-recognized character, and generate the to-be-matched character;

[0103] A list module 400 is used to collect all the characters to be matched and generate a list of characters to be matched;

[0104] The comparison module 500 is used to compare the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters.

[0105] In one embodiment, the apparatus further comprises a database construction module, wherein the database construction module comprises:

[0106] a standard writing data acquisition unit, configured to acquire standard writing data of a standard character, wherein the standard writing data includes standard value change information and standard direction change information of the displacement sensor, the standard value change information is mapped to the number of strokes of the standard character, and the standard direction change information is mapped to the stroke features of the standard character;

[0107] The storage unit is used to make a one-to-one correspondence between the standard writing data and the standard characters, and store them in a standard database.

[0108] In one embodiment, the comparison module 500 further includes:

[0109] a third parsing unit, configured to parse the written data to obtain direction change information and value change information of the character to be recognized;

[0110] a first calculation unit, configured to calculate the similarity between the direction change information and the value change information of the to-be-recognized character and the standard direction change information and the standard value change information of all the to-be-matched characters in the to-be-matched character list;

[0111] The second matching unit is configured to obtain the text with the greatest similarity among all the texts to be matched in the text list to be matched, and generate matching text.

[0112] In one embodiment, the stroke acquisition module 200 includes:

[0113] A first parsing unit, configured to parse the written data to obtain numerical value change information of the character to be recognized;

[0114] a first statistical unit, configured to count the value change information to obtain the number of value changes;

[0115] a stroke number acquisition unit, configured to add one to the number of times of value changes to obtain the stroke number of the to-be-recognized character.

[0116] In one embodiment, the comparison module 500 comprises:

[0117] a second analysis unit, configured to analyze the writing data to obtain direction change information of the displacement sensor;

[0118] a stroke feature acquisition unit, configured to generate stroke features of the to-be-recognized character according to the direction change information;

[0119] a first comparison unit, configured to compare the stroke features of the to-be-matched characters in the to-be-matched character list with the stroke features of the to-be-recognized character;

[0120] a first matching unit, configured to obtain to-be-matched characters in the to-be-matched character list whose stroke features match the stroke features of the to-be-recognized character to obtain matched characters.

[0121] In one embodiment, the comparison module 500 further comprises a second comparison unit, which is configured to:

[0122] sequentially calculate proportional relationships between the stroke features of the to-be-matched characters in the to-be-matched character list and the stroke features of the to-be-recognized character;

[0123] if the proportional relationships between multiple same stroke features are consistent, a matched character is obtained.

[0124] In one embodiment, the device further comprises a first voice broadcast module, which comprises:

[0125] a first voice broadcast unit, configured to obtain a voice of the matched character and perform voice broadcast;

[0126] a first feedback unit, configured to obtain and analyze a first feedback message fed back by a user;

[0127] a first sorting unit, configured to arrange remaining to-be-matched characters in the to-be-matched character list in descending order of similarity when the first feedback message is error information;

[0128] a broadcast execution unit, configured to sequentially obtain voices of the remaining to-be-matched characters in the to-be-matched character list in descending order of similarity and perform voice broadcast;

[0129] a second feedback unit, configured to obtain and analyze a second feedback message fed back by a user;

[0130] a stop broadcast unit, configured to stop voice broadcast when the second feedback message is correct information.

[0131] a judging unit, configured to judge the size of the similarity and a minimum similarity threshold value when the second feedback message is error information;

[0132] a reminding unit, configured to remind a user to re-identify when the similarity is less than the minimum similarity threshold value.

[0133] Reference Figure 3 In the embodiments of the present application, a computer device, which can be a server, is also provided. The internal structure of the computer device can be as shown in Figure 3 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store text recognition data based on a displacement sensor and the like. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a text recognition method based on a displacement sensor.

[0134] Those skilled in the art can understand that Figure 3 The structure shown in the embodiments of the present application is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied.

[0135] The embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon. The computer program is executed by the processor to implement a text recognition method based on a displacement sensor. It can be understood that the computer readable storage medium in the embodiments of the present application can be a volatile readable storage medium or a non-volatile readable storage medium.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database, or other medium provided by the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0137] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, device, article, or method that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, device, article, or method. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, device, article, or method that includes the element.

[0138] The above description is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A text recognition method based on a displacement sensor, characterized in that: include: Acquiring writing data generated by a displacement sensor built into the smart pen when the smart pen writes the text to be recognized; Calculating the number of strokes of the character to be recognized based on the writing data to generate the number of strokes of the character to be recognized; Traversing a preset standard database, obtaining characters in the preset standard database having the same number of strokes as the character to be recognized, and obtaining the character to be matched; Gather all the characters to be matched and generate a list of characters to be matched; Comparing the written data of the to-be-recognized character with the standard written data of the to-be-matched characters in the to-be-matched character list one by one to obtain matching characters; Before the step of obtaining writing data generated by a displacement sensor built into the smart pen when the smart pen writes the text to be recognized, the method includes: Acquiring standard writing data of a standard character, wherein the standard writing data includes standard value change information and standard direction change information of the displacement sensor, the standard value change information is mapped to the number of strokes of the standard character, and the standard direction change information is mapped to the stroke features of the standard character; Matching the standard writing data with the standard characters one by one and storing them in a standard database; The step of comparing the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters further includes: parsing the written data to obtain direction change information and value change information of the character to be recognized; When there are multiple characters to be matched in the character list to be matched, calculating the similarity between the direction change information and the value change information of the character to be recognized and the standard direction change information and the standard value change information of all the characters to be matched in the character list to be matched; Obtain the text with the greatest similarity among all the texts to be matched in the text list to be matched, and generate matching text; After the step of obtaining the characters with the greatest similarity among all the characters to be matched in the character list to be matched and generating matching characters, the following steps are included: Obtaining the voice of the matching text and performing voice broadcasting; Obtaining and parsing a first feedback message from a user; When the first feedback message is error information, arranging the remaining characters to be matched in the list of characters to be matched in descending order of similarity; Obtaining the remaining voices of the characters to be matched in the list of characters to be matched in descending order of similarity and announcing them; Obtain and parse the second feedback message fed back by the user; When the second feedback message is correct, stop broadcasting; When the second feedback message is an error message, the pronunciations of the remaining matching characters are announced in descending order of similarity, and the similarity between the remaining matching characters and the character to be recognized is determined, and the difference between the similarity and the minimum similarity threshold is determined; When the similarity is less than the minimum similarity threshold, the user is reminded to perform recognition again.

2. The text recognition method based on displacement sensor according to claim 1, characterized in that: The step of calculating the number of strokes of the character to be recognized based on the writing data to generate the number of strokes of the character to be recognized includes: Parsing the written data to obtain the value change information of the character to be recognized; Counting the value change information to obtain the number of value changes; The number of times the numerical value changes is increased by one to obtain the number of strokes of the character to be recognized.

3. The text recognition method based on displacement sensor according to claim 1, characterized in that: The step of comparing the writing data of the to-be-recognized character with the standard writing data of the to-be-matched characters in the to-be-matched character list one by one to obtain matching characters includes: parsing the writing data to obtain direction change information of the displacement sensor; generating stroke features of the character to be recognized according to the direction change information; Comparing the stroke features of the characters to be matched in the list of characters to be matched with the stroke features of the characters to be recognized; The characters to be matched whose stroke features match the stroke features of the characters to be recognized in the list of characters to be matched are obtained to obtain matching characters.

4. The text recognition method based on displacement sensor according to claim 3, characterized in that: After the step of generating the stroke features of the character to be recognized according to the direction change information, the method further includes: sequentially calculating the proportional relationship between the stroke features of each character to be matched in the list of characters to be matched and the stroke features of the character to be recognized; If the proportional relationships between multiple identical stroke features are consistent, matching text is obtained.

5. A text recognition device based on a displacement sensor, used to implement the method according to any one of claims 1 to 4, characterized in that: include: A writing data acquisition module, configured to acquire writing data generated by a displacement sensor built into the smart pen when the smart pen writes characters to be recognized; A stroke acquisition module, configured to calculate the number of strokes of the character to be recognized based on the writing data, and generate the number of strokes of the character to be recognized; A module for obtaining characters to be matched is used to traverse a preset standard database to obtain characters in the preset standard database with the same number of strokes as the character to be recognized, thereby obtaining the characters to be matched; A list module is used to collect all the characters to be matched and generate a list of characters to be matched; The comparison module is used to compare the writing data of the to-be-recognized characters with the standard writing data of the to-be-matched characters in the to-be-matched characters list one by one to obtain matching characters.

6. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the text recognition method based on a displacement sensor according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the text recognition method based on a displacement sensor according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Written character recognizing method and written character recognizing device

    CN104794485A

  • Intelligent pen, using method thereof and handwriting set system

    CN111309163A

  • Character recognition method, device and equipment based on stroke order and OCR (Optical Character Recognition) and storage medium

    CN113011412A