Information processing method and device

By classifying all trigger operations caused by user operations into an atomic operation, and performing a one-time rollback during rollback, the problem of multiple rollbacks of operations in the existing technology is solved, and a simplified rollback process and improvement are achieved. operating efficiency.

CN113360221BActive Publication Date: 2024-10-11DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010141879.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-04
Publication Date
2024-10-11
Estimated Expiration
2040-04-07

AI Technical Summary

Technical Problem

In the prior art, the operations in each module triggered by a user operation need to be rolled back multiple times to return to the effect before the user operation.

Method used

By determining the operation call chain corresponding to the user operation, classifying it as an atomic operation, and taking out and rolling back the atomic operation from the rollback stack during rollback, so as to roll back all triggering operations at once.

Benefits of technology

When rolling back, all trigger operations can be rolled back at once, which simplifies the rollback process of user operations and improves the efficiency of operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113360221B_ABST
    Figure CN113360221B_ABST
Patent Text Reader

Abstract

The present disclosure discloses an information processing method, device, electronic device and computer-readable storage medium. The method includes: determining an operation call chain corresponding to a user operation; wherein the operation call chain is formed by connecting all trigger operations triggered by the user operation in series in a calling order; classifying the operation call chain into an atomic operation; and in response to a rollback operation for the user operation, taking out the atomic operation from the rollback stack and rolling back the atomic operation. The embodiment of the present disclosure classifies the operation call chain of all trigger operations triggered by the user operation into an atomic operation, and in response to a rollback operation for the user operation, takes out the atomic operation from the rollback stack and rolls back the atomic operation, so that all trigger operations in the operation call chain can be rolled back at once during rollback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of program technology, and in particular to an information processing method, device, and computer-readable storage medium. Background Art

[0002] In the terminal, a user operation will trigger the execution of other operations in the terminal in series, thus forming an operation execution chain, for example: operation A, change data triggers operation B, change data triggers operation C, change data triggers operation X, and so on.

[0003] Since multiple operations in the execution chain may exist in different modules, a certain module does not know whether the current operation is triggered by operations in other modules. In this case, the operations will be pushed into the rollback stack as independent operations. This will cause each operation in each module triggered by a user operation to need to be rolled back multiple times to return to the effect before the user operation. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] The technical problem solved by the present disclosure is to provide an information processing method to at least partially solve the technical problem in the prior art that each operation in each module triggered by a single user operation needs to be rolled back multiple times to return to the effect before the user operation. In addition, an information processing device, an information processing hardware device, a computer-readable storage medium and an information processing terminal are also provided.

[0006] In order to achieve the above object, according to one aspect of the present disclosure, the following technical solution is provided:

[0007] An information processing method, comprising:

[0008] Determine an operation call chain corresponding to the user operation; wherein the operation call chain is formed by serially connecting all trigger operations triggered by the user operation in a calling order;

[0009] Classifying the operation call chain into an atomic operation;

[0010] In response to a rollback operation for the user operation, taking the atomic operation out of the rollback stack;

[0011] The atomic operation is rolled back.

[0012] In order to achieve the above object, according to one aspect of the present disclosure, the following technical solution is provided:

[0013] An information processing device, comprising:

[0014] An operation call chain generation module is used to determine an operation call chain corresponding to a user operation; wherein the operation call chain is formed by connecting all trigger operations triggered by the user operation in series in a calling order;

[0015] An atomic operation generation module, used for classifying the operation call chain into an atomic operation;

[0016] An operation fetching module, configured to fetch the atomic operation from the rollback stack in response to a rollback operation for the user operation;

[0017] An operation rollback module is used to roll back the atomic operation.

[0018] In order to achieve the above object, according to one aspect of the present disclosure, the following technical solution is provided:

[0019] An electronic device, comprising:

[0020] a memory for storing non-transitory computer-readable instructions; and

[0021] A processor is used to run the computer-readable instructions so that the processor implements any of the above-mentioned information processing methods when executing.

[0022] In order to achieve the above object, according to one aspect of the present disclosure, the following technical solution is provided:

[0023] A computer-readable storage medium is used to store non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute any of the above-mentioned information processing methods.

[0024] In order to achieve the above object, according to another aspect of the present disclosure, the following technical solution is also provided:

[0025] An information processing terminal comprises any one of the above-mentioned information processing devices.

[0026] The disclosed embodiment classifies the operation call chain of all trigger operations caused by user operations into an atomic operation, and in response to a rollback operation for the user operation, takes the atomic operation out of the rollback stack and rolls back the atomic operation, so that all trigger operations in the operation call chain can be rolled back at once during the rollback.

[0027] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0029] Figure 1 A flowchart of an information processing method according to an embodiment of the present disclosure;

[0030] Figure 2 is a schematic diagram of the structure of an information processing device according to an embodiment of the present disclosure;

[0031] Figure 3 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0033] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders or in parallel. In addition, the method embodiments may include additional steps or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0034] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0035] Embodiment 1

[0036] In order to solve the technical problem in the prior art that each operation in each module triggered by a user operation needs to be rolled back multiple times to return to the effect before the user operation, the embodiment of the present disclosure provides an information processing method. Figure 1 As shown, the information processing method mainly includes the following steps S11 to S14.

[0037] Step S11: determining an operation call chain corresponding to the user operation; wherein the operation call chain is formed by connecting all trigger operations triggered by the user operation in series in a calling order.

[0038] Among them, a user operation can be a keyboard input operation, a mouse click operation, or a mouse movement operation. These user operations will be converted into button click responses, input box enter and other behaviors at the user interface UI framework layer. These behaviors will eventually be converted into the logic of the application and trigger at least one trigger operation. When there are multiple trigger operations triggered, the at least one trigger operation will form an operation call chain according to the calling order of various trigger operations. In addition, the above application can be implemented based on operating systems such as Windows, Mac, Android, and iOS.

[0039] For example, if a mouse click triggers the calling of trigger operation A, trigger operation B, trigger operation C, and trigger operation D in sequence, the following operation call chain is formed according to the calling order: trigger operation A->trigger operation B->trigger operation C->trigger operation D.

[0040] Step S12: Classify the operation call chain into an atomic operation.

[0041] Among them, one user operation corresponds to an atomic operation, which may include one or more operations called by the user operation. The multiple operations have a certain execution order, and the multiple operations are regarded as an atomic operation completed within the user operation. The higher layer of the layer where the atomic operation is located cannot discover its internal implementation and structure.

[0042] Step S13: In response to the rollback operation for the user operation, taking the atomic operation out of the rollback stack.

[0043] Since the atomic operation is pushed into the rollback stack, after the user triggers the rollback operation, the atomic operation is taken out from the rollback stack.

[0044] Step S14: Roll back the atomic operation.

[0045] Specifically, each atomic operation has a rollback interface, and the rollback operation is completed by calling the rollback interface during rollback. Since at least one trigger operation triggered by the user operation is used as an atomic operation completed within the user operation, all trigger operations in the operation call chain can be rolled back at once during rollback.

[0046] In addition, after the atomic operation completes the rollback operation, the atomic operation can be put into a redo stack, so that when the user undoes the rollback, the atomic operation can be taken out from the redo stack and the corresponding undo rollback interface can be called to undo the rollback of the atomic operation.

[0047] This embodiment classifies the operation call chain of all trigger operations triggered by user operations into an atomic operation, and in response to a rollback operation for the user operation, takes the atomic operation out of the rollback stack; the atomic operation is rolled back, so that all trigger operations in the operation call chain can be rolled back at once during the rollback.

[0048] In an optional embodiment, step S11 specifically includes:

[0049] Step A1: Determine the first trigger operation and the last trigger operation caused by the user operation.

[0050] Step A2: Determine the operation call chain according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

[0051] The operation call chain includes the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

[0052] In an optional embodiment, step SA1 specifically includes:

[0053] Step A11: calling a push interface for each trigger operation respectively; wherein the push interface performs a first mark on the first trigger operation pushed into the stack and performs a second mark on the first trigger operation pushed into the stack after the last trigger operation is completed.

[0054] The first mark and the second mark are different marks, and the mark can be represented by a parameter, and the parameter can specifically be an English character, an English word, a number, and a combination thereof.

[0055] Specifically, the trigger operation triggered by the user operation will call the stacked interface. In this implementation, the stack is a rollback stack. The stacked interface will mark whether it is the first trigger operation of this operation call chain. For example, after the first trigger operation is called, the first trigger operation that calls the stacked interface is marked as false. When the last trigger operation in the operation call chain ends, the first trigger operation that calls the stacked interface is marked as true again.

[0056] Step A12: Determine the first trigger operation according to the first mark, and determine the last trigger operation according to the second mark.

[0057] Specifically, referring to the example in the above step A11, the first trigger operation can be determined according to the first mark, ie, false, and the last trigger operation can be determined according to the second mark, ie, true.

[0058] In an optional embodiment, step A2 specifically includes:

[0059] Step A21: Use the first trigger operation as the first trigger operation of the operation call chain.

[0060] Step A22: Determine, based on the mark of the first trigger operation, whether the subsequent trigger operation of calling the push interface is a trigger operation occurring between the first trigger operation and the last trigger operation.

[0061] Specifically, each trigger operation must call the push interface before execution, and the subsequent trigger operation that calls the push interface can be determined based on the change of the mark of the first trigger operation to determine whether the trigger operation that subsequently calls the push interface is a trigger operation that occurs between the first trigger operation and the last trigger operation. Specifically, since the mark corresponding to the first trigger operation is the first mark, when the trigger operation after the first trigger operation calls the push interface, it is detected whether the mark corresponding to the first trigger operation is still the first mark. If so, step A23 is executed; if the mark corresponding to the first trigger operation is detected to be changed to the second mark, it means that the operation call chain has ended, and step A24 is executed.

[0062] Step A23: Add the corresponding trigger operation to the operation call chain.

[0063] Step A24: Use the last trigger operation as the last trigger operation of the operation call chain.

[0064] In an optional embodiment, step S11 specifically includes:

[0065] Step B1: When the first trigger operation is called, an asynchronous event is generated to end the operation call chain.

[0066] Step B2: Add the asynchronous event to a message loop queue; wherein the message loop queue contains the execution order of the asynchronous event.

[0067] The message loop queue may be a UI message loop queue. Specifically, in applications implemented based on operating systems such as Windows, Mac, Android, and iOS, all common user operation events such as mouse clicks, touch clicks, mouse movements, touch slides, and keyboard inputs will be added to a UI message loop queue, and these user operation events will be executed in sequence according to the message loop queue. In addition, these user operation events will be converted into behaviors such as button click responses and input box enters at the UI framework layer, and these behaviors will eventually be converted into the logic of the application and trigger at least one trigger operation.

[0068] Step B3 determines the operation call chain according to the triggering operation that occurs before the asynchronous event is executed.

[0069] Specifically, when the first operation in the operation call chain is called, an asynchronous event that ends the operation call chain will be generated immediately, and the asynchronous event will be added to the message loop queue. Since it is an asynchronous operation, it will not be called until the last triggering operation in this operation call chain is completed. Therefore, the triggering operation that occurs before the execution of the asynchronous event can generate an operation call chain.

[0070] In an optional embodiment, step S12 specifically includes:

[0071] Step S121: Generate an operation set.

[0072] Step S122: All trigger operations in the operation call chain are saved as sub-operations in the operation set.

[0073] Step S123: Push the operation set as an instance into the back stack.

[0074] Among them, one operation set corresponds to one back stack, or multiple operation sets correspond to one back stack. The operation set can be pushed into the back stack as an instance, that is, Activity. When there are multiple operation sets, the multiple operation sets are respectively pushed into the back stack as an instance in the execution order.

[0075] In an optional embodiment, step S13 specifically includes:

[0076] Step S131: in response to a rollback operation for the user operation, taking out an instance corresponding to the operation set from the rollback stack.

[0077] Those skilled in the art should understand that, based on the above-mentioned embodiments, obvious modifications (for example, superposition of the listed modes) or equivalent substitutions may be made.

[0078] In the above, although the various steps in the information processing method embodiment are described in the above order, those skilled in the art should be aware that the steps in the embodiments of the present disclosure are not necessarily executed in the above order, and they may also be executed in other orders such as reverse order, parallel order, and cross order. Moreover, on the basis of the above steps, those skilled in the art may also add other steps. These obvious variations or equivalent replacement methods should also be included in the protection scope of the present disclosure and will not be repeated here.

[0079] The following is an embodiment of the device disclosed in the present invention. The embodiment of the device disclosed in the present invention can be used to execute the steps implemented by the embodiment of the method disclosed in the present invention. For the convenience of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the embodiment of the method disclosed in the present invention.

[0080] Embodiment 2

[0081] In order to solve the technical problem in the prior art that operations in various modules triggered by a user operation need to be rolled back multiple times to return to the effect before the user operation, the present disclosure provides an information processing device. The device can execute the steps in the information processing method embodiment described in the above embodiment 1. Figure 2 As shown, the device mainly includes: an operation call chain generation module 21, an atomic operation generation module 22, an operation extraction module 23 and an operation rollback module 24, wherein:

[0082] The operation call chain generation module 21 is used to determine the operation call chain corresponding to the user operation; wherein the operation call chain is formed by connecting all the trigger operations triggered by the user operation in series in the calling order;

[0083] The atomic operation generating module 22 is used to classify the operation call chain into an atomic operation;

[0084] The operation fetching module 23 is used for fetching the atomic operation from the rollback stack in response to the rollback operation for the user operation.

[0085] The operation rollback module 24 is used to roll back the atomic operation.

[0086] Furthermore, the operation call chain generation module 21 includes: a first and last operation determination unit 211 and an operation call chain generation unit 212; wherein,

[0087] The first and last operation determining unit 211 is used to determine the first trigger operation and the last trigger operation caused by the user operation;

[0088] The operation call chain generating unit 212 is used to determine the operation call chain according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

[0089] Furthermore, the first and last operation determination unit 211 is specifically used to: call the push interface for each trigger operation respectively; wherein the push interface performs a first mark on the first pushed trigger operation and performs a second mark on the first pushed trigger operation after the last trigger operation ends; determine the first trigger operation according to the first mark, and determine the last trigger operation according to the second mark.

[0090] Furthermore, the operation call chain generation unit 212 is specifically used to: use the first trigger operation as the first trigger operation of the operation call chain; determine whether the subsequent trigger operation of calling the push interface is a trigger operation occurring between the first trigger operation and the last trigger operation according to the mark of the first trigger operation; if so, add the corresponding trigger operation to the operation call chain; if not, use the last trigger operation as the last trigger operation of the operation call chain.

[0091] Furthermore, the operation call chain generation module 21 is specifically used to: generate an asynchronous event that ends the operation call chain when the first trigger operation is called; add the asynchronous event to the message loop queue; wherein the message loop queue contains the execution order of the asynchronous events; and determine the operation call chain based on the trigger operation that occurs before the execution of the asynchronous event.

[0092] Furthermore, the atomic operation generation module 22 is specifically used to: generate an operation set; save all trigger operations in the operation call chain as sub-operations in the operation set; and push the operation set as an instance into the rollback stack.

[0093] Furthermore, the operation fetching module 23 is specifically configured to: in response to a rollback operation for the user operation, fetch an instance corresponding to the operation set from the rollback stack.

[0094] For detailed descriptions on the working principle, technical effects achieved, etc. of the information processing device embodiment, reference can be made to the relevant descriptions in the aforementioned information processing method embodiment, which will not be repeated here.

[0095] Embodiment 3

[0096] Reference below Figure 3, which shows a schematic diagram of the structure of an electronic device 300 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0097] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0098] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0100] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any superposition of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any superposition of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable superposition of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable superposition of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable superposition of the above.

[0101] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0103] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the operation call chain corresponding to the user operation; wherein the operation call chain is formed by connecting all triggering operations triggered by the user operation in series in a calling order; classifies the operation call chain into an atomic operation; and in response to a rollback operation for the user operation, takes the atomic operation out of the rollback stack and rolls back the atomic operation.

[0104] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or superpositions thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the superposition of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with the superposition of special hardware and computer instructions.

[0106] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0107] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0108] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable superposition of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable superposition of the foregoing.

[0109] According to one or more embodiments of the present disclosure, there is provided an information processing method, including:

[0110] Determine an operation call chain corresponding to the user operation; wherein the operation call chain is formed by serially connecting all trigger operations triggered by the user operation in a calling order;

[0111] Classifying the operation call chain into an atomic operation;

[0112] In response to a rollback operation for the user operation, taking the atomic operation out of the rollback stack;

[0113] The atomic operation is rolled back and cleared.

[0114] Furthermore, the determining of the operation call chain corresponding to the user operation includes:

[0115] Determine the first trigger operation and the last trigger operation caused by the user operation;

[0116] The operation call chain is determined according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

[0117] Furthermore, the determining the first triggering operation and the last triggering operation caused by the user operation includes:

[0118] For each trigger operation, the stacking interface is called respectively; wherein the stacking interface performs a first mark on the first trigger operation pushed into the stack and performs a second mark on the first trigger operation pushed into the stack after the last trigger operation ends;

[0119] A first trigger operation is determined according to the first mark, and a last trigger operation is determined according to the second mark.

[0120] Further, determining the operation call chain according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation includes:

[0121] Using the first trigger operation as the first trigger operation of the operation call chain;

[0122] Determining, according to the mark of the first trigger operation, whether a subsequent trigger operation for calling the push interface is a trigger operation occurring between the first trigger operation and the last trigger operation;

[0123] If yes, then add the corresponding trigger operation to the operation call chain;

[0124] If not, the last trigger operation is used as the last trigger operation of the operation call chain.

[0125] Furthermore, the determining of the operation call chain corresponding to the user operation includes:

[0126] When the first triggering operation is called, an asynchronous event is generated to end the operation call chain;

[0127] Adding the asynchronous event to a message loop queue; wherein the message loop queue contains the execution order of the asynchronous event;

[0128] The operation call chain is determined according to a triggering operation occurring before the asynchronous event is executed.

[0129] Furthermore, the classifying the operation call chain into an atomic operation and pushing the atomic operation into a rollback stack includes:

[0130] Generate an operation set;

[0131] Saving all the trigger operations in the operation call chain as sub-operations in the operation set;

[0132] Push the operation set as an instance into the back stack.

[0133] Further, in response to the rollback operation for the user operation, clearing the atomic operation from the rollback stack includes:

[0134] In response to a rollback operation for the user operation, an instance corresponding to the operation set is retrieved from the rollback stack.

[0135] According to one or more embodiments of the present disclosure, there is provided an information processing device, including:

[0136] An operation call chain generation module is used to determine an operation call chain corresponding to a user operation; wherein the operation call chain is formed by connecting all trigger operations triggered by the user operation in series in a calling order;

[0137] An atomic operation generation module, used for classifying the operation call chain into an atomic operation;

[0138] An operation fetching module, configured to fetch the atomic operation from the rollback stack in response to a rollback operation for the user operation;

[0139] An operation rollback module is used to roll back the atomic operation.

[0140] Furthermore, the operation call chain generation module includes:

[0141] A first and last operation determination unit, used to determine the first trigger operation and the last trigger operation caused by the user operation;

[0142] An operation call chain generating unit is used to determine the operation call chain according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

[0143] Furthermore, the first and last operation determination unit is specifically used to: call the push interface for each trigger operation respectively; wherein the push interface performs a first mark on the first pushed trigger operation and performs a second mark on the first pushed trigger operation after the last trigger operation ends; determine the first trigger operation according to the first mark, and determine the last trigger operation according to the second mark.

[0144] Furthermore, the operation call chain generation unit is specifically used to: use the first trigger operation as the first trigger operation of the operation call chain; determine whether the subsequent trigger operation of calling the push interface is a trigger operation occurring between the first trigger operation and the last trigger operation according to the mark of the first trigger operation; if so, add the corresponding trigger operation to the operation call chain; if not, use the last trigger operation as the last trigger operation of the operation call chain.

[0145] Furthermore, the operation call chain generation module is specifically used to: generate an asynchronous event that ends the operation call chain when the first trigger operation is called; add the asynchronous event to the message loop queue; wherein the message loop queue contains the execution order of the asynchronous events; and determine the operation call chain based on the trigger operation that occurs before the execution of the asynchronous event.

[0146] Furthermore, the atomic operation generation module is specifically used to: generate an operation set; save all trigger operations in the operation call chain as sub-operations in the operation set; and push the operation set as an instance into a rollback stack.

[0147] Furthermore, the operation rollback module is specifically configured to: in response to a rollback operation for the user operation, retrieve an instance corresponding to the operation set from the rollback stack.

[0148] According to one or more embodiments of the present disclosure, there is provided an electronic device, including:

[0149] a memory for storing non-transitory computer-readable instructions; and

[0150] The processor is used to run the computer-readable instructions so that the processor implements the above-mentioned information processing method when executing.

[0151] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute the above-mentioned information processing method.

[0152] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solution formed by the specific superposition of the above-mentioned technical features, but should also cover other technical solutions formed by any superposition of the above-mentioned technical features or their equivalent features without departing from the above-mentioned disclosure concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) to form a technical solution.

[0153] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in a superimposed manner. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-superimposed mode.

[0154] Although the subject matter has been described in language specific to structural features or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Instead, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An information processing method, characterized in that: include: Determining an operation call chain corresponding to a user operation, comprising: generating an asynchronous event that ends the operation call chain when the first trigger operation is called; adding the asynchronous event to a message loop queue; wherein the message loop queue contains the execution order of the asynchronous events; determining the operation call chain according to a trigger operation that occurs before the execution of the asynchronous event; wherein the operation call chain is formed by serially connecting all the trigger operations triggered by a single user operation in accordance with the calling order; Classifying the operation call chain into an atomic operation completed within the user operation, and pushing the atomic operation into a rollback stack; In response to a rollback operation for the user operation, taking the atomic operation out of the rollback stack; The atomic operation is rolled back.

2. The method according to claim 1, characterized in that The determining of the operation call chain corresponding to the user operation includes: Determine the first trigger operation and the last trigger operation caused by the user operation; The operation call chain is determined according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation.

3. The method according to claim 2, characterized in that The determining the first trigger operation and the last trigger operation caused by the user operation includes: For each trigger operation, the stacking interface is called respectively; wherein the stacking interface performs a first mark on the first trigger operation pushed into the stack and performs a second mark on the first trigger operation pushed into the stack after the last trigger operation ends; A first trigger operation is determined according to the first mark, and a last trigger operation is determined according to the second mark.

4. The method according to claim 3, characterized in that The determining the operation call chain according to the first trigger operation, the trigger operations occurring between the first trigger operation and the last trigger operation, and the last trigger operation comprises: Using the first trigger operation as the first trigger operation of the operation call chain; Determining, according to the mark of the first trigger operation, whether a subsequent trigger operation for calling the push interface is a trigger operation occurring between the first trigger operation and the last trigger operation; If yes, then add the corresponding trigger operation to the operation call chain; If not, the last trigger operation is used as the last trigger operation of the operation call chain.

5. The method according to claim 1, characterized in that The step of classifying the operation call chain into an atomic operation completed within the user operation and pushing the atomic operation into a rollback stack includes: Generate an operation set; Saving all the trigger operations in the operation call chain as sub-operations in the operation set; Push the operation set as an instance into the back stack.

6. The method according to claim 5, characterized in that The step of taking the atomic operation out of the rollback stack in response to the rollback operation for the user operation includes: In response to a rollback operation for the user operation, an instance corresponding to the operation set is retrieved from the rollback stack.

7. An information processing device, characterized in that: include: An operation call chain generation module is used to determine the operation call chain corresponding to the user operation, including: when the first trigger operation is called, generating an asynchronous event that ends the operation call chain; adding the asynchronous event to the message loop queue; wherein the message loop queue contains the execution order of the asynchronous events; determining the operation call chain according to the trigger operation that occurs before the execution of the asynchronous event; wherein the operation call chain is formed by connecting all the trigger operations triggered by a single user operation in series in the calling order; An atomic operation generation module, used for classifying the operation call chain into an atomic operation completed within the user operation, and pushing the atomic operation into a rollback stack; An operation fetching module, configured to fetch the atomic operation from the rollback stack in response to a rollback operation for the user operation; An operation rollback module is used to roll back the atomic operation.

8. An electronic device, comprising: a memory for storing non-transitory computer-readable instructions; as well as A processor is used to run the computer-readable instructions so that the processor implements the information processing method according to any one of claims 1 to 6 when executing.

9. A computer-readable storage medium for storing non-transitory computer-readable instructions, which, when executed by a computer, causes the computer to execute the information processing method according to any one of claims 1 to 6.