Handwriting processing method and device, electronic equipment and storage medium
By receiving the status information of the stylus and determining the pressure sensing data, the problem of the handwriting being unable to be displayed in time or stopped when the stylus comes into contact with the electronic device is solved, improving the user experience.
Patent Information
- Application Number
- CN202311021109.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
When the stylus comes into contact with the electronic device, due to the delay in transmission of pressure sensing data, the handwriting cannot be displayed in time or stopped displaying, which affects the user's user experience.
By receiving the first information sent by the stylus, it is determined that the stylus is in a suspended state or a contact state, and the first pressure sensing data is determined based on the information, and the handwriting process is performed. The specific method includes timely displaying the handwriting when the stylus switches from the floating state to the contact state, and timely stop displaying the handwriting when the stylus switches from the contact state to the suspended state.
It realizes the timely response of the stylus to the stylus to the stylus, improves the user experience, and avoids the display lag when starting the pen and the problem of handwriting trailing when lifting the pen.
Smart Images

Figure CN119493484A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of handwriting pen technology, and in particular to a handwriting processing method, device, electronic device and storage medium. Background Art
[0002] When the stylus is used to implement the handwriting function, it mainly inputs writing and drawing by touching the screen of the electronic device. When the electronic device implements the writing and drawing input of the stylus, it needs to display the handwriting according to the pen tip data of the stylus, and the pen tip data includes pressure data and coordinate data. The electronic device usually receives the pen tip data sent by the stylus through the communication connection between the stylus and the stylus, but due to the transmission delay of the high-precision pressure data, when the stylus contacts the electronic device, the handwriting cannot be displayed in time due to the failure to receive the pen tip data, resulting in a poor user experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a handwriting processing method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a handwriting processing method is provided, which is applied to an electronic device, and the method includes:
[0005] receiving first information sent by the stylus, where the first information is used to indicate that the stylus is in a suspended state or a contact state;
[0006] Determine first pressure sensing data according to the first information;
[0007] Handwriting processing is performed according to the first pressure-sensing data.
[0008] In an exemplary embodiment, determining first pressure sensing data according to the first information includes:
[0009] Determine the first pressure sensitivity data if no second information sent by the stylus is received within a first time period after the stylus is switched from the suspended state to the contact state according to the first information, wherein the first pressure sensitivity data is one pressure sensitivity value, or the first pressure sensitivity data is multiple pressure sensitivity values;
[0010] The step of performing handwriting processing according to the first pressure sensing data includes:
[0011] According to the first pressure-sensing data, handwriting is drawn until second information sent by the stylus is received, where the second information is second pressure-sensing data.
[0012] In an exemplary embodiment, the one pressure sensitivity value is one of the following:
[0013] The minimum pressure sensitivity value supported by the electronic device;
[0014] The product of the minimum pressure sensitivity value supported by the electronic device and a first coefficient, wherein the first coefficient is greater than 1;
[0015] The average pressure value calculated during the historical period;
[0016] The product of an average pressure value calculated in a historical period and a second coefficient, where the second coefficient is less than 1.
[0017] In an exemplary embodiment, the plurality of pressure sensitivity values follow an increasing rule, wherein the increasing rule is a linear increasing method or a non-linear increasing method.
[0018] In an exemplary embodiment, drawing handwriting according to the first pressure-sensing data includes:
[0019] In the increasing order of the multiple pressure sensitivity values, the pressure sensitivity values among the multiple pressure sensitivity values are used in sequence to draw the handwriting.
[0020] In an exemplary embodiment, the step of sequentially using the pressure sensitivity values among the plurality of pressure sensitivity values to draw handwriting includes:
[0021] Draw for the same length of time using different pressure values; or
[0022] Use different pressure sensitivity values to draw the handwriting for gradually increasing durations; or
[0023] The duration of drawing handwriting using different pressure sensitivity values gradually decreases.
[0024] In an exemplary embodiment, the method further comprises:
[0025] The first information indicates that the stylus is in a contact state, and after receiving the second pressure-sensing data sent by the stylus, handwriting is drawn according to the second pressure-sensing data sent by the stylus.
[0026] In an exemplary embodiment, determining first pressure sensing data according to the first information includes:
[0027] After determining, according to the first information, that the stylus pen switches from the contact state to the hovering state, determining that the first pressure sense data is a pressure sense value greater than or equal to 0 and less than a threshold;
[0028] The step of performing handwriting processing according to the first pressure sensing data includes:
[0029] No ink drawing is performed; or
[0030] According to the pressure value that is greater than or equal to 0 and less than a threshold, handwriting drawing is performed.
[0031] In an exemplary embodiment, the receiving first information sent by the stylus includes:
[0032] Receiving first information sent by the stylus through a first wireless connection;
[0033] The receiving of the second information sent by the stylus comprises:
[0034] The second information sent by the stylus is received through the second wireless connection.
[0035] In an exemplary embodiment, the data transmission delay of the first wireless connection is lower than the data transmission delay of the second wireless connection.
[0036] The unit data transmission volume of the first wireless connection is higher than the unit data transmission volume of the second wireless connection.
[0037] In an exemplary embodiment, the first wireless connection is a near field communication connection, and the type of the second wireless connection is a Bluetooth connection.
[0038] According to a second aspect of the embodiments of the present disclosure, there is provided a handwriting processing device, which is applied to an electronic device, and the device includes:
[0039] A receiving module, configured to receive first information sent by the stylus, wherein the first information is used to indicate that the stylus is in a suspended state or a contact state;
[0040] The processing module is configured to determine first pressure-sensing data according to the first information; and perform handwriting processing according to the first pressure-sensing data.
[0041] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0042] processor;
[0043] a memory for storing processor-executable instructions;
[0044] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0045] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.
[0046] The above method disclosed in the present invention has the following beneficial effects: the handwriting can be displayed in time when the stylus is switched from a suspended state to a contact state, and the handwriting can be stopped from being displayed in time when the stylus is switched from a contact state to a suspended state, so that the display of the handwriting responds to the operation of the stylus in time, thereby improving the user experience.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0049] Figure 1 is a schematic diagram of a scene when a stylus pen inputs on an electronic device according to an exemplary embodiment;
[0050] Figure 2 is a flow chart of a handwriting processing method according to an exemplary embodiment;
[0051] Figure 3 is a schematic diagram showing a pen-down event and a pen-up event according to an exemplary embodiment;
[0052] Figure 4 is a flow chart of a handwriting processing method according to an exemplary embodiment;
[0053] Figure 5 is a schematic diagram of a flow chart of a pen-down event and a pen-lift event according to an exemplary embodiment;
[0054] Figure 6 is a block diagram of a handwriting processing device according to an exemplary embodiment;
[0055] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0057] In some possible embodiments, in the event of the stylus pen being put down and the event of the pen being lifted, that is, when the stylus pen contacts the screen of the electronic device and leaves the screen of the electronic device, the stylus pen sends pen tip data to the electronic device via near field communication or Bluetooth communication. However, due to the limitation of the transmission bandwidth of near field communication, when the pen tip data is transmitted via near field communication, the pressure sensing data received by the electronic device has low accuracy due to the inability to transmit a large amount of data, thereby affecting the sensitivity of the stylus pen; due to the limitation of the transmission delay of Bluetooth communication, when the pen tip data is transmitted via Bluetooth communication, the electronic device cannot display the handwriting in time or stop displaying the handwriting in time due to the inability to receive the pen tip data in time, resulting in the problem of display lag when writing down and the problem of handwriting tailing when lifting the pen, thereby affecting the user experience of the stylus pen.
[0058] In an exemplary embodiment of the present disclosure, in order to overcome the technical problems existing in the related art, a handwriting processing method is provided, which is applied to an electronic device, including: receiving first information sent by a stylus, the first information is used to indicate that the stylus is in a suspended state or a contact state; determining first pressure sensing data according to the first information; and performing handwriting processing according to the first pressure sensing data. The method in the embodiment of the present disclosure can display the handwriting in time when the stylus switches from a suspended state to a contact state, and stop displaying the handwriting in time when the stylus switches from a contact state to a suspended state, so that the display of the handwriting responds to the operation of the stylus in time, thereby improving the user experience.
[0059] In the exemplary embodiments of the present disclosure, the electronic device is an electronic device that can support the handwriting function of a stylus, including but not limited to a tablet computer, a smart phone, a computer device, a handwriting board, and a drawing board. The stylus can also be called a touch pen, including but not limited to a resistive stylus and an inductive stylus. Figure 1 The figure is a schematic diagram of a scene when a stylus pen is used for inputting on an electronic device according to an exemplary embodiment.
[0060] In an exemplary embodiment of the present disclosure, a handwriting processing method is provided, which is applied to an electronic device. Figure 2 is a flow chart of a handwriting processing method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0061] Step S201: receiving first information sent by a stylus pen, where the first information is used to indicate that the stylus pen is in a suspended state or a contact state.
[0062] The suspended state means that there is no contact between the pen tip and the electronic device screen, and the stylus in the suspended state cannot be used for writing and drawing input in the electronic device. The contact state means that the pen tip is in contact with the electronic device screen, and the stylus in the contact state can be used for writing and drawing input in the electronic device.
[0063] In some possible implementations, the suspended state and the contact state are calculated based on the data collected by the pressure sensor located at the tip of the pen. For example, when the value of the data collected by the pressure sensor is 0, it is determined to be a suspended state, otherwise it is determined to be a contact state. For another example, when the data collected by the pressure sensor is less than a threshold, it is determined to be a suspended state, otherwise it is determined to be a contact state.
[0064] In some possible implementations, the hovering state indicates that the distance between the pen tip and the electronic device screen is greater than 0, and the contact state indicates that the distance between the pen tip and the electronic device screen is equal to 0.
[0065] In some possible implementations, the suspended state indicates that the distance between the pen tip and the electronic device screen is greater than a set value, and the contact state indicates that the distance between the pen tip and the electronic device screen is less than a set value. The set value is a value within the communication range for transmitting the first information. For example, when the stylus pen sends the first information to the electronic device using near field communication, the communication range of the near field communication is within 10 centimeters, and the set value is a value within 10 centimeters.
[0066] The first information only includes the state information of the stylus, and there are only two states: the hovering state and the contact state. When defining the first information in the communication protocol between the stylus and the electronic device, for example, the identifier "Hover" and the identifier "Ink" can be used to represent the hovering state and the contact state respectively, or the identifier "0" and the identifier "1" can be used to represent the hovering state and the contact state respectively. When the electronic device receives the first information sent by the stylus, the state of the stylus can be determined according to the communication protocol. Since the bandwidth required by the identifier in the first information is relatively small, when the stylus sends the first information to the electronic device, a wireless communication method with low transmission delay is used to transmit the first information to improve the response speed of the electronic device, such as using near field communication to transmit the first information.
[0067] Step S202: determining first pressure sensing data according to the first information.
[0068] Pressure data indicates the pressure value applied to the pen tip when using a stylus for input, and can also be called pressure value. The larger the amount of pressure data, the higher the accuracy, and the higher the sensitivity when displaying handwriting in electronic devices. Electronic devices display handwriting based on pressure data. The greater the pressure value, the thicker and more obvious the handwriting. In order to avoid accidental touches, a minimum pressure value that can just display the handwriting is usually set.
[0069] Optionally, the minimum pressure value is the minimum pressure value supported by an operating system (eg, Android system) of the electronic device.
[0070] The first pressure sensing data is a preset value. The pen-down event and the pen-lifting event, that is, the pen tip touching the screen and the pen tip leaving the screen, are determined based on the first information. Different events correspond to different first pressure sensing data.
[0071] Figure 3 is a schematic diagram showing a pen-down event and a pen-up event according to an exemplary embodiment. Figure 3 As shown, when it is determined according to the first information that the stylus is switched from a suspended state to a contact state, a stylus pen-down event is determined to have occurred. At this time, handwriting should begin to be displayed on the screen of the electronic device. Therefore, the first pressure data is greater than 0 or greater than the minimum pressure value.
[0072] like Figure 3 As shown, when it is determined according to the first information that the stylus pen switches from the contact state to the suspended state, a stylus pen lift event is determined to occur. At this time, the handwriting should stop being displayed on the screen of the electronic device. Therefore, the first pressure sensitivity data is equal to 0 or less than the minimum pressure value.
[0073] Step S203, performing handwriting processing according to the first pressure sensing data.
[0074] The pen-lifting event corresponds to the first pressure data being equal to 0. After the pen-lifting event is determined to have occurred, the handwriting completely disappears, so that the user can see the pen-stopping effect when the pen is lifted, without seeing the pen dragging phenomenon;
[0075] The pen-lifting event corresponds to the first pressure data being less than the minimum pressure value. After the pen-lifting event is determined to have occurred, the effect of handwriting disappearing is clearly displayed, so that the user can see the pen-stopping effect when the pen is lifted, without seeing the pen dragging phenomenon;
[0076] The pen-down event corresponds to the first pressure data being greater than 0 or greater than the minimum pressure value, and the handwriting can be displayed in time when the stylus is switched from a suspended state to a contact state.
[0077] In an exemplary embodiment of the present disclosure, since the stylus adopts a communication method with low transmission delay to send the first information, the first information received by the electronic device is consistent with the actual state of the stylus. According to the first information, the first pressure sensing data is determined, and the handwriting can be displayed in time when the pen is put down and the handwriting can be stopped from being displayed in time when the pen is lifted, so that the display of the handwriting responds to the operation of the stylus in time, overcoming the problem of display lag when the pen is put down and the problem of handwriting tailing when the pen is lifted.
[0078] In an exemplary embodiment of the present disclosure, a handwriting processing method is provided, which is applied to an electronic device. Figure 4 is a flow chart of a handwriting processing method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0079] Step S401: receiving first information sent by a stylus pen, where the first information is used to indicate that the stylus pen is in a suspended state or a contact state.
[0080] The specific implementation of step S401 refers to step S201 and will not be described in detail here.
[0081] In some possible implementations, the first information sent by the stylus is received through a first wireless connection.
[0082] Step S402: determining first pressure sensing data according to the first information within a first time period after the stylus is switched from the hovering state to the contact state and no second information sent by the stylus is received.
[0083] In some possible implementations, the second information sent by the stylus is received through a second wireless connection.
[0084] The second information is the second pressure data, which is the real-time pressure data acting on the stylus tip. In order to obtain high-precision pressure data, the second information has a large amount of data and usually has a high transmission delay. The first duration is a relatively short duration, such as 1 millisecond, 2 milliseconds, 5 milliseconds, etc.
[0085] In some possible implementations, the data transmission delay of the first wireless connection is lower than the data transmission delay of the second wireless connection, and the unit data transmission volume of the first wireless connection is higher than the unit data transmission volume of the second wireless connection.
[0086] In one example, the first wireless connection is a near field communication connection, and the type of the second wireless connection is a Bluetooth connection.
[0087] In one example, Figure 5 is a flow chart of a pen-down event and a pen-up event according to an exemplary embodiment. Figure 5 As shown, the stylus sends the pen tip pressure (i.e., pressure value) to the electronic device via Bluetooth connection, and sends the hovering / contact state to the electronic device via near field communication. When it is determined that the pen tip is in contact, and the current pressure value is 0 according to the pen tip pressure, it is still determined that a pen down event has occurred; when it is determined that the pen tip is hovering, and the current pressure value is not 0 according to the pen tip pressure, it is still determined that a pen lift event has occurred.
[0088] When the tip of the stylus touches the screen, the stylus starts to send first information and second information to the electronic device. The transmission delay of the first information is low, and the transmission delay of the second information is high. When the electronic device determines that the stylus switches from a suspended state to a contact state based on the first information, the second information cannot be received. Therefore, in order to avoid handwriting display delay, it is necessary to determine the first pressure sensing data within the first time length so as to start displaying the handwriting in time.
[0089] When determining the first pressure sensing data, one of the following two methods is used:
[0090] In the first type, the first pressure sensing data is a pressure sensing value.
[0091] The pressure sensitivity value is a preset value, and can be any pressure sensitivity value that can display handwriting. However, considering that the pressure sensitivity is usually small when writing in actual use, the first pressure sensitivity data should be a smaller pressure sensitivity value.
[0092] In some possible implementations, a pressure sensitivity value is one of the following:
[0093] The minimum pressure sensitivity value supported by the electronic device;
[0094] the product of the minimum pressure sensitivity value supported by the electronic device and the first coefficient, where the first coefficient is greater than 1;
[0095] The average pressure value calculated during the historical period;
[0096] The product of the average pressure value calculated in the historical period and the second coefficient, the second coefficient is less than 1.
[0097] Among them, the minimum pressure sensitivity value represents the minimum pressure sensitivity value that can display handwriting on the screen of the electronic device, the historical period is any period of time when handwriting is used for input before the current input using the stylus pen, and the first coefficient and the second coefficient are preset values.
[0098] Second, the first pressure sensitivity data is a plurality of pressure sensitivity values.
[0099] In some possible implementations, the multiple pressure sensitivity values follow an increasing rule, and the increasing method of the increasing rule is linear increasing or non-linear increasing.
[0100] Multiple pressure sensitivity values follow an increasing rule, which can simulate handwriting that is more consistent with a real writing event.
[0101] Step S403: drawing handwriting according to the first pressure sensing data until receiving second information sent by the stylus.
[0102] When the first pressure sensitivity data is a pressure sensitivity value, before receiving the second information sent by the stylus, the handwriting is drawn with the same pressure sensitivity value, and the thickness of the handwriting does not change.
[0103] When the first pressure sensitivity data is multiple pressure sensitivity values, before receiving the second information sent by the stylus, the handwriting is drawn in ascending order using the multiple pressure sensitivity values in sequence, and the handwriting gradually becomes thicker and more obvious to simulate handwriting that is more consistent with a real writing event.
[0104] In some possible implementations, when the handwriting is drawn using the pressure sensitivity values of the plurality of pressure sensitivity values in sequence, the handwriting is drawn in one of the following three ways:
[0105] The duration of drawing strokes with different pressure sensitivity values is the same;
[0106] The duration of drawing handwriting using different pressure sensitivity values gradually increases;
[0107] The duration of drawing handwriting using different pressure sensitivity values gradually decreases.
[0108] In one example, the end time of the first time duration after the stylus is switched from the hovering state to the contact state is determined according to the first information, and the time duration from the second time duration sent by the stylus is received is t seconds, and the first pressure sensitivity data is three increasing pressure sensitivity values p1, p2, and p3, and the handwriting is drawn in one of the following three ways:
[0109] Use pressure value p1 to draw for t / 3 seconds, use pressure value p1 to draw for t / 3 seconds, use pressure value p1 to draw for t / 3 seconds;
[0110] Use pressure value p1 to draw t / 5 seconds, use pressure value p1 to draw 3t / 10 seconds, use pressure value p1 to draw t / 2 seconds;
[0111] Use pressure value p1 to draw t / 2 seconds, use pressure value p1 to draw 3t / 10 seconds, and use pressure value p1 to draw t / 5 seconds.
[0112] Step S404: the first information indicates that the stylus is in contact state, and after receiving the second pressure sensing data sent by the stylus, drawing handwriting according to the second pressure sensing data sent by the stylus.
[0113] When the stylus is in contact state, it indicates that the stylus is in a stable input state, and the handwriting is changed in real time according to the change of the second pressure data. The greater the pressure value of the second pressure data, the thicker and more obvious the handwriting is, and vice versa, the thinner and more obvious the handwriting is.
[0114] Step S405: after determining according to the first information that the stylus is switched from the contact state to the hovering state, determine that the first pressure sense data is a pressure sense value greater than or equal to 0 and less than a threshold.
[0115] When the tip of the stylus leaves the screen, the stylus sends the first information to the electronic device, switches from the contact state to the suspended state, and stops sending the second information to the electronic device. However, the transmission delay of the first information is low, and the transmission delay of the second information is high. When the electronic device determines that the stylus has switched from the contact state to the suspended state based on the first information, it has not yet received the second information synchronized with the switch to the suspended state. In order to prevent the electronic device from continuing to display the handwriting based on the second information sent last time after the user lifts the pen, at this time, the first pressure data is determined to be 0, or the first pressure data is determined to be a pressure value greater than 0 and less than the threshold, so as to stop displaying the handwriting in time. The threshold is the minimum pressure value that can display the handwriting on the screen of the electronic device.
[0116] Step S406, performing handwriting processing according to the first pressure sensing data.
[0117] In some possible implementations, handwriting drawing is not performed.
[0118] In some possible implementations, handwriting drawing is performed according to a pressure value that is greater than or equal to 0 and less than a threshold.
[0119] In both of the above methods, users will see obvious stop-writing effects.
[0120] In this embodiment, steps S401-S403 can be used as independent embodiments to implement the handwriting processing method when the stylus is put down, steps S401 and S404 can be used as independent embodiments to implement the handwriting processing method during the stylus input process, and steps S401 and S405-S406 can be used as independent embodiments to implement the handwriting processing method when the stylus is lifted.
[0121] In an exemplary embodiment of the present disclosure, the first information is received using a wireless connection with a low transmission delay, the second information is transmitted using a wireless connection with a high unit data transmission rate, and the handwriting is displayed or stopped in time in combination with the first pressure sensing data. This can ensure the accuracy of the pressure sensing data and the sensitivity of the stylus, while making the display of the handwriting respond to the operation of the stylus in time, producing a pen-down effect in time when writing, and a pen-lifting effect in time when lifting the pen, thereby improving the user experience.
[0122] In an exemplary embodiment of the present disclosure, a handwriting processing device is provided, which is applied to an electronic device. Figure 6 is a block diagram of a handwriting processing device according to an exemplary embodiment. Figure 6 As shown, including:
[0123] The receiving module 601 is configured to receive first information sent by the stylus, where the first information is used to indicate that the stylus is in a suspended state or a contact state;
[0124] The processing module 602 is configured to determine first pressure-sensing data according to the first information; and perform handwriting processing according to the first pressure-sensing data.
[0125] In an exemplary embodiment, the processing module 602 is further configured to:
[0126] Determining, according to the first information, within a first time period after the stylus is switched from the suspended state to the contact state, if no second pressure sensing data sent by the stylus is received, determining first pressure sensing data, wherein the first pressure sensing data is one pressure sensing value, or the first pressure sensing data is multiple pressure sensing values;
[0127] According to the first pressure-sensing data, handwriting is drawn until second information sent by the stylus is received, where the second information is the pressure-sensing data.
[0128] In an exemplary embodiment, a pressure sensitivity value is one of the following:
[0129] The minimum pressure sensitivity value supported by the electronic device;
[0130] the product of the minimum pressure sensitivity value supported by the electronic device and the first coefficient, where the first coefficient is greater than 1;
[0131] The average pressure value calculated during the historical period;
[0132] The product of the average pressure value calculated in the historical period and the second coefficient, the second coefficient is less than 1.
[0133] In an exemplary embodiment, the plurality of pressure sensitivity values follow an increasing rule, wherein the increasing rule has an increasing manner of linear increasing or non-linear increasing.
[0134] In an exemplary embodiment, the processing module 602 is further configured to:
[0135] In increasing order of the multiple pressure sensitivity values, the pressure sensitivity values among the multiple pressure sensitivity values are used to draw the handwriting.
[0136] In an exemplary embodiment, the processing module 602 is further configured to:
[0137] Draw for the same length of time using different pressure values; or
[0138] Use different pressure sensitivity values to draw the handwriting for gradually increasing durations; or
[0139] The duration of drawing handwriting using different pressure sensitivity values gradually decreases.
[0140] In an exemplary embodiment, the receiving module 601 is further configured to:
[0141] The first information indicates that the stylus is in a contact state, and after receiving the second pressure-sensing data sent by the stylus, the handwriting is drawn according to the second pressure-sensing data sent by the stylus.
[0142] In an exemplary embodiment, the processing module 602 is further configured to:
[0143] After determining, according to the first information, that the stylus is switched from the contact state to the hovering state, determining that the first pressure sense data is a pressure sense value greater than or equal to 0 and less than a threshold;
[0144] No ink drawing is performed; or
[0145] According to the pressure value greater than or equal to 0 and less than the threshold, the handwriting drawing is performed.
[0146] In an exemplary embodiment, the receiving module 601 is further configured to:
[0147] Receiving first information sent by the stylus through the first wireless connection;
[0148] The receiving module 601 is further configured to:
[0149] The second information sent by the stylus is received through the second wireless connection.
[0150] In an exemplary embodiment, a data transmission delay of the first wireless connection is lower than a data transmission delay of the second wireless connection.
[0151] The unit data transmission volume of the first wireless connection is higher than the unit data transmission volume of the second wireless connection.
[0152] In an exemplary embodiment, the first wireless connection is a near field communication connection, and the type of the second wireless connection is a Bluetooth connection.
[0153] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0154] Figure 7 is a block diagram of an electronic device 700 according to an exemplary embodiment.
[0155] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0156] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0157] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0158] The power supply component 706 provides power to various components of the electronic device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0159] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0160] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0161] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0162] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0164] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0166] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a handwriting processing method, the method including any of the above methods.
[0167] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0168] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A handwriting processing method, characterized in that: Applied to electronic equipment, the method comprises: receiving first information sent by the stylus, where the first information is used to indicate that the stylus is in a suspended state or a contact state; Determine first pressure sensing data according to the first information; Handwriting processing is performed according to the first pressure-sensing data.
2. The method according to claim 1, characterized in that The determining first pressure sensing data according to the first information includes: Determine the first pressure sensitivity data if no second information sent by the stylus is received within a first time period after the stylus is switched from the suspended state to the contact state according to the first information, wherein the first pressure sensitivity data is one pressure sensitivity value, or the first pressure sensitivity data is multiple pressure sensitivity values; The step of performing handwriting processing according to the first pressure sensing data includes: According to the first pressure-sensing data, handwriting is drawn until second information sent by the stylus is received, where the second information is second pressure-sensing data.
3. The method according to claim 2, characterized in that The pressure sensitivity value is one of the following: The minimum pressure sensitivity value supported by the electronic device; The product of the minimum pressure sensitivity value supported by the electronic device and a first coefficient, wherein the first coefficient is greater than 1; The average pressure value calculated during the historical period; The product of an average pressure value calculated in a historical period and a second coefficient, where the second coefficient is less than 1.
4. The method according to claim 2, characterized in that: The multiple pressure sensitivity values follow an increasing rule, wherein the increasing method of the increasing rule is linear increasing or non-linear increasing.
5. The method according to claim 4, characterized in that Drawing handwriting according to the first pressure sensing data includes: In the increasing order of the multiple pressure sensitivity values, the pressure sensitivity values among the multiple pressure sensitivity values are used in sequence to draw the handwriting.
6. The method according to claim 5, characterized in that The step of sequentially using the pressure sensitivity values among the plurality of pressure sensitivity values to draw handwriting includes: Draw for the same length of time using different pressure values; or Use different pressure sensitivity values to draw the handwriting for gradually increasing durations; or The duration of drawing handwriting using different pressure sensitivity values gradually decreases.
7. The method according to any one of claims 2 to 6, characterized in that: The method further comprises: The first information indicates that the stylus is in a contact state, and after receiving the second pressure-sensing data sent by the stylus, handwriting is drawn according to the second pressure-sensing data sent by the stylus.
8. The method according to claim 1, characterized in that The determining first pressure sensing data according to the first information includes: After determining, according to the first information, that the stylus pen switches from the contact state to the hovering state, determining that the first pressure sense data is a pressure sense value greater than or equal to 0 and less than a threshold; The step of performing handwriting processing according to the first pressure sensing data includes: No ink drawing is performed; or According to the pressure value that is greater than or equal to 0 and less than a threshold, handwriting drawing is performed.
9. The method according to any one of claims 2 to 6, characterized in that: The receiving first information sent by the stylus comprises: Receiving first information sent by the stylus through a first wireless connection; The receiving of the second information sent by the stylus comprises: The second information sent by the stylus is received through the second wireless connection.
10. The method according to claim 9, characterized in that The data transmission delay of the first wireless connection is lower than the data transmission delay of the second wireless connection, The unit data transmission volume of the first wireless connection is higher than the unit data transmission volume of the second wireless connection.
11. The method according to claim 9, characterized in that The first wireless connection is a near field communication connection, and the type of the second wireless connection is a Bluetooth connection.
12. A handwriting processing device, characterized in that: Applied to electronic equipment, the device comprises: A receiving module, configured to receive first information sent by the stylus, wherein the first information is used to indicate that the stylus is in a suspended state or a contact state; The processing module is configured to determine first pressure-sensing data according to the first information; and perform handwriting processing according to the first pressure-sensing data.
13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the handwriting processing method as described in any one of claims 1-11.
14. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the handwriting processing method as described in any one of claims 1 to 11.