Method for Controlling an Electronic Device and Electronic Device

The electronic device control method synchronizes touch signal collection with pixel scanning and uses an uplink synchronization signal to align with external devices, addressing the issue of discontinuous lines during stylus input and enhancing user experience by maintaining consistent touch signal collection across varying frame rates.

JP2025518444APending Publication Date: 2025-06-17HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024560640
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-05-13
Filing Date
2023-04-26
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

Electronic devices experience discontinuous lines when using a stylus for input due to changes in screen update rates, affecting user experience.

Method used

An electronic device control method that synchronizes touch signal collection with pixel scanning, using an uplink synchronization signal to align with external devices, ensuring consistent touch signal collection time regardless of frame rate changes.

Benefits of technology

Reduces the probability of discontinuous lines during stylus input, improving user experience by maintaining consistent touch signal collection across varying frame rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025518444000001_ABST
    Figure 2025518444000001_ABST
Patent Text Reader

Abstract

An electronic device control method is provided. This method can be applied to an electronic device having a touch screen. A display driving circuit and a touch sensor that match the touch screen are configured in the electronic device. The method includes the following: The display driving circuit performs pixel scanning. The touch sensor collects a touch signal once after the display driving circuit scans S rows of pixels each time, where S≥1. The continuously collected N touch signals are used as one group. An uplink synchronization signal is transmitted externally in a slot for collecting the touch signal for the Kth time in each group, where 1≤K≤N. The uplink synchronization signal is used to perform time alignment with an external device. In this way, regardless of the change in the frame rate of the touch screen in the electronic device, the time for the electronic device to collect a touch signal each time is fixed. Therefore, collecting a downlink signal of a stylus by the electronic device is not affected, the probability of inputting a discontinuous line by the stylus is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application was filed with the China National Intellectual Property Administration on May 13, 2022, and claims priority to Chinese Patent Application No. 202210518501.3 entitled "Electronic Device Control Method and Electronic Device", the entire disclosure of which is incorporated herein by reference.

[0002] This application relates to the field of terminal technologies, and in particular, to an electronic device control method and an electronic device.

Background Art

[0003] With the development of electronic devices, electronic devices such as tablet computers or large graphics tablets have grown explosively. In addition, application software configured in the above electronic devices, especially drawing software, increasingly requires higher-precision touches. Currently, a stylus is commonly used as one of the input devices of an electronic device. The character input function of an electronic device can be easily implemented by using a stylus.

[0004] In the process of using an electronic device, the screen update rate of the electronic device can be dynamically switched according to the change of the scene displayed by the electronic device. After the screen update rate of the electronic device is switched, for example, after the screen update rate is switched from 120Hz to 90Hz, when a stylus is used for input execution in the electronic device, the phenomenon of discontinuous lines often occurs.

Summary of the Invention

[0005] This application provides an electronic device control method, a stylus control method, a control method applied to a system including an electronic device and a stylus, an electronic device, a stylus, a computer, a storage medium, and a computer program product, so as to reduce the probability of discontinuous lines occurring when a stylus executes input in an electronic device and improve the user experience.

[0006] According to the first aspect, the present application provides an electronic device control method. This method can be applied to an electronic device having a touch screen. A display driving circuit and a touch sensor that match the touch screen are configured in the electronic device. The display driving circuit executes pixel scanning. The touch sensor collects a touch signal once after the display driving circuit scans the pixels of S rows each time, where S≥1. The continuously collected touch signals N times are used as one group. The uplink synchronization signal is transmitted externally in the slot for collecting the touch signal for the Kth time in each group, where 1≤K≤N. The uplink synchronization signal is used to perform time alignment with an external device. For example, the external device can be a device other than the electronic device. For example, the display driving circuit can scan pixels one row at a time.

[0007] In this way, regardless of the change in the frame rate of the touch screen in the electronic device, the time for the electronic device to collect the touch signal each time is fixed. Therefore, the electronic device is not affected by collecting the downlink signal transmitted by the stylus, the probability of inputting a discontinuous line by the stylus is reduced, and the user experience is improved.

[0008] According to the first aspect, S = H / N. H is the number of rows of pixels that need to be scanned by the display driving circuit when the touch screen displays one frame of an image at the standard frame rate. In this way, switching between frame rates that can accurately divide (F*N) can be supported.

[0009] According to any one of the first aspect or the foregoing implementations of the first aspect, the slot for collecting the touch signal for the K-th time in each group is shorter than the slot for collecting the touch signal for each time other than the K-th time in each group. The time required to transmit the uplink synchronization signal is short, and the time required to collect the touch signal is long. Therefore, in order to avoid wasting time, the slot occupied for transmitting the uplink synchronization signal can be reduced.

[0010] According to any one of the first aspect or the foregoing implementations of the first aspect, the method further includes: determining the total number of rows of pixels scanned by the display driving circuit between the first frame synchronization signal and the second frame synchronization signal, where the second frame synchronization signal is adjacent to the first frame synchronization signal and is the next frame synchronization signal of the first frame synchronization signal; and when the total number of the rows is smaller than the target number of rows, recounting the number of rows of pixels scanned by the display driving circuit, where the target number of rows is the number of rows of pixels that need to be scanned by the display driving circuit to display one frame of an image at the target frame rate, and the target frame rate is the current display frame rate of the touch screen. In this way, the horizontal synchronization signal (i.e., the HSYNC signal) is calibrated by the frame synchronization signal (i.e., the VSYNC signal).

[0011] According to any one of the first aspect or the foregoing implementations of the first aspect, the method further includes: determining to establish a connection to the stylus; and when the display driving circuit first scans (K*S) rows of pixels after acquiring the frame synchronization signal, transmitting the uplink synchronization signal externally, where the uplink synchronization signal is used to perform time alignment with the stylus. In this way, in order to avoid discontinuous lines during stylus input, time sequence alignment is performed at the stylus by using the first time.

[0012] According to either the first aspect or any one of the foregoing implementations of the first aspect, the method further includes: a touch sensor obtaining a downlink signal transmitted by a stylus. The touch screen displays a touch position corresponding to the obtained downlink signal.

[0013] According to either the first aspect or any one of the foregoing implementations of the first aspect, the method further includes: when a connection to the stylus is established for the first time, transmitting downlink parameters to the stylus, where the downlink parameters include: an offset of a first downlink signal from a start position of the frame synchronization signal, a time interval between adjacent downlink signals, and a time required for each downlink signal. In this way, time sequence alignment is performed on the downlink signal transmitted by the stylus by using the downlink parameters.

[0014] According to either the first aspect or any one of the foregoing implementations of the first aspect, the time required for each downlink signal is longer than a slot for collecting a touch signal each time. In this way, the probability that the electronic device cannot accurately collect the downlink signal of the stylus due to the loss of the horizontal synchronization signal is reduced.

[0015] According to a second aspect, the present application provides a stylus control method. The method can be applied to a stylus that matches an electronic device. A touch screen, and a display driving circuit and a touch sensor that match the touch screen are configured in the electronic device. The method includes: determining to establish a connection to the electronic device; obtaining an uplink synchronization signal transmitted by the electronic device, where the touch sensor collects a touch signal once after the display driving circuit scans S rows of pixels each time, S≥1, the electronic device uses the touch signals collected continuously N times as one group, and transmits the uplink synchronization signal externally in a slot for collecting the touch signal for the Kth time in each group, 1≤K≤N, and the uplink synchronization signal is used to perform time alignment with an external device; and transmitting a downlink signal to the electronic device based on downlink parameters negotiated when the connection to the electronic device is established for the first time, where the downlink parameters include an offset of the first downlink signal from the start position of the frame synchronization signal in the electronic device, a time interval between adjacent downlink signals, and a time required for each downlink signal.

[0016] According to a second aspect, the time required for each downlink signal is longer than a slot for collecting a touch signal each time.

[0017] According to a third aspect, the present application provides a control method. The method is applicable to a system including an electronic device and a stylus. A touch screen, and a display driving circuit and a touch sensor that match the touch screen are configured in the electronic device. The method includes the following: The electronic device establishes a connection to the stylus. The electronic device performs pixel scanning by using the display driving circuit. After the display driving circuit scans S rows of pixels each time, where S≥1, the electronic device collects a touch signal once by using the touch sensor. The electronic device uses the touch signals collected continuously N times as one group, and transmits an uplink synchronization signal externally in the slot for collecting the touch signal for the Kth time in each group, where 1≤K≤N. The stylus acquires the uplink synchronization signal. The stylus transmits a downlink signal to the electronic device based on the downlink parameters negotiated when the connection to the electronic device was first established in response to the acquired uplink synchronization signal. The downlink parameters include: the offset of the first downlink signal from the start position of the frame synchronization signal in the electronic device, the time interval between adjacent downlink signals, and the time required for each downlink signal. The electronic device acquires the downlink signal transmitted by the stylus by using the touch sensor.

[0018] According to a third aspect, S = H / N. H is the number of rows of pixels that need to be scanned by the display driving circuit when the touch screen displays one frame of an image at a standard frame rate.

[0019] According to the third aspect, or any one of the foregoing implementations of the third aspect, the slot for collecting the touch signal for the Kth time in each group is shorter than the slots for collecting the touch signals other than the Kth time in each group.

[0020] According to either the third aspect or any one of the aforementioned implementations of the third aspect, the time required for each downlink signal is longer than the slot for collecting the touch signal each time.

[0021] According to a fourth aspect, the present application provides an electronic device including a touch screen; a display driving circuit and a touch sensor that match the touch screen; at least one memory configured to store a program; and at least one processor configured to execute the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method provided in the first aspect.

[0022] According to a fifth aspect, the present application provides a stylus including a communication module configured to communicate with an electronic device; at least one memory configured to store a program; and at least one processor configured to execute the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method provided in the second aspect.

[0023] According to a sixth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed on an electronic device, the electronic device can execute the method provided in the first aspect, or when the computer program is executed on a stylus, the stylus can execute the method provided in the second aspect.

[0024] According to the seventh aspect, the present application provides a computer program product. When the computer program product is executed on an electronic device, the electronic device can execute the method provided in the first aspect, or when the computer program product is executed on a stylus, the stylus can execute the method provided in the second aspect.

[0025] Regarding the beneficial effects of the second aspect to the seventh aspect, it can be understood that reference should be made to the relevant descriptions in the first aspect. For details, they will not be described again here.

Brief Description of the Drawings

[0026] Hereinafter, the attached drawings used when describing embodiments or the prior art will be briefly described.

[0027]

Figure 1

[0028]

Figure 2

[0029]

Figure 3

[0030]

Figure 4

[0031]

Figure 5

[0032]

Figure 6

[0033]

Figure 7

[0034]

Figure 8

[0035]

Figure 9

[0036]

Figure 10

Embodiments for Carrying Out the Invention

[0037] The term "and / or" in this specification describes the corresponding relationship between related objects and indicates that three relationships may exist. For example, A and / or B may represent three cases: when only A exists, when both A and B exist, and when only B exists. The character " / " in this specification represents the "or" relationship between related objects. For example, A / B represents A or B.

[0038] In the description and claims of this specification, terms such as "first", "second", etc. are intended to distinguish different objects and do not indicate a specific order of the objects. For example, a first response message, a second response message, etc. are used to distinguish different response messages and do not indicate a specific order of the response messages.

[0039] In the embodiments of this application, words such as "example" or "for example" are used to represent examples, illustrations, or explanations. In the embodiments of this application, any embodiment or design described by "example" or "for example" should not be construed as being more preferred or more advantageous than another embodiment or design. Strictly speaking, words such as "example" or "for example" are intended to present related concepts in a specific manner.

[0040] In the description of the embodiments of this application, unless otherwise specified, "a plurality of ~" means two or more. For example, a plurality of processing units are two or more processing units, and a plurality of elements are two or more elements.

[0041] For example, FIG. 1 shows an application scenario in some embodiments of this application. As shown in FIG. 1, a user can perform an input on the electronic device 100 by using the stylus 200. The electronic device 100 can be an electronic device having a touch screen, such as, but not limited to, a mobile phone or a tablet computer. The stylus 200 can be, but not limited to, an active capacitive stylus.

[0042] In FIG. 1, when the screen of the electronic device 100 executes frame rate switching, the electronic device usually executes frame rate switching by using a CMD command, and the time sequence of the CMD command is strictly limited. If the CMD command is sent with a delay or sent incorrectly, it becomes difficult to collect the downlink signal of the stylus 200 on the touch screen in the electronic device 100. As a result, a case of discontinuous lines may occur in the input process of the stylus 200. For example, when the stylus 200 is used to draw a line on the touch screen, the line is displayed on the touch screen as a series of disconnected segments. In addition, the sampling slots of the touch screen in the electronic device 100 are allocated based on the vertical synchronization (VSync) mechanism of the existing protocol. Therefore, when there is no multiple relationship between the frame rates before and after the switching (for example, switching from 120 Hz to 90 Hz), it becomes difficult to perform time sequence alignment between the sampling moment of the touch screen in the electronic device 100 and the time for continuously transmitting the downlink signal by the stylus 200. As a result, it becomes difficult to collect the downlink signal of the stylus 200 on the touch screen in the electronic device 100. As a result, a case of discontinuous lines may occur in the input process of the stylus 200.

[0043] To avoid the described cases, embodiments of the present application provide an electronic device control method. In this method, after the electronic device 100 establishes a connection to the stylus 200, the electronic device 100 can collect a touch signal once after each scan of the S rows of pixels by the display driving circuit in the electronic device that matches the touch screen. This process is periodically executed by using N collections of touch signals as a cycle until the electronic device 100 and the stylus 200 are disconnected. When collecting the touch signal for the Kth time in each cycle, the electronic device 100 can transmit an uplink synchronization (uplink) signal externally, where 1 ≤ K ≤ N. After the stylus 200 establishes a connection to the electronic device 100, when the uplink signal is obtained for the first time, the stylus 200 can transmit a downlink signal based on the downlink parameters negotiated when the connection between the stylus 200 and the electronic device 100 is established (for example, when the connection is established for the first time). In this way, regardless of the change in the frame rate of the touch screen in the electronic device 100, the time for the electronic device 100 to collect the touch signal each time is fixed. Therefore, the electronic device 100 is not affected by collecting the downlink signal of the stylus 200. In other words, the case of inputting a discontinuous line by the stylus 200 may not occur.

[0044] For example, FIG. 2 shows the hardware structure of the electronic device 100. As shown in FIG. 2, the electronic device 100 may include a processor 110, a memory 120, a communication module 130, and a touch screen 140. It can be understood that the structure shown in FIG. 2 of the present application does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or some components may be combined, or some components may be divided, or different component arrangements may be used. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0045] The processor 110 is the computing core and control core of the electronic device 100. The processor 110 may include one or more processing units. For example, the processor 110 may include one or more of an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). The plurality of different processing units may be independent components or may be integrated into one or more processors. For example, the processor 110 may be configured to control the touch screen 140 to transmit an uplink synchronization signal externally after the electronic device 100 establishes a connection to the stylus 200, and to control the touch screen 140 to collect touch signals, etc.

[0046] Memory 140 can store programs. The programs can be executed by processor 110, and as a result, processor 110 can execute at least some or all of the steps in the method provided in the embodiments of the present application. Memory 140 can further store data. Processor 110 can read the data stored in memory 140. Memory 140 and processor 110 can be arranged separately. In addition, memory 140 can alternatively be integrated into processor 110.

[0047] Communication module 130 can include a wireless communication module. Communication module 130 can be applied to electronic device 100 and provide a wireless communication solution including a wireless local area network (WLAN) (for example, a wireless fidelity (Wi-Fi (registered trademark)) network), Bluetooth (registered trademark) (Bluetooth, BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, or infrared (IR) technology, etc. For example, communication module 130 can be configured to establish a connection between electronic device 100 and stylus 200. For example, communication module 130 can be a Bluetooth module.

[0048] The touch screen 140 can be configured to display images, videos, etc. The touch screen 140 may include a display panel. The display panel may use, but is not limited to, a liquid crystal display (LCD). The touch screen 140 may use in-cell touch technology. That is, the touch sensor is embedded inside the display screen. The touch sensor can be configured to collect touch signals in the touch screen 140. For example, in addition to displaying graphs and videos, the touch screen 140 can further be configured to transmit an uplink synchronization signal externally and acquire a downlink signal transmitted by the stylus 200 after the electronic device 100 establishes a connection to the stylus 200.

[0049] In some embodiments, when displaying an image, the touch screen 140 displays one frame of the image. When displaying a video, the touch screen 140 sequentially displays according to the time-sequence frames of the images included in the video. Each frame of the image can be divided into several basic viewpoints (pixels), and each pixel has independent color information. When the touch screen 140 displays one frame of the image, the processor 110 can control the display driving circuit that matches the touch screen 140 to form a complete photo by sequentially scanning the pixels in the frame of the image one row at a time. The photo is acquired by continuous scanning, and a dynamic image can be "displayed" by taking advantage of the persistence of human vision. For example, the display driving circuit can sequentially scan one row at a time from top to bottom in the operation process. For example, the display driving circuit can be integrated into the touch screen 140, but is not limited thereto.

[0050] For ease of understanding, in the following, the process by which the touch screen 140 displays one frame of an image will be described by using an example. As shown in FIG. 3, when one frame of an image needs to be displayed, the processor 110 may trigger the generation of a vertical synchronization (VSYNC) signal, where the signal may also be referred to as a frame synchronization signal, and as a result, the display driving circuit may know that the display of a new photo needs to be started. After the VSYNC signal is transmitted, it is necessary to ensure the flyback time of the display driving circuit. The interval from the start of the VSYNC signal to the start of the scan of the first line is referred to as the vertical back porch (VBP). The interval from the end of the scan of the last line to the start of the next VSYNC signal is referred to as the vertical front porch (VFP).

[0051] When the display driving circuit scans each line, the processor 110 may trigger the generation of a horizontal synchronization (HSYNC) signal, and as a result, the display driving circuit may know that the scan of a new line of pixels needs to be started. Each line of information starts with the HSYNC signal. After the HSYNC signal is transmitted, it is necessary to ensure the flyback time of the display driving circuit. The interval from the start of the HSYNC signal to the start of the data enable is referred to as the horizontal back porch (HBP). The interval from the end of the data enable to the start of the next HSYNC signal is referred to as the horizontal front porch (HFP). The interval from the start of the data enable to the end of the data enable can be understood as the interval shown in the gray area in FIG. 3.

[0052] Please refer to FIG. 3 further. In the process of scanning a row of pixels, the display driving circuit may perform the scan from left to right. When the display driving circuit finishes scanning a row of pixels and acquires a new HSYNC signal, the display driving circuit may jump from the rightmost side to the leftmost side of the row currently being scanned by the display driving circuit, move down one row, and start scanning the next row of pixels. When the display driving circuit receives a new VSYNC signal, the display driving circuit may jump from the lowermost position in FIG. 3 to the uppermost position at the left vertex and start scanning a new image.

[0053] For example, FIG. 4 is a diagram of a signal time sequence in which the display driving circuit scans pixels. As shown in FIG. 4, each frame of an image corresponds to one VSYNC signal and corresponds to a plurality of HSYNC signals. Each HSYNC signal corresponds to one row of pixels that need to be scanned. After removing the time occupied by HBP and HFP between two HSYNC signals, the remaining time is the time for the video data enable (VDEN) signal.

[0054] In the present embodiment of the present application, in the process of the touch screen 140 displaying one frame of an image, the processor 110 may control the touch sensor in the touch screen so that the display driving circuit collects the touch signal once after scanning the pixels of row S each time. This process is periodically executed by using N times of touch signal collection as a cycle until the electronic device 100 and the stylus 200 are disconnected. The duration of collecting the touch signal each time may be preset. For example, the duration of collecting the touch signal each time may be longer than 100 microseconds (μs) and shorter than 300 μs.

[0055] In addition, in the present embodiment of the present application, a standard frame rate can be predefined. When the touch screen 140 displays one frame of an image at the standard frame rate, the number of times the display driving circuit needs to collect touch signals is defined by using the standard frame rate as a reference. When the touch screen 140 displays one frame of an image at the standard frame rate, the display driving circuit needs to scan the pixels of H rows, and the defined number of times the touch signal needs to be collected is N. In this case, for any S rows of pixels above, S = H / N. In this way, switching between multiple frame rates that can accurately divide (F * N) is implemented, where F is the frame rate of the standard frame rate. The S rows can be added or reduced each time. Therefore, switching between multiple frame rates can be supported when the maximum frame rate is (F * N). For example, when F = 60 Hz and N = 4, switching between multiple frequencies such as 240 Hz, 120 Hz, 80 Hz, 60 Hz, and 48 Hz can be supported. In other words, switching between frame rates that can accurately divide (60 * 4 = 240) can be supported. The time required to display at the standard frame rate is T = 1 / F, the equivalent time for displaying a row is th = T / H, and it can be understood that the corresponding equivalent time for displaying S rows is tx = S * th = S * T / H = T / N. Therefore, tx = 1 / F / N = 1 / (F * N). In this case, the maximum frame rate that can be supported is Fx = F * N. In other words, switching between multiple frame rates can be supported when the maximum frame rate is (F * N).

[0056] In some embodiments, when the touch screen 140 displays an image at a standard frame rate, the slot for collecting the touch signal for the Kth time after the VSYNC signal corresponding to one frame of the image can be defined as a slot for the touch screen 140 to transmit an uplink synchronization signal externally. The uplink signal can be used, but not limited to, for performing time alignment with the stylus 200. After the stylus 200 establishes a connection to the electronic device 100 and after the stylus 200 acquires the uplink signal for the first time, the stylus 200 can transmit a downlink signal based on the downlink parameters negotiated between the stylus 200 and the electronic device 100. In this way, the time sequence alignment between the sampling moment of the electronic device 100 and the time for transmitting the downlink signal by the stylus 200 is continuously performed. The probability of inputting a discontinuous line by the stylus 200 in the input process is reduced, and the user experience is improved. In some embodiments, the downlink parameters can be some parameters required by the stylus 200 for transmitting the downlink signal. The downlink signal can be a signal transmitted to the electronic device 200 after the stylus 200 acquires the uplink signal transmitted by the electronic device 100. The signal can be used to determine the touch position of the stylus 200, the tilt angle, etc. In some embodiments, the signal transmitted externally by the electronic device 100 can be referred to as an uplink signal, and the signal transmitted externally by the stylus 200 can be referred to as a downlink signal.

[0057] In some embodiments, the downlink parameters may include the offset of the first downlink signal from the start position of the VSYNC signal, the time interval between adjacent downlink signals, and the time required for each downlink signal. Additionally, the downlink parameters may further include the number of downlink signals required by the touch screen 140 to display one frame of the image at the standard frame rate. The number of downlink signals required by the touch screen 140 to display one frame of the image at the standard frame rate may be (N - 1).

[0058] For example, as shown in FIG. 5, in the figure, a represents the offset of the first downlink signal from the start position of the VSYNC signal, b represents the time interval between adjacent downlink signals, and c represents the time required for each downlink signal. In FIG. 5, the uplink signal slot is the time for the electronic device 100 to transmit an uplink signal, the display slot is the time for the electronic device 100 to display an image, the touch collection slot is the time for the electronic device 100 to collect a touch signal, and the stylus coding slot is the time for the stylus 200 to transmit a downlink signal. In addition, in the embodiment shown in FIG. 5, the touch screen 140 of the electronic device 100 displays an image at the standard frame rate F, and the electronic device 100 needs to collect the touch signal eight times. When collecting the touch signal for the first time, the electronic device 100 transmits an uplink signal to the outside. When collecting the touch signal thereafter, the electronic device 100 may collect the downlink signal transmitted by the stylus 200, or may collect the touch signal triggered by a touch body such as the user's finger. In FIG. 5, the stylus 200 needs to transmit the downlink signal seven times. In some embodiments, the electronic device 100 may determine whether the touch signal is triggered and generated by the stylus 200 or by a touch body such as the user's finger based on the frequency, amplitude, etc. of the acquired touch signal. In some embodiments, the frequency of the touch signal generated by the stylus 200 is usually from 120 Hz to 360 Hz, and the frequency of the touch signal generated by finger touch is usually from 60 Hz to 120 Hz. Therefore, the electronic device 100 may determine whether the touch signal is triggered and generated by the stylus 200 or by the user's finger based on the frequency of the acquired touch signal.

[0059] Please further refer to FIG. 5. After the stylus 200 establishes a connection to the electronic device 100, when the stylus 200 first acquires an uplink signal transmitted by the electronic device 100, the stylus 200 may start transmitting a downlink signal after a duration a. The duration for transmitting the downlink signal is c. The downlink signal is transmitted at intervals of a duration b until the stylus 200 and the electronic device 100 are disconnected.

[0060] It can be understood that when the electronic device 100 displays an image at a standard frame rate, the electronic device 100 and the stylus 200 may operate in the manner described in FIG. 5. When the electronic device 100 does not display an image at a standard frame rate but displays an image at a plurality of standard frame rates, when the electronic device 100 establishes a connection to the stylus 200, the electronic device 100 may first operate in the manner in FIG. 5. In addition, the electronic device 100 may count the number of times a touch signal is collected by the electronic device 100. When the number of times the touch signal collected by the electronic device 100 reaches N, the electronic device 100 recounts the number of times the touch signal is collected and may transmit an uplink signal in a slot for collecting the touch signal for the K-th time (in this case, K = 1) counted by the electronic device 100. This process is periodically executed until the electronic device 100 and the stylus 200 are disconnected. The stylus 200 may continue to operate according to the description in FIG. 5.

[0061] For example, when the electronic device 100 displays an image at a frame rate that is twice the standard frame rate F, and the number of times N to collect touch signals is set to 8 at the standard frame rate F, the electronic device 100 transmits an uplink signal externally when collecting the touch signal for the K-th time (in this case, K = 1). In this case, when the electronic device 100 displays one frame of the image, a total of (2N) touch signals need to be collected. As shown in FIG. 6, after the electronic device 100 establishes a connection to the stylus 200, when the electronic device 100 starts to display one frame of the image for the first time, the electronic device 100 can collect touch signals at the interval of the aforementioned S rows after generating a vsync signal. The electronic device 100 can transmit an uplink signal externally when the touch signal needs to be collected for the K-th time (in this case, K = 1). In addition, the electronic device 100 can count the number of times the electronic device 100 collects touch signals. When the number of times counted by the electronic device 100 reaches 8, the electronic device 100 can recount the number of times the electronic device 100 collects touch signals (i.e., the count result is returned to zero), transmit the uplink signal externally again when the touch signal needs to be collected for the K-th time, and continue to count the number of times the touch signal is collected. This process is periodically executed until the electronic device 100 and the stylus 200 are disconnected. The stylus 200 can continue to operate according to the description in FIG. 5.

[0062] In addition, when frame rate switching occurs in the process of the electronic device 100 displaying an image, the electronic device 100 can further operate in the manner described in FIG. 6.

[0063] For example, assume that the electronic device 100 first displays an image at the standard frame rate F, and the number N of times of collecting touch signals is set to 8 at the standard frame rate F. After a certain period, the electronic device 100 starts to display the image at 1 / 2 of the standard frame rate F, and after another certain period, the electronic device 100 starts to display the image at a frame rate twice that of the standard frame rate F. As shown in FIG. 7, after the electronic device 100 establishes a connection to the stylus 200, in this case, the electronic device 100 displays the image at the standard frame rate F. When the electronic device 100 starts to display one frame of the image for the first time, after generating the vsync signal, the electronic device 100 can collect touch signals at the interval of the aforementioned S rows. When the touch signal needs to be collected for the K-th time (in this case, K = 1), the electronic device 100 can transmit an uplink signal externally. In addition, the electronic device 100 can count the number of times the electronic device 100 collects touch signals. When the number counted by the electronic device 100 reaches 8, the electronic device 100 recounts the number of times the electronic device 100 collects touch signals (that is, the count result is returned to zero, or in other words, reset), transmits the uplink signal externally again when the touch signal needs to be collected for the K-th time, and continues to count the number of times the touch signal is collected. This process is periodically executed until the electronic device 100 and the stylus 200 are disconnected. The stylus 200 can continue to operate according to the description in FIG. 5.

[0064] Please further refer to FIG. 7. When the electronic device 100 switches the frame rate from F to F / 2, the number of times of collecting the touch signals counted by the electronic device 100 is exactly 8. Therefore, in this case, the number of times of collecting the touch signals can be recounted, and the uplink signal is transmitted externally when the touch signal is collected for the K-th time. When the electronic device 100 displays an image at a frame rate of F / 2 and the electronic device 100 displays the second frame of the image, the number of times of collecting the touch signals counted by the electronic device 100 is 4 and does not reach 8. Therefore, the electronic device 100 may continue to collect the touch signals at an interval of every S rows, and does not transmit the uplink signal externally before the counted number reaches 8.

[0065] When the electronic device 100 switches the frame rate from F / 2 to 2F, the number of times of collecting the touch signals counted by the electronic device 100 is exactly 8. Therefore, in this case, the number of times of collecting the touch signals can be recounted, and the uplink signal is transmitted externally when the touch signal is collected for the K-th time. This process is periodically executed until the electronic device 100 and the stylus 200 are disconnected.

[0066] From the foregoing descriptions in FIGS. 5, 6, and 7, it can be understood that regardless of the change in the frame rate of the touch screen in the electronic device 100, the electronic device 100 can collect the downlink signal of the stylus 200 every time it collects the touch signal. In other words, the case where the discontinuous line is input by the stylus 200 may not occur. It should be understood that FIGS. 5, 6, and 7 are all described by using the case where K = 1. For the case where K is another value, please refer to the description of K = 1. Details are not described again here.

[0067] In some embodiments, the time for the electronic device 100 to transmit an uplink signal externally is usually short, and the time for collecting touch signals is usually long. Therefore, in order to avoid wasting time, the slots occupied for collecting touch signals and transmitting the uplink signal can be reduced. In other words, the slots used for collecting touch signals and transmitting the uplink signal can be designed to make the slots for collecting touch signals shorter than other times.

[0068] In some embodiments, the electronic device 100 may further count the total number of scanned pixel rows between two vsync signals by a display driving circuit corresponding to the touch screen 140. When the electronic device 100 is triggered to generate a new vsync signal, if the total number of rows counted by the electronic device 100 does not reach the number of rows required to display one frame of the image at the current frame rate, the electronic device 100 may determine that there is an hsync signal loss phenomenon. In this case, the electronic device 100 may recount the number of pixel rows scanned by the display driving circuit. In this way, the hsync signal is calibrated by using the vsync signal.

[0069] In addition, when the hsync signal is lost, an error occurs in the number of lines where the pixels scanned by the display driving circuit and counted by the electronic device 100 are located. As a result, the time for the electronic device 100 to collect the touch signal is shifted from the time for the stylus 200 to transmit the downlink signal. To reduce the occurrence of this case, in the present embodiment of the present application, the time for the stylus 200 to transmit the downlink signal can be extended. As a result, the time for the stylus 200 to transmit the downlink signal becomes longer than the time for the electronic device 100 to collect the touch signal. In this way, when the deviation between the time for the electronic device 100 to collect the touch signal and the time for the stylus 200 to transmit the downlink signal is within a specific range, the electronic device 100 can further collect the downlink signal of the stylus 200. For example, as shown in FIG. 8, the time for the stylus 200 to transmit the downlink signal is longer than the time for the electronic device 100 to collect the touch signal. In this case, when the offset of the time for the electronic device 100 to collect the touch signal is smaller than r, the electronic device 100 can completely collect the downlink signal of the stylus 200.

[0070] For example, FIG. 5 shows the hardware structure of the stylus 200. As shown in FIG. 5, the stylus 200 may include a communication module 210, a signal transceiver unit 220, and a processor 230.

[0071] The communication module 210 may include a wireless communication module, and the wireless communication module may be configured to establish a connection between the stylus 200 and the electronic device 100. For example, the communication module 210 may be a Bluetooth module.

[0072] The signal transceiver unit 220 may be configured to obtain an uplink synchronization signal transmitted by the electronic device 100, and after obtaining the uplink synchronization signal, transmit a downlink signal based on preset downlink parameters.

[0073] The processor 230 may negotiate the downlink parameters of the stylus 200 in the electronic device 100 by using the communication module 210, and control the signal transceiver unit 220 to transmit a downlink signal based on the downlink parameters.

[0074] It can be understood that the structure shown in FIG. 3 in the present application does not constitute a specific limitation on the stylus 200. In some other embodiments of the present application, the stylus 200 may include more or fewer components than those shown in the figure, some components may be combined, some components may be divided, or different component arrangements may be used. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0075] Hereinafter, based on the above content, the electronic device control method provided in the embodiments of the present application will be described. It can be understood that this method is proposed based on the above content. For some or all of the content of this method, please refer to the foregoing description.

[0076] FIG. 10 is a schematic flowchart of an electronic device control method according to an embodiment of the present application. This method may be applied to an electronic device having a touch screen. A display driving circuit and a touch sensor that match the touch screen may be configured in the electronic device. For example, the electronic device may be the above-mentioned electronic device 100. As shown in FIG. 10, the electronic device control method may include the following steps.

[0077] S1001: The display driving circuit executes pixel scanning.

[0078] In this embodiment, the display driving circuit in the electronic device can execute pixel scanning one row at a time.

[0079] S1002: The touch sensor collects a touch signal once after the display driving circuit scans S rows of pixels each time, where S≥1. The touch signals collected continuously N times are used as one group. In the slot for collecting the touch signal for the K-th time in each group, an uplink synchronization signal is transmitted externally, where 1≤K≤N. The uplink synchronization signal is used to perform time alignment with an external device.

[0080] In this embodiment, in the process of the display driving circuit executing pixel scanning, the touch sensor can be controlled to collect a touch signal once after the display driving circuit scans S rows of pixels each time, where S≥1. The touch signals collected continuously N times can be used as one group. In the slot for collecting the touch signal for the K-th time in each group, the uplink synchronization signal is transmitted externally, where 1≤K≤N. The uplink synchronization signal is used to perform time alignment with an external device (such as a stylus). In other words, the touch sensor can collect a touch signal once after the display driving circuit scans S rows of pixels each time. This process is periodically executed by using N times of touch signal collection as a cycle. In addition, the electronic device can transmit an uplink synchronization signal externally in the slot for collecting the touch signal for the K-th time in each cycle.

[0081] Thus, regardless of the change in the frame rate of the touch screen in the electronic device, the time for the electronic device to collect a touch signal each time is fixed. Therefore, the electronic device is not affected by collecting the downlink signal transmitted by the stylus, reducing the probability of the stylus inputting a discontinuous line, and improving the user experience.

[0082] In some embodiments, after the electronic device establishes a connection to the stylus, when the display driving circuit in the electronic device acquires a frame synchronization signal and scans the pixels of (K*S) rows for the first time, the electronic device may transmit an uplink synchronization signal externally, where the uplink synchronization signal is used to perform time alignment with the stylus. In other words, the uplink synchronization signal is transmitted externally in a slot for transmitting the uplink synchronization signal for the first time.

[0083] Next, after acquiring the uplink synchronization signal transmitted by the electronic device, the stylus may transmit a downlink signal to the electronic device based on the downlink parameters negotiated when the connection to the electronic device was first established. The downlink parameters include: the offset of the first downlink signal from the start position of the frame synchronization signal of the electronic device, the time interval between adjacent downlink signals, and the time required for each downlink signal. In a possible implementation, the downlink parameters may be transmitted by the electronic device to the stylus.

[0084] Next, the electronic device may acquire the downlink signal transmitted by the stylus by using the touch sensor in the electronic device, and display the touch position corresponding to the acquired downlink signal by using the touch screen in the electronic device. A plurality of touch positions connected based on the time sequence may form one touch track.

[0085] The processor in the embodiments of the present application can be a central processing unit (CPU). Alternatively, the processor can be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0086] The steps of the method in the embodiments of the present application may be implemented by hardware or by a processor that executes software instructions. The software instructions may include corresponding software modules. The software modules may be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium well-known in the art. For example, the storage medium is coupled to the processor, and as a result, the processor can read information from and write information to the storage medium. Of course, the storage medium may be a component of the processor. The processor and the storage medium may be disposed in an ASIC.

[0087] All or part of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement an embodiment, all or part of the embodiment may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the procedures or functions in the embodiments of the present application are generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted by using a computer-readable storage medium. The computer instructions may be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired (for example, coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (for example, infrared ray, wireless, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device integrating one or more available media, such as a server or a data center. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state drive (SSD)), etc.

[0088] It can be understood that the various numbers in the embodiments of the present application are only used for distinction for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. An electronic device control method applied to an electronic device having a touch screen, wherein a display driving circuit and a touch sensor corresponding to the touch screen are configured in the electronic device, and the method includes: Executing pixel scanning by the display driving circuit; and Collecting a touch signal once by the touch sensor after the display driving circuit scans S rows of pixels each time, where S≥1 and The touch signals collected continuously N times are used as one group. In the slot for collecting the touch signal for the Kth time in each group, an uplink synchronization signal is transmitted externally, where 1≤K≤N, and the uplink synchronization signal is used to perform time alignment with an external device. Method.

2. The method according to claim 1, wherein S = H / N, and H is the number of rows of pixels that need to be scanned by the display driving circuit when the touch screen displays one frame of an image at a standard frame rate.

3. The method according to claim 1 or 2, wherein the slot for collecting the touch signal for the Kth time in each group is shorter than the slots for collecting the touch signals for each time other than the Kth time in each group.

4. The method further includes: Determining the total number of rows of pixels scanned by the display driving circuit between a first frame synchronization signal and a second frame synchronization signal, where the second frame synchronization signal is adjacent to the first frame synchronization signal and is the next frame synchronization signal after the first frame synchronization signal; and When the total number of the lines is smaller than the target number of lines, recounting the number of lines of pixels scanned by the display driving circuit, where the target number of lines is the number of lines of pixels that need to be scanned by the display driving circuit to display one frame of an image at a target frame rate, and the target frame rate is the current display frame rate of the touch screen, including The method according to any one of claims 1 to 3, comprising.

5. The method further comprises: Determining to establish a connection to the stylus; and When the display driving circuit first scans (K*S) lines of pixels after acquiring a frame synchronization signal, transmitting the uplink synchronization signal externally, where the uplink synchronization signal is used to perform time alignment with the stylus The method according to any one of claims 1 to 4, comprising.

6. The method further; Acquiring a downlink signal transmitted by the stylus by the touch sensor; and Displaying a touch position corresponding to the acquired downlink signal by the touch screen The method according to claim 5, comprising.

7. The method further comprises: When the connection to the stylus is established for the first time, transmitting downlink parameters to the stylus The method according to claim 5 or 6, comprising, where the downlink parameters include: an offset of a first downlink signal from a start position of the frame synchronization signal, a time interval between adjacent downlink signals, and a time required for each downlink signal.

8. The time required for each downlink signal is longer than a slot for collecting a touch signal each time, according to the method of claim 7.

9. A stylus control method applied to a stylus that matches an electronic device, where a touch screen, a display driving circuit and a touch sensor that match the touch screen are configured in the electronic device, and the method includes: Determining to establish a connection to the electronic device; Obtaining an uplink synchronization signal transmitted by the electronic device, where the touch sensor collects a touch signal once after the display driving circuit scans the pixels of S rows each time, S≥1, the electronic device uses the touch signals collected continuously N times as one group, and transmits the uplink synchronization signal externally in the slot for collecting the touch signal for the Kth time in each group, 1≤K≤N, and the uplink synchronization signal is used to perform time alignment with an external device; and Transmitting a downlink signal to the electronic device based on downlink parameters negotiated when the connection to the electronic device is established for the first time, where the downlink parameters include the offset of the first downlink signal from the start position of the frame synchronization signal in the electronic device, the time interval between adjacent downlink signals, and the time required for each downlink signal A method comprising the above.

10. The method according to claim 9, wherein the time required for each downlink signal is longer than the slot for collecting a touch signal each time.

11. A control method applied to a system including an electronic device and a stylus, where a touch screen, a display driving circuit and a touch sensor that match the touch screen are configured in the electronic device, and the method includes: Establishing, by the electronic device, a connection to the stylus; Performing pixel scanning by using the display driving circuit by the electronic device; The step of collecting a touch signal once by using the touch sensor after the display driving circuit scans the pixels of S rows each time by the electronic device, where S ≥ 1; the electronic device uses the touch signals collected continuously N times as one group, and transmits the uplink synchronization signal externally in the slot for collecting the touch signal for the Kth time in each group, where 1 ≤ K ≤ N; The step of obtaining the uplink synchronization signal by the stylus; The step of transmitting the downlink signal of the electronic device based on the negotiated downlink parameters when the connection to the electronic device is established for the first time in response to the obtained uplink synchronization signal by the stylus, where the downlink parameters include the offset of the first downlink signal from the start position of the frame synchronization signal in the electronic device, the time interval between adjacent downlink signals, and the time required for each downlink signal; and The step of obtaining the downlink signal transmitted by the stylus by the electronic device by using the touch sensor A method comprising the above steps.

12. The method according to claim 11, wherein S = H / N, and H is the number of rows of pixels that need to be scanned by the display driving circuit when the touch screen displays one frame of an image at a standard frame rate.

13. The method according to claim 11 or 12, wherein the slot for collecting the touch signal for the Kth time in each group is shorter than the slots for collecting the touch signals for each time other than the Kth time in each group.

14. The method according to any one of claims 11 to 13, wherein the time required for each downlink signal is longer than the slot for collecting the touch signal each time.

15. Touch screen; A display driving circuit and a touch sensor that match the touch screen; At least one memory configured to store a program; and At least one processor configured to execute the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method according to any one of claims 1 to 8 An electronic device comprising the above.

16. A communication module configured to communicate with an electronic device; At least one memory configured to store a program; and At least one processor configured to execute the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method according to claim 9 or 10, A stylus comprising the above.

17. A computer-readable storage medium that stores a computer program, and when the computer program is executed on an electronic device, the electronic device can execute the method according to any one of claims 1 to 8, or when the computer program is executed on a stylus, the stylus can execute the method according to claim 9 or 10, a computer-readable storage medium.

18. A computer program product, wherein when the computer program product is executed on an electronic device, the electronic device can execute the method according to any one of claims 1 to 8, or when the computer program product is executed on a stylus, the stylus can execute the method according to claim 9 or 10, a computer program product.

Citation Information

Patent Citations

  • Method and system applied to signal synchronization system, stylus and electronic equipment

    CN113238609A

  • Integrated circuit

    JP2020074232A

  • Display Apparatus

    US20190179475A1