[go: up one dir, main page]

CN120353420A - Online PPT content synchronization method, electronic equipment, medium and product - Google Patents

Online PPT content synchronization method, electronic equipment, medium and product

Info

Publication number
CN120353420A
CN120353420A CN202510869028.7A CN202510869028A CN120353420A CN 120353420 A CN120353420 A CN 120353420A CN 202510869028 A CN202510869028 A CN 202510869028A CN 120353420 A CN120353420 A CN 120353420A
Authority
CN
China
Prior art keywords
ppt
content
target
instruction
layer
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.)
Granted
Application number
CN202510869028.7A
Other languages
Chinese (zh)
Other versions
CN120353420B (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.)
Zhejiang Planer Technology Co ltd
Original Assignee
Zhejiang Planer Technology 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 Zhejiang Planer Technology Co ltd filed Critical Zhejiang Planer Technology Co ltd
Priority to CN202510869028.7A priority Critical patent/CN120353420B/en
Publication of CN120353420A publication Critical patent/CN120353420A/en
Application granted granted Critical
Publication of CN120353420B publication Critical patent/CN120353420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种在线PPT的内容同步方法、电子设备、可读存储介质及计算机程序产品。该方法包括:响应于目标PPT页面的内容同步推送,获取内容同步推送中的待同步数据;查询目标PPT页面在客户端本地对应的目标PPT文件中的用于在Canvas画布层绘制元素的指令数据;获取客户端本地的目标PPT文件对应的Canvas画布层缓存文件和PPT内容层缓存文件;将最小化目标指令合并至Canvas画布层缓存文件中,得到同步后的Canvas画布层缓存文件;以及对同步后的Canvas画布层缓存文件与PPT内容层缓存文件进行合成渲染处理得到同步后的目标PPT页面。

The present disclosure provides a content synchronization method, electronic device, readable storage medium and computer program product for online PPT. The method includes: in response to the content synchronization push of the target PPT page, obtaining the data to be synchronized in the content synchronization push; querying the instruction data for drawing elements in the Canvas layer in the target PPT file corresponding to the target PPT page in the local client; obtaining the Canvas layer cache file and the PPT content layer cache file corresponding to the local target PPT file in the client; merging the minimized target instruction into the Canvas layer cache file to obtain the synchronized Canvas layer cache file; and synthesizing and rendering the synchronized Canvas layer cache file and the PPT content layer cache file to obtain the synchronized target PPT page.

Description

Online PPT content synchronization method, electronic equipment, medium and product
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a content synchronization method, an electronic device, a storage medium, and a program product for an online PPT.
Background
In contemporary distributed collaboration office scenarios, online PPT editing systems (e.g., web-version PPTs) have evolved into a core productivity tool supporting digital collaboration of organizations, which cross-platform collaboration features and real-time synchronization mechanisms are particularly adapted to typical business requirements of multi-terminal device linkage and geographic distributed team collaboration. However, conventional Web-based solutions generally rely on native DOM rendering architecture. When the content of the PPT is synchronized, the element state redundancy of the native DOM rendering architecture causes a larger amount of synchronization data, and the consumption of network bandwidth is larger, so that the content synchronization efficiency of the PPT is poorer.
Disclosure of Invention
The present disclosure provides a content synchronization method, an electronic device, a storage medium, and a program product for an online PPT.
According to one aspect of the disclosure, a content synchronization method of an online PPT is provided, which comprises the steps of responding to content synchronization pushing of a target PPT page, obtaining data to be synchronized in the content synchronization pushing, inquiring instruction data of a target PPT page in a target PPT file corresponding to a client locally for drawing elements in the Canvas layer when the data to be synchronized comprises an undetachable minimum target instruction of a Canvas layer of the target PPT page, obtaining a Canvas layer cache file corresponding to the target PPT file of the client locally and a PPT content layer cache file when the instruction data is not contained in the target PPT file of the client locally, merging the minimum target instruction into the Canvas layer cache file to obtain the Canvas layer cache file after synchronization, and conducting synthetic processing on the Canvas layer cache file after synchronization and the PPT content layer cache file to obtain the target PPT page after synchronization.
According to the content synchronization method of the online PPT of at least one embodiment of the present disclosure, the minimized target instruction is merged into the Canvas layer cache file to obtain the synchronized Canvas layer cache file, and the method comprises the steps of verifying the version matching degree between the minimized target instruction and the Canvas layer cache file, determining one or more intermediate versions of an interval between the minimized target instruction and the Canvas layer cache file when the version matching degree characterizes that the version between the minimized target instruction and the Canvas layer cache file is not matched, sending an instruction acquisition request of an intermediate version synchronization instruction to a server, wherein the intermediate version synchronization instruction is used for synchronizing the version of the Canvas layer cache file to the intermediate version with the largest version number, merging the intermediate version synchronization instruction returned by the server and the minimized target instruction into a content synchronization instruction stream, and merging the content synchronization instruction stream into the Canvas layer cache file to obtain the Canvas layer cache file after Canvas layer cache file.
According to the content synchronization method of the online PPT of at least one embodiment of the present disclosure, the merging of the intermediate version synchronization instruction and the minimizing target instruction returned by the server into a content synchronization instruction stream includes determining an instruction having an operation conflict with the minimizing target instruction in the intermediate version synchronization instruction returned by the server as a conflict instruction, and sequentially integrating non-conflict instructions and the minimizing target instruction in the intermediate version synchronization instruction based on version numbers to obtain the content synchronization instruction stream.
According to the content synchronization method of the online PPT of at least one embodiment of the present disclosure, before the content synchronization push of the target PPT page is responded, the data to be synchronized in the content synchronization push is acquired, the Canvas layer of the target PPT page and the PPT content layer are combined to the same visual layer.
According to at least one embodiment of the content synchronization method of the online PPT, the Canvas layer and the PPT content layer of the target PPT page are combined to the same visual layer, the Canvas layer and the PPT content layer are displayed on the online page of the target PPT file, the online page is displayed as the target PPT page, instruction data of the Canvas layer and PPT structural data of the PPT content layer are cached in response to content combining operation of the target PPT page to respectively obtain a Canvas layer cache file and a PPT content layer cache file, when the Canvas layer cache file and the PPT content layer cache file are generated, combined rendering processing is conducted on the Canvas layer and the PPT content layer to obtain a synthetic page layer, and the synthetic page layer is displayed on the online page of the target PPT file, so that the page is displayed as the target PPT page.
The content synchronization method of the online PPT according to at least one embodiment of the present disclosure further comprises the step of uploading content change operation instruction data corresponding to the content change operation to a server in response to a change operation of the content of the Canvas layer of the target PPT page, wherein the server is used for splitting the content change operation instruction data into non-split minimum change operation instructions for synchronizing the content change operation.
When the data to be synchronized further comprises a minimum PPT content change field which is not detachable of a PPT content layer, the minimum PPT content change field is merged into the PPT content layer cache file local to a client to obtain the synchronized PPT content layer cache file.
According to another aspect of the present disclosure, there is provided an electronic device including a memory storing execution instructions, and a processor executing the execution instructions stored by the memory, causing the processor to perform the content synchronization method of the online PPT of any embodiment of the present disclosure.
According to yet another aspect of the present disclosure, there is provided a readable storage medium having stored therein execution instructions which, when executed by a processor, are to implement a content synchronization method of an online PPT of any embodiment of the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of content synchronization of an online PPT of any embodiment of the present disclosure.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the principles of the disclosure.
Fig. 1 is a flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 2 is an application scenario diagram of a content synchronization method according to an embodiment of the present disclosure.
Fig. 3 is a partial flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 4 is a partial flow diagram of a content synchronization method of an online PPT of one embodiment of the present disclosure.
Fig. 5 is a flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 6 is a partial flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 7 is a flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 8 is a flow diagram of a method of content synchronization for an online PPT of one embodiment of the present disclosure.
Fig. 9 is a block diagram schematically illustrating the structure of a content synchronization device of an online PPT according to an embodiment of the present disclosure.
Fig. 10 is a block diagram illustrating a structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific examples described herein are intended to be illustrative of the relevant matter rather than limiting of the present disclosure. It should be further noted that, for convenience of description, only a portion relevant to the present disclosure is shown in the drawings.
In addition, embodiments of the present disclosure and features of the embodiments may be combined with each other without conflict. The technical aspects of the present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Currently, in the scenario of collaborative editing line PPT (PowerPoint), graphics, animations, and other content in PPT pages often rely on web page native DOM (document object model) rendering. However, each graph (such as rectangle and text) rendered by the native DOM is an independent node, and all attributes such as position, style, hierarchy and the like of the graph need to be synchronized, and element state redundancy results in large synchronous data volume, so that the data volume required to be transmitted when the content of the PPT is synchronized is large, and the synchronization efficiency is low. Furthermore, the adding and deleting operations of DOM elements trigger browser rearrangement (Reflow) and redrawing (Repaint), and if high-frequency data synchronization is required in collaborative editing, PPT page jam may be caused.
The embodiment of the disclosure provides a content synchronization method of an online PPT. The method can be executed by electronic equipment such as a mobile phone, a computer and the like. The content synchronization method of the online PPT of the embodiment of the disclosure provides a scheme for synchronizing the content of the online PPT on the basis of drawing graphics, animation and other contents of the online PPT based on Canvas elements (Canvas) of HTML 5.
When drawing elements in a PPT through Canvas elements, all elements may be drawn on a single Canvas. When updating, only Canvas is needed to be redrawn, bitmap pixels can be directly covered by Canvas when each drawing is performed, a persistent object tree is not needed, only an affected area is needed to be redrawn when a graph is modified, and a browser does not need to maintain element states. Therefore, elements in the PPT are drawn by using Canvas elements, the rearrangement and redrawing times of a browser can be reduced, and the rendering performance is improved.
On the basis, the content synchronization method of the online PPT can synchronize the content of the online PPT page based on the Canvas element drawing part of the content, and compared with the traditional content synchronization scheme of the online PPT page, the content synchronization method of the online PPT can reduce the consumption of network bandwidth and improve the content synchronization efficiency of the online PPT.
Fig. 1 shows an overall flow diagram of a content synchronization method M10 of an online PPT according to an embodiment of the present disclosure. The method as shown in fig. 1 includes steps S13 to S18.
In step S13, in response to the content-synchronized pushing of the target PPT page, data to be synchronized in the content-synchronized pushing is acquired. The data to be synchronized is used for synchronizing the content of the target PPT page of the client to the target version.
In a scenario of editing PPT content cooperatively by multiple persons, multiple clients edit the same PPT page jointly, and the PPT page which is edited cooperatively is recorded as a target PPT page. When a certain client edits the target PPT page to change the page content, other clients cooperatively edited synchronize the content changing operation of the client, so that the target PPT page of each client presents consistent content.
In one embodiment, content synchronization of a target PPT page between multiple clients is achieved through a central server. When any client finishes the content change operation of the target PPT page, submitting the version of the changed target PPT page to the central server. And the central server sends the content synchronization push to other clients so that the other clients synchronize the respective target PPT pages to the target PPT pages of the version of the central server. When the central server sends the content synchronous pushing of the target PPT page to other clients, the version of the target PPT page of the central server is the target version in the step S13.
The data to be synchronized pushed to the client by the central server is not the complete data of the target PPT page of the target version, but part of the data of which the target PPT page of the target version is changed relative to the PPT page of the pushed client. For example, in the case where the target PPT page of each client is V1.01 version, the client a performs a change operation on the content of the target PPT page, changes the color of a certain graphic element a to red, and updates the content of the target PPT page to V1.02 version, and the data to be synchronized pushed by the central server to the other clients except the client a may be data for changing the color of the graphic element a to red. Therefore, the data volume transmitted during the content synchronization of the target PPT page can be reduced, the network bandwidth consumption is reduced, and the pushed client can quickly respond to the synchronized content.
In step S14, when the data to be synchronized includes an undetachable minimizing target instruction of a Canvas layer of the target PPT page, querying instruction data of the target PPT page in a target PPT file locally corresponding to the client for drawing elements on the Canvas layer of the Canvas.
Fig. 2 is an application scenario schematic diagram of a solution for drawing elements such as characters, graphics or animation in an online PPT page based on Canvas elements according to an embodiment of the present disclosure. And displaying a Canvas layer and a PPT content layer on an editing interface of the target PPT page. The Canvas layer may call CANVAS API (API: application programming interface) in JavaScript (a programming language) to implement drawing of ‌ elements and path control of elements, to draw text or graphic elements at specific positions of the Canvas layer, and to control movement of the Canvas layer along specific paths, etc. The operation instructions of drawing, attribute modification, position modification and other operations of elements processed by JavaScript are recorded as instruction data of the Canvas layer.
That is, if it is necessary to synchronize the content changed by one client in the Canvas layer to another client, the center server only needs to synchronize the instruction stream of the change operation for changing the content to the other client. The other client can execute the instruction stream of the change operation on the local Canvas layer. And the same content changing operation is carried out on the other client side, so that the synchronization of the content is realized.
Further, the instruction stream of the altering operation includes one or more non-splittable minimized instructions. For example, the instruction stream of the altering operation may include a position move instruction and a color modify instruction, wherein the position move instruction and the color modify instruction are each non-detachable minimize instructions. When pushing data to be synchronized, the central server can split the instruction stream of the change operation into an undetachable minimum instruction for changing the content of the Canvas layer of the Canvas of the synchronous target PPT, and the undetachable minimum instruction in the data to be synchronized is recorded as the minimum target instruction. In this way, if the central server performs the synchronous pushing of the target PPT page to the other client, the other client has already performed the position moving instruction in the instruction stream of the above-mentioned changing operation, at this time, the central server does not need to push the complete instruction stream of the changing operation, and only needs to push the color modifying instruction in the instruction stream of the changing operation as the minimum target instruction, so that the synchronization of the content changing can be realized. Therefore, the data to be synchronized, which is transmitted by the central server, can be minimized, the network bandwidth consumption is reduced, and the pushed client can quickly respond to the synchronized content.
The number of the minimized target instructions in the data to be synchronized may be one or more, and when the number of the minimized target instructions is plural, the plurality of the minimized target instructions may include instructions for the same element, such as instructions for editing the size, color, and position of a certain rectangle, respectively, and the plurality of the minimized target instructions may also include instructions for different elements, such as instructions for editing a certain rectangle and instructions for editing a certain circle.
Referring to fig. 2, in one embodiment, the Canvas layer and the PPT content layer are two different visual layers, and the display effect of the content of the Canvas layer displayed on the PPT content layer can be checked through the "preview" function of the editing interface of the target PPT page. In the embodiment illustrated in FIG. 2, a user may use a red dashed box to select a region of elements at the PPT content layer that need to be added to the Canvas layer and draw and edit the elements at the Canvas layer. When the drawing or editing of the Canvas layer is completed, elements (characters, graphics or animation) in the Canvas layer and contents in the PPT content layer can be combined and rendered to the same visual layer for output, so that the elements in the Canvas layer and the contents in the PPT content layer are displayed on the same visual layer, for example, the elements in the Canvas layer are exported to the PPT content layer for display, or the elements in the Canvas layer and the contents in the PPT content layer are exported to another visual layer for display.
In the process, before the merging rendering processing is performed, when an element A exists in a Canvas layer of a Canvas, a target PPT file of a target PPT page contains PPT content data of a PPT content layer and instruction data of the Canvas layer, which acts on the element A, and at the moment, the content of the Canvas layer of the Canvas is editable content. After the merging rendering processing is performed, elements in the Canvas layer are merged to visual layers outside the Canvas layer, so that no element A exists in the Canvas layer, the data of the new visual layer is structured data with the data structure identical to the PPT content data of the PPT content layer, at the moment, the target PPT file of the target PPT page only contains the PPT content data and does not contain instruction data of the Canvas layer, which acts on the element A, and the content (such as the element A) of the Canvas layer before merging becomes a non-editable state after merging.
Based on this, in step S14, the instruction data of the target PPT page in the target PPT file corresponding locally to the client is queried in order to determine whether the elements of the Canvas layer have been merged and rendered to other visual layers. If the instruction data in the target PPT file of the local client can be queried, the elements in the Canvas layer representing the local client are not merged and rendered to other visual layers, at the moment, the content of the Canvas layer can be edited, and the content in the Canvas layer can be edited by executing the minimized target instruction so as to carry out the content synchronization of the Canvas layer. If the instruction data of the Canvas layer in the target PPT file of the local client cannot be queried, the content of the Canvas layer representing the local client is converted into non-editable content and combined to a visual layer outside the Canvas layer, and the changing operation of content synchronization cannot be realized by executing the minimized target instruction on the Canvas layer, and further processing is needed.
For the data (referred to as PPT content change data) for changing the content of the PPT content layer in the content synchronization push, the PPT content layer before the merge rendering has the same data structure as the visual layer after the merge rendering, so that the PPT content change data can be applied to the content in the PPT content layer before the merge rendering or the content in the visual layer after the merge rendering, and no additional processing is required.
In step S15, when the target PPT file local to the client does not include instruction data, a Canvas layer cache file and a PPT content layer cache file corresponding to the target PPT file local to the client are obtained.
In one embodiment, before merging and rendering elements in a Canvas layer and contents in a PPT content layer to obtain a merged target PPT file, respectively caching respective data of the Canvas layer and the PPT content layer into independent files to obtain a Canvas layer cache file and a PPT content layer cache file corresponding to the target PPT file. And synthesizing and rendering the Canvas layer cache file and the PPT content layer cache file corresponding to the target PPT file to obtain the target PPT file.
When the target PPT file at the local client side does not contain instruction data, representing that the content of the Canvas layer is not editable, namely that the minimized target instruction cannot directly act on the current target PPT file to synchronize the content of the Canvas layer, so that the Canvas layer cache file corresponding to the target PPT file needs to be used as a medium for synchronizing the minimized target instruction, and the minimized target instruction is synchronized on the Canvas layer cache file corresponding to the Canvas layer cache file, so that the content of the Canvas layer corresponding to the Canvas layer cache file is synchronized to the target version, and then the Canvas layer cache file and the PPT content layer cache file of the target version are synthesized and rendered to obtain the synchronized target PPT file. Thus, the target PPT page in the synchronized target PPT file is the target PPT page after the content of the Canvas layer is synchronized.
Based on the above, when the target PPT file in the local client does not contain instruction data, the Canvas layer cache file and the PPT content layer cache file corresponding to the target PPT file need to be acquired from the local cache path of the client for the content of the target PPT page, so that when the target instruction cannot be minimized to directly act on the target PPT file after the merging and rendering processing, the Canvas layer cache file before the merging and rendering processing is utilized as the medium for synchronizing the content of the Canvas layer. In the process, the client does not need to request the target PPT file containing the instruction data from the central server again, so that the data quantity transmitted during the content synchronization can be reduced.
In step S16, the minimized target instruction is merged into the Canvas layer cache file of the Canvas to obtain the synchronized Canvas layer cache file of the Canvas.
The Canvas layer cache file includes instruction data for the Canvas layer, and the minimized target instruction is instruction data for a particular element of the Canvas layer, consistent with a data structure of the instruction data in the Canvas layer cache file. In one embodiment, the element that minimizes the effect of the target instruction may be determined as the target element, the instruction stream that acts on the target element is queried in the Canvas layer cache file, the minimized target instruction is incorporated into the instruction stream of the target element, and the minimized target instruction is incorporated into the Canvas layer cache file. And (3) the client side can draw the synchronized content of the Canvas layer of the target PPT page on the Canvas layer by executing the instruction stream in the synchronized Canvas layer cache file obtained by the merging processing in the step (S16).
In step S18, the synchronized Canvas layer cache file and PPT content layer cache file are synthesized and rendered to obtain a synchronized target PPT page.
In one embodiment, the step of performing composite rendering on the synchronized Canvas layer cache file and the PPT content layer cache file includes loading the synchronized Canvas layer based on the synchronized Canvas layer cache file, loading the PPT content layer (the synchronized PPT content layer if the PPT content layer also needs to be synchronized) based on the PPT content layer cache file, and performing merging rendering processing on the synchronized Canvas layer and the PPT content layer to obtain a synchronized target PPT page, where the Canvas layer cache file and the PPT content layer cache file are synthesized into the synchronized target PPT file.
In summary, the content synchronization method of online PPT of the embodiments of the present disclosure provides a solution for synchronizing the content of a Canvas layer of a target PPT page in a scenario where PPT page content is drawn based on Canvas elements. According to the first aspect, the contents of the Canvas layer can be obtained by executing instruction data drawing of the Canvas layer, so that if elements such as characters, graphics or animations of the PPT page are the contents drawn by the Canvas layer, only the instruction data of the Canvas layer are required to be transmitted when the contents are synchronized, and compared with a scheme for transmitting the contents of the elements (such as transmitting a graphic file), the data quantity transmitted when the contents are synchronized can be greatly reduced, and the network bandwidth consumption is reduced. In the second aspect, when the content of the Canvas layer is synchronized, the data to be synchronized pushed by the central server is an undetachable minimum target instruction of the Canvas layer, the data volume of the minimum target instruction depends on the current content of the Canvas layer of the client receiving the push, and the data volume of the data stream of the content, of which the content of the target version is changed relative to the current content of the client, can be smaller than or equal to the data volume of the data stream of the content, so that the data volume transmitted during the content synchronization is further reduced. In the third aspect, when the minimized target instruction pushed by the central server cannot directly act on the target PPT file locally stored in the client to perform content synchronization, the Canvas layer cache file locally stored in the client can be used as a medium of content synchronization, and then the synchronized Canvas layer cache file is used to generate the target PPT page after content synchronization, so that the client does not need to request the target PPT file containing instruction data from the central server again in the process, and the increase of the number of transmissions during content synchronization is further avoided.
In some embodiments of the present disclosure, step S16 may include steps S161 to S165 as shown in fig. 3.
In step S161, the version matching between the minimized target instruction and the Canvas layer cache file is verified.
In one embodiment, the version of the data to be synchronized pushed by the central server is the latest version of the target PPT page in the central server, and is recorded as the target version. At this time, the versions corresponding to the minimized target instruction in the data to be synchronized are all target versions. The version of the Canvas layer cache file cached locally by the client is the current version of the target PPT page of the client. That is, minimizing the version match between the target instruction and the Canvas layer cache file is the version match between the target version and the current version of the target PPT page of the client.
In one embodiment, the version of the target PPT page may be characterized by a version number, the first digit in the version number being referred to as the version number prefix. For example, version number "V3.0.2" has a version number prefix of 3. The content changing operation of the target PPT page by the user at the client is that the content changing operation caused by the editing operation of the user is not that caused by the synchronous updating, and the prefix of the version number of the target PPT page of the client is increased by 1 at most. Based on the data to be synchronized pushed by the central server based on one content change operation of the user on the target PPT page at the client, the data to be synchronized is mainly used for synchronizing two different versions of the target PPT page with the prefix difference of the version numbers smaller than or equal to 1. Based on the method, when the difference of the version number prefixes of the target PPT pages of two different versions is smaller than or equal to 1, the version numbers of the two target PPT pages are recorded as being matched, the data to be synchronized pushed by the central server can be directly utilized for version synchronization, and when the difference of the version number prefixes of the target PPT pages of two different versions is larger than 1, the version numbers of the two target PPT pages are recorded as being unmatched, and further processing is needed to carry out version synchronization.
In step S162, when the version matching degree characterizes the minimizing the version mismatch between the target instruction and the Canvas layer cache file, one or more intermediate versions minimizing the spacing between the target instruction and the Canvas layer cache file are determined. Version matching degree characterization minimizes version mismatch between a target instruction and Canvas layer cache files, namely, mismatch between a target version and a current version of a target PPT page of a client, and version faults exist in the middle. Each version of the fault is noted as an intermediate version.
For example, the target PPT page of the client is version V2, and the version corresponding to the minimized target instruction is version V5, for synchronizing the target PPT page of version V4 to version V5. In this case, if the space between the target instruction and the Canvas layer cache file is minimized by two versions V3 and V4, the client determines the version V3 and the version V4 as intermediate versions.
In step S163, an instruction acquisition request of an intermediate version synchronization instruction for synchronizing the version of the Canvas layer cache file to the intermediate version with the largest version number is sent to the server.
In one embodiment, the intermediate version synchronization instruction includes n versions of a synchronization instruction stream, one version of the synchronization instruction stream being used to synchronize instruction data of a previous version of the Canvas layer to the version of the synchronization instruction stream, n being the number of intermediate versions. For example, if the interval between the target instruction and the Canvas layer cache file is minimized by two versions V3 and V4, the intermediate version synchronization instruction includes 2 versions of synchronization instruction streams, respectively V3 version synchronization instruction streams, for synchronizing the instruction data of the Canvas layer of the V2 version to the V3 version, and V4 version synchronization instruction streams, for synchronizing the instruction data of the Canvas layer of the V3 version to the V4 version, so that the version of the Canvas layer cache file of the Canvas layer can be synchronized to the V4 version by the intermediate version synchronization instruction.
In step S164, the intermediate version synchronization instruction returned by the server and the minimization target instruction are combined into a content synchronization instruction stream.
In one embodiment of the disclosure, when obtaining the intermediate version synchronization instruction returned by the server, the client may obtain a content synchronization instruction stream by combining the intermediate version synchronization instruction and the minimizing target instruction in step S164, and then synchronously update the Canvas layer cache file based on the content synchronization instruction stream. Therefore, when the intermediate version synchronous instruction and the minimized target instruction are combined, the partially repeated or redundant instruction is combined into the unique instruction, so that the data volume of the cached file combined to the Canvas layer of the Canvas is reduced, and the data synchronization efficiency is improved.
In another embodiment of the present disclosure, when obtaining an intermediate version synchronization instruction returned by the server, the client may update the Canvas layer cache file version by version based on the intermediate version synchronization instruction, update the version of the Canvas layer cache file to the intermediate version with the largest version number, and then merge the minimized target instruction into the Canvas layer cache file updated version by version, to obtain the Canvas layer cache file after synchronization. Thus, the Canvas layer cache file after synchronization is updated version by the Canvas layer cache file before synchronization, so that the data loss of a certain version in the updating process can be avoided, and the data integrity of the Canvas layer cache file after synchronization is ensured.
In step S165, the content synchronization instruction stream is merged into the Canvas layer cache file of the Canvas to obtain a synchronized Canvas layer cache file of the Canvas. The content synchronization instruction stream obtained in step S164 includes instruction data that is missing in the Canvas layer cache file of the client local current version compared with the instruction data of the Canvas layer of the target version. Therefore, the content synchronization instruction stream is merged into the Canvas layer cache file of the Canvas layer, so that the Canvas layer cache file of the current version of the client has the instruction data of the Canvas layer of the target version, and the Canvas layer cache file of the current version of the client can be synchronized to the target version.
In some embodiments of the present disclosure, step S164 may include steps S1641 to S1642 as shown in fig. 4.
In step S1641, an instruction having an operation conflict with the minimized target instruction among the intermediate version synchronization instructions returned by the server is determined as a conflict instruction. The instruction with operation conflict refers to an instruction for editing the same attribute of the same element of the Canvas layer. For example, if one of the intermediate version synchronization instructions is used to modify the color of a rectangle (see fig. 2) to blue and the minimizing target instruction is used to modify the color of a rectangle to red, then that instruction in the intermediate version synchronization instruction is deemed to have an operational conflict with the minimizing target instruction, and that instruction is determined to be a conflicting instruction. In other examples, the conflict instruction may be an instruction for editing the position, shape, size, transparency, and other properties of the elements of the Canvas layer, which is not limited herein.
In step S1642, the non-conflicting instructions and the minimized target instruction in the intermediate version-synchronous instruction are sequentially integrated based on the version number to obtain a content-synchronous instruction stream. In embodiments of the present disclosure, the conflicting instructions act on the same attributes of the same element as the minimizing target instruction, and the version of the conflicting instructions lags behind the version of the minimizing target instruction. Based on this, the result of execution of the minimized target instruction to overlap the conflicting instruction is made the same as the result of execution of the conflicting instruction and the minimized target instruction to edit the element. For example, suppose that an element that the conflict instruction and the minimization target instruction co-act with is denoted element a, the conflict instruction is for modifying the position of element a to coordinates (X1, Y1), and the minimization target instruction is for modifying the position of element a to coordinates (X2, Y2). The conflict instruction and the minimized target instruction are sequentially executed on the Canvas layer, and compared with the minimized target instruction, the minimized target instruction is executed only, the result is that the position of the element A is modified to be coordinates (X2, Y2). That is, execution of the conflict instructions may be skipped when updating the element content of the Canvas layer based on the intermediate version sync instruction and the minimize target instruction. Therefore, when the intermediate version synchronous instruction is integrated and the target instruction is minimized to obtain the content synchronous instruction stream, the conflict instruction is not required to be integrated into the content synchronous instruction stream, the data volume of the content synchronous instruction stream can be reduced, and the computing resource when the element content of the Canvas layer is changed based on the content synchronous instruction stream is saved.
The integration of instructions is performed based on the order of version numbers, and the execution order of instructions is integrated according to the order of version numbers from old to new. For example, the non-conflict instructions in the intermediate version synchronous instruction comprise a non-conflict instruction of a V3 version and a non-conflict instruction of a V4 version, the minimizing target instruction is an instruction of a V5 version, and the integrated instruction execution sequence is sequentially the non-conflict instruction of the V3 version, the non-conflict instruction of the V4 version and the minimizing target instruction of the V5 version, which are used as the instructions in the content synchronous instruction stream. In this way, the problem of instruction logic conflict can be avoided, for example, the instruction of the V3 version is the generation element A, the instruction of the V5 version is the change of the size of the element A, and then the instruction of the V5 version cannot be executed before the instruction of the V3 version.
In some embodiments of the present disclosure, the content synchronization method M10 of the online PPT may further include step S11 as shown in fig. 5.
In step S11, the Canvas layer and the PPT content layer of the target PPT page are merged into the same visual layer. And merging the Canvas layer and the PPT content layer of the target PPT page into the same visual layer, specifically merging the content of the Canvas layer and the content of the PPT content layer into the same visual layer for display.
In one embodiment, the Canvas layer obtains Canvas elements through JavaScript and operates the attributes of the Canvas elements to draw dynamic content on the Canvas layer. On the other hand, the data structure of the PPT content layer (such as PPTX format) only supports the storage of static content (shape, picture, text, etc.), and cannot be directly compatible with the data of the Canvas layer of Canvas. Thus, there is a need to translate the content of the Canvas layer into static content export to merge the content of the Canvas layer's inner and PPT content layers into the same visual layer.
After the content of the Canvas layer is exported, the PPT file does not contain instruction data corresponding to the dynamic content of the Canvas layer, so that whether the content of the Canvas layer is exported or not can be judged based on whether the PPT file contains the instruction data of the Canvas layer or not, and different synchronous change schemes can be selected based on the content export condition of the Canvas layer when the content of the Canvas layer is synchronously changed. That is, when the content of the Canvas layer is not exported, the minimizing target instruction may be executed at the Canvas layer to perform the content synchronization change of the Canvas layer. When the content of the Canvas layer is exported, the Canvas layer cache file is used as the medium for the content synchronization change of the Canvas layer to perform the content synchronization.
In one embodiment, the PPT content layer is used as a reference visual layer, dynamic content of the Canvas layer is converted into static content and exported to the PPT content layer, and the exported content of the Canvas layer is displayed on the PPT content layer. After export, the Canvas layer content is emptied and the PPT content layer adds the Canvas layer content.
In yet another embodiment, the content of the Canvas layer and the content of the PPT content layer are rendered to a new visual layer display, the data structure of the new visual layer being the same as the data structure of the PPT content layer. After the rendering is completed, the contents of the Canvas layer and the PPT content layer are emptied, and the data of the new visual layer is used as a PPT file.
In some embodiments of the present disclosure, step S11 may include steps S111 to S114 as shown in fig. 6.
In step S111, a Canvas layer and a PPT content layer are displayed on an online page of the target PPT file, and the online page is displayed as the target PPT page. The online page of the target PPT file is obtained by loading the target PPT file on a browser page of a client side and is used as the target PPT page of the target PPT file.
In one embodiment, the Canvas layer is initially in a hidden state and only the contents of the PPT content layer are displayed on the target PPT page for editing of the PPT document by the user. When graphics, animation or texts with certain styles are required to be drawn, the Canvas layer can be converted into a display state, and elements such as graphics, animation or texts are drawn on the Canvas layer, so that the Canvas layer displays drawn contents. If other clients perform content changing operation on Canvas layers of Canvas, the content changing operation is performed on Canvas layers of Canvas of the current client synchronously based on a minimized target instruction pushed by the center server.
In step S112, in response to the content merging operation on the target PPT page, the instruction data of the Canvas layer and the PPT structured data of the PPT content layer are cached to obtain a Canvas layer cache file and a PPT content layer cache file, respectively.
When the client determines that the content drawing of the Canvas layer is completed, the content of the Canvas layer and the content of the PPT content layer can be combined through the content combining operation of the target PPT page. Because the data structure of the combined visual layer is the same as that of the PPT content layer, only static content can be stored, and the dynamic content and instruction data corresponding to the dynamic content are not contained any more. Therefore, after the Canvas layer and the PPT content layer are combined, if other clients perform content changing operations on the Canvas layer, the content changing cannot be performed synchronously on the combined visual layer based on the minimized target instruction. Therefore, it is desirable to cache instruction data of the Canvas layer before merging the contents of the Canvas layer and the PPT content layer into the same visual layer to preserve editable Canvas layer data for synchronizing the content changes of the Canvas layer. The cached instruction data of the Canvas layer of the Canvas is stored as a Canvas layer cache file independent of the target PPT file, so that the next content drawing of the Canvas layer of the Canvas on the target PPT page is prevented from being influenced.
Further, since the merged visual layer already contains the content of the uneditable Canvas layer, the content synchronization of the Canvas layer is performed on the basis of the merged visual layer. Based on the above, in response to the content merging operation on the target PPT page, the instruction data of the Canvas layer is cached, and meanwhile, the PPT structured data of the PPT content layer is also required to be cached, so that the data of the PPT content layer, which is not mixed with the content of the Canvas layer, is reserved for the content of the Canvas layer after the mixed synchronization. The PPT structured data of the cached PPT content layer is stored as a PPT content layer cache file independent of the target PPT file, so that interference to the merged visual layer in the target PPT file is avoided.
In step S113, when the Canvas layer cache file and the PPT content layer cache file are generated, the Canvas layer and the PPT content layer are combined and rendered to obtain a composite page layer. The composite page layer is a visual layer for displaying the combined content after combining the content of the Canvas layer and the PPT content layer.
When Canvas layer cache files and PPT content layer cache files are generated, instruction data representing Canvas layers and PPT structural data representing PPT content layers are reserved, so that the content synchronization of the Canvas layers and the PPT content layers after being combined can be supported, at the moment, the content synchronization of the Canvas layers can not be influenced by the data of the Canvas layers and the PPT content layers, and the combined rendering processing of the Canvas layers and the PPT content layers can be performed, so that a synthetic page layer is obtained.
In step S114, the composite page layer is displayed on the online page of the target PPT file, and the online page is displayed as the target PPT page. When the target PPT page displays the composite page layer, the content contained in the composite page layer comprises the content of the Canvas layer and the content of the PPT content layer before the merging treatment.
In one embodiment, the composite page layer is taken as the new PPT content layer. If the user needs to edit the content of the PPT content layer, corresponding editing operation can be performed on the composite page layer. If the user draws new elements on the Canvas layer of the Canvas on the online page, the composite page layer can be regarded as a PPT content layer in the merging rendering task, PPT structured data of the composite page layer are cached, and merging rendering processing is carried out on the Canvas layer and the composite page layer to obtain a new composite page layer, wherein the new composite page layer contains the elements newly drawn by the user on the Canvas layer.
In some embodiments of the present disclosure, the content synchronization method M10 of the online PPT may further include step S12 as shown in fig. 7.
In step S12, in response to the content change operation of the Canvas layer of the target PPT page, content change operation instruction data corresponding to the content change operation is uploaded to the server. The server is used for splitting the content changing operation instruction data into a plurality of non-separable minimized changing operation instructions for synchronizing the content changing operation. If the content change operation instruction itself is an undetachable minimization instruction, it is not required to be subjected to splitting processing, but is determined as the minimization change operation instruction.
For example, when the user performs a displacement operation and a color change operation on the element a of the Canvas layer to change the content of the Canvas layer, the content change operation instruction data corresponding to the change operation of the content of the Canvas layer is an instruction stream including a displacement operation instruction and a color change operation instruction. After the client side uploads the content change operation instruction data to the central server, the central server splits the content change operation instruction data into a displacement operation instruction and a color change operation instruction. In this way, when the central server synchronizes this content change operation to the other client, if the other client has already performed the same displacement operation, the server can push the color change operation instruction to the client as the minimization target instruction without pushing the displacement operation instruction. Therefore, the data volume required to be transmitted for content synchronization of the target PPT page can be reduced, and the network bandwidth consumption is reduced.
In some embodiments of the present disclosure, the content synchronization method M10 of the online PPT may further include step S17 as shown in fig. 8.
In step S17, when the data to be synchronized further includes an undetachable minimum PPT content change field of the PPT content layer, the minimum PPT content change field is merged into the PPT content layer cache file local to the client, so as to obtain the synchronized PPT content layer cache file.
The data of the PPT content layer is static data. When the content of the PPT content layer is changed, the changed inseparable minimized data is a field. For example, when the text paragraph of the PPT content layer needs to be changed, the content of the text field corresponding to the text paragraph only needs to be changed. Based on this, when the central server needs to synchronize the content change of the PPT content layer to the client, the minimized PPT content change field for changing the content of the PPT content layer may be pushed to the client as data to be synchronized for content synchronization of the PPT content layer.
In the case where the Canvas layer and the PPT content layer of the client have been merged, it is necessary to synchronize the content of the Canvas layer change with the Canvas layer cache file. And carrying out synthetic rendering treatment on the synchronized Canvas layer cache file and the PPT content layer cache file to obtain a synchronized target PPT page. On this basis, if the data to be synchronized also includes a minimized PPT content change field, the content characterizing the PPT content layer also needs to be synchronously changed. In this case, before the synchronized Canvas layer cache file and the PPT content layer cache file are subjected to the synthetic rendering processing, the minimized PPT content change field is merged into the local PPT content layer cache file of the client to obtain the synchronized PPT content layer cache file, so that the synchronized PPT content layer cache file contains the content of the synchronized PPT content layer after the synchronization change, and then the synchronized Canvas layer cache file and the synchronized PPT content layer cache file are subjected to the synthetic rendering processing to obtain the synchronized target PPT page, so that the synchronized target PPT page contains the content of the synchronized Canvas layer and the content of the synchronized PPT content layer.
In one embodiment, the minimized PPT content modification field is incorporated into a PPT content layer cache file local to the client, which may specifically be the overwriting of the content of the minimized PPT content modification field to the content of the same field in the PPT content layer cache file. For example, if the minimized PPT content modification field is a "text" field, the minimized PPT content modification field may be incorporated into a PPT content layer cache file local to the client, where the content of the "text" field in the PPT content layer cache file is replaced with the content of the minimized PPT content modification field.
Based on any one of the above embodiments, the present disclosure further provides a content synchronization device of an online PPT. Fig. 9 is a block diagram schematically illustrating the structure of a content synchronization device of an online PPT according to an embodiment of the present disclosure.
As shown in fig. 9, the content synchronization device of the online PPT includes a push response module 110, a query module 120, a cache file acquisition module 130, a synchronization module 140, and a synthesis module 150.
The push response module 110 is configured to obtain, in response to the content-synchronized push of the target PPT page, data to be synchronized in the content-synchronized push, where the data to be synchronized is used to synchronize the content of the target PPT page of the client to the target version. The query module 120 is configured to query instruction data of a target PPT page for drawing elements at a Canvas layer of a Canvas in a target PPT file locally corresponding to a client when data to be synchronized includes an undetachable minimized target instruction of the Canvas layer of the target PPT page. The cache file obtaining module 130 is configured to obtain a Canvas layer cache file and a PPT content layer cache file corresponding to a target PPT file local to the client when the target PPT file local to the client does not include instruction data. The synchronization module 140 is configured to combine the minimized target instruction into a Canvas layer cache file to obtain a Canvas layer cache file after synchronization. The composition module 150 is configured to perform a composition rendering process on the synchronized Canvas layer cache file and the PPT content layer cache file to obtain a synchronized target PPT page.
The content synchronization device of the online PPT may be computer software, and each module thereof may be a computer software module, and the implementation process of the functions and roles of each module in the content synchronization device of the online PPT is specifically described in the implementation process of the corresponding steps in the method, which is not described herein.
Based on any of the above embodiments, the present disclosure also provides an electronic device that may perform the content synchronization method of the online PPT of any of the above embodiments of the present disclosure.
Fig. 10 is a block diagram illustrating a structure of an electronic device 1000 according to an embodiment of the present disclosure.
The hardware structure of the electronic device 1000 may be implemented using a bus architecture. The bus architecture may include any number of interconnecting buses and bridges depending on the specific application of the hardware and the overall design constraints. Bus 1100 connects together various circuits including one or more processors 1200, memory 1300, and/or hardware modules. Bus 1100 may also connect various other circuits 1400, such as peripherals, voltage regulators, power management circuits, external antennas, and the like.
Bus 1100 may be an industry standard architecture (ISA, industry Standard Architecture) bus, a peripheral component interconnect (PCI, PERIPHERAL COMPONENT) bus, or an extended industry standard architecture (EISA, extended Industry Standard Component) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one connection line is shown in the figure, but not only one bus or one type of bus.
The present disclosure also provides a readable storage medium having stored therein a computer program for implementing the above method when executed by a processor. A "readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples of a readable storage medium include an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, a portable read-only memory (CDROM), and so forth.
The present disclosure also provides a computer program product, and the methods of the present disclosure may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are performed in whole or in part.
The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. Usable media may be magnetic media such as floppy disks, hard disks, magnetic tape, optical media such as digital video disks, and semiconductor media such as solid state disks. The computer readable storage medium may be volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage medium.
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable online PPT content synchronization device, such that the instructions, which execute via the processor of the computer or other programmable online PPT content synchronization device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable online PPT content synchronization device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable online PPT content synchronization device such that a series of operational steps are performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description of the present specification, reference to the terms "one embodiment/manner," "some embodiments/manner," "example," "specific example," or "some examples," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment/manner or example is included in at least one embodiment/manner or example of the present disclosure. In this specification, the schematic representations of the above terms are not necessarily for the same embodiment/manner or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments/manners or examples. Furthermore, the various embodiments/modes or examples described in this specification and the features of the various embodiments/modes or examples can be combined and combined by persons skilled in the art without contradiction.
It will be appreciated by those skilled in the art that the above-described embodiments are merely for clarity of illustration of the disclosure, and are not intended to limit the scope of the disclosure. Other variations or modifications will be apparent to persons skilled in the art from the foregoing disclosure, and such variations or modifications are intended to be within the scope of the present disclosure.

Claims (10)

1.一种在线PPT的内容同步方法,其特征在于,包括:1. A method for synchronizing content of an online PPT, comprising: 响应于目标PPT页面的内容同步推送,获取所述内容同步推送中的待同步数据;In response to the content synchronization push of the target PPT page, obtaining the data to be synchronized in the content synchronization push; 当所述待同步数据包括所述目标PPT页面的Canvas画布层的不可拆分的最小化目标指令时,查询所述目标PPT页面在客户端本地对应的目标PPT文件中的用于在所述Canvas画布层绘制元素的指令数据;When the data to be synchronized includes an inseparable minimized target instruction of the Canvas layer of the target PPT page, querying the target PPT file corresponding to the target PPT page locally on the client for instruction data for drawing elements on the Canvas layer; 当客户端本地的所述目标PPT文件中不包含所述指令数据时,获取客户端本地的所述目标PPT文件对应的Canvas画布层缓存文件和PPT内容层缓存文件;When the target PPT file locally on the client does not contain the instruction data, obtaining a Canvas layer cache file and a PPT content layer cache file corresponding to the target PPT file locally on the client; 将所述最小化目标指令合并至所述Canvas画布层缓存文件中,得到同步后的所述Canvas画布层缓存文件;以及Merging the minimization target instruction into the Canvas layer cache file to obtain the synchronized Canvas layer cache file; and 对同步后的所述Canvas画布层缓存文件与所述PPT内容层缓存文件进行合成渲染处理得到同步后的目标PPT页面。The synchronized Canvas layer cache file and the PPT content layer cache file are synthesized and rendered to obtain a synchronized target PPT page. 2.根据权利要求1所述的在线PPT的内容同步方法,其特征在于,将所述最小化目标指令合并至所述Canvas画布层缓存文件中,得到同步后的所述Canvas画布层缓存文件,包括:2. The method for synchronizing content of online PPT according to claim 1, characterized in that the minimization target instruction is merged into the Canvas layer cache file to obtain the synchronized Canvas layer cache file, comprising: 验证所述最小化目标指令与所述Canvas画布层缓存文件之间的版本匹配度;Verify the version matching between the minimization target instruction and the Canvas layer cache file; 当所述版本匹配度表征所述最小化目标指令与所述Canvas画布层缓存文件之间的版本不匹配时,确定所述最小化目标指令与所述Canvas画布层缓存文件之间间隔的一个或多个中间版本;When the version matching degree indicates that the versions of the minimized target instruction and the Canvas layer cache file do not match, determining one or more intermediate versions between the minimized target instruction and the Canvas layer cache file; 向服务器发送中间版本同步指令的指令获取请求,所述中间版本同步指令用于将所述Canvas画布层缓存文件的版本同步至版本号最大的所述中间版本;Sending an instruction acquisition request for an intermediate version synchronization instruction to the server, wherein the intermediate version synchronization instruction is used to synchronize the version of the Canvas layer cache file to the intermediate version with the largest version number; 将服务器返回的所述中间版本同步指令和所述最小化目标指令合并为内容同步指令流;以及Merging the intermediate version synchronization instruction and the minimized target instruction returned by the server into a content synchronization instruction stream; and 将所述内容同步指令流合并至所述Canvas画布层缓存文件中,得到同步后的所述Canvas画布层缓存文件。The content synchronization instruction stream is merged into the Canvas layer cache file to obtain the synchronized Canvas layer cache file. 3.根据权利要求2所述的在线PPT的内容同步方法,其特征在于,将服务器返回的所述中间版本同步指令和所述最小化目标指令合并为内容同步指令流,包括:3. The method for synchronizing content of online PPT according to claim 2, characterized in that the intermediate version synchronization instruction and the minimized target instruction returned by the server are merged into a content synchronization instruction stream, comprising: 将服务器返回的所述中间版本同步指令中与所述最小化目标指令存在操作冲突的指令确定为冲突指令;以及Determine, in the intermediate version synchronization instructions returned by the server, instructions that have an operation conflict with the minimization target instructions as conflicting instructions; and 基于版本号顺序整合所述中间版本同步指令中的非冲突指令和所述最小化目标指令得到所述内容同步指令流。The content synchronization instruction stream is obtained by integrating non-conflicting instructions and the minimized target instructions in the intermediate version synchronization instructions based on the version number sequence. 4.根据权利要求1所述的在线PPT的内容同步方法,其特征在于,在响应于目标PPT页面的内容同步推送,获取所述内容同步推送中的待同步数据之前,还包括:4. The method for synchronizing content of online PPT according to claim 1, characterized in that before obtaining the data to be synchronized in the content synchronization push in response to the content synchronization push of the target PPT page, it also includes: 将所述目标PPT页面的所述Canvas画布层和所述PPT内容层合并至同一视觉层。The Canvas layer and the PPT content layer of the target PPT page are merged into the same visual layer. 5.根据权利要求4所述的在线PPT的内容同步方法,其特征在于,将所述目标PPT页面的所述Canvas画布层和所述PPT内容层合并至同一视觉层,包括:5. The method for synchronizing content of online PPT according to claim 4, characterized in that merging the Canvas layer and the PPT content layer of the target PPT page into the same visual layer comprises: 在所述目标PPT文件的在线页面显示所述Canvas画布层和所述PPT内容层,使所述在线页面作为所述目标PPT页面显示;Display the Canvas layer and the PPT content layer on the online page of the target PPT file, so that the online page is displayed as the target PPT page; 响应于对所述目标PPT页面的内容合并操作,缓存所述Canvas画布层的指令数据和所述PPT内容层的PPT结构化数据以分别得到所述Canvas画布层缓存文件和所述PPT内容层缓存文件;In response to the content merging operation on the target PPT page, cache the instruction data of the Canvas layer and the PPT structured data of the PPT content layer to obtain the Canvas layer cache file and the PPT content layer cache file respectively; 在所述Canvas画布层缓存文件和所述PPT内容层缓存文件生成时,对所述Canvas画布层和PPT内容层进行合并渲染处理得到合成页面层;以及When the Canvas layer cache file and the PPT content layer cache file are generated, the Canvas layer and the PPT content layer are merged and rendered to obtain a composite page layer; and 在所述目标PPT文件的在线页面显示所述合成页面层,使所述在线页面作为所述目标PPT页面显示。The synthesized page layer is displayed on an online page of the target PPT file, so that the online page is displayed as the target PPT page. 6.根据权利要求1所述的在线PPT的内容同步方法,其特征在于,还包括:6. The method for synchronizing content of online PPT according to claim 1, further comprising: 响应于所述目标PPT页面的所述Canvas画布层的内容变更操作,将所述内容变更操作对应的内容变更操作指令数据上传至服务器,所述服务器用于将所述内容变更操作指令数据拆分为用于同步所述内容变更操作的不可拆分的最小化变更操作指令。In response to the content change operation of the Canvas layer of the target PPT page, the content change operation instruction data corresponding to the content change operation is uploaded to the server, and the server is used to split the content change operation instruction data into inseparable minimized change operation instructions for synchronizing the content change operation. 7.根据权利要求1所述的在线PPT的内容同步方法,其特征在于,还包括:7. The method for synchronizing content of online PPT according to claim 1, further comprising: 当所述待同步数据还包括PPT内容层的不可拆分的最小化PPT内容变更字段时,将所述最小化PPT内容变更字段合并至客户端本地的所述PPT内容层缓存文件中,得到同步后的所述PPT内容层缓存文件。When the data to be synchronized also includes an inseparable minimized PPT content change field of the PPT content layer, the minimized PPT content change field is merged into the local PPT content layer cache file of the client to obtain the synchronized PPT content layer cache file. 8.一种电子设备,其特征在于,包括:8. An electronic device, comprising: 存储器,所述存储器存储执行指令;以及a memory storing execution instructions; and 处理器,所述处理器执行所述存储器存储的执行指令,使得所述处理器执行权利要求1至7中任一项所述的在线PPT的内容同步方法。A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the content synchronization method of the online PPT according to any one of claims 1 to 7. 9.一种可读存储介质,其特征在于,所述可读存储介质中存储有执行指令,所述执行指令被处理器执行时用于实现权利要求1至7中任一项所述的在线PPT的内容同步方法。9. A readable storage medium, characterized in that the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, they are used to implement the online PPT content synchronization method described in any one of claims 1 to 7. 10.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的在线PPT的内容同步方法。10. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the online PPT content synchronization method according to any one of claims 1 to 7 is implemented.
CN202510869028.7A 2025-06-26 2025-06-26 Online PPT content synchronization method, electronic equipment, medium and product Active CN120353420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510869028.7A CN120353420B (en) 2025-06-26 2025-06-26 Online PPT content synchronization method, electronic equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510869028.7A CN120353420B (en) 2025-06-26 2025-06-26 Online PPT content synchronization method, electronic equipment, medium and product

Publications (2)

Publication Number Publication Date
CN120353420A true CN120353420A (en) 2025-07-22
CN120353420B CN120353420B (en) 2025-08-26

Family

ID=96406463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510869028.7A Active CN120353420B (en) 2025-06-26 2025-06-26 Online PPT content synchronization method, electronic equipment, medium and product

Country Status (1)

Country Link
CN (1) CN120353420B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9032295B1 (en) * 2008-03-19 2015-05-12 Dropbox, Inc. Method for displaying files from a plurality of devices in a multi-view interface and for enabling operations to be performed on such files through such interface
US20180011627A1 (en) * 2014-06-16 2018-01-11 Siracusano Meeting collaboration systems, devices, and methods
CN115589408A (en) * 2022-11-24 2023-01-10 南京伯索网络科技有限公司 System and synchronization method for multi-terminal online PPT playing, electronic device and storage medium
CN116451654A (en) * 2023-03-03 2023-07-18 安徽工程大学 Interactive PPT design method
CN118297038A (en) * 2024-02-02 2024-07-05 中国船舶集团有限公司第七一九研究所 OnChain PLM system-based PDF collaborative labeling method
CN118690727A (en) * 2024-05-31 2024-09-24 中国银行股份有限公司 Document collaborative editing method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9032295B1 (en) * 2008-03-19 2015-05-12 Dropbox, Inc. Method for displaying files from a plurality of devices in a multi-view interface and for enabling operations to be performed on such files through such interface
US20180011627A1 (en) * 2014-06-16 2018-01-11 Siracusano Meeting collaboration systems, devices, and methods
CN115589408A (en) * 2022-11-24 2023-01-10 南京伯索网络科技有限公司 System and synchronization method for multi-terminal online PPT playing, electronic device and storage medium
CN116451654A (en) * 2023-03-03 2023-07-18 安徽工程大学 Interactive PPT design method
CN118297038A (en) * 2024-02-02 2024-07-05 中国船舶集团有限公司第七一九研究所 OnChain PLM system-based PDF collaborative labeling method
CN118690727A (en) * 2024-05-31 2024-09-24 中国银行股份有限公司 Document collaborative editing method, device, server and storage medium

Also Published As

Publication number Publication date
CN120353420B (en) 2025-08-26

Similar Documents

Publication Publication Date Title
US8660986B2 (en) Preserving user intent in merging ordered objects
AU2011320745B2 (en) Synchronizing online document edits
US8850306B2 (en) Techniques to create structured document templates using enhanced content controls
US8890890B2 (en) Pluggable web-based visualizations for applications
US8219526B2 (en) Synchronizing file partitions utilizing a server storage model
US9477497B2 (en) Methods for determining resource dependency and systems thereof
JP2008542875A (en) Method, system, and computer-readable storage medium for synchronizing a modifiable document with multiple clients
CN114564922A (en) Document editing method and device, computer equipment and storage medium
US20220342644A1 (en) Branching and merging in a design interface
CN112818277A (en) Webpage generation method and device, storage medium and electronic equipment
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN120353420B (en) Online PPT content synchronization method, electronic equipment, medium and product
CN113656005B (en) Application component library construction method, application component configuration method and related devices
CN114741363A (en) Method, device and program product for processing and acquiring skeleton resources of virtual image
US10891426B2 (en) Editing program, editing device, and editing method for editing text and displaying the edited text
CN114756228A (en) Page processing method, apparatus, device and storage medium
US11868706B1 (en) System, method, and computer program for syncing content across workspace pages
US20250021414A1 (en) Unified rest api for graphic design system
US7743318B2 (en) Order independent batched updates on a text buffer
US12373792B2 (en) Generating multistate vector objects for variant review and application
CN120371848B (en) Content changing method, electronic device, storage medium and program product
US20240272778A1 (en) System and method for incremental loading when rendering design interfaces in a simulation environment
US12347003B2 (en) Collaborative editing of vector graphics
Crespo et al. Responsive interaction for a large Web application: the meteor shower architecture in the WebWriter II Editor
CN117251898B (en) Revit linking method and system based on cloud storage

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