Control method, electronic equipment, touch pen and storage medium
By detecting noise and adjusting the control parameters of the stylus, the problem of noise interference between the stylus and electronic devices being interfered with, improving anti-interference ability and avoiding functional abnormalities.
Patent Information
- Application Number
- CN202311016444.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
AI Technical Summary
When using a stylus to communicate with electronic devices, it is susceptible to noise interference, resulting in abnormal functions.
By detecting noise, determining control parameters (such as voltage and frequency), and sending instructions to the stylus to adjust these parameters to optimize wireless communication.
Effectively reduce the impact of noise on wireless communication between the stylus pen and electronic devices, improve the anti-interference ability of the stylus pen, and avoid functional abnormalities.
Smart Images

Figure CN119473028A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of stylus pens, and in particular to a control method, an electronic device, a stylus pen, and a storage medium. Background Art
[0002] With the development of computer technology, the application of stylus is becoming more and more extensive. For example, stylus can be used in tablet computers, foldable screen mobile phones, laptops or other electronic devices, and the interaction between screen and stylus is increasing. However, in the process of using stylus, it is easy to be disturbed by noise, resulting in abnormal function of stylus. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a control method, an electronic device, a stylus pen and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a control method is provided, the method comprising:
[0005] A first noise is detected, and at least one control parameter is determined; the first noise is noise that affects wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device;
[0006] Sending first indication information to the stylus, the first indication information including at least one parameter value, each parameter value corresponding to one of the control parameters, the first indication information being used to adjust the at least one control parameter to a corresponding parameter value;
[0007] In response to the adjusted parameter value, wireless communication between the stylus and the electronic device is controlled.
[0008] In some embodiments, the at least one control parameter includes at least one of voltage and frequency, and the sending the first indication information to the stylus includes:
[0009] sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus;
[0010] The voltage indication information includes a voltage value corresponding to the voltage, and the voltage indication information is used to indicate that the voltage is adjusted to the voltage value; the frequency indication information includes a frequency value corresponding to the frequency, and the frequency indication information is used to indicate that the frequency is adjusted to the frequency value.
[0011] In some embodiments, the sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus includes:
[0012] sending the voltage indication information to the stylus;
[0013] In response to receiving the voltage adjustment success information returned by the stylus, the frequency indication information is sent to the stylus.
[0014] In some embodiments, the sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus includes:
[0015] sending the frequency indication information to the stylus;
[0016] In response to receiving the frequency adjustment success information returned by the stylus, the voltage indication information is sent to the stylus.
[0017] In some embodiments, the sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus includes:
[0018] sending voltage indication information to the stylus;
[0019] In response to receiving voltage adjustment success information returned by the stylus and detecting second noise that meets a first condition, frequency indication information is sent to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0020] In some embodiments, the sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus includes:
[0021] sending frequency indication information to the stylus;
[0022] In response to receiving frequency adjustment success information returned by the stylus and detecting second noise that meets a first condition, sending voltage indication information to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0023] In some embodiments, the sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus includes:
[0024] The voltage indication information and the frequency indication information are sent to the stylus at the same time.
[0025] In some embodiments, the method further comprises:
[0026] In response to receiving the frequency adjustment success information returned by the stylus, the downlink frequency is adjusted to the frequency value; the downlink frequency is the frequency of receiving the signal sent by the stylus.
[0027] In some embodiments, after sending the first indication information to the stylus, the method further includes:
[0028] When no noise is detected or the detected third noise satisfies the second condition, second indication information is sent to the stylus, the second indication information includes a preset voltage value and a preset frequency value, the second indication information is used to instruct the stylus to adjust the voltage to the preset voltage value and the frequency to the preset frequency value, and the third noise satisfies the second condition including that the signal-to-noise ratio corresponding to the third noise is greater than or equal to a preset threshold.
[0029] In some embodiments, the first indication information also includes a first pen tip identifier, which is the pen tip identifier used when determining the at least one control parameter, and the first indication information is used to adjust the at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device.
[0030] In some embodiments, the electronic device includes a touch firmware unit, a driving unit, and a Bluetooth unit, and the detecting of the first noise and determining at least one control parameter include:
[0031] The touch firmware unit detects the first noise and sends an adjustment request to the driving unit, where the adjustment request carries a parameter identifier corresponding to the at least one control parameter, and the parameter identifier is used to represent a parameter value corresponding to the control parameter;
[0032] The sending the first indication information to the stylus includes:
[0033] receiving the adjustment request through the driving unit, and sending the adjustment request to the Bluetooth unit;
[0034] The Bluetooth unit determines a parameter value corresponding to the at least one control parameter according to the adjustment request, and sends the first indication information to the stylus.
[0035] According to a second aspect of an embodiment of the present disclosure, a control method is provided, the method comprising:
[0036] receiving first indication information sent by an electronic device, the first indication information including a parameter value corresponding to at least one control parameter, each parameter value corresponding to a control parameter, the at least one control parameter being determined when the electronic device detects a first noise, the first noise being noise affecting wireless communication between the stylus pen and the electronic device, and the control parameter including a parameter for controlling wireless communication between the stylus pen and the electronic device;
[0037] adjusting the at least one control parameter to a corresponding parameter value;
[0038] In response to the adjusted parameter value, wireless communication between the stylus and the electronic device is controlled.
[0039] In some embodiments, the first indication information further includes a first pen tip identifier, where the first pen tip identifier is a pen tip identifier when the electronic device determines the control parameter;
[0040] The adjusting the at least one control parameter to a corresponding parameter value comprises:
[0041] In a case where the first pen tip identifier and the current second pen tip identifier of the stylus pen correspond to the same electronic device, the at least one control parameter is adjusted to a corresponding parameter value.
[0042] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0043] A parameter determination module is configured to detect a first noise and determine at least one control parameter; the first noise is noise that affects the wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device;
[0044] an information sending module, configured to send first indication information to the stylus, the first indication information including at least one parameter value, each parameter value corresponding to one of the control parameters, the first indication information being used to adjust the at least one control parameter to a corresponding parameter value;
[0045] The control module is configured to control the wireless communication between the stylus and the electronic device in response to the adjusted parameter value.
[0046] In some embodiments, the at least one control parameter includes at least one of voltage and frequency, and the information sending module is configured to:
[0047] sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus;
[0048] The voltage indication information includes a voltage value corresponding to the voltage, and the voltage indication information is used to indicate that the voltage is adjusted to the voltage value; the frequency indication information includes a frequency value corresponding to the frequency, and the frequency indication information is used to indicate that the frequency is adjusted to the frequency value.
[0049] In some embodiments, the information sending module is configured to:
[0050] sending the voltage indication information to the stylus;
[0051] In response to receiving the voltage adjustment success information returned by the stylus, the frequency indication information is sent to the stylus.
[0052] In some embodiments, the information sending module is configured to:
[0053] sending the frequency indication information to the stylus;
[0054] In response to receiving the frequency adjustment success information returned by the stylus, the voltage indication information is sent to the stylus.
[0055] In some embodiments, the information sending module is configured to:
[0056] sending voltage indication information to the stylus;
[0057] In response to receiving voltage adjustment success information returned by the stylus and detecting second noise that meets a first condition, frequency indication information is sent to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0058] In some embodiments, the information sending module is configured to:
[0059] sending frequency indication information to the stylus;
[0060] In response to receiving frequency adjustment success information returned by the stylus and detecting second noise that meets a first condition, sending voltage indication information to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0061] In some embodiments, the information sending module is configured to:
[0062] The voltage indication information and the frequency indication information are sent to the stylus at the same time.
[0063] In some embodiments, the electronic device further comprises:
[0064] The frequency adjustment module is configured to adjust the downlink frequency to the frequency value in response to receiving the frequency adjustment success information returned by the stylus; the downlink frequency is the frequency of receiving the signal sent by the stylus.
[0065] In some embodiments, the information sending module is further configured to:
[0066] When no noise is detected or the detected third noise satisfies the second condition, second indication information is sent to the stylus, the second indication information includes a preset voltage value and a preset frequency value, the second indication information is used to instruct the stylus to adjust the voltage to the preset voltage value and the frequency to the preset frequency value, and the third noise satisfies the second condition including that the signal-to-noise ratio corresponding to the third noise is greater than or equal to a preset threshold.
[0067] In some embodiments, the first indication information also includes a first pen tip identifier, which is the pen tip identifier used when determining the at least one control parameter, and the first indication information is used to adjust the at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device.
[0068] In some embodiments, the electronic device includes a touch firmware unit, a driving unit and a Bluetooth unit, and the parameter determination module is configured as follows:
[0069] The touch firmware unit detects the first noise and sends an adjustment request to the driving unit, where the adjustment request carries a parameter identifier corresponding to the at least one control parameter, and the parameter identifier is used to represent a parameter value corresponding to the control parameter;
[0070] The information sending module is configured as follows:
[0071] receiving the adjustment request through the driving unit, and sending the adjustment request to the Bluetooth unit;
[0072] The Bluetooth unit determines a parameter value corresponding to the at least one control parameter according to the adjustment request, and sends the first indication information to the stylus.
[0073] According to a fourth aspect of an embodiment of the present disclosure, a stylus pen is provided, the stylus pen comprising:
[0074] an information receiving module, configured to receive first indication information sent by an electronic device, the first indication information including a parameter value corresponding to at least one control parameter, each parameter value corresponding to a control parameter, the at least one control parameter being determined when the electronic device detects a first noise, the first noise being noise affecting wireless communication between the stylus pen and the electronic device, and the control parameter including a parameter for controlling wireless communication between the stylus pen and the electronic device;
[0075] a parameter value adjustment module, configured to adjust the at least one control parameter to a corresponding parameter value;
[0076] The control module is configured to control the wireless communication between the stylus and the electronic device in response to the adjusted parameter value.
[0077] In some embodiments, the first indication information further includes a first pen tip identifier, where the first pen tip identifier is a pen tip identifier when the electronic device determines the control parameter;
[0078] The parameter value adjustment module is configured as follows:
[0079] In a case where the first pen tip identifier and the current second pen tip identifier of the stylus pen correspond to the same electronic device, the at least one control parameter is adjusted to a corresponding parameter value.
[0080] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0081] processor;
[0082] a memory for storing processor-executable instructions;
[0083] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0084] According to a sixth aspect of an embodiment of the present disclosure, a stylus device is provided, including:
[0085] processor;
[0086] a memory for storing processor-executable instructions;
[0087] The processor is configured to execute the method as described in the second aspect of the embodiment of the present disclosure.
[0088] According to the seventh 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.
[0089] According to an eighth 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 the stylus pen, the stylus pen is enabled to execute the method described in the second aspect of the embodiment of the present disclosure.
[0090] The above method of the present disclosure has the following beneficial effects:
[0091] In the method provided by the embodiment of the present disclosure, the electronic device detects a first noise, determines at least one control parameter, the first noise affects the wireless communication between the stylus pen and the electronic device, the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device, sends a first indication message to the stylus pen, the first indication message indicates at least one parameter value, each parameter value corresponds to a control parameter, the stylus pen adjusts at least one control parameter to a corresponding parameter value, and then the stylus pen and the electronic device perform wireless communication based on the adjusted parameter value. That is, by adjusting the parameters that affect the wireless communication between the stylus pen and the electronic device, the influence of noise on the wireless communication between the stylus pen and the electronic device is reduced, thereby improving the anti-interference ability of the stylus pen and avoiding abnormal functions of the stylus pen.
[0092] 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
[0093] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0094] Figure 1 is a flow chart of a control method according to an exemplary embodiment;
[0095] Figure 2 is a flow chart showing another control method according to an exemplary embodiment;
[0096] Figure 3 is a flow chart showing another control method according to an exemplary embodiment;
[0097] Figure 4 is a flow chart showing another control method according to an exemplary embodiment;
[0098] Figure 5 is a flow chart showing another control method according to an exemplary embodiment;
[0099] Figure 6 is a flow chart showing another control method according to an exemplary embodiment;
[0100] Figure 7is a flow chart showing another control method according to an exemplary embodiment;
[0101] Figure 8 is a flow chart showing another control method according to an exemplary embodiment;
[0102] Fig. 9 is a flow chart showing another control method according to an exemplary embodiment;
[0103] Fig.10 is a flow chart showing another control method according to an exemplary embodiment;
[0104] Fig.11 is a flow chart showing another control method according to an exemplary embodiment;
[0105] Fig.12 is a flow chart showing another control method according to an exemplary embodiment;
[0106] Fig.13 is a flow chart showing another control method according to an exemplary embodiment;
[0107] Fig.14 is a flow chart showing another control method according to an exemplary embodiment;
[0108] Fig.15 is a block diagram of an electronic device according to an exemplary embodiment;
[0109] Fig.16 is a block diagram of a stylus pen according to an exemplary embodiment;
[0110] Fig.17 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0111] 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 invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0112] The control method provided in the embodiment of the present disclosure is applied to an electronic device and a stylus pen. The electronic device can be a mobile phone, a tablet computer, a laptop computer, or other device that can interact with the stylus pen. The stylus pen can also be called a stylus pen or an active pen. The electronic device is connected to the stylus pen. Optionally, the electronic device and the stylus pen are connected via Bluetooth.
[0113] In the disclosed embodiment, during the wireless communication between the electronic device and the stylus pen, it is easy to be interfered by noise, thereby causing the stylus pen to function abnormally. For example, the noise may be the noise generated when the electronic device is connected to a charger, or the noise may be the noise generated when the electronic device is in contact with other electronic devices, or the noise may be the environmental noise in the environment where the electronic device is located. Therefore, the electronic device needs to detect the noise during the wireless communication with the stylus pen. When the noise is detected, the influence of the noise on the wireless communication between the stylus pen and the electronic device is reduced by adjusting the parameters that affect the wireless communication between the stylus pen and the electronic device, thereby improving the anti-interference ability of the stylus pen and avoiding the abnormal function of the stylus pen.
[0114] Figure 1 is a flow chart of a control method according to an exemplary embodiment, which is executed by an electronic device, see Figure 1 , the method comprises the following steps:
[0115] Step S101: Detecting a first noise, and determining at least one control parameter, wherein the first noise is noise affecting wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device.
[0116] In the disclosed embodiment, the stylus pen and the electronic device interact with each other by wireless communication. When a first noise that affects the wireless communication between the stylus pen and the electronic device is detected, the interaction between the two is affected. For example, the stylus pen sends a coding signal to the electronic device, and the electronic device performs a corresponding operation according to the received coding signal. When the first noise exists, the first noise interferes with the coding signal, thereby causing the electronic device to receive an erroneous signal, thereby causing problems in the interaction between the stylus pen and the electronic device. For example, the first noise is the noise generated when the electronic device is connected to a charger, or the noise generated when the electronic device is in contact with other electronic devices, or the environmental noise in the environment where the electronic device is located.
[0117] When the electronic device detects the first noise, it means that the stylus has been affected by the noise. Therefore, it is necessary to determine the control parameter to be adjusted, which includes the parameter for controlling the wireless communication between the stylus and the electronic device, wherein the control parameter can be voltage or frequency, the voltage is the voltage when the stylus outputs a signal, the larger the voltage, the stronger the anti-interference ability of the stylus, the smaller the voltage, the weaker the anti-interference ability of the stylus; the frequency is the frequency of the signal sent by the stylus, the less similar the frequency is to the frequency of the noise, the stronger the anti-interference ability of the stylus, the more similar the frequency is to the frequency of the noise, the weaker the anti-interference ability of the stylus. According to actual needs, at least one of the voltage and frequency can be used as the control parameter to be adjusted, that is, the control parameter to be adjusted is the voltage, or the control parameter to be adjusted is the frequency, or the control parameter to be adjusted is the voltage and the frequency.
[0118] Step S102: Send first indication information to the stylus, where the first indication information includes at least one parameter value, each parameter value corresponds to a control parameter, and the first indication information is used to adjust at least one control parameter to a corresponding parameter value.
[0119] After determining at least one control parameter, determine the parameter value corresponding to each control parameter, that is, determine the voltage value corresponding to the voltage, and / or determine the frequency value corresponding to the frequency. Then, send a first indication message to the stylus, the first indication message includes the determined parameter value, and the first indication message is used to adjust at least one control parameter to the corresponding parameter value. For the stylus, the stylus receives the first indication message and adjusts at least one control parameter to the corresponding parameter value. When the first indication message includes the frequency value, the stylus adjusts the frequency to the frequency value. When the first indication message includes the voltage value, the stylus adjusts the voltage to the voltage value. When the first indication message includes the voltage value and the frequency value, the stylus adjusts the frequency to the frequency value and the voltage to the voltage value.
[0120] Step S103 , controlling the wireless communication between the stylus pen and the electronic device in response to the adjusted parameter value.
[0121] The control parameters are used to control the wireless communication between the stylus and the electronic device. After the electronic device sends the first indication information to the stylus, the stylus will adjust the corresponding control parameters according to the first indication information. For the electronic device, the electronic device needs to control the wireless communication between the stylus and the electronic device according to the adjusted parameter value. For example, in the case of adjusting the frequency, the stylus sends a signal according to the adjusted frequency, and the electronic device receives the signal sent by the stylus according to the adjusted frequency; in the case of adjusting the voltage, the stylus outputs a signal according to the adjusted voltage.
[0122] In the method provided by the embodiment of the present disclosure, the electronic device detects a first noise, determines at least one control parameter, the first noise affects the wireless communication between the stylus pen and the electronic device, the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device, sends a first indication message to the stylus pen, the first indication message indicates at least one parameter value, each parameter value corresponds to a control parameter, the stylus pen adjusts at least one control parameter to a corresponding parameter value, and then the stylus pen and the electronic device perform wireless communication based on the adjusted parameter value. That is, by adjusting the parameters that affect the wireless communication between the stylus pen and the electronic device, the influence of noise on the wireless communication between the stylus pen and the electronic device is reduced, thereby improving the anti-interference ability of the stylus pen and avoiding abnormal functions of the stylus pen.
[0123] Figure 2 is a flow chart showing another control method according to an exemplary embodiment, which is executed by a stylus pen, see Figure 2 , the method comprises the following steps:
[0124] Step S201, receiving first indication information sent by an electronic device, the first indication information includes a parameter value corresponding to at least one control parameter, each parameter value corresponds to a control parameter, at least one control parameter is determined when the electronic device detects a first noise, the first noise is noise that affects the wireless communication between the stylus pen and the electronic device, and the control parameters include parameters for controlling the wireless communication between the stylus pen and the electronic device.
[0125] Step S202: adjust at least one control parameter to a corresponding parameter value.
[0126] Step S203 , controlling the wireless communication between the stylus pen and the electronic device in response to the adjusted parameter value.
[0127] The implementation of steps S201-S203 refers to the above steps S101-S103, which will not be described in detail here.
[0128] In the method provided by the embodiment of the present disclosure, an electronic device detects a first noise, determines at least one control parameter, and the first noise affects the wireless communication between the stylus and the electronic device. The control parameter includes a parameter for controlling the wireless communication between the stylus and the electronic device. A first indication message is sent to the stylus, and the first indication message indicates at least one parameter value, each parameter value corresponds to a control parameter. The stylus adjusts at least one control parameter to a corresponding parameter value according to the received first indication message, and then the stylus and the electronic device communicate wirelessly based on the adjusted parameter value. That is, by adjusting the parameters that affect the wireless communication between the stylus and the electronic device, the influence of noise on the wireless communication between the stylus and the electronic device is reduced, thereby improving the anti-interference ability of the stylus and avoiding abnormal functions of the stylus.
[0129] In the disclosed embodiment, at least one control parameter includes at least one of voltage and frequency, and sending the first indication information to the stylus includes: sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus. The voltage indication information includes a voltage value corresponding to the voltage, and the voltage indication information is used to indicate that the voltage is adjusted to the voltage value; the frequency indication information includes a frequency value corresponding to the frequency, and the frequency indication information is used to indicate that the frequency is adjusted to the frequency value.
[0130] That is, when adjusting the voltage and / or frequency of the stylus pen, the following adjustment methods are included: (1) adjusting the voltage first, then adjusting the frequency; (2) adjusting the frequency first, then adjusting the voltage; (3) adjusting the voltage first, and then adjusting the frequency when noise is still detected after adjusting the voltage; (4) adjusting the frequency first, and then adjusting the voltage when noise is still detected after adjusting the frequency; (5) adjusting the voltage and frequency at the same time; (6) adjusting the frequency; (7) adjusting the voltage. The above adjustment methods are respectively described through the following embodiments.
[0131] Below through Figure 3 The illustrated embodiment illustrates an adjustment method of first adjusting the voltage and then adjusting the frequency. In this adjustment method, at least one control parameter includes voltage and frequency, and the first indication information includes voltage indication information and frequency indication information.
[0132] Figure 3 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 3 , the method comprises the following steps:
[0133] Step S301: the electronic device detects a first noise and determines a voltage and a frequency.
[0134] In the embodiment of the present disclosure, when the electronic device detects the first noise, it indicates that the stylus has been affected by the noise, and therefore, the voltage and frequency are determined as the control parameters to be adjusted, so that the stylus adjusts the voltage and frequency. The description of the first noise, voltage and frequency is referred to in the above step S101, which will not be repeated here.
[0135] In some embodiments, the electronic device performs noise detection, detects the first noise, and obtains the coding signal of the stylus. According to the first noise and the coding signal, the signal-to-noise ratio corresponding to the first noise is determined. When the signal-to-noise ratio is less than a preset threshold, it means that the first noise is large and affects the coding signal of the stylus, and the voltage and frequency of the stylus need to be adjusted. In other words, the electronic device determines the voltage and frequency when the first noise is detected and the signal-to-noise ratio corresponding to the first noise is less than the preset threshold. The preset threshold is a preset signal-to-noise ratio.
[0136] Step S302: The electronic device sends voltage indication information to the stylus pen, where the voltage indication information includes a voltage value corresponding to the voltage.
[0137] The voltage indication information is used to instruct the stylus pen to adjust the voltage to the voltage value.
[0138] In some embodiments, the voltage of the stylus has multiple candidate voltage values, and the electronic device selects a voltage value from the multiple candidate voltage values, and the voltage indication information includes the selected voltage value. In addition, in order to improve the anti-interference ability of the stylus, the voltage of the stylus needs to be increased, so the selected voltage value is greater than the current voltage value of the stylus. For example, the voltage of the stylus can be 40V, 50V, or 60V. If the current voltage value of the stylus is 40V, 50V or 60V can be selected.
[0139] Optionally, a voltage value is selected from a plurality of candidate voltage values according to the signal-to-noise ratio corresponding to the first noise. For example, if the signal-to-noise ratio is less than a preset threshold value, and the difference between the signal-to-noise ratio and the preset threshold value is large, that is, the first noise is large, then a larger voltage value can be selected from the candidate voltage values that are larger than the current voltage value; or, if the signal-to-noise ratio is less than the preset threshold value, and the difference between the signal-to-noise ratio and the preset threshold value is small, that is, the first noise is small, then a smaller voltage value can be selected from the candidate voltage values that are larger than the current voltage value, thereby ensuring that the anti-interference ability of the stylus is enhanced by increasing the voltage of the stylus, while saving the power consumption of the stylus as much as possible.
[0140] Step S303: the stylus adjusts the voltage to the voltage value according to the received voltage indication information.
[0141] Step S304: the stylus returns voltage adjustment success information to the electronic device.
[0142] After receiving the voltage indication information, the stylus determines the voltage value to be adjusted and adjusts the voltage from the current voltage value to the voltage value included in the voltage indication information. After adjusting the voltage, a voltage adjustment success message is returned to the electronic device, and the voltage adjustment success message is used to indicate that the voltage of the stylus has been adjusted. The voltage adjustment success message can be ACK (Acknowledgement) or other forms, and the embodiment of the present disclosure does not limit the form of the voltage adjustment success message.
[0143] It should be noted that if the stylus does not adjust the voltage, no notification of successful voltage adjustment is returned to the electronic device.
[0144] Step S305 , in response to receiving the voltage adjustment success information returned by the stylus, the electronic device sends frequency indication information to the stylus, where the frequency indication information includes a frequency value corresponding to the frequency.
[0145] After receiving the voltage adjustment success information, the electronic device determines that the stylus has adjusted the voltage, and then sends frequency indication information to the stylus. The frequency indication information includes a frequency value corresponding to the frequency. The frequency indication information is used to instruct the stylus to adjust the frequency to the frequency value.
[0146] In some embodiments, the frequency of the stylus has multiple candidate frequency values, and the electronic device selects a frequency value from the multiple candidate frequency values, and the frequency indication information includes the selected frequency value. In addition, in order to improve the anti-interference ability of the stylus, it is necessary to make the frequency of the stylus dissimilar to the frequency of the first noise, so the selected frequency value needs to be significantly different from the frequency value of the first noise. For example, the frequency of the stylus can be a, b, c, d, and the current frequency value of the stylus is a, then any one of b, c, and d can be selected.
[0147] In some embodiments, the frequency value includes a tip (tip electrode) frequency value and a ring (ring electrode) frequency value, and these two frequency values may be the same or different.
[0148] Step S306: The stylus adjusts the frequency to the frequency value according to the received frequency indication information.
[0149] Step S307: The stylus returns frequency adjustment success information to the electronic device.
[0150] After receiving the frequency indication information, the stylus determines the frequency value to be adjusted and adjusts the frequency from the current frequency value to the frequency value included in the frequency indication information. After the frequency is adjusted, a frequency adjustment success message is returned to the electronic device, and the frequency adjustment success message is used to indicate that the frequency of the stylus has been adjusted. The frequency adjustment success message can be ACK (Acknowledgement) or other forms, and the embodiment of the present disclosure does not limit the form of the frequency adjustment success message.
[0151] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the voltage and frequency, and sends voltage indication information and frequency indication information to the stylus in sequence. The stylus adjusts the voltage and frequency in sequence to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0152] Below through Figure 4 The illustrated embodiment illustrates an adjustment method of first adjusting the frequency and then adjusting the voltage. In this adjustment method, at least one control parameter includes voltage and frequency, and the first indication information includes voltage indication information and frequency indication information.
[0153] Figure 4 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 4 , the method comprises the following steps:
[0154] Step S401: the electronic device detects a first noise and determines a voltage and a frequency.
[0155] The implementation of step S401 refers to the above step S301 and will not be described in detail here.
[0156] Step S402: The electronic device sends frequency indication information to the stylus, where the frequency indication information includes a frequency value corresponding to the frequency.
[0157] The frequency indication information is used to instruct the stylus pen to adjust the frequency to the frequency value.
[0158] The method for determining the frequency value in step S402 refers to the above step S305 and will not be described in detail here.
[0159] Step S403: the stylus adjusts the frequency to the frequency value according to the received frequency indication information.
[0160] Step S404: the stylus returns frequency adjustment success information to the electronic device.
[0161] It should be noted that if the stylus does not adjust the frequency, no notification of successful frequency adjustment is returned to the electronic device.
[0162] Step S405 , in response to receiving the frequency adjustment success information returned by the stylus, the electronic device sends voltage indication information to the stylus, where the voltage indication information includes a voltage value corresponding to the voltage.
[0163] The method for determining the voltage value in step S405 refers to the above step S302 and will not be repeated here.
[0164] Step S406: the stylus adjusts the voltage to the voltage value according to the received voltage indication information.
[0165] Step S407: the stylus returns voltage adjustment success information to the electronic device.
[0166] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the voltage and frequency, and sends frequency indication information and voltage indication information to the stylus in sequence. The stylus adjusts the frequency and voltage in sequence to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0167] Below through Figure 5 The illustrated embodiment describes an adjustment method of first adjusting the voltage and then adjusting the frequency when noise is still detected after the voltage is adjusted. In this adjustment method, at least one control parameter includes voltage and frequency, and the first indication information includes voltage indication information and frequency indication information.
[0168] Figure 5 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 5 , the method comprises the following steps:
[0169] Step S501: the electronic device detects a first noise and determines a voltage and a frequency.
[0170] Step S502: The electronic device sends voltage indication information to the stylus pen, where the voltage indication information includes a voltage value corresponding to the voltage.
[0171] Step S503: the stylus adjusts the voltage to the voltage value according to the received voltage indication information.
[0172] Step S504: the stylus returns voltage adjustment success information to the electronic device.
[0173] The implementation of steps S501-S504 refers to the above steps S301-S304, which will not be described in detail here.
[0174] Step S505 , in response to receiving the voltage adjustment success information returned by the stylus and detecting the second noise satisfying the first condition, the electronic device sends frequency indication information to the stylus, where the frequency indication information includes a frequency value corresponding to the frequency.
[0175] In the disclosed embodiment, after receiving the voltage adjustment success information, the electronic device performs noise detection again, and determines whether to perform subsequent frequency adjustment according to the noise detection situation.
[0176] In some embodiments, after the electronic device detects the second noise, it obtains the coding signal of the stylus, and determines the signal-to-noise ratio corresponding to the second noise based on the second noise and the coding signal. When the signal-to-noise ratio is less than a preset threshold, it means that the second noise is large. At this time, the stylus is still affected by the noise, so the frequency of the stylus needs to be adjusted. In other words, when the electronic device detects the second noise and meets the first condition, it sends frequency indication information to the stylus. The second noise meets the first condition when the signal-to-noise ratio corresponding to the second noise is less than the preset threshold.
[0177] In some embodiments, the second noise may be the same as or different from the first noise. If the first noise does not change after the first noise is detected and the voltage is adjusted, the detected second noise is the same as the first noise; if the first noise is weakened or strengthened, or a new noise is generated after the first noise is detected and the voltage is adjusted, the second noise is different from the first noise. However, even if the second noise is different from the first noise, the second noise is also noise that affects the wireless communication between the electronic device and the stylus, and the second noise is generated in a similar way to the first noise.
[0178] The method for determining the frequency value in step S505 refers to the above step S305, which will not be repeated here.
[0179] Step S506: The stylus pen adjusts the frequency to the frequency value according to the received frequency indication information.
[0180] Step S507: The stylus returns frequency adjustment success information to the electronic device.
[0181] It should be noted that, in the embodiment of the present disclosure, the step of adjusting the frequency of the stylus pen is performed only when the second noise satisfying the first condition is detected. When the second noise is not detected or the detected second noise does not satisfy the first condition, the step of adjusting the frequency of the stylus pen is no longer performed.
[0182] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the voltage and frequency, and first sends voltage indication information to the stylus, and the stylus adjusts the voltage first. After the voltage is adjusted, if it is still affected by the noise, the electronic device continues to send frequency indication information to the stylus, and the stylus adjusts the frequency again, so as to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0183] Below through Figure 6 The illustrated embodiment describes an adjustment method of first adjusting the frequency and then adjusting the voltage when noise is still detected after the frequency adjustment. In this adjustment method, at least one control parameter includes voltage and frequency, and the first indication information includes voltage indication information and frequency indication information.
[0184] Figure 6 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 6 , the method comprises the following steps:
[0185] Step S601: the electronic device detects a first noise and determines a voltage and a frequency.
[0186] Step S602: The electronic device sends frequency indication information to the stylus pen, where the frequency indication information includes a frequency value corresponding to the frequency.
[0187] Step S603: the stylus adjusts the frequency to the frequency value according to the received frequency indication information.
[0188] Step S604: the stylus returns frequency adjustment success information to the electronic device.
[0189] The implementation of steps S601-S604 refers to the above steps S401-S404, which will not be repeated here.
[0190] Step S605 , in response to receiving the frequency adjustment success information returned by the stylus and detecting the second noise satisfying the first condition, the electronic device sends voltage indication information to the stylus, where the voltage indication information includes a voltage value corresponding to the voltage.
[0191] The process of detecting the second noise refers to the above step S505 and will not be described in detail here.
[0192] Step S606: The stylus pen adjusts the voltage to the voltage value according to the received voltage indication information.
[0193] Step S607: the stylus returns voltage adjustment success information to the electronic device.
[0194] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the voltage and frequency, and first sends frequency indication information to the stylus, and the stylus first adjusts the frequency. After the frequency is adjusted, if it is still affected by the noise, the electronic device continues to send voltage indication information to the stylus, and the stylus adjusts the voltage again, so as to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0195] Below through Figure 7 The illustrated embodiment illustrates a method for adjusting voltage. In this adjustment method, at least one control parameter includes voltage, and the first indication information includes voltage indication information.
[0196] Figure 7 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 7 , the method comprises the following steps:
[0197] Step S701: the electronic device detects a first noise and determines a voltage.
[0198] Step S702: The electronic device sends voltage indication information to the stylus pen, where the voltage indication information includes a voltage value corresponding to the voltage.
[0199] That is, the electronic device sends first indication information to the stylus pen, where the first indication information includes a voltage value corresponding to the voltage, and the first indication information is used to instruct the stylus pen to adjust the voltage to the voltage value.
[0200] Step S703: the stylus adjusts the voltage to the voltage value according to the received voltage indication information.
[0201] Step S704: the stylus returns voltage adjustment success information to the electronic device.
[0202] The implementation of steps S701-S704 refers to the above steps S301-S304, which will not be repeated here.
[0203] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the voltage, sends voltage indication information to the stylus, and the stylus adjusts the voltage to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0204] Below through Figure 8 The illustrated embodiment illustrates an adjustment method for adjusting frequency and an adjustment method for adjusting voltage and frequency. In this adjustment method, at least one control parameter includes frequency, and the first indication information includes frequency indication information.
[0205] Figure 8 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Figure 8 , the method comprises the following steps:
[0206] Step S801: The electronic device detects a first noise and determines a frequency.
[0207] Step S802: The electronic device sends frequency indication information to the stylus pen, where the frequency indication information includes a frequency value corresponding to the frequency.
[0208] The frequency indication information is used to instruct the stylus to adjust the frequency to a frequency value.
[0209] After receiving the frequency indication information, the stylus performs steps S803 and S804, or performs steps S805 and S806.
[0210] Step S803: the stylus adjusts the frequency to the frequency value and the voltage to a voltage value different from the current voltage value according to the received frequency indication information.
[0211] Step S804: The stylus returns frequency and voltage adjustment success information to the electronic device.
[0212] In steps S803 and S804, after receiving the frequency indication information, the stylus determines that the frequency needs to be adjusted. At this time, the stylus can determine that the interaction between the stylus and the electronic device is interfered by noise, and adjusts the voltage while adjusting the frequency. The adjusted voltage value is different from the current voltage value and is greater than the current voltage value.
[0213] Step S805: The stylus adjusts the frequency to the frequency value according to the received frequency indication information.
[0214] Step S806: The stylus returns a frequency adjustment success message to the electronic device.
[0215] In steps S805 and S806, after receiving the frequency indication information, the stylus adjusts the frequency but does not adjust the voltage.
[0216] According to the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines the frequency, sends frequency indication information to the stylus, and the stylus adjusts the frequency, or adjusts the frequency and voltage, to improve the anti-interference ability of the stylus and avoid abnormal functions of the stylus.
[0217] It should be noted that the above Figure 8 In the embodiment shown, when adjusting the frequency and voltage at the same time, the frequency indication information is sent. After the stylus receives the frequency indication information, it is considered that the wireless communication between the current electronic device and the stylus is affected, and the voltage is adjusted while adjusting the frequency. In another embodiment, in order to adjust the frequency and voltage at the same time, the electronic device can also send the frequency indication information and the voltage indication information to the stylus at the same time. The stylus adjusts the frequency to the corresponding frequency value and the voltage to the corresponding voltage value according to the received frequency indication information and the voltage indication information.
[0218] One point that needs to be explained is that, with respect to the frequency adjustment shown in the above-mentioned implementation mode, in some embodiments, when the electronic device receives the frequency adjustment success information returned by the stylus, in response to receiving the frequency adjustment success information, the downlink frequency is adjusted to the frequency value included in the frequency indication information, so that the downlink frequency of the electronic device is consistent with the frequency of the stylus, thereby allowing the electronic device to accurately receive the operation of the stylus.
[0219] Another point that needs to be explained is that, for the above-mentioned multiple adjustment methods, when actually adjusting the voltage and / or frequency of the stylus pen, a suitable adjustment method can be selected according to actual needs.
[0220] For example, the frequency of the first noise detected is relatively close to the current frequency of the stylus. In this case, the interference of the noise can be reduced more quickly by adjusting the frequency. Therefore, you can give priority to adjusting the frequency of the stylus, that is, choose any one of "adjust the frequency first, then adjust the voltage", "adjust the frequency first, and when noise is still detected after adjusting the frequency, adjust the voltage", "adjust the frequency" and "adjust the voltage and frequency at the same time".
[0221] For another example, the frequency of the first noise detected is close to the current frequency of the stylus and the battery of the stylus is low. In this case, it is necessary to save power as much as possible and avoid adjusting the voltage as much as possible. That is, you can choose "adjust the frequency first, and then adjust the voltage if noise is still detected after adjusting the frequency" or "adjust the frequency".
[0222] For another example, in order to reduce the modification of the settings of the electronic device, that is, not to modify the downlink frequency of the electronic device, in this case, you can give priority to selecting any one of "adjusting the voltage" or "adjusting the voltage first, and then adjusting the frequency when noise is still detected after adjusting the voltage".
[0223] In some embodiments, after the voltage and / or frequency of the stylus pen is adjusted by the above-mentioned implementation, when the noise disappears or the noise is reduced to the point where it does not affect the use of the stylus pen, the voltage and / or frequency of the stylus pen needs to be adjusted to the main voltage and / or main frequency. Fig. 9 The illustrated embodiment illustrates the process of re-adjusting the voltage and frequency of the stylus pen to the main voltage and main frequency.
[0224] Fig. 9 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Fig. 9 , the method comprises the following steps:
[0225] Step S901: The electronic device detects no noise or the detected third noise meets a second condition, and sends second indication information to the stylus pen, where the second indication information includes a preset voltage value and a preset frequency value.
[0226] The second indication information is used to instruct the stylus to adjust the voltage to a preset voltage value and the frequency to a preset frequency value, and the third noise satisfies the second condition when the signal-to-noise ratio corresponding to the third noise is greater than or equal to a preset threshold. The preset voltage value is the main voltage, and the preset frequency value is the main frequency.
[0227] Step S902: the stylus adjusts the voltage to a preset voltage value and the frequency to a preset frequency value according to the received second indication information.
[0228] Step S903: The stylus returns frequency and voltage adjustment success information to the electronic device.
[0229] It should be noted that, in another embodiment, if the stylus pen adjusts the frequency, the frequency is adjusted to a preset frequency value; if the stylus pen adjusts the voltage, the voltage is adjusted to a preset frequency value.
[0230] In the embodiment of the present disclosure, after the voltage and / or frequency of the stylus is adjusted, when the noise disappears or the noise is reduced to a level that does not affect the use of the stylus, the voltage and / or frequency of the stylus is adjusted back to the main voltage and / or main frequency so as not to affect the subsequent use of the stylus.
[0231] It should be noted that, through the above Figure 3-Figure 8 Before adjusting the voltage and / or frequency in any embodiment, if the electronic device does not detect noise, the electronic device does not need to execute the step of sending the first indication information, and the stylus pen and the electronic device can wirelessly communicate according to the preset voltage value and the preset frequency value. That is, when not interfered by noise, the preset voltage value and the preset frequency value are default values, and when interfered by noise, the preset voltage value is adjusted to another voltage value, and / or the preset frequency value is adjusted to another frequency value.
[0232] In some embodiments, the stylus can be connected to different electronic devices. It is possible that when the electronic device sends a first indication message to the stylus, the stylus is connected to the electronic device. However, when the stylus receives the first indication message and is about to adjust the frequency and / or voltage, the stylus switches to connect to another electronic device. In this case, it is not necessary to adjust the frequency and / or voltage according to the first indication message. Therefore, before adjusting the frequency and / or voltage, the stylus needs to determine whether the stylus is still connected to the electronic device. Fig.10 The illustrated embodiment explains how to implement this case.
[0233] Fig.10 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Fig.10 , the method comprises the following steps:
[0234] Step S1001: The electronic device detects a first noise and determines at least one control parameter, where the at least one control parameter includes at least one of a voltage and a frequency.
[0235] The implementation of step S1001 refers to step S101 and will not be described in detail here.
[0236] Step S1002: The electronic device sends first indication information to the stylus pen, where the indication information includes at least one parameter value and a first pen tip identifier.
[0237] The first pen tip identifier is a pen tip identifier when determining at least one control parameter, and the first indication information is used to instruct the stylus to adjust at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device. The electronic device corresponds to at least one pen tip identifier, and when the electronic device is connected to the stylus, the pen tip identifier of the electronic device is consistent with the pen tip identifier of the stylus.
[0238] Step S1003: The stylus determines, based on the received first indication information, whether the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device.
[0239] The first pen tip identifier and the second pen tip identifier may be the same or different. When the first pen tip identifier and the second pen tip identifier are the same, it is determined that the first pen tip identifier and the second pen tip identifier correspond to the same electronic device; when the first pen tip identifier and the second pen tip identifier are different, the first pen tip identifier and the second pen tip identifier may correspond to the same electronic device or may correspond to different electronic devices.
[0240] In some embodiments, the stylus stores a correspondence between the pen tip identifier and the device identifier of the electronic device, and the stylus queries whether the first pen tip identifier and the second pen tip identifier correspond to the same electronic device based on the correspondence.
[0241] For example, the tablet has corresponding pen tip identifiers ID0 and ID1. When the pen tip identifier is ID0, the tablet detects a first noise and then sends a first indication message to the stylus. The first indication message includes a parameter value to be adjusted and ID0. In the process of sending the first indication message, the foreground application displayed by the tablet is switched. The frame rate corresponding to the foreground application after the switch is different from the frame rate of the foreground application before the switch. At this time, the pen tip identifier is also switched to ID1. At the same time, the pen tip identifier of the stylus is also switched to ID1 through uplink (a port). When the stylus receives the first indication message including ID0, ID0 is different from ID1, but it can be determined that ID0 and ID1 correspond to the tablet.
[0242] Step S1004: When the first pen tip identifier and the current second pen tip identifier of the stylus pen correspond to the same electronic device, the stylus adjusts at least one control parameter to a corresponding parameter value.
[0243] In another embodiment, when the first pen tip identifier and the second pen tip identifier correspond to different electronic devices, the stylus no longer adjusts the voltage and / or frequency.
[0244] In the method provided by the embodiment of the present disclosure, the electronic device detects the first noise, determines at least one control parameter, and sends a first indication information to the stylus, the first indication information indicates at least one parameter value and a first pen tip identifier, and the stylus adjusts at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device, and by sending the voltage value of the voltage and / or the frequency value of the frequency to the stylus, the stylus adjusts the voltage and / or the frequency, thereby improving the anti-interference ability of the stylus and avoiding abnormal functions of the stylus. In addition, by comparing whether the pen tip identifiers are from the same electronic device, it is possible to avoid erroneous operations when the stylus is connected to other electronic devices.
[0245] It should be noted that Fig.10 The embodiment shown can be combined with the above Figure 3-Figure 9 The embodiment shown in the above Figure 3-Figure 9 In the illustrated embodiment, the voltage indication information, frequency indication information and second indication information sent by the electronic device may also include a first pen tip identifier. When the stylus receives the voltage indication information, the frequency indication information or the second indication information, the stylus adjusts at least one control parameter to a corresponding parameter value if the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device.
[0246] In some embodiments, the electronic device includes a touch firmware unit, a drive unit and a Bluetooth unit. When the electronic device sends instruction information to the stylus or receives adjustment success information returned by the stylus, it needs to go through the touch firmware unit, the drive unit and the Bluetooth unit. Fig.11 The illustrated embodiment illustrates the operations performed by the touch firmware unit, the driving unit, and the Bluetooth unit.
[0247] Fig.11 is a flow chart showing another control method according to an exemplary embodiment, which is executed by an electronic device and a stylus pen, see Fig.11 , the method comprises the following steps:
[0248] Step S1101: The electronic device detects a first noise through a touch firmware unit and sends an adjustment request to a driving unit.
[0249] The adjustment request carries at least one parameter identifier corresponding to a control parameter, and the parameter identifier is used to represent a parameter value corresponding to the control parameter. Different parameter identifiers represent different parameter values.
[0250] Step S1102: The electronic device receives the adjustment request through the driving unit and sends the adjustment request to the Bluetooth unit.
[0251] Step S1103: The electronic device determines, through the Bluetooth unit, a parameter value corresponding to at least one control parameter according to the adjustment request, and sends first indication information to the stylus.
[0252] In the disclosed embodiment, the touch firmware unit initiates the adjustment request, and the electronic device needs to interact with the stylus through the Bluetooth unit. Therefore, after the touch firmware unit initiates the adjustment request, the adjustment request is sent to the Bluetooth unit through the driving unit inside the electronic device. During the transmission inside the electronic device, in order to reduce the amount of data transmitted, the adjustment request carries a parameter identifier, and then the Bluetooth module determines the parameter value to be sent according to the parameter identifier.
[0253] For example, see Table 1 below:
[0254] Table 1
[0255] The frequency number in Table 1 is a parameter identifier, the frequency number of the main frequency of the stylus is 0, the main frequency is a, and the frequency hopping frequency is other frequencies that the stylus can adjust. In the process of sending an adjustment request, the adjustment request only needs to carry the frequency number, but not the specific frequency. Finally, the Bluetooth module determines the specific frequency according to the relationship shown in Table 1.
[0256] It should be noted that the stylus operation in Table 1 refers to the case of "adjusting voltage and frequency at the same time". When the frequency number is 0, after sending frequency a to the stylus, the stylus adjusts the frequency to the main frequency a and switches the voltage to 40V. When the frequency number is 1, frequency b is sent to the stylus, the stylus adjusts the frequency to frequency b and switches the voltage to 60V. The same applies to others.
[0257] It should be noted that, in another embodiment, the adjustment request is received by the driving unit, and the parameter identifier carried in the adjustment request is sent to the Bluetooth unit. The parameter value corresponding to at least one control parameter is determined according to the parameter identifier through the Bluetooth unit, and the first indication information is sent to the stylus.
[0258] Step S1104: the stylus adjusts at least one control parameter to a corresponding parameter value according to the received first indication information.
[0259] In some embodiments, the stylus receives the first indication information via a Bluetooth unit of the stylus.
[0260] Step S1105: The touch pen returns adjustment success information to the Bluetooth unit.
[0261] Step S1106: the electronic device sends adjustment success information to the driving unit via the Bluetooth unit.
[0262] Step S1107: the electronic device sends adjustment success information to the touch firmware unit via the driving unit.
[0263] In some embodiments, when the electronic device sends adjustment success information to the driving unit via the Bluetooth unit, it also needs to send the parameter values adjusted by the stylus, that is, send the voltage value and / or frequency value adjusted by the stylus, so that the touch firmware unit can understand the voltage value and / or frequency value adjusted by the stylus.
[0264] Optionally, when the stylus pen adjusts the frequency to a frequency value included in the first indication information, the downlink frequency is adjusted to the frequency value through the touch firmware unit.
[0265] In the disclosed embodiment, after the first noise is detected by the touch firmware unit, the voltage value and / or the frequency value of the frequency are sent to the stylus through the interaction between the touch firmware unit, the driving unit, and the Bluetooth unit in the electronic device and the stylus, so that the stylus adjusts the voltage and / or the frequency, thereby improving the anti-interference ability of the stylus and avoiding abnormal functions of the stylus. In addition, what is transmitted inside the electronic device is the parameter identifier, not the specific parameter value, which can reduce the amount of data transmitted.
[0266] Below through Figure 12-14 The illustrated embodiment illustrates a process of adjusting voltage and frequency simultaneously, a process of adjusting voltage first and then adjusting frequency, and a process of adjusting voltage first and then adjusting frequency when noise is detected again.
[0267] In one example, the process of adjusting voltage and frequency simultaneously is shown in Fig.12 , including the following steps:
[0268] 1. The touch firmware unit detects the first noise and initiates a frequency hopping request to the driving unit. The frequency hopping request carries a frequency number 1.
[0269] The frequency hopping request is equivalent to the above adjustment request, and the frequency number is equivalent to the above parameter identifier.
[0270] 2. The driving unit sends frequency number 1 and pen tip identification ID1 to the first Bluetooth unit.
[0271] Among them, the first Bluetooth unit is a Bluetooth unit of the electronic device, and the pen tip identifier is determined by the driving unit according to the current display frame rate.
[0272] 3. The first Bluetooth unit transmits the frequency value b corresponding to the frequency number 1 and the pen tip identification ID1 to the second Bluetooth unit.
[0273] The second Bluetooth unit is a Bluetooth unit of the stylus pen.
[0274] The first Bluetooth unit transmits the frequency value b and the pen tip identification ID1 to the second Bluetooth unit, which can be: the first Bluetooth unit sends first indication information to the second Bluetooth unit, and the first indication information includes the frequency value b and the pen tip identification ID1.
[0275] 4. The second Bluetooth unit receives the frequency value b and the pen tip identification ID1. When the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device, the frequency is adjusted to the frequency value b and the voltage is adjusted to the anti-noise voltage e.
[0276] 5. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0277] 6. After receiving the ACK, the first Bluetooth unit sends a first notification to the driving unit. The first notification is used to indicate that the voltage and frequency of the stylus pen are adjusted successfully, and the first notification includes the frequency number 1.
[0278] 7. The driving unit sends a CMD (command) to the touch control firmware unit, where the CMD instructs the touch control firmware unit to modify the DL (downlink) frequency to the frequency value b corresponding to the frequency number 1.
[0279] In one example, the process of adjusting the voltage first and then adjusting the frequency is shown in Fig.13 , including the following steps:
[0280] 1. The touch firmware unit detects the first noise and initiates a frequency hopping request to the driving unit. The frequency hopping request carries a frequency number 1.
[0281] 2. The driving unit sends a voltage switching request and the pen tip identification ID1 to the first Bluetooth unit. The voltage switching request carries the voltage number 1.
[0282] 3. The first Bluetooth unit transmits the anti-noise voltage e corresponding to the voltage number 1 and the pen tip identification ID1 to the second Bluetooth unit.
[0283] 4. The second Bluetooth unit receives the anti-noise voltage e and the pen tip identification ID1, and adjusts the voltage to the anti-noise voltage e when the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device.
[0284] 5. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0285] 6. After receiving the ACK, the first Bluetooth unit sends a second notification to the driving unit. The second notification is used to indicate that the voltage adjustment of the stylus pen is successful, and the second notification includes the voltage number 1.
[0286] 7. The driving unit sends a second notification to the touch firmware unit.
[0287] 8. The driving unit sends frequency number 1 and pen tip identification ID1 to the first Bluetooth unit.
[0288] 9. The first Bluetooth unit transmits the frequency value b corresponding to the frequency number 1 and the pen tip identification ID1 to the second Bluetooth unit.
[0289] 10. The second Bluetooth unit receives the frequency value b and the pen tip identification ID1, and adjusts the frequency to the frequency value b when the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device.
[0290] 11. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0291] 12. After receiving the ACK, the first Bluetooth unit sends a third notification to the driving unit. The third notification is used to indicate that the frequency adjustment of the stylus pen is successful, and the third notification includes the frequency number 1.
[0292] 13. The driving unit sends a CMD to the touch control firmware unit, where the CMD instructs the touch control firmware unit to modify the DL frequency to the frequency value b corresponding to the frequency number 1.
[0293] In one example, the voltage is adjusted first, and when noise is detected again, the frequency is adjusted. Fig.14 , including the following steps:
[0294] 1. The touch firmware unit detects the first noise and initiates a frequency hopping request to the driving unit. The frequency hopping request carries a frequency number 1.
[0295] 2. The driving unit sends a voltage switching request and the pen tip identification ID1 to the first Bluetooth unit. The voltage switching request carries the voltage number 1.
[0296] 3. The first Bluetooth unit transmits the anti-noise voltage e corresponding to the voltage number 1 and the pen tip identification ID1 to the second Bluetooth unit.
[0297] 4. The second Bluetooth unit receives the anti-noise voltage e and the pen tip identification ID1, and adjusts the voltage to the anti-noise voltage e when the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device.
[0298] 5. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0299] 6. After receiving the ACK, the first Bluetooth unit sends a second notification to the driving unit. The second notification is used to indicate that the voltage adjustment of the stylus pen is successful, and the second notification includes the voltage number 1.
[0300] 7. The driving unit sends a second notification to the touch firmware unit.
[0301] 8. The touch firmware unit performs noise detection. When the signal-to-noise ratio corresponding to the detected second noise is less than a preset threshold, step 9 is executed. When the signal-to-noise ratio corresponding to the second noise is not less than the preset threshold, steps 9-15 are no longer executed.
[0302] 9. The touch control firmware unit initiates a frequency hopping request to the drive unit again. The frequency hopping request carries a frequency number 1.
[0303] 10. The driving unit sends frequency number 1 and pen tip identification ID1 to the first Bluetooth unit.
[0304] 11. The first Bluetooth unit transmits the frequency value b corresponding to the frequency number 1 and the pen tip identification ID1 to the second Bluetooth unit.
[0305] 12. The second Bluetooth unit receives the frequency value b and the pen tip identification ID1, and adjusts the frequency to the frequency value b when the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device.
[0306] 13. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0307] 14. After receiving the ACK, the first Bluetooth unit sends a third notification to the driving unit. The third notification is used to indicate that the frequency adjustment of the stylus pen is successful, and the third notification includes the frequency number 1.
[0308] 15. The driving unit sends a CMD to the touch control firmware unit, where the CMD instructs the touch control firmware unit to modify the DL frequency to the frequency value b corresponding to the frequency number 1.
[0309] 16. After a period of time, the touch firmware unit detects no noise or the signal-to-noise ratio corresponding to the detected third noise is not less than a preset threshold, and initiates a request to adjust back to the main frequency. The request to adjust back to the main frequency carries the frequency number 0.
[0310] Among them, frequency number 0 is the number corresponding to the main frequency a.
[0311] 17. The driving unit sends frequency number 0, voltage number 0 and pen tip identification ID1 to the first Bluetooth unit.
[0312] Among them, frequency number 0 is the number corresponding to the main voltage f.
[0313] 18. The first Bluetooth unit transmits the main frequency a corresponding to the frequency number 0, the main voltage f corresponding to the voltage number, and the pen tip identification ID1 to the second Bluetooth unit.
[0314] 19. The second Bluetooth unit receives the main frequency a, the main voltage f and the pen tip identification ID1. When the pen tip identification ID1 and the current pen tip identification of the stylus correspond to the same electronic device, the frequency is adjusted to the main frequency a and the voltage is adjusted to the main voltage f.
[0315] 20. The second Bluetooth unit sends an ACK to the first Bluetooth unit.
[0316] 21. After receiving the ACK, the first Bluetooth unit sends a fourth notification to the driving unit. The fourth notification is used to indicate that the voltage and frequency of the stylus pen are adjusted successfully, and the fourth notification includes a frequency number 0 and a voltage number 0.
[0317] 22. The driving unit sends a CMD to the touch control firmware unit, where the CMD instructs the touch control firmware unit to modify the DL frequency to the main frequency a.
[0318] Fig.15 is a block diagram of an electronic device according to an exemplary embodiment. Fig.15 , the electronic device comprises:
[0319] The parameter determination module 1501 is configured to detect a first noise and determine at least one control parameter; the first noise is noise that affects the wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device;
[0320] The information sending module 1502 is configured to send first indication information to the stylus, where the first indication information includes at least one parameter value, each parameter value corresponds to a control parameter, and the first indication information is used to adjust the at least one control parameter to a corresponding parameter value;
[0321] The control module 1503 is configured to control the wireless communication between the stylus pen and the electronic device in response to the adjusted parameter value.
[0322] In some embodiments, the at least one control parameter includes at least one of voltage and frequency, and the information sending module 1502 is configured to:
[0323] Sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus;
[0324] The voltage indication information includes a voltage value corresponding to the voltage, and the voltage indication information is used to indicate that the voltage is adjusted to the voltage value; the frequency indication information includes a frequency value corresponding to the frequency, and the frequency indication information is used to indicate that the frequency is adjusted to the frequency value.
[0325] In some embodiments, the information sending module 1502 is configured to:
[0326] sending voltage indication information to the stylus;
[0327] In response to receiving the voltage adjustment success information returned by the stylus, frequency indication information is sent to the stylus.
[0328] In some embodiments, the information sending module 1502 is configured to:
[0329] Sending frequency indication information to the stylus;
[0330] In response to receiving the frequency adjustment success information returned by the stylus, voltage indication information is sent to the stylus.
[0331] In some embodiments, the information sending module 1502 is configured to:
[0332] sending voltage indication information to the stylus;
[0333] In response to receiving voltage adjustment success information returned by the stylus and detecting second noise that meets a first condition, frequency indication information is sent to the stylus, and the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0334] In some embodiments, the information sending module 1502 is configured to:
[0335] Sending frequency indication information to the stylus;
[0336] In response to receiving frequency adjustment success information returned by the stylus and detecting second noise that meets a first condition, voltage indication information is sent to the stylus, and the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
[0337] In some embodiments, the information sending module 1502 is configured to:
[0338] At the same time, voltage indication information and frequency indication information are sent to the stylus.
[0339] In some embodiments, the electronic device further comprises:
[0340] The frequency adjustment module is configured to adjust the downlink frequency to a frequency value in response to receiving frequency adjustment success information returned by the stylus; the downlink frequency is the frequency of receiving the signal sent by the stylus.
[0341] In some embodiments, the information sending module 1502 is further configured to:
[0342] When no noise is detected or the detected third noise meets the second condition, a second indication message is sent to the stylus, the second indication message includes a preset voltage value and a preset frequency value, the second indication message is used to instruct the stylus to adjust the voltage to the preset voltage value and the frequency to the preset frequency value, and the third noise meets the second condition including that the signal-to-noise ratio corresponding to the third noise is greater than or equal to a preset threshold.
[0343] In some embodiments, the first indication information also includes a first pen tip identifier, which is the pen tip identifier when determining at least one control parameter. The first indication information is used to adjust at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device.
[0344] In some embodiments, the electronic device includes a touch firmware unit, a driving unit and a Bluetooth unit, and the parameter determination module 1501 is configured as follows:
[0345] The touch firmware unit detects the first noise and sends an adjustment request to the driving unit, where the adjustment request carries a parameter identifier corresponding to at least one control parameter, where the parameter identifier is used to represent a parameter value corresponding to the control parameter;
[0346] The information sending module 1502 is configured to:
[0347] receiving the adjustment request through the driving unit and sending the adjustment request to the Bluetooth unit;
[0348] Through the Bluetooth unit, according to the adjustment request, a parameter value corresponding to at least one control parameter is determined, and first indication information is sent to the stylus.
[0349] 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.
[0350] Fig.16 is a block diagram of another stylus pen according to an exemplary embodiment, see Fig.16 , the stylus includes:
[0351] The information receiving module 1601 is configured to receive first indication information sent by the electronic device, where the first indication information includes a parameter value corresponding to at least one control parameter, each parameter value corresponds to a control parameter, and the at least one control parameter is determined when the electronic device detects a first noise, the first noise is noise that affects the wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device;
[0352] The parameter value adjustment module 1602 is configured to adjust at least one control parameter to a corresponding parameter value;
[0353] The control module 1603 is configured to control the wireless communication between the stylus pen and the electronic device in response to the adjusted parameter value.
[0354] In some embodiments, the first indication information further includes a first pen tip identifier, where the first pen tip identifier is a pen tip identifier when the electronic device determines the control parameter;
[0355] The parameter value adjustment module 1602 is configured to:
[0356] In a case where the first pen tip identifier and the current second pen tip identifier of the stylus correspond to the same electronic device, at least one control parameter is adjusted to a corresponding parameter value.
[0357] 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.
[0358] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the control method in the above embodiment.
[0359] Fig.17 is a block diagram of an electronic device 1700 according to an exemplary embodiment.
[0360] Reference Fig.17 , the electronic device 1700 may include one or more of the following components: a processing component 1702 , a memory 1704 , a power component 1706 , a multimedia component 1708 , an audio component 1710 , an input / output (I / O) interface 1712 , a sensor component 1714 , and a communication component 1716 .
[0361] The processing component 1702 generally controls the overall operation of the electronic device 1700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1702 may include one or more processors 1720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1702 may include one or more modules to facilitate the interaction between the processing component 1702 and other components. For example, the processing component 1702 may include a multimedia module to facilitate the interaction between the multimedia component 1708 and the processing component 1702.
[0362] The memory 1704 is configured to store various types of data to support operations on the electronic device 1700. Examples of such data include instructions for any application or method operating on the electronic device 1700, contact data, phone book data, messages, pictures, videos, etc. The memory 1704 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.
[0363] The power supply component 1706 provides power to various components of the electronic device 1700. The power supply component 1706 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 1700.
[0364] The multimedia component 1708 includes a screen that provides an output interface between the electronic device 1700 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 1708 includes a front camera and / or a rear camera. When the electronic device 1700 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.
[0365] The audio component 1710 is configured to output and / or input audio signals. For example, the audio component 1710 includes a microphone (MIC), and when the electronic device 1700 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1704 or sent via the communication component 1716. In some embodiments, the audio component 1710 also includes a speaker for outputting audio signals.
[0366] I / O interface 1712 provides an interface between processing component 1702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0367] The sensor assembly 1714 includes one or more sensors for providing various aspects of status assessment for the electronic device 1700. For example, the sensor assembly 1714 can detect the open / closed state of the electronic device 1700, the relative positioning of components, such as the display and keypad of the electronic device 1700, and the sensor assembly 1714 can also detect the position change of the electronic device 1700 or a component of the electronic device 1700, the presence or absence of user contact with the electronic device 1700, the orientation or acceleration / deceleration of the electronic device 1700, and the temperature change of the electronic device 1700. The sensor assembly 1714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1714 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 1714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0368] The communication component 1716 is configured to facilitate wired or wireless communication between the electronic device 1700 and other devices. The electronic device 1700 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 1716 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 1716 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.
[0369] In an exemplary embodiment, the electronic device 1700 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.
[0370] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1704 including instructions, and the instructions can be executed by a processor 1720 of an electronic device 1700 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.
[0371] The embodiments of the present disclosure also provide a non-temporary computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the control method in the above embodiments.
[0372] The embodiments of the present disclosure further provide a stylus pen, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the control method in the above embodiments.
[0373] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the stylus pen, the stylus pen can execute the control method in the above embodiments.
[0374] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0375] It should be understood that the present invention is not limited to the exact construction that has 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 invention is limited only by the appended claims.
Claims
1. A control method, characterized in that: The method comprises: A first noise is detected, and at least one control parameter is determined; the first noise is noise that affects wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device; Sending first indication information to the stylus, the first indication information including at least one parameter value, each parameter value corresponding to one of the control parameters, the first indication information being used to adjust the at least one control parameter to a corresponding parameter value; In response to the adjusted parameter value, wireless communication between the stylus and the electronic device is controlled.
2. The method according to claim 1, characterized in that The at least one control parameter includes at least one of voltage and frequency, and the sending first indication information to the stylus includes: sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus; The voltage indication information includes a voltage value corresponding to the voltage, and the voltage indication information is used to indicate that the voltage is adjusted to the voltage value; the frequency indication information includes a frequency value corresponding to the frequency, and the frequency indication information is used to indicate that the frequency is adjusted to the frequency value.
3. The method according to claim 2, characterized in that The sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus pen comprises: sending the voltage indication information to the stylus; In response to receiving the voltage adjustment success information returned by the stylus, the frequency indication information is sent to the stylus.
4. The method according to claim 2, characterized in that: The sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus pen comprises: sending the frequency indication information to the stylus; In response to receiving the frequency adjustment success information returned by the stylus, the voltage indication information is sent to the stylus.
5. The method according to claim 2, characterized in that: The sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus pen comprises: sending voltage indication information to the stylus; In response to receiving voltage adjustment success information returned by the stylus and detecting second noise that meets a first condition, frequency indication information is sent to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
6. The method according to claim 2, characterized in that The sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus pen comprises: sending frequency indication information to the stylus; In response to receiving frequency adjustment success information returned by the stylus and detecting second noise that meets a first condition, sending voltage indication information to the stylus, wherein the second noise meets the first condition including that a signal-to-noise ratio corresponding to the second noise is less than a preset threshold.
7. The method according to claim 2, characterized in that The sending at least one of voltage indication information corresponding to the voltage and frequency indication information corresponding to the frequency to the stylus pen comprises: The voltage indication information and the frequency indication information are sent to the stylus at the same time.
8. The method according to any one of claims 2 to 7, characterized in that: The method further comprises: In response to receiving the frequency adjustment success information returned by the stylus, the downlink frequency is adjusted to the frequency value; the downlink frequency is the frequency of receiving the signal sent by the stylus.
9. The method according to any one of claims 1 to 7, characterized in that: After sending the first indication information to the stylus, the method further includes: When no noise is detected or the detected third noise satisfies the second condition, second indication information is sent to the stylus, the second indication information includes a preset voltage value and a preset frequency value, the second indication information is used to instruct the stylus to adjust the voltage to the preset voltage value and the frequency to the preset frequency value, and the third noise satisfies the second condition including that the signal-to-noise ratio corresponding to the third noise is greater than or equal to a preset threshold.
10. The method according to any one of claims 1 to 7, characterized in that: The first indication information also includes a first pen tip identifier, which is the pen tip identifier used when determining the at least one control parameter. The first indication information is used to adjust the at least one control parameter to a corresponding parameter value when the first pen tip identifier and the current second pen tip identifier of the stylus pen correspond to the same electronic device.
11. The method according to any one of claims 1 to 7, characterized in that: The electronic device includes a touch firmware unit, a driving unit and a Bluetooth unit, and the detecting of the first noise and determining at least one control parameter include: The touch firmware unit detects the first noise and sends an adjustment request to the driving unit, where the adjustment request carries a parameter identifier corresponding to the at least one control parameter, and the parameter identifier is used to represent a parameter value corresponding to the control parameter; The sending the first indication information to the stylus includes: receiving the adjustment request through the driving unit, and sending the adjustment request to the Bluetooth unit; The Bluetooth unit determines a parameter value corresponding to the at least one control parameter according to the adjustment request, and sends the first indication information to the stylus.
12. A control method, characterized in that: The method comprises: receiving first indication information sent by an electronic device, the first indication information including a parameter value corresponding to at least one control parameter, each parameter value corresponding to a control parameter, the at least one control parameter being determined when the electronic device detects a first noise, the first noise being noise affecting wireless communication between the stylus pen and the electronic device, and the control parameter including a parameter for controlling wireless communication between the stylus pen and the electronic device; adjusting the at least one control parameter to a corresponding parameter value; In response to the adjusted parameter value, wireless communication between the stylus and the electronic device is controlled.
13. The method according to claim 12, characterized in that The first indication information further includes a first pen tip identifier, where the first pen tip identifier is a pen tip identifier when the electronic device determines the control parameter; The adjusting the at least one control parameter to a corresponding parameter value comprises: In a case where the first pen tip identifier and the current second pen tip identifier of the stylus pen correspond to the same electronic device, the at least one control parameter is adjusted to a corresponding parameter value.
14. An electronic device, characterized in that: The electronic device comprises: A parameter determination module is configured to detect a first noise and determine at least one control parameter; the first noise is noise that affects the wireless communication between the stylus pen and the electronic device, and the control parameter includes a parameter for controlling the wireless communication between the stylus pen and the electronic device; an information sending module, configured to send first indication information to the stylus, wherein the first indication information includes at least one parameter value, each parameter value corresponds to one of the control parameters, and the first indication information is used to adjust the at least one control parameter to a corresponding parameter value; The control module is configured to control the wireless communication between the stylus and the electronic device in response to the adjusted parameter value.
15. A touch pen, characterized in that: The stylus pen comprises: an information receiving module, configured to receive first indication information sent by an electronic device, the first indication information including a parameter value corresponding to at least one control parameter, each parameter value corresponding to a control parameter, the at least one control parameter being determined when the electronic device detects a first noise, the first noise being noise affecting wireless communication between the stylus pen and the electronic device, and the at least one control parameter including a parameter for controlling wireless communication between the stylus pen and the electronic device; a parameter value adjustment module, configured to adjust the at least one control parameter to a corresponding parameter value; The control module is configured to control the wireless communication between the stylus and the electronic device in response to the adjusted parameter value.
16. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 11.
17. A touch pen, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 12-13.
18. 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 method as claimed in any one of claims 1 to 11.
19. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by the processor of the stylus, the stylus is enabled to execute the method as described in any one of claims 12-13.
Citation Information
Patent Citations
Information adjustment method and device, electronic equipment and storage medium
CN111562850A
Stylus and coding signal control method
CN112486340A
Method for determining target working frequency of touch pen, touch screen and touch pen
CN114578988A
Driving method and device of display panel, display panel and readable storage medium
CN116185229A
Stylus devices with configurable frequency
US9632598B1