Touch screen trajectory determination method and apparatus, electronic device, and storage medium

The insertion position in the touch screen position sequence is determined by interpolation. By using the Lagrange interpolation algorithm and preset filtering rules, the problem of unsmooth touch screen trajectory under low acquisition frame rate is solved, and smooth touch screen trajectory drawing is achieved, which improves the user interaction experience.

CN116185270BActive Publication Date: 2025-12-12CHIPONE TECHNOLOGY (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211644088.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-12-12
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

At low frame rates, the smoothness of touchscreen trajectory detection is poor, resulting in poor trajectory performance and issues such as jagged edges.

Method used

The insertion position in the touch screen position sequence is determined by interpolation, and a smooth touch screen trajectory is accurately drawn using the Lagrange interpolation algorithm and preset filtering rules.

Benefits of technology

It eliminates jagged edges in the trajectory caused by low frame rate acquisition, achieves smooth drawing of touch screen trajectory, and improves the user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185270B_ABST
    Figure CN116185270B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a touch screen trajectory determination method and device, electronic equipment and storage medium, in which at least one touch screen position sequence is acquired when a user touch screen is detected, an insertion position between relevant touch screen positions in the touch screen position sequence is determined according to each two continuous relevant touch screen positions and a reference touch screen position other than any one relevant touch screen position, and a corresponding touch screen trajectory is drawn according to the touch screen positions included in the touch screen position sequence and the insertion positions between each two continuous relevant touch screen positions. The present disclosure accurately interpolates the collected touch screen position sequence by setting the reference touch screen position, and draws a smooth touch screen trajectory based on the interpolation result, thereby eliminating the jagged trajectory caused by low frame rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to a touch screen trajectory determination method and device, electronic equipment and storage medium. BACKGROUND

[0002] At present, touch screen trajectory detection is widely applied in the field of human-computer interaction. In the case that the frame rate of screen collecting user touch screen positions is low, the touch screen trajectory drawn according to the collected touch screen positions is not smooth enough, and poor trajectory effects such as sawtooth may occur. SUMMARY

[0003] Therefore, the present disclosure provides a touch screen trajectory determination method, device, electronic equipment and storage medium, which aims to accurately draw a smooth touch screen trajectory through interpolation method.

[0004] According to a first aspect of the present disclosure, a touch screen trajectory determination method is provided, and the method comprises:

[0005] In response to detecting user touch screen, at least one touch screen position sequence is acquired;

[0006] According to each two continuous related touch screen positions in the touch screen position sequence and any one reference touch screen position other than the related touch screen positions, an inserted position between the related touch screen positions is determined;

[0007] According to the touch screen positions included in the touch screen position sequence and the inserted positions between each two continuous related touch screen positions, a corresponding touch screen trajectory is drawn.

[0008] In a possible implementation manner, the determining of the inserted position between the related touch screen positions according to each two continuous related touch screen positions in the touch screen position sequence and any one reference touch screen position other than the related touch screen positions comprises:

[0009] Two continuous touch screen positions in the touch screen position sequence are acquired as related touch screen positions, and any one touch screen position other than the related touch screen positions is determined as a corresponding reference touch screen position;

[0010] A midpoint of the two related touch screen positions is determined as an intermediate touch screen position;

[0011] According to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions, a first candidate position and a second candidate position are determined;

[0012] According to a preset screening rule, an inserted position is determined from among the first candidate position and the second candidate position.

[0013] In a possible implementation, the determining the first candidate position and the second candidate position according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0014] determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions;

[0015] determining a position composed of the candidate horizontal coordinate and a vertical coordinate of the intermediate touch position as the first candidate position;

[0016] determining a position composed of the candidate vertical coordinate and a horizontal coordinate of the intermediate touch position as the second candidate position.

[0017] In a possible implementation, the related touch positions comprise a first related touch position and a second related touch position acquired in sequence;

[0018] the determining the candidate horizontal coordinate and the candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0019] determining a first ratio L1(x c ), a second ratio L2(x c ), a third ratio L3(x c ), x c is a horizontal coordinate of the intermediate touch position, x1 is a horizontal coordinate of the reference touch position, x2 is a horizontal coordinate of the first related touch position, and x3 is a horizontal coordinate of the second related touch position;

[0020] determining a fourth ratio L1(y c ), a fifth ratio L2(y c ), a sixth ratio y c is a vertical coordinate of the intermediate touch position, y1 is a vertical coordinate of the reference touch position, y2 is a vertical coordinate of the first related touch position, and y3 is a vertical coordinate of the second related touch position;

[0021] determining the candidate vertical coordinate according to a sum of a product of the first ratio and the vertical coordinate of the reference touch position, a product of the second ratio and the vertical coordinate of the first related touch position, and a product of the third ratio and the vertical coordinate of the second related touch position;

[0022] determining the candidate horizontal coordinate according to a sum of a product of the fourth ratio and the horizontal coordinate of the reference touch position, a product of the fifth ratio and the horizontal coordinate of the first related touch position, and a product of the sixth ratio and the horizontal coordinate of the second related touch position.

[0023] In a possible implementation, the determining the insertion position from the first candidate position and the second candidate position according to the preset screening rule comprises:

[0024] determining a first product (x1-x2)×(x2-x3) and a second product (y1-y2)×(y2-y3);

[0025] in response to the first product being greater than 0 and the second product being less than or equal to 0, determining the second candidate position as the insertion position;

[0026] in response to the second product being greater than 0 and the first product being less than or equal to 0, determining the first candidate position as the insertion position;

[0027] in response to the first product and the second product both being greater than 0, determining the candidate position closer to the intermediate touch screen position as the insertion position.

[0028] In a possible implementation, the method further comprises:

[0029] determining a predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence;

[0030] in response to detecting the user touch screen position again, matching each of the user touch screen positions to the touch screen position sequence according to the predicted position corresponding to each of the touch screen position sequences.

[0031] In a possible implementation, the determining the predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence comprises:

[0032] determining a coordinate difference value of the horizontal coordinates of the second related touch screen position and the first related touch screen position in the last two adjacent touch screen positions in the touch screen position sequence;

[0033] in response to the coordinate difference value being greater than or equal to a preset threshold, determining the predicted horizontal coordinate according to x3+(x3-x2);

[0034] in response to the coordinate difference value being less than the preset threshold, determining the predicted horizontal coordinate according to x3+(x3-x2+Δx), wherein Δx=|(x3-x2)-(x2-x1)|.

[0035] In a possible implementation, the determining the predicted vertical coordinate according to the predicted horizontal coordinate comprises:

[0036] determining a seventh ratio L1(x ′ c ), an eighth ratio L1(x ′c a ninth ratio x ′ c is a predicted abscissa;

[0037] The predicted ordinate is determined according to a sum of a product of the seventh ratio and the reference touch screen position ordinate, a product of the eighth ratio and the first relevant touch screen position ordinate, and a product of the ninth ratio and the second relevant touch screen position ordinate.

[0038] In a possible implementation, the matching each of the user touch screen positions to a touch screen position sequence according to the predicted position corresponding to each of the touch screen position sequences comprises:

[0039] determining a user touch screen position closest to the predicted position corresponding to each of the touch screen position sequences as the user touch screen position matched to the touch screen position sequence;

[0040] updating the matched user touch screen position to the corresponding touch screen position sequence.

[0041] According to a second aspect of the present disclosure, there is provided a touch screen trajectory determination apparatus, the apparatus comprising:

[0042] a sequence acquisition module configured to acquire at least one touch screen position sequence in response to detecting a user touch screen;

[0043] a position matching module configured to determine an inserted position between each two continuous relevant touch screen positions in the touch screen position sequence according to the relevant touch screen positions and a reference touch screen position other than any of the relevant touch screen positions;

[0044] a trajectory drawing module configured to draw a corresponding touch screen trajectory according to the touch screen positions included in the touch screen position sequence and the inserted positions between each two continuous relevant touch screen positions.

[0045] In a possible implementation, the determining the inserted position between each two continuous relevant touch screen positions in the touch screen position sequence according to the relevant touch screen positions and a reference touch screen position other than any of the relevant touch screen positions comprises:

[0046] acquiring two continuous touch screen positions in the touch screen position sequence as the relevant touch screen positions and determining any touch screen position other than the relevant touch screen positions as a corresponding reference touch screen position;

[0047] determining a midpoint of the two relevant touch screen positions as an intermediate touch screen position;

[0048] determining a first candidate position and a second candidate position according to the intermediate touch position, the reference touch position and the two related touch positions;

[0049] determining an insertion position from the first candidate position and the second candidate position according to a preset screening rule.

[0050] In a possible implementation, the determining a first candidate position and a second candidate position according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0051] determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions;

[0052] determining a first candidate position according to the candidate horizontal coordinate and a vertical coordinate of the intermediate touch position;

[0053] determining a second candidate position according to the candidate vertical coordinate and a horizontal coordinate of the intermediate touch position.

[0054] In a possible implementation, the related touch positions comprise a first related touch position and a second related touch position acquired in sequence;

[0055] the determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0056] determining a first ratio L1(x c ), a second ratio L2(x c ), and a third ratio L3(x x c is a horizontal coordinate of the intermediate touch position, x1 is a horizontal coordinate of the reference touch position, x2 is a horizontal coordinate of the first related touch position, and x3 is a horizontal coordinate of the second related touch position;

[0057] determining a fourth ratio L1(y c ), a fifth ratio L2(y c ), and a sixth ratio L3(y y c is a vertical coordinate of the intermediate touch position, y1 is a vertical coordinate of the reference touch position, y2 is a vertical coordinate of the first related touch position, and y3 is a vertical coordinate of the second related touch position;

[0058] determining a candidate vertical coordinate according to a sum of a product of the first ratio and the vertical coordinate of the reference touch position, a product of the second ratio and the vertical coordinate of the first related touch position, and a product of the third ratio and the vertical coordinate of the second related touch position;

[0059] The candidate horizontal coordinate is determined according to a sum of a product of the fourth ratio and the reference touch screen position horizontal coordinate, a product of the fifth ratio and the first related touch screen position horizontal coordinate, and a product of the sixth ratio and the second related touch screen position horizontal coordinate.

[0060] In a possible implementation, the determining the insertion position from the first candidate position and the second candidate position according to the preset screening rule comprises:

[0061] determining a first product (x1-x2)×(x2-x3) and a second product (y1-y2)×(y2-y3);

[0062] in response to the first product being greater than 0 and the second product being less than or equal to 0, determining the second candidate position as the insertion position;

[0063] in response to the second product being greater than 0 and the first product being less than or equal to 0, determining the first candidate position as the insertion position;

[0064] in response to the first product and the second product both being greater than 0, determining the candidate position closer to the intermediate touch screen position from the first candidate position and the second candidate position as the insertion position.

[0065] In a possible implementation, the method further comprises:

[0066] determining a predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence;

[0067] in response to detecting the user touch screen position again, matching each of the user touch screen positions to the touch screen position sequence according to the predicted position corresponding to each of the touch screen position sequences.

[0068] In a possible implementation, the determining the predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence comprises:

[0069] determining a coordinate difference value of horizontal coordinates of the second related touch screen position and the first related touch screen position from the last two adjacent touch screen positions in the touch screen position sequence;

[0070] in response to the coordinate difference value being greater than or equal to a preset threshold, determining the predicted horizontal coordinate according to x3+(x3-x2);

[0071] in response to the coordinate difference value being less than the preset threshold, determining the predicted horizontal coordinate according to x3+(x3-x2+Δx), where Δx=|(x3-x2)-(x2-x1)|.

[0072] In a possible implementation, the determining the corresponding predicted longitudinal coordinate according to the predicted horizontal coordinate comprises:

[0073] determining a seventh ratio L1(x ′ c ), an eighth ratio L1(x ′ c ), and a ninth ratio x ′ c is the predicted horizontal coordinate;

[0074] determining the predicted longitudinal coordinate according to a sum of a product of the seventh ratio and the reference touch screen position longitudinal coordinate, a product of the eighth ratio and the first related touch screen position longitudinal coordinate, and a product of the ninth ratio and the second related touch screen position longitudinal coordinate.

[0075] In a possible implementation, the matching each user touch screen position to a touch screen position sequence according to the corresponding predicted position of each touch screen position sequence comprises:

[0076] determining a user touch screen position closest to the corresponding predicted position of each touch screen position sequence as a user touch screen position matched to the touch screen position sequence;

[0077] updating the matched user touch screen position to the corresponding touch screen position sequence.

[0078] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0079] According to a fourth aspect of the present disclosure, a non-volatile computer readable storage medium having computer program instructions stored thereon is provided, wherein the computer program instructions, when executed by a processor, implement the above method.

[0080] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising computer readable code, or a non-volatile computer readable storage medium carrying computer readable code, when the computer readable code is run in a processor of an electronic device, the processor in the electronic device executes the above method.

[0081] In the embodiments of the present disclosure, at least one touch screen position sequence is acquired when it is detected that a user touches a touch screen, an insertion position between two continuous relevant touch screen positions in the touch screen position sequence is determined according to each of the two continuous relevant touch screen positions and a reference touch screen position other than any one of the relevant touch screen positions, and a corresponding touch screen track is drawn according to the touch screen positions included in the touch screen position sequence and the insertion positions between the two continuous relevant touch screen positions. The present disclosure accurately interpolates the collected touch screen position sequence by setting the reference touch screen position, and draws a smooth touch screen track based on the interpolation result, thereby eliminating the jagged track caused by low frame rate.

[0082] Other features and aspects of the present disclosure will become apparent from the following detailed description of the exemplary embodiments with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0083] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the present disclosure and serve to explain the principles of the present disclosure.

[0084] Figure 1 A flow chart of a touch screen track determination method according to an embodiment of the present disclosure is shown;

[0085] Figure 2 A schematic diagram of a touch screen track determination process according to an embodiment of the present disclosure is shown;

[0086] Figure 3 A schematic diagram of a touch screen track determination device according to an embodiment of the present disclosure is shown;

[0087] Figure 4 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0088] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference signs in the drawings represent functionally identical or similar elements. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

[0089] In the description of the present disclosure, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present disclosure.

[0090] In addition, the terms "first", "second", etc. are used only for descriptive purposes and are not to be construed as indicating or implying relative importance or an indicated number of technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified and limited.

[0091] In the present disclosure, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present disclosure can be understood according to the specific circumstances.

[0092] The term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality of combinations of at least two of a plurality of combinations, for example, including at least one of A, B and C, which means including any one or more elements selected from the set consisting of A, B and C.

[0093] The touch screen trajectory determination method of the embodiments of the present disclosure can be executed by electronic devices such as terminal devices or servers. Among them, the terminal device can be any fixed or mobile terminal such as user equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can realize the touch screen trajectory determination method of the embodiments of the present disclosure by calling the computer readable instructions stored in the memory through the processor.

[0094] Figure 1 A flowchart of a touch screen trajectory determination method according to an embodiment of the present disclosure is shown. As shown in Figure 1 The touch screen trajectory determination method of the embodiments of the present disclosure can include steps S10-S30.

[0095] Step S10, in response to detecting that the user touches the screen, at least one touch screen position sequence is acquired.

[0096] In a possible implementation, in a case where it is detected that a user performs a touch screen operation on an electronic device or another device connected to the electronic device, the electronic device acquires at least one touch screen position sequence for recording positions of touch screen fingers of the user. The electronic device can acquire the touch screen position sequence in a manner of acquiring positions of each touch screen finger of the user multiple times at a preset sampling frequency, or can directly receive the touch screen position sequence acquired by the other device multiple times at the preset sampling frequency. That is, in a case where the user performs human-computer interaction with the electronic device through a display apparatus of the electronic device, the electronic device can directly acquire the touch screen position sequence. In a case where the user performs human-computer interaction through a display apparatus of the other device, the electronic device can acquire the touch screen position sequence through the other device and then send the touch screen position sequence to the electronic device.

[0097] Optionally, each touch screen position sequence corresponds to one finger of the user and is used for recording touch screen positions of the corresponding finger. Therefore, the number of touch screen position sequences is the same as the number of touch screen fingers of the user, and each touch screen position sequence can include at least three touch screen positions, and the multiple touch screen positions are sorted according to acquisition time.

[0098] In step S20, an insertion position between the two relevant touch screen positions is determined according to each two continuous relevant touch screen positions in the touch screen position sequence and a reference touch screen position other than any one of the relevant touch screen positions.

[0099] In a possible implementation, the electronic device sequentially determines each two continuous touch screen positions in the touch screen position sequence as relevant touch screen positions, and after determining the two relevant touch screen positions, selects a touch screen position other than any one of the relevant positions in the touch screen position sequence as a reference touch screen position corresponding to the relevant touch screen positions. After the electronic device acquires the relevant touch screen positions and the corresponding reference touch screen position each time, the electronic device performs a Lagrange interpolation algorithm according to the two relevant touch screen positions and the reference touch screen position to determine the insertion position between the two relevant touch screen positions.

[0100] Optionally, the electronic device can first determine a middle touch screen position according to the two relevant touch screen positions, and then perform interpolation based on the middle touch screen position to obtain the insertion position. That is, the electronic device first acquires two continuous touch screen positions in the touch screen position sequence as relevant touch screen positions, and determines any one touch screen position other than the relevant touch screen positions as a corresponding reference touch screen position. Then, the midpoint of the two relevant touch screen positions is determined as a middle touch screen position, and then a first candidate position and a second candidate position are determined according to the middle touch screen position, the reference touch screen position and the two relevant touch screen positions, and finally the insertion position is determined from the first candidate position and the second candidate position according to a preset screening rule.

[0101] Optionally, the first candidate position and the second candidate position can be determined according to the horizontal coordinate and the vertical coordinate of the intermediate touch screen position respectively. The electronic device can first determine a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions. Then, the position composed of the candidate horizontal coordinate and the vertical coordinate of the intermediate touch screen position is determined as the first candidate position, and the position composed of the candidate vertical coordinate and the horizontal coordinate of the intermediate touch screen position is determined as the second candidate position. That is, in the case where the reference touch screen position is (x1, y1) and the related touch screen positions include a first related touch screen position (x2, y2) and a second related touch screen position (x3, y3) obtained in sequence, the intermediate touch screen position is determined as (x c , y c ). Further, the candidate horizontal coordinate and the candidate vertical coordinate are determined according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions. Then, the first candidate position is determined according to the candidate horizontal coordinate and the vertical coordinate of the intermediate touch screen position, and the second candidate position is determined according to the candidate vertical coordinate and the horizontal coordinate of the intermediate touch screen position. The insertion position is obtained from the two candidate positions according to a preset screening rule.

[0102] In a possible implementation, the process of determining the candidate vertical coordinate according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions can include first determining a first ratio L1(x c ), a second ratio L2(x c ) and a third ratio L3(x x c is the horizontal coordinate of the intermediate touch screen position, x1 is the horizontal coordinate of the reference touch screen position, x2 is the horizontal coordinate of the first related touch screen position, and x3 is the horizontal coordinate of the second related touch screen position. Then, the candidate vertical coordinate is determined according to the sum of the product of the first ratio and the vertical coordinate of the reference touch screen position, the product of the second ratio and the vertical coordinate of the first related touch screen position, and the product of the third ratio and the vertical coordinate of the second related touch screen position. That is, the candidate vertical coordinate can be

[0103] Meanwhile, the process of determining the candidate horizontal coordinate according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions can include first determining a fourth ratio L1(y c ), a fifth ratio L2(y c ) and a sixth ratio L3(y c ), y cLet y1 be the ordinate of the middle touchscreen position, y2 be the ordinate of the reference touchscreen position, y3 be the ordinate of the first relevant touchscreen position, and y4 be the ordinate of the second relevant touchscreen position. Candidate x-coordinates are determined by summing the products of the fourth ratio and the reference touchscreen position x-coordinate, the fifth ratio and the first relevant touchscreen position x-coordinate, and the sixth ratio and the second relevant touchscreen position x-coordinate. That is, candidate x-coordinates can be...

[0104] Optionally, the electronic device determines the first candidate position through the above method. Second candidate position Then, the insertion position can be determined between the first candidate position and the second candidate position according to preset filtering rules. The filtering rules can be preset as needed, for example, selecting the insertion position based on the relevant touchscreen position and a reference touchscreen position. For example, the electronic device can determine a first product (x1-x2)×(x2-x3) and a second product (y1-y2)×(y2-y3), then compare the first product and the second product with 0. If the first product is greater than 0 and the second product is less than or equal to 0, the second candidate position is determined as the insertion position. If the second product is greater than 0 and the first product is less than or equal to 0, the first candidate position is determined as the insertion position. If both the first product and the second product are greater than 0, the distances of the first candidate position and the second candidate position to the middle touchscreen position are calculated, and the candidate position closer to the middle touchscreen position is determined as the insertion position.

[0105] Step S30: Draw the corresponding touch trajectory based on the touch positions included in the touch position sequence and the insertion position between every two consecutive related touch positions.

[0106] In one possible implementation, after determining the insertion position between every two consecutive related touch positions in each touch position sequence, the electronic device draws a touch trajectory together with the original multiple touch positions and the insertion position in the touch position sequence, thus obtaining a smooth touch trajectory.

[0107] Figure 2 A schematic diagram illustrating a touchscreen trajectory determination process according to an embodiment of the present disclosure is shown. Figure 2 As shown, after acquiring multiple sparse touch screen positions with a low sampling rate, the electronic device increases the sampling rate of the touch screen positions by interpolating between adjacent touch screen positions to obtain multiple dense positions and draw a smooth touch screen trajectory.

[0108] Optionally, in the process of the electronic device continuously acquiring the touch screen positions, the electronic device can also determine which touch screen position needs to be added to the next acquired touch screen positions according to the insertion position between the last two touch screen positions in each current touch screen position sequence. For example, in the case that the user continuously touches the touch screen with the index finger and the middle finger, the electronic device acquires the touch screen position sequence corresponding to the index finger and the touch screen position sequence corresponding to the middle finger respectively, and calculates the insertion position between the adjacent touch screen positions in real time in the process of acquisition. Further, the electronic device distinguishes the index finger touch screen position and the middle finger touch screen position in the two touch screen positions acquired next time according to the insertion position newly determined for each touch screen position sequence.

[0109] Optionally, the electronic device can determine a predicted position according to the insertion position between the last two adjacent touch screen positions in each touch screen position sequence, and in the case that the user touch screen position is detected again, match each user touch screen position to the touch screen position sequence according to the touch screen position sequence corresponding to the predicted position of each touch screen position sequence. That is, the electronic device can determine a predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence, and in response to the detection of the user touch screen position again, match each user touch screen position to the touch screen position sequence according to the predicted position corresponding to each touch screen position sequence.

[0110] In a possible implementation, the process of the electronic device determining a predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence can be determining the coordinate difference value of the horizontal coordinates of the second related touch screen position and the first related touch screen position in the last two adjacent touch screen positions in the touch screen position sequence, determining the predicted horizontal coordinate according to x3+(x3-x2) in response to the coordinate difference value being greater than or equal to a preset threshold value, and determining the predicted horizontal coordinate according to x3+(x3-x2+Δx) in response to the coordinate difference value being less than the preset threshold value, wherein Δx=|(x3-x2)-(x2-x1)|. The preset threshold value can be set in advance as needed.

[0111] Optionally, the process of determining the corresponding predicted vertical coordinate according to the predicted horizontal coordinate can be determining the seventh ratio L1(x ′ c ), the eighth ratio L1(x ′ c ), and the ninth ratio L1(x x ′ c for the predicted horizontal coordinate. Then determine the predicted vertical coordinate according to the sum of the product of the seventh ratio and the vertical coordinate of the reference touch screen position, the product of the eighth ratio and the vertical coordinate of the first related touch screen position, and the product of the ninth ratio and the vertical coordinate of the second related touch screen position. That is, the predicted vertical coordinate can be

[0112] After the electronic device determines the predicted positions corresponding to the touch screen position sequences, each user touch screen position can be matched to a touch screen position sequence according to the predicted position corresponding to each touch screen position sequence. Alternatively, the sequence matching can be performed by the distance between the user touch screen position and the predicted position, that is, the electronic device can determine the user touch screen position closest to the predicted position corresponding to each touch screen position sequence as the user touch screen position matched to the touch screen position sequence, and update the matched user touch screen position to the corresponding touch screen position sequence.

[0113] Based on the above technical features, the embodiments of the present disclosure can accurately interpolate the collected touch screen position sequences by setting the reference touch screen position, and draw a smooth touch screen trajectory based on the interpolation result, so as to eliminate the trajectory jaggies caused by low frame rate. Meanwhile, the embodiments of the present disclosure can also determine the predicted position by the interpolation position, so as to match the next acquired multiple user touch screen positions according to the predicted position corresponding to each touch screen position sequence, and add the subsequently acquired user touch screen positions to the corresponding touch screen position sequence, thereby further accurately drawing the touch screen trajectory.

[0114] Figure 3 A schematic diagram of a touch screen trajectory determination apparatus according to an embodiment of the present disclosure is shown. As shown in Figure 3 The touch screen trajectory determination apparatus according to the embodiment of the present disclosure can include:

[0115] A sequence acquisition module 30 configured to acquire at least one touch screen position sequence in response to detecting a user touch screen;

[0116] A position matching module 31 configured to determine an interpolation position between two continuous related touch screen positions in the touch screen position sequence according to the two continuous related touch screen positions and a reference touch screen position other than the two continuous related touch screen positions;

[0117] A trajectory drawing module 32 configured to draw a corresponding touch screen trajectory according to the touch screen positions included in the touch screen position sequence and the interpolation positions between the two continuous related touch screen positions.

[0118] In a possible implementation, the determination of the interpolation position between the two continuous related touch screen positions according to the two continuous related touch screen positions and the reference touch screen position other than the two continuous related touch screen positions includes:

[0119] Acquiring two continuous touch screen positions in the touch screen position sequence as the related touch screen positions, and determining any touch screen position other than the two continuous touch screen positions as a corresponding reference touch screen position;

[0120] Determining the midpoint of the two related touch screen positions as an intermediate touch screen position;

[0121] determining a first candidate position and a second candidate position according to the intermediate touch position, the reference touch position and the two related touch positions;

[0122] determining an insertion position from the first candidate position and the second candidate position according to a preset screening rule.

[0123] In a possible implementation, the determining a first candidate position and a second candidate position according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0124] determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions;

[0125] determining a position composed of the candidate horizontal coordinate and a vertical coordinate of the intermediate touch position as the first candidate position;

[0126] determining a position composed of the candidate vertical coordinate and a horizontal coordinate of the intermediate touch position as the second candidate position.

[0127] In a possible implementation, the related touch positions comprise a first related touch position and a second related touch position acquired in sequence;

[0128] the determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch position, the reference touch position and the two related touch positions comprises:

[0129] determining a first ratio L1(x c ), a second ratio L2(x c ), a third ratio L3(x c ), x c is a horizontal coordinate of the intermediate touch position, x1 is a horizontal coordinate of the reference touch position, x2 is a horizontal coordinate of the first related touch position, and x3 is a horizontal coordinate of the second related touch position;

[0130] determining a fourth ratio L1(y c ), a fifth ratio L2(y c ), a sixth ratio L3(y c ), y c is a vertical coordinate of the intermediate touch position, y1 is a vertical coordinate of the reference touch position, y2 is a vertical coordinate of the first related touch position, and y3 is a vertical coordinate of the second related touch position;

[0131] determining the candidate longitudinal coordinate according to a sum of a product of the first ratio and the reference touch screen position longitudinal coordinate, a product of the second ratio and the first relevant touch screen position longitudinal coordinate, and a product of the third ratio and the second relevant touch screen position longitudinal coordinate;

[0132] determining the candidate lateral coordinate according to a sum of a product of the fourth ratio and the reference touch screen position lateral coordinate, a product of the fifth ratio and the first relevant touch screen position lateral coordinate, and a product of the sixth ratio and the second relevant touch screen position lateral coordinate.

[0133] In a possible implementation, the determining the insertion position from the first candidate position and the second candidate position according to the preset screening rule comprises:

[0134] determining a first product (x1-x2)×(x2-x3) and a second product (y1-y2)×(y2-y3);

[0135] determining the second candidate position as the insertion position in response to the first product being greater than 0 and the second product being less than or equal to 0;

[0136] determining the first candidate position as the insertion position in response to the second product being greater than 0 and the first product being less than or equal to 0;

[0137] determining the insertion position as the one of the first candidate position and the second candidate position which is closer to the intermediate touch screen position in response to both the first product and the second product being greater than 0.

[0138] In a possible implementation, the method further comprises:

[0139] determining the predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence;

[0140] matching each of the user touch screen positions to the touch screen position sequence according to the predicted position corresponding to each of the touch screen position sequences in response to detecting the user touch screen position again.

[0141] In a possible implementation, the determining the predicted position according to the insertion position between the last two adjacent touch screen positions in the touch screen position sequence comprises:

[0142] determining a coordinate difference value of the lateral coordinates of the second relevant touch screen position and the first relevant touch screen position in the last two adjacent touch screen positions in the touch screen position sequence;

[0143] determining the predicted lateral coordinate according to x3+(x3-x2) in response to the coordinate difference value being greater than or equal to a preset threshold value;

[0144] In response to the coordinate difference being less than the preset threshold, a predicted horizontal coordinate is determined according to x3+(x3-x2+Δx), where Δx=|(x3-x2)-(x2-x1)|.

[0145] In one possible implementation, the determining the corresponding predicted vertical coordinate according to the predicted horizontal coordinate comprises:

[0146] determining a seventh ratio L1(x ′ c ), an eighth ratio L1(x ′ c ), and a ninth ratio L1(x ′ c ), x ′ c is the predicted horizontal coordinate;

[0147] determining a predicted vertical coordinate according to a sum of a product of the seventh ratio and the reference touch screen position vertical coordinate, a product of the eighth ratio and the first related touch screen position vertical coordinate, and a product of the ninth ratio and the second related touch screen position vertical coordinate.

[0148] In one possible implementation, the matching each user touch screen position to a touch screen position sequence according to the corresponding predicted position of each touch screen position sequence comprises:

[0149] determining a user touch screen position closest to the corresponding predicted position of each touch screen position sequence as a user touch screen position matched to the touch screen position sequence;

[0150] updating the matched user touch screen position to the corresponding touch screen position sequence.

[0151] Exemplarily, the electronic device in the embodiment includes, but is not limited to, a desktop computer, a television, a mobile device with a large size screen such as a mobile phone, a tablet computer, and other common electronic devices which need multiple chip cascading connection to realize driving.

[0152] Exemplarily, the electronic device can also be a user equipment (UE), a mobile device, a user terminal, a terminal, a handheld device, a computing device, or a vehicle-mounted device, etc. Exemplarily, some terminals are exemplified as a display, a smart phone or a portable device, a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a wireless terminal in Internet of Vehicles, etc. For example, the server can be a local server or a cloud server.

[0153] 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 can be provided as a server or a terminal device. Referring to Figure 4 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as an application program. The application program stored in the memory 1932 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above method.

[0154] The electronic device 1900 can also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.

[0155] In an example embodiment, a non-transitory computer-readable storage medium, such as the memory 1932 including computer program instructions, is also provided, which can be executed by the processing component 1922 of the electronic device 1900 to complete the above method.

[0156] The above descriptions are only some exemplary embodiments of the present application, and are not intended to limit the protection scope of the present application, which is defined by the appended claims.

[0157] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0158] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the stated elements.

[0159] The flow diagrams and the block diagrams in the drawings are presented to 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 the flow diagrams and the block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions ("instructions"). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in some cases, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

[0160] Having described above several embodiments of the disclosure, any modifications and variations that fall within the scope of the described embodiments are also intended to be within the scope of the disclosure. As will be apparent to those skilled in the art, some modifications and variations to the embodiments described above can be practiced while staying within the scope and spirit of the described embodiments. The foregoing description of the described embodiments has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the described embodiments to the precise form disclosed. Many modifications and variations are possible in light of the above teachings. It is intended that the disclosed embodiments be limited only by the claims.

Claims

1. A method of touch screen trajectory determination, the method comprising: The method comprises: in response to detecting a user touch screen, obtaining at least one touch screen position sequence; determining an insertion position between two relevant touch screen positions according to each two continuous relevant touch screen positions in the touch screen position sequence and a reference touch screen position other than any one of the relevant touch screen positions; drawing a corresponding touch screen track according to the touch screen positions included in the touch screen position sequence and the insertion positions between each two continuous relevant touch screen positions; the determining an insertion position between two relevant touch screen positions according to each two continuous relevant touch screen positions in the touch screen position sequence and a reference touch screen position other than any one of the relevant touch screen positions comprises: obtaining two continuous touch screen positions in the touch screen position sequence as relevant touch screen positions and determining any one touch screen position other than the relevant touch screen positions as a corresponding reference touch screen position; determining the midpoint of the two relevant touch screen positions as an intermediate touch screen position; determining a first candidate position and a second candidate position according to the intermediate touch screen position, the reference touch screen position and the two relevant touch screen positions; determining an insertion position among the first candidate position and the second candidate position according to a preset screening rule; the determining a first candidate position and a second candidate position according to the intermediate touch screen position, the reference touch screen position and the two relevant touch screen positions comprises: determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch screen position, the reference touch screen position and the two relevant touch screen positions; determining the position composed of the candidate horizontal coordinate and the vertical coordinate of the intermediate touch screen position as the first candidate position; determining the position composed of the candidate vertical coordinate and the horizontal coordinate of the intermediate touch screen position as the second candidate position.

2. The method of claim 1, wherein, the relevant touch screen positions comprise a first relevant touch screen position and a second relevant touch screen position obtained in sequence; the determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch screen position, the reference touch screen position and the two relevant touch screen positions comprises: determining a first ratio , a second ratio , a third ratio , , , , is the horizontal coordinate of the intermediate touch position, is the horizontal coordinate of the reference touch position, is the horizontal coordinate of the first associated touch position, is the horizontal coordinate of the second associated touch position; determining a fourth ratio , a fifth ratio , a sixth ratio , , , , is the intermediate touch screen position ordinate, is the reference touch screen position ordinate, is the first related touch screen position ordinate, is the second related touch screen position ordinate; determining a candidate vertical coordinate according to the sum of the product of the first ratio and the vertical coordinate of the reference touch screen position, the product of the second ratio and the vertical coordinate of the first relevant touch screen position, and the product of the third ratio and the vertical coordinate of the second relevant touch screen position; determining a candidate horizontal coordinate according to the sum of the product of the fourth ratio and the horizontal coordinate of the reference touch screen position, the product of the fifth ratio and the horizontal coordinate of the first relevant touch screen position, and the product of the sixth ratio and the horizontal coordinate of the second relevant touch screen position.

3. The method according to any one of claims 1-2, characterized in that, the determining an insertion position among the first candidate position and the second candidate position according to a preset screening rule comprises: determining a first product and a second product ; in response to the first product being greater than 0 and the second product being less than or equal to 0, determining the second candidate position as the insertion position; in response to the second product being greater than 0 and the first product being less than or equal to 0, determining the first candidate position as the insertion position; in response to the first product and the second product both being greater than 0, determining the one closer to the intermediate touch screen position among the first candidate position and the second candidate position as the insertion position.

4. The method according to any one of claims 1-2, characterized in that, the method further comprises: determining a predicted position according to an insertion position between two adjacent touch screen positions in the last two adjacent touch screen positions in the touch screen position sequence; matching each of the user touch screen positions to a touch screen position sequence according to the predicted position corresponding to each of the touch screen position sequences in response to detecting the user touch screen position again.

5. The method of claim 4, wherein, The method further comprises: determining a predicted position according to an insertion position between two adjacent touch screen positions in the last two adjacent touch screen positions in the touch screen position sequence; In response to the coordinate difference being greater than or equal to a preset threshold value, determining a predicted horizontal coordinate according to the predicted horizontal coordinate. In response to the coordinate difference value being less than the preset threshold value, determining a predicted horizontal coordinate according to determining a predicted horizontal coordinate, wherein .

6. The method of claim 5, wherein, The method further comprises: determining a seventh ratio , an eighth ratio , a ninth ratio , , , , is a predicted abscissa; determining a predicted position according to a sum of a product of the seventh ratio and the reference touch screen position vertical coordinate, a product of the eighth ratio and the first related touch screen position vertical coordinate, and a product of the ninth ratio and the second related touch screen position vertical coordinate.

7. The method of claim 4, wherein, The method further comprises: determining a user touch screen position closest to the predicted position corresponding to each of the touch screen position sequences as the user touch screen position matched to the touch screen position sequence; updating the matched user touch screen position to the corresponding touch screen position sequence.

8. A touch screen trajectory determination apparatus characterized by comprising: The device comprises: a sequence obtaining module, configured to obtain at least one touch screen position sequence in response to detecting a user touch screen position; a position matching module, configured to determine an insertion position between two adjacent related touch screen positions in the touch screen position sequence according to the two adjacent related touch screen positions and a reference touch screen position other than any of the related touch screen positions; a trajectory drawing module, configured to draw a corresponding touch screen trajectory according to the touch screen positions included in the touch screen position sequence and the insertion positions between two adjacent related touch screen positions. The method further comprises: obtaining two adjacent touch screen positions in the touch screen position sequence as the related touch screen positions and determining any touch screen position other than the related touch screen positions as the corresponding reference touch screen position; determining a midpoint of the two related touch screen positions as an intermediate touch screen position; determining a first candidate position and a second candidate position according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions; determining an insertion position according to a preset screening rule among the first candidate position and the second candidate position. The method further comprises: determining a candidate horizontal coordinate and a candidate vertical coordinate according to the intermediate touch screen position, the reference touch screen position and the two related touch screen positions; determining a position composed of the candidate horizontal coordinate and the vertical coordinate of the intermediate touch screen position as the first candidate position; determining a position composed of the candidate vertical coordinate and the horizontal coordinate of the intermediate touch screen position as the second candidate position.

9. A display device, characterized by The device comprises a plurality of display units and at least one touch screen trajectory determination device according to claim 8.

10. The display device of claim 9, wherein, The display unit includes a display panel, the display panel including at least one of a liquid crystal display panel, a micro light emitting diode display panel, a light emitting diode display panel, a mini light emitting diode display panel, a quantum dot light emitting diode display panel, an organic light emitting diode display panel, a cathode ray tube display panel, a digital light processing display panel, a field emission display panel, a plasma display panel, an electrophoretic display panel, an electrowetting display panel, and a small pitch display panel. 11.An electronic device comprising the display device of claim 9 or 10.

12. An electronic device, comprising: comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method of any one of claims 1 to 7 when executing the instructions stored in the memory.

13. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1 to 7. The computer program instructions, when executed by the processor, implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Touch track processing method and device, terminal, storage medium and program product

    CN114494046A