CN112100988A - Information editing method, electronic equipment and storage medium - Google Patents

Information editing method, electronic equipment and storage medium Download PDF

Info

Publication number
CN112100988A
CN112100988A CN202010777830.0A CN202010777830A CN112100988A CN 112100988 A CN112100988 A CN 112100988A CN 202010777830 A CN202010777830 A CN 202010777830A CN 112100988 A CN112100988 A CN 112100988A
Authority
CN
China
Prior art keywords
deleting
mode
target
current
deletion
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010777830.0A
Other languages
Chinese (zh)
Inventor
王小毛
韦建龙
史晓岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202010777830.0A priority Critical patent/CN112100988A/en
Publication of CN112100988A publication Critical patent/CN112100988A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • 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/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • 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

Abstract

The embodiment of the application discloses an information editing method, which comprises the following steps: determining a current deleting mode in which a deleting function is currently positioned; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite; determining a target character in the content to be edited based on the current deletion mode; the target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position; and deleting the target characters in the content to be edited based on the current deletion mode to obtain target content. The embodiment of the application also discloses electronic equipment and a storage medium.

Description

Information editing method, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information editing method, an electronic device, and a storage medium.
Background
With the rapid development of science and technology, electronic equipment is more and more widely applied, and especially the application of portable electronic equipment has great influence on the work, life, study and entertainment of people. In the prior art, the input method of the portable electronic device basically comprises a forward deleting function and does not comprise a backward deleting function. However, in practical application scenarios, there are particularly many scenarios of backward deletion. In the current scene needing backward deletion, the user usually moves a cursor behind a target character needing to be deleted, and the target character is deleted through a forward deletion function.
Therefore, the deleting function of the current portable electronic equipment is very limited, the efficiency of information editing is low, and the intelligent degree of the electronic equipment is reduced.
Content of application
In order to solve the above technical problems, embodiments of the present application are expected to provide an information editing method, an electronic device, and a storage medium, so as to solve the problem in the prior art that the deleting function of a portable electronic device is very limited, enrich the deleting function of the portable electronic device, effectively improve the deleting efficiency of the electronic device, ensure the editing efficiency of the electronic device, and improve the intelligence degree of the electronic device.
The technical scheme of the application is realized as follows:
in a first aspect, a method for editing information, the method comprising:
determining a current deleting mode in which a deleting function is currently positioned; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite;
determining a target character in the content to be edited based on the current deletion mode; the target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position;
and deleting the target characters in the content to be edited based on the current deletion mode to obtain target content.
Optionally, the determining of the current deletion mode in which the deletion function is currently located includes:
receiving a first editing operation;
determining that a current editing function for the content to be edited is the deleting function based on the first editing operation;
detecting a first operation gesture;
determining the current deletion mode based on the first operation gesture.
Optionally, the detecting a first operation gesture includes:
detecting the first operation gesture in a target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, the determining the current deletion mode based on the first operation gesture comprises:
if the sliding direction of the sliding track of the first operation gesture is a first direction, determining that the current deletion mode is a first deletion mode;
if the sliding direction of the sliding track of the first operation gesture is a second direction, determining that the current deleting mode is a second deleting mode; wherein the first direction and the second direction are opposite;
correspondingly, the deleting the target character in the content to be edited based on the current deletion mode to obtain the target content includes:
and responding to the first operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
Optionally, the determining of the current deletion mode in which the deletion function is currently located includes:
receiving a first editing operation;
determining that a current editing function for the content to be edited is the deleting function based on the first editing operation;
determining a target position of a current editing position in the content to be edited;
determining the current deletion mode based on the target location.
Optionally, the determining the current deletion mode based on the target position includes:
if the target position is at the first position of the content to be edited, determining that the current deletion mode is the second deletion mode; wherein the first position is in front of a first character of the content to be edited;
if the target position is at a second position of the content to be edited, determining that the current deletion mode is the first deletion mode; and the second position is behind the last character of the content to be edited.
Optionally, the determining the current deletion mode based on the target position further includes:
if the target position is at a third position of the content to be edited, timing is started from the current editing position to the third position, and the current deleting mode where the deleting function is currently located is determined to be a reference deleting mode according to the timing; the third position is a position except the first position and the second position in the content to be edited, and the reference deletion mode is the first deletion mode or the second deletion mode;
if the second editing operation is not detected within the timed target duration, determining a target deleting mode; wherein the second editing operation is a deletion operation that performs the deletion function, the target deletion mode being different from the reference deletion mode;
switching a current deletion mode of the deletion function from the reference deletion mode to the target deletion mode.
Optionally, before deleting the target character in the content to be edited based on the current deletion mode to obtain the target content, the method further includes:
detecting a second operation gesture in the target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, the deleting the target character in the content to be edited based on the current deletion mode to obtain the target content includes:
and responding to the second operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
Optionally, the method further includes:
displaying identification symbols of all deletion modes included in the deletion function in a target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
and determining a highlight mode, processing the identifier of the current deletion mode based on the highlight mode, and highlighting the identifier of the current deletion mode.
In a second aspect, an electronic device, the electronic device comprising: display screen and processor, wherein:
the display screen is used for displaying the content to be edited and indicating information for identifying the current editing position;
the processor is used for determining a current deleting mode of a deleting function corresponding to the current editing position; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite; determining a target character in the content to be edited based on the current deletion mode; the target character corresponding to the first deletion mode comprises a previous character adjacent to the current editing position, and the target character corresponding to the second deletion mode comprises a next character adjacent to the current editing position; and deleting the target characters in the content to be edited based on the current deletion mode to obtain target content.
In a third aspect, a storage medium has stored thereon an information editing program which, when executed by a processor, implements the steps of the information editing method as in any one of the above.
The embodiment of the application provides an information editing method, electronic equipment and a storage medium, wherein a current deleting mode in which a deleting function is currently located is determined, then a target character in a content to be edited is determined based on the current deleting mode, and the target character in the content to be edited is deleted based on the current deleting mode to obtain the target content. Therefore, the deleting function at least comprises a first deleting mode and a second deleting mode with opposite deleting directions, and the forward or backward deleting of the target character in the edited content is realized by determining the current deleting mode in which the deleting function is currently positioned and determining the target character in the content to be edited and then deleting the target character in the content to be edited based on the current deleting mode, so that the problem that the deleting function of the portable electronic equipment in the prior art is very limited is solved, the deleting function of the portable electronic equipment is enriched, the deleting efficiency of the electronic equipment is effectively improved, the editing efficiency of the electronic equipment is ensured, and the intelligent degree of the electronic equipment is improved.
Drawings
Fig. 1 is a schematic flowchart of an information editing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another information editing method according to an embodiment of the present application;
fig. 3 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another information editing method provided in the embodiment of the present application;
fig. 5 is a schematic view of another application scenario provided in the embodiment of the present application;
fig. 6 is a schematic diagram of another application scenario provided in the embodiment of the present application;
fig. 7 is a schematic flowchart of an information editing method according to another embodiment of the present application;
fig. 8 is a schematic view of an application scenario provided in another embodiment of the present application;
fig. 9 is a schematic flowchart of another information editing method according to another embodiment of the present application;
fig. 10 is a schematic flowchart of another information editing method according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
An embodiment of the present application provides an information editing method, which is applied to an electronic device and is shown in fig. 1, and the method includes the following steps:
step 101, determining a current deleting mode in which the deleting function is currently located.
The deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite.
In the embodiment of the present application, the electronic device may be a device capable of installing an application having a deletion function such as an input method, or the electronic device may also be a device having a virtual keyboard. Correspondingly, the electronic device may be, for example, a desktop computer, a notebook computer, a tablet computer, a vehicle-mounted computer, or a smart phone. In some application scenarios, the display screen of the electronic device may be a touch screen.
And 102, determining a target character in the content to be edited based on the current deletion mode.
The target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position.
In the embodiment of the application, the content to be edited is the content which needs to be edited currently. The first predetermined number and the second predetermined number may be the same or different. And determining a target character corresponding to the current editing position processing in the content to be edited based on the current deletion mode. In some application scenarios, the current editing position may be prompted by a prompt such as a cursor, which is set and displayed at the current editing position to prompt the user of the current editing position.
And 103, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content.
In the embodiment of the application, the electronic device deletes the target character in the content to be edited according to the current deletion mode, so that the target content is obtained.
According to the information editing method provided by the embodiment of the application, the current deleting mode of the deleting function is determined, then the target characters in the content to be edited are determined based on the current deleting mode, and the target characters in the content to be edited are deleted based on the current deleting mode to obtain the target content. Therefore, the deleting function at least comprises a first deleting mode and a second deleting mode with opposite deleting directions, and the forward or backward deleting of the target character in the edited content is realized by determining the current deleting mode in which the deleting function is currently positioned and determining the target character in the content to be edited and then deleting the target character in the content to be edited based on the current deleting mode, so that the problem that the deleting function of the portable electronic equipment in the prior art is very limited is solved, the deleting function of the portable electronic equipment is enriched, the deleting efficiency of the electronic equipment is effectively improved, the editing efficiency of the electronic equipment is ensured, and the intelligent degree of the electronic equipment is improved.
Based on the foregoing embodiments, an embodiment of the present application provides an information editing method, which is shown in fig. 2 and is applied to an electronic device, and the method includes the following steps:
step 201, receiving a first editing operation.
In this embodiment of the application, the first editing operation may be a selection operation for determining that the current editing function is a deletion function, that is, the first editing operation may be implemented by a user selecting a deletion key displayed in a current display interface of the electronic device. For example, the user may perform a touch operation on a display screen of the electronic device, or the user may select a delete key of the displayed virtual keys through another input device, such as a mouse.
Step 202, based on the first editing operation, determining that the current editing function for the content to be edited is a deleting function.
The deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite.
In the embodiment of the application, after the electronic device detects the first editing operation, it is determined that the current editing function selected by the first editing operation to the content to be edited is a deletion function according to the selection object for the first editing operation.
Step 203, detecting a first operation gesture.
In this embodiment, the first operation gesture may be detected by a user through a touch device of the electronic device, for example, a touch screen or other touch input device of the electronic device. The first operation gesture may be input at any position in a touch device of the electronic device. For example, when the user inputs the first operation gesture through the touch screen of the electronic device, the user may input the first operation gesture in any area of the currently displayed interface of the electronic device, that is, the current editing function is determined to be the deletion function based on the first editing operation in step 202, so the input area for the first operation gesture may not be limited.
And step 204, determining the current deleting mode based on the first operation gesture.
In the embodiment of the application, in some application scenarios, the electronic device detects a sliding track of a first operation gesture, and determines a current deletion mode according to the sliding track of the first operation gesture. For example, when the sliding direction of the sliding track of the first operation gesture is a first direction, the current deletion mode is determined to be the first deletion mode, and when the sliding direction of the sliding track of the second operation gesture is a second direction, the current deletion mode is determined to be the second deletion mode.
In other application scenarios, the electronic device may further perform judgment and analysis on the first operation gesture after detecting the first operation gesture, perform matching operation on the first operation gesture and the preset operation gesture, and determine that the deletion mode corresponding to the preset operation gesture is the current deletion mode if the first operation gesture is matched with the preset operation gesture.
Step 205, based on the current deletion mode, determining the target character in the content to be edited.
The target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position.
In the embodiment of the present application, the first predetermined number and the second predetermined number are generally 1. The electronic equipment determines a corresponding target character at the current editing position based on the current deletion mode.
And step 206, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content.
In the embodiment of the application, the electronic device responds to the first operation gesture, and deletes the target character based on the current deletion mode, so that the target content is obtained.
In other embodiments of the present application, step 203 may be implemented by the following steps: within the target display area, a first operation gesture is detected.
And the target display area corresponds to the target virtual key corresponding to the deleting function.
In this embodiment of the application, the target virtual key corresponding to the deletion function may be a deletion key set in an input method displayed by the electronic device, and the corresponding target display area is a display area corresponding to the deletion key when the deletion key is displayed on a display interface of the electronic device. That is, after determining that the current editing function is the delete function based on the first editing operation, the user performs a corresponding selection operation in the target display area when the delete function is implemented.
Correspondingly, in the embodiment of the present application, step 204 may be implemented by step a11 or step a 12. If the sliding direction of the sliding track of the first operation gesture is the first direction, step 204 is implemented by step a11, and if the sliding direction of the sliding track of the first operation gesture is the second direction, step 204 is implemented by step a 12:
step a11, if the sliding direction of the sliding track of the first operation gesture is the first direction, determining that the current deletion mode is the first deletion mode.
In the embodiment of the present application, the sliding direction of the sliding track of the first operation gesture refers to a direction from the sliding start point to the sliding end point of the first operation gesture. The method comprises the steps that the forward direction of characters currently displayed by the electronic equipment is taken as the 90-degree direction of the currently displayed coordinates of the electronic equipment, the corresponding horizontal right direction is taken as the 0-degree direction and the 360-degree direction, the horizontal left direction is taken as the 180-degree direction, and the direction of the 90-degree direction is taken as the 270-degree direction, so that when the sliding direction of the sliding track of a first operation gesture is limited to be in the range of 90-270 degrees of a corresponding coordinate system, the sliding direction of the first operation gesture is taken as the first direction, and the deleting mode corresponding to the sliding track when the sliding direction is set in the range of 90-270 degrees is taken as the first deleting mode, and particularly the forward deleting mode.
Step a12, if the sliding direction of the sliding track of the first operation gesture is the second direction, determining that the current deletion mode is the second deletion mode.
Wherein the first direction and the second direction are opposite.
In this embodiment of the application, when the sliding direction of the sliding track of the first operation gesture is in the range of 270 ° to 90 ° in the corresponding coordinate system, the sliding direction of the first operation gesture is the second direction, and the deletion mode corresponding to the sliding track when the sliding direction is set in the range of 270 ° to 90 ° is the second deletion mode, which may specifically be a backward deletion mode.
For example, as shown in the coordinate system shown in fig. 3, taking a sliding start point of a sliding track of the first operation gesture as the origin of coordinates O as an example, when an end point of the sliding track of the first operation gesture is within the range of the area a, the sliding direction of the first operation gesture may be determined as the first direction, and when the end point of the sliding track of the first operation gesture is within the area B, the sliding direction of the first operation gesture may be determined as the second direction.
Correspondingly, in the embodiment of the present application, step 206 may be implemented by the following steps: and responding to the first operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
In the embodiment of the application, if the current deletion mode is the first deletion mode, namely the forward deletion mode, the first operation gesture is responded, and the first preset number of characters before the current editing position are deleted to obtain the target content. And if the current deletion mode is the second deletion mode, namely the backward deletion mode, responding to the first operation gesture, and deleting a second preset number of characters before the current editing position to obtain the target content.
In other embodiments of the present application, referring to fig. 4, before the electronic device performs step 201, the electronic device is further configured to perform step 207:
and step 207, displaying the identification symbols of all the deletion modes included in the deletion function in the target display area.
And the target display area corresponds to the target virtual key corresponding to the deleting function.
In the embodiment of the present application, referring to fig. 5, a shaded area C is a target display area, where C includes identifiers of two deletion modes, specifically, as shown in fig. 6, C1 is an identifier of a first deletion mode to implement a forward deletion mode, and C2 is an identifier of a second deletion mode to implement a backward deletion mode. Fig. 6 is only a schematic illustration, and is not limited in any way.
Correspondingly, after the electronic device performs step 204, the electronic device is further configured to perform step 208:
step 208, determining the highlight mode, and processing the identifier of the current deletion mode based on the highlight mode, so as to highlight the identifier of the current deletion mode.
In the embodiment of the present application, the highlighting mode may be a mode in which at least one of thickening, color filling, three-dimensional highlighting, and the like is performed on the identifier of the current deletion mode, so that the user can determine what the current deletion mode is. Illustratively, when it is determined that the current deletion mode is the first deletion mode, the identifier of the first deletion mode is subjected to an emboldening process.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the information editing method provided by the embodiment of the application, the current deleting mode of the deleting function is determined, then the target characters in the content to be edited are determined based on the current deleting mode, and the target characters in the content to be edited are deleted based on the current deleting mode to obtain the target content. Therefore, the deleting function at least comprises a first deleting mode and a second deleting mode with opposite deleting directions, and the forward or backward deleting of the target character in the edited content is realized by determining the current deleting mode in which the deleting function is currently positioned and determining the target character in the content to be edited and then deleting the target character in the content to be edited based on the current deleting mode, so that the problem that the deleting function of the portable electronic equipment in the prior art is very limited is solved, the deleting function of the portable electronic equipment is enriched, the deleting efficiency of the electronic equipment is effectively improved, the editing efficiency of the electronic equipment is ensured, and the intelligent degree of the electronic equipment is improved.
Based on the foregoing embodiments, an embodiment of the present application provides an information editing method, which is shown in fig. 7 and is applied to an electronic device, and the method includes the following steps:
step 301, receiving a first editing operation.
Step 302, based on the first editing operation, determining that the current editing function for the content to be edited is a deleting function.
The deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite.
Step 303, determining a target position of the current editing position in the content to be edited.
In the embodiment of the application, the electronic device acquires the position of the current editing position of the content to be edited to obtain the target position.
Step 304, determining the current deletion mode based on the target position.
In the embodiment of the present application, a relationship between an editing position and a deletion mode may be set, in the relationship between the editing position and the deletion mode, different editing positions are set, and a corresponding editing position corresponds to a different deletion mode. Therefore, after the electronic equipment determines to obtain the target position, the electronic equipment can determine the deletion mode corresponding to the target position according to the relationship between the editing position and the deletion mode and the target position, so as to obtain the current deletion mode.
In other embodiments of the present application, step 304 may be implemented by step b11, step b12, or steps b 13-b 15. Wherein, if the target position is at the first position of the content to be edited, step 304 can be implemented by step b11, if the target position is at the second position of the content to be edited, step 304 can be implemented by step b12, if the target position is at the third position of the content to be edited, step 304 can be implemented by steps b 13-b 15:
and b11, if the target position is at the first position of the content to be edited, determining that the current deletion mode is the second deletion mode.
Wherein the first position is in front of the first character of the content to be edited.
Illustratively, as shown in fig. 8, the total content of the content to be edited is "lovely farm members hello-member exclusive-sharing 10-element threshold-free coupon will expire at number 30, and you can contact a duty service to get it if necessary. This issues tickets for the seller, which non-members cannot use! If the preference is superimposed, the customer service is called to change the price, and the thank-seniors are supported by us to congratulate your life to be happy. "the corresponding first position is before the first character of the whole content of the content to be edited, i.e. the position before the" parent "in" lovely farm member hello ", as shown by the cursor D in fig. 8, which is the first position. At this time, the corresponding deletion mode is the second deletion mode, i.e., the backward deletion mode.
And b12, if the target position is at the second position of the content to be edited, determining that the current deletion mode is the first deletion mode.
Wherein the second position is behind the last character of the content to be edited.
Illustratively, the second location is "wish you live pleasantly. "middle". The position of the cursor E in fig. 8 is the second position, and the current deletion mode is the first deletion mode, i.e. the forward deletion mode.
Step b13, if the target position is at the third position of the content to be edited, timing is started from the current editing position to the third position, and the current deleting mode where the deleting function is currently located is determined to be the reference deleting mode according to the timing.
And the reference deletion mode is a first deletion mode or a second deletion mode.
In this embodiment of the application, when the target position is changed to the third position of the content to be edited, the corresponding reference deletion mode may be a default deletion mode, or the reference deletion mode may be a last deletion mode corresponding to the deletion function when the deletion function is realized last time.
And b14, if the second editing operation is not detected within the timed target duration, determining a target deletion mode.
Wherein the second editing operation is a deletion operation for executing a deletion function, and the target deletion mode is different from the reference deletion mode.
In this embodiment of the application, when the target position changes to the third position, a timing module in the electronic device starts timing, and if a second editing operation is detected within a time period of the timing as the target time period, the second editing operation is responded to, and the target character is deleted in the reference deletion mode. And if the second editing operation is not detected within the timing duration as the target duration, determining the target deletion mode with different reference deletion modes.
For example, it is assumed that the modes corresponding to the deletion function include a first deletion mode, a second deletion mode, and a third deletion mode. According to the use frequency of the deleting mode, the modes corresponding to the deleting function are sequenced as follows: and correspondingly, when the reference mode is the second deletion mode and the second editing operation is detected within the timing target duration, determining that the target deletion mode is the third deletion mode which is sequenced after the second deletion mode. And after the third deletion mode is switched, timing is started, and if the second editing operation is not detected within the timing target duration, the target deletion mode is determined to be the first deletion mode, so that the detailed description is omitted.
And b15, switching the current deleting mode of the deleting function from the reference deleting mode to the target deleting mode.
It should be noted that, after the current deletion mode of the deletion function is switched from the reference deletion mode to the target deletion mode, if the current editing function is still the deletion function, the reference deletion mode is switched to the target deletion mode from the deletion function, the re-timing is started, the target deletion mode is used as the reference deletion mode, and when the second editing operation is detected within the timed target duration, a new target deletion mode is determined, and the mode switching is performed, so as to repeat the operations.
Step 305, determining a target character in the content to be edited based on the current deletion mode.
The target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position.
And step 306, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content.
Based on the foregoing embodiments, an embodiment of the present application provides an information editing method, and as shown in fig. 9, before the electronic device performs step 306, step 307 may be further performed:
step 307, detecting a second operation gesture in the target display area.
And the target display area corresponds to the target virtual key corresponding to the deleting function.
Correspondingly, step 306 may be implemented by step 306 a:
and step 306a, responding to the second operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
Based on the foregoing embodiment, referring to fig. 10, before step 301, the electronic device is further configured to perform step 308:
and 308, displaying the identification symbols of all the deleting modes included in the deleting function in the target display area.
And the target display area corresponds to the target virtual key corresponding to the deleting function.
Correspondingly, after the electronic device performs step 304, the method is further configured to perform step 309:
step 309, determining the highlight mode, and processing the identifier of the current deletion mode based on the highlight mode, and highlighting the identifier of the current deletion mode.
Illustratively, assume that the delete function includes two modes: a forward delete mode and a backward delete mode. Correspondingly, the identifier of the forward deletion mode included in the target display area corresponding to the deletion function has a forward small arrow, and the identifier of the backward deletion mode has a backward small arrow, specifically, as shown in fig. 6, when the current deletion mode of the deletion function is the forward deletion mode or the backward deletion mode, the current deletion mode is displayed in an image, so that a user can easily identify which mode the current deletion mode is.
When the current editing function is a deleting function, two deleting modes corresponding to the deleting function are switched every other reasonable target time length. Assuming that the default deleting mode of the deleting function is the forward deleting mode when the user locates a new editing position, and when the waiting time length is a target time length, for example, no input or deleting operation exists within 2 seconds(s), the deleting mode of the deleting function is switched to the backward deleting mode when the time length is 2 s. If the operation is not performed within 2s while waiting for the backward deletion mode, the deletion mode of the deletion function is switched to the forward deletion mode. If the input or deletion operation is carried out within 2s, the current editing position is counted again after being moved, and the deletion mode of the deletion function can be kept as the last deletion mode switched to, namely the forward deletion mode, or recovered to the default deletion mode.
That is, only when the corresponding current editing position is not changed in the delete function, the delete mode of the delete function is switched every target time length and when the corresponding operation is not received within the target time length.
Since the deletion mode of the deletion function does not affect the input operation of the electronic device, only the deletion direction is affected. Therefore, the user can determine the current deletion mode only by observing the identifier of the deletion mode displayed in the target display area, so as to perform corresponding deletion operation.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the information editing method provided by the embodiment of the application, the current deleting mode of the deleting function is determined, then the target characters in the content to be edited are determined based on the current deleting mode, and the target characters in the content to be edited are deleted based on the current deleting mode to obtain the target content. Therefore, the deleting function at least comprises a first deleting mode and a second deleting mode with opposite deleting directions, and the forward or backward deleting of the target character in the edited content is realized by determining the current deleting mode in which the deleting function is currently positioned and determining the target character in the content to be edited and then deleting the target character in the content to be edited based on the current deleting mode, so that the problem that the deleting function of the portable electronic equipment in the prior art is very limited is solved, the deleting function of the portable electronic equipment is enriched, the deleting efficiency of the electronic equipment is effectively improved, the editing efficiency of the electronic equipment is ensured, and the intelligent degree of the electronic equipment is improved.
Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, which may be applied to the information editing method provided in the embodiments corresponding to fig. 1 to 2, 4, 7, 9 to 10, and as shown in fig. 11, the electronic device 4 may include: a display screen 41 and a processor 42, wherein:
a display screen 41 for displaying a content to be edited and indication information for identifying a current editing position;
a processor 42 for determining a current deletion mode for a corresponding deletion function at a current editing position; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite; determining a target character in the content to be edited based on the current deletion mode; the target characters corresponding to the first deletion mode comprise previous characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise next characters adjacent to the current editing position; and deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content.
In other embodiments of the present application, when the processor executes the step to determine the current deletion mode in which the deletion function is currently located, the method may further include the following steps:
receiving a first editing operation;
determining a current editing function for the content to be edited as a deleting function based on the first editing operation;
detecting a first operation gesture;
based on the first operation gesture, a current deletion mode is determined.
In other embodiments of the present application, when the processor executes the step of detecting the first operation gesture, the following steps may be further implemented:
detecting a first operation gesture in a target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, when the processor executes the step of determining the current deletion mode based on the first operation gesture, the following steps may also be implemented:
if the sliding direction of the sliding track of the first operation gesture is the first direction, determining that the current deleting mode is the first deleting mode;
if the sliding direction of the sliding track of the first operation gesture is a second direction, determining that the current deleting mode is a second deleting mode; wherein the first direction and the second direction are opposite;
correspondingly, the processor executes the step of deleting the target character in the content to be edited based on the current deletion mode, and when the target content is obtained, the following steps can be further implemented:
and responding to the first operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
In other embodiments of the present application, when the processor executes the step to determine the current deletion mode in which the deletion function is currently located, the method may further include the following steps:
determining a current editing position aiming at the content to be edited, and receiving a first editing operation;
determining a current editing function for the content to be edited as a deleting function based on the first editing operation;
determining a target position of a current editing position in the content to be edited;
based on the target location, a current deletion mode is determined.
In other embodiments of the present application, the processor may further perform the following steps when determining the current deletion mode based on the target location:
if the target position is at the first position of the content to be edited, determining that the current deletion mode is a second deletion mode; wherein, the first position is in front of the first character of the content to be edited;
if the target position is at a second position of the content to be edited, determining that the current deletion mode is a first deletion mode; wherein the second position is behind the last character of the content to be edited.
In other embodiments of the present application, the processor may further perform the following steps when determining the current deletion mode based on the target location:
if the target position is at a third position of the content to be edited, timing is started from the current editing position to the third position, and the current deleting mode where the deleting function is currently located is determined to be a reference deleting mode according to the timing; the third position is a position except the first position and the second position in the content to be edited, and the reference deletion mode is a first deletion mode or a second deletion mode;
if the second editing operation is not detected within the timed target duration, determining a target deleting mode; wherein the second editing operation is a deletion operation for executing a deletion function, and the target deletion mode is different from the reference deletion mode;
the current deletion mode of the deletion function is switched from the reference deletion mode to the target deletion mode.
In other embodiments of the present application, the processor executes the step of deleting the target character in the content to be edited based on the current deletion mode, and before obtaining the target content, the processor is further configured to execute the following steps:
detecting a second operation gesture in the target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, based on the current deletion mode, deleting the target characters in the content to be edited to obtain the target content, including:
and responding to the second operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
In other embodiments of the present application, the processor is further configured to perform the steps of:
displaying identification symbols of all deletion modes included in the deletion function in the target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
and determining a highlight mode, processing the identifier of the current deletion mode based on the highlight mode, and highlighting the identifier of the current deletion mode.
It should be noted that, a specific implementation process of the steps executed by the processor in this embodiment may refer to implementation processes in the information editing method provided in embodiments corresponding to fig. 1 to 2, 4, 7, and 9 to 10, and details are not described here.
According to the electronic device provided by the embodiment of the application, the target characters in the content to be edited are determined by determining the current deletion mode in which the deletion function is currently located, based on the current deletion mode, and the target characters in the content to be edited are deleted based on the current deletion mode, so that the target content is obtained. Therefore, the deleting function at least comprises a first deleting mode and a second deleting mode with opposite deleting directions, and the forward or backward deleting of the target character in the edited content is realized by determining the current deleting mode in which the deleting function is currently positioned and determining the target character in the content to be edited and then deleting the target character in the content to be edited based on the current deleting mode, so that the problem that the deleting function of the portable electronic equipment in the prior art is very limited is solved, the deleting function of the portable electronic equipment is enriched, the deleting efficiency of the electronic equipment is effectively improved, the editing efficiency of the electronic equipment is ensured, and the intelligent degree of the electronic equipment is improved.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium, which is referred to as a storage medium for short, where the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the implementation process of the information editing method provided in the embodiments corresponding to fig. 1 to 2, 4, 7, 9 to 10, and details of the implementation process are not repeated here.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A method of editing information, the method comprising:
determining a current deleting mode in which a deleting function is currently positioned; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite;
determining a target character in the content to be edited based on the current deletion mode; the target characters corresponding to the first deletion mode comprise a first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode comprise a second preset number of characters adjacent to the current editing position;
and deleting the target characters in the content to be edited based on the current deletion mode to obtain target content.
2. The method of claim 1, the determining a current deletion mode in which a deletion function is currently located, comprising:
receiving a first editing operation;
determining that a current editing function for the content to be edited is the deleting function based on the first editing operation;
detecting a first operation gesture;
determining the current deletion mode based on the first operation gesture.
3. The method of claim 2, the detecting a first operational gesture, comprising:
detecting the first operation gesture in a target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, the determining the current deletion mode based on the first operation gesture comprises:
if the sliding direction of the sliding track of the first operation gesture is a first direction, determining that the current deletion mode is a first deletion mode;
if the sliding direction of the sliding track of the first operation gesture is a second direction, determining that the current deleting mode is a second deleting mode; wherein the first direction and the second direction are opposite;
correspondingly, the deleting the target character in the content to be edited based on the current deletion mode to obtain the target content includes:
and responding to the first operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
4. The method of claim 1, the determining a current deletion mode in which a deletion function is currently located, comprising:
receiving a first editing operation;
determining that a current editing function for the content to be edited is the deleting function based on the first editing operation;
determining a target position of a current editing position in the content to be edited;
determining the current deletion mode based on the target location.
5. The method of claim 4, the determining the current deletion mode based on the target location comprising:
if the target position is at the first position of the content to be edited, determining that the current deletion mode is the second deletion mode; wherein the first position is in front of a first character of the content to be edited;
if the target position is at a second position of the content to be edited, determining that the current deletion mode is the first deletion mode; and the second position is behind the last character of the content to be edited.
6. The method of claim 4, the determining the current deletion mode based on the target location, further comprising:
if the target position is at a third position of the content to be edited, timing is started from the current editing position to the third position, and the current deleting mode where the deleting function is currently located is determined to be a reference deleting mode according to the timing; the third position is a position except the first position and the second position in the content to be edited, and the reference deletion mode is the first deletion mode or the second deletion mode;
if the second editing operation is not detected within the timed target duration, determining a target deleting mode; wherein the second editing operation is a deletion operation that performs the deletion function, the target deletion mode being different from the reference deletion mode;
switching a current deletion mode of the deletion function from the reference deletion mode to the target deletion mode.
7. The method according to claim 5 or 6, before deleting the target character in the content to be edited based on the current deletion mode to obtain target content, the method further comprising:
detecting a second operation gesture in the target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
correspondingly, the deleting the target character in the content to be edited based on the current deletion mode to obtain the target content includes:
and responding to the second operation gesture, and deleting the target character according to the current deletion mode to obtain the target content.
8. The method of claim 1, further comprising:
displaying identification symbols of all deletion modes included in the deletion function in a target display area; the target display area corresponds to a target virtual key corresponding to the deleting function;
and determining a highlight mode, processing the identifier of the current deletion mode based on the highlight mode, and highlighting the identifier of the current deletion mode.
9. An electronic device, the electronic device comprising: display screen and processor, wherein:
the display screen is used for displaying the content to be edited and indicating information for identifying the current editing position;
the processor is used for determining a current deleting mode of a deleting function corresponding to the current editing position; the deleting function at least comprises a first deleting mode and a second deleting mode, and the deleting directions of the first deleting mode and the second deleting mode are opposite; determining a target character in the content to be edited based on the current deletion mode; the target character corresponding to the first deletion mode comprises a previous character adjacent to the current editing position, and the target character corresponding to the second deletion mode comprises a next character adjacent to the current editing position; and deleting the target characters in the content to be edited based on the current deletion mode to obtain target content.
10. A storage medium having stored thereon an information editing program which, when executed by a processor, implements the steps of the information editing method according to any one of claims 1 to 8.
CN202010777830.0A 2020-08-05 2020-08-05 Information editing method, electronic equipment and storage medium Pending CN112100988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010777830.0A CN112100988A (en) 2020-08-05 2020-08-05 Information editing method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010777830.0A CN112100988A (en) 2020-08-05 2020-08-05 Information editing method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112100988A true CN112100988A (en) 2020-12-18

Family

ID=73749926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010777830.0A Pending CN112100988A (en) 2020-08-05 2020-08-05 Information editing method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112100988A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044139A1 (en) * 2007-08-08 2009-02-12 Samsung Electronics Co., Ltd. Apparatus and method for providing character deletion function
US20130080963A1 (en) * 2011-09-28 2013-03-28 Research In Motion Limited Electronic Device and Method For Character Deletion
CN103645829A (en) * 2013-12-18 2014-03-19 天津三星通信技术研究有限公司 Character deletion method and portable terminal utilizing same
WO2015081606A1 (en) * 2013-12-06 2015-06-11 上海斐讯数据通信技术有限公司 Method for deleting characters displayed on touch screen and electronic device
CN109298790A (en) * 2018-10-11 2019-02-01 科大讯飞股份有限公司 Character deleting method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090044139A1 (en) * 2007-08-08 2009-02-12 Samsung Electronics Co., Ltd. Apparatus and method for providing character deletion function
US20130080963A1 (en) * 2011-09-28 2013-03-28 Research In Motion Limited Electronic Device and Method For Character Deletion
WO2015081606A1 (en) * 2013-12-06 2015-06-11 上海斐讯数据通信技术有限公司 Method for deleting characters displayed on touch screen and electronic device
CN103645829A (en) * 2013-12-18 2014-03-19 天津三星通信技术研究有限公司 Character deletion method and portable terminal utilizing same
CN109298790A (en) * 2018-10-11 2019-02-01 科大讯飞股份有限公司 Character deleting method and device

Similar Documents

Publication Publication Date Title
CN107102786B (en) Information processing method and client
WO2022194004A1 (en) Application icon arrangement method and apparatus, and electronic device
CN112269519B (en) Document processing method and device and electronic equipment
CN113467660A (en) Information sharing method and electronic equipment
CN112486388A (en) Picture sharing method and device and electronic equipment
CN109359582A (en) Information search method, information search device and mobile terminal
CN111752459A (en) Information processing method, device, equipment and storage medium
CN114040248A (en) Video processing method and device and electronic equipment
CN112764633B (en) Information processing method and device and electronic equipment
CN112698762B (en) Icon display method and device and electronic equipment
CN106201467B (en) Screenshot labeling interface display method and device
WO2022228433A1 (en) Information processing method and apparatus, and electronic device
CN112100988A (en) Information editing method, electronic equipment and storage medium
CN112558853B (en) Session message processing method and device, electronic device and storage medium
CN111796733B (en) Image display method, image display device and electronic equipment
CN114385562A (en) Text information deleting method and device and electronic equipment
US10637905B2 (en) Method for processing data and electronic apparatus
CN114845171A (en) Video editing method and device and electronic equipment
CN111752428A (en) Icon arrangement method and device, electronic equipment and medium
CN111796736A (en) Application sharing method and device and electronic equipment
CN107704175B (en) Image collection method and device and storage medium
CN106502515B (en) Picture input method and mobile terminal
CN115134317B (en) Message display method, device, storage medium and electronic device
CN111831188B (en) Information display method, device, equipment and medium
CN113162840B (en) Display method, display device, electronic apparatus, and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination