Methods, apparatuses, and media for formatting document objects
By generating and presenting editing suggestions, the challenge of visual consistency across editing units of document objects is solved, the formatting process is simplified, and efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202110801111.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2015-12-29
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2035-12-29
AI Technical Summary
In document editing, maintaining visual consistency across multiple editing units by changing document objects is time-consuming and error-prone, and existing formatting tools struggle to effectively propagate changes to spatial attributes.
Generate the first editing rule, generate editing suggestions based on the rule and present them to the user in a visual form for selection. The visual suggestions simplify the formatting process and support the propagation of spatial attributes.
It simplifies the document object formatting process, reduces user operation time, and improves visual consistency and accuracy.
Smart Images

Figure CN113536731B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application entitled "Method, Apparatus and Medium for Formatting Document Objects", filed on December 29, 2015, entered into the Chinese national phase on June 26, 2018, and assigned Chinese national application number 201580085592.4. TECHNICAL FIELD
[0002] The present application relates to the field of computers, and in particular to a method, apparatus and medium for formatting document objects. BACKGROUND
[0003] In environments such as document editing applications, documents often contain multiple editing units, such as pages or slides. In some cases, different editing units can not be visible at the same time. Thus, after making changes to some objects of multiple editing units, a user can have a problem of maintaining visual consistency across these objects of multiple editing units. Typically, the user needs to navigate through each editing unit to format all objects needed to maintain consistency. Thus, making changes to a large number of document objects can be a time-consuming and error-prone task. SUMMARY
[0004] According to implementations of the subject matter described herein, a solution is presented for formatting document objects through visual suggestions. For a document comprising multiple editing units, where each editing unit contains multiple objects (e.g., shapes, lines, paragraphs, etc.), implementations of the present invention implement generating a first editing rule, the first editing rule indicating an edit performed on a first object in the document. Then, an editing suggestion is generated based on the first editing rule, the editing suggestion describing a candidate edit to be performed on a second object within a suggested range. The editing suggestion is then presented to a user in a visual form for selection.
[0005] This summary is provided to introduce a selection of concepts, in a simplified form, that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF DRAWINGS
[0006] Figure 1 is a block diagram of an environment 100 in which implementations of the subject matter described herein can be implemented;
[0007] Figure 2 is a flowchart of a method 200 for formatting document objects through visual suggestions according to implementations of the present invention;
[0008] Figure 3 is a flowchart of a method 300 for generating an editing suggestion according to implementations of the present invention;
[0009] Figure 4 is a schematic diagram of visual editing suggestions implemented in accordance with the present application;
[0010] Figure 5 is a flowchart of a method 500 for responding to application of editing suggestions implemented in accordance with the present application;
[0011] Figure 6 is a flowchart of a method 600 for formatting document objects by visual suggestions implemented in accordance with the present application; and
[0012] Figure 7 is a flowchart of a method 700 for formatting document objects by visual suggestions implemented in accordance with the present application.
[0013] Throughout the drawings, identical or similar reference symbols are used to denote identical or similar elements.
[0014] Implementation
[0015] The subject matter described herein will now be discussed with reference to a number of example implementations. It should be understood that these implementations are discussed merely to provide a more detailed understanding of the subject matter described herein and are not intended to limit the scope of the subject matter in any manner.
[0016] As used herein, the term "includes" and its variants are to be read to be equivalent to the term "comprising" and its variants. The term "or" is to be read as "and / or" unless expressly indicated otherwise. The term "based on" is to be read as "based at least in part on." The term "one implementation" and "an implementation" are to be read as "at least one implementation." The term "another implementation" is to be read as "at least one other implementation." The terms "first," "second," "third," etc. can refer to different or the same objects. Other definitions, explicit and implicit, can be included below.
[0017] As noted above, changing the appearance properties of many document objects is time consuming and error prone. To address this problem, some applications provide formatting tools to allow a user to apply non-spatial properties (such as font or color) of one object to other objects. However, such formatting tools typically do not support propagation of spatial properties such as size or position. In addition, some applications allow a user to set object properties by using one or more templates. This requires pre-planning of the desired layout and text formatting. When the user wants to change the properties of the objects, he / she has to switch to and manipulate the template instead of the actual page / slide. These and other potential problems can be addressed by implementations of the subject matter described herein.
[0018] Figure 1A block diagram of an environment 100 in which implementations of the subject matter described herein can be implemented is shown. As shown, the environment 100 includes a user 101 and a computing device 102.
[0019] The computing device 102 can be a desktop computer, a laptop computer, a tablet, a smartphone, or any other type of computing device. Components of the computing device 102 can include, but are not limited to, one or more processors 110, a memory 120, and one or more I / O interfaces 130. The memory 120 can store various modules, applications, programs, or other data. Further, the memory 120 can include instructions that, when executed by the processor 110, cause the processor 110 to perform operations described herein for the computing device 102. In the computing device 102, the I / O interfaces 130 can support one or more of various different input devices and output devices that enable the user 101 to interact with the computing device 102. For example, the input devices can include user devices such as a keyboard, a keypad, a touchpad, a trackball, etc. For example, the output devices can include a display.
[0020] The computing device 102 can have additional features and / or functionality. For example, the computing device 102 can also include additional data storage devices (removable and / or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage devices can include removable storage devices and / or non-removable storage devices. Computer-readable media can include at least two types of computer-readable media, namely computer storage media and communication media. Computer storage media can include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, program data or other data. System memory, removable memory, and non-removable memory are all computer storage media examples. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computing device 102. Any such computer storage media can be part of the computing device 102. Further, computer readable media can include computer-executable instructions that, when executed by a processor, perform various functions and / or operations described herein. In contrast, communication media can embody computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, or other mechanism.
[0021] Memory 120 may store a document editing application 121 for processing document 103. Document 103 may be a presentation document or a text document. Document 103 may include one or more editing units. As used herein, the term "editing unit" refers to a basic unit that constitutes document 103. Examples of editing units include, but are not limited to, slides in a presentation document or pages in a text document, such as... Figure 1 Editing units 104, 105, and 106 are shown. Each editing unit may include one or more objects (e.g., shapes, lines, paragraphs, etc.). For example, editing unit 104 is shown as including objects 114 and 116, editing unit 105 is shown as including objects 115 and 117, and editing unit 106 is shown as including objects 118 and 119. This is for illustrative purposes only and is not intended to imply any limitation on the environment. In the following discussion, for illustrative purposes only, document 103 refers to presentation documents (such as Microsoft documents). (The presentation document), and editing units 104, 105 and 106 represent three different slides within the presentation document.
[0022] User 101 can directly edit object 114 in editing unit 104 via an input device supported by I / O interface 130, such as changing the font of object 114. Then, user 101 may intend to perform similar editing on object 115 in editing unit 105. That is, the user may want to change the font of object 115 to be the same as that of object 114 to maintain visual consistency. This invention provides a solution for formatting document objects through visual suggestions.
[0023] Figure 2 A flowchart illustrating a method 200 for formatting document objects via visual suggestions, according to an implementation of the present invention, is shown. For example, method 200 may be derived from, for example... Figure 1 The computing device 102 shown is used for implementation. Alternatively or additionally, method 200 can be implemented as part of document editing application 121. Method 200 will combine Figure 1 The example shown is used for illustration. For illustrative purposes only, in the following discussion, object 114 in editing unit 104 will be referred to as the "first object", and object 115 in editing unit 105 will be referred to as the "second object".
[0024] In step 210, a first editing rule is generated, which indicates the editing to be performed on the first object 114 in document 103. In some implementations, the first editing rule may be generated in response to the first object being edited by user 101.
[0025] In some implementations, the first editing rule can take the following form:
[0026] Condition => Conclusion (1)
[0027] Each condition and conclusion takes the form of an "attribute:value" pair. The condition defines which objects can be matched by the rule, and the conclusion describes how to edit the matched objects. The attribute can be any kind of visual attribute, including but not limited to spatial attributes such as position, height, size, etc., non-spatial attributes such as font, shape type, fill color, etc., and content such as the content of text within a shape. For example, the following rule (2) can transform all objects whose shape type is square into objects whose shape type is diamond, regardless of their size, color, border, etc.
[0028] (shape type: square) => (shape type: diamond) (2)
[0029] All conditions of a rule should be satisfied by the objects that the rule is matched against. For example, the following rule (3) can transform all objects whose shape type is square and whose fill color is yellow into objects whose shape type is diamond.
[0030] (shape type: square, fill color: yellow) => (shape type: diamond) (3)
[0031] Furthermore, all conclusions of a rule should be applied to all objects that the rule is matched against. For example, the following rule (4) can transform objects whose shape type is square into objects whose shape type is diamond and whose fill color is yellow, regardless of their original fill color.
[0032] (shape type: square) => (shape type: diamond, fill color: yellow) (4)
[0033] In some implementations, in response to an edit performed by the user 101 on the first object 114, a first edit rule can be generated as follows.
[0034] (all attribute:value pairs of the first object 114 that were edited before the edit) =>
[0035] (edited attribute:value pairs) (5)
[0036] The first edit rule (5) can only match objects whose attributes all match the attributes of the first object 114 that were edited before the edit.
[0037] In some implementations, an edit rule such as the first edit rule can operate on three levels of objects: shape, paragraph, and text run. A shape rule can affect an entire shape, including all text content therein. For example, a shape rule with the conclusion "(font color: red)" can set all text of the matching object to red, regardless of any text run color used previously. A paragraph rule can be created when the first or last paragraph of a multi-paragraph object is formatted, as is often done to distinguish or emphasize. For example, a paragraph rule can cause the first or last paragraph of a similar multi-paragraph object to be formatted, regardless of the previous formatting or text run structure of that paragraph. A text run rule can be created when a single text run within an object is formatted, causing another similar text run to be formatted.
[0038] In some implementations, if the target of the edit is ambiguous, a first edit rule can be generated with a mixed type. For example, if the user 101 edits the text of a uniform slide title, his / her intent can be to edit that class of shape or that class of text run. In this case, a first edit rule of the shape run type can be generated. As another example, if the user 101 edits the first or last paragraph of a text box, his / her intent can be to edit that class of paragraph or that class of text run. In this case, a first edit rule of the paragraph run type can be generated. In other implementations, if the target of the edit is ambiguous, more than one first edit rule can be generated. Using the same examples as above, if the user 101 edits the first or last paragraph of a text box, two first edit rules can be generated, one with the paragraph type and the other with the text run type.
[0039] The method 200 then proceeds to step 220, in which an edit suggestion is generated based on the first edit rule. In some implementations, this can be done by computing a "relaxed" edit rule. For example, Figure 3 A flowchart of a method 300 for generating an edit suggestion according to implementations of the application is shown. The edit suggestion can describe a candidate edit to be performed on a second object within a suggestion scope, such as the second object 115.
[0040] In step 310, all objects within the suggestion scope match the conditions of the first edit rule.
[0041] In some implementations, the suggestion scope can be the entire document 103, so that format changes are propagated throughout the document when direct editing is performed. That is, all objects within the document 103 are considered to be objects that match the conditions of the first editing rule. In some implementations, the suggestion scope is updated according to the user's actions. For example, when the user 101 navigates to one of the multiple editing units, such as the editing unit 105, the suggestion scope is updated to include the editing unit 105, so that all objects within the editing unit 105 are considered to be objects that match the conditions of the first editing rule.
[0042] As mentioned above, all conditions of the first editing rule should be satisfied by the objects that match the first rule. However, in step 310, each object within the suggestion scope can be considered, and some conditions of the first editing rule can be relaxed to match the objects, which can result in "relaxed" editing rules being generated. For purposes of illustration only, the "relaxed" editing rules generated from the first editing rule are also referred to as "second editing rules" in the following discussion.
[0043] The method 300 then proceeds to step 320, in which one or more second editing rules are generated from the first editing rule. As mentioned above, the conditions of each of the second editing rules are a subset of the conditions of the first editing rule, where each of the second editing rules matches at least one of the objects within the suggestion scope. In some implementations, a second editing rule can be removed if the conditions of that second editing rule are a subset of the conditions of another second editing rule. This is because it is always possible to reach a more "relaxed" editing rule by first applying a less "relaxed" editing rule, as will be discussed later.
[0044] The method 300 proceeds to step 330, in which one of the multiple second editing rules is selected. This can be done by computing and comparing the weights assigned to the relaxed conditions of the first editing rule for each of the second editing rules.
[0045] In some implementations, a weight can be assigned to each of the conditions of the first editing rule that is relaxed to generate the corresponding second editing rule. The weights assigned to different relaxed conditions can be the same or different. A lower weight for a relaxed condition can encourage an editing suggestion with that relaxed condition to be generated, as will be discussed later. The sum of the weights can be computed for each of the second editing rules, and the second editing rules can be ordered according to the sum of the weights. In some implementations, one of the second editing rules with the smallest sum of weights can be selected because it matches the first editing rule with the smallest difference. The selected second editing rule can match the object that is most similar to the object edited by the user. In this way, visual consistency within the suggestion scope can be maximized.
[0046] Then, the method 300 proceeds to step 340, where editing suggestions are generated based on the selected second editing rule.
[0047] In some implementations, more than one first editing rule can be maintained to support parallel editing, each of which can have a different priority. The most recently generated (or latest, e.g., as will be referenced later) Figure 5 The first editing rule (described) can have the highest priority and may be referred to as the "active" editing rule. It should be understood that in some implementations, an editing suggestion may be generated based solely on the "active" editing rule. Alternatively or additionally, an editing suggestion may be generated based on each of the first editing rules, which can result in multiple editing suggestions being generated.
[0048] In some implementations, if the edit performed on the first object 114 is a spatial edit, such as changing the size or position of a shape, then exact spatial attributes (e.g., left edge position, right edge position, top edge position, and bottom edge position) may not be used to generate the first edit rule. Instead, relative spatial attributes (e.g., width, height, area, center-x, center-y, etc.) may be used to match objects whose edges are in similar but not identical positions across slides. However, it should be understood that in other implementations, depending on the specific circumstances, exact spatial attributes may be used to generate the first edit rule. Furthermore, in some implementations, if the first object 114 is moved by the user 101, a second edit rule (which is a candidate for an edit suggestion) may be generated based on some specific alignment and scaling options, such as aligning to the top left corner, aligning to the top right corner, aligning to the bottom right corner, aligning to the bottom left corner, and / or aligning all edges (i.e., scaling for matching). The order of the second edit rules may be based on the direction of movement of the first object 114. Alternatively or additionally, edit suggestions may be filtered to avoid excessive shape shrinkage or left / right / up / down reversal.
[0049] Still refer to Figure 2The method 200 proceeds to step 230, where the edit suggestion is presented to the user 101 in a visual form for selection. As described above, the edit suggestion can describe a candidate edit to be performed on the second object, such as the second object 115. In some implementations, a user interface can be provided to present the edit suggestion. Alternatively or additionally, the edit suggestion can be presented as a preview of the document 103, where the edit suggestion is applied to the second object 115. In some implementations, the edit suggestion can be presented to the user 101 with the changes to the second object 115 highlighted, enabling the user 101 to visually compare the difference between the current document state and the state after the edit suggestion is applied. Alternatively or additionally, if the precise details of the edit suggestion are important but not clear from the preview alone (e.g., the exact font size), a readable description of the edit suggestion can be provided. For example, Figure 4 A schematic diagram showing a visual edit suggestion in accordance with an implementation of the application.
[0050] As Figure 4 shown, the edit suggestion 410 can be displayed in a vertical list to the right of the slide area 420, distinct from the existing list 430 of slides shown to the left of the slide area. In some implementations, the presentation of the edit suggestion can be activated manually, such as by pressing a button on the user interface. In some other implementations, the presentation of the edit suggestion can be activated automatically, for example, when it appears that the user is making repetitive edits in the document. For example, an activation threshold can be set to the number of repetitive applications of the same edit.
[0051] In some implementations, after the edit suggestion is presented to the user 101, the user 101 can send a request for an alternative edit suggestion if the edit suggestion does not satisfy the user 101. In response to receiving the request for an alternative edit suggestion from the user 101, an alternative edit suggestion can be generated. For example, as described above with reference to Figure 3 the alternative edit suggestion can be generated based on a plurality of second edit rules other than the second edit rule associated with the edit suggestion to be replaced (which are "relaxed" edit rules), and then the alternative edit suggestion can be presented to the user for selection in an order associated with the difference between the plurality of second edit rules and the first edit rule (e.g., indicated by the sum of the weights).
[0052] In other implementations, if the edit suggestion satisfies the user 101, the user 101 can select the edit suggestion. In response to the edit suggestion being selected by the user 101, the edit suggestion can be applied to the second object 115.
[0053] For example, Figure 5A flowchart of a method 500 of responding to application of an edit suggestion according to implementations of the application is shown. For example, the method 500 can be implemented by the computing device 102 as shown in Figure 1 Alternatively or additionally, the method 500 can be implemented as part of the document editing application 121. The method 500 will be described in connection with the example shown in Figure 1 For purposes of illustration only, in the following discussion, the object 117 is referred to as the “fourth object.”
[0054] In step 510, in response to application of the edit suggestion to the second object 115, the first edit rule is updated to indicate the edit performed on the second object 115. In some implementations, the first edit rule can be regenerated to indicate the edit performed on the second object 115. Alternatively or additionally, in cases where multiple (e.g., 3) first edit rules are supported, the regenerated first edit rule can be promoted to be the “active” edit rule with the highest priority, while the one with the previous lowest priority can be deleted. Then, in step 520, the edit suggestion is regenerated based on the updated first edit rule. The process of regenerating the edit suggestion can be according to the method 300 described above with reference to Figure 3 For example, the regenerated edit suggestion can describe an edit to be performed on the fourth object (such as the fourth object 117). The method 500 proceeds to step 530, where the regenerated edit suggestion is presented in visual form to the user for selection.
[0055] In some cases, for example as shown in Figure 1 After the user 101 makes a direct edit to the first object 114, the user can have the intention to perform a similar edit on the object 116. However, the third object 116 can be in a particular slide region, such as “top left” or overlapping with object X, whose condition can not be expressible as a “property: value” pair. To provide a solution for such a case, for example, Figure 6 A flowchart of a method 600 for formatting a document object with visual suggestions according to implementations of the application is shown. For example, the method 600 can be implemented by the computing device 102 as shown in Figure 1 Alternatively or additionally, the method 600 can be implemented as part of the document editing application 121. The method 600 will be described in connection with the example shown in Figure 1 For purposes of illustration only, in the following discussion, the object 116 is referred to as the “third object.”
[0056] In step 610, the first object 114 in the response document 103 is edited by the user 101, generating a first edit rule. The first edit rule indicates the edit performed on the first object 114. Then, in step 620, in response to the user's 101 selection of the third object 116, an edit suggestion is generated to suggest applying the first edit rule to the third object 116, rather than computing a "relax" edit rule as described above with reference to Figure 3 Method 600 then proceeds to step 630, where the regenerated edit suggestion is presented to the user in visual form for selection.
[0057] The methods described so far for formatting document objects are driven by edits (such as direct edits or edits through the application of edit suggestions) that the user wants to propagate throughout the document. However, in some cases, formatting that the user wants to propagate can already exist in the state of the document objects. Implementations of the present invention also provide a solution for this case.
[0058] Figure 7 A flowchart illustrating a method 700 for formatting document objects through visual suggestions, according to an implementation of the present invention, is shown. For example, method 700 can be implemented by the computing device 102 as shown in Figure 1 Alternatively or additionally, method 700 can be implemented as part of the document editing application 121. Method 700 will be described in connection with the example shown in Figure 1 For purposes of illustration only, in the following discussion, the object 118 is referred to as the "fifth object" and the object 119 is referred to as the "sixth object."
[0059] In step 710, a first edit rule is generated in response to an action indicating the user's 101 preference for the fifth object 118. In some implementations, the action indicating the preference for the fifth object 118 can be, for example, selecting the fifth object 118 and pressing a "like" button (or equivalent). In response to the action, the first edit rule (5) can be generated as follows.
[0060] (all attributes:value pairs of the liked fifth object 118) =>
[0061] (all attributes:value pairs of the liked fifth object 118) (5)
[0062] In some implementations, the user 101 can "like" more than one object. Thus, the following rule (6) can be generated.
[0063] (all attributes:value pairs shared by all liked objects) =>
[0064] (all attributes:value pairs shared by all liked objects) (6)
[0065] Liking more than one object also enables propagation of a subset of shared properties of the liked objects. For example, assume there are three objects "X", "Y", and "Z" in total, whose "property:value" pairs can be shown as follows:
[0066] X: (A: 1, B: 1, C: 1)
[0067] Y: (A: 2, B: 2, C: 1)
[0068] Z: (A: 1, B: 2, C: 1) (7)
[0069] Since the value of property "A" is 1, user 101 can "like" object "X", but he / she can not want to propagate property "B" of object "X" to other objects. In this case, since the value of property "B" of object "Z" is different from the value of property "B" of object "X", user can also "like" object "Z". In this way, the following rule (8) can be generated, which causes the value of property "B" of other objects to not be changed.
[0070] (A: 1, C: 1) => (A: 1, C: 1) (8)
[0071] Method 700 then proceeds to step 720, where an edit suggestion is generated based on the first edit rule. In some implementations, this can be done similarly to method 300 described above with reference to Figure 3 In other implementations, this can be done in response to user 101 selecting another object, and the edit suggestion can be generated to suggest applying the first edit rule to the other object, as described with reference to Figure 6 For example, the generated edit suggestion can describe a candidate edit to be performed on the sixth object 119.
[0072] Method 700 proceeds to step 730, where the edit suggestion is presented to user in a visual form for selection. In this way, formatting the document object can be driven by the state of the document object already existing in the document.
[0073] It will be appreciated that in some implementations, method 500 can also be performed after methods 600 and 700 and in response to user 101 selecting to apply the edit suggestion.
[0074] In some implementations, more than one edit suggestion can be generated based on the first edit rule, and all of the edit suggestions can be presented to the user for selection via the same user interface. The user can select the presented edit suggestions individually or select to apply them all at once.
[0075] Furthermore, in some implementations, if the user navigates to one editing unit of the document, in addition to generating editing suggestions that only match objects within that editing unit, other editing suggestions that match objects throughout the document can also be provided for selection, e.g., with a lower priority than previous editing suggestions. Similarly, other variations are contemplated in accordance with the subject matter described herein.
[0076] From the foregoing, it will be appreciated that implementations of the subject matter described herein allow for minimizing user operations required to make formatting changes throughout a document by showing how recent edits can be applied anywhere. Additionally, implementations in accordance with the subject matter described herein provide warnings and correction suggestions to the user if the user's edits introduce any inconsistencies, thereby ensuring visual consistency throughout the document. Furthermore, implementations of the subject matter described herein provide a solution for propagating edits performed by a user throughout a document in an interactive manner.
[0077] The functions described herein can be executed at least partially by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), etc.
[0078] Program code for carrying out the methods of the subject matter described in this specification can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, implements the functions / acts specified in the flowcharts and / or block diagrams. The program code can be retrieved from the machine's storage medium, downloaded from a remote machine, carried in on a computer-readable medium, or any suitable combination thereof.
[0079] In the context of this disclosure, a machine-readable medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0080] Moreover, while operations are depicted in a particular order, this should not be understood as requiring such an order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, while a number of specific implementation details have been included for the purpose of providing a thorough description of the subject matter, these should not be construed as limiting the scope of the subject matter described herein. Certain features are described in the context of separate implementations, and can also be implemented in combination in a single implementation. Conversely, various features are described in the context of a single implementation, and can also be implemented separately or in any appropriate subcombination.
[0081] The following lists some example implementations of the subject matter described herein.
[0082] In an aspect, an apparatus is provided. The apparatus includes a processing unit and a memory coupled to the processing unit and storing instructions for execution by the processing unit, the instructions, when executed by the processing unit, cause the apparatus to generate a first edit rule, the first edit rule indicating an edit performed on a first object in a document; generate an edit suggestion based on the first edit rule, the edit suggestion describing a candidate edit to be performed on a second object within a suggestion scope; and present the edit suggestion to a user in a visual form for selection.
[0083] In some implementations, the instructions, when executed by the processing unit, further cause the apparatus to, in response to the edit suggestion being selected by the user, apply the edit suggestion to the second object.
[0084] In some implementations, the first edit rule includes a plurality of conditions and a conclusion, the plurality of conditions indicating attribute value pairs of the first object before the edit, the conclusion indicating an edited attribute value pair of the first object, and the instructions, when executed by the processing unit, cause the apparatus to generate a plurality of second edit rules from the first edit rule, each of the plurality of second edit rules matching at least one of the objects within the suggestion scope, and conditions of the plurality of second edit rules are included in the plurality of conditions of the first edit rule; select one of the plurality of second edit rules, the selected second edit rule having a minimum difference with the first edit rule; and generate the edit suggestion based on the selected second edit rule.
[0085] In some implementations, the instructions, when executed by the processing unit, further cause the device to: generate a further edit suggestion based on the plurality of second edit rules other than the selected second edit rule; and present the further edit suggestion to the user for selection in an order associated with differences of the plurality of second edit rules and the first edit rule.
[0086] In some implementations, the instructions, when executed by the processing unit, further cause the device to: in response to a user selection of a third object, generate an edit suggestion to apply the first edit rule to the third object.
[0087] In some implementations, the instructions, when executed by the processing unit, further cause the device to: present the edit suggestion via a user interface as a preview of the document, wherein the edit suggestion is applied to the second object.
[0088] In some implementations, the instructions, when executed by the processing unit, further cause the device to: in response to applying the edit suggestion to the second object, update the first edit rule to indicate the edit performed on the second object; regenerate the edit suggestion based on the updated first edit rule, the regenerated edit suggestion describing a candidate edit to be performed on a fourth object within the suggestion scope; and present the regenerated edit suggestion to the user for selection in a visual form.
[0089] In some implementations, the document includes a plurality of edit units, and wherein the instructions, when executed by the processing unit, further cause the device to: in response to a user navigation to one of the plurality of edit units, update the suggestion scope to the one of the plurality of edit units.
[0090] In some implementations, the instructions, when executed by the processing unit, further cause the device to: in response to an action indicative of a user preference for a fifth object, generate the first edit rule indicative of a state of the fifth object.
[0091] In another aspect, a method is provided. The method includes: generating a first edit rule, the first edit rule indicating an edit performed on a first object in a document; generating an edit suggestion based on the first edit rule, the edit suggestion describing a candidate edit to be performed on a second object within a suggestion scope; and presenting the edit suggestion to a user for selection in a visual form.
[0092] In some implementations, the method further includes: in response to the edit suggestion being selected by the user, applying the edit suggestion to the second object.
[0093] In some implementations, the first editing rule includes a plurality of conditions and a conclusion, the plurality of conditions indicating attribute value pairs of the first object prior to the edit, the conclusion indicating an edited attribute value pair of the first object, and generating the edit suggestion based on the first editing rule includes: generating a plurality of second editing rules from the first editing rule, each of the plurality of second editing rules matching at least one of the objects within the suggested scope and conditions of the plurality of second editing rules being included in the plurality of conditions of the first editing rule; selecting one of the plurality of second editing rules, the selected second editing rule having a minimum difference from the first editing rule; and generating the edit suggestion based on the selected second editing rule.
[0094] In some implementations, the method further includes: generating a further edit suggestion based on the plurality of second editing rules other than the selected second editing rule; and presenting the further edit suggestion to the user for selection in an order associated with differences of the plurality of second editing rules and the first editing rule.
[0095] In some implementations, generating the edit suggestion based on the first editing rule includes: in response to a user selection of a third object, generating an edit suggestion suggesting application of the first editing rule to the third object.
[0096] In some implementations, presenting the edit suggestion to the user for selection in a visual form includes: presenting the edit suggestion as a preview of the document via a user interface, wherein the edit suggestion is applied to the second object.
[0097] In some implementations, the method further includes: in response to applying the edit suggestion to the second object, updating the first editing rule to indicate the edit performed on the second object; regenerating the edit suggestion based on the updated first editing rule, the regenerated edit suggestion describing a candidate edit to be performed on a fourth object within the suggested scope; and presenting the regenerated edit suggestion to the user for selection in a visual form.
[0098] In some implementations, the suggested scope is the entire document.
[0099] In some implementations, the document includes a plurality of editing units, and wherein the method further includes: in response to a user navigation to one of the plurality of editing units, updating the suggested scope to the one of the plurality of editing units.
[0100] In some implementations, the method further includes, in response to an action indicating a user preference for a fifth object, generating the first edit rule indicating a state of the fifth object.
[0101] In yet another aspect, a computer program product is provided. The computer program product is tangibly stored in a non-transitory machine readable medium and comprises machine executable instructions that, when executed on a device, cause the device to perform the steps of the method.
[0102] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A device comprising: a display; a processing unit in communication with the display; a memory in communication with the processing unit and storing instructions for execution by the processing unit, the instructions, when executed by the processing unit, cause the device to: receive a first edit performed by a user on a first object in a document, the first object displayed in a user interface provided in the display; generate an edit suggestion based on the first edit, the edit suggestion describing a candidate edit to be performed on a second object, such that a difference between the second object in a current document state and the second object in a state after the edit suggestion is applied is visually perceptible; and display a preview of the edit suggestion in the user interface.
2. The device of claim 1, wherein the first object and the second object are one of: a shape, a paragraph, or a run of text.
3. The device of claim 1, wherein the document includes a first edit unit and a second edit unit, and the first object is included in the first edit unit and the second object is included in the second edit unit.
4. The device of claim 1, wherein the instructions, when executed by the processing unit, further cause the device to: receive a selection of the edit suggestion by the user to be applied to the second object.
5. The device of claim 4, wherein the instructions, when executed by the processing unit, further cause the device to: apply the edit suggestion to the second object in response to receiving the selection of the edit suggestion by the user.
6. The device of claim 1, wherein the instructions, when executed by the processing unit, further cause the device to: present, via the user interface, the edit suggestion to be applied to the second object.
7. The device of claim 6, wherein the edit suggestion is presented and highlights the changes to the second object.
8. The device of claim 1, wherein the instructions, when executed by the processing unit, further cause the device to: activate the presentation of the edit suggestion in response to activation of a button on the user interface.
9. The device of claim 1, wherein the instructions, when executed by the processing unit, further cause the device to: receive a request to replace the edit suggestion; present another edit suggestion in response to the request; and display a preview of the other edit suggestion in the user interface.
10. A computer-implemented method comprising: receiving a first edit performed by a user on a first object in a document, the first object displayed in a user interface provided in a display; generating an edit suggestion based on the first edit, the edit suggestion describing a candidate edit to be performed on a second object, such that a difference between the second object in a current document state and the second object in a state after the edit suggestion is applied is visually perceptible; and displaying a preview of the edit suggestion in the user interface.
11. The method of claim 10, Receive the user's selection of the editing suggestions to be applied to the second object.
12. The method of claim 10, further comprising: In response to receiving the user's selection of the editing suggestion, the editing suggestion is applied to the second object.
13. The method of claim 12, further comprising: In response to the activation of a button on the user interface, the presentation of the edit suggestion is activated.
14. The method of claim 10, further comprising: Receive a request to replace the edit suggestion; In response to the request, another editing suggestion is presented; as well as A preview of the other editing suggestion is displayed in the user interface.
15. The method of claim 10, wherein the document comprises a first editing unit and a second editing unit, and the first object is included in the first editing unit and the second object is included in the second editing unit.
16. The method of claim 15, wherein the editing suggestion is associated with an attribute value pair.
17. A computer program product tangibly stored on a non-transitory machine-readable medium and comprising machine-executable instructions that, when executed on a device, cause the device to perform the steps of a method, the method comprising: Receive a first edit performed by the user on a first object in the document, the first object being displayed in a user interface provided on the display; Based on the first edit, an edit suggestion is generated, which describes candidate edits to be performed on the second object, such that the difference between the second object in the current document state and the second object in the state after the edit suggestion is applied is visually perceptible. as well as A preview of the edit suggestion is displayed in the user interface.
18. The computer program product of claim 17, wherein the document comprises a plurality of editing units, and wherein the method further comprises: Receive the user's selection of the editing suggestion to be applied to the second object; as well as In response to receiving the user's selection of the editing suggestion, the editing suggestion is applied to the second object.
19. The computer program product according to claim 17, wherein the method further comprises: In response to the activation of a button on the user interface, the presentation of the edit suggestion is activated.
20. The computer program product of claim 17, wherein the method further comprises: Receive a request to replace the edit suggestion; In response to the request, another editing suggestion is presented; as well as A preview of the other editing suggestion is displayed in the user interface.
Citation Information
Patent Citations
Formatting data by example
CN102609403A
Interactive text editing
CN103959283A