Information editing method, electronic device and storage medium
By introducing forward and backward deletion mode information editing methods in portable electronic devices, the problem of limited device deletion function is solved, and the editing efficiency and intelligence are improved.
Patent Information
- Application Number
- CN202010777830.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-05
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-08-05
AI Technical Summary
The deletion function of existing portable electronic devices is very limited, and the lack of backward deletion function, resulting in low efficiency and reduced intelligence of information editing.
Provided is a method of information editing, by determining the current mode of the deletion function, including forward and backward deletion modes, and determining and deleting target characters in the content to be edited based on the current mode, to realize forward or backward deletion of the edited content.
It enriches the deletion function of portable electronic devices, improves the efficiency of deletion and editing, and improves the intelligence of the device.
Smart Images

Figure CN112100988B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information editing method, an electronic device and a storage medium. Background Art
[0002] With the rapid development of science and technology, electronic devices are increasingly widely used, especially portable electronic devices, which have a great impact on people's work, life, study and entertainment. In the prior art, the input method of portable electronic devices basically includes a forward deletion function, but does not have a backward deletion function. However, in actual application scenarios, there are many scenarios for backward deletion. In the current scenarios where backward deletion is required, the user usually moves the cursor behind the target character to be deleted and deletes the target character through the forward deletion function.
[0003] This results in that the deletion function of current portable electronic devices is very limited, resulting in low efficiency in information editing and reduced intelligence of the electronic devices.
[0004] Application Contents
[0005] In order to solve the above-mentioned technical problems, the embodiments of the present application hope to provide an information editing method, an electronic device and a storage medium, which solves the problem that the deletion function of portable electronic devices in the prior art is very limited, enriches the deletion function of portable electronic devices, effectively improves the deletion efficiency of electronic devices, ensures the editing efficiency of electronic devices, and improves the intelligence level of electronic devices.
[0006] The technical solution of this application is implemented as follows:
[0007] In a first aspect, an information editing method is provided, the method comprising:
[0008] Determine the current deletion mode of the deletion function; wherein the deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite;
[0009] Based on the current deletion mode, determining target characters in the content to be edited; wherein the target characters corresponding to the first deletion mode include the first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the second preset number of characters adjacent to the current editing position;
[0010] Based on the current deletion mode, the target characters in the content to be edited are deleted to obtain the target content.
[0011] Optionally, determining the current deletion mode of the deletion function includes:
[0012] receiving a first editing operation;
[0013] Based on the first editing operation, determining that the current editing function for the content to be edited is the deletion function;
[0014] detecting a first operation gesture;
[0015] Based on the first operation gesture, the current deletion mode is determined.
[0016] Optionally, detecting the first operation gesture includes:
[0017] In a target display area, detecting the first operation gesture; wherein the target display area corresponds to a target virtual key corresponding to the delete function;
[0018] Correspondingly, determining the current deletion mode based on the first operation gesture includes:
[0019] 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;
[0020] 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 is opposite to the second direction;
[0021] Correspondingly, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content includes:
[0022] In response to the first operation gesture, the target character is deleted according to the current deletion mode to obtain the target content.
[0023] Optionally, determining the current deletion mode of the deletion function includes:
[0024] receiving a first editing operation;
[0025] Based on the first editing operation, determining that the current editing function for the content to be edited is the deletion function;
[0026] Determine the target position of the current editing position in the content to be edited;
[0027] Based on the target position, the current deletion mode is determined.
[0028] Optionally, determining the current deletion mode based on the target position includes:
[0029] 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 before the first character of the content to be edited;
[0030] If the target position is at the second position of the content to be edited, it is determined that the current deletion mode is the first deletion mode; wherein the second position is after the last character of the content to be edited.
[0031] Optionally, the determining the current deletion mode based on the target position further includes:
[0032] If the target position is at the third position of the content to be edited, timing is started from when the current editing position is the third position, and according to the timing, the current deletion mode of the deletion function is determined to be the reference deletion mode; wherein the third position is a position in the content to be edited other than the first position and the second position, and the reference deletion mode is the first deletion mode or the second deletion mode;
[0033] If no second editing operation is detected within the target time duration, determining a target deletion mode; wherein the second editing operation is a deletion operation that executes the deletion function, and the target deletion mode is different from the reference deletion mode;
[0034] A current deletion mode of the deletion function is switched from the reference deletion mode to the target deletion mode.
[0035] Optionally, before deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content, the method further includes:
[0036] In the target display area, detecting a second operation gesture; wherein the target display area corresponds to the target virtual key corresponding to the delete function;
[0037] Correspondingly, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content includes:
[0038] In response to the second operation gesture, the target character is deleted according to the current deletion mode to obtain the target content.
[0039] Optionally, the method further includes:
[0040] In the target display area, the identification symbols of all the deletion modes included in the deletion function are displayed; wherein the target display area corresponds to the target virtual key corresponding to the deletion function;
[0041] A highlighting mode is determined, and the identification symbol of the current deletion mode is processed based on the highlighting mode to highlight the identification symbol of the current deletion mode.
[0042] In a second aspect, an electronic device includes: a display screen and a processor, wherein:
[0043] The display screen is used to display the content to be edited and the indication information for identifying the current editing position;
[0044] The processor is used to determine the current deletion mode of the deletion function corresponding to the current editing position; wherein the deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite; based on the current deletion mode, determine the target character in the content to be edited; wherein the target character corresponding to the first deletion mode includes the previous character adjacent to the current editing position, and the target character corresponding to the second deletion mode includes the next character adjacent to the current editing position; based on the current deletion mode, delete the target character in the content to be edited to obtain the target content.
[0045] In a third aspect, a storage medium stores an information editing program, and when the information editing program is executed by a processor, the steps of the information editing method as described in any one of the above items are implemented.
[0046] The embodiment of the present application provides an information editing method, an electronic device and a storage medium, which obtains the target content by determining the current deletion mode in which the deletion function is currently located, then determining the target character in the content to be edited based on the current deletion mode, and deleting the target character in the content to be edited based on the current deletion mode. In this way, since the deletion function includes at least a first deletion mode and a second deletion mode with opposite deletion directions, by determining the current deletion mode in which the deletion function is currently located, and after determining the target character in the content to be edited, deleting the target character in the content to be edited based on the current deletion mode, forward or backward deletion of the target character in the edited content is achieved, solving the problem of very limited deletion functions of portable electronic devices in the prior art, enriching the deletion functions of portable electronic devices, effectively improving the deletion efficiency of electronic devices, ensuring the editing efficiency of electronic devices, and improving the intelligence of electronic devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart of an information editing method provided in an embodiment of the present application;
[0048] Figure 2 A flowchart of another information editing method provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0050] Figure 4 A flowchart of another information editing method provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of another application scenario provided for an embodiment of the present application;
[0052] Figure 6 A schematic diagram of another application scenario provided for an embodiment of the present application;
[0053] Figure 7 A flowchart of an information editing method provided by another embodiment of the present application;
[0054] Figure 8 A schematic diagram of an application scenario provided for another embodiment of the present application;
[0055] Fig. 9 A flowchart of another information editing method provided by another embodiment of the present application;
[0056] Fig.10 A flowchart of another information editing method provided in another embodiment of the present application;
[0057] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0059] The embodiment of the present application provides an information editing method, referring to Figure 1 As shown, the method is applied to an electronic device, and the method comprises the following steps:
[0060] Step 101: Determine the current deletion mode of the deletion function.
[0061] The deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite.
[0062] In the embodiment of the present application, the electronic device may be a device capable of installing an application program with a deletion function such as an input method, or the electronic device may also be a device with a virtual keyboard. Correspondingly, the electronic device may be, for example, a desktop computer, a laptop computer, a tablet computer, a car computer, or a smart phone. In some application scenarios, the display screen of the electronic device may be a touch screen.
[0063] Step 102: Determine the target characters in the content to be edited based on the current deletion mode.
[0064] The target characters corresponding to the first deletion mode include the first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the second preset number of characters adjacent to the current editing position.
[0065] In an embodiment of the present application, the content to be edited is the content that currently needs to be edited. The first preset number and the second preset number may be the same or different. Based on the current deletion mode, the target character corresponding to the current editing position processing in the content to be edited is determined. In some application scenarios, the current editing position can be prompted by prompt information such as a cursor, that is, a cursor and other prompt information are set and displayed at the current editing position to prompt the user of the current editing position.
[0066] Step 103: based on the current deletion mode, delete the target characters in the content to be edited to obtain the target content.
[0067] In an embodiment of the present application, the electronic device deletes the target characters in the content to be edited according to the current deletion mode, thereby obtaining the target content.
[0068] An information editing method provided by an embodiment of the present application determines the current deletion mode in which the deletion function is currently located, and then determines the target characters in the content to be edited based on the current deletion mode, and deletes the target characters in the content to be edited based on the current deletion mode to obtain the target content. In this way, since the deletion function includes at least a first deletion mode and a second deletion mode with opposite deletion directions, by determining the current deletion mode in which the deletion function is currently located, and after determining the target characters in the content to be edited, the target characters in the content to be edited are deleted based on the current deletion mode, thereby realizing forward or backward deletion of the target characters in the edited content, solving the problem of very limited deletion functions of portable electronic devices in the prior art, enriching the deletion functions of portable electronic devices, effectively improving the deletion efficiency of electronic devices, ensuring the editing efficiency of electronic devices, and improving the intelligence of electronic devices.
[0069] Based on the above embodiments, the embodiments of the present application provide an information editing method, referring to Figure 2 As shown, the method is applied to an electronic device, and the method comprises the following steps:
[0070] Step 201: Receive a first editing operation.
[0071] In the embodiment of the present application, the first editing operation may be a selection operation for determining that the current editing function is a delete function, that is, the first editing operation may be implemented by the user selecting a delete button displayed in the current display interface of the electronic device. For example, it may be implemented by the user performing a touch operation on the display screen of the electronic device, or by the user selecting a delete button in a displayed virtual button through other input devices, such as a mouse.
[0072] Step 202: Based on the first editing operation, determine that the current editing function for the content to be edited is a delete function.
[0073] The deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite.
[0074] In the embodiment of the present application, after the electronic device detects the first editing operation, it determines, based on the selection object targeted by the first editing operation, that the current editing function selected by the first editing operation for the content to be edited is a deletion function.
[0075] Step 203: Detect a first operation gesture.
[0076] In an embodiment of the present application, the first operation gesture may be detected by a user's touch device of the electronic device, such as a touch screen of the electronic device or other touch input device. The first operation gesture may be input at any position in the touch device of the electronic device. Exemplarily, when a user inputs the first operation gesture through the touch screen of the electronic device, the user may input it in any area of the current display interface of the electronic device, that is, since in step 202, based on the first editing operation, the current editing function is determined to be a delete function, there may be no limitation on the input area for the first operation gesture.
[0077] Step 204: Determine the current deletion mode based on the first operation gesture.
[0078] In the embodiments of the present application, in some application scenarios, the electronic device detects the sliding track of the first operation gesture, and determines the 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 the 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 the second direction, the current deletion mode is determined to be the second deletion mode.
[0079] In some other application scenarios, the electronic device may also judge and analyze the first operation gesture after detecting the first operation gesture, and match the first operation gesture with a preset operation gesture. If the first operation gesture matches the preset operation gesture, it is determined that the deletion mode corresponding to the preset operation gesture is the current deletion mode.
[0080] Step 205: Determine the target characters in the content to be edited based on the current deletion mode.
[0081] The target characters corresponding to the first deletion mode include the first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the second preset number of characters adjacent to the current editing position.
[0082] In the embodiment of the present application, the first preset number and the second preset number are usually 1. The electronic device determines a target character corresponding to the current editing position based on the current deletion mode.
[0083] Step 206: based on the current deletion mode, delete the target characters in the content to be edited to obtain the target content.
[0084] In an embodiment of the present application, the electronic device responds to the first operation gesture and deletes the target characters based on the current deletion mode, thereby obtaining the target content.
[0085] In other embodiments of the present application, step 203 may be implemented by the following steps: detecting a first operation gesture in the target display area.
[0086] Among them, the target display area corresponds to the target virtual key corresponding to the delete function.
[0087] In the embodiment of the present application, the target virtual key corresponding to the delete function may be a delete key set in the input method displayed by the electronic device, and the corresponding target display area is the display area corresponding to the delete key when the delete key is displayed on the 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, when implementing the delete function, the user performs a corresponding selection operation in the target display area.
[0088] Correspondingly, in the embodiment of the present application, step 204 can be implemented by the following steps a11 or a12. Wherein, 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 a12:
[0089] Step a11: if the sliding direction of the sliding track of the first operation gesture is the first direction, determine that the current deletion mode is the first deletion mode.
[0090] In the embodiment of the present application, the sliding direction of the sliding track of the first operation gesture refers to the direction from the sliding start point to the sliding end point of the first operation gesture. Taking the positive direction of the text currently displayed by the electronic device as the 90° direction of the current display coordinates of the electronic device, the corresponding horizontal right direction is 0° and 360° direction, the horizontal left direction is 180° direction, and the direction of the 90° direction is 270° direction. Therefore, when the sliding direction of the sliding track of the first operation gesture is within the range of 90° to 270° of the corresponding coordinate system, the sliding direction of the first operation gesture is the first direction, and the deletion mode corresponding to the sliding track within the range of 90° to 270° is the first deletion mode, which can be specifically the forward deletion mode.
[0091] Step a12: if the sliding direction of the sliding track of the first operation gesture is the second direction, determine that the current deletion mode is the second deletion mode.
[0092] The first direction and the second direction are opposite.
[0093] In an embodiment of the present application, when the sliding direction of the sliding trajectory of the first operation gesture is within the range of 270° to 90° of the corresponding coordinate system, the sliding direction of the first operation gesture is limited to the second direction, and the deletion mode corresponding to the sliding trajectory within the range of 270° to 90° is set to be the second deletion mode, which can be specifically a backward deletion mode.
[0094] For example, Figure 3 In the coordinate system shown, taking the sliding starting point of the sliding trajectory of the first operation gesture as the coordinate origin O as an example, when the end point of the sliding trajectory of the first operation gesture is within the range of area A, the sliding direction of the first operation gesture can be determined as the first direction; when the end point of the sliding trajectory of the first operation gesture is within the area B, the sliding direction of the first operation gesture can be determined as the second direction.
[0095] Correspondingly, in the embodiment of the present application, step 206 can be implemented by the following steps: responding to the first operation gesture, deleting the target characters according to the current deletion mode, and obtaining the target content.
[0096] In the embodiment of the present application, if the current deletion mode is the first deletion mode, i.e., the forward deletion mode, in response to the first operation gesture, the first preset number of characters before the current editing position are deleted to obtain the target content. If the current deletion mode is the second deletion mode, i.e., the backward deletion mode, in response to the first operation gesture, the second preset number of characters before the current editing position are deleted to obtain the target content.
[0097] In other embodiments of the present application, refer to Figure 4 As shown, before the electronic device executes step 201, it is also used to execute step 207:
[0098] Step 207: Display identification symbols of all deletion modes included in the deletion function in the target display area.
[0099] Among them, the target display area corresponds to the target virtual key corresponding to the delete function.
[0100] In the embodiments of this application, refer to Figure 5 As shown in FIG. 1 , the shaded area C is the target display area, wherein C includes two deletion mode identification symbols, as shown in FIG. Figure 6 As shown, C1 is the identifier of the first deletion mode, which implements the forward deletion mode, and C2 is the identifier of the second deletion mode, which implements the backward deletion mode. Figure 6 This is just an illustration and is not intended to be limiting.
[0101] Correspondingly, after the electronic device executes step 204, it is also used to execute step 208:
[0102] Step 208: determine the highlighting mode, and process the identifier of the current deletion mode based on the highlighting mode to highlight the identifier of the current deletion mode.
[0103] In an embodiment of the present application, the highlighting mode may be a mode in which the identifier of the current deletion mode is processed in at least one manner such as bolding, color filling, and three-dimensional highlighting, so that the user can determine what the current deletion mode is. Exemplarily, when it is determined that the current deletion mode is the first deletion mode, the identifier of the first deletion mode is bolded.
[0104] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0105] An information editing method provided by an embodiment of the present application determines the current deletion mode in which the deletion function is currently located, and then determines the target characters in the content to be edited based on the current deletion mode, and deletes the target characters in the content to be edited based on the current deletion mode to obtain the target content. In this way, since the deletion function includes at least a first deletion mode and a second deletion mode with opposite deletion directions, by determining the current deletion mode in which the deletion function is currently located, and after determining the target characters in the content to be edited, the target characters in the content to be edited are deleted based on the current deletion mode, thereby realizing forward or backward deletion of the target characters in the edited content, solving the problem of very limited deletion functions of portable electronic devices in the prior art, enriching the deletion functions of portable electronic devices, effectively improving the deletion efficiency of electronic devices, ensuring the editing efficiency of electronic devices, and improving the intelligence of electronic devices.
[0106] Based on the above embodiments, the embodiments of the present application provide an information editing method, referring to Figure 7 As shown, the method is applied to an electronic device, and the method comprises the following steps:
[0107] Step 301: Receive a first editing operation.
[0108] Step 302: Based on the first editing operation, determine that the current editing function for the content to be edited is a delete function.
[0109] The deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite.
[0110] Step 303: Determine the target position of the current editing position in the content to be edited.
[0111] In an embodiment of the present application, the electronic device obtains the location of the current editing position of the content to be edited and obtains the target position.
[0112] Step 304: Determine the current deletion mode based on the target location.
[0113] In the embodiment of the present application, a relationship between the editing position and the deletion mode can be set. In the relationship between the editing position and the deletion mode, different editing positions are set, and the corresponding editing positions correspond to different deletion modes. In this way, after the electronic device determines the target position, it 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, and obtain the current deletion mode.
[0114] In other embodiments of the present application, step 304 can be implemented by step b11, step b12 or steps b13 to b15. 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 b13 to b15:
[0115] Step b11: If the target position is at the first position of the content to be edited, determine that the current deletion mode is the second deletion mode.
[0116] The first position is before the first character of the content to be edited.
[0117] For example, Figure 8As shown, the entire content of the content to be edited is "Dear farm members, hello~ The exclusive 10-yuan no-threshold coupon for members will expire on the 30th. If you need it, you can contact the on-duty customer service to claim it. This is a coupon issued by the seller and non-members cannot use it! If there are overlapping discounts, please contact the customer service to change the price. Thank you for your support. Wish you a happy life.", and the first position corresponds to the position before the first character of the entire content of the content to be edited, that is, the position before "Dear" in "Dear farm members, hello~", as Figure 8 The cursor D shown in it is the first position. At this time, the corresponding deletion mode is the second deletion mode, that is, the backward deletion mode.
[0118] Step b12: If the target position is at the second position of the content to be edited, determine that the current deletion mode is the first deletion mode.
[0119] Among them, the second position is after the last character of the content to be edited.
[0120] Exemplarily, the second position is the position after the "." in "Wish you a happy life.", as Figure 8 The position where the cursor E is located in it is the second position. At this time, the corresponding current deletion mode is the first deletion mode, that is, the forward deletion mode.
[0121] Step b13: If the target position is at the third position of the content to be edited, start timing from when the current editing position is the third position, and determine the current deletion mode in which the deletion function is currently located as the reference deletion mode according to the timing.
[0122] Among them, the third position is the position in the content to be edited except the first position and the second position, and the reference deletion mode is the first deletion mode or the second deletion mode.
[0123] In the embodiment of the present application, when the target position changes to the third position of the content to be edited, the corresponding reference deletion mode can be the default deletion mode, or the reference deletion mode can also be the last deletion mode corresponding to the deletion function when the deletion function was last implemented.
[0124] Step b14: If no second editing operation is detected within the target duration of the timing, determine the target deletion mode.
[0125] Among them, the second editing operation is the deletion operation for executing the deletion function, and the target deletion mode is different from the reference deletion mode.
[0126] In the embodiment of the present application, when the target position changes to the third position, the timing module in the electronic device starts timing, and if a second editing operation is detected within the timing duration equal to the target duration, the target character is deleted in the reference deletion mode in response to the second editing operation. If the second editing operation is not detected within the timing duration equal to the target duration, a target deletion mode different from the reference deletion mode is determined.
[0127] Exemplarily, it is assumed that the modes corresponding to the deletion function include the first deletion mode, the second deletion mode, and the third deletion mode. Among them, according to the usage frequency of the deletion mode, the modes corresponding to the deletion function are sorted as: the first deletion mode, the second deletion mode, and the third deletion mode. Correspondingly, when the reference mode is the second deletion mode, when the second editing operation is detected within the timing target duration, the target deletion mode is determined to be the third deletion mode sorted after the second deletion mode. After switching to the third deletion mode, the timing starts. 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, and this is repeated and no further details are given.
[0128] Step b15: Switch the current deletion mode of the deletion function from the reference deletion mode to the target deletion mode.
[0129] 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 timing will be restarted from the time the deletion function is switched from the reference deletion mode to the target deletion mode, and the target deletion mode will be used as the reference deletion mode. When the second editing operation is detected within the target timing period, the new target deletion mode is determined, and the mode is switched, and the operation is repeated.
[0130] Step 305: Determine the target characters in the content to be edited based on the current deletion mode.
[0131] The target characters corresponding to the first deletion mode include the first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the second preset number of characters adjacent to the current editing position.
[0132] Step 306: based on the current deletion mode, delete the target characters in the content to be edited to obtain the target content.
[0133] Based on the above embodiments, the embodiments of the present application provide an information editing method, referring to Fig. 9 As shown, before the electronic device executes step 306, it may further execute step 307:
[0134] Step 307: Detect a second operation gesture in the target display area.
[0135] Among them, the target display area corresponds to the target virtual key corresponding to the delete function.
[0136] Correspondingly, step 306 can be implemented by step 306a:
[0137] Step 306a: respond to the second operation gesture, delete the target characters according to the current deletion mode, and obtain the target content.
[0138] Based on the above embodiments, refer to Fig.10 As shown, before step 301, the electronic device is further used to perform step 308:
[0139] Step 308: Display identification symbols of all deletion modes included in the deletion function in the target display area.
[0140] Among them, the target display area corresponds to the target virtual key corresponding to the delete function.
[0141] Correspondingly, after the electronic device executes step 304, it is also used to execute step 309:
[0142] Step 309: determine the highlighting mode, and process the identifier of the current deletion mode based on the highlighting mode to highlight the identifier of the current deletion mode.
[0143] For example, it is assumed that the delete function includes two modes: forward delete mode and backward delete mode. Correspondingly, the identifier of the forward delete mode included in the target display area corresponding to the delete function has a small forward arrow, and the identifier of the backward delete mode has a small backward arrow. For details, please refer to Figure 6 As shown, when the current deletion mode of the deletion function is the forward deletion mode or the backward deletion mode, the image displays the current deletion mode, so that the user can easily identify which mode the current deletion mode is.
[0144] When there is content before and after the current input cursor, and the current editing function is the delete function, the two deletion modes corresponding to the delete function will be switched at reasonable target durations. Assuming that when the user locates a new editing position, the default deletion mode of the delete function is the forward deletion mode. When there is no input or deletion operation within the target waiting time, such as 2 seconds (s), the deletion mode of the delete function will be switched to the backward deletion mode when the timing reaches 2s. If in the backward deletion mode, there is no operation within 2s, the deletion mode of the delete function will be switched to the forward deletion mode. If there is an input or deletion operation within 2s, the current editing position will be moved and the timing will be restarted, and the deletion mode of the delete function can remain the last deletion mode switched to, that is, the forward deletion mode, or be restored to the default deletion mode.
[0145] That is to say, only when the corresponding current editing position does not change under the deletion function, the deletion mode of the deletion function will be switched every target time length and when no corresponding operation is received within the target time length.
[0146] Since the delete mode of the delete function does not affect the input operation of the electronic device, but only affects the delete direction, the user only needs to observe the identifier of the delete mode displayed in the target display area to determine the current delete mode and perform the corresponding delete operation.
[0147] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0148] An information editing method provided by an embodiment of the present application determines the current deletion mode in which the deletion function is currently located, and then determines the target characters in the content to be edited based on the current deletion mode, and deletes the target characters in the content to be edited based on the current deletion mode to obtain the target content. In this way, since the deletion function includes at least a first deletion mode and a second deletion mode with opposite deletion directions, by determining the current deletion mode in which the deletion function is currently located, and after determining the target characters in the content to be edited, the target characters in the content to be edited are deleted based on the current deletion mode, thereby realizing forward or backward deletion of the target characters in the edited content, solving the problem of very limited deletion functions of portable electronic devices in the prior art, enriching the deletion functions of portable electronic devices, effectively improving the deletion efficiency of electronic devices, ensuring the editing efficiency of electronic devices, and improving the intelligence of electronic devices.
[0149] Based on the above embodiments, the embodiments of the present application provide an electronic device, which can be applied to Figures 1-2 , 4, 7, 9 to 10, in the information editing method provided in the corresponding embodiments, refer to Fig.11 As shown, the electronic device 4 may include: a display screen 41 and a processor 42, wherein:
[0150] Display screen 41, used to display the content to be edited and indication information for identifying the current editing position;
[0151] Processor 42 is used to determine the current deletion mode of the deletion function corresponding to the current editing position; wherein the deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite; based on the current deletion mode, determine the target characters in the content to be edited; wherein the target characters corresponding to the first deletion mode include the previous character adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the next character adjacent to the current editing position; based on the current deletion mode, delete the target characters in the content to be edited to obtain the target content.
[0152] In other embodiments of the present application, when the processor executes the step of determining the current deletion mode in which the deletion function is currently located, it can also be implemented by the following steps:
[0153] receiving a first editing operation;
[0154] Based on the first editing operation, determining that the current editing function for the content to be edited is a deletion function;
[0155] detecting a first operation gesture;
[0156] Based on the first operation gesture, a current deletion mode is determined.
[0157] In other embodiments of the present application, when the processor executes the step of detecting the first operation gesture, it can also be implemented by the following steps:
[0158] In the target display area, a first operation gesture is detected; wherein the target display area corresponds to a target virtual key corresponding to a delete function;
[0159] Correspondingly, when the processor executes the step of determining the current deletion mode based on the first operation gesture, it can also be implemented by the following steps:
[0160] 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;
[0161] 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 is opposite to the second direction;
[0162] Correspondingly, the processor executes the step of deleting the target characters in the content to be edited based on the current deletion mode, and when obtaining the target content, it can also be implemented by the following steps:
[0163] In response to the first operation gesture, the target characters are deleted according to the current deletion mode to obtain the target content.
[0164] In other embodiments of the present application, when the processor executes the step of determining the current deletion mode in which the deletion function is currently located, it can also be implemented by the following steps:
[0165] Determine a current editing position for the content to be edited, and receive a first editing operation;
[0166] Based on the first editing operation, determining that the current editing function for the content to be edited is a deletion function;
[0167] Determine the target position of the current editing position in the content to be edited;
[0168] Based on the target location, determine the current deletion mode.
[0169] In other embodiments of the present application, when the processor executes the step of determining the current deletion mode based on the target position, it can also be implemented by the following steps:
[0170] 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 before the first character of the content to be edited;
[0171] If the target position is at the second position of the content to be edited, it is determined that the current deletion mode is the first deletion mode; wherein the second position is after the last character of the content to be edited.
[0172] In other embodiments of the present application, when the processor executes the step of determining the current deletion mode based on the target position, it can also be implemented by the following steps:
[0173] If the target position is at the third position of the content to be edited, the timing starts from when the current editing position is the third position, and the current deletion mode of the deletion function is determined to be the reference deletion mode according to the timing; wherein the third position is a position in the content to be edited other than the first position and the second position, and the reference deletion mode is the first deletion mode or the second deletion mode;
[0174] If the second editing operation is not detected within the target time duration, determining the target deletion mode; wherein the second editing operation is a deletion operation that performs a deletion function, and the target deletion mode is different from the reference deletion mode;
[0175] Switches the current delete mode of the delete function from reference delete mode to target delete mode.
[0176] In other embodiments of the present application, the processor executes the step of deleting the target characters in the content to be edited based on the current deletion mode, and before obtaining the target content, is further used to execute the following steps:
[0177] In the target display area, a second operation gesture is detected; wherein the target display area corresponds to a target virtual key corresponding to a delete function;
[0178] Correspondingly, based on the current deletion mode, the target characters in the content to be edited are deleted to obtain the target content, including:
[0179] In response to the second operation gesture, the target characters are deleted according to the current deletion mode to obtain the target content.
[0180] In other embodiments of the present application, the processor is further configured to perform the following steps:
[0181] In the target display area, the identification symbols of all the deletion modes included in the deletion function are displayed; wherein the target display area corresponds to the target virtual key corresponding to the deletion function;
[0182] A highlighting mode is determined, and based on the highlighting mode, an identification symbol of the current deletion mode is processed to highlight the identification symbol of the current deletion mode.
[0183] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figures 1-2 The implementation process of the information editing method provided in the embodiments corresponding to 4, 7, 9 to 10 will not be repeated here.
[0184] An electronic device provided by an embodiment of the present application determines the current deletion mode in which the deletion function is currently located, and then determines the target characters in the content to be edited based on the current deletion mode, and deletes the target characters in the content to be edited based on the current deletion mode to obtain the target content. In this way, since the deletion function includes at least a first deletion mode and a second deletion mode with opposite deletion directions, by determining the current deletion mode in which the deletion function is currently located, and after determining the target characters in the content to be edited, the target characters in the content to be edited are deleted based on the current deletion mode, thereby realizing forward or backward deletion of the target characters in the edited content, solving the problem of very limited deletion functions of portable electronic devices in the prior art, enriching the deletion functions of portable electronic devices, effectively improving the deletion efficiency of electronic devices, ensuring the editing efficiency of electronic devices, and improving the intelligence of electronic devices.
[0185] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figures 1-2 The implementation process of the information editing method provided in the embodiments corresponding to 4, 7, 9 to 10 will not be repeated here.
[0186] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0187] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0190] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A method for editing information, the method comprising: Determine the current deletion mode of the deletion function; wherein the deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite; Based on the current deletion mode, determining target characters in the content to be edited; wherein the target characters corresponding to the first deletion mode include the first preset number of characters adjacent to the current editing position, and the target characters corresponding to the second deletion mode include the second preset number of characters adjacent to the current editing position; Based on the current deletion mode, deleting the target characters in the content to be edited to obtain the target content; The determining of the current deletion mode of the deletion function includes: receiving a first editing operation; Based on the first editing operation, determining that the current editing function for the content to be edited is the deletion function; Detecting a first operation gesture, or determining a target position of the current editing position in the content to be edited; wherein both sides of the target position contain characters of the content to be edited; Based on the first operation gesture or the target position, the current deletion mode is determined, and when the corresponding current editing position has not changed, and the first deletion mode or the second deletion mode corresponding to the target position has not received a corresponding operation within a target time period, the deletion mode is automatically switched; when the first operation gesture is a sliding gesture, the deletion mode corresponding to the first operation gesture is determined according to the area where the end point of the sliding trajectory is located.
2. The method according to claim 1, wherein detecting the first operation gesture comprises: In a target display area, detecting the first operation gesture; wherein the target display area corresponds to a target virtual key corresponding to the delete function; Correspondingly, determining the current deletion mode based on the first operation gesture includes: 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; 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 is opposite to the second direction; Correspondingly, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content includes: In response to the first operation gesture, the target character is deleted according to the current deletion mode to obtain the target content.
3. The method according to claim 1, further 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 before the first character of the content to be edited; If the target position is at the second position of the content to be edited, it is determined that the current deletion mode is the first deletion mode; wherein the second position is after the last character of the content to be edited.
4. The method according to claim 1, further comprising: If the target position is at the third position of the content to be edited, timing is started from when the current editing position is the third position, and according to the timing, the current deletion mode of the deletion function is determined to be the reference deletion mode; wherein the third position is a position in the content to be edited other than the first position and the second position, and the reference deletion mode is the first deletion mode or the second deletion mode; If no second editing operation is detected within the target time duration, determining a target deletion mode; wherein the second editing operation is a deletion operation that executes the deletion function, and the target deletion mode is different from the reference deletion mode; A current deletion mode of the deletion function is switched from the reference deletion mode to the target deletion mode.
5. The method according to claim 3 or 4, before deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content, the method further comprises: In the target display area, detecting a second operation gesture; wherein the target display area corresponds to the target virtual key corresponding to the delete function; Correspondingly, deleting the target characters in the content to be edited based on the current deletion mode to obtain the target content includes: In response to the second operation gesture, the target character is deleted according to the current deletion mode to obtain the target content.
6. The method according to claim 1, further comprising: In the target display area, the identification symbols of all the deletion modes included in the deletion function are displayed; wherein the target display area corresponds to the target virtual key corresponding to the deletion function; A highlighting mode is determined, and the identification symbol of the current deletion mode is processed based on the highlighting mode to highlight the identification symbol of the current deletion mode.
7. An electronic device, comprising: Display and processor, including: The display screen is used to display the content to be edited and the indication information for identifying the current editing position; The processor is used to determine a current deletion mode of a deletion function corresponding to a current editing position; wherein the deletion function includes at least a first deletion mode and a second deletion mode, and the deletion directions of the first deletion mode and the second deletion mode are opposite; based on the current deletion mode, determine a target character in the content to be edited; wherein the target character corresponding to the first deletion mode includes a previous character adjacent to the current editing position, and the target character corresponding to the second deletion mode includes a next character adjacent to the current editing position; based on the current deletion mode, delete the target character in the content to be edited to obtain the target content; The processor is also used to receive a first editing operation; based on the first editing operation, determine that the current editing function for the content to be edited is the deletion function; detect a first operation gesture, or determine the target position of the current editing position in the content to be edited; wherein both sides of the target position contain characters of the content to be edited; based on the first operation gesture, or the target position, determine the current deletion mode, and if the corresponding current editing position has not changed, if the first deletion mode or the second deletion mode corresponding to the target position has not received a corresponding operation within a target time period, automatically switch to the deletion mode; when the first operation gesture is a sliding gesture, determine the deletion mode corresponding to the first operation gesture according to the area range of the end point of the sliding trajectory.
8. A storage medium having an information editing program stored thereon, wherein the information editing program, when executed by a processor, implements the steps of the information editing method according to any one of claims 1 to 6.
