Smart pen data acquisition method, smart pen control system, medium and product
By using infrared imaging technology and preset coding rules in intelligent writing devices, the problem of electromagnetic induction technology being disturbed by external interference is solved, and data acquisition and transmission with high stability and accuracy is achieved.
Patent Information
- Application Number
- CN202411691800.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing intelligent writing equipment, electromagnetic induction technology is susceptible to external electromagnetic interference, resulting in unstable data acquisition and reducing the accuracy of data acquisition.
Using infrared imaging technology, the pen tip image is taken through an infrared camera when the pen tip pressure is detected, the code point data is determined, and the code point data is analyzed through preset encoding rules to obtain writing information, including page numbers and coordinate values.
It improves the stability and reliability of data collection, realizes accurate recording of writing locations and contents, and transmits data in real time through Bluetooth, ensuring the timeliness and completeness of the data.
Smart Images

Figure CN119672721A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data collection, and in particular to a smart pen data collection method, a smart pen control system, a medium and a product. Background Art
[0002] With the rapid development of information technology, people have an increasing demand for electronic processing of paper documents. Especially in office and education scenarios, users need to quickly convert handwritten text, charts and other content into electronic information for storage, sharing and editing. This demand for digitizing traditional paper writing content has promoted the research and development and application of smart writing devices.
[0003] At present, smart writing devices mainly use a special writing board with an electromagnetic pen to realize the digitization of handwritten content. That is, a signal connection is established between the electromagnetic pen and the special writing board through electromagnetic induction. The special writing board has a built-in electromagnetic induction grid that can capture the electromagnetic signals emitted by the electromagnetic pen and convert the electromagnetic signals into coordinate data, thereby realizing the digital recording of handwritten content.
[0004] However, electromagnetic induction technology is easily interfered by external electromagnetic fields. When there is a strong electromagnetic interference source in the environment, it is easy to cause unstable data collection, thereby reducing the accuracy of data collection. Summary of the invention
[0005] The present application provides a smart pen data collection method, a smart pen control system, a medium and a product for improving the accuracy of data collection.
[0006] In a first aspect, the present application provides a smart pen data collection method, which is applied to a smart pen control system, the method comprising: when the pen tip pressure is detected, controlling the infrared camera to shoot the pen tip at a preset shooting frequency to obtain multiple continuous pen tip images within a preset time length, the pen tip pressure is measured by the pressure sensor of the pen tip; based on the pen tip image, determining the minimum data unit where the pen tip is located, the minimum data unit includes different arrangements of a preset first number of points; according to the dot matrix arrangement in the minimum data unit, determining code point data, the code point data is used to represent a preset second number of binary codes; according to a preset coding rule, extracting a first binary number at a preset first position and a second binary number at a preset second position from the preset second number of binary codes, the first binary number is used to represent the page number where the pen tip is located, and the second binary number is used to represent the coordinate value of the pen tip in the page number; determining the writing information of the pen tip within the preset time length through the first binary number and the second binary number corresponding to multiple continuous pen tip images, the writing information includes the writing position and the writing content; when connecting to a Bluetooth device, outputting the writing information.
[0007] By adopting the above technical solution, first, when the smart pen control system detects the pen tip pressure, it starts the infrared camera to shoot and obtains multiple continuous pen tip images within a preset time. Then, the smart pen control system determines the code point data through the pen tip image. Next, the smart pen control system collects writing information through multiple continuous code point data. Compared with the electromagnetic induction between the electromagnetic pen and the dedicated writing board, this method uses infrared imaging, which is not affected by external electromagnetic interference, greatly improving the stability and reliability of data collection; by parsing the code point data through preset coding rules, the page number information and precise coordinate values can be obtained at the same time, realizing accurate recording of the writing position and writing content. Finally, the smart pen control system transmits writing information in real time via Bluetooth, ensuring the timeliness and integrity of the data.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the code point data is determined based on the dot matrix arrangement in the minimum data unit, and the code point data is used to represent a preset second number of binary codes, specifically including: identifying the arrangement pattern of each point in the minimum data unit; querying the code point data that matches the arrangement pattern of the each point in the minimum data unit from a preset code point reference database, and the preset code point reference database includes different code point data for different minimum data units.
[0009] By adopting the above technical solution, the smart pen control system realizes the accurate conversion of the arrangement pattern of each point in the minimum data unit to the code point data through the preset code point reference database, which reduces the complexity of real-time calculation, improves recognition efficiency, and ensures the accuracy of decoding. In addition, the preset code point reference database is easy to expand and optimize later, and can be updated to support new encoding rules, which has good maintainability.
[0010] In combination with some embodiments of the first aspect, in some embodiments, the first binary number and the second binary number corresponding to multiple continuous pen tip images are used to determine the writing information of the pen tip within the preset time length, and the writing information includes the writing position and the writing content, specifically including: calculating the writing position of the pen tip based on multiple groups of adjacent first binary numbers; determining the coordinate value corresponding to the first second binary number within the preset time length as the writing start point; determining the coordinate value corresponding to the last second binary number within the preset time length as the writing end point; and determining the writing content based on the change in coordinate values between the writing start point and the writing end point.
[0011] By adopting the above technical solution, the smart pen control system reconstructs the writing trajectory based on the continuous sampling data to determine the writing content, thereby improving the accuracy of data collection. Moreover, this method can not only record the static writing content, but also reflect the dynamic writing process, providing rich data support for subsequent handwriting analysis.
[0012] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the writing information of the pen tip within the preset time length through the first binary number and the second binary number corresponding to multiple continuous pen tip images, wherein the writing information includes the writing position and the writing content, the method further includes: obtaining pressure time series data according to the pressure value collected by the pressure sensor of the pen tip at the preset shooting frequency within the preset time length; synchronizing the pressure time series data with the multiple continuous pen tip images in time to obtain the pressure value corresponding to each of the pen tip images; dividing the writing content into multiple stroke units according to the changing trend of the pressure value, and the stroke unit is used to indicate the start of the stroke to the end of the stroke, wherein the pressure value changes from zero to one to indicate the start of the stroke, and the pressure value changes from one to none to indicate the end of the stroke; determining the number, handwriting pressure, handwriting order and handwriting speed of each stroke unit: storing the number, handwriting pressure, handwriting order and handwriting speed of each stroke unit in chronological order.
[0013] By adopting the above technical solution, the smart pen control system synchronizes the pressure time series data with multiple continuous pen tip images to achieve refined feature extraction of the writing process. This multi-dimensional feature extraction method provides a rich data foundation for subsequent handwriting analysis, user identification and writing behavior research.
[0014] In combination with some embodiments of the first aspect, in some embodiments, before the step of controlling the infrared camera to photograph the pen tip at a preset shooting frequency to obtain multiple continuous pen tip images within a preset time length when the pen tip pressure is detected, the method also includes: obtaining the current battery level of the smart pen; if the current battery level is lower than a preset battery threshold, issuing a battery level prompt message.
[0015] By adopting the above technical solutions, the smart pen control system effectively solves the problem of power management during the use of the smart pen through power monitoring and early warning mechanisms. Power detection is performed before starting data collection, and by presetting power thresholds and power prompt information, users can understand the power status of the smart pen in advance and arrange the use time reasonably to reduce the risk of data collection interruption caused by sudden power outages, thereby improving the reliability of the smart pen control system and user experience.
[0016] In combination with some embodiments of the first aspect, in some embodiments, before the step of outputting the written information when connecting to a Bluetooth device, the method further includes: storing the written information when it is detected that no Bluetooth device is connected.
[0017] By adopting the above technical solution, the smart pen control system solves the data security problem when the Bluetooth device connection is unstable or there is no Bluetooth device connection through an offline storage mechanism, ensuring that data will not be lost due to communication interruption, improving the fault tolerance of the smart pen control system, and enhancing the reliability of the data collection process.
[0018] In combination with some embodiments of the first aspect, in some embodiments, after the step of outputting the written information when connecting to the Bluetooth device, the method also includes: receiving a reissue request issued by the Bluetooth device, the reissue request including a reissue time period; retrieving historical writing information within the reissue time period; compressing the historical writing information to generate multiple compressed data fragments; and sending the multiple compressed data fragments to the Bluetooth device in sequence according to a preset transmission protocol.
[0019] By adopting the above technical solution, the smart pen control system realizes on-demand transmission of historical data through a data reissue mechanism, allowing users to flexibly obtain the required data. Through data compression and fragmented transmission, it not only ensures the efficiency of large-scale data transmission, but also ensures the stability of the data transmission process.
[0020] In a second aspect, an embodiment of the present application provides a smart pen control system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the smart pen control system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a smart pen control system, the smart pen control system executes the method described in the first aspect and any possible implementation method of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on a smart pen control system, the smart pen control system executes the method described in the first aspect and any possible implementation method of the first aspect.
[0023] It can be understood that the smart pen control system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By adopting the above technical solution, first, when the smart pen control system detects the pen tip pressure, it starts the infrared camera to shoot and obtains multiple continuous pen tip images within a preset time. Then, the smart pen control system determines the code point data through the pen tip image. Next, the smart pen control system collects writing information through multiple continuous code point data. Compared with the electromagnetic induction between the electromagnetic pen and the dedicated writing board, this method uses infrared imaging, which can be unaffected by external electromagnetic interference, greatly improving the stability and reliability of data collection; by parsing the code point data through preset coding rules, the page number information and precise coordinate values can be obtained at the same time, realizing accurate recording of the writing position and writing content. Finally, the smart pen control system transmits writing information in real time via Bluetooth, ensuring the timeliness and integrity of the data.
[0025] 2. By adopting the above technical solution, the smart pen control system realizes the accurate conversion of the arrangement pattern of each point in the minimum data unit to the code point data through the preset code point reference database, which reduces the complexity of real-time calculation, improves the recognition efficiency, and ensures the accuracy of decoding. In addition, the preset code point reference database is convenient for later expansion and optimization, and can be updated to support new encoding rules, with good maintainability.
[0026] 3. By adopting the above technical solution, the smart pen control system synchronizes the pressure time series data with multiple continuous pen tip images to achieve refined feature extraction of the writing process. This multi-dimensional feature extraction method provides a rich data foundation for subsequent handwriting analysis, user identification and writing behavior research. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flow chart of the smart pen data collection method in the embodiment of the present application; Figure 2 is another flowchart of the smart pen data collection method in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of a smart pen control system in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0030] The following is a description of the process of the method provided by this implementation. Figure 1 , which is a flow chart of the smart pen data collection method in an embodiment of the present application.
[0031] S101, when the pen tip pressure is detected, controlling the infrared camera to shoot the pen tip at a preset shooting frequency to obtain a plurality of continuous pen tip images within a preset time length, the pen tip pressure being measured by a pressure sensor of the pen tip; Among them, the pen tip is used to represent the writing end of the smart pen; the pen tip pressure refers to the vertical pressure value generated when the pen tip contacts the writing plane during the writing process; the pressure sensor refers to the sensing element installed at the pen tip for measuring the pen tip pressure; the infrared camera refers to the camera device for taking infrared images; the preset shooting frequency refers to the image acquisition interval preset by the smart pen control system, usually tens to hundreds of times per second; the preset duration refers to the duration of a continuous sampling preset by the smart pen control system; the pen tip image refers to the image of the pen tip and its surrounding area obtained by the infrared camera.
[0032] Specifically, the smart pen control system monitors the pen tip pressure in real time through the pen tip pressure sensor. When the pen tip pressure value exceeds the preset pen tip pressure trigger threshold, the infrared camera is immediately activated. The infrared camera continuously shoots the pen tip and its surrounding area at a preset shooting frequency (such as 100 times per second), and obtains a set of continuous pen tip images within a preset time (such as 0.5 seconds). Each pen tip image clearly records the infrared imaging information of the pen tip and its surrounding area.
[0033] S102, based on the pen tip image, determining a minimum data unit where the pen tip is located, the minimum data unit including different arrangements of a preset first number of points; Among them, the minimum data unit refers to the smallest image area that contains complete coding information; the preset first number refers to the number of coding points in each minimum data unit pre-set by the smart pen control system; different arrangements of points refer to different spatial distribution methods of coding points in the minimum data unit; coding points refer to special marking points used to carry information.
[0034] Specifically, first, the smart pen control system pre-processes the acquired pen tip image, including image enhancement, noise removal and other operations. Then, the smart pen control system extracts a minimum image area containing complete encoding information with the pen tip as the center. This minimum image area is the minimum data unit. The smart pen control system analyzes the specific distribution of the preset first number (such as 16) of encoding points in the minimum image area, including the position, size and relative relationship of each point. These distribution information constitute a unique encoding mode for subsequent information decoding.
[0035] S103, determining code point data according to the dot array arrangement in the minimum data unit, where the code point data is used to represent a preset second number of binary codes; Among them, dot matrix arrangement refers to the matrix distribution of coding points in the smallest data unit; code point data refers to the coding information extracted from the dot matrix arrangement; the preset second number refers to the number of bits of the binary code pre-set by the smart pen control system; the binary code is a digital sequence composed of 0 and 1; matrix distribution refers to the regular grid arrangement of points.
[0036] Specifically, first, the smart pen control system analyzes the dot array arrangement in the smallest data unit to identify the existence and relative position relationship of each dot. Then, the smart pen control system converts the identified dot array arrangement into specific code point data according to the preset coding rules. These code point data will eventually be converted into binary codes of a preset second length (such as 32 bits), and each binary bit carries specific page number information or precise coordinate values. The smart pen control system completes this conversion by table lookup or calculation to ensure accurate extraction of the coded information.
[0037] Optionally, in general, code point data is determined based on the dot matrix arrangement in the minimum data unit, and the code point data is used to represent a preset second number of binary codes, which can be implemented in the following manner, which is not limited here: identifying the arrangement pattern of each point in the minimum data unit; querying code point data that matches the arrangement pattern of each point in the minimum data unit from a preset code point reference database, and the preset code point reference database includes different code point data corresponding to different minimum data units.
[0038] S104, extracting a first binary number at a preset first position and a second binary number at a preset second position from the preset second number of binary codes according to a preset coding rule, wherein the first binary number is used to indicate the page number where the pen tip is located, and the second binary number is used to indicate the coordinate value of the pen tip in the page number; Among them, the preset coding rules refer to the binary code segmentation and parsing scheme pre-established by the smart pen control system; the preset second number of binary codes refers to a complete binary data sequence; the first binary number preset at the first position refers to a binary bit interval for storing page number information; the second binary number preset at the second position refers to a binary bit interval for storing coordinate information; the first binary number refers to a binary data segment representing a page number; the second binary number refers to a binary data segment representing coordinates; the page number indicates the paper number on which the written content is located; the coordinate value refers to the specific position information of the pen tip on a specific page.
[0039] Specifically, first, the smart pen control system determines the segmentation method of the binary code according to the preset coding rules. For example, in a 32-bit binary code, the first 8 bits are used as the preset first position to store the page number information, and the last 24 bits are used as the preset second position to store the coordinate information. Then, the smart pen control system accurately extracts the data of these two positions from the complete binary data sequence. For the first binary number, the smart pen control system converts it into a decimal value as a page number identifier; for the second binary number, the smart pen control system parses it into specific coordinate values of the X-axis and the Y-axis to locate the precise position of the pen tip on the page.
[0040] S105, determining writing information of the pen tip within the preset time period by using the first binary number and the second binary number corresponding to a plurality of consecutive pen tip images, the writing information including the writing position and the writing content; Among them, continuous pen tip images refer to a series of image sequences obtained within a preset time length; writing information refers to a complete record of the writing process; the writing position represents the spatial distribution of handwriting on the paper; the writing content refers to the specific writing result obtained by handwriting reconstruction; the preset time length represents the time span of a continuous sampling.
[0041] Specifically, first, the smart pen control system arranges all the pen tip images acquired within a preset time length (such as 0.5 seconds) in chronological order, and extracts the page number information and coordinate information corresponding to each pen tip image. The smart pen control system determines the specific page where the writing occurs by analyzing continuous page number information, and determines the pen tip movement trajectory by analyzing continuous coordinate information. By calculating the displacement and direction between adjacent coordinate points, the smart pen control system can reconstruct the complete writing trajectory. At the same time, the smart pen control system will also combine information such as writing speed and acceleration to smooth the reconstructed writing trajectory to make it more consistent with actual writing characteristics. Finally, the smart pen control system converts the reconstructed writing trajectory into recognizable writing content and records its precise writing position.
[0042] Optionally, in general, the writing information of the pen tip within the preset time length is determined by the first binary number and the second binary number corresponding to multiple consecutive pen tip images. The writing information including the writing position and the writing content can be achieved in the following manner, which is not limited here: calculating the writing position of the pen tip based on multiple groups of adjacent first binary numbers; determining the coordinate value corresponding to the first second binary number within the preset time length as the writing start point; determining the coordinate value corresponding to the last second binary number within the preset time length as the writing end point; and determining the writing content based on the change in coordinate values between the writing start point and the writing end point.
[0043] S106: When connecting to a Bluetooth device, output the written information.
[0044] Among them, the Bluetooth device refers to a receiving terminal that can establish a wireless connection with the smart pen; the written information refers to the complete data packet that needs to be transmitted; and the data packet refers to an information unit organized in a specific format.
[0045] Specifically, first, the smart pen control system verifies the validity of the Bluetooth connection and confirms that the connected Bluetooth device has the authority to receive data. Then, the smart pen control system encapsulates the writing information and generates a data packet in a standard format, which contains complete information such as the writing location, writing content, and writing timestamp. The smart pen control system will select an appropriate transmission rate and data block size to ensure the stability of data transmission. During the transmission process, the smart pen control system will monitor the transmission status in real time. If a transmission error or connection interruption is detected, the data retransmission mechanism will be activated. At the same time, the smart pen control system will keep a backup of the local data until it is confirmed that the data has been completely received.
[0046] By adopting the above technical solution, first, when the smart pen control system detects the pen tip pressure, it starts the infrared camera to shoot and obtains multiple continuous pen tip images within a preset time. Then, the smart pen control system determines the code point data through the pen tip image. Next, the smart pen control system collects writing information through multiple continuous code point data. Compared with the electromagnetic induction between the electromagnetic pen and the dedicated writing board, this method uses infrared imaging, which is not affected by external electromagnetic interference, greatly improving the stability and reliability of data collection; by parsing the code point data through preset coding rules, the page number information and precise coordinate values can be obtained at the same time, realizing accurate recording of the writing position and writing content. Finally, the smart pen control system transmits writing information in real time via Bluetooth, ensuring the timeliness and integrity of the data.
[0047] The following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of the smart pen data collection method in an embodiment of the present application.
[0048] S201, obtaining the current power of the smart pen; Among them, the smart pen refers to an intelligent writing device with data collection function; the current power refers to the remaining power value of the smart pen battery at the time of detection.
[0049] Specifically, first, the smart pen control system collects the voltage value of the smart pen battery through the analog-to-digital conversion circuit. Then, the smart pen control system calculates the actual power value through the preset voltage-power conversion function. The smart pen control system will consider factors such as ambient temperature and battery aging to compensate and correct the power calculation results. Finally, the smart pen control system converts the power value into a percentage form (such as 85%) and stores it. This process is usually completed within a few milliseconds to ensure that the actual status of the current power of the smart pen can be reflected in a timely manner.
[0050] S202, if the current power level is lower than a preset power level threshold, a power level reminder message is issued; The preset power threshold refers to the power warning value preset by the smart pen control system; and the power prompt information refers to the low power warning issued by the smart pen control system to the user.
[0051] Specifically, first, the smart pen control system compares the current power level with the preset power threshold (such as 20%). When it is detected that the current power level is lower than the preset power threshold, the smart pen control system will select the corresponding warning level according to the current power level. For example, a primary warning is issued when the current power level is between 15% and 20%, and an emergency warning is issued when the current power level is lower than 15%. The smart pen control system can issue power prompt information in a variety of ways, such as flashing LED indicators, vibrating prompts, or sending messages to paired devices.
[0052] S203, when the pen tip pressure is detected, controlling the infrared camera to shoot the pen tip at a preset shooting frequency to obtain a plurality of continuous pen tip images within a preset time length, the pen tip pressure being measured by a pressure sensor of the pen tip; For details, please refer to step S101, which will not be described in detail here.
[0053] S204, based on the pen tip image, determining a minimum data unit where the pen tip is located, the minimum data unit including different arrangements of a preset first number of points; For details, please refer to step S102, which will not be described in detail here.
[0054] S205, determining code point data according to the dot array arrangement in the minimum data unit, where the code point data is used to represent a preset second number of binary codes; For details, please refer to step S103, which will not be described in detail here.
[0055] S206, extracting a first binary number at a preset first position and a second binary number at a preset second position from the preset second number of binary codes according to a preset coding rule, wherein the first binary number is used to indicate the page number where the pen tip is located, and the second binary number is used to indicate the coordinate value of the pen tip in the page number; For details, please refer to step S104, which will not be described in detail here.
[0056] S207, determining writing information of the pen tip within the preset time period by using the first binary number and the second binary number corresponding to a plurality of consecutive pen tip images, the writing information including the writing position and the writing content; For details, please refer to step S105, which will not be described in detail here.
[0057] S208, obtaining pressure time series data according to the pressure value collected by the pressure sensor of the pen tip at the preset shooting frequency within the preset time period; Among them, the preset shooting frequency refers to the data sampling interval preset by the smart pen control system; the pressure value refers to the value of the pen tip pressure detected by the pressure sensor in real time; and the pressure time series data refers to the sequence of pressure values arranged in chronological order.
[0058] Specifically, first, the smart pen control system sets the sampling clock of the pressure sensor according to the preset shooting frequency (such as 100 times per second). Within the preset duration (such as 0.5 seconds), the smart pen control system continuously collects the pen tip pressure at a fixed sampling interval. Each sampling point contains an accurate timestamp and the corresponding pressure value. The smart pen control system organizes these time-stamped pressure data into pressure time series data in the order of collection, and performs preliminary data filtering to remove possible noise interference.
[0059] S209, performing time synchronization on the pressure time series data and the plurality of continuous pen tip images to obtain a pressure value corresponding to each of the pen tip images; Among them, continuous pen tip images refer to a sequence of images collected within the same time period; time synchronization refers to the correspondence between pressure data and image data in the time dimension; and the corresponding pressure value represents the actual pen tip pressure value at the moment each pen tip image is collected.
[0060] Specifically, first, the smart pen control system extracts the timestamps of the pressure time series data and the pen tip image. By comparing the timestamps, the smart pen control system establishes a one-to-one correspondence between the pressure data points and the image frames. If the pressure sampling frequency is not completely consistent with the image acquisition frequency, the smart pen control system will calculate the accurate pressure value corresponding to the image acquisition moment through the interpolation algorithm. Finally, the smart pen control system annotates the corresponding pressure value for each pen tip image to form a complete multimodal data sequence.
[0061] S210, dividing the written content into a plurality of stroke units according to a change trend of the pressure value, wherein the stroke unit is used to indicate a stroke start to a stroke end, wherein the pressure value changes from zero to positive to indicate a stroke start, and the pressure value changes from positive to zero to indicate a stroke end; Among them, the changing trend of pressure value refers to the changing pattern of pressure value over time; stroke unit refers to the basic component of a continuous writing; the start of stroke refers to the moment when the pressure value exceeds the preset pen tip pressure trigger threshold for the first time; the end of stroke refers to the moment when the pressure value drops below the preset pen tip pressure trigger threshold; the preset pen tip pressure trigger threshold is the standard pressure value used to judge the start and end of the stroke.
[0062] Specifically, first, the smart pen control system analyzes the time variation curve of the pressure value and identifies the key points where the pressure value changes significantly. The smart pen control system marks the moment when the pressure value rises from below the preset pen tip pressure trigger threshold to above the preset pen tip pressure trigger threshold as the stroke start point, and marks the moment when the pressure value drops from above the preset pen tip pressure trigger threshold to below the preset pen tip pressure trigger threshold as the stroke end point. Based on these key points, the smart pen control system divides the entire writing process into multiple independent stroke units. Each stroke unit contains a complete pressure rise-maintain-drop process.
[0063] S211, determining the number, handwriting pressure, handwriting sequence and handwriting speed of each stroke unit: Among them, the number refers to the unique identification mark of the stroke unit; the handwriting pressure refers to the pressure change data during the stroke process; the handwriting order refers to the order in which the strokes are written; and the handwriting speed refers to the real-time rate of movement of the pen tip.
[0064] Specifically, first, the smart pen control system assigns a unique number to each stroke unit. Then, the smart pen control system calculates the characteristic parameters of each stroke unit: the average value, maximum value and variation range of the handwriting pressure are obtained by analyzing the pressure time series data; the handwriting sequence is determined according to the time sequence of the strokes; and the handwriting speed is calculated based on the change of the pen tip position in adjacent image frames. The smart pen control system also records the start and end time, duration and other time characteristics of each stroke.
[0065] S212, storing the number, handwriting pressure, handwriting sequence and handwriting speed of each stroke unit in chronological order; Specifically, first, the smart pen control system sorts the stroke units in chronological order to ensure the time sequence of the data. Then, the smart pen control system creates a data structure to organize all the characteristic parameters of each stroke unit into a structured data record. These data records contain complete information such as the stroke unit number, handwriting pressure, handwriting sequence and handwriting speed. At the same time, the smart pen control system will back up the data to ensure the security of the information.
[0066] S213, when it is detected that there is no Bluetooth device connected, storing the written information; Specifically, the smart pen control system confirms whether it is currently connected to a Bluetooth device. If the smart pen is not currently connected to any Bluetooth device, the smart pen control system checks the local available space to ensure that there is enough local available space to save new writing information.
[0067] S214, when connecting to a Bluetooth device, outputting the written information; For details, please refer to step S106, which will not be described in detail here.
[0068] S215, receiving a reissue request sent by the Bluetooth device, where the reissue request includes a reissue time period; The retransmission request refers to an instruction from the Bluetooth device to resend data within the retransmission time period; the retransmission time period refers to the start and end time range of the data that needs to be retransmitted.
[0069] Specifically, first, the smart pen control system verifies the legitimacy of the reissue request sent by the Bluetooth device, including checking the format of the reissue request, the validity of the reissue time period, etc. The smart pen control system parses the reissue time period in the reissue request and extracts the start time and end time. If multiple reissue requests are received at the same time, the smart pen control system will queue them according to the priority and time order of the reissue requests.
[0070] S216, searching for historical writing information within the reissue time period; Among them, the reissue time period refers to the time range that the smart pen control system needs to retrieve; the historical writing information refers to the stored writing information.
[0071] Specifically, the smart pen control system locates all data records within the reissue time period. The smart pen control system compares the timestamps of the data records and selects the historical writing information that meets the time range. The smart pen control system also checks the integrity of the historical writing information to ensure that no data is missing or damaged.
[0072] S217, compressing the historical writing information to generate a plurality of compressed data fragments; Among them, data compression refers to the process of reducing the data volume; compressed data fragments refer to the data blocks after data compression.
[0073] Specifically, first, the smart pen control system pre-processes the historical writing information to remove unnecessary redundant information. Then, the smart pen control system uses a preset compression algorithm to compress the historical writing information, which may include lossless compression and lossy compression. The smart pen control system will automatically select the optimal compression scheme based on the data characteristics to achieve the maximum compression ratio while ensuring data quality. The compressed historical writing information will be divided into compressed data slices of a size suitable for transmission, and each compressed data slice contains independent verification information and a serial number identifier.
[0074] S218. Send the multiple compressed data segments to the Bluetooth device in sequence according to a preset transmission protocol.
[0075] Among them, the preset transmission protocol refers to the data transmission rules and formats preset by the smart pen control system; the compressed data fragments refer to the compressed data blocks to be transmitted.
[0076] Specifically, first, the smart pen control system sends the compressed data segments in sequence according to the provisions of the preset transmission protocol. Each time a compressed data segment is sent, the smart pen control system will wait for confirmation information from the receiving end. If no confirmation is received or an error notification is received within a timeout, the smart pen control system will automatically retransmit the compressed data segment. The smart pen control system will dynamically adjust the transmission rate to adapt to the current network conditions. At the same time, the smart pen control system will maintain a data transmission log to record the transmission status and completion time of each compressed data segment. After all compressed data segments are transmitted, the smart pen control system will send a transmission completion flag and wait for the final confirmation from the receiving end.
[0077] The following describes the smart pen control system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , which is a schematic diagram of a physical device structure of a smart pen control system in an embodiment of the present application.
[0078] It should be noted that Figure 3 The structure of the smart pen control system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0079] like Figure 3 As shown, the smart pen control system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other through the bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.
[0080] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0081] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.
[0082] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0084] Specifically, the smart pen control system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the smart pen data collection method provided in the above embodiment is implemented.
[0085] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the smart pen control system described in the above embodiment; or may exist independently without being assembled into the smart pen control system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the smart pen control system, the smart pen control system implements the smart pen data collection method provided in the above embodiment.
[0086] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0087] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0088] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A smart pen data collection method, characterized in that: Applied to a smart pen control system, the method comprises: When the pen tip pressure is detected, the infrared camera is controlled to shoot the pen tip at a preset shooting frequency to obtain a plurality of continuous pen tip images within a preset time period, wherein the pen tip pressure is measured by the pressure sensor of the pen tip; Based on the pen tip image, determining a minimum data unit where the pen tip is located, wherein the minimum data unit includes different arrangements of a preset first number of points; Determining code point data according to the dot array arrangement in the minimum data unit, wherein the code point data is used to represent a preset second number of binary codes; According to a preset coding rule, extracting a first binary number at a preset first position and a second binary number at a preset second position from the preset second number of binary codes, wherein the first binary number is used to indicate the page number where the pen tip is located, and the second binary number is used to indicate the coordinate value of the pen tip in the page number; Determine writing information of the pen tip within the preset time period by using the first binary number and the second binary number corresponding to a plurality of consecutive pen tip images, wherein the writing information includes a writing position and writing content; When the Bluetooth device is connected, the written information is output.
2. The method according to claim 1, characterized in that The determining, according to the dot array arrangement in the minimum data unit, code point data, wherein the code point data is used to represent a preset second number of binary codes, specifically includes: Identify the arrangement pattern of each point in the minimum data unit; Code point data matching the arrangement pattern of each point in the minimum data unit is queried from a preset code point reference database, wherein the preset code point reference database includes different code point data corresponding to different minimum data units.
3. The method according to claim 1, characterized in that: The determining of the writing information of the pen tip within the preset time period by using the first binary number and the second binary number corresponding to a plurality of continuous pen tip images, wherein the writing information includes a writing position and a writing content, specifically includes: Calculating the writing position of the pen tip according to a plurality of adjacent groups of the first binary numbers; Determine the coordinate value corresponding to the first second binary number within the preset time as the writing start point; Determine the coordinate value corresponding to the last second binary number within the preset time as the writing end point; The writing content is determined based on the change in coordinate values between the writing start point and the writing end point.
4. The method according to claim 1, characterized in that: After the step of determining the writing information of the pen tip within the preset time period by using the first binary number and the second binary number corresponding to a plurality of consecutive pen tip images, wherein the writing information includes a writing position and a writing content, the method further includes: Obtaining pressure time series data according to the pressure values collected by the pressure sensor of the pen tip at the preset shooting frequency within the preset time period; Synchronizing the pressure time series data with the plurality of continuous pen tip images to obtain a pressure value corresponding to each of the pen tip images; According to the change trend of the pressure value, the written content is divided into a plurality of stroke units, wherein the stroke unit is used to represent the start of a stroke and the end of a stroke, wherein the pressure value changes from zero to positive to represent the start of the stroke, and the pressure value changes from positive to negative to represent the end of the stroke; Determine the number, writing pressure, writing sequence and writing speed of each stroke unit: The number, handwriting pressure, handwriting sequence and handwriting speed of each stroke unit are stored in chronological order.
5. The method according to claim 1, characterized in that Before the step of controlling the infrared camera to photograph the pen tip at a preset shooting frequency to obtain a plurality of continuous pen tip images within a preset time period when the pen tip pressure is detected, the method further includes: Get the current power of the smart pen; If the current power level is lower than a preset power threshold, a power prompt message is issued.
6. The method according to claim 1, characterized in that Before the step of outputting the written information when connecting to a Bluetooth device, the method further includes: When it is detected that no Bluetooth device is connected, the written information is stored.
7. The method according to claim 1, characterized in that After the step of outputting the written information when connecting to a Bluetooth device, the method further includes: receiving a reissue request sent by the Bluetooth device, wherein the reissue request includes a reissue time period; Retrieving historical writing information within the reissue time period; Compressing the historical written information to generate multiple compressed data slices; According to a preset transmission protocol, the multiple compressed data segments are sent to the Bluetooth device in sequence.
8. A smart pen control system, characterized in that: The smart pen control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the smart pen control system to execute the method described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on the smart pen control system, the smart pen control system executes the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product runs on a smart pen control system, the smart pen control system is enabled to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Handwriting collection method and system
CN111736731A
Lattice book interaction method
CN111914714A
Handwriting recognition system and recognition method based on dot matrix paper pen
CN117095414A
Digital application method and system based on dot matrix intelligent pen
CN118015636A