CN111460770B - Method, device, equipment and storage medium for synchronizing element attributes in document - Google Patents

Method, device, equipment and storage medium for synchronizing element attributes in document Download PDF

Info

Publication number
CN111460770B
CN111460770B CN202010239561.2A CN202010239561A CN111460770B CN 111460770 B CN111460770 B CN 111460770B CN 202010239561 A CN202010239561 A CN 202010239561A CN 111460770 B CN111460770 B CN 111460770B
Authority
CN
China
Prior art keywords
original
attribute
element set
document
elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010239561.2A
Other languages
Chinese (zh)
Other versions
CN111460770A (en
Inventor
吕毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202010239561.2A priority Critical patent/CN111460770B/en
Publication of CN111460770A publication Critical patent/CN111460770A/en
Application granted granted Critical
Publication of CN111460770B publication Critical patent/CN111460770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method, a device, equipment and a storage medium for synchronizing element attributes in a document, wherein the method comprises the following steps: the related elements can be generated from the original element set in the document, when the change of the attribute of the original element set in the document is detected, the attribute data or texture in the original element set can be acquired, and when the original element set is modified, the related elements are synchronously modified by using the acquired attribute data, or the related elements are rendered by using the texture of the original element set. The problem of low modification efficiency caused by searching and modifying the associated elements can be avoided without searching and modifying the associated elements by a user.

Description

Method, device, equipment and storage medium for synchronizing element attributes in document
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for synchronizing element attributes in a document.
Background
The document may be edited by various document editing software such as word processing software, graphic processing software, presentation creating software, etc., and when the user edits the document using these software, the same element (e.g., the same text box, button, page title, etc.) may be input at different locations of the document. The same elements may exist in the same page or in different pages, so that modifications to one element may occur, requiring the same modifications to other identical elements to be made equally frequently. For example, in a presentation, elements in page 1 are copied into page 2 such that there are elements in page 2 that appear exactly as in page 1. When elements in page 1 are modified in the future, it is also necessary to modify elements in page 2 accordingly. It can be seen that once editing is required, the problem of inefficient modification is faced in finding and modifying the same elements one by one.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for synchronizing element attributes in a document, which are used for solving the defect of low modification efficiency in the prior art.
According to a first aspect of an embodiment of the present invention, there is provided a method for synchronizing element attributes in a document, the method including:
when the change of the attribute of the original element set in the document is detected, acquiring attribute data or textures in the original element set; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
and synchronously modifying the associated element by using the acquired attribute data when modifying the original element set, or rendering the associated element by using the texture of the original element set.
In one embodiment, the association element is a pre-created element that is the same as the original set of elements;
the step of synchronously modifying the association element by using the acquired attribute data comprises the following steps: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
In one embodiment, the attributes include preset unique attributes and preset general attributes, and acquiring the condition of the attribute data or texture in the original element set further includes: the changed attribute is a preset unique attribute; the method further comprises the steps of:
and when the general attribute of the original element set in the document is detected to be changed, modifying the original element set, wherein the associated element is kept unchanged.
In one embodiment, the associated element is a mirror image of the original set of elements and shares the same texture as the original set of elements, the unique attribute is an attribute that causes texture changes in the original set of elements, and the generic attribute is an attribute that does not cause texture changes in the original set of elements.
In one embodiment, the method further comprises one or more of the following modifications:
when the general attribute of the associated element in the document is detected to be changed, modifying the associated element, wherein the original element set is kept unchanged;
and if the change of the unique attribute of the associated element in the document is detected, synchronously modifying the associated element and the original element set.
In one embodiment, when the change of the unique attribute of the associated element in the document is detected, the associated element and the original element set are synchronously modified, including:
If the associated element is the element which is created in advance and is the same as the original element set, detecting that the unique attribute of the associated element in the document is changed, acquiring attribute data in the associated element, and synchronously modifying the original element set by using the acquired attribute data when modifying the associated element;
if the associated element is a mirror image of the original element set, forwarding the operation on the associated element to the original element set accordingly to modify both the original element set and the associated element by modifying the texture of the original element set.
In one embodiment, the set of original elements and the associated elements are on different pages of a document.
In one embodiment, the original set of elements includes the entire content of a page in the document.
In one embodiment, the content presented by the element within the document includes: window of application program.
In one embodiment, the document is presented in a document editing software window, and the content presented by the elements within the document includes: and displaying the content at the position corresponding to the position of the element in the next layer of the layer where the document editing software window is positioned.
In a second aspect of the embodiment of the present invention, there is provided a device for synchronizing element attributes in a document, the device including:
the data acquisition module is used for acquiring attribute data or textures in an original element set if detecting that the attribute of the original element set in the document is changed; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
and the synchronous modification module is used for synchronously modifying the associated element by using the acquired attribute data or rendering the associated element by using the texture of the original element set when modifying the original element set.
In a third aspect of the embodiment of the present invention, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
when the change of the attribute of the original element set in the document is detected, acquiring attribute data or textures in the original element set; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
and synchronously modifying the associated element by using the acquired attribute data when modifying the original element set, or rendering the associated element by using the texture of the original element set.
In one embodiment, the device is a smart interactive tablet.
In a fourth aspect of the embodiments of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods described above.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects:
the embodiment of the invention provides an element attribute synchronization scheme in a document, which can improve the modification efficiency, wherein an associated element can be generated by an original element set in the document, when the change of the attribute of the original element set in the document is detected, attribute data or textures in the original element set can be acquired, and when the original element set is modified, the acquired attribute data is utilized to synchronously modify the associated element, or the associated element is rendered by using the textures of the original element set, so that a user is not required to search and modify the associated element, and the problem of low modification efficiency caused by searching and modifying the associated element can be avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1A is a diagram of a document editing software interface according to an exemplary embodiment of the present invention.
FIG. 1B is a flowchart illustrating a method for synchronizing element properties within a document according to an exemplary embodiment of the present invention.
Fig. 2A is a diagram illustrating a single pixel map according to an exemplary embodiment of the present invention.
FIG. 2B is a diagram illustrating a multi-element mapping according to an exemplary embodiment of the present invention.
FIG. 2C is a diagram illustrating a page mapping according to an exemplary embodiment of the present invention.
FIG. 2D is a diagram illustrating elements comprising a program window according to an exemplary embodiment of the present invention.
FIG. 2E is a schematic diagram of another element containing a program window according to an exemplary embodiment of the present invention.
FIG. 2F is a schematic diagram of another element containing a program window according to an exemplary embodiment of the present invention.
Fig. 2G is a schematic diagram of another element of the present invention, according to an exemplary embodiment.
FIG. 3 is a block diagram illustrating an in-document element attribute synchronization apparatus according to an exemplary embodiment of the present invention.
FIG. 4 is a hardware block diagram of an electronic device in which the element attribute synchronization apparatus in the document of the present invention is located.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the invention. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The document related to the embodiment of the invention can be edited by various document editing software such as word processing software, graphic processing software, presentation making software and the like. When a user edits a document using such software, the same element may be entered at a different location in the document. The elements within the document may be text elements, shape elements, etc., e.g., text boxes, buttons, page titles, etc. As shown in FIG. 1A, a document editing software interface diagram illustrating a document formed by a multi-page presentation is shown in accordance with an exemplary embodiment of the present invention. A page may represent a container that may carry a presentation. Such as one page in Microsoft PowerPoint, or one canvas in the his Wo Bai board. An element, as in the figure, may be an object placed into a page for carrying content. Corresponding to an object in Microsoft PowerPoint, or to an element in a plate of his Wo Bai. For example, a shape, a picture, etc. are all elements.
In the related art, elements in the page 1 are often copied into the page 2, and thus, the elements in the page 1 and the page 2 can be presented in a uniform manner. When an element in page 1 is to be modified, the same element in page 2 also needs to be looked up and modified. Sometimes, to present some more cool features, an element animation may also be set, or some element may be obscured by other elements in some pages. At this time, it may happen that the elements in the page 1 can be directly edited, but the same elements in the page 2 are blocked by other elements, if it is desired to edit the elements in the pages 1 and 2, the other elements used for blocking the same elements in the page 2 need to be removed, and after the same elements are modified, the other elements are moved back to the original positions, so that the modification efficiency is low whether the same elements are searched or the other elements are moved.
In view of this, the embodiment of the invention provides a document element attribute synchronization scheme capable of improving modification efficiency, in which an associated element can be generated from an original element set, when detecting that an attribute of the original element set in the document is changed, attribute data or textures in the original element set can be obtained, and when the original element set is modified, the obtained attribute data is utilized to synchronously modify the associated element, or textures of the original element set are utilized to render the associated element, so that a user is not required to search and modify the associated element, and the problem of low modification efficiency caused by searching and modifying the associated element can be avoided.
The method for synchronizing the element attributes in the document provided in this embodiment may be implemented by software, or may be implemented by a combination of software and hardware or by hardware, where the hardware involved may be composed of two or more physical entities, or may be composed of one physical entity. The method of the embodiment can be applied to electronic equipment. The electronic device may be an intelligent writing device such as an intelligent interaction tablet, a digital tablet, or an intelligent writing device such as a smart phone, an intelligent learning machine, a tablet computer, a notebook computer, a desktop computer, a PDA (Personal Digital Assistant ), or the like.
In one embodiment, a smart interactive tablet is illustrated as an example. The execution subject of the embodiment of the invention can be an intelligent interaction panel, document editing software installed in the intelligent interaction panel, and the like.
The intelligent interaction panel, also called as an interaction intelligent panel, can be integrated equipment for controlling the content displayed on the display panel and realizing man-machine interaction operation through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, a sound, a television, a video conference terminal and the like. The intelligent interaction tablet may be pre-installed with the document editing software, or may be downloaded and installed from a third party device or server when the document editing software is needed. The third party device is not limited in this embodiment.
Next, an embodiment of the present invention will be exemplified with reference to the drawings.
As shown in FIG. 1B, FIG. 1B is a flow chart illustrating a method of synchronizing element attributes within a document according to an exemplary embodiment of the present invention, which may include the following steps 102 through 104:
in step 102, acquiring attribute data or textures in an original element set if the attribute of the original element set in a document is detected to be changed; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
In step 104, the associated elements are synchronously modified with the acquired attribute data or rendered using the texture of the original element set while modifying the original element set.
In this embodiment, the association element may be generated from a set of original elements, and the set of original elements may include one original element or may include a plurality of original elements. It will be appreciated that, in the case where the set of primitive elements includes a plurality of primitive elements, each primitive element may be a plurality of elements selected according to the user's requirement in the page, and the plurality of primitive elements are not limited to be combined into one object. I.e. the elements do not need to be particularly associated with each other, but may be elements of the same page that are not or are related. Correspondingly, the associated element can correspond to an original element, and the mapping relation is simply called single element mapping; the association element may also correspond to a plurality of original elements, and this mapping relationship is simply referred to as multi-element mapping. The associated element and the original element set can be in different positions of the same page or in different pages. The following is an example of the association element and the original element set in different pages. FIG. 2A is a single pixel map diagram according to an exemplary embodiment of the present invention. As shown in FIG. 2B, a multi-element mapping diagram is shown according to an exemplary embodiment of the present invention. In FIG. 2A, the original set of elements in page 2 is made up of one element, and the associated elements in page 1 are generated from the elements in page 2. In FIG. 2B, the original set of elements in page 2 is made up of multiple elements (e.g., 3 elements), and the associated elements in page 1 are generated from the set of elements in page 2.
In one example, the original element set includes the entire content of one page in the document, and then the associated element in a certain page may correspond to the entire content of another page, and this mapping relationship is simply referred to as page mapping. As shown in FIG. 2C, a page mapping diagram is shown in accordance with an exemplary embodiment of the present invention. An element is placed in page 1 that presents the full appearance of page 2. The elements of the complete page 2 are displayed in page 1 and still only one element. It can be seen that in this embodiment, the associated element corresponds to the entire content of another page, thereby expanding the diversity of element mapping.
The initial association element may be the same as the original set of elements, and the initial association element may be referred to as the same element of the original set of elements, or a repeating element. After the initial association element is generated, the association element may be changed with any change to the original set of elements in one example, and only with a partial change to the original set of elements in another example. For this purpose, the modified association element may be the same as the original element set, or may have a difference.
Two approaches are provided below for illustration of how the association elements are generated.
In one embodiment, the association element may be a mirror image of the original set of elements, the association element sharing the same texture as the original set of elements. For example, an initial association element may be created by right clicking on the select "mirror" control after the original set of elements is selected.
The texture of each element may be composed of one or more sub-textures, and the texture of the original set of elements is composed of the textures of the original elements it contains. When a graphics processing operation requires texture data (e.g., for rendering a frame (image) to be displayed), it is typically first fetched from a memory storing the texture data required for the rendering process, and then the fetched texture data is used by the graphics processor to perform the required rendering operation.
Texture (Texture) is a concept in computer graphics and is commonly used in the rendering of 3D models. The 3D model in the computer may be formed by a triangle splice, such as a horse using a triangle splice. The model of a real horse is more similar when the triangles are more. The process of drawing a pattern on a triangle is called "Texture Mapping", and the drawn pattern is called Texture, and the process of Texture Mapping may be the process of Mapping a planar pattern to a 3D massive triangle surface. For example, a large number of 3D model building and rendering computations may be handed to a dedicated Graphics Processor (GPU), which may operate differently than a CPU, and may be computationally intensive in parallel, and thus may be more adept at performing texture and model computations and rendering. In computer 2D rendering, 3D achievements are also often borrowed to improve 2D rendering performance. For example, two triangles are used to stitch into the same rectangle as the screen drawing area, and then the pattern is rendered onto the rectangle. Textures can be rendered and synthesized (Composition), and the process of synthesis can also be computed in the GPU, which is very efficient.
The elemental texture used for rendering of the present embodiment may be the texture of the elemental portion that it is synthesized to before the final rendered image. In a hardware-accelerated computer system, it may reside in a dedicated GPU memory (commonly referred to as "video memory"); in non-accelerating computer systems, they may exist in the memory of the conventional descriptions. It can be accessed using a pointer to this memory region.
In this embodiment, since the association element may share the same texture as the original element set, the association element may be a mirror image of the original element set, modified as the original element set is modified. The mode of sharing textures is adopted, and is irrelevant to operation, and is the common use of a piece of binary data on a memory and a display card.
In another embodiment, the association element is a pre-created element that is the same as the original set of elements. As an example, the original set of elements may be selected and then the original set of elements may be created by copy-and-paste. Further, the modifying the association element synchronously by using the acquired attribute data includes: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
The serialization may be writing the physical object state into the ordered byte stream according to a certain format, and the anti-serialization may be reconstructing the object from the ordered byte stream, recovering the object state.
This embodiment uses both serialization and de-serialization to achieve that when modifying the original set of elements, the associated elements are modified synchronously by retrieval and rearrangement from the data.
It should be understood that other ways of modifying the association element synchronously with the modification of the original element set may also be employed, and will not be described in detail herein.
In some scenarios, it may be desirable for the associated element to interact equally with the original set of elements, i.e., the associated element of the map presentation is identical to the original set of elements, for which any modification to the original set of elements is synchronously changed to the associated element. While in other scenarios, there may be the following requirements: partial modifications to the original set of elements may be synchronized to the associated elements, while additional partial modifications are not desired to be synchronized to the associated elements. As shown in FIG. 2C, the element sizes in page 1 and page 2 may be sized like normal elements, and the associated elements in page 1 may not be sized when the element sizes in page 2 are modified. The associated element size in page 1 does not necessarily look always as large as page 2. Page 1 as shown in FIG. 2C is actually resized so that the associated element presents page 2 that is smaller than the actual page 2.
To this end, in one embodiment, the attributes may be divided into preset unique attributes and preset generic attributes. Aiming at the preset unique attribute, the associated element is modified along with the modification of the original element set; aiming at the preset general attribute, the associated element is not modified along with the modification of the original element set. Correspondingly, the acquiring the attribute data or the texture condition in the original element set further comprises: the changed attribute is a preset unique attribute; that is, when it is detected that the attribute of the original element set in the document is changed and the changed attribute is a preset unique attribute, attribute data or texture in the original element set is acquired. Further, the method further comprises: and when the general attribute of the original element set in the document is detected to be changed, modifying the original element set, wherein the associated element is kept unchanged.
Therefore, by dividing the attributes into preset unique attributes and preset general attributes, the special properties of part of the attributes can be reserved on the premise that the associated elements and the original element set are identical, and the requirements of different scenes are met.
Regarding how to divide the preset unique attributes and preset generic attributes, in one example, they may be preconfigured by a user or software developer as desired. In another example, for the case where the associated element is a mirror image of the original set of elements and the associated element shares the same texture as the original set of elements, the unique attribute may be an attribute that would cause a texture change in the original set of elements, and the generic attribute is an attribute that would not cause a texture change in the original set of elements. For example, when the primitive element set is composed of one primitive element, the common attribute may be an element attribute corresponding to operations such as rotating the primitive element, moving the primitive element position, scaling the primitive element size, and the like, and the attribute does not cause the primitive element texture to change. The unique attribute can be an element attribute corresponding to operations such as font size, color, graphic type and the like in the changed element, and the attribute can cause the original element texture to change. When the original element set includes a plurality of original elements, the texture of the original element set is composed of the textures of the plurality of original elements, and at this time, the common attribute of a single original element may be changed to the unique attribute of the original element set. For example, if the original element set is the whole page 2 and the original element a in the original element set moves, since the original element a is a part of the page 2 and the associated element in the page 1 is the whole page 2, the original element a moves to cause the texture of the page 2 to change, and accordingly, the associated element is changed as a result of being displayed in the page 1.
The embodiment divides the general attribute and the unique attribute by whether the texture of the original element set is changed or not, so that the dividing time can be saved, and the automatic dividing is realized.
It should be understood that the general attribute and the unique attribute are divided by whether the texture of the original element set is changed or not, and other modes can be adopted for dividing according to the requirement, which is not described in detail herein.
In some scenarios, there may be a need to asynchronously modify the original element set while modifying the associated element, which may be referred to as no interaction. And when the attribute of the associated element in the document is detected to be changed, modifying the associated element, wherein the original element set is kept unchanged. For the case where there is a division of attributes, the attributes may include generic attributes and unique attributes. The embodiment can realize that the original element set is not changed along with the change of the associated element.
In other scenarios, there may be a need to be able to synchronously modify the original set of elements while modifying the associated elements. In one embodiment, when the attribute of the associated element in the document is detected to be changed, the associated element and the original element set can be modified at the same time. In another embodiment, for the case of dividing the attribute into a preset unique attribute and a preset general attribute, it may be implemented that: and if the change of the unique attribute of the associated element in the document is detected, synchronously modifying the associated element and the original element set. Further, when the general attribute of the associated element in the document is detected to be changed, the associated element is modified, and the original element set is kept unchanged. In this embodiment, the original set of elements may change as the unique attributes of the associated elements change, rather than as the generic attributes of the associated elements change, thereby expanding the diversity of interactions.
Regarding how to synchronously modify the associated element and the original element set, in one example, if the associated element is a pre-created element identical to the original element set, and it is detected that a change occurs in a unique attribute of the associated element in the document, attribute data in the associated element is obtained, and when the associated element is modified, the original element set is synchronously modified by using the obtained attribute data.
In this embodiment, the original element set may be synchronously modified in a manner of attribute reset.
In another example, if the associated element is a mirror image of the original set of elements, operations on the associated element are correspondingly forwarded onto the original set of elements to modify both the original set of elements and the associated element by modifying the texture of the original set of elements.
The associated element is a brush image generated using the original set of elements. The mouse or touch operation of the related elements comprises pressing and moving and lifting, and the operation is correspondingly forwarded to the original element, so that the same operation is carried out on the original element. In this way, any changes in the presentation made by the original element according to the operation are re-reflected to the associated element.
In this embodiment, the operation of the associated element is forwarded to the original set of elements such that the original set of elements is similar to receiving the operation from the user, thereby modifying the texture of the original set of elements, thereby enabling modification of the original set of elements and associated elements.
Regarding elements, not only text elements, graphic elements, etc., in practical applications, there may be a need for inserting software into a page, and for this purpose, contents presented by elements in a document may further include: window of application program. The application may be not only a third party application but also current document editing software. FIG. 2D is a schematic diagram of elements comprising a program window according to an exemplary embodiment of the present invention. In page 1 an element is shown which presents a window of a calculator application. It can be seen that the presentation of application windows in a page can be implemented. The calculator is an application program in the system and is a window program. The window program will adapt the layout appropriately when resizing the window so that it can be better displayed normally at the new size.
For elements comprising an application window, there may be at least two ways of presentation after adjusting the size of the element, in one example, resizing the element may result in a change in the size of the program window and the layout inside the window may be re-adaptively adjusted. In another example, resizing elements does not cause the layout inside the window to change, but instead adjusts the window as bitmap scaling.
FIG. 2E is a schematic diagram of another element containing a program window according to an exemplary embodiment of the present invention. The schematic adjusts the window in a manner that adjusts the window, and the layout inside the window changes. FIG. 2F is a schematic diagram of another element containing a program window according to an exemplary embodiment of the present invention. The diagram adjusts the window in a way that scales the bitmap, and the layout inside the window does not change. But the image is deformed by stretching. Of course, if the aspect ratio is maintained while the element is resized, the scaling is not stretch deformed but merely enlarged or reduced.
In the invention, another presentation scheme can be extended to realize the elements in a certain page, and the content behind the program can be equivalently displayed (equivalent to that the area where the elements are located is transparent). For example, the document is presented in a document editing software window, and the content presented by the elements in the document includes: and displaying the content at the position corresponding to the position of the element in the next layer of the layer where the document editing software window is positioned. As shown in fig. 2G, there is another elemental schematic illustrating the present invention according to an exemplary embodiment. In the schematic diagram, although the elements are in one page, the content of other programs behind the program interface can be displayed, and the displayed effect is similar to that the area where the elements are located is hollowed-out and transparent.
On the operating system, since all windows are synthesized by the system (instead of rendering of windows in the old operating system overlapping each other), the synthesized result of all windows behind the current window can be obtained at any time through the API of the system. For example, the obtained result may be used as a bitmap, and the bitmap may be cut to a location area where the current element is located and displayed; the result of the composition of all the subsequent windows may also be obtained from the GPU.
The various technical features of the above embodiments may be arbitrarily combined as long as there is no conflict or contradiction between the combinations of the features, but are not described one by one, so that the arbitrary combination of the various technical features of the above embodiments also falls within the scope of the disclosure of the present specification.
For example, a single element map (an associated element corresponding to one original element)/multiple element maps (an associated element corresponding to multiple original elements) may implement equal interactions, i.e., an associated element may interact equally with an original element, where the map presents the same associated element as the original element. For example, there are two different implementations: 1. true generation is a mere element. Any editing of the element can simultaneously acquire the latest editing data of the element and synchronize the latest editing data to the original element. 2. A brush mirror image is generated, i.e. only displayed the same at the display level. The mouse or touch operation of the related element comprises pressing, moving and lifting, and can be correspondingly forwarded to the original element, so that the same operation is carried out on the original element. In this way, any changes in the presentation of the original element according to the operation are re-reflected to the new mirrored element. For mapping a brush image, basically both the operating system and the mainstream UI framework are supported, so they can be used directly. While forwarding an operation to another element may only be supported by a portion of the UI framework, forwarding logic may be handled by itself for unsupported UI frameworks.
The single element mapping/multi-element mapping can also realize no interaction, namely only the content of the original element is displayed, any interaction action on the associated element does not influence the original element set, and the associated element is just like a shadow element. This embodiment may be implemented in a shared texture manner.
For the case that the associated element corresponds to the whole content of another page, the same interaction and no interaction can be realized, and the page and the element are realized by the same UI realization mode, so that the technical realization is identical, and the description is omitted here.
For elements containing program windows, in one example, modifications to application windows in an element may synchronously modify the actual application window. Embedding the application window into this document editing software can be implemented through the system API in the main graphical operating system. When a program is embedded, all interactions naturally occur on that program at this time, since the actual program itself is displayed at this time. In another example, the actual application window cannot be modified by the element that contains the program window. On an operating system, thumbnails of some other program window are typically available using the system API. Of course this thumbnail is not a small picture that has lost accuracy, but is a texture that is present in the graphics card device. The texture can be displayed in the document editing software by using the system API, and the texture is specifically shown in the area where the specified mirror image element is located.
It can be seen from the above embodiments that the element that is created repeatedly by the user is changed into one element and several mirror images of this element, avoiding the situation that multiple edits are required to modify all elements. In addition, other programs can be embedded into the program, so that in the same program, the playing of the presentation is controlled to directly control the area to which the target program should be started, and the situation that the projection needs to be minimized and then the program is searched in other folders is avoided.
Describing the functions that the present invention can implement in a specific example, the user may make a text (the original set of elements) in the first page, and then animate it: moving it from left to right. In the second page, the same text (associated element) is made, and in the second page, at the position where the animation of the first page ends, the animation to be made is enlarged. At this time, if the text is found to need modification, both the first page and the second page are needed to be modified. The text modification can be regarded as modification of the unique attribute, and the animation setting of the element can be regarded as modification of the general attribute, so that when the text of the first page is modified by adopting the scheme, the text of the second page is synchronously modified, but the animation setting of the original element in the first page does not influence the animation of the associated element in the second page.
The invention also provides an embodiment of the element attribute synchronization device in the document, the electronic equipment applied by the element attribute synchronization device in the document and a computer storage medium corresponding to the embodiment of the element attribute synchronization method in the document.
As shown in FIG. 3, FIG. 3 is a block diagram illustrating an in-document element attribute synchronization apparatus according to an exemplary embodiment of the present invention, the apparatus comprising:
the data obtaining module 32 is configured to obtain attribute data or texture in an original element set if it is detected that an attribute of the original element set in a document is changed; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
and the synchronous modification module 34 is used for synchronously modifying the associated element by using the acquired attribute data or rendering the associated element by using the texture of the original element set when modifying the original element set.
In one embodiment, the association element is a pre-created element that is the same as the original set of elements;
the synchronization modification module 34 uses the acquired attribute data to synchronously modify the association element, including: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
In one embodiment, the attributes include preset unique attributes and preset general attributes, and acquiring the condition of the attribute data or texture in the original element set further includes: the changed attribute is a preset unique attribute; the synchronization modification module 34 is further configured to:
and when the general attribute of the original element set in the document is detected to be changed, modifying the original element set, wherein the associated element is kept unchanged.
In one embodiment, the associated element is a mirror image of the original set of elements and shares the same texture as the original set of elements, the unique attribute is an attribute that causes texture changes in the original set of elements, and the generic attribute is an attribute that does not cause texture changes in the original set of elements.
In one embodiment, the synchronization modification module 34 further includes one or more of the following modifications:
when the general attribute of the associated element in the document is detected to be changed, modifying the associated element, wherein the original element set is kept unchanged;
and if the change of the unique attribute of the associated element in the document is detected, synchronously modifying the associated element and the original element set.
In one embodiment, the synchronization modification module 34 is specifically configured to:
If the associated element is the element which is created in advance and is the same as the original element set, detecting that the unique attribute of the associated element in the document is changed, acquiring attribute data in the associated element, and synchronously modifying the original element set by using the acquired attribute data when modifying the associated element;
if the associated element is a mirror image of the original element set, forwarding the operation on the associated element to the original element set accordingly to modify both the original element set and the associated element by modifying the texture of the original element set.
In one embodiment, the set of original elements and the associated elements are on different pages of a document.
In one embodiment, the original set of elements includes the entire content of a page in the document.
In one embodiment, the content presented by the element within the document includes: window of application program.
In one embodiment, the document is presented in a document editing software window, and the content presented by the elements within the document includes: and displaying the content at the position corresponding to the position of the element in the next layer of the layer where the document editing software window is positioned.
Correspondingly, the embodiment of the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the following method when executing the program:
when the change of the attribute of the original element set in the document is detected, acquiring attribute data or textures in the original element set; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set;
and synchronously modifying the associated element by using the acquired attribute data when modifying the original element set, or rendering the associated element by using the texture of the original element set.
In one example, the device is a smart interactive tablet.
Accordingly, an embodiment of the present invention further provides a computer readable storage medium having a computer program stored thereon, where the program when executed by a processor implements the steps of the method for synchronizing element attributes in a document according to any of the above.
The present invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (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 non-transmission medium, may be used to store information that may be accessed by the computing device.
Specific details of the implementation process of the functions and roles of each module in the device are shown in the implementation process of the corresponding steps in the method, and are not repeated here.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The embodiment of the element attribute synchronization device in the document can be applied to electronic equipment. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in a nonvolatile memory into a memory by a processor of an electronic device where the device is located for operation. In terms of hardware, as shown in fig. 4, a hardware structure diagram of an electronic device in which the element attribute synchronization device 432 in the document of the present invention is located is shown in fig. 4, and in addition to the processor 410, the network interface 420, the memory 430, and the nonvolatile memory 440 shown in fig. 4, the electronic device in which the device 432 is located in the embodiment generally may further include other hardware according to the actual function of the electronic device, which is not described herein again.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (11)

1. A method for synchronizing element attributes within a document, the method comprising:
when the change of the attribute of the original element set in the document is detected, acquiring attribute data or textures in the original element set; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set; the associated element is a pre-created element that is the same as an element in the original element set; the original element set and the associated element are on different pages of the document; the attributes comprise preset unique attributes and preset general attributes; the associated element is a mirror image of the original element set, and shares the same texture with the original element set, the unique attribute is an attribute which can cause texture change in the original element set, and the universal attribute is an attribute which can not cause texture change in the original element set;
When the original element set is modified, synchronously modifying the associated elements by using the acquired attribute data, or rendering the associated elements by using textures of the original element set;
the step of synchronously modifying the association element by using the acquired attribute data comprises the following steps: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
2. The method of claim 1, wherein obtaining the condition of the attribute data or texture in the original set of elements further comprises: the changed attribute is a preset unique attribute; the method further comprises the steps of:
and when the general attribute of the original element set in the document is detected to be changed, modifying the original element set, wherein the associated element is kept unchanged.
3. The method of claim 1, further comprising one or more of the following modifications:
when the general attribute of the associated element in the document is detected to be changed, modifying the associated element, wherein the original element set is kept unchanged;
And if the change of the unique attribute of the associated element in the document is detected, synchronously modifying the associated element and the original element set.
4. The method of claim 3, wherein the detecting that the unique attribute of the associated element in the document changes, then modifying the associated element and the original element set synchronously comprises:
if the associated element is the element which is created in advance and is the same as the original element set, detecting that the unique attribute of the associated element in the document is changed, acquiring attribute data in the associated element, and synchronously modifying the original element set by using the acquired attribute data when modifying the associated element;
if the associated element is a mirror image of the original element set, forwarding the operation on the associated element to the original element set accordingly to modify both the original element set and the associated element by modifying the texture of the original element set.
5. The method of any of claims 1-4, wherein the set of original elements comprises the entire content of a page in the document.
6. The method of any one of claims 1 to 4, wherein the content presented by the element within the document comprises: window of application program.
7. The method of any one of claims 1 to 4, wherein the document is presented in a document editing software window, and wherein the content presented by the element within the document comprises: and displaying the content at the position corresponding to the position of the element in the next layer of the layer where the document editing software window is positioned.
8. An in-document element attribute synchronization apparatus, the apparatus comprising:
the data acquisition module is used for acquiring attribute data or textures in an original element set if detecting that the attribute of the original element set in the document is changed; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set; the associated element is a pre-created element that is the same as an element in the original element set; the original element set and the associated element are on different pages of the document; the attributes comprise preset unique attributes and preset general attributes; the associated element is a mirror image of the original element set, and shares the same texture with the original element set, the unique attribute is an attribute which can cause texture change in the original element set, and the universal attribute is an attribute which can not cause texture change in the original element set;
The synchronous modification module is used for synchronously modifying the associated elements by using the acquired attribute data or rendering the associated elements by using textures of the original element set when modifying the original element set;
the step of synchronously modifying the association element by using the acquired attribute data comprises the following steps: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor performs the following method when executing the program:
when the change of the attribute of the original element set in the document is detected, acquiring attribute data or textures in the original element set; the original element set comprises one or more original elements, and the document also comprises associated elements generated by the original element set; the associated element is a pre-created element that is the same as an element in the original element set; the original element set and the associated element are on different pages of the document; the attributes comprise preset unique attributes and preset general attributes; the associated element is a mirror image of the original element set, and shares the same texture with the original element set, the unique attribute is an attribute which can cause texture change in the original element set, and the universal attribute is an attribute which can not cause texture change in the original element set;
When the original element set is modified, synchronously modifying the associated elements by using the acquired attribute data, or rendering the associated elements by using textures of the original element set;
the step of synchronously modifying the association element by using the acquired attribute data comprises the following steps: and carrying out serialization operation on the attribute data of the original element set, and carrying out deserialization operation on the associated element by utilizing the obtained serialization data so as to reconfigure the attribute of the associated element and synchronously modify the associated element and the original element set.
10. The device of claim 9, wherein the device is a smart interactive tablet.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
CN202010239561.2A 2020-03-30 2020-03-30 Method, device, equipment and storage medium for synchronizing element attributes in document Active CN111460770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010239561.2A CN111460770B (en) 2020-03-30 2020-03-30 Method, device, equipment and storage medium for synchronizing element attributes in document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010239561.2A CN111460770B (en) 2020-03-30 2020-03-30 Method, device, equipment and storage medium for synchronizing element attributes in document

Publications (2)

Publication Number Publication Date
CN111460770A CN111460770A (en) 2020-07-28
CN111460770B true CN111460770B (en) 2024-03-08

Family

ID=71680213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010239561.2A Active CN111460770B (en) 2020-03-30 2020-03-30 Method, device, equipment and storage medium for synchronizing element attributes in document

Country Status (1)

Country Link
CN (1) CN111460770B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507129B (en) * 2020-12-07 2023-09-08 云南电网有限责任公司普洱供电局 Content change processing method of power distribution network operation file and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876335B1 (en) * 2006-06-02 2011-01-25 Adobe Systems Incorporated Methods and apparatus for redacting content in a document
CN102663002A (en) * 2012-03-16 2012-09-12 掌中帷幄(北京)科技有限公司 Method and system for structured-document rendering
CN107256259A (en) * 2017-06-12 2017-10-17 广东神马搜索科技有限公司 Page display method, device, electronic equipment and storage medium
CN109145272A (en) * 2018-07-27 2019-01-04 广州视源电子科技股份有限公司 Text rendering and layout method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9507520B2 (en) * 2013-12-16 2016-11-29 Microsoft Technology Licensing, Llc Touch-based reorganization of page element

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876335B1 (en) * 2006-06-02 2011-01-25 Adobe Systems Incorporated Methods and apparatus for redacting content in a document
CN102663002A (en) * 2012-03-16 2012-09-12 掌中帷幄(北京)科技有限公司 Method and system for structured-document rendering
CN107256259A (en) * 2017-06-12 2017-10-17 广东神马搜索科技有限公司 Page display method, device, electronic equipment and storage medium
CN109145272A (en) * 2018-07-27 2019-01-04 广州视源电子科技股份有限公司 Text rendering and layout method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111460770A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
JP6953588B2 (en) Systems and methods for automatic conversion of interactive sites and applications that support mobile and other viewing environments
AU2004240229B2 (en) A radial, three-dimensional, hierarchical file system view
US7009611B2 (en) Generating three dimensional text
TWI394055B (en) Common charting using shapes
RU2360284C2 (en) Linking desktop window manager
KR101086570B1 (en) Dynamic window anatomy
US11113874B2 (en) Displaying rich text on 3D models
TW201539294A (en) Cross-platform rendering engine
CN104809123A (en) Method and system for rendering webpages
CN107179920B (en) Network engine starting method and device
CN111460770B (en) Method, device, equipment and storage medium for synchronizing element attributes in document
US20090002386A1 (en) Graphical Representation Creation Mechanism
US20130063482A1 (en) Application programming interface for a bitmap composition engine
US6232988B1 (en) Systems and methods for converting a component in an animation to an interactive object
CN114913277A (en) Method, device, equipment and medium for three-dimensional interactive display of object
AU2015216600B2 (en) A system for comparison and merging of versions in edited websites and interactive applications
US10489499B2 (en) Document editing system with design editing panel that mirrors updates to document under creation
US20170147537A1 (en) Method, apparatus and system for reproducing a document defined in a page description language
KR102430556B1 (en) A method and system for generating slide show
CN116521039B (en) Method and device for moving covered view, electronic equipment and readable storage medium
CN115630250A (en) Virtual key display method and device, electronic equipment and storage medium
CN115311397A (en) Method, apparatus, device and storage medium for image rendering
CN116206014A (en) Image preview method, device, equipment and storage medium
CN117611711A (en) Method, apparatus, device and medium for generating cartoon
CN113901164A (en) WebGIS rendering management method and system based on GeoJSON

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant