Exported document browsing method of online document, related device and medium
By obtaining and using playback and parsing description data and plug-ins during the export process, the problem that attachments cannot be previewed and viewed after online document export is solved, and the normal preview and viewing of attachments in local documents is achieved, improving the effectiveness and accuracy of exported documents.
Patent Information
- Application Number
- CN202410065296.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-18
AI Technical Summary
After the prior art, after exporting an online document as a local document, the attachment cannot be previewed and viewed, resulting in insufficient validity and accuracy of the exported document.
By obtaining document body data, attachment data, and playing parsing description data from the server during the export process, and using the first attachment playback plug-in to play attachments in the export document page, preview and viewing of attachments is realized.
Improves the effectiveness and accuracy of exporting documents, allowing for normal preview and viewing of attachments in local documents.
Smart Images

Figure CN120337859A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data, and in particular, to a method for viewing an exported document of an online document, a related device, and a medium. Background Art
[0002] Attachments (such as videos, pictures, and audios) inserted in an online document can be previewed and viewed. However, after the online document is exported as a local document, the attachments will become in a pure text form and the preview and viewing functions cannot be provided. For example, object A inserts a local video in an online document and can normally preview and view the local video. However, when object A exports it as a local document and sends it to object B, or object A opens the local document by himself / herself without sending it to object B, object B cannot preview and view the local video when opening the local document. This is because, in the related art, generally during the export process, the document data of the online document is sent to the client. The document data generally includes document body data (such as data in the docx or xlxs format), and may also include attachment data (such as data corresponding to videos, pictures, or audios). However, for the client, the document body data and the attachment data are two independent data, and the document body data and the attachment data cannot be associated. Therefore, when the client renders the exported document page based on the document body data, the preview and viewing functions for the attachments cannot be provided in the exported document page.
[0003] It can be seen that for a document exported by the existing document export method, when the exported document is opened (such as opened using a local office software), there is a problem that the attachments cannot be previewed and viewed, and it is difficult to ensure the effectiveness and accuracy of the exported document. Summary of the Invention
[0004] Embodiments of the present disclosure provide a method for viewing an exported document of an online document, a related device, and a medium, which can improve the effectiveness and accuracy of the exported document.
[0005] According to one aspect of the present disclosure, there is provided a method for viewing an exported document of an online document, which is applied to a client, and the method includes:
[0006] In response to an export command for a target online document, sending an export request for the target online document to a server;
[0007] Receiving, from the server, the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document;
[0008] Obtaining a first attachment playback plugin;
[0009] In response to an attachment opening command in an exported document page rendered based on the document body data, run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0010] According to an aspect of the present disclosure, there is provided an exported document browsing device for an online document, which is applied to a client. The device includes:
[0011] A first sending unit, configured to send an export request for the target online document to the server in response to an export command for the target online document;
[0012] A first receiving unit, configured to receive the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document from the server;
[0013] A first obtaining unit, configured to obtain a first attachment playback plugin;
[0014] A running unit, configured to run the first attachment playback plugin in response to an attachment opening command in an exported document page rendered based on the document body data, so as to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0015] Optionally, the client includes a local processing end and a local file system;
[0016] The first receiving unit is specifically configured to:
[0017] Receive an export completion notification message from the server through the local processing end and transmit the export completion notification message to the local file system;
[0018] Download and store the document body data, the first attachment data, and the playback parsing description data from the server through the local file system.
[0019] Optionally, after receiving the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document from the server, the device further includes: an update unit, configured to:
[0020] When at least one of the document body data, the first attachment data, and the playback parsing description data is updated on the server, receive an update notification message from the server through the local processing end and transmit the update notification message to the local file system;
[0021] Download at least one of the updated document body data, the updated first attachment data, and the updated play parsing description data from the server through the local file system to replace at least one of the document body data, the first attachment data, and the play parsing description data stored in the local file system.
[0022] Optionally, the client further includes a local engine middleware platform and a document rendering front end;
[0023] Before running the first attachment playback plugin in response to an attachment opening command in the target online document page rendered based on the document body data, the apparatus further includes: a rendering unit, configured to:
[0024] In response to an opening command for the exported document of the target online document, send the document body data to the local engine middleware platform through the local processing end;
[0025] Obtain the play parsing description data from the local file system through the local engine middleware platform, and integrate the document body data and the play parsing description data;
[0026] Render the exported document page and the attachment titles on the exported document page based on the integrated document body data and play parsing description data through the document rendering front end.
[0027] Optionally, the document body data, the first attachment data, and the play parsing description data are stored as a first data structure in the local file system; the rendering unit is specifically configured to:
[0028] In response to the opening command for the exported document, obtain the path parameter of the first data structure through the local processing end;
[0029] Obtain the document body data from the first data structure of the local file system based on the path parameter;
[0030] Send the document body data to the local engine middleware platform.
[0031] Optionally, the rendering unit is further specifically configured to:
[0032] Obtain the path parameter of the first data structure through the local engine middleware platform;
[0033] Obtain the play parsing description data from the first data structure of the local file system based on the path parameter;
[0034] Integrate the document body data and the play parsing description data.
[0035] Optionally, obtaining the playback parsing description data from the first data structure of the local file system based on the path parameter includes: obtaining the playback parsing description data and the first attachment data from the first data structure of the local file system based on the path parameter;
[0036] Before integrating the document body data and the playback parsing description data, the rendering unit is further configured to: determine that the attachment pointed to by the playback parsing description data matches the first attachment data.
[0037] Optionally, the rendering unit is specifically further configured to:
[0038] Separate the document body data and the playback parsing description data from the integrated document body data and the playback parsing description data through the document rendering front end;
[0039] Render the export document page based on the document body data;
[0040] Render the attachment title on the export document page based on the playback parsing description data.
[0041] Optionally, the rendering unit is specifically further configured to:
[0042] If the playback parsing description data matches the first attachment playback plugin, associate and render the playable mark with the attachment title in the export document page;
[0043] If the playback parsing description data does not match the first attachment playback plugin, render the attachment title as an attachment link in the export document page.
[0044] Optionally, the client further includes an attachment display front end; the running unit is specifically configured to:
[0045] If the export document page has the playable mark associated with the attachment title, receive a trigger on the playable mark through the attachment display front end;
[0046] Run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data in the local file system, and render the first attachment data to play the attachment in the first page corresponding to the first attachment playback plugin.
[0047] Optionally, the running unit is further configured to:
[0048] If the export document page has the attachment link, receive a trigger on the attachment link through the attachment display front end;
[0049] Obtain a second attachment playback plugin that matches the playback parsing description data, and based on the playback parsing description data in the local file system, retrieve the first attachment data, render the first attachment data, and play the attachment on a second page corresponding to the second attachment playback plugin.
[0050] Optionally, the running unit is specifically configured to:
[0051] Determine that the playback parsing description data meets a first condition;
[0052] Based on the playback parsing description data in the local file system, retrieve the first attachment data;
[0053] Request updated attachment data and updated playback parsing description data of the target online document from the server based on the playback parsing description data;
[0054] If the similarity between the first attachment data and the updated attachment data is less than a first threshold, replace the first attachment data in the local file system with the updated attachment data, and replace the playback parsing description data in the local file system with the updated playback parsing description data;
[0055] Render the first attachment data to play the attachment on a first page corresponding to the first attachment playback plugin.
[0056] Optionally, the playback parsing description data includes the export time of the exported document and the importance level of the exported document;
[0057] The running unit is specifically configured to:
[0058] Determine that the time difference between the export time of the exported document and the current time is greater than a second threshold;
[0059] Determine that the importance level of the exported document is greater than a third threshold.
[0060] Optionally, the running unit is specifically configured to:
[0061] In the local file system, retrieve the first attachment data based on the playback parsing description data;
[0062] Generate a first attachment model based on the first attachment data, where the first attachment model is the same as a second attachment model generated by the server for the target online document, and the first attachment playback plugin is the same as a third attachment playback plugin that executes the second attachment model on the server;
[0063] Execute the first attachment model through the first attachment playback plugin to play the attachment.
[0064] Optionally, the playback parsing description data further includes the attachment duration;
[0065] The step of retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data, and playing the attachment on the first page corresponding to the first attachment playback plugin includes: retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data, and playing the attachment on the first page corresponding to the first attachment playback plugin according to the attachment duration.
[0066] Optionally, the playback parsing description data further includes a preview image of the attachment;
[0067] Before running the first attachment playback plugin in response to an attachment opening command on the export document page rendered based on the document body data to retrieve the first attachment data based on the playback parsing description data and play the attachment, the device further includes a preview unit for:
[0068] Through the attachment display front end, in response to an attachment preview command on the target online document page rendered based on the document body data, run the first attachment playback plugin to obtain the preview image from the playback parsing description data, and render the preview image on the export document page in association with the attachment title of the attachment.
[0069] Optionally, the first data structure includes a document file corresponding to the document body data, an attachment file corresponding to the first attachment data, and a description file corresponding to the playback parsing description data, wherein the description file is set as a hidden file.
[0070] According to an aspect of the present disclosure, there is provided a method for browsing an export document of an online document, which is applied to a server. The method includes:
[0071] Receive an export request for a target online document from a client;
[0072] Utilize a metadata interface to obtain playback parsing description data of the target online document;
[0073] Send the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client, so that the client runs the first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the document body data, and retrieves the first attachment data based on the playback parsing description data to play the attachment.
[0074] According to one aspect of the present disclosure, there is provided an apparatus for viewing an export document of an online document, which is applied to a server. The apparatus includes:
[0075] A second receiving unit, configured to receive an export request for a target online document from a client;
[0076] A second obtaining unit, configured to obtain playback parsing description data of a target online document by using a metadata interface;
[0077] A second sending unit, configured to send the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client, so that the client runs the first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the document body data, and retrieves the first attachment data based on the playback parsing description data to play the attachment.
[0078] Optionally, the metadata interface includes an attachment file information interface and an attachment running information interface;
[0079] The second obtaining unit is specifically configured to:
[0080] Obtain the attachment file information of the target online document by using the attachment file information interface;
[0081] Obtain the attachment running information for driving the attachment to run by using the attachment running information interface;
[0082] Integrate the attachment file information and the attachment running information into the playback parsing description data.
[0083] Optionally, the attachment is stored in a storage node associated with the server; the playback parsing description data includes an attachment version number field, an attachment basic information field, an attachment file information field, and an attachment running information field; integrating the attachment file information and the attachment running information into the playback parsing description data includes:
[0084] Obtain the attachment from the storage node;
[0085] Extract the attachment version number from the attachment and fill it into the attachment version number field;
[0086] Extract the attachment file name and attachment keywords from the said attachment, and fill them into the said attachment basic information field;
[0087] Fill the said attachment file information into the said attachment file information field, and fill the said attachment running information into the said attachment running information field.
[0088] According to one aspect of the present disclosure, there is provided an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the export document browsing method of the online document as described above is implemented.
[0089] According to one aspect of the present disclosure, there is provided a computer-readable storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the export document browsing method of the online document as described above is implemented.
[0090] According to one aspect of the present disclosure, there is provided a computer program product, which includes a computer program, and the computer program is read and executed by a processor of a computer device, so that the computer device executes the export document browsing method of the online document as described above.
[0091] In the embodiments of the present disclosure, in response to an export command for a target online document, an export request for the target online document is sent to the server. Through this export request, in addition to receiving the document body data and the first attachment data of the target online document from the server, playback parsing description data is also received from the server. The playback parsing description data includes data for describing the first attachment data and can indicate the association between the document body data and the first attachment data. Based on obtaining the above three data, the present embodiment also obtains a first attachment playback plugin. The first attachment playback plugin is used to call the playback parsing description data to play the attachment in the first attachment data. Finally, in response to an attachment opening command in the export document page rendered based on the document body data, the first attachment playback plugin is run to retrieve the first attachment data based on the playback parsing description data and play the attachment. It can be seen that the embodiments of the present disclosure not only utilize the role of the playback parsing description data in indicating the association between the document body data and the first attachment data, but also utilize the role of the first attachment playback plugin in being able to call the playback parsing description data, realizing the function of playing an attachment in the export document page rendered by the document body data. That is, the function of providing preview and viewing of the attachment when the export document is opened is realized. The embodiments of the present disclosure can improve the effectiveness and accuracy of the export document.
[0092] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present disclosure. The objectives and other advantages of the present disclosure may be realized and attained by the structure particularly pointed out in the specification, claims as well as the drawings. Description of the Drawings
[0093] The drawings are used to provide a further understanding of the technical solutions of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solutions of the present disclosure, and do not constitute a limitation to the technical solutions of the present disclosure.
[0094] Figure 1 is a structural diagram of a system to which the method for browsing an exported document of an online document according to an embodiment of the present disclosure is applied;
[0095] Figures 2A - 2H is a schematic diagram of an interface when an embodiment of the present disclosure is applied to the scenario of exporting an online document to a local document;
[0096] Figure 3 is a first flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0097] Figure 4 is a schematic diagram of the data structure for playing and parsing description data;
[0098] Figure 5 is a second flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0099] Figure 6A is a first schematic diagram of a first data structure;
[0100] Figure 6B is a second schematic diagram of a first data structure;
[0101] Figure 7 is a third flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0102] Figure 8 is a fourth flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0103] Figure 9 is a fifth flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0104] Figure 10 is a sixth flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0105] Figure 11It is the seventh flowchart of the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0106] Figure 12 It is a block diagram of a device for browsing an exported document of an online document located at a client according to an embodiment of the present disclosure;
[0107] Figure 13 It is a block diagram of a device for browsing an exported document of an online document located at a server according to an embodiment of the present disclosure;
[0108] Figure 14 It is a structure diagram of a client for implementing the method for browsing an exported document of an online document according to an embodiment of the present disclosure;
[0109] Figure 15 It is a structure diagram of a server for implementing the method for browsing an exported document of an online document according to an embodiment of the present disclosure. Detailed implementation manners
[0110] In order to make the objectives, technical solutions and advantages of the present disclosure clearer and more understandable, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0111] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are applicable to the following explanations:
[0112] Online document: It refers to a document stored on the Internet that can be accessed and edited through the network. These documents are usually stored on cloud servers, and the target objects can access and edit these documents through various devices and operating systems without the need to download or install any specific software. Online documents usually include various types of files such as text documents, spreadsheets, and presentation slides, and the target objects can perform real-time collaboration and sharing through the Internet. The formats of online documents include: doc, sheet, slide, etc.
[0113] Attachment: Usually refers to other files associated with a document, such as pictures, videos, audios, documents, etc. These attachments can be embedded in the online document or uploaded and shared as attached files of the document. Attachments will occupy the document capacity.
[0114] Local document: It refers to a document stored on a personal computer or mobile device. These documents are usually saved in the hard drive or memory card of the device and can be accessed and edited without an Internet connection. Local documents can include various types of files, such as text documents, spreadsheets, presentations, etc. The target object can use locally installed software to create, edit, and save local documents. Compared with online documents, local documents usually require more storage space and may not be as convenient in terms of collaboration and sharing. The formats of local documents include: document (docx), table (xlxs), slide (pptx), etc.
[0115] Exported document of an online document: It refers to a document generated by performing an export operation on an online document and is a special type of local document. The formats of the exported document can include but are not limited to the following: pdf format, doc format, docx format, xls format, xlsx format, html format, txt format.
[0116] Method for browsing the exported document of an online document: It is a technology for browsing the exported document of an online document. For example, after exporting an online document in xlsx format to an exported document in xlsx format, open the exported document in xlsx format on the client side to browse the exported document.
[0117] System architecture and scenario description applied in the embodiments of the present disclosure
[0118] Figure 1 It is a system architecture diagram applied to the method for browsing the exported document of an online document according to the embodiments of the present disclosure. It includes: client 110, Internet 120, gateway 130, and server 140.
[0119] Client 110 is a device used by the object to browse the exported document of an online document. It includes various forms such as a desktop computer, laptop, PDA (Personal Digital Assistant), mobile phone, in-vehicle terminal, home theater terminal, dedicated terminal, etc. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network and share a display device for collaborative work, jointly constituting a terminal. Client 110 can also communicate with the Internet 120 in a wired or wireless manner to exchange data.
[0120] The gateway 130 is also known as an internetwork connector or protocol converter. The gateway 130 realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. Between two systems using different communication protocols, data formats, or languages, and even with completely different architectures, the gateway 130 is a translator. At the same time, the gateway 130 can also provide filtering and security functions. Messages sent from the client 110 to the server 140 need to be sent to the corresponding server 140 through the gateway 130. Messages sent from the server 140 to the client 110 also need to be sent to the corresponding client 110 through the gateway 130.
[0121] The server 140 refers to a computer system that can export online documents to the client 110. Compared with the client 110, the server 140 has higher requirements in terms of stability, security, performance, etc. The server 140 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part (such as a virtual machine) allocated from a high-performance computer, a combination of parts (such as virtual machines) allocated from multiple high-performance computers, etc. The server 140 can also communicate with the Internet 120 by wired or wireless means to exchange data.
[0122] The embodiments of the present disclosure can be applied in various scenarios, such as Figures 2A - 2H the scenario of exporting an online document to a local document as shown, etc.
[0123] As Figure 2A shown, in the online document display interface in the client 110, the name of the online document is displayed as "Online Document Title Bar", and the "Insert" option and "Export" option of the online document are also displayed, etc. After triggering the "Insert" option, a video V is inserted into the online document (such as Figure 2A "Video V.mp4" shown). The object can trigger the preview of the video V by hovering the mouse.
[0124] As Figure 2B shown, when the mouse hovers over the area corresponding to the video V, a preview image of the video V is displayed in the online document display interface. The "Playable Mark" option of the video V is also displayed in the online document display interface (such as Figure 2A or Figure 2B the triangle shown). The object can trigger the playback of the video V by clicking the playable mark with the mouse.
[0125] As Figure 2CAs shown, after the object previews the preview image of video V, it selects to trigger the "playable mark" option. After the object triggers the "playable mark" option, client 110 sends a play request to server 140 so that server 140 renders video V and then sends the rendered data to client 110, enabling client 110 to play video V.
[0126] As Figure 2D shown, an online play page is displayed in the online document display interface of client 110, and video V is played on this online play page. The object can trigger the "export" option of the online document (such as Figure 2A , Figure 2B or Figure 2C shown by "export") to generate an export request and send the export request to server 140. In response to the export request, server 140 exports the online document to obtain an exported document and sends the exported document to client 110.
[0127] As Figure 2E shown, in the exported document display interface in client 110, the name of the exported document is displayed as "Online Document Title Bar.xslx". It should be noted that compared with the name of the online document, the exported document has an additional ".xslx", indicating that the exported document is a local file.
[0128] Continuing as Figure 2E shown, when the mouse hovers over the area corresponding to video V, a preview image of video V is displayed in the exported document display interface. The "playable mark" option of video V is also displayed in the exported document display interface (such as Figure 2E shown by the triangle). The object can trigger the playback of video V by clicking on the playable mark with the mouse.
[0129] As Figure 2F shown, after the object previews the preview image of video V, it selects to trigger the "playable mark" option. After the object triggers the "playable mark" option, since the exported document is a local file, client 110 does not need to send a request to server 140 but directly renders locally, enabling client 110 to play video V.
[0130] As Figure 2G shown, a local play page is displayed in the exported document display interface of client 110, and video V is played on this local play page.
[0131] From the above Figures 2A - 2GIt can be seen that the preview and viewing functions of the online document in the embodiments of the present disclosure are the same as those of the exported document, and there is no problem that the attachments in the exported document cannot be previewed and viewed after exporting the online document as an exported document. However, in the export technology of the related art, there is often a problem that the attachments in the exported document cannot be previewed and viewed. For example, as Figure 2H shown, after the online document is exported as an exported document in the related art, the attachment will be parsed as a text link ( Figure 2H shown as " Video V.mp4 "), which cannot be previewed or viewed.
[0132] General description of the embodiments of the present disclosure
[0133] According to an embodiment of the present disclosure, a method for viewing an exported document of an online document is provided.
[0134] The method for viewing the exported document of the online document in the embodiments of the present disclosure is executed on the client and / or the server. As Figure 3 shown, the client includes a local file system, a local processing end, a local engine middle platform, a document rendering front end, and an attachment display front end.
[0135] The local file system is a software mechanism in the operating system of the client responsible for managing and storing file information, and can also be called a file management system, abbreviated as a file system. In the embodiments of the present disclosure, the local file system is used to store the document main data, the first attachment data, and the attachment parsing description data.
[0136] The local processing end is a module for data processing or calculation on the client. The local processing end mainly interacts with the local file system and the local engine middle platform. The local processing end can also interact with the server. In the embodiments of the present disclosure, the local processing end is used to open the exported document.
[0137] The local engine middle platform is similar to the local processing end and is a module for data processing or calculation on the client. The local engine middle platform mainly interacts with the local processing end, the document rendering front end, and the attachment display front end. The local engine middle platform can also interact with the server. In the embodiments of the present disclosure, the local engine middle platform is used to complete the conversion of the online document to the exported document.
[0138] The document rendering front end refers to the module on the client responsible for rendering the exported document. For example, it is responsible for rendering the exported document in the format of Doc, Slide, or Sheet.
[0139] The attachment display front end refers to the module on the client responsible for displaying the attachment. For example, it is responsible for displaying the attachment in the format of jpg, mp4, or mp3.
[0140] As shown in Table 1, the embodiments of the present disclosure can be compatible with a variety of accessories, and can be compatible with a variety of formats of each accessory.
[0141]
[0142] Table 1
[0143] Referring to Table 1, in one example, an object inserts a picture with the format of jpg into the target online document. When browsing the target online document, the picture can be previewed and viewed. After exporting the target online document to obtain an exported document, when browsing the exported document, the picture can also be previewed and viewed. Similarly, if an object inserts a video with the format of mp4 into the target online document, when browsing the exported document of the target online document, the preview picture of the video can be previewed, and the video can also be viewed / played. If an object inserts an audio with the format of MP3 into the target online document, when browsing the exported document of the target online document, the preview picture of the audio can be previewed, and the audio can also be viewed / played.
[0144] As Figure 3 shown, according to an embodiment of the present disclosure, the method for browsing an exported document of an online document (executed by a client) includes:
[0145] Step 310: In response to an export command for a target online document, send an export request for the target online document to the server;
[0146] Step 320: Receive the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document from the server;
[0147] Step 330: Obtain a first attachment playback plugin;
[0148] Step 340: In response to an attachment opening command in the exported document page rendered based on the document body data, run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0149] The advantage of the embodiments of steps 310-340 is that, through the export request, in addition to receiving the document body data and the first attachment data of the target online document from the server, the playback parsing description data is also received from the server. The playback parsing description data contains data describing the first attachment data and can indicate the association between the document body data and the first attachment data. Based on obtaining the above three data, the present embodiment also obtains the first attachment playback plugin. The first attachment playback plugin is used to call the playback parsing description data to play the attachment in the first attachment data. Finally, based on the above three data and the first attachment playback plugin, it is possible to successfully play the attachment in response to an attachment opening command on the export document page. It can be seen that the embodiments of the present disclosure not only utilize the role of the playback parsing description data in indicating the association between the document body data and the first attachment data, but also utilize the role of the first attachment playback plugin in calling the playback parsing description data, thereby realizing the function of playing the attachment on the export document page where the document body data is rendered. That is, the function of providing preview and viewing of the attachment when opening the exported document is realized. The embodiments of the present disclosure can improve the effectiveness and accuracy of document export.
[0150] The following provides a detailed description of steps 310-340, as well as the steps included between steps 310-340.
[0151] Detailed description of step 310
[0152] In step 310, in response to an export command for a target online document, an export request for the target online document is sent to the server. The target online document refers to the online document that the user wants to export. The export command refers to an instruction / command to export a file or data from one system or software to another system or software.
[0153] In one embodiment, the generation / determination method of the export command includes, but is not limited to, the following methods:
[0154] (1) By selecting the option of "Save As" in the "Online Document" to open the export document, thereby generating an export command.
[0155] (2) By selecting the option of "Download" in the "Online Document" to open the export document, thereby generating an export command.
[0156] (3) By selecting the option of "Export" in the "Online Document" to open the export document, thereby generating an export command.
[0157] After generating or determining the export command, in response to the export command, an export request for the target online document is sent to the server.
[0158] An export request refers to a request sent by a client to a server to export an online document as an exported document. An export request generally includes the following information: (1) The format of the exported document: The export request needs to specify the format of the file to be exported, such as PDF, doc, Excel, txt, etc. (2) The name of the exported document: The export request needs to specify the name of the exported file so that the object can easily identify and find the exported file. (3) The path of the exported document: The export request needs to specify the path of the exported document so that the exported document can be correctly saved to the specified location. After the server receives the export request, the server will execute the corresponding document export processing logic to send data related to the target online document to the client.
[0159] Detailed description of the steps further included after step 310
[0160] After the client sends an export request to the server, referring to Figure 3 , according to an embodiment of the present disclosure, an export document browsing method for an online document (executed by the server) includes:
[0161] Step 410, receiving an export request for a target online document from the client;
[0162] Step 420, using a metadata interface to obtain playback parsing description data of the target online document;
[0163] Step 430, sending the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client.
[0164] The advantages of the embodiments of steps 410-430 are that the playback parsing description data is separately obtained using the metadata interface and then sent to the client together with the document body data and the first attachment data, improving the accuracy and efficiency of obtaining the playback parsing description data while ensuring the integrity and accuracy of the sent data.
[0165] The following details steps 410-430.
[0166] In step 410, before the server 140 receives an export request from the client 110, the server 140 has established a communication connection with the client 110. The communication connection is usually implemented through the TCP / IP protocol, and the specific connection establishment process is not described in detail here. Once the communication connection is established, the server side 140 will receive the export request from the client. The information included in the export request refers to the above, and will not be elaborated here. In response to the received export request, the server 140 executes the corresponding processing logic. This may involve querying the database, reading files, executing specific business logics, etc.
[0167] In step 420, the metadata interface refers to an interface for reading data. It should be noted that after the server 140 receives the export request, it is relatively easy to read the document body data and the first attachment data (if there are attachments inserted in the target online document) of the target online document from the database or other storage spaces. However, the playback parsing description data may be stored in a place different from the first attachment data, and it is more difficult to read. Step 420 mainly uses the metadata interface to obtain the playback parsing description data of the target online document. The playback parsing description data includes data for describing the first attachment data and can indicate the association between the document body data and the first attachment data. For example, the playback parsing description data includes information such as the title, preview image, and duration of files such as audio, video, or pictures.
[0168] In one embodiment, the metadata interface includes an attachment file information interface and an attachment runtime information interface.
[0169] Refer to Figure 3 , step 420 (executed by the server 140) includes:
[0170] Step 4201: Use the attachment file information interface to obtain the attachment file information of the target online document;
[0171] Step 4202: Use the attachment runtime information interface to obtain the attachment runtime information when driving the attachment to run;
[0172] Step 4203: Integrate the attachment file information and the attachment runtime information into the playback parsing description data.
[0173] The following describes steps 4201-4203 in detail.
[0174] In step 4201, the attachment file information interface refers to an interface for reading attachment file information. The attachment file information can also be called attachment static information, such as information including the title, preview image, etc. The attachment file information is stored in a place associated with the attachment file information interface. By calling the attachment file information interface, the attachment file information can be obtained.
[0175] In step 4202, the attachment runtime information interface refers to an interface for reading attachment runtime information. The attachment runtime information can also be called attachment dynamic information, such as information including the duration, occupied space size, etc. The attachment runtime information is stored in a place associated with the attachment runtime information interface. By calling the attachment runtime information interface, the attachment runtime information can be obtained.
[0176] After obtaining the attachment file information and the attachment runtime information, in step 4203, the attachment file information and the attachment runtime information are integrated into the playback parsing description data.
[0177] In one embodiment, the play parsing description data includes an attachment file information field and an attachment operation information field. Step 4203 includes: filling the attachment file information into the attachment file information field and filling the attachment operation information into the attachment operation information field. This embodiment can integrate the attachment file information and the attachment operation information into the play parsing description data with relatively high integration accuracy.
[0178] The advantages of the embodiments of steps 4201 - 4203 are that two interfaces are used to respectively obtain the attachment file information and the attachment operation information corresponding to the attachment, achieving parallel information acquisition and improving the acquisition efficiency. In addition, the attachment file information and the attachment operation information are stored separately, improving data security.
[0179] In one embodiment, the attachment is stored in a storage node associated with the server, and the attachment can be obtained from the storage node. The storage node associated with the server is one of multiple storage nodes of a content delivery network. Content Delivery Network (CDN): An intelligent virtual network layer built on top of the existing Internet by placing node servers (storage nodes) everywhere in the network. The CDN system can, in real time, redirect the server requests to the storage node associated with the server (for example, the storage node closest to the server) based on comprehensive information such as network traffic, connections and loads of each node, distance to the server, and response time. Its purpose is to enable the server to obtain the required content nearby, solve the congestion of the Internet network, and improve the response speed of the server to access the website.
[0180] In one embodiment, the play parsing description data includes an attachment version number field and a data field. The data field can be further divided into an attachment basic information field, an attachment file information field, and an attachment operation information field. Refer to Figure 4 , Figure 4 shows the data structure of the play parsing description data. As Figure 4 shown, the attachment version field included in the play parsing description data is "version", and the data field is "data". The attachment basic information fields in the data field are "filename" and "objKey", the attachment file information field is "driveFileInfo", and the attachment operation information field is "driveQuery".
[0181] It should be noted that Figure 4The " / / Structure for playing and parsing description data", " / / Attachment version number field", " / / Attachment basic information field", " / / Combined information of driveFileInfo and driveQuery", " / / Attachment file information field", and " / / Attachment operation information field" shown are all comments for facilitating understanding of the data result of the playing and parsing description data, but are not components of the data structure of the playing and parsing description data.
[0182] Referring to Figure 3 , step 4203 (performed by server 140) includes:
[0183] Step 42031: Obtain the attachment from the storage node;
[0184] Step 42032: Extract the attachment version number from the attachment and fill it into the attachment version number field;
[0185] Step 42033: Extract the attachment file name and attachment keyword from the attachment and fill them into the attachment basic information field;
[0186] Step 42034: Fill the attachment file information into the attachment file information field and fill the attachment operation information into the attachment operation information field.
[0187] The following gives a detailed description of steps 42031 - 42034.
[0188] In step 42031, referring to the above, the attachment is stored in the storage node associated with server 140, so the attachment can be obtained from the storage node.
[0189] In step 42032, the attachment version number indicates the version of the attachment. The version number enables an object to know whether the inserted attachment is the latest version and the functions and facilities it provides. In one example, as Figure 4 shown, the attachment version number extracted from the attachment is "0.0.1", and filling it into "version" can obtain {"version":"0.0.1"}.
[0190] In step 42033, the attachment file name indicates the name of the attachment. The attachment file name enables an object to distinguish different attachments. The attachment keyword refers to the general information of the attachment. The attachment keyword can enable an object to generally understand the type or content of the attachment. For example, by knowing the attachment keyword, it can be known whether the attachment is a video, audio, or picture, etc. In one example, as Figure 4As shown, the attachment file name "a.mp4" is extracted from the attachment and filled into "filename", and finally {"filename":"a.mp4"} is obtained. The attachment keyword "5f794bcbe8a14d589c504cf6e9a170af" is extracted from the attachment and filled into "objKey", and {"objKey":"5f794bcbe8a14d589c504cf6e9a170af"} can be obtained.
[0191] In step 42034, the attachment file information is filled into the attachment file information field, and the attachment operation information is filled into the attachment operation information field. In one example, as Figure 4 shown, after filling the attachment file information into "driveFileInfo" and the attachment operation information into "driveQuery", {"driveFileInfo":{...},"driveQuery":{...}} can be obtained.
[0192] It should be noted that through the above steps 42031 - 42034, the structure of the playback parsing description data as Figure 4 shown can be obtained.
[0193] The advantages of the embodiments of steps 42031 - 42034 are that by obtaining the attachment from the storage node associated with the server, the network congestion problem can be alleviated and the acquisition efficiency can be improved. By extracting the corresponding information from the obtained attachment and filling it into the corresponding fields, while integrating the information into the playback parsing description data to improve data unity, the independence of each piece of information can be improved, and information visualization is enhanced.
[0194] After the server obtains the playback parsing description data through the above embodiments, in step 430, the server sends the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client.
[0195] It should be noted that the document body data refers to the original binary data corresponding to the target online document. The first attachment data refers to the original binary data of the attachment (such as audio, video, etc. files).
[0196] Detailed description of step 320
[0197] In step 320, receive the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document from the server;
[0198] As Figure 5As shown, according to an embodiment of the present disclosure, the client includes a local processing end and a local file system. Step 320 (performed by the client) includes:
[0199] Step 3201: Receive, through the local processing end, a notification message indicating the completion of export from the server, and transmit the notification message indicating the completion of export to the local file system;
[0200] Step 3202: Download and store the document body data, the first attachment data, and the playback parsing description data from the server through the local file system.
[0201] The following provides a detailed description of steps 3201 - 3202.
[0202] In step 3201, the notification message indicating the completion of export refers to the notification message generated by the server 140 after the server 140 exports the online document as an exported document. The client 110 receives the notification message indicating the completion of export from the server through the local processing end, and then transmits the notification message indicating the completion of export to the local file system through the local processing end.
[0203] The local processing end and the local file system are two independent modules within the client 110 and can run their own specific execution logics. For example, the local processing end can receive the notification message indicating the completion of export and can transmit the notification message indicating the completion of export to the local file system. The local file system can, in response to receiving the notification message indicating the completion of export, download and store the document body data, the first attachment data, and the playback parsing description data from the server.
[0204] The advantages of the embodiment of steps 3201 - 3202 are that there is no need for the client to poll the server regularly to check whether the export is completed. Instead, on the premise of receiving the notification message indicating the completion of export, the required data of the exported document is obtained from the server, which alleviates the communication network burden. In addition, in this embodiment, through the collaborative cooperation of the local processing end and the local file system, the download and storage of the required data are jointly completed, improving the interaction efficiency between the client and the server.
[0205] In some other embodiments, the notification message indicating the completion of export can be received from the server through the local file system, and then the document body data, the first attachment data, and the playback parsing description data are downloaded and stored from the server. This embodiment can also complete the download and storage of the required data.
[0206] Detailed description of the steps further included after step 320
[0207] As Figure 5 shown, according to an embodiment of the present disclosure, after step 320, the method for browsing the exported document of the online document (performed by the client) further includes:
[0208] Step 510: When at least one of the document body data, the first attachment data, and the playback parsing description data is updated on the server, the local processing end receives an update notification message from the server and transmits the update notification message to the local file system.
[0209] Step 520: The local file system downloads at least one of the updated document body data, the updated first attachment data, and the updated playback parsing description data from the server to replace at least one of the document body data, the first attachment data, and the playback parsing description data stored in the local file system.
[0210] The following is a detailed description of steps 510-520.
[0211] In step 510, after downloading and storing the document body data, the first attachment data, and the playback parsing description data from the server through the local file system, the object may have updated the target online document. For example, the server receives an export request at 8:00 am and then exports the target online document. However, at 9:00 am, the object may modify the content in the target online document, such as modifying the document name in the target online document, or inserting a new attachment, or updating the version or name of the attachment, etc. At this time, the server generates an update notification message in response to the update operation on the target online document and sends it to the client. On the client side, the local processing end receives the update notification message from the server and transmits the update notification message to the local file system.
[0212] In step 520, in response to the update notification message, the updated data is downloaded from the server through the local file system. The update notification message indicates the data that needs to be downloaded, so that the local file system can obtain which data needs to be downloaded from the server by parsing the update notification message.
[0213] For example, assume that the object modifies the document name in the target online document, then the document body data is updated. The updated document body data is downloaded from the server through the local file system to replace the document body data stored in the local file system. Another example, assume that the object inserts a new attachment in the target online document, then both the first attachment data and the attachment parsing description data are updated. The updated first attachment data and the playback parsing description data are downloaded through the local file system to replace the first attachment data and the playback parsing description data stored in the local file system. Another example, assume that the object updates the version or name of the attachment in the target online document, then the playback parsing description data is updated. The updated playback parsing description data is downloaded through the local file system to replace the playback parsing description data stored in the local file system.
[0214] Detailed description of step 330
[0215] In step 330 (executed by the client), obtain the first attachment playback plugin.
[0216] The first playback plugin refers to a plugin used to play audio, video, or pictures in a web page or application. Specifically, a plugin is a computer program that, through interaction with an application (such as a web browser, client), is used to add some specific functions required by the application. In the embodiments of the present disclosure, the first attachment playback plugin is mainly used to call / process the playback parsing description data to implement the playback of attachments (such as audio, video, or pictures).
[0217] In one embodiment, the obtaining methods of the first attachment playback plugin include but are not limited to the following methods:
[0218] (1) When the server sends the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client, it also sends the first attachment playback plugin, so that the client receives the first attachment playback plugin sent from the server.
[0219] (2) After receiving the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data from the server, call the candidate plugins that the client itself has to call the playback parsing description data, and use the candidate plugins that can be called as the first attachment playback plugin.
[0220] (3) After calling the candidate plugins that the client itself has to call the playback parsing description data, if there are no candidate plugins that can be called, send a plugin obtaining request to the server and receive the first attachment playback plugin sent from the server.
[0221] Detailed description of the steps further included before step 340
[0222] In one embodiment, the playback parsing description data includes a preview image of the attachment. Before step 340, according to the method for viewing an exported document of the online document in the embodiments of the present disclosure, it further includes:
[0223] Through the attachment display front end, in response to an attachment preview command in the target online document page rendered based on the document body data, run the first attachment playback plugin to obtain the preview image from the playback parsing description data, and render the preview image in the exported document page in association with the attachment title of the attachment.
[0224] Specifically, the attachment preview command refers to a command for previewing an attachment in the exported document page.
[0225] In one embodiment, the generation / determination methods of the attachment preview command include but are not limited to the following methods:
[0226] (1) Generate an attachment preview command by sliding the mouse over the display area of the attachment title on the exported document page.
[0227] (2) Generate an open command by double-clicking the mouse on the display area of the attachment title on the exported document page.
[0228] After generating the attachment open command, in response to the attachment open command, the client runs the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0229] Such as Figure 5 As shown, before step 340, the method for browsing the exported document of the online document according to the embodiment of the present disclosure further includes:
[0230] Step 610: In response to the open command of the exported document of the target online document, send the document body data to the local engine middle platform through the local processing end;
[0231] Step 620: Through the local engine middle platform, obtain the playback parsing description data from the local file system, and integrate the document body data and the playback parsing description data;
[0232] Step 630: Through the document rendering front end, render the exported document page and the attachment title on the exported document page based on the integrated document body data and the playback parsing description data.
[0233] The following is a detailed description of steps 610-630.
[0234] In step 610, the open command refers to the command to open the exported document of the target online document stored in the local file system.
[0235] In one embodiment, the generation / determination method of the open command includes but is not limited to the following methods:
[0236] (1) Right-click on the "exported document of the target online document" in the local file system to open the hidden menu bar, and then click on the "open" option in the hidden menu bar with the mouse to generate the open command.
[0237] (2) Double-click on the "exported document of the target online document" in the local file system with the mouse to generate the open command.
[0238] After generating the open command, in response to the open command, the local processing end reads the document body data corresponding to the exported document of the target online document and then sends it to the local engine middle platform.
[0239] In step 620, if the local engine middleware receives the document body data, it is equivalent to triggering the local engine middleware to perform data parsing. At this time, the local engine middleware automatically obtains the playback parsing description data from the local file system. Then, the local engine middleware integrates the document body data and the playback parsing description data.
[0240] It should be noted that it is also possible to obtain the playback parsing description data from the local file system through the local processing end instead of the local engine middleware, and integrate the document body data and the playback parsing description data. However, the local processing end is mainly responsible for various commands of the detected object (for example, the open command or other control commands) and various notification messages of the detection server (for example, the export completion notification message or other notification messages), and responds to the commands by performing corresponding responses. If the data acquisition and data integration in step 520 are also performed through the local processing end, it will undoubtedly cause a large processing burden on the local processing end. It can be seen that the embodiments of the present disclosure utilize the collaborative cooperation of the local processing end and the local engine middleware to reduce the processing burden of the local processing end while improving the interaction efficiency.
[0241] In step 630, after integrating the document body data and the playback parsing description data through the local engine middleware, the integrated document body data and the playback parsing description data are sent to the document rendering front end. Through the document rendering front end, based on the integrated document body data and the playback parsing description data, the exported document page and the attachment titles on the exported document page are rendered.
[0242] It should be noted that it is also possible to perform document rendering through the local engine middleware / local processing end instead of the document rendering front end. However, the local engine middleware is mainly responsible for data acquisition and integration, the local processing end is mainly responsible for various commands of the detected object and various notification messages of the detection server, and document rendering itself requires a certain amount of processing overhead. It can be seen that the embodiments of the present disclosure introduce a document rendering front end to reduce the processing burden of the local processing end and the local engine middleware.
[0243] The advantage of the embodiments of step 610-630 is that through the collaborative cooperation of the local processing end, the local engine middleware, and the document rendering front end, while improving the interaction efficiency, the processing burden is balanced.
[0244] In an embodiment, the document body data, the first attachment data, and the playback parsing description data are stored in the local file system as a first data structure. Specifically, the first data structure includes a document file corresponding to the document body data, an attachment file corresponding to the first attachment data, and a description file corresponding to the playback parsing description data. Among them, the description file can be set as a hidden file.
[0245] The advantages of this embodiment are that it improves the convenience of data storage and facilitates management. Additionally, setting the description file as a hidden file has the benefit of reducing accidental operations on the object.
[0246] In one example, Figure 6A The first schematic diagram of the first data structure is shown. As Figure 6A shown, the document file corresponding to the main body data of the document is “-test document.docx”. The attachment files corresponding to the first attachment data include “-video-a.mp3”, “-audio-b.mp3”, and “-picture-c.jpg”. The description file corresponding to the playback parsing description data is “-.filemate.json”.
[0247] In another example, Figure 6B The second schematic diagram of the first data structure is shown. As Figure 6B shown, compared with Figure 6A the description file “-.filemate.json” is set as a hidden file (represented by a dashed box in Figure 6B ).
[0248] As Figure 7 shown, according to an embodiment of the present disclosure, step 610 (executed by the client) includes:
[0249] Step 6101, in response to the open command of the exported document, obtain the path parameter of the first data structure through the local processing end;
[0250] Step 6102, based on the path parameter, obtain the main body data of the document from the first data structure in the local file system;
[0251] Step 6103, send the main body data of the document to the local engine middleware platform.
[0252] In step 6101, the path parameter indicates the storage path of the first data structure in the local file system. For example, the path parameter is href = ‘http: / / docs.qq.com / sheet / local_edit’. Among them, the key parameters include localFilePath (absolute path of the exported document) = XXX, local_edit (local editing flag) = 1, and globalPadid (device identifier generated by the client) = XXX.
[0253] Referring to the above, the open command may be generated because the object clicks to export the document. Therefore, the open command contains the path information of the exported document. Also, since the document body data, the first attachment data, and the playback parsing description data corresponding to the exported document are stored as a first data structure in the local file system, based on the open command, the path parameter of the first data structure can be obtained through the local processing end.
[0254] In step 6102, after obtaining the path parameter, the first data structure can be found from the local file system through the local processing end, and then the document body data can be obtained from the first data structure. It can be understood that although the document body data, the first attachment data, and the playback parsing description data are stored as a first data structure in the local file system, as Figure 6A shown, the various data in the first data structure are independent, so the document body data can be extracted from the first data structure. For example, the data format of the document body data is generally doc, docx, txt, etc. Therefore, the document body data can be extracted from the first data structure according to the first predetermined data format. The specific acquisition method is not limited in this embodiment, and those skilled in the art can set the acquisition method according to actual needs.
[0255] After obtaining the document body data, in step 6103, the document body data is sent to the local engine middleware platform.
[0256] The advantages of the embodiments of steps 6101-6103 are that, on the basis of realizing the function of being able to send the document body data to the local engine middleware platform, the first data structure can be used to uniformly store the document body data, the first attachment data, and the playback parsing description data, and can also retain the independence characteristics between the various data, improving the data storage convenience and data reading efficiency.
[0257] In another embodiment, step 610 includes: in response to the open command of the exported document, obtaining the path information of the exported document through the local processing end; extracting the document body data from the data corresponding to the exported document in the local file system based on the path information; and sending the document body data to the local engine middleware platform. This embodiment can also realize the function of sending the document body data to the local engine middleware platform.
[0258] As Figure 7 shown, according to an embodiment of the present disclosure, step 620 (executed by the client) includes:
[0259] Step 6201, obtaining the path parameter of the first data structure through the local engine middleware platform;
[0260] Step 6202, obtaining the playback parsing description data from the first data structure of the local file system based on the path parameter;
[0261] Step 6203: Integrate the document body data and the playback parsing description data.
[0262] The following provides a detailed description of steps 6201 - 6203.
[0263] In step 6201, similar to the description of step 6101 above, the path parameter indicates the storage path of the first data structure in the local file system. Before the document body data is parsed upon receipt by the local engine middleware, it is also necessary to obtain the playback parsing description data. Since the document body data and the playback parsing description data are stored as the first data result, it is necessary to obtain the path parameter of the first data structure.
[0264] In step 6202, similar to the description of step 6102 above, although the document body data, the first attachment data, and the playback parsing description data are stored as the first data structure in the local file system, as Figure 6A shown, the various data in the first data structure are independent, so the playback parsing description data can be extracted from the first data structure. For example, the data format of the playback parsing description data is generally json, js, etc., so the playback parsing description data can be extracted from the first data structure according to the second predetermined data format. The specific acquisition method is not limited in this embodiment, and those skilled in the art can set the acquisition method according to actual needs.
[0265] In step 6203, integrate the document body data and the playback parsing description data. The integration here specifically refers to the parsing and merging of the data. The purpose is to enable the document rendering front - end to perform rendering processing on the integrated document body data and playback parsing description data.
[0266] The advantage of the embodiment of steps 6201 - 6203 is that, on the basis of being able to integrate the document body data and the playback parsing description data, by using the first data structure that can uniformly store the document body data, the first attachment data, and the playback parsing description data, while retaining the independence between the various data, the data reading efficiency is improved.
[0267] As Figure 7 shown, according to an embodiment of the present disclosure, step 6202 (executed by the client) includes:
[0268] Step 62021: Based on the path parameter, obtain the playback parsing description data and the first attachment data from the first data structure in the local file system. In this embodiment, before step 6203, the method of the embodiment of the present disclosure further includes: 62022: Determine that the attachment pointed to by the playback parsing description data matches the first attachment data.
[0269] The difference between this embodiment and the above embodiment is that, on the basis of obtaining the playback parsing description data from the first data structure of the local file system, the first attachment data is also obtained. As introduced above, the playback parsing description data includes the description data of the attachment. Therefore, before data integration, it is possible to first determine whether the attachment pointed to by the playback parsing description data matches the first attachment data. After determining that the attachment pointed to by the playback parsing description data matches the first attachment data, then proceed to step 6203.
[0270] The advantage of this embodiment is that by determining that the playback parsing description data and the first attachment data can match, it reduces the errors / failures in data integration caused by data mismatch, ensuring the effectiveness of data integration. In addition, it also saves the processing overhead caused by invalid data integration.
[0271] In one embodiment, if they do not match, it means that the description information contained in the playback parsing description data cannot represent the first attachment data. At this time, it may be because there is an error in the process of downloading the playback parsing description data or the first attachment data, or it may be because the playback parsing description data or the first attachment data has been updated, resulting in a mismatch. In the case of a mismatch, at least one of the updated first attachment data and the updated playback parsing description data can be downloaded from the server through the local file system to replace at least one of the first attachment data and the playback parsing description data stored in the local file system.
[0272] As Figure 8 shown, according to an embodiment of the present disclosure, step 630 (executed by the client) includes:
[0273] Step 6301, separate the document body data and the playback parsing description data from the integrated document body data and the playback parsing description data through the document rendering front end;
[0274] Step 6302, render and export the document page based on the document body data;
[0275] Step 6303, render the attachment title on the exported document page based on the playback parsing description data.
[0276] In this embodiment, the document rendering front end refers to the module on the client responsible for rendering the exported document. For example, it is responsible for rendering exported documents in formats such as Doc, Slide, Xlsx, or Sheet. This embodiment uses the document rendering front end not only to render the exported document page, but also to render the attachment title on the exported document page.
[0277] In one example, the document rendering front end has document rendering code. By calling the document rendering code, the document body data and the playback parsing description data can be separated from the integrated document body data and the playback parsing description data. Continuing to render the document body data by calling the document rendering code, the document pages can be rendered and exported. Then, by continuing to call the document rendering code to render the playback parsing description data, the attachment title can be rendered on the exported document pages. For example, referring to Figure 4 , the document rendering front end calls the document body data to obtain docs-component-attachment, which specifically carries attchmentType (local document mode) = "local_edit" and objKey = XXX, and finally obtains the exported document pages. Please refer to Figure 2E , the exported document pages include the document name of the exported document as "Online Document Title Bar.xslx" and the attachment title on the exported document pages as "Video V.mp4".
[0278] The advantage of the embodiments of steps 6301 - 6303 is that, on the basis of being able to render and export the document pages and the attachment title, by introducing the document rendering front end, while ensuring the rendering effect / validity, the rendering efficiency can be greatly improved.
[0279] As Figure 8 shown, according to an embodiment of the present disclosure, step 6303 (executed by the client) includes:
[0280] Step 63031: If the playback parsing description data matches the first attachment playback plugin, in the exported document pages, the playable marker is associated with the attachment title and rendered;
[0281] Step 63032: If the playback parsing description data does not match the first attachment playback plugin, in the exported document pages, the attachment title is rendered as an attachment link.
[0282] In this embodiment, if the playback parsing description data matches the first attachment playback plugin, it means that if the first attachment playback plugin runs, the playback parsing description data can be normally called, so as to achieve the function of playing the attachment. At this time, in the exported document pages, the playable marker can be associated with the attachment title and rendered. In this way, the object knows that it can click the playable marker to trigger the first attachment playback plugin and play the attachment.
[0283] In one example, please refer to Figure 2E or Figure 2F , after rendering the attachment title "Video V.mp4" on the exported document pages, the playable marker is associated with "Video V.mp4" and rendered. Specifically, the playable marker is rendered as shown in Figure 2Eor Figure 2F The triangle to the left of "Video V.mp4" as shown. In response to the triggering of the playable marker, the video V is played by running the first attachment playback plugin.
[0284] If the playback parsing description data does not match the first attachment playback plugin, it means that if the first attachment playback plugin is run, it is very likely that the playback parsing description data cannot be normally called, thus unable to achieve the function of playing the attachment. At this time, on the export document page, the attachment title can be rendered as an attachment link. In this way, the object knows that it may be necessary to trigger a plugin other than the first attachment playback plugin to play the attachment.
[0285] In one example, please refer to Figure 2H , after rendering the attachment title "Video V.mp4" on the export document page, render "Video V.mp4" as an attachment link. Specifically, render "Video V.mp4" with an underline below it as shown in Figure 2H . In response to the triggering of the attachment link, the video V is played by running a plugin other than the first attachment playback plugin.
[0286] The advantage of the embodiment of step 63031 - 63032 is that, according to whether the playback parsing description data matches the first attachment playback plugin, the attachment title on the export document page is rendered in different aspects, with diverse and intuitive rendering results.
[0287] Detailed description of step 340
[0288] In step 340, in response to an attachment opening command in the export document page rendered based on the document body data, run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0289] It should be noted that the document body data (such as Figure 6A "Test Document.docx" shown) can support any document - class software based on OOXML to open. The first attachment data stores attachments (such as Figure 6A "Video", "Audio", or "Picture" etc. shown) that can support the opening of the appropriate playback plugin.
[0290] Specifically, the attachment opening command refers to the command to open the attachment on the export document page.
[0291] In one embodiment, the generation / determination method of the attachment opening command includes but is not limited to the following methods:
[0292] (1) Generate an attachment opening command by clicking the "Playable Marker" option in the export document page with the mouse.
[0293] (2) Double-click the display area of the attachment title in the exported document page with the mouse to generate an open command.
[0294] After generating the attachment open command, in response to the attachment open command, the client runs the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0295] As Figure 9 shown, according to an embodiment of the present disclosure, step 340 (executed by the client) includes:
[0296] Step 3401: If the exported document page has a playable marker associated with the attachment title, receive the trigger of the playable marker through the attachment display front end;
[0297] Step 3402: Run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data in the local file system, render the first attachment data, and play the attachment in the first page corresponding to the first attachment playback plugin.
[0298] In this embodiment, the first page refers to a page triggered by the first attachment playback plugin and independent of the exported document page. In an example, as Figure 2F shown, the playable marker is rendered as a "triangle" to the left of "Video V.mp4". The object can choose to trigger (e.g., by mouse click) the "triangle", so that the client receives the trigger of the playable marker through the attachment display front end. As Figure 2H shown, run the first attachment playback plugin through the attachment display front end to play Video V in the first page corresponding to the first attachment playback plugin.
[0299] The advantage of the embodiment of steps 3401-3402 is that, on the basis of being able to run the first attachment playback plugin to play the attachment, the efficiency of triggering the operation of the first attachment playback plugin is improved.
[0300] In an embodiment, the playback parsing description data includes the attachment duration. In this embodiment, step 3402 includes: running the first attachment playback plugin, retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data, and playing the attachment according to the attachment duration in the first page corresponding to the first attachment playback plugin.
[0301] The advantage of this embodiment is that it can improve the consistency of playing the attachment on the client side and the server side.
[0302] As Figure 9 shown, according to an embodiment of the present disclosure, step 340 (executed by the client) further includes:
[0303] Step 3403: If the exported document page has an attachment link, trigger the attachment link through the attachment display front-end.
[0304] Step 3404: Obtain a second attachment playback plugin that matches the playback parsing description data, and based on the playback parsing description data, retrieve the first attachment data in the local file system, render the first attachment data, and play the attachment on the second page corresponding to the second attachment playback plugin.
[0305] In this embodiment, the second page refers to a page that is triggered by the second attachment playback plugin and is independent of the exported document page. In one example, as Figure 2H shown, the attachment link is rendered with an underline below "Video V.mp4". The object can choose to trigger (e.g., by double-clicking the mouse or right-clicking the mouse and then clicking Open) the "attachment link", so that the client receives the trigger of the attachment link through the attachment display front-end, and realizes playing the attachment on the second page corresponding to the second attachment playback plugin.
[0306] The advantage of the embodiment of steps 3403-3404 is that even if the first attachment cannot be played by running the first attachment playback plugin, it also supports running the second attachment playback plugin to render the first attachment data, improving the replaceability / compatibility of rendering. This embodiment has high practicality and universality.
[0307] As Figure 10 shown, according to an embodiment of the present disclosure, step 3402 (executed by the client) includes:
[0308] Step 34021: Determine that the playback parsing description data meets the first condition;
[0309] Step 34022: Retrieve the first attachment data in the local file system based on the playback parsing description data;
[0310] Step 34023: Request the updated attachment data and updated playback parsing description data of the target online document from the server based on the playback parsing description data;
[0311] Step 34024: If the similarity between the first attachment data and the updated attachment data is less than the first threshold, replace the first attachment data in the local file system with the updated attachment data, and replace the playback parsing description data in the local file system with the updated playback parsing description data;
[0312] Step 34025: Render the first attachment data to play the attachment on the first page corresponding to the first attachment playback plugin.
[0313] The following will describe steps 34021-34025 in detail.
[0314] In step 34021, the first condition refers to a pre-set condition that needs to be satisfied for playing and parsing the description data. Playing and parsing the description data includes the export time of the exported document and the importance level of the exported document.
[0315] As Figure 10 shown, in one embodiment, step 34021 includes:
[0316] 340211. Determine that the time difference between the export time of the exported document and the current time is greater than a second threshold;
[0317] 340212. Determine that the importance level of the exported document is greater than a third threshold
[0318] Specifically, even after the target online document is exported to obtain the exported document, the object may continue to update the target online document (for example, modify the attachment name, insert a new attachment, etc.). If the time difference between the export data of the exported document and the current time is greater than the second threshold, it is very likely that the exported document is quite different from the target online document, and some important information may be missing. Therefore, setting the first condition to include that the time difference between the export time of the exported document and the current time is greater than the second threshold can achieve timed re-downloading of the updated attachment data and the updated play and parse description data from the server.
[0319] In addition to considering that the time difference is greater than the second threshold, the importance level of the exported document also needs to be considered. If the importance level of the exported document is low, for example, the attachments in the exported document are mainly videos or audios with low immediacy (such as movies, animations). It is sufficient for the object to request the export and then regenerate the exported document, without the need to actively download the updated attachment data and the updated play and parse description data from the server. If the importance level of the exported document is high, for example, the attachments in the exported document are mainly videos or audios with high immediacy (such as news videos, weather forecast audios). Therefore, setting the first condition to include that the importance level of the exported document is greater than the third threshold can automatically re-download the updated attachment data and the updated play and parse description data from the server without the object's active request when the time difference is greater than the second threshold.
[0320] The advantage of the embodiment of steps 340211 - 340212 is that on the basis of achieving timed downloading of the updated attachment data and the updated play and parse description data from the server, it can filter out data updates for exported documents with low importance levels. It can reduce the frequency of data updates, relieve the network burden, and ensure the real-time nature of the data of exported documents with high importance levels. This embodiment has high practicality and universality.
[0321] In step 34022, referring to the above, in the local file system, the document body data, the first attachment data, and the playback parsing description data are stored as the first data structure. Based on the fact that the playback parsing description data has been obtained by the attachment display front end, the first attachment data can be retrieved from the first data structure in the local file system based on the playback parsing description data.
[0322] It can be understood that in the local file system, the document body data, the first attachment data, and the playback parsing description data can be stored independently. In this case, since the playback parsing description data contains data for describing the first attachment data, the first attachment data can still be retrieved from the local file system based on the playback parsing description data.
[0323] In step 34023, since step 34021 has determined that the playback parsing description data meets the first condition, a data update request needs to be generated based on the playback parsing description data to download the updated attachment data and the updated playback parsing description data of the target online document from the server.
[0324] In step 34024, if the similarity between the first attachment data and the updated attachment data is less than the first threshold, the first attachment data in the local file system is replaced with the updated attachment data, and the playback parsing description data in the local file system is replaced with the updated playback parsing description data.
[0325] It can be understood that it is also possible to directly replace the first attachment data in the local file system with the updated attachment data and replace the playback parsing description data in the local file system with the updated playback parsing description data without considering whether the similarity is less than the first threshold. The advantage of doing so in step 34024 is that it can reduce the modification of the local file system and improve the stability and data security of the local file system.
[0326] Finally, in step 34025, the first attachment data (which is already the updated first attachment data here) is rendered to play the attachment on the first page corresponding to the first attachment playback plugin.
[0327] The advantage of the embodiment of steps 34021 - 34025 is that it can improve the real-time performance of playing attachments by realizing timed data update, and can reduce the processing overhead caused by data replacement in the case of high similarity. It can also improve the stability and data security of the local file system. This embodiment has high practicality and universality.
[0328] As Figure 11 shown, according to an embodiment of the present disclosure, step 3402 (executed by the client) includes:
[0329] Step 34026: In the local file system, retrieve the first attachment data based on the playback parsing description data;
[0330] Step 34027: Generate a first attachment model based on the first attachment data, where the first attachment model is the same as the second attachment model generated by the server for the target online document, and the first attachment playback plugin is the same as the third attachment playback plugin that executes the second attachment model on the server;
[0331] Step 34028: Execute the first attachment model through the first attachment playback plugin to play the attachment.
[0332] In this embodiment, the specific description of retrieving the first attachment data is similar to the description of step 34022 above and will not be elaborated here. The first attachment model is generated on the client side based on the first attachment data. The second attachment model is generated on the server side for the target online document. The first attachment model and the second attachment model being the same specifically means that the execution requirement information of the attachments is the same. For example, the execution requirement information includes page size, playback volume, attachment duration, etc.
[0333] The first attachment playback plugin and the third attachment playback plugin being the same specifically means that the playback functions of the first attachment playback plugin and the third attachment playback plugin are the same. For example, when executing the first attachment model corresponding to video V through the first attachment playback plugin, it is specifically to play video V on a page with a page size of 640*480. Then, when executing the second attachment model corresponding to video V through the third attachment playback plugin, it is also to play video V on a page with a page size of 640*480.
[0334] The advantages of the embodiment of steps 34026 - 34028 are that it can achieve the same attachment playback effect as the server side, improving the consistency between the target online document and the exported document. The object's browsing experience of the target online document is the same as that of the exported document, and this embodiment greatly improves the effectiveness of document export.
[0335] Description of the device and equipment of the embodiments of the present disclosure
[0336] It can be understood that although the steps in the above-mentioned various flowcharts are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this embodiment, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0337] It should be noted that in each specific implementation manner of the present disclosure, when it comes to performing relevant processing based on data related to object characteristics such as object attribute information or attribute information sets, the permission or consent of the object will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present disclosure need to obtain object attribute information, the separate permission or separate consent of the object will be obtained through methods such as pop-up windows or jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the target content, the relevant data of the necessary export document for the normal operation of the embodiments of the present disclosure will be obtained.
[0338] Figure 12 FIG. 1200 is a schematic structural diagram of an export document browsing device for an online document provided by an embodiment of the present disclosure. The export document browsing device 1200 for the online document is applied to a client and includes:
[0339] A first sending unit 1210, configured to send an export request for a target online document to a server in response to an export command for the target online document;
[0340] A first receiving unit 1220, configured to receive document body data of the target online document, first attachment data in the target online document, and playback parsing description data of the target online document from the server;
[0341] A first obtaining unit 1230, configured to obtain a first attachment playback plugin;
[0342] An operation unit 1240, configured to run the first attachment playback plugin in response to an attachment opening command in an export document page rendered based on the document body data, so as to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0343] Optionally, the client includes a local processing end and a local file system;
[0344] The first receiving unit 1220 is specifically configured to:
[0345] Receive an export completion notification message from the server through the local processing end, and transmit the export completion notification message to the local file system;
[0346] Download and store the document body data, the first attachment data, and the playback parsing description data from the server through the local file system.
[0347] Optionally, after receiving the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document from the server, the device further includes: an update unit (not shown in the figure), configured to:
[0348] When at least one of the document body data, the first attachment data, and the playback parsing description data is updated on the server, receive an update notification message from the server through the local processing end, and transmit the update notification message to the local file system;
[0349] Download at least one of the updated document body data, the updated first attachment data, and the updated playback parsing description data from the server through the local file system to replace at least one of the document body data, the first attachment data, and the playback parsing description data stored in the local file system.
[0350] Optionally, the client further includes a local engine middle platform and a document rendering front end;
[0351] Before running the first attachment playback plugin in response to an attachment opening command in the target online document page rendered based on the document body data, the device further includes: a rendering unit (not shown in the figure), configured to:
[0352] In response to an open command for the exported document of the target online document, send the document body data to the local engine middle platform through the local processing end;
[0353] Obtain the playback parsing description data from the local file system through the local engine middle platform, and integrate the document body data and the playback parsing description data;
[0354] Render the exported document page and the attachment titles on the exported document page based on the integrated document body data and playback parsing description data through the document rendering front end.
[0355] Optionally, the document body data, the first attachment data, and the playback parsing description data are stored in the local file system as a first data structure; the rendering unit (not shown in the figure) is specifically configured to:
[0356] In response to an open command for the exported document, obtain the path parameter of the first data structure through the local processing end;
[0357] Obtain the document body data from the first data structure of the local file system based on the path parameter;
[0358] Send the document body data to the local engine middle platform.
[0359] Optionally, the rendering unit (not shown in the figure) is further specifically configured to:
[0360] Obtain the path parameter of the first data structure through the local engine middle platform;
[0361] Obtain the playback parsing description data from the first data structure of the local file system based on the path parameter;
[0362] Integrate the document body data and the playback parsing description data.
[0363] Optionally, obtaining the playback parsing description data from the first data structure of the local file system based on the path parameter includes: obtaining the playback parsing description data and the first attachment data from the first data structure of the local file system based on the path parameter;
[0364] Before integrating the document body data and the playback parsing description data, the rendering unit (not shown in the figure) is further configured to: determine that the attachment pointed to by the playback parsing description data matches the first attachment data.
[0365] Optionally, the rendering unit (not shown in the figure) is further specifically configured to:
[0366] Separate the document body data and the playback parsing description data from the integrated document body data and playback parsing description data through the document rendering front end;
[0367] Render the exported document page based on the document body data;
[0368] Render the attachment title on the exported document page based on the playback parsing description data.
[0369] Optionally, the rendering unit (not shown in the figure) is further specifically configured to:
[0370] If the playback parsing description data matches the first attachment playback plugin, in the exported document page, associate and render the playable mark with the attachment title;
[0371] If the playback parsing description data does not match the first attachment playback plugin, in the exported document page, render the attachment title as an attachment link.
[0372] Optionally, the client further includes an attachment display front end; the running unit 1240 is specifically configured to:
[0373] If the exported document page has playable tags associated with the attachment title, receive a trigger for the playable tags through the attachment display front end;
[0374] Run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data in the local file system, and render the first attachment data to play the attachment in the first page corresponding to the first attachment playback plugin.
[0375] Optionally, the running unit 1240 is further configured to:
[0376] If the exported document page has an attachment link, receive a trigger for the attachment link through the attachment display front end;
[0377] Obtain a second attachment playback plugin that matches the playback parsing description data, retrieve the first attachment data based on the playback parsing description data in the local file system, and render the first attachment data to play the attachment in the second page corresponding to the second attachment playback plugin.
[0378] Optionally, the running unit 1240 is specifically configured to:
[0379] Determine that the playback parsing description data meets the first condition;
[0380] Retrieve the first attachment data based on the playback parsing description data in the local file system;
[0381] Request the updated attachment data and updated playback parsing description data of the target online document from the server based on the playback parsing description data;
[0382] If the similarity between the first attachment data and the updated attachment data is less than the first threshold, replace the first attachment data in the local file system with the updated attachment data, and replace the playback parsing description data in the local file system with the updated playback parsing description data;
[0383] Render the first attachment data to play the attachment in the first page corresponding to the first attachment playback plugin.
[0384] Optionally, the playback parsing description data includes the export time of the exported document and the importance level of the exported document;
[0385] The running unit 1240 is specifically configured to:
[0386] Determine that the time difference between the export time of the exported document and the current time is greater than the second threshold;
[0387] Determine that the importance level of the exported document is greater than the third threshold.
[0388] Optionally, the running unit 1240 is specifically configured to:
[0389] In the local file system, retrieve the first attachment data based on the playback parsing description data;
[0390] Generate a first attachment model based on the first attachment data, where the first attachment model is the same as the second attachment model generated by the server for the target online document, and the first attachment playback plugin is the same as the third attachment playback plugin that executes the second attachment model on the server;
[0391] Execute the first attachment model through the first attachment playback plugin to play the attachment.
[0392] Optionally, the playback parsing description data further includes the attachment duration;
[0393] Retrieving the first attachment data based on the playback parsing description data in the local file system and rendering the first attachment data to play the attachment on the first page corresponding to the first attachment playback plugin includes: retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data, and playing the attachment according to the attachment duration on the first page corresponding to the first attachment playback plugin.
[0394] Optionally, the playback parsing description data further includes a preview image of the attachment;
[0395] Before running the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment in response to an attachment opening command on the export document page rendered based on the document body data, the apparatus further includes: a preview unit (not shown in the figure) for:
[0396] Through the attachment display front end, in response to an attachment preview command on the target online document page rendered based on the document body data, run the first attachment playback plugin to obtain a preview image from the playback parsing description data and render the preview image in the export document page in association with the attachment title of the attachment.
[0397] Optionally, the first data structure includes a document file corresponding to the document body data, an attachment file corresponding to the first attachment data, and a description file corresponding to the playback parsing description data, where the description file is set as a hidden file.
[0398] Figure 13 Schematic diagram of the structure of the export document browsing apparatus 1300 for the online document provided by the embodiments of the present disclosure. The export document browsing apparatus 1300 for the online document is applied to a server and includes:
[0399] A second receiving unit 1310 for receiving an export request for a target online document from a client;
[0400] A second obtaining unit 1320 for obtaining the playback parsing description data of the target online document by using a metadata interface;
[0401] A second sending unit 1330, configured to send document body data of a target online document, first attachment data in the target online document, and playback parsing description data to a client, so that in response to an attachment opening command in an exported document page rendered based on the document body data, the client runs a first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
[0402] Optionally, the metadata interface includes an attachment file information interface and an attachment operation information interface;
[0403] The second obtaining unit 1320 is specifically configured to:
[0404] Use the attachment file information interface to obtain attachment file information of the target online document;
[0405] Use the attachment operation information interface to obtain attachment operation information when driving the attachment to run;
[0406] Integrate the attachment file information and the attachment operation information into the playback parsing description data.
[0407] Optionally, the attachment is stored in a storage node associated with the server; the playback parsing description data includes an attachment version number field, an attachment basic information field, an attachment file information field, and an attachment operation information field; integrating the attachment file information and the attachment operation information into the playback parsing description data includes:
[0408] Obtain the attachment from the storage node;
[0409] Extract the attachment version number from the attachment and fill it into the attachment version number field;
[0410] Extract the attachment file name and attachment keyword from the attachment and fill them into the attachment basic information field;
[0411] Fill the attachment file information into the attachment file information field and fill the attachment operation information into the attachment operation information field.
[0412] Refer to Figure 14 , Figure 14 FIG. is a block diagram of a part of a client for implementing the method for browsing an exported document of an online document according to an embodiment of the present disclosure. The client includes components such as a radio frequency (RF) circuit 1410, a memory 1415, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art can understand that Figure 14The structure of the client shown does not constitute a limitation on mobile phones or computers, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0413] The RF circuit 1410 can be used for receiving and sending information or signals during a call. Specifically, after receiving the downlink information from the base station, it is sent to the processor 1480 for processing; in addition, the uplink data is sent to the base station.
[0414] The memory 1415 can be used to store software programs and modules. The processor 1480 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 1415.
[0415] The input unit 1430 can be used to receive input numerical or character information, and generate key signal inputs related to the settings and function controls of the content terminal. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432.
[0416] The display unit 1440 can be used to display the input information or provided information and various menus of the content terminal. The display unit 1440 may include a display panel 1441.
[0417] The audio circuit 1460, speaker 1461, and microphone 1462 can provide an audio interface.
[0418] In this embodiment, the processor 1480 included in the client can execute the method for exporting and browsing online documents in the previous embodiment.
[0419] The clients in the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to scenarios such as data export, data sharing, and data aggregation.
[0420] Figure 15Structural block diagram of a part of a server for implementing the method for browsing an exported document of an online document according to an embodiment of the present disclosure. The server may vary greatly due to configuration or performance, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 3032, and one or more storage media 1530 (for example, one or more mass storage devices) for storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage media 1530 may be transient storage or persistent storage. The program stored in the storage media 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1522 may be configured to communicate with the storage media 1530 and execute a series of instruction operations in the storage media 1530 on the server.
[0421] The server may further include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input / output interfaces 1558, and / or one or more operating systems 1541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.
[0422] The central processing unit 1522 in the server may be used to execute the method for browsing an exported document of an online document according to an embodiment of the present disclosure.
[0423] An embodiment of the present disclosure further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the method for browsing an exported document of an online document in the foregoing respective embodiments.
[0424] An embodiment of the present disclosure further provides a computer program product, which includes a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes to implement the method for browsing an exported document of an online document as described above.
[0425] In the description of the present disclosure and the above accompanying drawings, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar content and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "comprise" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0426] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated content and indicates that three relationships may exist. For example, "A and / or B" may mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the content before and after is an "or" relationship. "At least one (one) of the following" or its similar expression means any combination of these items, including any combination of single items (ones) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0427] It should be understood that in the description of the embodiments of the present disclosure, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as "greater than", "less than", "exceeding", etc. do not include the present number, and understandings such as "above", "below", "within", etc. include the present number.
[0428] In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in an electrical, mechanical or other form.
[0429] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other relevant parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.
[0430] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0431] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present disclosure. The aforementioned storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0432] It should also be understood that the various embodiments provided by the present disclosure can be combined arbitrarily to achieve different technical effects.
[0433] The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present disclosure, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present disclosure.
Claims
1. A method for browsing an exported document of an online document, characterized in that, Applied to a client, the method includes: In response to an export command for a target online document, send an export request for the target online document to the server; Receive from the server the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document; Obtain a first attachment playback plugin; In response to an attachment opening command in the export document page rendered based on the document body data, run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment.
2. The method according to claim 1, wherein The client includes a local processing end and a local file system; The receiving from the server the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document includes: Through the local processing end, receive an export completion notification message from the server and transmit the export completion notification message to the local file system; Through the local file system, download and store the document body data, the first attachment data, and the playback parsing description data from the server.
3. The method according to claim 2, wherein After receiving from the server the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data of the target online document, the method further includes: When at least one of the document body data, the first attachment data, and the playback parsing description data is updated on the server, receive an update notification message from the server through the local processing end and transmit the update notification message to the local file system; Through the local file system, download at least one of the updated document body data, the updated first attachment data, and the updated playback parsing description data from the server to replace at least one of the document body data, the first attachment data, and the playback parsing description data stored in the local file system.
4. The method according to claim 2, wherein The client further includes a local engine middle platform and a document rendering front end; Before running the first attachment playback plugin in response to an attachment opening command in the target online document page rendered based on the document body data, the method further includes: In response to an opening command for the export document of the target online document, send the document body data to the local engine middle platform through the local processing end; Through the local engine middle platform, obtain the playback parsing description data from the local file system and integrate the document body data and the playback parsing description data; Through the document rendering front end, render the export document page and the attachment title on the export document page based on the integrated document body data and playback parsing description data.
5. The method according to claim 4, wherein The document body data, the first attachment data, and the playback parsing description data are stored in the local file system as a first data structure; In response to the open command of the exported document, send the document body data to the local engine middleware through the local processing end, including: In response to the open command of the exported document, obtain the path parameter of the first data structure through the local processing end; Based on the path parameter, obtain the document body data from the first data structure of the local file system; Send the document body data to the local engine middleware.
6. The method according to claim 5, wherein Through the local engine middleware, obtain the playback parsing description data from the local file system, and integrate the document body data and the playback parsing description data, including: Through the local engine middleware, obtain the path parameter of the first data structure; Based on the path parameter, obtain the playback parsing description data from the first data structure of the local file system; Integrate the document body data and the playback parsing description data.
7. The method according to claim 4, wherein Through the document rendering front end, render the exported document page and the attachment title on the exported document page based on the integrated document body data and the playback parsing description data, including: Through the document rendering front end, separate the document body data and the playback parsing description data from the integrated document body data and the playback parsing description data; Render the exported document page based on the document body data; Render the attachment title on the exported document page based on the playback parsing description data.
8. The method according to claim 7, wherein The rendering of the attachment title on the exported document page based on the playback parsing description data includes: If the playback parsing description data matches the first attachment playback plugin, in the exported document page, render the playable marker associated with the attachment title; If the playback parsing description data does not match the first attachment playback plugin, in the exported document page, render the attachment title as an attachment link.
9. The method according to claim 8, wherein The client further includes an attachment display front end; in response to an attachment open command in the exported document page rendered based on the document body data, run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data and play the attachment, including: If the exported document page has the playable marker associated with the attachment title, receive the trigger of the playable marker through the attachment display front end; Run the first attachment playback plugin to retrieve the first attachment data based on the playback parsing description data in the local file system, render the first attachment data, and play the attachment in the first page corresponding to the first attachment playback plugin.
10. The method according to claim 9, wherein The retrieving of the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data, and playing the attachment in the first page corresponding to the first attachment playback plugin includes: In the local file system, retrieve the first attachment data based on the playback parsing description data; Generate a first attachment model based on the first attachment data, where the first attachment model is the same as the second attachment model generated by the server for the target online document, and the first attachment playback plugin is the same as the third attachment playback plugin that executes the second attachment model on the server; Execute the first attachment model through the first attachment playback plugin to play the attachment.
11. The method according to claim 9, wherein The playback parsing description data further includes a preview image of the attachment; Before running the first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the document body data to retrieve the first attachment data based on the playback parsing description data and play the attachment, the method further includes: Through the attachment display front end, in response to an attachment preview command in the target online document page rendered based on the document body data, run the first attachment playback plugin to obtain the preview image from the playback parsing description data, and render the preview image in the export document page in association with the attachment title of the attachment.
12. The method according to claim 9, characterized in that, The playback parsing description data further includes the attachment duration; The retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data to play the attachment on the first page corresponding to the first attachment playback plugin includes: retrieving the first attachment data based on the playback parsing description data in the local file system, rendering the first attachment data to play the attachment on the first page corresponding to the first attachment playback plugin according to the attachment duration.
13. A method for viewing an exported document of an online document, characterized in that, Applied to a server, the method includes: Receive an export request for a target online document from a client; Use a metadata interface to obtain the playback parsing description data of the target online document; Send the document body data of the target online document, the first attachment data in the target online document, and the playback parsing description data to the client, so that the client runs a first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the document body data to retrieve the first attachment data based on the playback parsing description data and play the attachment.
14. The method according to claim 13, wherein The metadata interface includes an attachment file information interface and an attachment operation information interface; The using the metadata interface to obtain the playback parsing description data of the target online document includes: Use the attachment file information interface to obtain the attachment file information of the target online document; Use the attachment operation information interface to obtain the attachment operation information when driving the attachment to run; Integrate the attachment file information and the attachment operation information into the playback parsing description data.
15. The method according to claim 14, wherein The attachment is stored in a storage node associated with the server; the playback parsing description data includes an attachment version number field, an attachment basic information field, an attachment file information field, and an attachment operation information field; The integrating the attachment file information and the attachment operation information into the playback parsing description data includes: Retrieve the attachment from the storage node; Extract the attachment version number from the said attachment and fill it into the said attachment version number field; Extract the attachment file name and attachment keywords from the said attachment and fill them into the said attachment basic information field; Fill the said attachment file information into the said attachment file information field and fill the said attachment running information into the said attachment running information field.
16. An export document browsing device for online documents, characterized in that, Applied to the client, the said device includes: A first sending unit, configured to send an export request for the said target online document to the server in response to an export command for the target online document; A first receiving unit, configured to receive the document body data of the said target online document, the first attachment data in the said target online document, and the playback parsing description data of the said target online document from the server; A first obtaining unit, configured to obtain a first attachment playback plugin; A running unit, configured to run the first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the said document body data, so as to retrieve the first attachment data based on the said playback parsing description data and play the attachment.
17. An exported document browsing device for an online document, characterized in that, Applied to the server, the said device includes: A second receiving unit, configured to receive an export request for a target online document from the client; A second obtaining unit, configured to obtain the playback parsing description data of the target online document by using a metadata interface; A second sending unit, configured to send the document body data of the said target online document, the first attachment data in the said target online document, and the said playback parsing description data to the client, so that the client runs a first attachment playback plugin in response to an attachment opening command in the export document page rendered based on the said document body data, retrieves the first attachment data based on the said playback parsing description data, and plays the attachment.
18. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the said processor executes the said computer program, it implements the export document browsing method for the online document according to any one of claims 1 to 15.
19. A computer-readable storage medium storing a computer program, characterized in that, When the said computer program is executed by the processor, it implements the export document browsing method for the online document according to any one of claims 1 to 15.
20. A computer program product, which includes a computer program. The computer program is read and executed by a processor of a computer device, so that the computer device executes the export document browsing method for the online document according to any one of claims 1 to 15.