Touch screen trajectory optimization method and device, electronic equipment and storage medium
By determining the number of processing steps based on the ratio of sampling to transmission frequency in a capacitive touchscreen, and performing multiple calculations on the original coordinate points to generate processed coordinate points, the problem of uneven touch trajectories is solved, resulting in a more uniform and smoother touch operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHIPONE TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2023-05-05
- Publication Date
- 2026-06-26
Smart Images

Figure CN116560526B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a touch screen trajectory optimization method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, capacitive touchscreens and other touch-enabled products typically sample touch signal values at a fixed frequency. After calculation, the touch signal is sent to the corresponding host computer or software system as position coordinates. Due to hardware limitations, the sampling frequency cannot be increased indefinitely, and the coordinates sent by the device cannot accurately reflect the touch position. Furthermore, there will be some error between the sensor-sampled signal and the device's calculations, and user operation will also result in some jitter. The touch trajectory formed on the device screen is not smooth, exhibiting obvious sharp corners and bends. Summary of the Invention
[0003] In view of this, this disclosure proposes a touch screen trajectory optimization method, apparatus, electronic device and storage medium, which aims to upload coordinate points for accurately drawing smooth touch screen trajectories at a fixed transmission frequency.
[0004] According to a first aspect of this disclosure, a touch screen trajectory optimization method is provided, the method comprising:
[0005] Based on the sampling frequency, obtain N original coordinate points generated by the user's interaction with the touchscreen;
[0006] The number of processing steps is determined based on the preset transmission frequency and the sampling frequency;
[0007] For the obtained nth original coordinate point, the (n-2)th original coordinate point, the (n-1)th original coordinate point, and the nth original coordinate point are used as initial inputs. The processing is performed a certain number of times to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N.
[0008] Upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point;
[0009] Each calculation process includes:
[0010] Determine the first, second, and third coordinate points in this calculation process;
[0011] Calculate the sine of the angle between the first line connecting the first coordinate point and the second coordinate point and the second line connecting the second coordinate point and the third coordinate point;
[0012] Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated.
[0013] In one possible implementation, determining the number of processing iterations based on a preset transmission frequency and the sampling frequency includes:
[0014] The number of processing steps is determined based on the ratio of the transmission frequency to the sampling frequency.
[0015] In one possible implementation, determining the first coordinate point, the second coordinate point, and the third coordinate point in this computational process includes:
[0016] In response to the fact that this calculation process is the first calculation process, the (n-2)th original coordinate point is determined as the first coordinate point, the (n-1)th original coordinate point is determined as the second coordinate point, and the nth original coordinate point is determined as the third coordinate point.
[0017] In one possible implementation, determining the first coordinate point, the second coordinate point, and the third coordinate point in this computational process includes:
[0018] Since this calculation process is the second calculation process, the first processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the first coordinate point, the second processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the second coordinate point, and the first processed coordinate point determined in the first calculation process of the nth original coordinate point is determined as the third coordinate point.
[0019] In one possible implementation, determining the first coordinate point, the second coordinate point, and the third coordinate point in this computational process includes:
[0020] In response to the fact that this calculation process is the third calculation process, the second processed coordinate point determined by the (n-1)th original coordinate point in the first calculation process is determined as the first coordinate point, the first processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the second coordinate point, and the second processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the third coordinate point.
[0021] In one possible implementation, calculating the corresponding first and second processing coordinate points based on the sine value and the first, second, and third coordinate points includes:
[0022] Determined based on the sine value sin a The first coordinate parameter, This is the second coordinate parameter;
[0023] The first processed coordinate point is obtained by summing the product of the first coordinate parameter and the first coordinate point with the product of the second coordinate parameter and the second coordinate point.
[0024] The product of the first coordinate parameter and the second coordinate point is calculated, and the sum of the product of the second coordinate parameter and the third coordinate point is used to obtain the second processed coordinate point.
[0025] In one possible implementation, the processing coordinate point corresponding to the nth original coordinate point includes the first and second processing coordinate points obtained from the last i processing steps, where i is obtained by calculating the ratio of the transmission frequency to the sampling frequency and dividing by 2.
[0026] In one possible implementation, the processing coordinates corresponding to each original coordinate point are uploaded sequentially according to the calculation order of the corresponding operation process and the sending frequency.
[0027] According to a second aspect of this disclosure, a touch screen trajectory optimization device is provided, the device comprising:
[0028] The coordinate point acquisition module is used to acquire N raw coordinate points generated by the user's interaction with the touch screen based on the sampling frequency.
[0029] The number of processing steps module is used to determine the number of processing steps based on the preset transmission frequency and the sampling frequency;
[0030] The calculation and processing module is used to perform the calculation and processing a certain number of times on the obtained nth original coordinate point, with the (n-2)th original coordinate point, the (n-1)th original coordinate point and the nth original coordinate point as initial inputs, to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N;
[0031] The coordinate upload module is used to upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point.
[0032] Each calculation process includes:
[0033] Determine the first, second, and third coordinate points in this calculation process;
[0034] Calculate the sine of the angle between the first line connecting the first coordinate point and the second coordinate point and the second line connecting the second coordinate point and the third coordinate point;
[0035] Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated.
[0036] In one possible implementation, the number determination module is further configured to:
[0037] The number of processing steps is determined based on the ratio of the transmission frequency to the sampling frequency.
[0038] In one possible implementation, the arithmetic processing module is further configured to:
[0039] In response to the fact that this calculation process is the first calculation process, the (n-2)th original coordinate point is determined as the first coordinate point, the (n-1)th original coordinate point is determined as the second coordinate point, and the nth original coordinate point is determined as the third coordinate point.
[0040] In one possible implementation, the arithmetic processing module is further configured to:
[0041] Since this calculation process is the second calculation process, the first processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the first coordinate point, the second processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the second coordinate point, and the first processed coordinate point determined in the first calculation process of the nth original coordinate point is determined as the third coordinate point.
[0042] In one possible implementation, the arithmetic processing module is further configured to:
[0043] In response to the fact that this calculation process is the third calculation process, the second processed coordinate point determined by the (n-1)th original coordinate point in the first calculation process is determined as the first coordinate point, the first processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the second coordinate point, and the second processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the third coordinate point.
[0044] In one possible implementation, the arithmetic processing module is further configured to:
[0045] Determined based on the sine value sin a The first coordinate parameter, This is the second coordinate parameter;
[0046] The first processed coordinate point is obtained by summing the product of the first coordinate parameter and the first coordinate point with the product of the second coordinate parameter and the second coordinate point.
[0047] The product of the first coordinate parameter and the second coordinate point is calculated, and the sum of the product of the second coordinate parameter and the third coordinate point is used to obtain the second processed coordinate point.
[0048] In one possible implementation, the processing coordinate point corresponding to the nth original coordinate point includes the first and second processing coordinate points obtained from the last i processing steps, where i is obtained by calculating the ratio of the transmission frequency to the sampling frequency and dividing by 2.
[0049] In one possible implementation, the processing coordinates corresponding to each original coordinate point are uploaded sequentially according to the calculation order of the corresponding operation process and the sending frequency.
[0050] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing instructions stored in the memory.
[0051] According to a fourth aspect of this disclosure, a non-volatile computer-readable storage medium is provided that stores computer program instructions thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
[0052] According to a fifth aspect of this disclosure, a computer program product is provided, including computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.
[0053] In this embodiment, N original coordinate points generated by user interaction with the touchscreen are obtained according to the sampling frequency. The number of processing iterations is then determined based on a preset sending frequency and sampling frequency. Each original coordinate point is processed a certain number of times according to the order in which the original coordinate points are obtained, to determine at least two processed coordinate points corresponding to the nth original coordinate point. Finally, these at least two processed coordinate points are uploaded as replacement coordinate points for the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N. Each processing iteration is achieved by calculating the angle between the lines connecting three adjacent coordinate points. This disclosure ensures uniform spacing between uploaded coordinate points and enables the creation of smooth touchscreen trajectories by processing the original coordinate points sequentially according to the number of processing iterations and uploading them at the specified sending frequency.
[0054] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0055] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0056] Figure 1A flowchart illustrating a touchscreen trajectory optimization method according to an embodiment of the present disclosure is shown;
[0057] Figure 2 A schematic diagram showing an original coordinate point and a processed coordinate point according to an embodiment of the present disclosure is shown;
[0058] Figure 3 A schematic diagram of a touch screen trajectory optimization device according to an embodiment of the present disclosure is shown;
[0059] Figure 4 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0060] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0061] In the description of this disclosure, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.
[0062] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise expressly specified.
[0063] In this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.
[0064] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0065] The touchscreen trajectory optimization method of this disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal, such as a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, or wearable device. The server can be a single server or a server cluster consisting of multiple servers. Any electronic device can implement the touchscreen trajectory optimization method of this disclosure by having its processor call computer-readable instructions stored in its memory.
[0066] Figure 1 A flowchart illustrating a touchscreen trajectory optimization method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the touch screen trajectory optimization method of this disclosure embodiment may include the following steps S10-S40.
[0067] Step S10: Obtain N original coordinate points generated by the user's interaction with the touch screen based on the sampling frequency.
[0068] In one possible implementation, during user interaction with the touchscreen using a finger, stylus, or other touch-screen medium, the original coordinate points can be obtained by scanning the user's position on the touchscreen using an electronic device. Specifically, the electronic device can sample the original coordinate points according to a preset sampling frequency; that is, it repeatedly detects and acquires the position of the user's finger or stylus on the touchscreen at a preset sampling frequency to obtain the corresponding original coordinate points. Optionally, since the electronic device acquires N original coordinate points sequentially at a preset sampling frequency, each acquired original coordinate point has a temporal order.
[0069] Step S20: Determine the number of processing steps based on the preset transmission frequency and the sampling frequency.
[0070] In one possible implementation, since the sampling frequency is typically low, the touchscreen curve drawn directly from the original coordinate points obtained at the sampling frequency will exhibit unnatural effects such as jagged edges. Therefore, to improve the smoothness of the user's touchscreen curve, a transmission frequency higher than the sampling frequency can be preset. Multiple original coordinate points with an acquisition time interval equal to the sampling frequency are processed to obtain multiple processed coordinate points with an time interval equal to the transmission frequency. A smooth and natural touchscreen trajectory is then drawn based on these processed coordinate points. Optionally, the preset transmission frequency is twice the preset sampling frequency. m The multiple, where m can be 0 or any positive integer.
[0071] Optionally, the electronic device can determine the number of processing operations for each original coordinate point based on a preset transmission frequency and a preset sampling frequency, so as to obtain multiple processed coordinate points that satisfy the transmission frequency by performing the corresponding number of processing operations on the original coordinate points. The electronic device can determine the number of processing operations based on the ratio of the transmission frequency to the sampling frequency. For example, a mapping table between the ratio and the number of processing operations can be preset in the electronic device to directly determine the number of processing operations based on the ratio. When the transmission frequency is twice the sampling frequency, the number of processing operations can be determined to be 1; when the transmission frequency is four times the sampling frequency, the number of processing operations can be determined to be 3.
[0072] Step S30: For the obtained nth original coordinate point, take the (n-2)th original coordinate point, the (n-1)th original coordinate point and the nth original coordinate point as initial inputs, and perform the processing operation a certain number of times to obtain at least two processed coordinate points corresponding to the nth original coordinate point.
[0073] In one possible implementation, after determining the number of processing iterations, the electronic device sequentially processes each acquired original coordinate point, starting from the third original coordinate point, a certain number of times, to obtain at least two corresponding processed coordinate points to replace the original coordinate points for uploading. Before processing each original coordinate point, the two preceding original coordinate points are determined, using these three consecutive original coordinate points as initial inputs for multiple processing iterations to obtain the processed coordinate point of the last acquired original coordinate point. That is, when determining the processed coordinate point corresponding to the nth original coordinate point, the (n-2)th, (n-1)th, and nth original coordinate points can be used as initial inputs, and a certain number of processing iterations can be performed to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N.
[0074] Optionally, each processing step can determine two processing coordinate points. This process may include determining a first coordinate point, a second coordinate point, and a third coordinate point for the current processing step. Then, the sine value of the angle between the first line connecting the first and second coordinate points and the second line connecting the second and third coordinate points is calculated. Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated.
[0075] Furthermore, the first, second, and third coordinate points determined in each calculation process are different. For example, in the first calculation process, the (n-2)th initial input coordinate point can be used as the first coordinate point, the (n-1)th initial coordinate point as the second coordinate point, and the nth initial coordinate point as the third coordinate point. In other calculation processes besides the first calculation process, the three points already determined in sequence can be used as the first, second, and third coordinate points needed for this operation. For example, in the second calculation process, the first processing coordinate point determined in the first calculation process for the (n-1)th initial coordinate point can be used as the first coordinate point, the second processing coordinate point determined in the first calculation process for the (n-1)th initial coordinate point can be used as the second coordinate point, and the first processing coordinate point determined in the first calculation process for the nth initial coordinate point can be used as the third coordinate point. In the third calculation process, the second processed coordinate point determined by the (n-1)th original coordinate point in the first calculation process can be identified as the first coordinate point, the first processed coordinate point determined by the nth original coordinate point in the first calculation process can be identified as the second coordinate point, and the second processed coordinate point determined by the nth original coordinate point in the first calculation process can be identified as the third coordinate point.
[0076] Figure 2 A schematic diagram illustrating an original coordinate point and a processed coordinate point according to an embodiment of the present disclosure is shown. Figure 2As shown, the electronic device acquires the original coordinate points P1, P2, and P3 sequentially. When a single operation is needed to determine the corresponding processed coordinate point P3, P1 can be used as the first coordinate point, P2 as the second coordinate point, and P3 as the third coordinate point, resulting in the corresponding first processed coordinate point Q3-1 and second processed coordinate point Q3-2. When a third operation is needed to determine the corresponding processed coordinate point P3, in the first operation, P1 can be used as the first coordinate point, P2 as the second coordinate point, and P3 as the third coordinate point, resulting in the corresponding first processed coordinate point Q3-1 and second processed coordinate point Q3-2. In the second operation, the first processed coordinate point Q2-1 determined in the first operation for the previous original coordinate point P2 can be identified as the first coordinate point, and the second processed coordinate point Q2-2 determined in the first operation for P2 can be identified as the second coordinate point. Finally, the first processed coordinate point Q3-1 determined in the first operation for the original coordinate point P3 can be identified as the third coordinate point. In the third calculation process, the second processing coordinate point Q2-2 determined by the original coordinate point P2 in the first calculation process can be determined as the first coordinate point, the first processing coordinate point Q3-1 determined by the original coordinate point P3 in the first calculation process can be determined as the second coordinate point, and the second processing coordinate point Q3-2 determined by the original coordinate point P3 in the first calculation process can be determined as the third coordinate point.
[0077] Optionally, in each calculation process, after the electronic device determines the first coordinate point, the second coordinate point, and the third coordinate point, it can determine the sine value of the angle between the first line formed by the first coordinate point and the second coordinate point and the second line formed by the second coordinate point and the third coordinate point, based on the coordinate values of each coordinate point. Specifically, when the coordinates of the first, second, and third coordinate points are (x1, y1), (x2, y2), and (x3, y3), respectively, the cosine value of the angle α between the first and second lines can be calculated first using formula (1).
[0078]
[0079] Furthermore, after obtaining the cosine value of the included angle α, the sine value of the included angle α between the first and second connecting lines can be calculated.
[0080] In one possible implementation, after calculating the sine value of the angle between the first and second connecting lines, the electronic device can calculate the first and second processing coordinate points based on the sine value and the coordinates of the first, second, and third coordinate points during the current calculation process. Optionally, the first and second processing coordinate points can be determined first based on the sine value sin α. The first coordinate parameter, The second coordinate parameter is used. The product of the first coordinate parameter and the first coordinate point is then calculated, and the sum of this product and the product of the second coordinate parameter and the second point is used to obtain the first processed coordinate point. The product of the first coordinate parameter and the second point is then calculated, and the sum of this product and the product of the second coordinate parameter and the third point is used to obtain the second processed coordinate point.
[0081] For example, when the coordinates of the first, second, and third coordinate points are (x1, y1), (x2, y2), and (x3, y3), respectively, the coordinates (x1, y1), (x2, y2), and (x3, y3) of the first processing coordinate point can be calculated using formulas (2) and (3), respectively. Q3-1 ,y Q3-1 ) and the coordinates of the second processed coordinate point (x) Q3-2 ,y Q3-2 ).
[0082]
[0083]
[0084] In one possible implementation, the electronic device performs multiple calculations on the nth original coordinate point, obtaining two processed coordinate points with each calculation. The processed coordinate point corresponding to the nth original coordinate point can be determined from the multiple processed coordinate points obtained from the multiple calculations according to a preset rule. For example, the processed coordinate point corresponding to the nth original coordinate point can be determined to include the first and second processed coordinate points obtained from the last i processing steps, where i is obtained by calculating the ratio of the transmission frequency to the sampling frequency and dividing by 2. That is, when the ratio of the transmission frequency to the sampling frequency is 2, the first and second processed coordinate points obtained from the first processing step are directly determined as the processed coordinate points corresponding to the nth original coordinate point. When the ratio of the transmission frequency to the sampling frequency is 4, the first and second processed coordinate points obtained from the second and third processing steps are directly determined as the processed coordinate points corresponding to the nth original coordinate point.
[0085] Step S40: Upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point.
[0086] In one possible implementation, after the electronic device sequentially determines the nth original coordinate point and calculates at least two corresponding processed coordinate points, it can upload these at least two processed coordinate points as replacement coordinate points for the nth original coordinate point. The processed coordinate points corresponding to the nth original coordinate point can be uploaded in a preset order, which can be sorted according to the processing order of the coordinate points. In each processing operation, the first processed coordinate point is uploaded first, followed by the second processed coordinate point. Optionally, the upload frequency of each processed coordinate point is the transmission frequency.
[0087] Furthermore, electronic devices or other receiving devices that process coordinates can draw accurate and smooth touch screen trajectories based on the processing coordinates corresponding to each original coordinate point.
[0088] Based on the above technical features, the embodiments of this disclosure can determine the number of processing steps by the sending frequency and sampling frequency of the touch screen, and process the original coordinate points sequentially according to the determined number of processing steps to obtain the corresponding processed coordinate points and upload them at the sending frequency. This can ensure that the interval between the uploaded coordinate points is uniform, and a smooth touch screen trajectory can be drawn based on the multiple uploaded processed coordinate points.
[0089] Figure 3 A schematic diagram of a touchscreen trajectory optimization device according to an embodiment of the present disclosure is shown. Figure 3 As shown, the touch screen trajectory optimization device in this embodiment may include:
[0090] The coordinate point acquisition module 30 is used to acquire N original coordinate points generated by the user's interaction with the touch screen according to the sampling frequency.
[0091] The number of processing steps determination module 31 is used to determine the number of processing steps based on the preset transmission frequency and the sampling frequency;
[0092] The calculation and processing module 32 is used to perform the calculation and processing a certain number of times on the obtained nth original coordinate point, with the (n-2)th original coordinate point, the (n-1)th original coordinate point and the nth original coordinate point as initial inputs, to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N;
[0093] The coordinate upload module 33 is used to upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point.
[0094] Each calculation process includes:
[0095] Determine the first, second, and third coordinate points in this calculation process;
[0096] Calculate the sine of the angle between the first line connecting the first coordinate point and the second coordinate point and the second line connecting the second coordinate point and the third coordinate point;
[0097] Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated.
[0098] In one possible implementation, the number determination module 31 is further configured to:
[0099] The number of processing steps is determined based on the ratio of the transmission frequency to the sampling frequency.
[0100] In one possible implementation, the arithmetic processing module 32 is further configured to:
[0101] In response to the fact that this calculation process is the first calculation process, the (n-2)th original coordinate point is determined as the first coordinate point, the (n-1)th original coordinate point is determined as the second coordinate point, and the nth original coordinate point is determined as the third coordinate point.
[0102] In one possible implementation, the arithmetic processing module 32 is further configured to:
[0103] Since this calculation process is the second calculation process, the first processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the first coordinate point, the second processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the second coordinate point, and the first processed coordinate point determined in the first calculation process of the nth original coordinate point is determined as the third coordinate point.
[0104] In one possible implementation, the arithmetic processing module 32 is further configured to:
[0105] In response to the fact that this calculation process is the third calculation process, the second processed coordinate point determined by the (n-1)th original coordinate point in the first calculation process is determined as the first coordinate point, the first processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the second coordinate point, and the second processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the third coordinate point.
[0106] In one possible implementation, the arithmetic processing module 32 is further configured to:
[0107] Determined based on the sine value sin a The first coordinate parameter, This is the second coordinate parameter;
[0108] The first processed coordinate point is obtained by summing the product of the first coordinate parameter and the first coordinate point with the product of the second coordinate parameter and the second coordinate point.
[0109] The product of the first coordinate parameter and the second coordinate point is calculated, and the sum of the product of the second coordinate parameter and the third coordinate point is used to obtain the second processed coordinate point.
[0110] In one possible implementation, the processing coordinate point corresponding to the nth original coordinate point includes the first and second processing coordinate points obtained from the last i processing steps, where i is obtained by calculating the ratio of the transmission frequency to the sampling frequency and dividing by 2.
[0111] In one possible implementation, the processing coordinates corresponding to each original coordinate point are uploaded sequentially according to the calculation order of the corresponding operation process and the sending frequency.
[0112] For example, the electronic devices in this embodiment include, but are not limited to, desktop computers, televisions, mobile devices with large screens such as mobile phones and tablets, and other common electronic devices that require multiple chips to be cascaded together to achieve driving.
[0113] For example, electronic devices can also be user equipment (UE), mobile devices, user terminals, terminals, handheld devices, computing devices, or in-vehicle devices, etc. Examples of terminals include: displays, smartphones or portable devices, mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and wireless terminals in vehicle-to-everything (V2X) networks, etc. For example, a server can be a local server or a cloud server.
[0114] Figure 4 A schematic diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server or a terminal device. (Refer to...) Figure 4The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0115] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0116] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0117] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the scope of protection of the present invention, which is determined by the appended claims.
[0118] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0119] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0121] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A touchscreen trajectory optimization method, characterized in that, The method includes: Based on the sampling frequency, obtain N original coordinate points generated by the user's interaction with the touchscreen; The number of processing steps is determined based on the preset transmission frequency and the sampling frequency; For the obtained nth original coordinate point, the (n-2)th original coordinate point, the (n-1)th original coordinate point, and the nth original coordinate point are used as initial inputs. The processing is performed a certain number of times to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N. Upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point; Each calculation process includes: Determine the first, second, and third coordinate points in this calculation process; Calculate the sine of the angle between the first line connecting the first coordinate point and the second coordinate point and the second line connecting the second coordinate point and the third coordinate point; Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated, including: According to the sine value Sure The first coordinate parameter, This is the second coordinate parameter; The first processed coordinate point is obtained by summing the product of the first coordinate parameter and the first coordinate point with the product of the second coordinate parameter and the second coordinate point. The product of the first coordinate parameter and the second coordinate point is calculated, and the sum of the product of the second coordinate parameter and the third coordinate point is used to obtain the second processed coordinate point.
2. The method according to claim 1, characterized in that, The step of determining the number of processing operations based on the preset transmission frequency and the sampling frequency includes: The number of processing steps is determined based on the ratio of the transmission frequency to the sampling frequency.
3. The method according to claim 1 or 2, characterized in that, The determination of the first, second, and third coordinate points in this computational process includes: In response to the fact that this calculation process is the first calculation process, the (n-2)th original coordinate point is determined as the first coordinate point, the (n-1)th original coordinate point is determined as the second coordinate point, and the nth original coordinate point is determined as the third coordinate point.
4. The method according to claim 1, characterized in that, The determination of the first, second, and third coordinate points in this computational process includes: Since this calculation process is the second calculation process, the first processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the first coordinate point, the second processed coordinate point determined in the first calculation process of the (n-1)th original coordinate point is determined as the second coordinate point, and the first processed coordinate point determined in the first calculation process of the nth original coordinate point is determined as the third coordinate point.
5. The method according to claim 4, characterized in that, The determination of the first, second, and third coordinate points in this computational process includes: In response to the fact that this calculation process is the third calculation process, the second processed coordinate point determined by the (n-1)th original coordinate point in the first calculation process is determined as the first coordinate point, the first processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the second coordinate point, and the second processed coordinate point determined by the nth original coordinate point in the first calculation process is determined as the third coordinate point.
6. The method according to claim 2, characterized in that, The processing coordinate point corresponding to the nth original coordinate point includes the first processing coordinate point and the second processing coordinate point obtained from the last i processing steps, where i is obtained by calculating the ratio of the transmission frequency to the sampling frequency and dividing by 2.
7. The method according to claim 1, characterized in that, The processed coordinates corresponding to each original coordinate point are uploaded sequentially according to the calculation order of the corresponding operation process and the sending frequency.
8. A touchscreen trajectory optimization device, characterized in that, The device includes: The coordinate point acquisition module is used to acquire N raw coordinate points generated by the user's interaction with the touch screen based on the sampling frequency. The number of processing steps module is used to determine the number of processing steps based on the preset transmission frequency and the sampling frequency; The calculation and processing module is used to perform the calculation and processing a certain number of times on the obtained nth original coordinate point, with the (n-2)th original coordinate point, the (n-1)th original coordinate point and the nth original coordinate point as initial inputs, to obtain at least two processed coordinate points corresponding to the nth original coordinate point, where n is any integer greater than or equal to 3 and less than or equal to N; The coordinate upload module is used to upload at least two corresponding processed coordinate points as replacement coordinate points for the nth original coordinate point. Each calculation process includes: Determine the first, second, and third coordinate points in this calculation process; Calculate the sine of the angle between the first line connecting the first coordinate point and the second coordinate point and the second line connecting the second coordinate point and the third coordinate point; Based on the sine value and the first, second, and third coordinate points, the corresponding first and second processing coordinate points are calculated, including: According to the sine value Sure The first coordinate parameter, This is the second coordinate parameter; The first processed coordinate point is obtained by summing the product of the first coordinate parameter and the first coordinate point with the product of the second coordinate parameter and the second coordinate point. The product of the first coordinate parameter and the second coordinate point is calculated, and the sum of the product of the second coordinate parameter and the third coordinate point is used to obtain the second processed coordinate point.
9. A chip, characterized in that, The chip includes the touch screen trajectory optimization device as described in claim 8.
10. A display device, characterized in that, It includes multiple display units and at least one touch screen trajectory optimization device according to claim 8.
11. The display device according to claim 10, characterized in that, The display unit includes a display panel, which includes at least one of the following: liquid crystal display panel, micro light-emitting diode display panel, light-emitting diode display panel, mini light-emitting diode display panel, quantum dot light-emitting diode display panel, organic light-emitting diode display panel, cathode ray tube display panel, digital light processing display panel, field emission display panel, plasma display panel, electrophoretic display panel, electrowetting display panel, and small-pitch display panel.
12. An electronic device comprising the display device according to claim 10 or 11.
13. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method of any one of claims 1 to 7 when executing instructions stored in the memory.
14. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.