Processing method and device for writing data and medium
By combining pressure sensors, cameras and magnet components in the smart pen, the function of collecting writing force and handwriting data in real time is achieved, solving the problems of sensor deviation and impact sound, and improving the data accuracy and user experience of the smart pen.
Patent Information
- Application Number
- CN202411568344.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing smart pen cannot collect writing strength in real time during writing, and the sensor is easily contaminated with dust or fatigue after long-term use, resulting in data deviation, and a slight impact sound during writing affects students' attention.
Through the pressure sensor, camera and magnet assembly of the smart pen, real-time pressure values are collected and combined with handwriting data to realize the identification of writing status and data transmission. The refill movement stroke is shortened by the adsorption of magnets, reducing impact sound, and reducing sensor deviation through the correction mechanism at each start.
Real-time collection and accurate detection of writing force is realized, the sensor deviation is reduced due to dust or fatigue, the impact sound is eliminated during writing, and the data accuracy and user experience of the smart pen are improved.
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart pens, and in particular to a method, device and medium for processing written data. Background Art
[0002] The current dot matrix smart pen can digitize the text or graphic content on the paper in real time while writing, and upload the data to the terminal device. This type of smart pen can use the built-in optical sensor and digital processing technology to capture the user's drawing action on the paper in real time and convert it into a digital image or data. The specific principle is that light scans the dot matrix pattern or texture on the paper in real time through the optical sensor. Then the built-in processor converts the scanned data from the optical sensor into a digital signal and transmits it to the terminal, which then sends it to other smart devices or displays for real-time display.
[0003] In order to better identify students' writing movements, it is usually necessary to capture the writing force when writing, but the pressure value cannot be obtained by relying solely on optical sensors. For this reason, some smart pens use additional pressure sensors for data collection, such as CN207388696U "A refill fixing device for a smart pen" "The refill bracket 3 has a first opening 302 for placing the first magnet 4, and the pen body bracket 2 has a second opening 205 for placing the second magnet 5. The first magnet 4 and the second magnet 5 are coaxial after being placed, with the same poles facing each other, and repulsive force is generated against each other." However, there is a section of the journey where the pressure value cannot be collected. At the same time, due to dust or fatigue of the sensor after long-term use, the data is deviated and cannot be automatically calibrated. At the same time, this type of smart pen has a slight knocking sound when writing, which will affect students' attention. Summary of the invention
[0004] In view of the above problems, the present invention aims to provide a processing method, device and medium for writing data.
[0005] To achieve the technical purpose, the solution of the present invention is: a method for processing written data, the method is executed by a smart pen, the smart pen includes a pen core, a camera, an action mechanism, a magnet assembly and a pressure sensor, the method includes:
[0006] After the smart pen is started, the pressure sensor continuously collects and obtains the real-time pressure value F at a specified time interval, and collects and records the real-time pressure value after holding the pen and before writing as the adsorption pressure value F0;
[0007] Start the camera to enter the writing state, and the camera begins to collect handwriting data in real time; when the real-time pressure value F is greater than the adsorption pressure value F0 and keeps changing, it means that the smart pen is in a continuous writing state; when the real-time pressure value F does not change for more than a preset time, it means that the smart pen has exited the writing state.
[0008] Preferably, the smart pen records writing pressure data and collection time in real time, the writing pressure value in the writing pressure data is F1, and the writing pressure value F1=F-F0; the obtained handwriting data, collection time, and writing pressure data are sent to the terminal device through the communication module, and the data is transmitted to the server through the terminal device or the written content is displayed on the display screen.
[0009] Preferably, when the real-time pressure value F is less than or equal to F0, the pen core is not writing; when F is greater than F0, the pen enters the writing state and performs the writing action, and the pen core applies additional pressure to the pressure sensor through the action mechanism.
[0010] Preferably, the handwriting data and writing pressure data are analyzed by the server, the handwriting is first segmented graphically to obtain single text data and single graphic data, the single text data is segmented according to the real-time pressure value F=F0 as a separation node to obtain stroke data, the part of the single text data where the real-time pressure value F is greater than F0 and the handwriting is missing is completed to obtain broken stroke data, and the single text data, broken stroke data and stroke data are aggregated to perform text analysis to obtain the corresponding recognized text;
[0011] The part of the single graphic data where the real-time pressure value F is greater than F0 and lacks writing handwriting is completed to obtain the broken line data, and the broken line data is merged and completed into the single graphic data to obtain the corresponding recognition graphic.
[0012] Preferably, when writing, the magnet assembly always keeps the pressure-sensitive adhesive on the pressure sensor pressed tightly, the change rate of the distance between the two magnets in the magnet assembly is less than 1%, and the change value of the adsorption pressure value F0 is also less than 1%.
[0013] As a preferred embodiment, when the strokes in the stroke data obtained by separating a single character data according to the real-time pressure value F=F0 as the separation node cannot match the standard strokes, there is a connected stroke, and the average value of all the real-time pressure values of the strokes in the initial screening is obtained to obtain F avg , eliminate the F less than k* F avg After obtaining the writing handwriting corresponding to the real-time pressure value, the second-screen strokes are matched with the standard strokes again. k is the stroke coefficient, and the value range of k is 0-1.
[0014] An intelligent writing device using a processing method for writing data, characterized in that it comprises:
[0015] A trigger module is used to trigger the pressure sensing module and shorten the stroke by mutual adsorption of magnets;
[0016] A pressure sensing module is used to collect writing pressure data; a visual acquisition module is used to collect handwriting data;
[0017] A communication module, used for transmitting the collected handwriting data and writing pressure data to the terminal device;
[0018] The graphical segmentation and correction module performs graphical segmentation processing on the obtained handwriting data to obtain independent single text data and single graphic data; combines the real-time pressure value data to obtain the stroke composition characteristics and sequence characteristics of the single text data, and completes the broken strokes or broken lines that appear when the real-time pressure value F is greater than F0 to obtain the corresponding recognized text and recognized graphics;
[0019] The correction module continuously collects and obtains the real-time pressure value through the pressure sensor every time the smart pen is started. The real-time pressure value after holding the pen and before writing is collected and recorded as the adsorption pressure value F0 to correct the pressure deviation of the pressure sensor.
[0020] A computer-readable storage medium stores computer instructions for causing the computer to execute the aforementioned processing method for writing data.
[0021] The beneficial effects of the present invention are as follows: the method of the present application can conveniently correct the line of sight pressure and effectively solve the measurement error caused by dust or fatigue deformation of the pressure sensor; at the same time, the present application adopts the method of mutual adsorption of magnets, the movable stroke of the pen core is very short, no impact sound is generated, and the pressure value detection is more accurate. DETAILED DESCRIPTION
[0022] The present invention is further described in detail below with reference to specific embodiments.
[0023] The specific embodiment of the present invention is a method for processing written data, which is executed by a smart pen. The smart pen includes a pen core, a camera, an action mechanism, a magnet assembly and a pressure sensor. The specific steps are as follows:
[0024] S101, after the smart pen is started, the pressure sensor is allowed to continuously collect and obtain the real-time pressure value F at a specified time interval, and the real-time pressure value after holding the pen and before writing is collected and recorded as the adsorption pressure value F0 to complete the initialization calibration (generally, the real-time pressure value F collected after the pen cap is opened and before the pen core is not subjected to force is used as the adsorption pressure value F0, and the best collection state is to collect when the pen is placed horizontally and still);
[0025] S102, start the camera to enter the writing state, and the camera starts to collect handwriting data in real time; when the real-time pressure value F is greater than the adsorption pressure value F0 and keeps changing, it means that the smart pen is in a continuous writing state; when the real-time pressure value F does not change for more than a preset time, it means that the smart pen exits the writing state. When the real-time pressure value F is less than or equal to F0, the pen core is not writing at this time, and it is considered that the pressure sensor is only affected by the magnetic adsorption force of the magnet assembly at this time; when F is greater than F0, it enters the writing state and performs the writing action, and the pen core applies additional pressure to the pressure sensor through the action mechanism.
[0026] S103, the smart pen records the writing pressure data and collection time in real time, the writing pressure value in the writing pressure data is F1, and the writing pressure value F1=F-F0; the obtained handwriting data, collection time, and writing pressure data are sent to the terminal device through the communication module, and the terminal device transmits the data to the server or displays the writing content on the display screen. When the pen changes from a flat state to a vertical state, F1 may be negative due to the gravity of the pen core; of course, due to the friction between the pen barrel and the pen core, this effect can usually be ignored; F0≫F G -F 摩 , F G is the weight of the pen core, F 摩 is the friction force on the pen core from the side wall of the pen barrel). In actual calculation, the real-time pressure value F=F0, that is, F1=0 is used as the separation node (threshold); when F is less than F0, F1 is not calculated; when F=F0, F1=0; when F is greater than F0 (F1>0), F1=F-F0.
[0027] S104, analyze the handwriting data and writing pressure data through the server, firstly process the handwriting through graphical segmentation to obtain single text data and single graphic data, separate the single text data according to the real-time pressure value F=F0 as the separation node to obtain stroke data, complete the part of the single text data where the real-time pressure value F is greater than F0 and lacks handwriting to obtain broken stroke data, summarize the single text data, broken stroke data and stroke data and perform text analysis to obtain the corresponding recognized text; complete the part of the single graphic data where the real-time pressure value F is greater than F0 and lacks handwriting to obtain broken line data, merge and complete the broken line data into the single graphic data to obtain the corresponding recognized graphic. When the stroke data obtained by separating the single text data according to the real-time pressure value F=F0 as the separation node cannot match the standard strokes, there is a connected stroke, and the average value of all the real-time pressure values in the initial screening strokes is obtained to obtain F avg , eliminate the F less than k* F avg After obtaining the writing handwriting corresponding to the real-time pressure value, the second-screen strokes are matched with the standard strokes again. k is the stroke coefficient, and the value range of k is 0-1.
[0028] When writing, the magnet assembly always keeps the pressure-sensitive adhesive on the pressure sensor pressed tightly, the distance change rate between the two magnets in the magnet assembly is less than 1%, and the change value of the adsorption pressure value F0 is also less than 1%.
[0029] Embodiment 1
[0030] The smart pen of the present application includes a pen core, an action mechanism, a pressure sensor and a magnet assembly (one on the action mechanism and one behind the pressure sensor fixing mechanism); wherein the pressure sensor is composed of two films coated with pressure-sensitive adhesive in wireless proximity); the pen core is inserted into the action mechanism before use. A magnet is installed on the action mechanism (the magnet is opposite to the rear magnet on the pressure sensor fixing mechanism, NS / SN, and the magnetic lines are orthogonal); the pressure sensor is fixed on the fixing mechanism; there are two magnetic poles with different magnetic properties on both sides of the pressure sensor. The method of the present application can solve the automatic calibration and zeroing of the pressure sensor; and can improve the accuracy of the pressure sensor (calibration and zeroing), and reduce the tension caused by the reverse deformation of the pressure sensor to zero. At the same time, compared with the traditional solution, the deformation distance of the present application is smaller (magnetic poles attract each other). When a given external force is applied to the pen, the sufficiently small movement distance of the action mechanism can be transmitted to the pressure sensor and the pressure change can be measured, and the magnetic attraction force is almost unchanged; similarly, when the given external force is withdrawn, the sufficiently small movement distance of the action mechanism can also be measured by the pressure sensor.
[0031] Correction design can realize automatic pressure calibration and zeroing. In this method, the movement distance is small enough, so NS or SN is used for mutual attraction instead of NN and SS for mutual repulsion; there is no empty stroke and no impact sound.
[0032] When used, first measure the initial pressure F0. The first test pressure is defined as F a The second test pressure is defined as F b When measuring pressure F a >F0 is the pressure received, F1 is the pressure received = F a -F0. When measuring pressure: F b >F a > F0----pressure increases; when measuring pressure: F b <F a > F0----pressure decreases.
[0033] If you need to measure accurately, you need to calibrate F0 to zero. After calibrating F0 to zero, calculation and judgment will be much simpler. b -F a >0 pressure increases; F b -F a <0 pressure becomes smaller. The calibration zeroing calculation of the present application method is simple.
[0034] The distance change NS and SN pressure can make the two films of the pressure sensor touch each other. The distance is 0 and the pressure is F0. Therefore, as long as the pen core is subjected to force (the movement distance is very small), the pressure will change to 0. Pressure sensor: It is composed of two films coated with pressure-sensitive adhesive (pressure-sensitive adhesive is a kind of protective material with impedance inversely proportional to pressure. When there is no pressure, the impedance is close to infinity. As the pressure changes, the impedance decreases until it is fully conductive). After the pressure is calibrated, it approaches zero (zero return) and the distance between the action mechanism and the pressure film approaches zero.
[0035] When there is no external pressure on the pen core, the pressure sensor can collect F0 (initial pressure) because the magnetic lines of force of the two magnets are orthogonal. Since the pressure accuracy is not consistent after the pressure sensor is manufactured and assembled, it needs to be calibrated (just like a balance, it needs to be zeroed and calibrated before use). After using it for a period of time, the pressure sensor will also cause pressure deviations due to dust, fatigue, etc. This method is to read a static pressure each time after turning on the machine and before use, to dynamically correct the pressure offset that occurs during the collection. Use a magnet to apply pressure to the pressure sensor to solve the problem of the increase in measuring distance caused by the reverse deformation of the pressure sensor caused by dust and fatigue.
[0036] An intelligent writing device using a processing method for writing data is characterized in that it includes: a trigger module, which is used to trigger a pressure sensing module and shorten the stroke by mutual adsorption of magnets; a pressure sensing module, which is used to collect writing pressure data; a visual acquisition module, which is used to collect handwriting data; a communication module, which is used to transmit the collected handwriting data and writing pressure data to a terminal device; a graphical segmentation and correction module, which performs graphical segmentation processing on the obtained handwriting data to obtain independent single text data and single graphic data; obtains the stroke composition characteristics and sequence characteristics of the single text data in combination with real-time pressure value data, and completes the broken pen or broken line that occurs when the real-time pressure value F is greater than F0 to obtain the corresponding recognized text and recognized graphics; a correction module, which continuously collects the real-time pressure value through the pressure sensor each time the intelligent pen is started, collects and records the real-time pressure value after holding the pen and before writing as the adsorption pressure value F0, so as to correct the pressure deviation of the pressure sensor.
[0037] A computer-readable storage medium stores computer instructions for causing the computer to execute the aforementioned processing method for writing data.
[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any slight modification, equivalent substitution and improvement made to the above embodiment based on the technical essence of the present invention should be included in the protection scope of the technical solution of the present invention.
Claims
1. A method for processing written data, characterized in that: The method is performed by a smart pen, the smart pen includes a pen core, a camera, an action mechanism, a magnet assembly and a pressure sensor, and the method includes: After the smart pen is started, the pressure sensor continuously collects and obtains the real-time pressure value F at a specified time interval, and collects and records the pressure value after holding the pen and before writing as the adsorption pressure value F0; Start the camera to enter the writing state, and the camera begins to collect handwriting data in real time; when the real-time pressure value F is greater than the adsorption pressure value F0 and keeps changing, it means that the smart pen is in a continuous writing state; when the real-time pressure value F does not change for more than a preset time, it means that the smart pen has exited the writing state.
2. The method for processing written data according to claim 1, characterized in that: The smart pen records writing pressure data and collection time in real time, the writing pressure value in the writing pressure data is F1, and the writing pressure value F1=F-F0; the obtained handwriting data, collection time, and writing pressure data are sent to the terminal device through the communication module, and the data is transmitted to the server through the terminal device or the writing content is displayed on the display screen.
3. The method for processing written data according to claim 2, characterized in that: When the real-time pressure value F is less than or equal to F0, the pen core is not writing; when the real-time pressure value F is greater than F0, it enters the writing state and performs the writing action, and the pen core applies additional pressure to the pressure sensor through the action mechanism.
4. The method for processing written data according to claim 2, characterized in that: The handwriting data and writing pressure data are analyzed by the server. The handwriting is first segmented graphically to obtain single character data and single graphic data. The single character data is segmented according to the pressure value F=F0 as a separation node to obtain stroke data. The part of the single character data where the real-time pressure value F is greater than F0 and lacks handwriting is completed to obtain broken stroke data. The single character data, broken stroke data and stroke data are aggregated and then analyzed to obtain the corresponding recognized characters. The part of the single graphic data where the real-time pressure value F is greater than F0 and lacks writing handwriting is completed to obtain the broken line data, and the broken line data is merged and completed into the single graphic data to obtain the corresponding recognition graphic.
5. The method for processing written data according to claim 3, characterized in that: When writing, the magnet assembly always keeps the pressure-sensitive adhesive on the pressure sensor pressed tightly, the distance change rate between the two magnets in the magnet assembly is less than 1%, and the change value of the adsorption pressure value F0 is also less than 1%.
6. The method for processing written data according to claim 4, characterized in that: When the strokes in the stroke data obtained by separating a single character data according to the real-time pressure value F=F0 as the separation node cannot match the standard strokes, there is a connected stroke, and the average value of all the real-time pressure values of the strokes in the initial screening is obtained to obtain F avg , eliminate the F less than k*F avg After obtaining the writing handwriting corresponding to the pressure value of , the second-screen strokes are matched with the standard strokes again. k is the stroke coefficient, and the value range of k is 0-1.
7. An intelligent writing device using the method for processing writing data as claimed in any one of claims 1 to 6, characterized in that: include: A trigger module is used to trigger the pressure sensing module and shorten the stroke by mutual adsorption of magnets; A pressure sensing module, used to collect writing pressure data; Visual acquisition module, used to collect handwriting data; A communication module, used for transmitting the collected handwriting data and writing pressure data to the terminal device; The graphical segmentation and correction module performs graphical segmentation processing on the obtained handwriting data to obtain independent single text data and single graphic data; combines the real-time pressure value data to obtain the stroke composition characteristics and sequence characteristics of the single text data, and completes the broken strokes or broken lines that appear when the real-time pressure value F is greater than F0 to obtain the corresponding recognized text and recognized graphics; The correction module continuously collects the real-time pressure value through the pressure sensor every time the smart pen is started, collects and records the real-time pressure value after holding the pen and before writing as the adsorption pressure value F0, which is used to correct the pressure deviation of the pressure sensor.
8. A computer-readable storage medium storing computer instructions for causing the computer to execute the processing method for writing data as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Refill fixing device of intelligence pen
CN207388696U
Electronic handwriting pen with function of detecting pressure value
CN101727218A
Handwriting display method and system, smart terminal and smart writing system
CN107481299A
Optical array pen
CN107728813A
Intelligent pen, using method thereof and handwriting set system
CN111309163A