Data signal synchronization method, electronic equipment and storage medium
By transmitting calibration signals between the capacitive pen and the smart terminal for data signal synchronization, the problem of asynchronous data signal transmission is solved, the stability and accuracy of capacitive pen writing is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202310466336.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2024-10-29
AI Technical Summary
When a capacitive pen communicates with a smart terminal, it is easy for the data signal transmission to be out of sync, causing the smart terminal to abnormally parse the data signal, causing the capacitive pen to write disconnected lines and jump points.
By sending the calibration signal together with the writing signal sent by the capacitive pen, the smart terminal receives and uses these calibration signals through the wireless communication module to synchronously calibrate the data signal, adjusting the target duration to ensure the synchronization of the data signal and avoid parsing abnormalities.
It effectively avoids the disconnection and jump points of capacitive pen writing, improves the synchronization stability and accuracy of data signals, and enhances user experience.
Smart Images

Figure CN118860169A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch technology, and in particular to a data signal synchronization method, an electronic device and a storage medium. Background Art
[0002] Since capacitive pens can perform many fine operations that cannot be done with finger touch, and writing and drawing on the terminal touch screen are closer to normal pen usage, more and more users tend to use capacitive pens together with smart terminals such as tablets and smart phones.
[0003] However, when the capacitive pen communicates with the smart terminal, communication interference usually occurs between the two, causing the data signal transmission to be asynchronous, which in turn causes the smart terminal to parse the data signal abnormally, causing the capacitive pen to be disconnected or skipped. Therefore, how to achieve data signal synchronization has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a data signal synchronization method, electronic equipment and storage medium.
[0005] In a first aspect, an embodiment of the present application provides a data signal synchronization method, which is applied to a smart terminal, wherein the smart terminal includes a first wireless communication module, and the method includes:
[0006] When receiving a writing signal sent by the capacitive pen, receiving a calibration signal sent by the capacitive pen through the first wireless communication module;
[0007] According to the calibration signal, the data signal in the writing signal is synchronously calibrated.
[0008] In a second aspect, an embodiment of the present application further provides a data signal synchronization method, which is applied to a capacitive stylus, wherein the capacitive stylus includes a second wireless communication module, and the method includes:
[0009] When sending a writing signal to a smart terminal, a calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal synchronously calibrates the data signal in the writing signal according to the calibration signal.
[0010] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0011] Memory, used to store computer programs;
[0012] The processor is used to implement the steps of the data signal synchronization method described in any embodiment of the first aspect, or implement the steps of the data signal synchronization method described in any embodiment of the second aspect when executing the program stored in the memory.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the data signal synchronization method described in any one of the embodiments of the first aspect are implemented, or the steps of the data signal synchronization method described in any one of the embodiments of the second aspect are implemented.
[0014] In the embodiment of the present application, when receiving the writing signal sent by the capacitive pen, the calibration signal sent by the capacitive pen is received through the first wireless communication module; according to the calibration signal, the data signal in the writing signal is synchronously calibrated. That is to say, when the capacitive pen sends a writing signal to the smart terminal, it will also send a calibration signal to the smart terminal. Even if there is communication interference between the capacitive pen and the smart terminal, the smart terminal can normally receive the calibration signal through the first wireless communication module, and then synchronously calibrate the data signal in the writing signal according to the calibration signal, so as to achieve synchronization of the data signal, avoid abnormal analysis of the data signal by the smart terminal, and cause disconnection and jump of the capacitive pen writing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] Figure 1 A schematic diagram of a flow chart of a data signal synchronization method provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a flow chart of another data signal synchronization method provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of the interaction process between a capacitive stylus and a smart terminal provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a processing flow of a terminal processor provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of another interactive process between a capacitive stylus and a smart terminal provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of a processing flow of another terminal processor provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of a capacitive pen writing signal self-correction process provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the structure of another data signal synchronization device provided in an embodiment of the present application;
[0025] Fig. 9 A schematic diagram of the structure of a data signal synchronization device provided in an embodiment of the present application;
[0026] Fig.10 A schematic diagram of the structure of another data signal synchronization device provided in an embodiment of the present application;
[0027] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] See also Figure 1 , Figure 1 The following is a flow chart of a method for synchronizing a data signal provided in an embodiment of the present application. Figure 1 As shown, the data signal synchronization method is applied to a smart terminal, the smart terminal includes a first wireless communication module, and the method may include the following steps:
[0030] Step 101: When receiving a writing signal sent by a capacitive pen, a calibration signal sent by the capacitive pen is received through a first wireless communication module.
[0031] Specifically, the writing signal refers to the signal generated when the capacitive pen writes on the touch screen of the smart terminal. The writing signal may include a start flag, an end flag and a data signal, wherein the start flag is used to mark the starting position of the writing signal of the current frame, the end flag is used to mark the ending position of the writing signal of the current frame, and the data signal is used to characterize information such as pressure and angle. The first wireless communication module is a wireless communication module on the smart terminal, and the first wireless communication module may include but is not limited to a Bluetooth module, a wireless fidelity module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module. The calibration signal may be transmitted through the wireless communication module to synchronize and calibrate the data signal in the writing signal.
[0032] Step 102: Perform synchronous calibration on the data signal in the writing signal according to the calibration signal.
[0033] In this step, after receiving the writing signal and the calibration signal, the intelligent terminal can synchronously calibrate the data signal in the writing signal according to the calibration signal.
[0034] In this embodiment, when the capacitive pen sends a writing signal to the smart terminal, it will also send a calibration signal to the smart terminal. Even if there is communication interference between the capacitive pen and the smart terminal, the smart terminal can normally receive the calibration signal through the first wireless communication module, and then synchronously calibrate the data signal in the writing signal according to the calibration signal, so as to achieve synchronization of the data signal and avoid abnormal analysis of the data signal by the smart terminal, which may cause disconnection or jumping of the capacitive pen writing.
[0035] Further, the writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal;
[0036] The above step 101, when receiving the writing signal sent by the capacitive pen, receiving the calibration signal sent by the capacitive pen through the first wireless communication module, includes:
[0037] When an end flag bit sent by the capacitive stylus is received, receiving a first sub-calibration signal sent by the capacitive stylus through the first wireless communication module;
[0038] The above step 102, performing synchronous calibration on the data signal in the writing signal according to the calibration signal, includes:
[0039] According to the first sub-calibration signal, the writing end signal corresponding to the end flag is calibrated to obtain a first writing delay time corresponding to the data signal, wherein the first writing delay time is used to represent the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal;
[0040] The target duration is adjusted according to the first writing delay duration, wherein the target duration is the duration from when the smart terminal obtains the writing start signal to when it starts to collect the data signal.
[0041] Specifically, the end flag is used to mark the end position of the writing signal of the current frame, and its representation form can be set according to actual needs, and the embodiment of the present application does not make specific limitations. As an optional implementation, the end flag can be represented by a high-level signal. The first sub-calibration signal can be any form of calibration information that can be recognized by the intelligent terminal. As an optional implementation, the first sub-calibration signal can be represented by the number 1.
[0042] In one embodiment, when the capacitive pen sends an end flag to the smart terminal, it will also send a first sub-calibration signal to the smart terminal. In this way, the touch screen of the smart terminal will receive the end flag and then send a writing end signal to the processor of the smart terminal. In this way, the processor of the smart terminal can calculate the time difference between the two times based on the reception time of the first sub-calibration signal and the reception time of the writing end signal, and use the time difference as the first writing delay duration to adjust the target duration of the smart terminal, thereby achieving synchronization of data signals.
[0043] It should be noted that there is idle time between each frame of writing signals. This idle time can be used to perform time delay compensation for each frame of writing signals so that the time when the capacitive pen sends the start flag and the time when the smart terminal detects the writing start signal are aligned as much as possible (the error is usually in microseconds or milliseconds). In this way, the smart terminal only needs to determine the time from the writing start signal to the start of data signal collection based on the first writing delay duration corresponding to the end flag, thereby achieving data signal synchronization.
[0044] Furthermore, the writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal;
[0045] The above step 101, in the case of receiving a writing signal sent by the capacitive pen, receiving a calibration signal sent by the capacitive pen through the first wireless communication module, further includes:
[0046] When a start flag bit sent by the capacitive stylus is received, receiving a second sub-calibration signal sent by the capacitive stylus through the first wireless communication module;
[0047] The above step 102, performing synchronous calibration on the data signal in the writing signal according to the calibration signal, includes:
[0048] Calibrate the writing start signal corresponding to the start flag according to the second sub-calibration signal to obtain a first calibration result, wherein the first calibration result is used to characterize the time difference between the reception time of the second sub-calibration signal and the reception time of the writing start signal;
[0049] According to the first sub-calibration signal, calibrate the writing end signal corresponding to the end flag to obtain a second calibration result, wherein the second calibration result is used to characterize the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal;
[0050] Determine a second writing delay time length corresponding to the data signal according to the first calibration result and the second calibration result;
[0051] Adjust the target duration according to the second writing delay duration.
[0052] Specifically, the above-mentioned start flag is used to mark the starting position of the writing signal of the current frame, and its representation form can be set according to actual needs, and the embodiment of the present application does not make specific limitations. As an optional implementation, the start flag can be represented by a high-level signal. The above-mentioned second sub-calibration signal can be any form of calibration information that can be recognized by the intelligent terminal. As an optional implementation, the first sub-calibration signal can be represented by the number 0.
[0053] In another embodiment, in addition to sending the first sub-calibration signal to the smart terminal when sending the end flag to the smart terminal, the capacitive pen also sends the second sub-calibration signal to the smart terminal when sending the start flag to the smart terminal. In this way, the smart terminal can calibrate the writing start signal corresponding to the start flag according to the second sub-calibration signal, and calibrate the writing end signal corresponding to the end flag according to the first sub-calibration signal, so as to obtain the second writing delay duration corresponding to the data signal, and then adjust the target duration according to the second writing delay duration, so as to achieve synchronization of the data signal.
[0054] It should be noted that although the existing writing signal transmission protocol can make the time when the capacitive pen sends the start flag and the time when the smart terminal detects the writing start signal be aligned as much as possible, there will inevitably be a time delay of microseconds or milliseconds. Therefore, in this embodiment, the first sub-calibration signal and the second sub-calibration signal are jointly verified to further improve the accuracy of data signal synchronization.
[0055] Further, the first wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
[0056] In this embodiment, the first wireless communication module on the smart terminal can be a combination of one or more of a Bluetooth module, a wireless fidelity module, a short-range wireless communication module, a radio frequency identification module, and a ZigBee module, which is not specifically limited in the embodiment of the present application. As an optional embodiment, a Bluetooth module can be used as the first wireless communication module. By transmitting the calibration signal through the first wireless communication module on the smart terminal, even if there is communication interference between the capacitive pen and the smart terminal, the calibration signal can be transmitted normally, thereby ensuring the stability of the synchronization of the data signal.
[0057] See also Figure 2 , Figure 2 A flowchart of another method for synchronizing a data signal provided in an embodiment of the present application is shown below. Figure 2 As shown, the data signal synchronization method is applied to a capacitive stylus, the capacitive stylus includes a second wireless communication module, and the method includes:
[0058] Step 201: When sending a writing signal to a smart terminal, a calibration signal is sent to the smart terminal through a second wireless communication module, so that the smart terminal synchronously calibrates a data signal in the writing signal according to the calibration signal.
[0059] Specifically, the writing signal refers to the signal generated when the capacitive pen writes on the touch screen of the intelligent terminal. The writing signal may include a start flag, an end flag and a data signal, wherein the start flag is used to mark the starting position of the writing signal of the current frame, the end flag is used to mark the ending position of the writing signal of the current frame, and the data signal is used to characterize information such as pressure and angle. The second wireless communication module is a wireless communication module on the capacitive pen, and the second wireless communication module may include but is not limited to a Bluetooth module, a wireless fidelity module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module. The calibration signal may be transmitted through the wireless communication module to synchronize and calibrate the data signal in the writing signal.
[0060] In this embodiment, when the capacitive pen sends a writing signal to the smart terminal, it will also send a calibration signal to the smart terminal. Even if there is communication interference between the capacitive pen and the smart terminal, the smart terminal can normally receive the calibration signal through the first wireless communication module, and then synchronously calibrate the data signal in the writing signal according to the calibration signal, so as to achieve synchronization of the data signal and avoid abnormal analysis of the data signal by the smart terminal, which may cause disconnection or jumping of the capacitive pen writing.
[0061] Further, the writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal;
[0062] The above step 201, in the case of sending a writing signal to the smart terminal, sending a calibration signal to the smart terminal through the second wireless communication module, includes:
[0063] In the case of sending the end flag to the smart terminal, the first sub-calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal performs synchronous calibration on the data signal according to the first sub-calibration signal.
[0064] Specifically, the end flag is used to mark the end position of the writing signal of the current frame, and its representation form can be set according to actual needs, and the embodiment of the present application does not make specific limitations. As an optional implementation, the end flag can be represented by a high-level signal. The first sub-calibration signal can be any form of calibration information that can be recognized by the intelligent terminal. As an optional implementation, the first sub-calibration signal can be represented by the number 1.
[0065] In one embodiment, when the capacitive pen sends an end flag to the smart terminal, it will also send a first sub-calibration signal to the smart terminal. In this way, the touch screen of the smart terminal will receive the end flag and then send a writing end signal to the processor of the smart terminal. In this way, the processor of the smart terminal can calculate the time difference between the two times based on the reception time of the received first sub-calibration signal and the reception time of the writing end signal, and use the time difference as the first writing delay duration, and adjust the target duration of the smart terminal to achieve synchronization of the data signal.
[0066] It should be noted that there is idle time between each frame of writing signals. This idle time can be used to perform time delay compensation for each frame of writing signals so that the time when the capacitive pen sends the start flag and the time when the smart terminal detects the writing start signal are aligned as much as possible (the error is usually in microseconds or milliseconds). In this way, the smart terminal only needs to determine the time from the writing start signal to the start of data signal collection based on the first writing delay duration corresponding to the end flag, thereby achieving data signal synchronization.
[0067] Furthermore, the writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal;
[0068] The above step 201, in the case of sending a writing signal to the smart terminal, sending a calibration signal to the smart terminal through the second wireless communication module, includes:
[0069] When the start flag is sent to the smart terminal, a second sub-calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal synchronously calibrates the data signal according to the first sub-calibration signal and the second sub-calibration signal.
[0070] Specifically, the above-mentioned start flag is used to mark the starting position of the writing signal of the current frame, and its representation form can be set according to actual needs, and the embodiment of the present application does not make specific limitations. As an optional implementation, the start flag can be represented by a high-level signal. The above-mentioned second sub-calibration signal can be any form of calibration information that can be recognized by the intelligent terminal. As an optional implementation, the first sub-calibration signal can be represented by the number 0.
[0071] In another embodiment, in addition to sending the first sub-calibration signal to the smart terminal when sending the end flag to the smart terminal, the capacitive pen also sends the second sub-calibration signal to the smart terminal when sending the start flag to the smart terminal. In this way, the smart terminal can calibrate the writing start signal corresponding to the start flag according to the second sub-calibration signal, and calibrate the writing end signal corresponding to the end flag according to the first sub-calibration signal, so as to obtain the second writing delay duration corresponding to the data signal, and then adjust the target duration according to the second writing delay duration, so as to achieve synchronization of the data signal.
[0072] It should be noted that although the existing writing signal transmission protocol can make the time when the capacitive pen sends the start flag and the time when the smart terminal detects the writing start signal be aligned as much as possible, there will inevitably be a time delay of microseconds or milliseconds. Therefore, in this embodiment, the first sub-calibration signal and the second sub-calibration signal are jointly verified to further improve the accuracy of data signal synchronization.
[0073] Further, the second wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
[0074] In this embodiment, the second wireless communication module on the capacitive pen can be a combination of one or more of a Bluetooth module, a wireless fidelity module, a short-range wireless communication module, a radio frequency identification module, and a ZigBee module, which is not specifically limited in the embodiment of the present application. As an optional embodiment, a Bluetooth module can be used as the second wireless communication module. By sending a calibration signal through the second wireless communication module on the capacitor, even if there is communication interference between the capacitive pen and the smart terminal, the calibration signal can be transmitted normally, thereby ensuring the stability of the synchronization of the data signal.
[0075] In order to better explain the data signal synchronization method provided in the embodiment of the present application, the interaction process between a capacitive stylus pen and a smart terminal is described below.
[0076] Before this, the capacitive pen and the smart terminal can be divided according to functional modules. The capacitive pen can include modules such as a capacitive pen writing transmitting module 1, a capacitive pen wireless communication module 2, and a capacitive pen processor 3. The smart terminal can include modules such as a terminal writing receiving module 4, a terminal wireless communication module 5, and a terminal processor 6.
[0077] When the capacitive pen writes normally on the touch screen of the smart terminal, the interaction process between the capacitive pen and the smart terminal is as follows: Figure 3 As shown, the capacitive pen writing transmitting module 1, as a writing signal transmitting end, will transmit a signal of a certain frequency, and the signal can carry information such as the pressure of the capacitive pen and the writing angle of the capacitive pen. The terminal writing receiving module 4, as a writing signal receiving end, receives the above information, and analyzes the above information through the terminal processor 6 to generate an accurate reporting point.
[0078] The specific processing flow of the smart terminal is as follows: the capacitive pen sends the corresponding writing signal to the touch screen of the smart terminal. The writing signal includes the start flag, pressure / angle and other data signals, and the end flag. Under normal circumstances, the touch screen of the smart terminal can receive all signals without delay. The terminal processor will collect the corresponding data signal at a preset time point and analyze it, such as Figure 4 shown.
[0079] However, when the signal interference generated inside the smart terminal (such as display interference, charger common mode interference, etc.) or the signal interference generated outside the smart terminal (such as interference frequency generated by fluorescent lamps or other electrical appliances, etc.) is close to the communication frequency between the capacitive pen and the smart terminal, the signal communication between the capacitive pen and the smart terminal may be interfered. Figure 5 As shown, the capacitive pen writing transmitting module 1 acts as a writing signal transmitting end, and will transmit a signal of a certain frequency, which can carry information such as the pressure of the capacitive pen and the writing angle of the capacitive pen. The terminal writing receiving module 4 acts as a writing signal receiving end, and receives the above information. Due to the delay and asynchronization problem in the data signal transmission, the terminal processor 6 data analysis is abnormal, resulting in the capacitive pen writing disconnection and jump point. Since the capacitive pen is only a one-way transmitting device, it is impossible to obtain abnormal information of the intelligent terminal, and therefore, it is impossible to achieve interference self-correction.
[0080] The specific processing flow of the smart terminal is as follows: in the case of interference delay, the data signal received by the touch screen of the smart terminal has abnormal delay and asynchronism, and the terminal processor still collects the corresponding signal at the original preset time. At this time, no valid data signal can be collected, and data analysis abnormality occurs, which leads to problems such as disconnection and point jump when writing with the capacitive pen. Figure 6 shown.
[0081] In order to solve the above problems, the embodiment of the present application adds a wireless communication module to assist the delay calibration process. While the capacitive pen sends a writing signal to the touch screen of the smart terminal, it also sends a calibration signal to the smart terminal through the wireless communication module. The capacitive pen writing signal self-correction process can be as follows: Figure 7 As shown:
[0082] While the capacitive pen sends the end flag of the writing signal to the touch screen of the smart terminal, it also sends the first sub-calibration signal (i.e., Bluetooth signal 1 in the figure) to the smart terminal through the wireless communication module (assuming that the Bluetooth module is used as the wireless communication module);
[0083] Performing end position calibration using the first sub-calibration signal and the writing end signal collected by the terminal processor;
[0084] When the signal communication between the capacitive pen and the smart terminal is not disturbed, the reception time of the first sub-calibration signal received by the smart terminal and the reception time of the writing end signal received by the terminal processor should be synchronized without delay.
[0085] When the signal communication between the capacitive pen and the smart terminal is disturbed, there will be a certain time difference between the reception time of the first sub-calibration signal received by the smart terminal and the reception time of the writing end signal received by the terminal processor. The first writing delay duration caused by the interference can be determined based on this time difference.
[0086] According to the obtained first writing delay time, the preset time for the terminal processor to collect data signals is adjusted to achieve self-correction of the delay of collecting signals under interference.
[0087] Through the corrected preset time, effective data signals can be collected normally, thus solving problems such as disconnection and point jumping when writing with a capacitive pen.
[0088] In this embodiment, the delay corresponding to the start flag bit of the writing signal is not considered, only the delay corresponding to the end flag bit of the writing signal is considered. Because the delay corresponding to the start flag bit is relatively small, only the preset time is adjusted according to the delay corresponding to the end flag bit of the writing signal, which can also achieve a better data signal synchronization effect.
[0089] In another embodiment, the capacitive pen writing signal self-correction process can be as follows: Figure 8 As shown:
[0090] While the capacitive pen sends the writing signal start flag to the touch screen of the smart terminal, it also sends the second sub-calibration signal (i.e., Bluetooth signal 0 in the figure) to the smart terminal through the wireless communication module (assuming that the Bluetooth module is used as the wireless communication module);
[0091] The start position calibration is performed by using the second sub-calibration signal and the writing start signal collected by the terminal processor. Specifically, the terminal processor compares the receiving time of the writing start signal and the receiving time of the second sub-calibration signal, calculates the time difference between the two times, and uses the time difference as the first calibration result.
[0092] When the capacitive pen sends a writing signal end flag to the touch screen of the smart terminal, it also sends a first sub-calibration signal (i.e., Bluetooth signal 1 in the figure) to the smart terminal through the wireless communication module;
[0093] The end position calibration is performed by using the first sub-calibration signal and the writing end signal collected by the terminal processor. Specifically, the terminal processor compares the receiving time of the writing end signal with the receiving time of the first sub-calibration signal, calculates the time difference between the two times, and uses the time difference as the second calibration result;
[0094] When the signal communication between the capacitive pen and the smart terminal is not interfered with, the reception time of the first sub-calibration signal received by the smart terminal and the reception time of the writing end signal received by the terminal processor should be synchronized without delay, and the reception time of the second sub-calibration signal received by the smart terminal and the reception time of the writing start signal received by the terminal processor should also be synchronized without delay.
[0095] When the signal communication between the capacitive pen and the smart terminal is disturbed, there will be a certain time difference between the reception time of the second sub-calibration signal received by the smart terminal and the reception time of the writing start signal received by the terminal processor (i.e., the first calibration result mentioned above), and there will be a certain time difference between the reception time of the first sub-calibration signal received by the smart terminal and the reception time of the writing end signal received by the terminal processor (i.e., the second calibration result mentioned above). The second writing delay caused by the interference can be determined based on these two time differences. For example, assuming that the first calibration result is 0.5 microseconds and the second calibration result is 200 milliseconds, then the second writing delay is 200 milliseconds minus 0.5 microseconds.
[0096] According to the obtained second writing delay time, the preset time for the terminal processor to collect data signals is adjusted to achieve self-correction of the delay of collecting signals under interference.
[0097] Through the corrected preset time, effective data signals can be collected normally, thus solving problems such as disconnection and point jumping when writing with a capacitive pen.
[0098] It should be noted that the start and end flags of the writing signal are just simple high-level signals, which are single and strong, so interference signals have almost no effect on them. However, effective data signals such as pressure and angle are more complex, and can only be obtained by the smart terminal when the capacitive pen is within 3-5mm of the touch screen, so interference signals have a greater impact on them.
[0099] In this embodiment, not only the delay corresponding to the start flag of the writing signal is taken into account, but also the delay corresponding to the end flag of the writing signal is taken into account, so it can achieve a better data signal synchronization effect than the previous embodiment. Moreover, compared with the currently used capacitive pen and smart terminal communication solution, it has better anti-interference performance, can better ensure the writing effect of the capacitive pen on the smart terminal, and improve the user experience. Fig. 9 , Fig. 9 A schematic diagram of the structure of a data signal synchronization device provided in an embodiment of the present application. Fig. 9 As shown, the data signal synchronization device 900 is applied to a smart terminal, the smart terminal includes a first wireless communication module, and the device 900 includes:
[0100] The receiving module 901 is used to receive the calibration signal sent by the capacitive stylus through the first wireless communication module when receiving the writing signal sent by the capacitive stylus;
[0101] The calibration module 902 is used to synchronously calibrate the data signal in the writing signal according to the calibration signal.
[0102] Further, the writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal;
[0103] The receiving module 901 is further configured to receive, through the first wireless communication module, a first sub-calibration signal sent by the capacitive stylus when an end flag bit sent by the capacitive stylus is received;
[0104] The calibration module 902 is further used to calibrate the writing end signal corresponding to the end flag bit according to the first sub-calibration signal to obtain a first writing delay time corresponding to the data signal, wherein the first writing delay time is used to represent the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal;
[0105] The target duration is adjusted according to the first writing delay duration, wherein the target duration is the duration from when the smart terminal obtains the writing start signal to when it starts to collect the data signal.
[0106] Furthermore, the writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal;
[0107] The receiving module 901 is further configured to receive, through the first wireless communication module, a second sub-calibration signal sent by the capacitive stylus when a start flag bit sent by the capacitive stylus is received;
[0108] The calibration module 902 is also used to calibrate the writing start signal corresponding to the start flag according to the second sub-calibration signal to obtain a first calibration result, wherein the first calibration result is used to characterize the time difference between the reception time of the second sub-calibration signal and the reception time of the writing start signal; to calibrate the writing end signal corresponding to the end flag according to the first sub-calibration signal to obtain a second calibration result, wherein the second calibration result is used to characterize the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal; to determine the second writing delay duration corresponding to the data signal according to the first calibration result and the second calibration result; and to adjust the target duration according to the second writing delay duration.
[0109] Further, the first wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
[0110] It should be noted that the device 900 can implement the above Figure 1 The steps of the data signal synchronization method provided by the method embodiment shown can achieve the same technical effect, and will not be described one by one here.
[0111] See also Fig.10 , Fig.10 A schematic diagram of the structure of another data signal synchronization device provided in an embodiment of the present application. Fig.10 As shown, the data signal synchronization device is applied to a capacitive stylus, the capacitive stylus includes a second wireless communication module, and the device includes:
[0112] The sending module is used to send a calibration signal to the smart terminal through the second wireless communication module when sending a writing signal to the smart terminal, so that the smart terminal can synchronously calibrate the data signal in the writing signal according to the calibration signal.
[0113] Further, the writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal;
[0114] The sending module is further used to send the first sub-calibration signal to the smart terminal through the second wireless communication module when sending the end flag to the smart terminal, so that the smart terminal performs synchronous calibration on the data signal according to the first sub-calibration signal.
[0115] Furthermore, the writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal;
[0116] The sending module is also used to send a second sub-calibration signal to the smart terminal through the second wireless communication module when sending a start flag to the smart terminal, so that the smart terminal synchronously calibrates the data signal according to the first sub-calibration signal and the second sub-calibration signal.
[0117] Further, the second wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
[0118] It should be noted that the device can achieve the above Figure 2 The steps of the data signal synchronization method provided by the method embodiment shown can achieve the same technical effect, and will not be described one by one here.
[0119] like Fig.11 As shown, the embodiment of the present application further provides an electronic device, including a processor 1111, a communication interface 1112, a memory 1113 and a communication bus 1114, wherein the processor 1111, the communication interface 1112, and the memory 1113 communicate with each other through the communication bus 1114.
[0120] Memory 1113, used for storing computer programs;
[0121] In one embodiment of the present application, the processor 1111 is used to implement the data signal synchronization method provided by any of the above method embodiments when executing the program stored in the memory 1113.
[0122] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the data signal synchronization method provided in any of the aforementioned method embodiments are implemented.
[0123] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0124] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for synchronizing a data signal, characterized in that: Applied to a smart terminal, the smart terminal includes a first wireless communication module, and the method includes: When receiving a writing signal sent by the capacitive pen, receiving a calibration signal sent by the capacitive pen through the first wireless communication module; According to the calibration signal, the data signal in the writing signal is synchronously calibrated.
2. The method according to claim 1, characterized in that The writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal; The method of receiving, by the first wireless communication module, a calibration signal sent by the capacitive pen when a writing signal sent by the capacitive pen is received, comprises: In a case where the end flag bit sent by the capacitive pen is received, receiving the first sub-calibration signal sent by the capacitive pen through the first wireless communication module; The step of synchronously calibrating the data signal in the writing signal according to the calibration signal comprises: According to the first sub-calibration signal, calibrate the writing end signal corresponding to the end flag to obtain a first writing delay time corresponding to the data signal, wherein the first writing delay time is used to represent the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal; The target duration is adjusted according to the first writing delay duration, wherein the target duration is the duration from when the smart terminal obtains the writing start signal to when it starts to collect the data signal.
3. The method according to claim 2, characterized in that The writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal; In the case of receiving a writing signal sent by the capacitive pen, receiving a calibration signal sent by the capacitive pen through the first wireless communication module, further comprising: When the start flag bit sent by the capacitive pen is received, receiving the second sub-calibration signal sent by the capacitive pen through the first wireless communication module; The step of synchronously calibrating the data signal in the writing signal according to the calibration signal comprises: Calibrate the writing start signal corresponding to the start flag according to the second sub-calibration signal to obtain a first calibration result, wherein the first calibration result is used to characterize a time difference between a reception time of the second sub-calibration signal and a reception time of the writing start signal; Calibrate the writing end signal corresponding to the end flag according to the first sub-calibration signal to obtain a second calibration result, wherein the second calibration result is used to characterize the time difference between the reception time of the first sub-calibration signal and the reception time of the writing end signal; Determining a second writing delay time corresponding to the data signal according to the first calibration result and the second calibration result; The target duration is adjusted according to the second writing delay duration.
4. The method according to claim 1, characterized in that: The first wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
5. A method for synchronizing a data signal, characterized in that: Applied to a capacitive stylus, the capacitive stylus includes a second wireless communication module, and the method includes: When sending a writing signal to a smart terminal, a calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal synchronously calibrates the data signal in the writing signal according to the calibration signal.
6. The method according to claim 5, characterized in that The writing signal includes an end flag, and the calibration signal includes a first sub-calibration signal; In the case of sending a writing signal to the smart terminal, sending a calibration signal to the smart terminal through the second wireless communication module includes: In the case of sending the end flag to the smart terminal, the first sub-calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal performs synchronous calibration on the data signal according to the first sub-calibration signal.
7. The method according to claim 6, characterized in that The writing signal further includes a start flag, and the calibration signal further includes a second sub-calibration signal; In the case of sending a writing signal to the smart terminal, sending a calibration signal to the smart terminal through the second wireless communication module includes: When the start flag is sent to the smart terminal, the second sub-calibration signal is sent to the smart terminal through the second wireless communication module, so that the smart terminal synchronously calibrates the data signal according to the first sub-calibration signal and the second sub-calibration signal.
8. The method according to claim 5, characterized in that The second wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, a short-range wireless communication module, a radio frequency identification module and a ZigBee module.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the steps of the data signal synchronization method described in any one of claims 1 to 4, or implementing the steps of the data signal synchronization method described in any one of claims 5 to 8, when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data signal synchronization method described in any one of claims 1 to 4 are implemented, or the steps of the data signal synchronization method described in any one of claims 5 to 8 are implemented.
Citation Information
Patent Citations
Signal transmission method, signal reception method and device
CN111052051B
Synchronization method, wireless communication chip, synchronization device, electronic equipment and active pen
CN114063822A
Writing display method, device, equipment and system and storage medium
CN114217730A
