Method and device for cancelling operation
By implementing a method and device for canceling operations in the terminal device, the problem that the canceling operation function in the prior art is limited by a specific application, and the withdrawal of any operation is realized, and the user experience is improved.
Patent Information
- Application Number
- CN202311070147.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-03-04
AI Technical Summary
The undo operation function of existing terminal devices is limited by specific applications, and the undo operation cannot be implemented in applications that do not allow the undo function, which affects the user experience.
By implementing a method and device for canceling an operation in the terminal device, the terminal device can withdraw any operation of the user, regardless of which application the operation belongs to, enriching the use scenarios of the cancel function.
It realizes the withdrawal of user operations without being limited to specific applications, and improves the experience and convenience of users using the cancel function.
Smart Images

Figure CN119556826A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method and device for canceling an operation. Background Art
[0002] With the popularization and development of the Internet, people's functional requirements for terminal devices are becoming more and more diverse. For example, in order to simplify the way users use terminal devices, many terminal devices can implement an undo function in certain applications, so that users can roll back to the required steps through the undo function.
[0003] Generally, in applications that allow the undo function, the application can record user operations, obtain historical operation records, and when receiving the user's undo operation, undo a certain operation according to the historical operation record. In applications that do not allow the undo function, the terminal device cannot implement the undo function.
[0004] However, the above method of undoing the operation affects the user's experience. Summary of the invention
[0005] The embodiments of the present application provide a method and apparatus for undoing operations, so that a terminal device can undo any operation of a user on a first application and any operation of the user on a second application, so that the undo function is not limited to an application that allows undoing, enriching the usage scenarios of the undo function, and thus improving the user experience of using the undo function.
[0006] In a first aspect, an embodiment of the present application provides a method for undoing an operation, the method comprising: a terminal device displays a first interface, the first interface including a first value; in response to a first operation on the first interface, the terminal device displays a second interface, the second interface including a second value, the second value being a value obtained after the terminal device modifies the first value in response to the first operation, and the first interface and the second interface are both interfaces in a first application; the terminal device displays a third interface, the third interface including a third value; in response to a second operation on the third interface, the terminal device displays a fourth interface, the second operation is after the first operation, the fourth interface includes a fourth value, the fourth value is a value obtained after the terminal device modifies the third value in response to the second operation, the third interface and the fourth interface are both interfaces in a second application, and the first application is different from the second application; in response to the third operation on the terminal device, the terminal device displays a fifth interface, the fifth interface including a first control; in response to the operation on the first control, the terminal device displays a second control in the fourth interface; in response to the operation on the second control, the terminal device undoes the second operation.
[0007] The first interface can be Figure 1 The first value is 60. The first operation is to adjust the screen display brightness. The second interface is Figure 1 The interface shown in b in FIG. 1 is as follows, the second value is 30, and the first application is a setting application. The third interface can be Figure 5 The third value can be the switch for receiving personalized content recommendations is turned off. The second operation is the operation of turning on the switch for receiving personalized content recommendations. The fourth interface can be Figure 5 The fourth value can be the switch for receiving personalized content recommendations turned on, and the second application is a group purchase application. The third operation is the operation of opening the control center, and the fifth interface can be Figure 6 In the interface shown in a, the first control may be control 601. The second control may be Figure 6 Control 606 in the interface shown in b.
[0008] In this way, the terminal device can undo any operation of the user on the first application and the user on the second application, so that the undo function is not limited to a certain application that allows undo, enriching the usage scenarios of the undo function and improving the user experience of using the undo function.
[0009] In one possible implementation, the second control is displayed in the first window, and the first window also includes one or more of the following: a third value, a fourth value, a third control, or a fourth control, the third control is used to view the previous operation of the second operation, and the fourth control is used to view the next operation of the second operation.
[0010] The first window can be Figure 6 In the window 602 shown in b in FIG. 8 , the third control may be the control 604 in the window 602 , and the fourth control may be the control 605 in the window 602 .
[0011] In this way, the terminal device can preview the modified content of the second operation based on the third value and the fourth value in the first window, thereby improving the accuracy of the user's undoing of the second operation. In addition, the user can preview other operations based on the third control and the fourth control, thereby improving the flexibility of the undo function and the user's experience of using the undo function.
[0012] In one possible implementation, after responding to the second operation on the third interface, the method also includes: the terminal device adds the operation data of the second operation to the first data set to obtain the second data set, the operation data in the first data set are arranged in chronological order, and the operation data of the second operation is the latest data in the second data set; after the terminal device cancels the second operation, the method also includes: the terminal device deletes the operation data of the second operation in the second data set, and adds the operation data of canceling the second operation to obtain the third data set, and the operation data of canceling the second operation is the latest data in the third data set.
[0013] The first data set may be historical target data in the class stack described in the embodiments of the present application.
[0014] In this way, the terminal device can ensure that all operation data is strictly sorted in chronological order. Data at any position can be deleted during deletion. While keeping the record order unchanged, the undo operation will be more flexible, greatly improving the convenience of user operation.
[0015] In one possible implementation, any operation data in the first data set may include one or more of the following: operation name, path name of the interface where the operation is located, change item corresponding to the operation, operation time, a fifth value, or a sixth value, where the sixth value is the value obtained after the terminal device changes the fifth value in response to the operation.
[0016] In this way, by storing the operation data, the terminal device can quickly locate the interface where the operation is located through the operation data, and display the changed content of the operation through a window in the interface, so that the user can preview the specific content of the operation at any time.
[0017] In a possible implementation, after the terminal device cancels the second operation, the method further includes: the terminal device displays a fifth control in the second interface; and in response to the operation on the fifth control, the terminal device cancels the first operation.
[0018] The fifth control can be Figure 6 The confirmation fallback control shown in c in .
[0019] In this way, the terminal device can not only realize the preview of historical operations, but also realize the undo function for any historical operation, so as to improve the user's experience of using the undo function.
[0020] In one possible implementation, the fifth control is displayed in the second window, and the second window also includes one or more of the following: the first value, the second value, the sixth control, or the seventh control, the sixth control is used to view the previous operation of the first operation, and the seventh control is used to view the next operation of the first operation.
[0021] The second window can be Figure 6 In the window in the interface shown in c, the sixth control may be the control on the left side of the window, and the seventh control may be the control on the right side of the window, that is, control 605.
[0022] In this way, the terminal device can preview the modified content of the second operation based on the first value and the second value in the second window, thereby improving the accuracy of the user's undoing of the first operation. In addition, the user can preview other operations based on the sixth control and the seventh control, thereby improving the flexibility of the undo function and the user's experience of using the undo function.
[0023] In one possible implementation, after the terminal device cancels the first operation, the method also includes: the terminal device deletes the operation data of the first operation from the third data set, and adds the operation data of canceling the first operation to obtain a fourth data set, and the operation data of canceling the first operation is the latest data in the fourth data set.
[0024] In this way, the terminal device can ensure that all operation data is strictly sorted in chronological order. Data at any position can be deleted during deletion. While keeping the record order unchanged, the undo operation will be more flexible, greatly improving the convenience of user operation.
[0025] In one possible implementation, the method also includes: in response to an operation on the seventh control, the terminal device displays a third window in the third interface, the third window includes the eighth control, so the third window also includes a third value and / or a fourth value, the third value is a value obtained by modifying the fourth value in response to the operation of restoring and undoing the second operation; in response to the operation on the eighth control, the terminal device restores and undoes the second operation.
[0026] The third window can be Figure 6 In the window 602 shown in d in FIG. 1 , the eighth control may be a confirmation rollback control in the window 602 .
[0027] In this way, the terminal device can not only undo the operation, but also restore the operation that has been undone, thereby avoiding the situation where the user cannot restore the undone operation due to accidental touch, and improving the flexibility of the undo operation.
[0028] In one possible implementation, after responding to a first operation on a first interface, the method further includes: when the terminal device determines that the interface type of the first interface satisfies a preset interface type, the terminal device stores the operation data of the first operation in a first data set, the first interface being the interface called by the terminal device when implementing the first operation, and the operation data in the first data set being arranged in chronological order.
[0029] In this way, the embodiment of the present application can realize the recording of specific operations, reducing the high memory usage caused by recording all user operations on the terminal device.
[0030] In one possible implementation, the method also includes: the terminal device receives a fourth operation; in response to the fourth operation, when the terminal device determines that the interface type of the second interface does not meet the preset interface type, the terminal device does not store the operation data of the fourth operation in the first data set, and the second interface is the interface called by the terminal device when implementing the fourth operation.
[0031] The fourth operation may be any operation on the terminal device, for example, the fourth operation may be an operation of switching applications, or an operation of sliding an interface, etc.
[0032] In a possible implementation, the preset interface type may include one or more of the following: putInt type.
[0033] In this way, the terminal device can filter operations by preset interface types to obtain specific operations and cancel specific operations.
[0034] In one possible implementation, the operation data of the first operation includes: a first identifier, the first identifier is used to indicate that the parent node of the first operation is the second operation, and the terminal device cancels the second operation, including: when the terminal device determines that the second operation is the parent node of the first operation based on the first identifier, the terminal device displays a first prompt message and a ninth control, the first prompt message is used to prompt to view the operation data of the first operation, and prompt whether to continue to cancel the second operation; in response to the operation on the ninth control, the terminal device cancels the second operation, and deletes the operation data of the first operation and the operation data of the second operation.
[0035] The first identifier may be the first parent node identifier described in the embodiment of the present application, and the first prompt information may be Fig.13 The ninth control may be a confirmation control in the window 1302, as shown in b in the prompt information in the window 1302.
[0036] In this way, the terminal device can determine the association between the operations by setting the first identifier, and initiate a prompt when detecting that revoking the second operation may affect other operations, so that the user can confirm whether to continue to cancel the second operation.
[0037] In a possible implementation, the terminal device also includes: an undo implementation module and an undo recording module, and the terminal device undoes the second operation, including: the undo implementation module receives a first instruction sent by the second application, and the first instruction is used to undo the second operation; the undo implementation module calls an interface to undo the second operation, and generates operation data for undoing the second operation; the undo recording module obtains the operation data for undoing the second operation from the undo implementation module, deletes the operation data for undoing the second operation, and stores the operation data for undoing the second operation.
[0038] The second application can be Fig.14 For the target application described in, the first instruction may be the instruction described in S1407.
[0039] In this way, the revocation implementation module in the terminal device can realize the revocation of the operation, and send the generated operation data of revoking the second operation to the revocation record module, so as to facilitate the revocation record module to store data.
[0040] In a second aspect, an embodiment of the present application provides a device for undoing an operation, the device comprising a processing unit and a display unit, the display unit being used for a first interface, the first interface comprising a first value; in response to a first operation on the first interface, the display unit is also used for a second interface, the second interface comprising a second value, the second value being a value obtained after the terminal device modifies the first value in response to the first operation, and the first interface and the second interface are both interfaces in a first application; the display unit is also used for a third interface, the third interface comprising a third value; in response to a second operation on the third interface, the display unit is also used for a fourth interface, the second operation is after the first operation, the fourth interface comprises a fourth value, the fourth value is a value obtained after the terminal device modifies the third value in response to the second operation, the third interface and the fourth interface are both interfaces in a second application, and the first application is different from the second application; in response to the third operation on the terminal device, the display unit is also used for a fifth interface, the fifth interface comprising a first control; in response to the operation on the first control, the terminal device displays the second control in the fourth interface; in response to the operation on the second control, the processing unit is used to undo the second operation.
[0041] In a third aspect, an embodiment of the present application provides a terminal device, including a processor and a memory, the memory being used to store code instructions; the processor being used to run the code instructions so that the terminal device executes the method described in the first aspect or any one of the implementations of the first aspect.
[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect.
[0043] In a fifth aspect, a computer program product includes a computer program, and when the computer program is executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect.
[0044] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application;
[0046] Figure 2 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of an interface for a cancellation operation provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of an interface for turning on a personalized content recommendation switch provided in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of another undo operation interface provided in an embodiment of the present application;
[0051] Figure 7 A schematic diagram of another interface for undoing operation provided in an embodiment of the present application;
[0052] Figure 8 A schematic diagram of an interface for another undo operation provided in an embodiment of the present application;
[0053] Fig. 9 A schematic diagram of a method for canceling an operation provided in an embodiment of the present application;
[0054] Fig.10 A schematic diagram of an interface without excuse access rights provided in an embodiment of the present application;
[0055] Fig.11 A schematic diagram of storing historical target data provided by an embodiment of the present application;
[0056] Fig.12 A schematic diagram of another storage method for historical target data provided by an embodiment of the present application;
[0057] Fig.13 A schematic diagram of an interface for prompting a user provided in an embodiment of the present application;
[0058] Fig.14 A schematic diagram of module interaction of a method for canceling an operation provided in an embodiment of the present application;
[0059] Fig.15 A flowchart of another method for canceling an operation provided in an embodiment of the present application;
[0060] Fig.16 A schematic diagram of the structure of a device for canceling an operation provided in an embodiment of the present application;
[0061] Fig.17 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0063] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0064] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0065] For example, Figure 1 A schematic diagram of a scenario provided in an embodiment of the present application. Figure 1In the corresponding embodiments, a mobile phone as the terminal device is used as an example for illustration, and this example does not constitute a limitation on the embodiments of the present application.
[0066] When the terminal device receives the user's operation to open the display and brightness function in the settings application, the terminal device can display the following Figure 1 The interface shown in a in FIG. 1 may include: a progress bar 101 for adjusting screen brightness and other controls for controlling device display. The progress bar 101 may indicate that the screen brightness is 60% of the maximum screen brightness.
[0067] When the terminal device receives the user's sliding operation on the progress bar 101, the terminal device displays the following Figure 1 When the interface shown in b in FIG. 1 is displayed, the progress bar 101 may indicate that the screen brightness is 30% of the maximum screen brightness. When the terminal device receives an operation of the user sliding upward along the bottom of the display screen, the terminal device may display the following Figure 1 The desktop shown in c.
[0068] In a possible implementation, the user can also Figure 1 After adjusting the screen brightness in the interface shown in b, you can also set multiple parameters in other applications and then exit Figure 1 The interface shown in b in FIG. 1 and the desktop are displayed, which is not limited in the embodiment of the present application.
[0069] It is understandable that the user may accidentally touch the terminal device. Figure 1 The interface shown in a in the figure switches to Figure 1 The interface shown in c in FIG. After the user accidentally touches the screen, the user finds that the screen brightness is significantly reduced while using the terminal device, and it is difficult to see the content displayed on the screen under high ambient brightness. That is, the user notices that the screen brightness has changed, but does not know in which interface or what control has been triggered to cause the screen brightness to change.
[0070] When the setting application is an application that does not allow the use of the undo function, the terminal device cannot implement the undo operation in the setting application.
[0071] When the application is set to allow the use of the undo function, the application can record the received user operation to obtain a historical operation record. When the terminal device receives the user's undo operation, the terminal device can undo a certain application operation according to the historical operation record.
[0072] In a possible implementation, some terminal devices may also support a text undo function, which is limited to undoing text editing, and other content cannot be undone. For example, after entering or deleting text in a memo, the text modification operation can be withdrawn, but operations other than text cannot be undone.
[0073] Among the possible implementations, some photo editing applications can also implement an undo function, that is, they can implement internal corrections within the software, which cannot cross boundaries and has strong limitations. Sometimes, it is not necessarily the operation within the software that affects the internal display of the software, and this situation cannot be traced back. For example, when the terminal device changes the text display size of the system, the display in the software changes, and the user feels uncomfortable and wants to withdraw, it cannot be achieved by relying on the undo function in the software.
[0074] In addition, most software only supports the undoing of some operations. For example, some photo editing software can undo changes to images, but cannot undo changes to general settings such as "default settings for image export formats" and "open notifications".
[0075] In view of the limitations of the above-mentioned undo function, in this regard, the embodiment of the present application provides a method for undoing, so that after receiving the user's trigger operation on the first control for opening the undo function, the terminal device can realize the user's operation on the first application and the user's operation on the second application. The undo function is not limited to a certain application that allows revocation, enriching the usage scenarios of the undo function, and thus improving the user's experience of using the undo function. Among them, the first application or the second application can be a system application or a third-party application, which is not limited in the embodiment of the present application.
[0076] It is understandable that the above terminal devices may also be referred to as terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. The terminal devices may be mobile phones, smart TVs, wearable devices, tablet computers (Pad), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of the present application do not limit the specific technology and specific device form used by the terminal devices.
[0077] Therefore, in order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
[0078] The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.
[0079] Among them, the sensor module 180 may include one or more of the following: pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, or bone conduction sensor, etc., which is not specifically limited in the embodiments of the present application.
[0080] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0081] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.
[0082] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0083] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .
[0084] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0085] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
[0086] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
[0087] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
[0088] The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
[0089] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0090] The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0091] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0092] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
[0093] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0094] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0095] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.
[0096] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be set on the display screen 194. The gyroscope sensor can be used to determine the motion posture of the terminal device. The air pressure sensor is used to measure the air pressure. The magnetic sensor includes a Hall sensor. The acceleration sensor can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes). Distance sensor, used to measure the distance. The proximity light sensor can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor is used to sense the brightness of the ambient light. The fingerprint sensor is used to collect fingerprints. The temperature sensor is used to detect the temperature. The touch sensor, also known as a "touch device". The bone conduction sensor can obtain vibration signals.
[0097] The touch sensor may be provided on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, or a "touch screen". In the embodiment of the present application, a capacitive sensing node grid (hereinafter referred to as a capacitive sensor) may be provided in the touch screen. When the terminal device determines that the value of the capacitance in at least one grid received by the capacitive sensor exceeds the capacitance threshold, it may be determined that a touch operation has occurred; further, the terminal device may determine the touch area corresponding to the touch operation based on the area occupied by at least one grid exceeding the capacitance threshold.
[0098] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
[0099] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.
[0100] For example, Figure 3 A software structure diagram of a terminal device provided in an embodiment of the present application. Figure 3 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom, including the application (APP) layer, the application framework (framework) layer, the hardware abstraction layer (HAL), and the kernel layer (kernel), etc., which is not limited in the embodiments of the present application.
[0101] The application layer may include a series of application packages. The application layer may include one or more of the following: setting applications, group purchase applications, health monitoring applications or Bluetooth, etc. The above applications may be system applications or third-party applications, which are not limited in the embodiments of the present application.
[0102] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined interfaces. The application framework layer may include one or more of the following modules: a revocation detection module, a revocation record module, a revocation implementation module, or a display synthesis system (surface flinger).
[0103] The revocation detection module is used to detect whether the user operation is a revocation operation. For example, the revocation detection module can determine whether the revocation operation is satisfied based on the operation information transmitted by the application layer, or the revocation detection module can also monitor the user operation and detect whether the monitored operation information satisfies the revocation operation. The operation information may include: operation time, type of operation calling interface, parameters transmitted by the operation calling interface, and other information.
[0104] The undo record module is used to record the historical target data corresponding to the undo operation, and the historical target data can be stored in the device in a stack-like manner. A stack-like manner can be understood as a data storage method that can insert data from the tail end and delete data at any position in the stack.
[0105] The undo implementation module is used to obtain the required historical target data from the undo record module and implement the undo operation using the historical target data.
[0106] The display composition system is used to implement layer drawing and composition of at least two layers, and sends the image generated after layer composition to a hardware composition processor (HWC).
[0107] In some embodiments, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, etc. ( Figure 3 not shown).
[0108] Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0109] The purpose of the hardware abstraction layer is to abstract the hardware, and to provide a unified interface for querying hardware devices for upper-layer applications, or to provide data storage services for upper-layer applications. The hardware abstraction layer may include modules such as the hardware composer (HWC).
[0110] The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware to make it work. The kernel layer may include one or more of the following: display driver, camera driver, audio driver, sensor driver.
[0111] In the embodiments of the present application, no specific limitation is imposed on the software layers involved in the software architecture, the modules contained in the layers, and the functions of the modules.
[0112] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0113] The embodiment of the present application provides a cancellation method, so that the terminal device can enable the cancellation function by triggering the control, and cancel a certain operation through the window in the interface based on the activation of the cancellation function (see Figure 4 The corresponding embodiments and Figure 6 The terminal device can also cancel the last operation through gesture operation (see Figure 7 corresponding embodiments).
[0114] In terminal equipment based Figure 1 In the interface shown in a of FIG. 1 , when the automatic brightness adjustment switch is turned off (or referred to as target operation 4001), the automatic display mode switching switch is turned off (or referred to as target operation 4002), and the brightness is changed from 60 to 30 (or referred to as target operation 4003), the terminal device can be based on the following Figure 4 or Figure 6 or Figure 7 The corresponding embodiment implements the undoing of the operation.
[0115] For example, Figure 4 A schematic diagram of an interface for an undo operation provided in an embodiment of the present application.
[0116] When the terminal device receives the user's operation to open the control center, the terminal device displays the following Figure 4 The interface shown in a in the figure may be a control center interface, which may include multiple function controls, for example, the interface may include: a control 401 for turning on or off the undo function, and other setting controls for the terminal device. The user's operation of opening the control center may be an operation of the user sliding down along the upper right corner of the display screen, etc.
[0117] It is understandable that the switch for the undo function (i.e., control 401) is set in the control center. It can be seen that the undo function is not a function for a certain application, but a function for most applications negotiated in the device. The undo function can realize the undo of operations at the system level.
[0118] In the case where the undo function is turned off, when the terminal device receives a trigger operation from the user on the control 401, the terminal device can display the interface corresponding to the last target operation (such as the target operation 4003), such as displaying Figure 4 The interface shown in b in FIG. 4 may include a window 402. The window 402 includes one or more of the following, for example: a control 404 for displaying the last target operation, a control 405 for displaying the next target operation, or a confirmation rollback control 406, a control for displaying the last target operation, or the last record corresponding to the target operation, etc.
[0119] Figure 4 The interface shown in b is the interface corresponding to the target operation 4003. The window 402 can display that the current record corresponding to the target operation 4003 is 30, and the last record corresponding to the target operation 4003 is 60. It can be understood that the target operation 4003 is an operation to change the brightness from 60 to 30.
[0120] Among the possible implementations, Figure 4 The interface shown in b in FIG. 4 may also include an indicator frame 407, which is used to indicate the location where the target operation 4003 is applied, so that the user can clearly see the content of the operation change. In a possible implementation, the terminal device may also display text information with the words "Changed Location" around the indicator frame 407; or the terminal device may not display the indicator frame 407, in which case the terminal device may flash and display the location where the target operation 4003 is applied, which is limited in the embodiments of the present application.
[0121] When the terminal device receives the user's Figure 4 When the control 406 in the interface shown in b is triggered, the terminal device may display the following Figure 4 The interface shown in d in the figure is used to implement the rollback of an operation. It is understandable that after implementing the rollback of an operation, the terminal device can display the interface corresponding to the previous operation of the current operation.
[0122] Figure 4 The interface shown in d may be the interface corresponding to the target operation 4002. The window 402 may display that the current record corresponding to the target operation 4002 is off, and the last record corresponding to the target operation 4002 is on. It may be understood that the target operation 4002 is an operation to change the display mode automatic switching switch from on to off.
[0123] Among the possible implementations, Figure 4 The interface shown in d in FIG. 4 may also display an indication box 408, and the indication box 408 may also be replaced by a flashing display mode automatic switching switch, which is not specifically limited in the embodiment of the present application.
[0124] In a possible implementation, when the terminal device receives a user's Figure 4 When the control 405 in the interface shown in d is triggered, the terminal device may display the following Figure 4 The interface shown in c.
[0125] Figure 4 The interface shown in c in the figure may be an interface corresponding to the undo operation of the target operation 4003 (or referred to as the target operation 4003'). The window 402 may display that the current record corresponding to the target operation 4003' is 60, and the last record corresponding to the target operation 4003' is 30. It can be understood that the target operation 4003' is an operation to restore the brightness from 30 to 60. Figure 4 When the control 404 in the interface shown in d is triggered, the terminal device can display the interface corresponding to the last target operation of the target operation 4002, such as displaying Figure 4 The interface shown in e.
[0126] Figure 4 The interface shown in e in may be the interface corresponding to the target operation 4001, and the window 402 may display that the current record corresponding to the target operation 4001 is off, and the last record corresponding to the target operation 4001 is on. It can be understood that the target operation 4001 is an operation to change the automatic brightness adjustment switch from on to off.
[0127] Among the possible implementations, Figure 4 The interface shown in e in FIG. 4 may also display an indication box 409, and the indication box 409 may also be replaced by a flashing display mode automatic switching switch, which is not specifically limited in the embodiment of the present application.
[0128] Display on terminal device Figure 4 In the case of the interface shown in b (or c or d or e), when the terminal device receives a command from the user to close the control 401 from the control center, the terminal device will cancel the display window 402 and exit the undo function.
[0129] Based on this, the terminal device can preview the corresponding data of any target operation based on controls 404 and 405, for example, viewing the current record of the target data and the last record of the target data in window 402, and the terminal device can also withdraw the corresponding data of any target operation based on control 406, thereby improving the flexibility of the withdrawal process.
[0130] In a possible implementation, based on the embodiment corresponding to Figure 4, when the terminal device changes the brightness from 60 to 30 (or referred to as target operation 4003) in the setting application, after receiving the user turning on the personalized content recommendation switch in the group purchase application (or referred to as target operation 6001), the terminal device can be based on the following Figure 6 The corresponding embodiment implements the undoing of the operation.
[0131] Among them, target operation 4003 is in the setting application, and target operation 6001 is in the group purchase application. The specific application for executing the target operation is not limited in this application. The process of users turning on the personalized content recommendation switch in the group purchase application can be seen in Figure 5 The corresponding embodiments.
[0132] For example, Figure 5 A schematic diagram of an interface for turning on a personalized content recommendation switch provided in an embodiment of the present application.
[0133] Figure 5 The interface shown in a in the figure may be an interface in group purchase application->settings->privacy management, which may include a switch 501 for receiving personalized content recommendations, and the switch 501 is in a closed state. Figure 5 When the switch 501 shown in a in FIG. 1 is triggered, the terminal device turns on the switch 501 and displays the following Figure 5 The interface shown in b.
[0134] For example, Figure 6 A schematic diagram of an interface for another undo operation provided in an embodiment of the present application.
[0135] The terminal device displays Figure 6 The interface shown in a in the figure can be Figure 4 The interface is similar to that shown in a, and will not be repeated here.
[0136] When the undo function is turned off, when the terminal device receives a trigger operation of the user on the control 601, the terminal device can display the interface corresponding to the last target operation (such as the target operation 6001), such as displaying Figure 6 The interface shown in b in FIG. 6 may include a window 602. The window 602 includes one or more of the following, for example: a control 604 for displaying the last target operation, a control 605 for displaying the next target operation, or a confirmation rollback control 606.
[0137] Among the possible implementations, Figure 6The interface shown in b in FIG. 1 may also include: an indicator box 607, and the indicator box 607 may also be replaced by a flashing display mode automatic switching switch, which is not specifically limited in the embodiment of the present application.
[0138] When the terminal device receives the user's Figure 6 When the control 606 in the interface shown in b is triggered, the terminal device may display the following Figure 6 The interface shown in c in the figure implements the rollback of an operation, for example, canceling the target operation 6001, so that Figure 6 The interface shown in c in FIG. 6 shows the previous target operation of target operation 6001 , such as target operation 4003 .
[0139] It is understandable that the terminal device can receive the user's Figure 6 After the trigger operation of the control 606 in the interface shown in b, the data of the target operation 6001 is deleted, and the undo data of the target operation 6001 is stored in the historical target data, so that the user can preview the undo operation of the target operation 6001 in the interface later.
[0140] In the case where the terminal device does not cancel the target operation 6001, when the terminal device receives the user's Figure 6 When the control 604 in the interface shown in b is triggered, the terminal device can display the previous target operation of the target operation 6001, such as the target operation 4003, so that the user can preview the target operation and find the application that needs to be revoked.
[0141] Further, the terminal device cancels the target operation 6001 and displays Figure 6 Based on the interface shown in c in FIG. , when the terminal device receives the user's Figure 6 When the control 6005 shown in c in the figure is triggered, the terminal device can display Figure 6 The interface shown in d.
[0142] Figure 6 The interface shown in d in the figure may be the interface where the undo operation of the target operation 6001 is located, and the content in the window 602 of the interface may indicate that the undo operation of the target operation 6001 is to turn off the personalized content recommendation switch.
[0143] Based on this, the method for undoing an operation provided in the embodiment of the present application can realize the undoing of operations in different applications, so that the undo function is not limited to a specific application, and enriches the use scenarios of the undo operation. In addition, a window 602 for viewing operation information can be provided in the interface to facilitate the user to confirm whether to undo the operation, thereby improving the accuracy of the undo operation.
[0144] For example, Figure 7A schematic diagram of another interface for undo operations provided in an embodiment of the present application.
[0145] The terminal device displays Figure 7 The interface shown in a in the figure can be Figure 4 The interface shown in a is similar and will not be described here.
[0146] When the undo function is turned off, when the terminal device receives a trigger operation from the user on the control 701, the terminal device can display the interface corresponding to the last target operation (such as target operation 4003), such as displaying Figure 7 The interface shown in b in FIG. 7 may include a window 702. The window 702 includes one or more of the following, for example: a control 704 for displaying the last target operation, a control 705 for displaying the next target operation, or a confirmation rollback control 706.
[0147] When the terminal device receives the user's Figure 7 When the control 706 in the interface shown in b is triggered, the terminal device may display the following Figure 7 The interface shown in d in the figure is used to implement the rollback of an operation, for example, to cancel the target operation 4003. After canceling the target operation 4003, the terminal device can display the interface where the previous target operation of the target operation 4003 is located, such as displaying Figure 7 The interface corresponding to the target operation 4002 shown in d in FIG.
[0148] In the case where the terminal device does not cancel the target operation 4003, when the terminal device receives the user's Figure 7 When the trigger operation of the control 704 in the interface shown in b is executed, the terminal device can display the interface corresponding to the last target operation of the target operation 4003, such as displaying Figure 7 The interface corresponding to the target operation 4002 shown in d in FIG.
[0149] When the terminal device receives the user's Figure 7 When the control 704 in the interface shown in d is triggered, the terminal device can display the interface corresponding to the last target operation of the target operation 4002, such as displaying Figure 7 The interface corresponding to the target operation 4001 shown in e.
[0150] Display on terminal device Figure 7 In the case of the interface shown in b (or c or d or e), when the terminal device receives a message from the user closing the control 701 in the control center, the terminal device will cancel the display window 702 and exit the undo function.
[0151] Compared to Figure 4 The corresponding embodiment, Figure 7The corresponding embodiment can also realize the cancellation of any target operation, and Figure 7 The operation window described in is more concise, but the record of the target operation cannot be viewed in the operation window.
[0152] Understandably, Figure 7 The method for canceling an operation described in the corresponding embodiment can also realize the cancellation of operations in different applications, and the specific cancellation method will not be repeated here. Figure 7 An indication box may also be displayed in any of the interfaces shown to prompt the modification items of the operation.
[0153] For example, Figure 8 A schematic diagram of an interface for another undo operation provided in an embodiment of the present application.
[0154] The terminal device displays Figure 8 In the interface shown in a of FIG. 1 , when the terminal device receives a gesture operation for returning to the last target operation, the terminal device displays the following Figure 8 The interface shown in b in the figure. The gesture operation for returning to the last target operation may include one or more of the following: a multiple click operation, a V-shaped gesture operation on the display screen, or other operations, which are not limited in the embodiments of the present application.
[0155] In response to a gesture operation on the terminal device, the terminal device can implement a rollback of the operation. Figure 8 A gesture operation on the interface shown in a in the figure can display Figure 8 The target operation 4003' shown in b in the interface corresponding to the target operation 4003'; in response to the user's Figure 8 A gesture operation on the interface shown in b (or Figure 8 The terminal device can display Figure 8 The interface corresponding to the target operation 4002' shown in c in FIG. 4 is a cancellation operation of the target operation 4002, and the target operation 4002' is an operation of changing the display mode automatic switching switch from off to on.
[0156] In a possible implementation, in response to a gesture operation on a terminal device, the terminal device may display a prompt message in the interface while implementing the rollback of the operation. The prompt message is used to prompt the cancellation of the operation. For example, the prompt message may display that you have successfully canceled an operation.
[0157] Based on this, the terminal device can realize sequential undoing of operations based on the user's gesture operations, thereby improving the flexibility of the undo function.
[0158] Understandably, Figure 8 The method for canceling an operation described in the corresponding embodiment can also realize the cancellation of operations in different applications, and the specific cancellation method will not be repeated here. Figure 8 An indication box may also be displayed in any of the interfaces shown to prompt the modification items of the operation.
[0159] exist Figure 6 On the basis of the corresponding embodiment, in a possible implementation manner, the terminal device provides a method for undoing operations, so that the terminal device can realize the withdrawal of any target data based on the stored historical target data.
[0160] For example, Fig. 9 A schematic diagram of a method for canceling an operation provided in an embodiment of the present application. Fig. 9 As shown, the method for canceling an operation may include the following steps:
[0161] S901. The terminal device receives a first target operation.
[0162] The first target operation may be any operation on the terminal device.
[0163] S902: In response to the first target operation, when the terminal device determines that the first target operation satisfies a preset operation, the data of the first target operation is stored in a class stack corresponding to the historical target data.
[0164] The preset operation may be determined by the terminal device based on the first interface type of the interface called by the first target operation. The interface called by the first target operation is the interface used by the system of the terminal device to implement the first target operation.
[0165] For example, when the first interface type satisfies the preset interface type, the terminal device may determine that the first target operation is a preset operation; or, when the first interface type does not satisfy the preset interface type, the terminal device may determine that the first target operation is not a preset operation. The preset interface type may be a type for changing parameters, for example, the type for changing parameters may include one or more of the following: putInt type, putstring type, etc. The preset interface type may also include other types, which are not specifically limited in the embodiments of the present application.
[0166] When the first target operation is an operation for adjusting the screen display brightness, the interface called by the first target operation may be: Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, birghtessValue), wherein Settings.System.SCREEN_BRIGHTNESS indicates that the change item is the screen brightness, and birghtessValue may be the parameter value changed in response to the first target operation.
[0167] Since the first interface type is a type for changing parameters, such as putInt type, which satisfies the preset interface type, the terminal device can store the data of the first target operation in the class stack corresponding to the historical target data. It is understandable that the type for changing parameters can include the changed parameter value, and the number of the changed parameter values is at least 1. For example, Settings.System.putInt contains the changed parameter value birghtessValue.
[0168] Normally, the interface type of a device may also include: a type for obtaining parameters, a type for querying parameters, and other interface types. For example, the type for obtaining parameters may include: getInt type, and getstring type, etc. In the embodiment of the present application, the operation data corresponding to the type for obtaining parameters (or the type for querying parameters) will not be stored. Therefore, the embodiment of the present application may also store the data of the first target operation when it is determined that the first interface type does not meet other interface types such as the type for obtaining parameters, the type for querying parameters, etc.; or, when it is determined that the first interface type meets the preset interface type, and does not meet other interface types such as the type for obtaining parameters, the type for querying parameters, etc., the data of the first target operation is stored. The embodiment of the present application does not limit the specific method of the screening operation.
[0169] In this way, the terminal device can store the user's operations that may trigger parameter changes through operation filtering, while achieving targeted revocation and reducing the problem of large memory usage caused by storing all user operations.
[0170] The data of the first target operation may include one or more of the following: the name of the first target operation, the change location corresponding to the first target operation, the change item corresponding to the first target operation, or the change content of the first target operation, etc., which is not limited in the embodiments of the present application.
[0171] Among them, the name of the first target operation can be composed of the time of the first target operation and the application in which the first target operation is located, or can also be composed of the content executed by the first target operation, etc.; the change position corresponding to the first target operation can be understood as the path name of the interface in which the first target operation is located, or the interface name of the interface in which the first target operation is located; the change item corresponding to the first target operation can be understood as the object of the first target operation; the change content of the first target operation may include: the content before the change of the first target operation, the content after the change of the first target operation, and the time of the first target operation. The specific content of any of the above data is not limited in the embodiment of the present application.
[0172] For example, for Figure 1 In a corresponding embodiment, when the first target operation is to adjust the display brightness to 30, the name of the first target operation can be an operation to set the application at 8:00, or it can be an operation to change the brightness value; the change location of the first target operation can be the path name of the display and brightness interface; the change item of the first target operation can be a progress bar for adjusting the screen brightness; the change items of the first target operation can include: the content before change is 30, and the content after change is 60, and the operation time is 8:00.
[0173] A stack-like structure can be a structure for storing data. The stack-like structure can insert the latest data from the tail end (the tail end can also be understood as the top of the stack), ensure that all operation records are strictly sorted in chronological order, and delete data from any storage location in the stack-like structure. Among them, the stack-like structure can also have other naming methods, which are not limited in the embodiments of the present application. It can be understood that the recording method of the stack-like structure can keep the record order unchanged while making the undo operation more flexible, greatly improving the convenience of user operation.
[0174] In a possible implementation, the terminal device can judge each operation detected and implement storage of the preset operation. When the first target operation does not meet the preset operation, the terminal device will not store the data of the first target operation in the class stack corresponding to the historical target operation. It is understandable that the content of any operation data in the class stack is similar to the content in the data of the first target operation, and will not be repeated here.
[0175] Before S903, the terminal device can determine whether any operation is a preset operation based on S901-S902, and store the data of target operation 1, target operation 2, target operation 3, target operation 4 and target operation 5 in the class stack in order from the earliest to the latest time, see Fig.10 The data recorded at the first moment in .
[0176] S903: The terminal device receives a second target operation.
[0177] The second target operation is an operation of selecting any target operation.
[0178] exist Figure 6 In the corresponding embodiment, the second target operation can be a trigger operation for control 601, so that the terminal device selects target operation 6001 (at this time, target operation 6001 has not been revoked); or, the second target operation can be a trigger operation for control 604 or control 605, so that the terminal device selects any target operation.
[0179] S904. In response to the second target operation, the terminal device obtains data of the second target operation and displays a change interface corresponding to the second target operation.
[0180] The change interface corresponding to the second target operation can be Figure 6 In the interface shown in b (or d, or e), the window 602 of the interface can display the current record (or the changed value) of any target operation of the historical operations and the last record (or the changed value) of any target operation.
[0181] Exemplarily, when the second target operation is a trigger operation for control 601, the terminal device can query the latest recorded data from the historical target data, that is, the data of the first target operation, and display the following information based on the changes recorded in the data of the first target operation: Figure 6 Alternatively, when the second target operation is a trigger operation for control 604 or control 605, the terminal device can query the corresponding data from the historical target data and call the corresponding data display Figure 6 The interface shown in c or e.
[0182] In this way, the terminal device can display the change interface corresponding to the target operation once when receiving a second target operation, that is, the terminal device provides a capability to browse historical operations, so that the user can determine which step to change by previewing the changes in historical operations, thereby improving the accuracy of undo operations.
[0183] In a possible implementation, in response to the second target operation, the terminal device can determine whether an interface can be called from the target application where the target operation is located when previewing a certain target operation to achieve the withdrawal of the target operation. For example, the terminal device obtains an interface for withdrawing the target operation, and accesses whether the interface for withdrawing the target operation is included in the list of interfaces that the target application allows the terminal device to use. If it is included, the terminal device can highlight the control 606 in the window 602, which is understood as the target application allowing the terminal device to roll back part of the content in its application. If it is not included, the terminal device grays out the control 606 in the window 602, which is understood as the target application not allowing the terminal device to roll back part of the content in its application. The user can manually modify the interface where the window 602 is located based on the changed content in the window 602 to achieve the withdrawal function. Among them, the interface list can be stored when the target application is installed to the terminal device.
[0184] For example, Fig.10 A schematic diagram of an interface without excuse access rights provided in an embodiment of the present application, Fig.10 The interface shown in a in the figure can be the interface in group buying application->settings->privacy management. Fig.10 The interface shown in b may be the interface for health monitoring application->sleep quality detection->manual input of sleep time.
[0185] like Fig.10 The interface shown in a in the figure may include: receiving personalized content recommendation switch 1001. The first target operation may be to turn on switch 1001. Since the group purchase application cannot provide an interface for turning off switch 1001, control 1003 in window 1002 is grayed out. In this scenario, the user needs to manually turn off switch 1001 according to the change items displayed in window 1002 (and the indicator box around switch 1001) to cancel the first target operation.
[0186] like Fig.10 The interface shown in b in the figure may include: a text box 1004 for setting the bedtime, which may display yesterday's 23:00. The first target operation may be to change the bedtime from yesterday's 23:45 to 23:00. Since the health monitoring application cannot provide an interface for modifying the upload time, the control 1006 in the window 1005 is grayed out. In this scenario, the user may need the change item displayed in the window 1005 (and the indicator box around the text box 1004) to manually change the bedtime from 23:00 to 23:45 to achieve the withdrawal of the first target operation.
[0187] S905. The terminal device receives the third target operation.
[0188] The third target operation may be an operation of canceling any target operation. For example, the third target operation may be a trigger operation for the control 406 .
[0189] S906: In response to the third target operation, the terminal device cancels the first target operation.
[0190] Exemplarily, in response to the third target operation, the terminal device may delete the data of the first target operation in the class stack after revoking the first target data, and store the revoked data of the first target operation. The revoked data of the first target operation may be stored at the end of the class stack.
[0191] Furthermore, the terminal device displays the interface corresponding to the cancellation of the first target operation. When there is a fourth target operation before the first target operation is recorded in the class stack, the interface corresponding to the cancellation of the first target operation can be the interface where the fourth target operation is located; or, when there is no target operation before the first target operation is recorded in the class stack, and the first target operation can display the interface where the cancellation operation of the first target operation is located.
[0192] For example, Fig.11 A schematic diagram of storing historical target data provided in an embodiment of the present application.
[0193] like Fig.11 As shown, the terminal device can store the data of target operation 1, target operation 2, target operation 3, target operation 4 and target operation 5 in order from far to near at the first moment. Among them, target operation 5 can be Fig. 9 The first target operation described in .
[0194] At a second moment after the first moment, when the user previews target operation 5 in the interface and withdraws target operation 5, the historical operation data may include: data of target operation 1, data of target operation 2, data of target operation 3, data of target operation 4, and data of target operation 5', and target operation 5' may be a withdrawal operation of target operation 5.
[0195] At the third moment after the second moment, when the user previews target operation 4 in the interface and withdraws target operation 4, the historical operation data may include: data of target operation 1, data of target operation 2, data of target operation 3, data of target operation 5', and data of target operation 4', and target operation 4' can be a withdrawal operation of target operation 4.
[0196] It is understandable that the terminal device can roll back any operation in the historical target data and modify the record in the historical target data, and the process of the terminal device withdrawing an operation in any application can be referred to in Fig. 9The corresponding embodiments will not be described in detail here.
[0197] Based on this, the terminal device can preview any target operation in any application, so that the user can determine whether to cancel the target operation based on the changes displayed in the window, thereby improving the accuracy of the undo operation and the user's experience of using the undo function.
[0198] Understandably, Fig. 9 The method for canceling an operation described in the corresponding embodiment can be applied not only to Figure 6 In the corresponding embodiment, it can also be applied to Figure 4 (or Figure 7 ,or Figure 8 ) The corresponding embodiments will not be repeated here.
[0199] It can be understood that the data for the operation described in S902 has the following characteristics:
[0200] 1. "Change location" can be a required record item, while "Change item" and "Change content" can be optional items.
[0201] 2. "Changed items" and "Changed contents" determine the rollback progress of the operation.
[0202] 3. In a record, if "Change location", "Change item" and "Change content" are not empty, the following situations may occur depending on the nature of the operation (whether there is direct withdrawal permission):
[0203] 3.1. The data of this target operation can be rolled back. When rolling back: the device page jumps to the last change interface, showing the specific location of the last change and the value before the last change. The user can click the Undo button to change the current operation.
[0204] 3.2. The data of this target operation cannot be rolled back but has a recorded value. When rolling back: the device page jumps to the last change interface, showing the specific location of the last change and the value before the last change, but the current operation cannot be changed directly, and the user needs to manually change it according to the provided value.
[0205] 4. In a record, if "Change Location" and "Change Item" are not empty, and "Change Content" is empty, the data of this target operation cannot be rolled back and there is no record value. When rolling back, the device page jumps to the last change interface, showing the specific location of the last change, and the user decides the subsequent operation.
[0206] exist Fig. 9 On the basis of the corresponding embodiment, when the terminal device detects that the withdrawn operation is associated with other operations, it can prompt the user to confirm whether to continue to withdraw the operation.
[0207] In this scenario, S906 may be: in response to the third target operation, when the terminal device determines that the first target operation has other associated operations, the terminal device may prompt the user whether to continue to cancel the first target operation; or, when the terminal device determines that the first target operation has no other associated operations, the terminal device may cancel the first target operation.
[0208] Exemplarily, the terminal device may determine other operations associated with the first target operation by adding a first parent node identifier to the data of the target operation, or by adding a second parent node identifier and child node information corresponding to the second parent node identifier.
[0209] In one implementation, the data of the target operation may include: a first parent node identifier, where the first parent node identifier is used to identify the parent node information of which the target operation is a child node.
[0210] For example, when generating data of a target operation, the terminal device may determine that the first parent node identifier of target operation 10 is the first target operation, and the first parent node identifier of target operation 20 is the first target operation. Before the terminal device subsequently cancels the first target operation, it may search for other operations whose first parent node is the first target operation from the historical target data, that is, search for other operations whose first parent node is the first target operation. For example, the terminal device may find target operation 10 and target operation 20. Further, the terminal device may initiate a prompt to prompt the user whether to continue to cancel the first target operation, as canceling the first target operation will delete the data of target operation 10 and the data of target operation 20.
[0211] In another implementation, the data of the first target operation may also include: a second parent node identifier, and child node information corresponding to the second parent node identifier, the second parent node identifier is used to indicate that the first target operation is the parent node of other operations, and the child node information may include: the node names of other child nodes with the first target operation as the parent node.
[0212] For example, when generating the data of the target operation, the terminal device can determine that the first target operation is the parent node of the target operation 30, and the terminal device can add the second parent node identifier and the child node information corresponding to the second parent node identifier (such as the target operation 30) to the data of the first target operation. Subsequently, before the terminal device cancels the first target operation, the data of the first target operation can be searched from the historical target data, that is, the second parent node identifier and the child node information corresponding to the second parent node identifier (such as the target operation 30) are found. Furthermore, the terminal device can initiate a prompt to prompt the user that canceling the first target operation will delete the data of the target operation 30, and whether to continue to cancel the first target operation.
[0213] It can be understood that the method of implementing the revocation operation through the first parent node identifier or the second parent node identifier applies the tree traversal in the data structure, that is, the terminal device can implement the parent node to start searching for the child nodes corresponding to the parent node in sequence.
[0214] For example, Fig.12 A schematic diagram of another method for storing historical target data provided in an embodiment of the present application.
[0215] like Fig.12 As shown, the terminal device can store multiple data such as AZ in the historical target data. For example, the terminal device stores the following data in order from far to near in time: the operation data of copying copy B, the operation data of adding XX1 in copy B, and the operation data of deleting XX2 in copy B.
[0216] When the operation data of XX1 is added in the terminal device storage copy B, it can be determined that the operation object of the operation is copy B, and then the first parent node identifier is added, and the first parent node identifier is used to identify that the parent node of the operation is the operation of the replica B. When the terminal device deletes the operation data of XX2 in the replica B, it can be determined that the operation object of the operation is copy B, and then the first parent node identifier is added, and the first parent node identifier is used to identify that the parent node of the operation is the operation of the replica B.
[0217] When the terminal device cancels the operation of replica B, the terminal device can determine the other child nodes of the operation of replica B identified by the first parent node, namely, the operation of adding XX1 in replica B and the operation of deleting XX2 in replica B.
[0218] It can be understood that when the operation of revoking the replica B is withdrawn, the operation of adding XX1 in replica B and the operation of deleting XX2 in replica B will be affected. At this time, the terminal device can pop up a window to notify the user to confirm whether to continue to withdraw the operation of replica B (see Fig.13 Corresponding embodiment), if the user confirms, the operation data of adding XX1 in copy B and the operation data of deleting XX2 in copy B are deleted from the historical target data. At this time, the historical target data may be the data at the fifth moment.
[0219] Furthermore, when the terminal restores the operation of undoing the copy B at the sixth moment, since the operation data of adding XX1 in copy B and the operation data of deleting XX2 in copy B have been deleted in the historical target data, it is impossible to follow the parent node to achieve recovery.
[0220] For example, Fig.13 A schematic diagram of an interface for prompting a user provided in an embodiment of the present application.
[0221] The terminal device can display the following when the user previews an undo operation: Fig.13 In the interface shown in a of FIG. 1 , when the terminal device receives a trigger operation of the user on the control 1301, the terminal device may display the following Fig.13 The interface shown in b.
[0222] like Fig.13 The interface shown in b in the figure may include: window 1302, which may include: prompt information, confirmation controls, controls for viewing operation details, and cancel controls, etc. The prompt information is used to prompt other operations that will be affected when the current operation is withdrawn, such as operation xx1 and operation xx2. The operation xx1 can also be displayed as an operation of adding XX1 in copy B, and the operation xx2 can also be displayed as an operation of deleting XX2 in copy B.
[0223] When the terminal device receives a trigger operation on the confirmation control by the user, the terminal device may cancel the operation on the replica B and delete other child node data with the replica B as the parent node from the historical target data.
[0224] When the terminal device receives a trigger operation from the user for canceling the control, the terminal device may cancel or undo the operation of copying copy B.
[0225] When the terminal device receives a trigger operation from the user for a control for viewing operation details, the terminal device may display the following information: Fig.13 The interface shown in c in the figure can display the content of historical target data. Fig.13 In the interface shown in c, the historical target data may include: operation data of operation xx1 and operation data of operation xx2 and other data. The contents that can be displayed in the operation data can refer to the description of S902, which will not be repeated here.
[0226] Among the possible implementations, Fig.13 The words "operation xx1" and "operation xx2" in the interface shown in b in FIG. 1 can also support triggering. That is, when the terminal device receives the user's trigger operation for the words where operation xx1 is located, the terminal device can Fig.13 The operation data of operation xx1 is displayed in the interface shown in c in the figure, or when the terminal device receives the user's trigger operation for the text where operation xx2 is located, the terminal device can Fig.13 The interface shown in c displays the operation data of operation xx2, which is not limited in the embodiment of the present application.
[0227] exist Fig. 9Based on the corresponding embodiment, the terminal device may include: a target application, a revocation detection module, a revocation recording module, and a revocation implementation module. In order to implement the revocation operation method, the module interaction process in the terminal device can refer to Fig.14 The corresponding embodiments.
[0228] For example, Fig.14 A schematic diagram of module interaction of a method for canceling an operation provided in an embodiment of the present application. Fig.14 As shown, the method for canceling an operation may include the following steps:
[0229] S1401. When a target application detects a first target operation, cancel the data of the first target operation acquired in the target application in the detection module.
[0230] The specific content of the data of the first target operation can be found in the description of S901 and will not be repeated here.
[0231] S1402: The cancellation detection module determines whether the first target operation satisfies a preset operation.
[0232] When the revocation detection module determines that the first target operation satisfies the preset operation, the terminal device executes the step shown in S1403; alternatively, when the revocation detection module determines that the first target operation does not satisfy the preset operation, the terminal device may ignore the first target operation.
[0233] S1403: When the revocation detection module determines that the first target operation satisfies a preset operation, the revocation recording module obtains data of the first target operation from the revocation detection module and stores the data of the first target operation.
[0234] S1404: When the target application detects the second target operation, the revocation implementation module obtains a message for obtaining the latest data in the historical target data from the target application.
[0235] In S1404, the second target operation may be for Figure 6 The trigger operation of the control 601 shown in a in FIG.
[0236] S1405. The undo record module obtains the data of the first target operation, and calls an interface to display the changed content in the data of the first target operation.
[0237] S1406: The undo implementation module obtains data of the first target operation from the undo record.
[0238] It is understandable that after S1404 - S1406 , the terminal device can query other required target operations from the historical target data based on the user's multiple operations on controls 605 and 606 , and display the changes corresponding to the target operations in window 602 .
[0239] S1407: When the target application detects the third target operation, the cancel implementation module obtains a message for canceling the operation from the target application.
[0240] S1408. The undo implementation module undoes the first target operation, generates undo data of the first target operation, and calls an interface to display the changed content in the undo data of the first target operation.
[0241] In the case where the first target operation is an adjustment operation for screen display brightness, after S1408, the cancellation implementation module may call the uiautomator2.0 interface or the like to implement the adjustment of the screen display brightness.
[0242] S1409: The undo record module obtains the undo data of the first target operation from the undo implementation module.
[0243] S1410: The undo record module deletes the data of the first target operation and stores the undo data of the first target operation.
[0244] Specifically, the undo record module deletes the data of the first target operation from the class stack according to the identifier, and stores the undo data of the first target operation as a new record at the end of the class stack in chronological order. At this time, the undo data of the first target operation can be the latest operation data in the class stack.
[0245] In a possible implementation, upon receiving the revocation data of the first target operation sent by the revocation record module, the revocation record module may delete the data of the first target operation by default and store the revocation data of the first target operation. Alternatively, upon generating the revocation data of the first target operation, the revocation implementation module may send two messages to the revocation record module, including: a message for deleting the data of the first target operation and a message for storing the revocation data of the first target operation, so that the revocation implementation module deletes the data of the first target operation and stores the revocation data of the first target operation. This is not limited in the embodiments of the present application.
[0246] It is understandable that the process of the terminal device canceling any application can be found in Fig.14 The corresponding embodiments will not be described in detail here.
[0247] Based on this, the terminal device can implement a preview of any target operation, so that the user can determine whether to cancel the target operation in combination with the change items displayed in the window, thereby improving the accuracy of the undo operation.
[0248] In the above embodiment Figure 7-Figure 14Based on the corresponding embodiments, it can be understood that the historical target data is stored in the mobile phone flash memory in chronological order, which has the following advantages: 1. It does not occupy the mobile phone's RAM and has low consumption on mobile phone performance; 2. The operation records will not be cleared when the mobile phone is restarted; 3. The flash memory has a large space and can store more operation records.
[0249] For operation data containing large files, such as when a user uninstalls an app or deletes a large memory file, the file needs to be uploaded to the cloud disk, and then the corresponding address and other information are stored in the mobile phone flash memory list to ensure that the space occupied by each item in the operation record list is as small as possible.
[0250] The length of the operation list stored in the mobile phone flash memory is n, and the maximum storage time is m days. When the length of the stored operation list exceeds the maximum limit, or the storage time of an operation exceeds the maximum number of days, the operation record at the front of the list (the first one generated and the oldest) is transferred to the cloud disk. This ensures that the storage function of the mobile phone will not be affected by storing too many historical operation records in the mobile phone flash memory.
[0251] In the above Figure 4-Figure 14 Based on the corresponding embodiments, Fig.15 A flowchart of another method for canceling an operation provided in an embodiment of the present application. Fig.15 As shown, the method for canceling an operation may include the following steps:
[0252] S1501. The terminal device displays a first interface, which includes a first value.
[0253] The first interface can be Figure 1 In the interface shown by a in , the first value is 60.
[0254] S1502: In response to a first operation on a first interface, the terminal device displays a second interface.
[0255] The second interface includes a second value, which is a value obtained after the terminal device modifies the first value in response to the first operation, and the first interface and the second interface are both interfaces in the first application.
[0256] The first operation is to adjust the screen display brightness, and the second interface is Figure 1 In the interface shown in b, the second value is 30, and the first application is the settings application.
[0257] S1503. The terminal device displays a third interface, which includes a third value.
[0258] The third interface can be Figure 5 In the interface shown in a, the third value can be to turn off the switch for receiving personalized content recommendations.
[0259] S1504. In response to the second operation on the third interface, the terminal device displays a fourth interface.
[0260] Among them, the second operation is after the first operation, and the fourth interface includes a fourth value. The fourth value is the value obtained after the terminal device modifies the third value in response to the second operation. The third interface and the fourth interface are both interfaces in the second application, and the first application is different from the second application.
[0261] The second operation is to turn on the switch for receiving personalized content recommendations. The fourth interface can be Figure 5 In the interface shown in b, the fourth value may be that a switch for receiving personalized content recommendations is turned on, and the second application is a group purchase application.
[0262] S1505. In response to the third operation on the terminal device, the terminal device displays a fifth interface, which includes the first control.
[0263] The third operation is to open the control center, and the fifth interface can be Figure 6 In the interface shown in a, the first control may be control 601.
[0264] S1506. In response to the operation on the first control, the terminal device displays the second control in the fourth interface.
[0265] The second control can be Figure 6 Control 606 in the interface shown in b.
[0266] S1507: In response to the operation on the second control, the terminal device cancels the second operation.
[0267] Based on this, the terminal device can undo any operation of the user on the first application and the user on the second application, so that the undo function is not limited to a certain application that allows undo, enriching the usage scenarios of the undo function and thus improving the user experience of using the undo function.
[0268] In one possible implementation, the second control is displayed in the first window, and the first window also includes one or more of the following: a third value, a fourth value, a third control, or a fourth control, the third control is used to view the previous operation of the second operation, and the fourth control is used to view the next operation of the second operation.
[0269] The first window can be Figure 6 In the window 602 shown in b in FIG. 8 , the third control may be the control 604 in the window 602 , and the fourth control may be the control 605 in the window 602 .
[0270] In one possible implementation, after responding to the second operation on the third interface, the method also includes: the terminal device adds the operation data of the second operation to the first data set to obtain the second data set, the operation data in the first data set are arranged in chronological order, and the operation data of the second operation is the latest data in the second data set; after the terminal device cancels the second operation, the method also includes: the terminal device deletes the operation data of the second operation in the second data set, and adds the operation data of canceling the second operation to obtain the third data set, and the operation data of canceling the second operation is the latest data in the third data set.
[0271] The first data set may be historical target data in the class stack described in the embodiments of the present application.
[0272] In one possible implementation, any operation data in the first data set may include one or more of the following: operation name, path name of the interface where the operation is located, change item corresponding to the operation, operation time, a fifth value, or a sixth value, where the sixth value is the value obtained after the terminal device changes the fifth value in response to the operation.
[0273] In a possible implementation, after the terminal device cancels the second operation, the method further includes: the terminal device displays a fifth control in the second interface; and in response to the operation on the fifth control, the terminal device cancels the first operation.
[0274] The fifth control can be Figure 6 The confirmation fallback control shown in c in .
[0275] In one possible implementation, the fifth control is displayed in the second window, and the second window also includes one or more of the following: the first value, the second value, the sixth control, or the seventh control, the sixth control is used to view the previous operation of the first operation, and the seventh control is used to view the next operation of the first operation.
[0276] The second window can be Figure 6 In the window in the interface shown in c, the sixth control may be the control on the left side of the window, and the seventh control may be the control on the right side of the window, that is, control 605.
[0277] In one possible implementation, after the terminal device cancels the first operation, the method also includes: the terminal device deletes the operation data of the first operation from the third data set, and adds the operation data of canceling the first operation to obtain a fourth data set, and the operation data of canceling the first operation is the latest data in the fourth data set.
[0278] In one possible implementation, the method also includes: in response to an operation on the seventh control, the terminal device displays a third window in the third interface, the third window includes the eighth control, so the third window also includes a third value and / or a fourth value, the third value is a value obtained by modifying the fourth value in response to the operation of restoring and undoing the second operation; in response to the operation on the eighth control, the terminal device restores and undoes the second operation.
[0279] The third window can be Figure 6 In the window 602 shown in d in FIG. 1 , the eighth control may be a confirmation rollback control in the window 602 .
[0280] In one possible implementation, after responding to a first operation on a first interface, the method further includes: when the terminal device determines that the interface type of the first interface satisfies a preset interface type, the terminal device stores the operation data of the first operation in a first data set, the first interface being the interface called by the terminal device when implementing the first operation, and the operation data in the first data set being arranged in chronological order.
[0281] In one possible implementation, the method also includes: the terminal device receives a fourth operation; in response to the fourth operation, when the terminal device determines that the interface type of the second interface does not meet the preset interface type, the terminal device does not store the operation data of the fourth operation in the first data set, and the second interface is the interface called by the terminal device when implementing the fourth operation.
[0282] The fourth operation may be any operation on the terminal device.
[0283] In a possible implementation, the preset interface type may include one or more of the following: putInt type.
[0284] In one possible implementation, the operation data of the first operation includes: a first identifier, the first identifier is used to indicate that the parent node of the first operation is the second operation, and the terminal device cancels the second operation, including: when the terminal device determines that the second operation is the parent node of the first operation based on the first identifier, the terminal device displays a first prompt message and a ninth control, the first prompt message is used to prompt to view the operation data of the first operation, and prompt whether to continue to cancel the second operation; in response to the operation on the ninth control, the terminal device cancels the second operation, and deletes the operation data of the first operation and the operation data of the second operation.
[0285] The first identifier may be the first parent node identifier described in the embodiment of the present application, and the first prompt information may be Fig.13 The ninth control may be a confirmation control in the window 1302, as shown in b in the prompt information in the window 1302.
[0286] In a possible implementation, the terminal device also includes: an undo implementation module and an undo recording module, and the terminal device undoes the second operation, including: the undo implementation module receives a first instruction sent by the second application, and the first instruction is used to undo the second operation; the undo implementation module calls an interface to undo the second operation, and generates operation data for undoing the second operation; the undo recording module obtains the operation data for undoing the second operation from the undo implementation module, deletes the operation data for undoing the second operation, and stores the operation data for undoing the second operation.
[0287] The second application can be Fig.14 For the target application described in, the first instruction may be the instruction described in S1407.
[0288] It should be understood that the interface provided in the embodiment of the present application is merely an example and does not constitute a limitation on the embodiment of the present application.
[0289] Combined with the above Figure 4-Figure 15 , the method provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Fig.16 As shown, Fig.16 A structural schematic diagram of an apparatus for revoking an operation provided in an embodiment of the present application. The apparatus for revoking an operation may be a terminal device in an embodiment of the present application, or a chip or chip system in the terminal device.
[0290] like Fig.16 As shown, the apparatus 1600 for cancelling operation can be used in a communication device, a circuit, a hardware component or a chip, and the apparatus 1600 for cancelling operation includes: a display unit 1601 and a processing unit 1602. The display unit 1601 is used to support the display step of the method for cancelling operation; the processing unit 1602 is used to support the apparatus 1600 for cancelling operation to perform information processing.
[0291] In a possible implementation, the apparatus 1600 for cancelling operation may further include a communication unit 1603, and the communication unit 1603 is used to support the apparatus 1600 for cancelling operation to perform steps such as receiving or sending a message.
[0292] The apparatus for canceling the operation described in the embodiments of the present application may include: Fig.16 The units described in the corresponding embodiments.
[0293] Specifically, the processing unit 1602 and the display unit 1601 may be integrated together, and the processing unit 1602 and the display unit 1601 may communicate with each other.
[0294] In a possible implementation, the apparatus 1600 for canceling operation may further include: a storage unit 1604. The storage unit 1604 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.
[0295] The storage unit 1604 may exist independently and be connected to the processing unit 1602 via a communication bus. The storage unit 1604 may also be integrated with the processing unit 1602.
[0296] Taking the example that the device 1600 for canceling operation can be a chip or chip system of a terminal device in an embodiment of the present application, the storage unit 1604 can store computer execution instructions of the method of the terminal device, so that the processing unit 1602 executes the method of the terminal device in the above embodiment. The storage unit 1604 can be a register, a cache or a random access memory (RAM), etc., and the storage unit 1604 can be integrated with the processing unit 1602. The storage unit 1604 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1604 can be independent of the processing unit 1602.
[0297] In a possible implementation, the apparatus 1600 for canceling the operation may further include: a communication unit 1603. The communication unit 1603 is used to support the apparatus 1600 for canceling the operation to interact with other devices. Exemplarily, when the apparatus 1600 for canceling the operation is a terminal device, the communication unit 1603 may be a communication interface or an interface circuit. When the apparatus 1600 for canceling the operation is a chip or a chip system in the terminal device, the communication unit 1603 may be a communication interface. For example, the communication interface may be an input / output interface, a pin or a circuit, etc.
[0298] The device of this embodiment can be used to execute the steps executed in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0299] Fig.17 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application.
[0300] The terminal device includes a processor 1701, a communication line 1704 and at least one communication interface ( Fig.17 The communication interface 1703 is used as an example for explanation).
[0301] Processor 1701 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0302] Communications link 1704 may include circuitry to transmit information between the above-described components.
[0303] The communication interface 1703 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
[0304] Possibly, the terminal device may further include a memory 1702 .
[0305] The memory 1702 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1704. The memory may also be integrated with the processor.
[0306] The memory 1702 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1701. The processor 1701 is used to execute the computer-executable instructions stored in the memory 1702, thereby implementing the method provided by the embodiment of the present application.
[0307] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.
[0308] In a specific implementation, as an embodiment, the processor 1701 may include one or more CPUs, such as Fig.17 CPU0 and CPU1 in.
[0309] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as Fig.17 1701 and 1705 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0310] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
[0311] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0312] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
[0313] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.
[0314] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
[0315] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A method for undoing an operation, characterized in that: The method comprises: The terminal device displays a first interface, wherein the first interface includes a first value; In response to a first operation on a first interface, the terminal device displays a second interface, the second interface includes a second value, the second value is a value obtained after the terminal device modifies the first value in response to the first operation, and the first interface and the second interface are both interfaces in the first application; The terminal device displays a third interface, wherein the third interface includes a third value; In response to a second operation on a third interface, the terminal device displays a fourth interface, the second operation is after the first operation, the fourth interface includes a fourth value, the fourth value is a value obtained after the terminal device modifies the third value in response to the second operation, the third interface and the fourth interface are both interfaces in a second application, and the first application is different from the second application; In response to a third operation on the terminal device, the terminal device displays a fifth interface, wherein the fifth interface includes the first control; In response to the operation on the first control, the terminal device displays the second control in the fourth interface; In response to the operation on the second control, the terminal device cancels the second operation.
2. The method according to claim 1, characterized in that The second control is displayed in the first window, and the first window also includes one or more of the following: the third value, the fourth value, the third control, or the fourth control, the third control is used to view the previous operation of the second operation, and the fourth control is used to view the next operation of the second operation.
3. The method according to claim 1 or 2, characterized in that: After responding to the second operation on the third interface, the method further includes: The terminal device adds the operation data of the second operation to the first data set to obtain a second data set, wherein the operation data in the first data set are arranged in chronological order, and the operation data of the second operation is the latest data in the second data set; After the terminal device cancels the second operation, the method further includes: The terminal device deletes the operation data of the second operation in the second data set, and adds the operation data of revoking the second operation to obtain a third data set, wherein the operation data of revoking the second operation is the latest data in the third data set.
4. The method according to claim 3, characterized in that Any operation data in the first data set may include one or more of the following: operation name, path name of the interface where the operation is located, change item corresponding to the operation, operation time, a fifth value, or a sixth value, and the sixth value is the value obtained after the terminal device changes the fifth value in response to the operation.
5. The method according to claim 3 or 4, characterized in that: After the terminal device cancels the second operation, the method further includes: The terminal device displays a fifth control in the second interface; In response to the operation on the fifth control, the terminal device cancels the first operation.
6. The method according to claim 5, characterized in that The fifth control is displayed in a second window, and the second window also includes one or more of the following: the first value, the second value, the sixth control, or the seventh control, the sixth control is used to view the previous operation of the first operation, and the seventh control is used to view the next operation of the first operation.
7. The method according to claim 5 or 6, characterized in that: After the terminal device cancels the first operation, the method further includes: The terminal device deletes the operation data of the first operation from the third data set, and adds the operation data of revoking the first operation to obtain a fourth data set, wherein the operation data of revoking the first operation is the latest data in the fourth data set.
8. The method according to claim 6, characterized in that The method further comprises: In response to the operation on the seventh control, the terminal device displays a third window in the third interface, the third window includes the eighth control, so the third window also includes the third value and / or the fourth value, the third value is a value obtained by modifying the fourth value in response to the operation of restoring and undoing the second operation; In response to the operation on the eighth control, the terminal device resumes undoing the second operation.
9. The method according to any one of claims 1 to 8, characterized in that: After responding to the first operation on the first interface, the method further includes: When the terminal device determines that the interface type of the first interface meets the preset interface type, the terminal device stores the operation data of the first operation in a first data set. The first interface is the interface called by the terminal device when implementing the first operation. The operation data in the first data set are arranged in chronological order.
10. The method according to claim 9, characterized in that The method further comprises: The terminal device receives a fourth operation; In response to the fourth operation, when the terminal device determines that the interface type of the second interface does not meet the preset interface type, the terminal device does not store the operation data of the fourth operation in the first data set, and the second interface is the interface called by the terminal device when implementing the fourth operation.
11. The method according to claim 9 or 10, characterized in that: The preset interface type is a type used to change parameters, and the type used to change parameters includes one or more of the following: putInt type, or putstring type.
12. The method according to any one of claims 1 to 11, characterized in that: The operation data of the first operation includes: a first identifier, where the first identifier is used to indicate that the parent node of the first operation is the second operation, and the terminal device cancels the second operation, including: When the terminal device determines that the second operation is the parent node of the first operation based on the first identifier, the terminal device displays first prompt information and a ninth control, wherein the first prompt information is used to prompt viewing of operation data of the first operation and prompting whether to continue to cancel the second operation; In response to the operation on the ninth control, the terminal device cancels the second operation and deletes the operation data of the first operation and the operation data of the second operation.
13. The method according to any one of claims 1 to 12, characterized in that: The terminal device further includes: a revocation implementation module and a revocation recording module, and the terminal device revoking the second operation includes: The revocation implementation module receives a first instruction sent by the second application, where the first instruction is used to revoke the second operation; The cancellation implementation module calls an interface to cancel the second operation, and generates operation data for canceling the second operation; The undo recording module obtains the operation data of undoing the second operation from the undo implementation module, deletes the operation data of the second operation, and stores the operation data of undoing the second operation.
14. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device executes the method according to any one of claims 1 to 13.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer is caused to perform the method according to any one of claims 1 to 13.