# US 10,120,766 B2 · Model-based system and method for undoing actions in an application

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,120,766 B2
- Document ID: US10120766B2
- Status: Granted
- Kind: B2
- Application number: 14/885,682
- Filed: 2015-10-16
- Published: 2017-04-20
- Granted: 2018-11-06
- Earliest claimed: 2015-10-16
- Assignees: Business Objects Software Ltd.
- Applicants: Business Objects Software, Ltd.
- Inventors: Viren Kumar
- Web page: https://patentgrep.com/patent/US10120766B2

## CPC

- G06F 11/1466: {to make the backup process non-disruptive}
- G06F 8/355: {Round-trip engineering}
- G06F 9/45529: {Embedded in an application, e.g. JavaScript in a Web browser}
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An improved model-based approach for undoing actions in an application that was not previously configured with an undo feature is disclosed. Object models are constructed for each object invoked by the application. Snapshots of the object model are captured after every action to preserve the object model state at different points in time. The object model includes an object tree data structure having multiple nodes comprising data and metadata for the object. The object model is frozen and editing of the object is only permitted via an undo management engine. In response to edits from the application, the undo management engine responds by unfreezing the path of object nodes from leaf node to root node in the object tree data structure. Edits are applied to the object model at the leaf node. The object model can then be re-frozen to maintain the state of the object after each action.

## Claims

### Claim 1

A method for undoing actions in an application comprising:
launching an undo management process configured to operate with the application;
building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object;
taking a first snapshot of the object model;
freezing the object model;
receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure;
unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node;
applying the edit to the object at the leaf node of the object tree data structure;
re-freezing the first portion of the object tree data structure to obtain a re-frozen object model;
taking a second snapshot of the re-frozen object model;
storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action;
receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the first memory buffer;
storing the difference data into a second memory buffer; and
undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken.

### Claim 2 (depends on 1)

The method of claim 1 further comprising leaving untouched object nodes in the object tree data structure that are not in the path from the leaf node to the root node.

### Claim 3 (depends on 1)

The method of claim 1 wherein the undo management process is invoked at the time when the application is first loaded to manage access to application objects.

### Claim 4 (depends on 1)

The method of claim 1 wherein access for editing can only be made through the undo management process.

### Claim 5 (depends on 1)

The method of claim 1 further comprising taking snapshots of the object model after each action of the application to preserve the state of the object model at different points in time.

### Claim 6 (depends on 1)

The method of claim 1 further comprising
determining the difference between the first snapshot and the second snapshot by comparing only nodes in the object tree data structure along the path from the leaf node to the root node.

### Claim 7 (depends on 6)

The method of claim 6 further comprising:
receiving a third action from the application comprising a redo command configured to redo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the second memory buffer;
storing the difference data representing the first action back into the first memory buffer; and
redoing the first action comprising the edit to the object by restoring the object model back to its state when the second snapshot was taken.

### Claim 8 (depends on 1)

The method of claim 1 wherein the first memory buffer is an undo stack buffer and the second memory buffer is a redo stack buffer.

### Claim 9 (depends on 1)

The method of claim 1 wherein undo and redo operations are performed without requiring implementation of a converse action for every action received from the application.

### Claim 10

A system for undoing actions in an application comprising:
a processor;
a system memory in communication with the processor via a communication link, the system memory configured to store computer code, which when executed by the processor, causes the processor to perform operations comprising:
launching an undo management process configured to operate with the application;
building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object;
taking a first snapshot of the object model;
freezing the object model;
receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure;
unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node;
applying the edit to the object at the leaf node of the object tree data structure;
re-freezing the first portion of the object tree data structure to obtain a re-frozen object model;
taking a second snapshot of the re-frozen object model;
storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action;
receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the first memory buffer;
storing the difference data into a second memory buffer; and
undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken.

### Claim 11 (depends on 10)

The system of claim 10 wherein the operations further comprise leaving untouched object nodes in the object tree data structure that are not in the path from the leaf node to the root node.

### Claim 12 (depends on 10)

The system of claim 10 wherein access for editing can only be made through the undo management process.

### Claim 13 (depends on 10)

The system of claim 10 wherein the operations further comprise
determining the difference between the first snapshot and the second snapshot by comparing only nodes in the object tree data structure along the path from the leaf node to the root node; and.

### Claim 14 (depends on 13)

The system of claim 13 wherein the operations further comprise:
receiving a third action from the application comprising a redo command configured to redo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the second memory buffer;
storing the difference data representing the first action back into the first memory buffer; and
redoing the first action comprising the edit to the object by restoring the object model back to its state when the second snapshot was taken.

### Claim 15 (depends on 10)

The system of claim 10 wherein the operations further comprise taking snapshots of the object model after each action of the application to preserve the state of the object model at different points in time.

### Claim 16

A non-transitory computer readable storage medium tangibly embodying computer code, which when executed by a computer system, causes the computer system to perform operations for undoing actions in an application, the operations comprising:
building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object;
taking a first snapshot of the object model;
freezing the object model;
receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure;
unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node;
applying the edit to the object at the leaf node of the object tree data structure;
re-freezing the first portion of the object tree data structure to obtain a re-frozen object model;
taking a second snapshot of the re-frozen object model;
storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action;
receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the first memory buffer;
storing the difference data into a second memory buffer; and
undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken.

### Claim 17 (depends on 16)

The computer readable storage medium of claim 16 wherein object nodes in the object tree data structure that are not in the path from the leaf node to the root node are left untouched.

### Claim 18 (depends on 16)

The computer readable storage medium of claim 16 wherein access for editing can only be made through the undo management process.

### Claim 19 (depends on 16)

The computer readable storage medium of claim 16 wherein the operations further comprise
determining the difference between the first snapshot and the second snapshot by comparing only nodes in the object tree data structure along the path from the leaf node to the root node; and.

### Claim 20 (depends on 19)

The computer readable storage medium of claim 19 wherein the operations further comprise:
receiving a third action from the application comprising a redo command configured to redo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the second memory buffer;
storing the difference data representing the first action back into the first memory buffer; and
redoing the first action comprising the edit to the object by restoring the object model back to its state when the second snapshot was taken.

### Claim 21 (depends on 16)

The computer readable storage medium of claim 16 wherein the operations further comprise taking snapshots of the object model after each action of the application to preserve the state of the object model at different points in time.

### Claim 22 (depends on 16)

The computer readable storage medium of claim 16 wherein the undo management process is invoked at the time when the application is first loaded to manage access to application objects.
