WO2022253016A1 - Procédé de retour arrière de ligne pour panneau d'entrée et appareil associé - Google Patents

Procédé de retour arrière de ligne pour panneau d'entrée et appareil associé Download PDF

Info

Publication number
WO2022253016A1
WO2022253016A1 PCT/CN2022/094377 CN2022094377W WO2022253016A1 WO 2022253016 A1 WO2022253016 A1 WO 2022253016A1 CN 2022094377 W CN2022094377 W CN 2022094377W WO 2022253016 A1 WO2022253016 A1 WO 2022253016A1
Authority
WO
WIPO (PCT)
Prior art keywords
line
electronic device
segment
user operation
speed
Prior art date
Application number
PCT/CN2022/094377
Other languages
English (en)
Chinese (zh)
Inventor
汤赞成
邵钰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022253016A1 publication Critical patent/WO2022253016A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Definitions

  • the present application relates to the field of terminal technologies, and in particular to a method for retracting lines of an input panel and a related device.
  • applications such as handwriting input method applications and drawing applications in electronic devices can provide functions of returning and restoring input content.
  • the electronic device may display multiple lines drawn by the user in the input panel of the drawing application.
  • the electronic device may delete one or more lines displayed in the input panel according to the sequence of drawing time of the multiple lines.
  • the track of a line may be the track of a single sliding operation detected by the electronic device on the input panel. That is, a line is a line completed by the user in one stroke.
  • the electronic device only supports rolling back the lines in units of bars. That is, one line is rolled back at a time. It is difficult to roll back the lines in the input panel to the state desired by the user in the above rollback method, and the rollback accuracy is low. For example, if the user wants to roll back a part of a line, he needs to operate through the eraser function or other more complicated functions. User operations are cumbersome.
  • the present application provides an input panel-based line fallback method and a related device.
  • the electronic device can detect the time length of each user operation for segmental rollback and the frequency of the user's user operation for segmental rollback to adjust the speed of the segmented rollback line, so as to realize a part of a line from the input panel remove.
  • the line rollback method can improve the precision of the line rollback, so that the user can roll back the lines to their desired state more conveniently.
  • the embodiment of the present application provides a method for rolling back lines.
  • the electronic device displays first lines on the display screen.
  • the first line is drawn by the electronic device according to the trajectory of a single sliding operation detected on the display screen.
  • the electronic device receives the first user operation, and the first user operation may be used to trigger the electronic device to perform a segmented rollback of the lines displayed on the display screen in the order of drawing time from late to early.
  • the electronic device may remove the part from the end point of the first line to the first position of the first line from the display screen according to the first user operation.
  • the user can quickly rewind a part of a line. This can improve the accuracy of line rollback, so that users can roll back the lines to their desired state more conveniently.
  • the first line may include multiple segments.
  • One of the multiple segments is the line corresponding to the trajectory of the sliding operation within the first time period during the drawing of the first line.
  • the specific method for the electronic device to remove the part from the end point of the first line to the first position of the first line from the display screen according to the first user operation may be as follows: when the first user operation starts, the electronic device may follow the steps from the first The direction from the end point of a line to the start point of the first line, with the moving step as a segment, starts from the segment where the end point of the first line is located, and removes the segments of the first line from the display screen one by one . At the end of the first user operation, the first line is segmented back to the first position.
  • the electronic device may segment the first line according to the drawing time. During the drawing of the first line, the electronic device may draw different segments on different layers.
  • the aforementioned first time period may be a preset segmented time period. Layers drawn with one segment can have timestamps. The timestamp can be determined from the rendering time of this segment.
  • the electronic device can determine the early and late order of the drawing time of the segments on different layers according to the time stamps of the layers.
  • the electronic device may store the multiple layers of the multiple segments drawn with the first line into the stack in order of drawing time from early to late. Among them, the storage position of the layer with the earlier drawing time is closer to the bottom of the stack. Layers with a later drawing time are stored closer to the top of the stack.
  • the electronic device can realize segmental regression of the line by moving the layer pointed to by the pointer in the stack. The layer pointed to by the pointer can be displayed as the uppermost layer among the layers in the input panel for all drawing content.
  • the input panel can be used for user input and displays the content entered by the user.
  • the display screen of the electronic device may include the above-mentioned input panel.
  • the content displayed on the input panel is the content displayed on the display screen of the electronic device.
  • the moving step is taken as a segment, starting from the segment where the end point of the first line is, and dividing the segment of the first line
  • the electronic device can follow the direction from the top of the stack of segments storing the first line to the bottom of the stack, with the moving step as one layer, from the image at the top of the stack to layer starts, move the position of the pointer.
  • the pointer is moved to the layer corresponding to the first position in the stack.
  • the electronic device can perform a segmentation rollback on a line by using a segment of a line as a unit.
  • the user can see on the display screen that the line gradually recedes to the desired position.
  • the user can end the first user operation.
  • the above method is not only easy for the user to operate, but also can improve the accuracy of line retraction. Users can return the lines to their desired state more conveniently.
  • the duration of the first user operation is the second time period.
  • the speed at which the part from the end point of the first line to the first position of the first line is removed from the display screen is the first speed.
  • the speed at which the portion from the end point of the first line to the first position of the first line is removed from the display screen varies.
  • the second time period includes d1 time intervals, and the magnitudes of the removed speeds in the d1 time intervals show an increasing trend according to the order of time.
  • the speed removed in the first time interval may be the first speed.
  • the first time interval is the first time interval in the order of time among the d1 time intervals.
  • the electronic device may gradually increase the speed of the segmented retraction line within the above-mentioned second time period, so as to improve the efficiency of retraction.
  • the first user operation is a user operation on the first control.
  • the electronic device determines that within a third time period before receiving the first user operation, a1 user operations on the first control are also received.
  • the electronic device may determine the above-mentioned first speed according to one or more of the size of a1 and the speeds of the a1 segmented retraction lines.
  • the speeds of the a1 segmented retraction lines are respectively the speeds at which the electronic device removes the lines from the display screen within the time period of the a1 user operations on the first control.
  • the larger a1 is, the slower the above-mentioned first speed is.
  • the above-mentioned first speed is lower than one or more of the speeds of the a1 segmented retraction lines.
  • the above-mentioned first control may be a segment rollback control.
  • the first control can also have other names.
  • a user operation acting on the first control may trigger the electronic device to backtrack the lines displayed on the display screen in order of drawing time from late to early.
  • the electronic device can roll back a line in segments
  • the user can press the roll back control in segments.
  • the user when the user is away from the user's expected position, the user usually long presses the segmented fallback control.
  • the user When approaching the desired position of the user, the user usually intermittently presses the segmented return control until the electronic device returns the line to the desired position.
  • the electronic device detects that the frequency of acting on the first control is higher (that is, the greater a1 is), the current retreat position of the first line is different from the position expected by the user. the closer.
  • the electronic device may, on the basis of one or more of the speeds of the a1 segmented retraction lines, reduce the speed of the segmented retraction line or the initial speed of the segmented retraction line within the first user operation action time period ( i.e. first speed). In this way, it is possible to avoid too many subsections that are rolled back due to the first speed being too fast.
  • the electronic device further displays second lines on the display screen.
  • the second line is drawn by the electronic device according to the trajectory of a single sliding operation detected on the display screen.
  • the drawing time of the second line is earlier than the drawing time of the first line.
  • the second line may include multiple segments.
  • the multiple segments are lines corresponding to the track of the sliding operation in the first time period during the drawing of the second line.
  • the first user operation is a user operation on the first control. After the electronic device removes the part from the end point of the first line to the first position of the first line from the display screen, it also receives a second user operation acting on the first control.
  • the electronic device can start from the first position and move the Segments of a line are removed one by one from the display. If all segments of the first line are removed from the display screen, the electronic device moves from the end point of the second line to the start point of the second line, with the moving step as a segment, and from the end point of the second line First, the segments of the second line are removed from the display one by one.
  • the speed at which the electronic device retracts the line by segment during the time period when the second user operation is active may be determined according to the above-mentioned first speed (for example, it is 60% of the first speed).
  • the speed at which the electronic device retracts the line by segment during the time period when the second user operates may be constant.
  • the initial speed of the segmented retreat line of the electronic device during the time period of the second user operation may be determined according to the above-mentioned first speed (for example, it is 60% of the first speed).
  • the electronic device may segment the multiple lines according to the drawing time, and store the segments of the multiple lines.
  • the user can realize segmental rollback of the multiple lines through user operations acting on the first control.
  • the first line may include multiple segments.
  • One of the multiple segments is the line corresponding to the trajectory of the sliding operation within the first time period during the drawing of the first line.
  • the electronic device may calculate the drawing speeds of the plurality of segments.
  • the drawing speed of a segment can be determined according to the length of the first segment and the length in the second time period.
  • the electronic device can determine whether a segment is an abnormal segment or a normal segment according to the drawing speed of a segment.
  • Anomalous segments are segments whose rendering speed is above a first threshold.
  • a normal segment is a segment whose rendering speed is not higher than the first threshold.
  • the electronic device may determine the first position.
  • the first position is the intersection of the first abnormal segment and the normal segment in the direction from the end point of the first line to the start point of the first line in the first line.
  • the electronic device may use a clustering algorithm to cluster multiple segments of the first line according to a drawing speed of a segment.
  • the electronic device may divide the plurality of segments of the first line into a plurality of categories. Among the multiple categories, one category contains one cluster center.
  • the electronic device may determine whether the drawing speed of the cluster center is higher than the above-mentioned first threshold. If the drawing speed of the cluster center is higher than the above-mentioned first threshold, the electronic device may determine that the segments included in the category to which the cluster center belongs are all abnormal segments. Otherwise, the segments contained in a category are all normal segments.
  • the method for the electronic device to remove the end point of the first line to the first position of the first line from the display screen may specifically be: the electronic device may remove the first line from the end point to the first position of the first line All segments between the positions are simultaneously removed from the display.
  • the electronic device can estimate at which moment the user is affected by an external force based on the drawing speed of each segment in a line, causing a part of the line to deviate from the user's expected trajectory.
  • the drawing speed of the segment drawn under the influence of external force is much higher than the drawing speed of the segment in the normal drawing process (that is, the drawing process not affected by the external force).
  • the electronic device may respond to a user operation for segment rollback, and remove the abnormal segment part in the input panel.
  • the electronics did not remove the entire line from the input panel.
  • the above abnormal segment is removed, the user can continue to draw from the dividing point.
  • the above method is easy for the user to operate, and can quickly return the lines in the input panel to the desired state of the user, thereby improving the user experience.
  • the duration of the first user operation is the second time period.
  • the electronic device may determine whether the length of the second time period exceeds a second threshold. If the length of the second time period exceeds the second threshold, during the time period exceeding the second threshold in the second time period, the electronic device may move in a step size of A segment, with the moving speed as the second speed, removes the segments of the first line from the display one by one, starting from the first position.
  • the speed at which the electronic device retracts the lines segment by segment may vary.
  • the second speed may exceed the initial speed within the time period of the second threshold within the above-mentioned second time period.
  • the electronic device may gradually increase the speed of the segmented retraction line on the basis of the second speed.
  • the second time period in which the first user operation continues exceeds the second threshold may indicate that the cut-off point determined by the electronic device has not yet reached the position where the user expects to fall back.
  • the electronic device may continue to return the first line segmentally from the above-mentioned first position, so as to return to a position desired by the user.
  • the electronic device determines that the segment where the end point of the first line is located is not an abnormal segment, the electronic device displays the part from the end point of the first line to the first position of the first line
  • the specific method of removing the screen can be as follows: the electronic device can move from the end point of the first line to the starting point of the first line, and use the moving step as a segment, and start from the segment where the end point of the first line is located. To start, the segments of the first line are removed from the display one by one. At the end of the first user operation, the first line is segmented back to the first position.
  • the electronic device after the electronic device removes the part from the end point of the first line to the first position of the first line from the display screen, it further receives a third user operation.
  • the third user operation may be used to trigger the electronic device to recover the lines that have been rolled back but not recovered by segment in the order of the rollback time from late to early.
  • the electronic device may display the part from the first position to the second position of the first line on the display screen according to the third user operation.
  • the second location is between the first location and the end point of the first line.
  • the electronic device can recover the retracted lines segment by segment. This can make it easier for the user to recover the rolled back part if they accidentally roll back too much.
  • the method for recovering the line by segment can better help the user return the line to the state expected by the user.
  • the first line may include multiple segments.
  • One of the multiple segments is the line corresponding to the trajectory of the sliding operation within the first time period during the drawing of the first line.
  • the specific method for the electronic device to display the part from the first position to the second position of the first line on the display screen according to the third user operation may be as follows: when the third user operation starts, the electronic device follows the steps from the first position to the second position. The direction of the end point of a line. The moving step is a segment. Starting from the first position, the segments removed from the display screen in the first line are displayed on the display screen one by one. At the end of the third user operation, the first line is segmented back to the second position.
  • the duration of the third user operation is the fourth time period.
  • the partial segmental restoration speed from the first position to the second position of the first line may be the third speed.
  • the speed of partial segment recovery from the first position to the second position of the first line changes.
  • the fourth time period includes d2 time intervals.
  • the speed of subsection recovery in the d2 time intervals shows an increasing trend according to the order of time.
  • the speed of segment recovery in the second time interval is the third speed.
  • the second time interval is the first time interval in the order of time among the d2 time intervals.
  • the electronic device may gradually increase the speed of recovering the lines in segments within the fourth time period, so as to improve the recovery efficiency.
  • the third user operation is a user operation that acts on the second control.
  • the electronic device determines that within the fifth time period before receiving the third user operation, a2 user operations on the second control are also received.
  • the electronic device may determine the third speed according to one or more of the size of a2 and the speeds of the a2 segment recovery lines.
  • the speeds of the a2 segments to restore the lines are respectively the speeds of the electronic device to restore the lines in segments within the time period of the a2 user operations acting on the second control.
  • the bigger a2 is, the slower the third speed is.
  • the third speed is lower than one or more of the speeds of the a2 segment recovery lines.
  • the second control may be a segment recovery control.
  • the second control can also have other names.
  • a user operation acting on the second control may trigger the electronic device to restore the lines that have been rolled back but not restored by segment according to the order of the rollback time from late to early.
  • the user when the user is away from the location where the user expects to restore, the user usually long presses the segment restore control. When approaching the position that the user expects to restore, the user usually short-presses the segment restoration control intermittently until the electronic device restores the line to the position that the user expects to restore. Then, within a period of time (such as the fifth period of time), the electronic device detects that the frequency of acting on the second control is higher (that is, the greater a2 is), the more the current restored position of the first line is compared with the user's expected position. near.
  • the electronic device can reduce the speed of the segmented back line or the initial speed of the back line during the third user operation action time period (that is, the third speed). In this way, the third speed can be avoided as much as possible, resulting in too many segments to be recovered.
  • the electronic device can adjust the speed of the segmented recovery line by detecting the duration of each user operation on the second control and the frequency of the user operation on the second control. This can improve the efficiency of line segmentation recovery, so that users can return the lines to their desired state more conveniently.
  • all segments of the third line are removed from the display screen before the first user operation.
  • the third line is drawn by the electronic device according to the trajectory of a single sliding operation detected on the display screen.
  • the third line is drawn later than the first line.
  • the third line may include multiple segments. These multiple segments are lines corresponding to the track of the sliding operation in the first time period during the drawing process of the third line.
  • the fallback time of the third line is earlier than the fallback time of the first line.
  • the third user operation is a user operation acting on the second control. After the electronic device displays the part from the first position to the second position of the first line on the display screen, it also receives a fourth user operation acting on the second control.
  • the electronic device can start from the second position and move the first line in the direction from the second position to the end point of the first line.
  • the segments of a line that have been removed from the display are shown on the display one by one. If all segments that have been removed from the display screen in the first line are displayed on the display screen, the electronic device uses the moving step as a segment in the direction from the starting point of the third line to the end point of the third line, Starting from the starting point of the third line, the segments removed from the display screen in the third line are displayed on the display screen one by one.
  • the speed at which the electronic device restores the line by segment during the time period when the fourth user operation is active may be determined according to the above-mentioned third speed (for example, it is 60% of the third speed).
  • the speed at which the electronic device restores the lines by segment during the time period of the second user operation may be constant.
  • the speed at which the electronic device restores the line segment by segment changes (for example, gradually increases) within the time period when the fourth user operation is active.
  • the initial speed at which the electronic device restores the lines segmentally during the fourth user operation period may be determined according to the above third speed (for example, it is 60% of the third speed).
  • the embodiment of the present application provides an electronic device.
  • the electronic device includes a display screen, a memory, and a processor.
  • the memory is used to store a computer program
  • the processor is used to call the computer program, so that the electronic device executes any possible implementation manner in the first aspect.
  • the present application provides a chip, which is applied to an electronic device, and the chip includes one or more processors, and the processor is used to invoke computer instructions so that the electronic device executes any possible method in the first aspect. Method to realize.
  • the present application provides a computer program product including instructions, which is characterized in that, when the computer program product is run on an electronic device, the electronic device is made to execute any possible implementation manner in the first aspect.
  • the present application provides a computer-readable storage medium, including instructions, wherein, when the above-mentioned instructions are run on an electronic device, the electronic device is made to execute any possible implementation manner in the first aspect.
  • the electronic device provided in the second aspect above, the chip provided in the third aspect, the computer program product provided in the fourth aspect, and the computer-readable storage medium provided in the fifth aspect are all used to execute the method. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
  • Figures 1A to 1C are schematic diagrams of scenes of some line rollback provided by the embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
  • Fig. 3A to Fig. 3C are schematic diagrams of other scenes of line rollback provided by the embodiment of the present application.
  • Figures 4A to 4C are schematic diagrams of other scenes of line rollback provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of segmented storage of lines by the electronic device 100 provided by the embodiment of the present application.
  • FIG. 6A and FIG. 6B are schematic diagrams of other scenes of line rollback provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of segmented storage of lines by the electronic device 100 provided by the embodiment of the present application.
  • FIG. 8 is a flow chart of a method for rolling back lines provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • FIG. 1A to FIG. 1C exemplarily show a scene schematic diagram of a line retreat provided by an embodiment of the present application.
  • the electronic device 100 can open the drawing application and display the user interface 210 as shown in FIG. 1A .
  • User interface 210 may include a brush control 211 , an eraser control 212 , a rollback control 213 , a redo control 214 , a save control 217 , and an input panel 218 . in:
  • the input panel 218 can be used for the user to input and display the content input by the user.
  • the content input by the user may be text, picture and so on.
  • the content entered by the user can consist of one or more lines.
  • the trace of a line may be the trace of a single sliding operation detected by the electronic device on the input panel. That is, a line is a line completed by the user in one stroke.
  • the sliding operation acting on the input panel may be a sliding operation of the user's finger or stylus on the display screen of the electronic device 100 .
  • the embodiment of the present application does not limit the method for the electronic device 100 to detect the above sliding operation.
  • the electronic device 100 may determine a pixel point where a sliding operation starts and a pixel point where a sliding operation ends.
  • the line formed by the sliding track between the pixel point at the start position and the pixel point at the end position is a line.
  • the input panel 218 shown in FIG. 1A includes two lines: a line 218A and a line 218B.
  • the drawing time of the line 218A is earlier than the drawing time of the line 218B.
  • the paintbrush control 211 can be used to trigger the electronic device 100 to enter the line input function, and to adjust attributes such as thickness and color of the "virtual paintbrush".
  • the above-mentioned "virtual paintbrush” may be presented in the user interface 210 as icons such as dots, arrows, paintbrush, and the like.
  • the sliding track of the "virtual paintbrush" on the input panel can form lines.
  • the line input function described above is a function for inputting on the input panel 218 .
  • the electronic device 100 may display a line corresponding to a track of the sliding operation according to the sliding operation detected in the input panel 218 .
  • the color of the "virtual paintbrush” is black, and the color of the lines formed by sliding the “virtual paintbrush” on the input panel is black.
  • the eraser control 212 can be used to trigger the electronic device 100 to enter the erasing function, and to adjust attributes such as the size of the "virtual eraser".
  • the above-mentioned eraser function is a function to erase lines displayed on the input panel 218 .
  • the electronic device 100 can erase content on the track of the sliding operation detected on the input panel 218 according to the sliding operation.
  • the erased content is canceled and displayed on the input panel 218 .
  • the larger the "virtual eraser" the more content erased by the electronic device 100 according to the sliding track of the "virtual eraser" on the input panel.
  • the rollback control 213 can be used to trigger the electronic device 100 to roll back the lines displayed in the input panel 218 .
  • the electronic device 100 may roll back the lines displayed on the input panel 210 according to the sequence of drawing time from late to early.
  • the input panel 218 includes a line 218A and a line 218B shown in FIG. 1A .
  • Line 218A was drawn earlier than line 218B.
  • the electronic device 100 can roll back the lines displayed in the input panel 218 to the state before the line 218B is drawn after the previous line of the line 218B is drawn.
  • the electronic device 100 may display a user interface 210 as shown in FIG. 1B . Wherein, the electronic device 100 removes the line 218B from the input panel 218 . Only line 218A is included in the input panel shown in FIG. 1B .
  • the above-mentioned one user operation acting on the back control 213 may be a user operation during a continuous period of time from when the user starts touching the back control 213 to when the user stops touching the back control 213 .
  • the electronic device 100 may determine a touch operation detected on the touch panel and acting on the back control 213 for a period of time as a user operation on the back control 213 .
  • a user operation on the rollback control 213 can be used to roll back the latest line drawn in the input panel 218 . That is to say, in response to a user operation acting on the rollback control 213 , the electronic device 100 may remove a line drawn with the latest time from the input panel 218 .
  • the restore control 214 can be used to trigger the electronic device 100 to restore the rolled back line.
  • the electronic device 100 may recover the rolled back lines according to the sequence of the rolled back time from late to early. From FIG. 1A to FIG. 1B , line 218B is regressed. Input panel 218 shown in FIG. 1B includes only line 218A.
  • electronic device 100 may restore line 218B. As shown in FIG. 1C , when the line 218B is restored, the electronic device 100 may display the line 128B on the input panel 218 .
  • a user operation on the recovery control 214 can be used to recover the line that has the latest rollback time among the lines that have been rolled back and have not been recovered. That is to say, in response to a user operation acting on the recovery control 214 , the electronic device 100 may display in the input panel 218 a line with the latest rollback time among the lines that have been rolled back but not recovered.
  • the shape and position displayed in the input panel after a line is restored are the same as the shape and position displayed in the input panel before the line is rolled back.
  • the state of the restore control 214 may be the disabled state shown in FIG. 1A . As shown in FIG. 1A , when the recovery control 214 is in an unavailable state, the color of the recovery control 214 is gray. When there are lines that can be restored, the state of the restoration control 214 can be the available state shown in FIG. 1B . As shown in FIG. 1B , when the recovery control 214 is in an available state, the color of the recovery control 214 is black.
  • the embodiment of the present application does not limit the method for the electronic device 100 to indicate the state of the restoration control 214 .
  • the save control 217 can be used to trigger the electronic device 100 to save the input content received in the input panel 218 .
  • the applications in the above scenarios are not limited to drawing applications, and may also be handwriting input applications, document editing applications, and other applications with input panels.
  • a drawing application is taken as an example for specific description.
  • the above-mentioned rollback control 213 only supports rollback of lines in units of bars, but does not support rollback of a part of a line.
  • the electronic device 100 it is difficult for the electronic device 100 to roll back the lines in the input panel to the state desired by the user, and the rollback accuracy is low.
  • the user wants to roll back a part of the line 218B shown in FIG. 1A , the user can only use the "virtual eraser" to erase the desired part of the line 218B.
  • the "virtual eraser" can easily erase other lines.
  • users need to adjust the size of the "virtual eraser". Obviously, when erasing a part of a line with an eraser, the user operation is cumbersome and the user experience is poor.
  • the electronic device 100 can cut a line.
  • the cutting position may be the position where the user expects the line to retreat. Further, the electronic device 100 may delete a cut part of the line, so as to realize that the line returns to a desired position of the user.
  • the above method requires that the application can provide the above professional functions. Applications such as handwriting input method applications and drawing applications installed in electronic devices such as mobile phones and tablets often do not have such functions.
  • the above method requires the user to master the usage method of the above professional functions. The user's operation is more cumbersome.
  • the embodiment of the present application provides a method for rolling back lines.
  • the electronic device can monitor the sliding track acting on the input panel, and display the lines corresponding to the sliding track on the input panel.
  • the electronic device can store a line in segments according to the drawing time of the line.
  • This one line can consist of multiple segmented parts.
  • One of the segmented parts may be a line corresponding to the sliding trajectory within a preset segmented time period (for example, within 2 milliseconds).
  • the electronic device may roll back the lines in the input panel in segments at a speed A within a time period A when the user operation on the segmented rollback control is detected.
  • the speed A at which the electronic device rolls back the line within the time period A may be determined by the time length of one or more user operations acting on the segmented rollback control before the user operation of the segmented rollback control . If the duration of the one or more previous user operations tends to become shorter in the order of the time of action, the electronic device can reduce the Speed of rewinding lines during time period A.
  • the electronic device can roll back a line in segments
  • the user can press the roll back control in segments.
  • the user when away from the user's expected position, the user usually long presses the segmented back control.
  • the user When approaching the desired position of the user, the user usually intermittently short-presses the segmented rollback control until the electronic device rolls back the line to the desired position. It can be seen that the length of time and the frequency at which the user presses the segment back control can reflect the distance between the current back position of the line and the user's desired position.
  • the electronic device can adjust the speed of the segmented rollback line by detecting the duration of each user operation acting on the segmented rollback control and the frequency of user operations acting on the segmented rollback control.
  • the above method can not only improve the accuracy of the rollback, roll back the lines in the input panel to the state expected by the user, and is easy for the user to operate.
  • the aforementioned segmentation rollback control may be newly added in the aforementioned user interface 210 . Subsequent embodiments of the present application will specifically introduce the segmentation rollback control.
  • the above line fallback method can be applied to electronic devices with display screens.
  • electronic devices with display screens.
  • mobile phone tablet computer, notebook computer, TV, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and so on.
  • UMPC ultra-mobile personal computer
  • netbook personal digital assistant
  • PDA personal digital assistant
  • FIG. 2 shows a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the charging management module 140 is configured to receive a charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Loudspeaker 170A also called “horn” is used to convert audio electrical signals into sound signals
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes ie, x, y and z axes
  • the air pressure sensor 180C is used to measure air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the touch sensor 180K can detect the sliding operation on the input panel 218 in the foregoing embodiments.
  • the touch sensor 180K may transfer the above-mentioned sliding operation to the application processor.
  • the electronic device 100 When the electronic device 100 enters the line input function, the electronic device 100 may display the line determined by the track of the sliding operation on the display screen.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • FIG. 3A to FIG. 3C exemplarily show another scene schematic diagram of line retreat provided by the embodiment of the present application.
  • the electronic device 100 can open the drawing application and display the user interface 210 as shown in FIG. 3A .
  • User interface 210 may include brush control 211 , eraser control 212 , rollback control 213 , restore control 214 , segment rollback control 215 , segment restore control 216 , save control 217 , and input panel 218 . Except for the segment rollback control 215 and the segment recovery control 216 , other content in the user interface 210 can refer to the introduction of the embodiment shown in FIG. 1A , and will not be repeated here.
  • the segment rollback control 215 can be used to trigger the electronic device 100 to segment the lines displayed in the input panel 218 .
  • the electronic device 100 may roll back the lines displayed on the input panel 210 by segments according to the order of drawing time from late to early.
  • the electronic device 100 may store one or more lines in the input panel 218 in segments according to the drawing time.
  • a segment part may be a line corresponding to a sliding track within a preset time period.
  • the starting point of the line 218B is the pixel point where the electronic device 100 detects the start of a sliding operation when the electronic device 100 enters the line input function.
  • the end point of the line 218B is the pixel point where the sliding operation ends.
  • the drawing time is from early to late.
  • the electronic device 100 may store the line 218B in segments according to the drawing time. When a user operation acting on the segment rollback control 215 is detected, the electronic device 100 can move from the segment part where the end point of the line 218B is located to the segment where the start point of the line 218B is located in the sequence of drawing time from late to early. The segment is partially rolled back.
  • the electronic device 100 may store the line 218A in segments according to the drawing time. Line 218A was drawn earlier than line 218B. When the electronic device 100 rolls back all the segments of the line 218B (that is, the line 218B is removed in the input panel 218), the electronic device 100 can continue to process the segments of the line 218A in the order of drawing time from late to early. Partially segmented rollback.
  • the electronic device 100 when a user operation acting on the segment rollback control 215 is detected, the electronic device 100 starts segment rollback from the segment where the end point of the line 218B is located. During the time period A when the user operates on the segment rollback control 215 , the electronic device 100 can perform segment rollback according to the speed A. Referring to FIG. The above speed A is variable. When no user operation acting on the segment rollback control 215 is detected (that is, the user stops touching the segment rollback control 215), the electronic device 100 may stop performing segment rollback on the line. For example, the electronic device 100 detects a user operation acting on the segment rollback control 215 once, and the duration of this user operation is a time period A. After time period A, electronic device 100 retracts line 218B to position A shown in FIG. 3B .
  • the segment recovery control 216 can be used to trigger the electronic device 100 to segment recover the rolled back lines. Wherein, the electronic device 100 may recover the rolled back lines in segments according to the sequence of rolling back times from late to early. Line 218B is segmented back to position A as shown in FIG. 3B . It can be understood that, in the backed-off segment, the closer to the segment where the position A is located, the later the back-off time.
  • the electronic device 100 can restore the segments of the line 218B from the above-mentioned position A, and restore the segments of the line 218B to FIG. 3C shown at position B.
  • the restored segmented portion may again be displayed in the input panel 218 .
  • the restored shape of the segmented part and the displayed position in the input panel are respectively the same as the shape and displayed position in the input panel of the segmented part before being rolled back.
  • the state of the segment restoration control 216 may be the disabled state shown in FIG. 3A .
  • the color of the segment recovery control 216 is gray.
  • the state of the segment restoration control 216 can be the available state shown in FIG. 3B .
  • the color of the segment recovery control 216 is black.
  • the embodiment of the present application does not limit the method for the electronic device 100 to identify the status of the segment recovery control 214 .
  • the electronic device 100 may display the segmented rollback control 215 as an unavailable state (eg, the color of the segmented rollback control 215 is gray).
  • the electronic device 100 may display the segmented rollback control 215 as an available state (eg, the color of the segmented rollback control 215 is black).
  • Stage 1 The electronic device 100 responds to the first segmentation user operation and rolls back the lines segmented.
  • the electronic device 100 may display a line corresponding to the sliding track on the input panel 218 according to the sliding track detected on the input panel 218 .
  • the electronic device 100 displays a line 218A and a line 218B on the input panel 218 as shown in FIG. 3A according to the sliding track.
  • the electronic device 100 in response to a user operation that acts on the segment rollback control 215 and lasts for 3 seconds (second, s) (hereinafter referred to as the first segment user operation), the electronic device 100 returns the line 218B to Go back to position C.
  • the user presses the segment rollback control 215 for the first time and lasts for 3 seconds, so that the line 218B is rolled back from the end point to position C.
  • the segmented portion included from the end point of line 218B to position C ie, the line setback shown in FIG. 4A ) is removed in input panel 218 .
  • the electronic device 100 may adjust the speed of the segmented retreat line within this period of time. It can be understood that a longer duration of action on the segment rollback control 215 may indicate that more segments need to be rolled back, and the distance between the current rollback position of the line and the user's expected position is still relatively large.
  • the electronic device 100 may gradually increase the speed of segmented retraction lines during the time period of the first segmented user operation, so as to improve the efficiency of retraction.
  • the electronic device 100 may retreat segmentally from the end point of the line 218B at an initial speed of v1 .
  • the electronic device 100 may continue segmenting back the line at the speed v2 .
  • Velocity v 2 is not less than velocity v 1 .
  • the electronic device 100 may continue segmenting back the line at the speed v3 .
  • the velocity v 3 is not less than the velocity v 2 .
  • the electronic device 100 may retreat the line segmented at a constant speed. For example, when detecting the first segmented user operation, the electronic device 100 may retreat segmentally from the end point of the line 218 at a constant speed v1 . When the first user operation of segmenting ends, the electronic device 100 may stop segmenting and rewinding the lines.
  • the embodiment of the present application does not limit the specific values of the above-mentioned speed v 1 , speed v 2 , and speed v 3 , and the manner of dividing time intervals with different retraction speeds.
  • Stage 2 The electronic device 100 responds to the second segmentation user operation and rolls back the line segment by segment.
  • the electronic device 100 detects again a user operation acting on the segmented rollback control 215 with a duration of 2s (hereinafter referred to as the second segmented operation). user action). In response to the second segmented user operation, the electronic device 100 retracts the line 218B from position C shown in FIG. 4A to position D shown in FIG. 4B .
  • the electronic device 100 may adjust the speed of retracting the line during the time period of the second segmented user operation. It can be understood that, in the scenario where the user wants to delete a part of a line in the input panel, the user usually long-presses the segment rollback control 215 first, so that the line rolls back to the segment close to the desired position. Furthermore, the user usually intermittently short-presses the segment back control 215 to make the electronic device 100 continue to segment and roll back the line in a small range until reaching the segment part where the desired position is located.
  • the electronic device 100 may reduce the speed of retracting the line during the second segmented user operation action time period based on the initial speed of retracting the line during the first segmented user operation action period. In this way, it is possible to avoid too many segments that are rolled back due to the excessive speed of rolling back lines during the time period of the second segmented user operation.
  • the electronic device 100 may retract the line 218B segmented from the position C according to the speed v4 .
  • the initial velocity of the retracement line during the time period of the first segmented user operation is v 1 .
  • Velocity v 4 is not greater than velocity v 1 .
  • v 4 0.6*v 1 .
  • the electronic device 100 may stop segmenting the line back.
  • the embodiment of the present application does not limit the specific value of the velocity v4 .
  • the speed of retreating the lines during the second segmented user operation period may vary. It can be understood that after the first segmentation user operation, the position where the line retreats is not necessarily close to the position expected by the user. Then, the duration of the second segmented user operation may be relatively long. Then, according to the speed of the retracted line during the time period of the first segmented user operation, the electronic device 100 can determine the initial speed of the retracted line within the time period of the second segmented user operation. When the duration of the second segmented user operation exceeds a preset period of time, the electronic device 100 may increase the speed of rewinding the lines. It can be seen that the long press of the segment rollback control 215 by the user may indicate that there are many segments that the user needs to roll back. The electronic device 100 can increase the speed of segmental rollback, thereby improving the efficiency of rollback.
  • the electronic device 100 may retreat segmentally from the position C of the line 218B at an initial speed of v4 .
  • the above-mentioned speed v4 may be determined according to the initial speed of the retracted line within the time period of the first segmented user operation.
  • the electronic device 100 may continue segmenting back the lines at the speed v5 .
  • the speed v 5 is not less than the speed v 4 .
  • the above-mentioned speed v 4 may also be determined according to the speed (such as speed v 3 ) of the retracted line at the end of the first user operation.
  • the electronic device 100 may determine whether the time interval between the first segmented user operation and the second segmented user operation exceeds a preset time length (eg, 5s).
  • the time interval between the first segmented user operation and the second segmented user operation may be: the time difference between the time when the first segmented user operation ends and the time when the second segmented user operation starts.
  • the electronic device 100 may determine the speed of the retraction line within the second segmented user operation action time period according to the method in the above-mentioned embodiment. If it is determined that the preset time length is exceeded, the electronic device 100 may determine whether the first segmented user operation and the second segmented user operation are two consecutive user operations. Two consecutive user operations may indicate that the electronic device 100 has not detected other user operations between the two user operations. If it is determined that there are two consecutive user operations, the electronic device 100 may determine the speed of the retraction line within the time period of the second segmented user operation according to the method in the above embodiment.
  • the electronic device 100 can determine the action time of the second segmented user operation according to the method of determining the retraction line speed within the action time period of the first segmented user operation in the aforementioned embodiment. Method for backing off line speed within a segment.
  • the electronic device 100 may directly determine whether the first segmented user operation and the second segmented user operation are two consecutive user operations. If it is determined that there are two consecutive user operations, the electronic device 100 may determine the speed of the retraction line within the time period of the second segmented user operation according to the method in the above embodiment. If it is determined that it is not two consecutive user operations, the electronic device 100 can determine the action time of the second segmented user operation according to the method of determining the retraction line speed within the action time period of the first segmented user operation in the aforementioned embodiment. Method for backing off line speed within a segment.
  • the two user operations can be considered irrelevant. That is, the state in which the user performs the first segmentation user operation and expects the line to roll back is different from the state in which the user performs the second segmentation user operation and expects the line to roll back. Then, the electronic device 100 can determine the two user operations as two independent user operations, instead of determining the action time of the second segmented user operation according to the speed of the retraction line within the action time period of the first segmented user operation The speed at which lines are retracted within the segment.
  • Stage 3 The electronic device 100 responds to the third segmentation user operation and rolls back the lines segment by segment.
  • the electronic device 100 again detects a user action on the segmented back control 215 for a duration of 0.5s. operation (subsequently referred to as the third segmented user operation). In response to the third segmented user operation, the electronic device 100 retracts the line 218B from the position D shown in FIG. 4B to the position E shown in FIG. 4C .
  • the electronic device 100 may adjust the speed of rolling back the lines during the third segmented user operation time period according to the speed of the retracted line during the second segmented user operation time period.
  • the specific method can refer to the method in stage 2 of the above-mentioned embodiment, where the electronic device 100 determines the speed of the retracted line during the second segmented user operation action time period according to the speed of the retracted line during the first segmented user operation action period. . I won't go into details here.
  • the electronic device 100 may retract the line 218B segmented from the position D according to the speed v6 .
  • the initial velocity of the retracement line during the time period of the second segmented user operation is v 4 .
  • Velocity v 6 is not greater than velocity v 4 .
  • v 6 0.6*v 4 .
  • the electronic device 100 may stop segmenting the line back.
  • the embodiment of the present application does not limit the specific value of the velocity v 6 .
  • the electronic device 100 may determine the speed of the line retracted during the current segmented user operation time period according to the speed of the retracted line during the previous segmented user operation time period.
  • the above-mentioned previous segmented user operation and the current segmented user operation may be two consecutive user operations, or may be two user operations within a preset time length.
  • the electronic device 100 may rewind the line according to the speed of rewinding the lines within the time period of the user operation of the segment rewind control 215 for several times within the time period T1 before the moment when the current segment user operation starts, To determine the speed of rolling back the line during the current segmented user operation action time period.
  • the value of T 1 can be set according to experience. The embodiment of the present application does not limit the specific value of T 1 above.
  • the above-mentioned first segmented user operation and the second segmented user operation are both user operations within the time period T1 before the start of the third user operation, and the electronic device 100 may
  • the speed of the retracted line (such as speed v 1 ) within the action period of the user operation, and the speed of the retracted line (such as speed v 4 ) within the action period of the second segmented user operation are used to determine the third segmented user operation Velocity during the action time period.
  • the time length and frequency of the user's action on the segmented back control can reflect the distance between the current backed position of the line and the user's expected position.
  • the electronic device 100 can adjust the speed of the segmented rollback line by detecting the duration of each user operation acting on the segmented rollback control and the frequency of user operations acting on the segmented rollback control. Wherein, the longer the duration of a user operation acting on the segmented rewind control, the electronic device 100 may gradually increase the speed of rewinding the lines within the time period of this user operation.
  • the frequency of user operations acting on the segmented rollback control is high (that is, the number of user operations acting on the segmented rollback control within the preset time length is high), which can indicate that the segmented rollback has been applied to the segmented rollback control multiple times within the preset time length
  • the duration of the user action on the control is short, and the time interval between two user actions acting on the segmented fallback control is also short.
  • the electronic device 100 may gradually reduce the speed of the retracted lines within the time period of the multiple user operations. The above embodiments can provide the accuracy of rolling back the lines, and the user can more conveniently roll back the lines in the input panel to their desired state.
  • the electronic device 100 may recover the rolled back lines segment by segment according to the order of the rollback time from late to early. It is understandable that when the user is away from the location where the user expects to restore, the user usually long presses the segment restore control. When approaching the position that the user expects to restore, the user usually short-presses the segment restoration control intermittently until the electronic device restores the line to the position that the user expects to restore. Then, the electronic device 100 can adjust the speed of the segment recovery line by detecting the duration of each user operation on the segment recovery control and the frequency of the user operation on the segment recovery control. For a specific implementation method, reference may be made to the implementation method of the electronic device 100 adjusting the speed of the segmented retraction line shown in FIGS. 4A to 4C , which will not be repeated here.
  • segmented storage lines segmented rollback lines and segmented recovery lines provided by the embodiment of the present application are introduced below.
  • Layers can be used to draw images.
  • the size of a layer can be the same as the size of the input panel in the previous embodiment. Except for the part of the image drawn on this layer, the rest of a layer is transparent. Different images can be drawn on different layers. Multiple layers can be stacked in a certain order. Wherein, the image superimposed on the upper layer may block the image superimposed on the lower layer. The image presented after stacking multiple layers in a certain order is the content displayed in the input panel.
  • a line is drawn on each layer.
  • a line may be determined by the trajectory of a single sliding operation detected by the electronic device 100 on the input panel.
  • the electronic device 100 can create a new layer, and draw a line determined by the trajectory of a single sliding operation detected after the new layer is created on the newly created layer .
  • the electronic device 100 may stack all the layers in order of drawing time from early to late. Among them, the layer with the earliest drawing time is superimposed on the lower layer. Layers drawn later are superimposed on top. From the embodiment shown in FIG. 1A and FIG.
  • the electronic device 100 rolls back the lines in the input panel in units of bars, and the specific method may be to roll back the layers in the order from the upper layer to the lower layer. . Lines in the layer being rolled back are removed in the input panel.
  • a segmented portion of a line may be drawn on each layer.
  • the electronic device 100 may segment the line every preset segment time period (for example, 2 milliseconds).
  • the electronic device 100 can create a new layer, and after the new layer is created, the preset segment time period starting from the initial moment when the sliding operation is detected
  • the segmented parts determined by the trajectory of the detected swipe operations are drawn on this newly created layer.
  • the electronic device 100 may stack all the layers in order of drawing time from early to late. Among them, the layer with the earliest drawing time is superimposed on the lower layer. Layers drawn later are superimposed on the lower layer. It can be seen that the electronic device 100 rolls back the layer of a segmented part drawn with a line, which can realize the segmented rollback of the line.
  • line 218B is displayed in the input panel.
  • the line 218B is determined by the trajectory of a single sliding operation detected by the electronic device 100 on the input panel.
  • the electronic device 100 may segment the line 218B according to the drawing time, and draw different segmented parts on different layers.
  • the electronic device 100 divides the line 218B into 6 segments, including: a segmented part A, a segmented part B, a segmented part C, a segmented part D, a segmented part E, and a segmented part F.
  • Segment A is the segment where the starting point of line 218B is located.
  • Segment portion F is the segment portion where the end point of line 218B is located.
  • a blank layer has been established in the electronic device 100 before the track of the sliding operation of the determined line 218B is detected.
  • the electronic device 100 will detect the segmented part (that is, the segmented part A) , draw in one of the above created blank layers, and create a new layer.
  • the segmented portion determined by the trajectory of the detected sliding operation within the preset segmented time period starting from the initial moment of the detected sliding operation (that is, the segmented portion B ), drawn on this new layer.
  • the electronic device 100 may determine that the sliding operation of segment part A and the sliding operation of segment part B are operations performed within different time periods in a single sliding operation. That is, segmented part A and segmented part B are two segmented parts in one line.
  • the method for drawing the segmented part C, the segmented part D, the segmented part E and the segmented part F by the electronic device 100 may refer to the aforementioned method for drawing the segmented part A and the segmented part B, which will not be repeated here. It can be seen that the six segmented parts can be drawn on different layers respectively.
  • the layer for drawing each segment part may also be established by the electronic device 100 at the initial moment when the corresponding sliding operation is detected.
  • the embodiment of the present application does not limit the creation time of the layer.
  • segmented part A, segmented part B, segmented part C, segmented part D, segmented part E, and segmented part F are drawn on layer A, layer B, and layer C respectively , Layer D, Layer E, and Layer F.
  • Each layer is timestamped.
  • a layer's timestamp can be determined from the drawing time of the segmented parts on this layer.
  • the electronic device 100 may determine the order of drawing times of the segmented parts on a layer according to the time stamp of a layer.
  • time stamps of layer A, layer B, layer C, layer D, layer E, and layer F are respectively time stamp t 1 , time stamp t 2 , time stamp t 3 , time stamp t 4 , Time stamp t 5 , time stamp t 6 .
  • the electronic device 100 may store a layer in which each segment of a line segment is drawn in a stack.
  • a stack is a linear table that can only be inserted and deleted at one end, and stores data according to the principle of first in, last out. Among them, the data that enters the stack first is pushed to the bottom of the stack, and the data that enters the stack last is at the top of the stack.
  • the electronic device 100 may store the layers of the line 218B into the stack A in order of drawing time from early to late. Specifically, every time a layer on which a segmented portion of the line 218B is drawn is obtained, the electronic device 100 may store this layer into the stack A. It can be seen that segment A on layer A is the earliest segment drawn in line 218B. Electronic device 100 first stores layer A into stack A. Layer A is at the bottom of stack A. Segment F on layer F is the latest segment drawn in line 218B. Electronic device 100 finally stores layer F into stack A. Layer F is at the top of stack A. The pointer can point to the location of layer F in stack A. The layer pointed by the above pointer can be the uppermost layer among the layers displayed in the input panel for all drawing contents.
  • the electronic device 100 may move the position pointed by the pointer from the top of the stack A to the bottom of the stack. For example, in response to a user operation acting on the segment rollback control 215, the electronic device 100 moves the pointed position of the pointer to the position where the layer C is located. Then, the segmented parts drawn on layers D, E, and F are removed in the input panel. Line 218B is retracted to where segmented portion C and segmented portion D intersect.
  • the step size of the pointer movement is one layer.
  • the speed at which the electronic device 100 moves the pointer is the speed at which the lines are retracted in the foregoing embodiments.
  • the implementation method for the electronic device 100 to adjust the moving speed of the pointer may refer to the foregoing embodiments shown in FIG. 4A to FIG. 4C , which will not be repeated here.
  • the electronic device 100 may store different lines in different stacks. For example, before receiving the sliding operation to determine the line 218B, the electronic device 100 also receives the sliding operation to determine the aforementioned line 218A shown in FIG. 4A .
  • the electronic device 100 may segment the line 218A according to the drawing time, and store the segments of the line 218A into the stack B in order of drawing time from early to late.
  • Stack B and stack A are two different stacks. Obviously, the drawing time of segmented parts on all layers in stack B is earlier than the drawing time of segmented parts on all layers in stack A.
  • the electronic device 100 can stack all the layers in stack B and stack A in order of drawing time from early to late. Among them, the layer with the earliest drawing time is superimposed on the lower layer. Layers drawn later are superimposed on top.
  • the image presented after the multiple layers are stacked can refer to the lines 218A and 218B displayed in the input panel 218 shown in FIG. 3A.
  • the electronic device 100 moves the position of the pointer to the position of layer C.
  • the electronic device 100 may stack all the layers in the stack B and the layers A, B, and C in the stack A in order of drawing time from early to late.
  • the image presented after the multiple layers are stacked can refer to the content displayed in the input panel shown in FIG. 4B above.
  • the position A shown in FIG. 3B may be the position where the intersection of the segmented part C and the segmented part D is located.
  • the electronic device 100 rolls back the layer to the bottom of stack A. That is, the pointer points to layer A of stack A. If a user operation acting on the segmented back control 215 is detected, the electronic device 100 may move the pointer from the layer A to the layer at the top of the stack B, and move from the top of the stack B to the bottom of the stack . That is to say, when all the segments of the line 218B are rolled back, the electronic device 100 can perform a segment rollback from the segment where the end point of the line 218A is located to the segment where the start point of the line 218A is located.
  • the line 218A is a line whose drawing time is before the line 218B and is closest to the drawing time of the line 218B.
  • the electronic device 100 may perform segment rollback on multiple lines according to the order of drawing time from late to early without being limited to segment rollback for a line drawn last time. This can better help the user roll back the line to the state the user expects.
  • the electronic device 100 in response to a user operation acting on the segment rollback control 215, moves the position of the pointer to the position of layer C shown in FIG. 5 . Further, the electronic device 100 enters the line input function, and detects a sliding operation on the input panel. The electronic device 100 may display a line (referred to as line C) on the input panel according to the trajectory of this sliding operation. Wherein, the electronic device 100 may divide the line C into segments according to the method of the foregoing embodiments, and store each segment of the line C into the stack C in order of drawing time from early to late. The above pointer may point to the layer located at the top of the stack C. In addition, the electronic device 100 may delete the layer D, the layer E and the layer F in the stack A.
  • the electronic device 100 may move the pointer in a direction from the top of the stack C to the bottom of the stack C .
  • the pointer can move from the bottom of stack C to layer C of stack A, and move the pointer in the direction from layer C to the bottom of stack A (that is, layer A).
  • the electronic device 100 rolls back a line segment by segment, and receives the user's sliding operation. After the input panel displays new drawing content, the stack structure storing the segmented back line is destroyed. Wherein, the electronic device 100 deletes the layer drawn with the segment part that has been segmented back from the stack.
  • the electronic device 100 may recover the rolled back lines segment by segment according to the order of the rollback time from late to early.
  • the electronic device 100 can restore the line segment by segment by moving the pointer.
  • the moving direction of the pointer when recovering the line by segment is opposite to the moving direction of the pointer when the line is rolled back by segment in the foregoing embodiment.
  • the pointer moves to the position of layer C in stack A shown in FIG. 5 .
  • the electronic device 100 may move the pointer from the position of the layer C in a direction from the bottom of the stack to the top of the stack.
  • the electronic device 100 stops moving the pointer.
  • the electronic device 100 may display the segmented parts drawn in the layer D and the layer E in the input panel. Wherein, during the restoration process of the segmented part in the line 218B, the segmented part drawn in the first restored layer (ie layer D) is firstly displayed in the input panel.
  • the electronic device 100 may refer to the aforementioned embodiments shown in FIG. 4A to FIG. 4C for the implementation method of adjusting the moving speed of the pointer, which will not be repeated here.
  • the electronic device 100 can draw the line segments on different layers. A layer is rolled back, and the segmented parts drawn on this layer are removed in the input panel. In this way, the electronic device 100 can realize the segmented retreat of the lines.
  • the electronic device 100 may store different layers in the stack in order of drawing time from early to late.
  • the electronic device 100 can adjust the moving speed of the pointer by detecting the duration of each user operation acting on the segmented rollback control and the frequency of the user operation acting on the segmented rollback control, thereby realizing the adjustment of the segmented rollback The speed of the line.
  • the above method can improve the precision of rolling back lines, and the user can roll back the lines in the input panel to their desired state more conveniently.
  • the electronic device 100 may store segmented portions of k lines determined by trajectories of the last k sliding operations received. For the segmented parts of the lines determined by the trajectories of the sliding operations before the above k times of sliding operations, the electronic device 100 may combine the layers of the segmented parts drawn with one of the lines into one layer, and store it. This can save storage space of the electronic device 100 .
  • the electronic device 100 may roll back the line determined by the track of the sliding operation before the above k times of sliding operations in units of bars.
  • the value of the above k can be set according to empirical values.
  • the embodiment of the present application does not limit the value of k.
  • the user operation of the rollback control 213 or restore control 214 in the previous embodiments will not destroy the structure of the stack of lines shown in FIG. 5 . That is, in response to a user operation acting on the rollback control 213, the electronic device 100 rolls back one line. Further, in response to a user operation acting on the segment recovery control 216, the electronic device 100 may perform segment recovery on the aforementioned rolled back line. In response to a user operation on the restore control 214, the electronic device 100 may restore a line. Further, in response to a user operation acting on the segment rollback control 215, the electronic device 100 may perform segment rollback on the restored line.
  • the situation where the stack structure of a line is destroyed may include: some layers in the stack are lost, multiple layers in the stack are merged into one layer, and the electronic device 100 cannot index to a certain layer on which the line is drawn according to the pointer. Layers for segmented parts.
  • the electronic device 100 stores the segmented portion of the line 218A and the line 218B shown in FIG. 3A as an example for illustration.
  • Line 218A was drawn earlier than line 218B.
  • the segmented portion of line 218B is stored in stack A.
  • Stored in stack B is the segmented portion of line 218A.
  • the input panel of the electronic device 100 displays the lines 218A and 218B shown in FIG. 3A .
  • the pointer points to the layer at the top of stack A.
  • the electronic device 100 can move the pointer to the layer at the top of the stack B. That is, electronic device 100 rolls back line 218B. Line 218B is removed in the input panel. Further, in response to a user operation acting on the segment rollback control 215, the electronic device 100 can move the pointer according to the method of segment rollback lines in the foregoing embodiments. Wherein, the pointer moves in a direction from the top of the stack B to the bottom of the stack B. That is, the electronic device 100 rolls back a part of the line 218A in segments according to the user operation on the segment rollback control 215 this time. The backed-off segmented portion of line 218A is removed in the input panel.
  • the electronic device 100 may adjust the position of the pointer to the position of the layer at the top of the stack B.
  • the step size of the pointer movement may be a number of layers included between the layer pointed to after the aforementioned segmental rollback and the layer at the top of the stack B. That is, the electronic device 100 can restore all the segmented back parts in the line 218A according to the user operation acting on the restoration control 214 . The restored part is displayed again in the input panel. Further, in response to a user operation acting on the section restoration control 216, the electronic device 100 can move the pointer according to the method of section restoration line in the foregoing embodiments.
  • the pointer moves from the top of stack B to the bottom of stack A, and moves in a direction from the bottom of stack A to the top of stack A. That is, the electronic device 100 can recover a part of the line 218B segmentally according to the user operation acting on the segment recovery control 215 this time. The restored segmented portion in line 218B is again displayed in the input panel.
  • the electronic device 100 can still divide the lines in the input panel according to the received user operation acting on the segmentation rollback control 215. Rewind the segment, or perform segment recovery on the line that has been rolled back according to the received user operation on the segment recovery control 216 . That is, the user operation of the rollback control 213 or restore control 214 in the foregoing embodiments will not destroy the structure of the stack of lines shown in FIG. 5 .
  • the line displayed in the input panel will include the abnormal segmentation part.
  • the above-mentioned abnormal segmentation part is the line determined by deviating from the trajectory expected by the user in the trajectory of the above-mentioned sliding operation.
  • the above-mentioned exception segmentation part is the part that the user wants to delete.
  • the above-mentioned abnormal segment is generally caused by a sudden external force during the drawing of a line.
  • the user usually slows down the sliding speed of the sliding operation when drawing a line to close the pen. That is, the segmented portion at the end of the line is usually drawn more slowly.
  • the normal drawing process of the above line may indicate that the user is not affected by external force during the process from the start of drawing to the end of drawing, and it is determined that the trajectory of the sliding operation of this line is the same as the trajectory expected by the user.
  • the embodiment of the present application provides a method for rolling back lines.
  • the electronic device 100 may store a line in segments according to the drawing time of the line. This one line can consist of multiple segmented parts.
  • One of the segmented parts may be a line corresponding to the sliding trajectory within a preset segmented time period (for example, within 2 milliseconds).
  • the electronic device 100 may detect the drawing speed of each segment part. According to the drawing speed, the electronic device 100 may determine a boundary point of a normal segment part and an abnormal segment part. In response to a user operation acting on the segment rollback control 215, the electronic device 100 can roll back the line from the end point to the dividing point.
  • the electronic device 100 can estimate at which moment the user is affected by an external force according to the drawing speed of each segment in a line, causing a part of the line to deviate from the user's expected trajectory.
  • the electronic device 100 may remove the abnormal segment part in the input panel in response to the user operation for segment rollback.
  • the electronic device 100 does not remove the entire line from the input panel.
  • the user can continue to draw from the dividing point.
  • the above method is easy for the user to operate, and can quickly return the lines in the input panel to the desired state of the user, thereby improving the user experience.
  • the electronic device 100 may determine whether a segmented part is a normal segmented part or an abnormal segmented part according to the drawing speed of each segmented part. Wherein, the drawing speed of the abnormal segment part is much higher than that of the normal segment part.
  • the drawing speed of a segment part can be determined by the length of the segment part and the drawing time of the segment part (such as the preset segment time period mentioned above). For example, the speed of a segment portion is the length of the segment portion divided by the time length of the preset segment time period.
  • the electronic device 100 may compare the drawing speed of each segment of a line with a speed threshold.
  • the segment part whose drawing speed is greater than the speed threshold is an abnormal segment part.
  • the segmented part whose drawing speed is not greater than the speed threshold is a normal segmented part.
  • the aforementioned speed threshold can be set according to empirical values (eg, 9000 pixels/second). The embodiment of the present application does not limit the value of the above speed threshold.
  • the electronic device 100 may use a clustering algorithm to cluster the segmented parts of a line according to the drawing speed of the segmented parts. Further, the electronic device 100 may compare the drawing speed of the cluster centers of each category with a speed threshold. Wherein, if the drawing speed of a cluster center is greater than the speed threshold, the segmented parts included in the category to which the clustered center belongs are all abnormal segmented parts. Conversely, the segmented parts included in the category to which this cluster center belongs are aggregated into normal segmented parts.
  • the aforementioned clustering algorithm may be, for example, a k-means algorithm.
  • the embodiment of the present application does not limit the foregoing clustering algorithm.
  • the normal segment part is a line corresponding to the trajectory expected by the user.
  • the abnormal segment part is the line corresponding to the trajectory that the user is affected by external forces and deviates from the expected trajectory during the drawing process.
  • the abnormal segmentation part of a line is usually located in the second half of the line.
  • the electronic device 100 may determine the intersection of the first abnormal segment part and the normal segment part in the direction from the end point to the start point in a line as the above-mentioned boundary point.
  • the following describes a method for the electronic device 100 to roll back an abnormal segment of a line in combination with specific scenarios.
  • FIG. 6A and FIG. 6B exemplarily show another schematic diagram of a line retreat scene provided by an embodiment of the present application.
  • the electronic device 100 displays a line 218C, a line 218D, and a line 218E on the input panel 218 according to the detected sliding operation.
  • the scene shown in FIG. 6A is: the user inputs "F" by hand on the input panel 218 of the electronic device 100 .
  • the user enters line 218C, line 218D, and line 218E sequentially in input panel 218 .
  • the user is affected by an external force (for example, the elbow is bumped suddenly), and a part of the line 218E deviates from the trajectory expected by the user.
  • the electronic device 100 may store the line 218E in segments according to the method in the foregoing embodiments, and determine the drawing speed of each segment. Further, according to the drawing speed, the electronic device 100 may determine the boundary point between the normal segment part and the abnormal segment part of the line 218E (the boundary point shown in FIG. 6A ).
  • the demarcation point is the pixel point corresponding to the initial moment when the electronic device 100 estimates that the user is affected by the external force.
  • the electronic device 100 in response to a user operation acting on the segment rollback control 215 , can roll back the line 218E to the dividing point.
  • the electronic device 100 may remove the segmented portion of the line 218E from the end point to the boundary point (ie, the retracted portion of the line shown in FIG. 6B ) from the input panel 218 .
  • the electronic device 100 may segment the line 218E according to the aforementioned embodiment shown in FIG. 5 .
  • Line 218E may include n segmented portions: segmented portions A 1 , . . . , A i , A i+1 , . . . , An .
  • the value of n is determined by the drawing time of the line 218E and the aforementioned preset segmentation time period. i is a positive integer smaller than n.
  • Segment A 1 is the segment where the starting point of line 218E is located.
  • the segmented portion An is the segmented portion where the end point of the line 218E is located.
  • the electronic device 100 may draw the n segmented parts of the line 218E on n layers respectively. Therein, layer A 1 is drawn with segmented part A 1 . Layer A i is drawn with segmented part A i . Layer A i+1 is drawn with segmented part A i+1 . Layer A n is drawn with segmented part A n .
  • Each layer can have a timestamp.
  • the value of the timestamp of a layer can be determined by the drawing time of the segment drawn on this layer.
  • the electronic device 100 may determine, according to the time stamps, the order in which the segment parts drawn on each layer are drawn sooner or later.
  • the electronic device 100 may store the layers in a stack in order of drawing time from early to late (stack D shown in FIG. 7 ). Among them, the storage position of the layer whose drawing time is earlier is closer to the stack bottom of the stack D. The storage position of the layer whose drawing time is later is closer to the top of stack D.
  • the electronic device 100 may detect the drawing speed of the n segmented parts of the line 218E, and determine which of the n segmented parts are abnormal segmented parts and which are normal segmented parts according to the method of the foregoing embodiment. Exemplarily, the electronic device 100 determines that the intersection point between the segmented part A i and the segmented part A i+1 is the boundary point. That is, the segmented part A i+1 to the segmented part A n are all abnormal segmented parts.
  • the segmented part A i is a normal segmented part.
  • the pointer Before segment rollback is performed, the pointer may point to the layer at the top of the stack D (that is, the layer A n ).
  • the electronic device 100 can move the pointer in the direction from the top of the stack D to the bottom of the stack D, and move to the one drawn with a normal The location of the segmented part of the layer (that is, the layer A i ).
  • the electronic device 100 can directly move the pointer from the position of the layer A n to the position of the layer A i .
  • the segmented parts drawn in the rolled-back layers are removed in the input panel 218 . That is, in response to a user operation acting on the segment rollback control 215, the electronic device 100 can roll back the line 218E to the above-mentioned boundary point, and remove the abnormal segment from the boundary point to the end point from the input panel.
  • the electronic device 100 may first determine the intersection point y1 between the first abnormal segment part and the normal segment part in the direction from the end point to the start point in a line. Further, the electronic device 100 may determine whether the x segment parts closest to the intersection point y1 are all normal segment parts. If the x segment parts closest to the intersection point y1 are all normal segment parts, the electronic device 100 may determine the intersection point as the above-mentioned boundary point.
  • the electronic device 100 can determine the intersection point between the second abnormal segment part and the normal segment part in the direction from the intersection point y1 to the starting point in this line y2, and determine the intersection point y2 as the above-mentioned dividing point.
  • the above-mentioned value of x may be set according to empirical values (for example, 3). The embodiment of the present application does not limit the value of x.
  • the above method can reduce the inaccurate determination of the demarcation point due to misjudgment of the abnormal situation of the segmentation part.
  • the first five segment parts of the segment part A i are all abnormal segment parts.
  • the electronic device 100 may have an error in judging the segmented portion A i as a normal segmented portion.
  • the electronic device 100 can search the intersection point of the new abnormal segment part and the normal part from the intersection point of the segment part Ai and the segment part Ai +1 to the starting point, and determine the new intersection point as the demarcation point . This can improve the accuracy of determining where the user expects the line to fall back.
  • the electronic device 100 may also judge whether several segmented parts closest to the intersection point y2 are normal segmented parts according to the above method, so as to determine whether it is appropriate to determine y2 as the dividing point.
  • the electronic device 100 in response to a user operation acting on the segmentation rollback control 215, can determine whether a line (such as the line with the latest drawing time) has an abnormal score according to the method shown in FIG. 7 . segment part. If there is an abnormal segmented portion, the electronic device 100 may roll back the line to the demarcation point according to the method of the aforementioned embodiment. Further, if the duration of the user operation acting on the segmented back control 215 exceeds the preset time, the electronic device 100 may, within the time period exceeding the preset time, change the input panel according to the method shown in FIG. 5 . The lines in are backed off piecewise from the breakpoint above.
  • the aforementioned preset time may be set according to experience values (eg, 1s). The embodiment of the present application does not limit the value of the foregoing preset time.
  • the electronic device 100 in response to a user operation on the segment rollback control 215, can roll back a line with an abnormal segment part according to the method shown in FIG. Retreat to the above-mentioned dividing point. Further, the electronic device 100 again detects the user operation acting on the segment rollback control 215, and the electronic device 100 may perform segment rollback of the lines in the input panel from the above-mentioned dividing point according to the method shown in FIG. 5 .
  • the electronic device 100 rolls back a line with an abnormal segment part to the above-mentioned dividing point according to the method shown in FIG. 7 , and the electronic device 100 can also include Segment recovery of multiple segment parts.
  • the aforementioned line 218E as an example for illustration.
  • the pointer points to the layer A i in the stack D.
  • the electronic device 100 may move the pointer from the bottom of the stack D to the top of the stack, and the moving step is one layer.
  • the speed at which the electronic device 100 moves the pointer may refer to the speed at which the electronic device 100 restores the line segmentally in the foregoing embodiments. I won't go into details here.
  • the segments from the boundary point to the end point of the line 218E can be restored one by one and displayed on the input panel 218 again.
  • FIG. 8 is a flow chart of an input panel-based line fallback method provided by an embodiment of the present application.
  • the method may include steps S101-S107. in:
  • the electronic device 100 may detect a sliding operation on the input panel, and display a line Z on the input panel according to the trajectory of the sliding operation.
  • the electronic device 100 may store the line Z in segments according to the drawing time, and a segment of the line Z is a line corresponding to a trajectory of a sliding operation within a time segment t.
  • the method for the electronic device 100 to store the line Z in segments may refer to the method for storing the line 218B in segments shown in FIG. 5 . I won't go into details here.
  • the value of the time segment t segment can be set according to empirical values. This embodiment of the present application does not limit it.
  • the electronic device 100 may determine whether the segment where the end point of the line Z is located is an abnormal segment.
  • Line Z may include multiple segmented parts.
  • the electronic device 100 may detect the drawing speed of each segmented portion of the line Z.
  • the drawing speed of a segment part may be determined by the length of the segment part and the length of the time segment t segment in the above step S102.
  • the electronic device 100 may judge whether a segment part is an abnormal segment part according to the drawing speed of a segment part. For a specific determination method, reference may be made to the foregoing embodiments, which will not be repeated here.
  • the electronic device 100 may determine whether an abnormal segment occurs in a line by first determining whether the segment where the end point of a line is located is an abnormal segment.
  • the electronic device 100 may determine that there is no abnormal segment part in the line Z, and execute the following step S104.
  • the electronic device 100 may determine that there is an abnormal section in the line Z, and execute the following step S105 .
  • the electronic device 100 may determine whether the drawing speed of several segmented parts closest to the end point of the line Z exceeds a speed threshold. If the drawing speed of all or most (eg more than 80%) of the several segmented parts closest to the end point of the line Z exceeds the speed threshold, the electronic device 100 may determine that there is an abnormal segmented part in the line Z. Otherwise, the electronic device 100 may determine that there is no abnormal segmented portion in the line Z. This can reduce errors in the electronic device 100 judging whether there is an abnormal segment due to incorrect calculation of the drawing speed of the segment where the end point is located, and improve detection accuracy.
  • the electronic device 100 can remove the segmented parts of the line Z one by one in the direction from the end point to the starting point in the input panel, and the removal speed is determined by the frequency of the detected user operation for performing segment rollback , the higher the frequency of user actions for segment rollback, the slower the removal rate.
  • the aforementioned user operation for segment rollback may be a user operation acting on the segment rollback control 215 shown in FIG. 4A .
  • the speed at which the electronic device 100 retracts the line Z in segments may be constant.
  • the magnitude of the speed may be determined by the frequency of user operations detected by the electronic device 100 for segment backing.
  • the electronic device 100 may continue segmentally retracting the line whose drawing time is before the line Z and is closest to the drawing time of the line Z.
  • the speed at which the electronic device 100 retracts the line Z by segment may vary.
  • the electronic device 100 may adjust the speed of the retracted line in stages within the duration tc. For example, 0-tc1 seconds for vc1. tc1-tc2 seconds are vc2. .... tci-tc seconds for vc.
  • the electronic device 100 may increase the speed of rolling back lines. That is, the sizes of vc1, vc2, ..., vc gradually increase.
  • the electronic device 100 may perform segment return on the lines in the input panel.
  • the initial speed at which the electronic device 100 rolls back the line segment may be determined by the frequency of the detected user operation for performing segment rollback.
  • the embodiment of the present application does not limit the specific interval of the stage division of the above-mentioned duration tc.
  • the electronic device 100 may gradually increase the speed of the segmented rewinding line within the duration of one user operation of the user performing segmented rewinding, so as to improve the efficiency of rewinding.
  • the electronic device 100 may determine a boundary point between a normal segment part and an abnormal segment part of the line Z.
  • the electronic device 100 may determine whether the segmented parts of the line Z are abnormal segmented parts one by one in a direction from the end point of the line Z to the starting point. Specifically, the electronic device 100 has determined that the segment where the end point of the line Z is located is an abnormal segment. Further, the electronic device 100 may determine whether the segment part before the segment part where the end point is located is an abnormal segment part, until the first abnormal segment part in the direction from the end point to the start point in the line Z is determined to be the same as Intersection of normal segmented parts. The electronic device 100 may determine the intersection point as the boundary point between the normal segment part and the abnormal segment part of the line Z.
  • the electronic device 100 may remove the segment part contained in the line Z from the end point to the dividing point in the input panel.
  • step S107 If in step S106, the duration of the user operation of a segmented rollback by the user exceeds the preset time, within the time period exceeding the preset time, the electronic device 100 can display the segmented part of the line Z in the input panel according to The direction from the dividing point to the starting point is removed one by one.
  • the removal speed is determined by the detected frequency of user operations for segment rollback. The higher the frequency of user operations for segment rollback, the more The lower the removal rate.
  • the speed at which the electronic device 100 retracts the line Z may be constant during a time period exceeding the aforementioned preset time.
  • the magnitude of the speed may be determined by the frequency of user operations detected by the electronic device 100 for segment backing.
  • the speed at which the electronic device 100 retracts the line Z may vary within a time period exceeding the aforementioned preset time.
  • the electronic device 100 may adjust the speed of the retraction line in stages within a time period exceeding the aforementioned preset time.
  • step S107 It can be known from step S107 that if a line is abnormally segmented and the user presses the segment back control 215, the electronic device 100 can roll back the line from the end point to the above-mentioned dividing point. If the user still wants to continue to roll back this line, the user can continue to press the segmented rollback control 215 . The electronic device 100 may continue to retreat the line by segment from the above-mentioned dividing point. That is, the user may press the segment rollback control 215 again without stopping the user operation acting on the segment rollback control 215 this time.
  • the electronic device 100 can not only roll back the lines in the input panel by segments, but also adjust the rollback speed during the rollback by segments, so that the user can roll back the lines more conveniently. the desired state.
  • the electronic device 100 can also judge whether there is an abnormal part in the line according to the drawing speed of the line, and estimate the boundary point between the abnormal part and the normal part of a line, so as to quickly roll back to the boundary point between the abnormal part and the normal part during rollback . In this way, the electronic device 100 simplifies the user operation when the user returns the line and improves the user experience by estimating the position where the user expects to return, and directly returning the line to the estimated position when returning.
  • step S103 and steps S105 to S107 shown in FIG. 8 are optional. That is, the electronic device 100 may store the line Z in segments, and perform segment rollback on the line Z according to the method in step S104 when a user operation for performing segment rollback is detected.
  • the embodiment composed of the above step S101 , step S102 and step S104 is the embodiment shown in FIGS. 3A to 3C , 4A to 4C , and 5 .
  • step S104 and step S107 shown in FIG. 8 are optional. That is, when the electronic device 100 determines that the segment where the end point of the line Z is located is an abnormal segment, the line Z may be rolled back according to the methods in steps S105 and S106. Wherein, when it is judged that the segment part where the end point of the line Z is located is not an abnormal segment part, the state of the segment rollback control 215 shown in FIG. ).
  • the embodiment composed of the above-mentioned steps S101 to S106 is the embodiment shown in FIG. 6A , FIG. 6B , and FIG. 7 .
  • the electronic device 100 in response to a user operation on the segment rollback control 215, can roll back a segment portion. In response to a user operation acting on the segment recovery control 215, the electronic device 100 can recover a segment portion that was rolled back.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

La présente invention concerne un procédé de retour arrière de ligne pour un panneau d'entrée, ainsi qu'un appareil associé. Selon l'invention, un dispositif électronique peut stocker une ligne tracée sur un panneau d'entrée de façon segmentée selon des temps de dessin. Lors de la détection d'une opération utilisateur pour un retour arrière segmenté, le dispositif électronique peut effectuer un retour arrière segmenté sur la ligne dans une direction allant d'un point d'arrivée à un point de départ de la ligne. Le dispositif électronique peut réguler la vitesse de retour arrière de ligne segmenté en fonction de la durée de chaque opération utilisateur pour effectuer le retour arrière segmenté et de la fréquence de l'opération utilisateur pour effectuer le retour arrière segmenté. Le procédé selon l'invention peut améliorer la précision de retour arrière de ligne, de sorte que l'utilisateur puisse effectuer plus commodément un retour arrière de ligne vers un état souhaité.
PCT/CN2022/094377 2021-05-29 2022-05-23 Procédé de retour arrière de ligne pour panneau d'entrée et appareil associé WO2022253016A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110595997.X 2021-05-29
CN202110595997.XA CN115480654A (zh) 2021-05-29 2021-05-29 输入面板的线条回退方法及相关装置

Publications (1)

Publication Number Publication Date
WO2022253016A1 true WO2022253016A1 (fr) 2022-12-08

Family

ID=84323874

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094377 WO2022253016A1 (fr) 2021-05-29 2022-05-23 Procédé de retour arrière de ligne pour panneau d'entrée et appareil associé

Country Status (2)

Country Link
CN (1) CN115480654A (fr)
WO (1) WO2022253016A1 (fr)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140101643A1 (en) * 2012-10-04 2014-04-10 International Business Machines Corporation Trace generation method, trace generation device, trace generation program product, and multi-level compilation using trace generation method
CN106445087A (zh) * 2015-07-21 2017-02-22 阿里巴巴集团控股有限公司 一种撤销输入操作的方法及装置
CN109215098A (zh) * 2018-08-20 2019-01-15 广州视源电子科技股份有限公司 笔迹擦除方法和装置
CN110415315A (zh) * 2019-06-27 2019-11-05 五八有限公司 触摸绘制地图区域的方法、装置、终端和存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2878194B2 (ja) * 1996-07-29 1999-04-05 日本電気ソフトウェア株式会社 画像データの部分消去および部分検出方法
JP2014203322A (ja) * 2013-04-08 2014-10-27 船井電機株式会社 描画装置、描画方法、及び描画プログラム
CN107329689B (zh) * 2017-06-27 2019-05-17 维沃移动通信有限公司 一种手写输入法的回退方法及移动终端
US11822780B2 (en) * 2019-04-15 2023-11-21 Apple Inc. Devices, methods, and systems for performing content manipulation operations
CN111524210A (zh) * 2020-04-10 2020-08-11 北京百度网讯科技有限公司 用于生成绘图的方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140101643A1 (en) * 2012-10-04 2014-04-10 International Business Machines Corporation Trace generation method, trace generation device, trace generation program product, and multi-level compilation using trace generation method
CN106445087A (zh) * 2015-07-21 2017-02-22 阿里巴巴集团控股有限公司 一种撤销输入操作的方法及装置
CN109215098A (zh) * 2018-08-20 2019-01-15 广州视源电子科技股份有限公司 笔迹擦除方法和装置
CN110415315A (zh) * 2019-06-27 2019-11-05 五八有限公司 触摸绘制地图区域的方法、装置、终端和存储介质

Also Published As

Publication number Publication date
CN115480654A (zh) 2022-12-16

Similar Documents

Publication Publication Date Title
EP4221164A1 (fr) Procédé d'affichage pour dispositif électronique à affichage flexible et dispositif électronique
CN112394811B (zh) 一种隔空手势的交互方法及电子设备
WO2021000881A1 (fr) Procédé de division d'écran et dispositif électronique
KR20210118168A (ko) 제스처 처리 방법 및 디바이스
CN114140365B (zh) 基于事件帧的特征点匹配方法及电子设备
CN116069212B (zh) 一种应用卡片的快速查看方法、电子设备及存储介质
US20200252502A1 (en) Method for responding to incoming call by means of fingerprint recognition, storage medium, and mobile terminal
CN112527093A (zh) 手势输入方法及电子设备
CN113448482A (zh) 触控屏的滑动响应控制方法及装置、电子设备
CN114979465B (zh) 视频处理方法、电子设备及可读介质
CN117130469A (zh) 一种隔空手势识别方法、电子设备及芯片系统
CN112541861A (zh) 图像处理方法、装置、设备及计算机存储介质
WO2024045661A1 (fr) Procédé de traitement des images et dispositif électronique
WO2024032124A1 (fr) Procédé de pliage et de dépliage d'un écran de défilement et produit associé
CN116389884B (zh) 缩略图显示方法及终端设备
WO2022253016A1 (fr) Procédé de retour arrière de ligne pour panneau d'entrée et appareil associé
WO2022062985A1 (fr) Procédé et appareil d'ajout d'effet spécial dans une vidéo et dispositif terminal
EP4057122A1 (fr) Procédé de capture d'écran et dispositif associé
CN116502203B (en) User identity recognition method and electronic equipment
CN114968059B (zh) 一种控件滑动的方法及电子设备
CN116055870B (zh) 一种拍照方法和电子设备
CN116048236B (zh) 通信方法及相关装置
CN116521018B (zh) 误触提示方法、终端设备及存储介质
WO2022166550A1 (fr) Procédé de transmission de données et dispositif électronique
WO2023116411A1 (fr) Procédé de gestion pour carte d'application, dispositif électronique et support de stockage

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22815063

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22815063

Country of ref document: EP

Kind code of ref document: A1