Document exporting method, related device and medium
By using a headless browser to render and file online documents on the document server side, the problem of difficult to recognize text and slow export of PDF files in the prior art is solved, and efficient online document export, especially documents in custom formats are realized.
Patent Information
- Application Number
- CN202410035579.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2025-07-11
AI Technical Summary
The existing online document export methods have the problem that the generated PDF files are difficult to identify text, large files and slow export speed, especially for online documents in custom formats that cannot be effectively exported.
By using the headless browser to execute data rendering controls and file tools on the document server side, the basic rendering data of the client is directly rendered and filed, avoiding the client's rendering tools and realizing online documents in different formats.
Improve the export efficiency of online documents, can effectively process documents in custom formats, generate editable PDF files, reduce development workload and improve export speed.
Smart Images

Figure CN120297252A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of document editing, and particularly to a document export method, related device, and medium. Background Art
[0002] An online document refers to a document that supports multiple people to simultaneously edit the document online on the Internet and can be accessed and viewed in real time on the cloud network. Through the online document application, it is possible to realize work such as multi-person collaborative writing, project discussion, meeting minutes, and data sharing, without repeatedly sending and receiving files, greatly improving the document processing efficiency. In order to facilitate off-site viewing, offline viewing, or editing of the content of the online document, it is usually necessary to export the online document into a Portable Document Format (PDF) file or a picture format for local office software or other office software to open and perform related operations.
[0003] Currently, the existing online document export methods include a front-end online document export solution and a back-end online document export solution. The front-end online document export solution usually refers to a solution that converts a web page into a picture in a browser and then converts the picture into an exported PDF file. At this time, since the generated PDF file is a picture PDF, the text in the web page will also be converted into a picture, which may easily lead to problems such as the text in the PDF file being difficult to be recognized by other software and the large volume of the generated PDF file. The back-end online document export solution refers to a solution that, based on the data format of a specific application as the protocol between the front-end and the back-end, parses this data format in the back-end to obtain information such as the content, layout, and style of the online document, and then writes code to output the obtained document information into a target format (i.e., PDF, picture, etc.) file. At this time, since the parsing of the data format is implemented separately in the back-end and the front-end, the workload is large, the export speed is slow, and for online documents with custom formats, it may not be possible to export the online document. Summary of the Invention
[0004] Embodiments of the present disclosure provide an online document export method, related device, and medium, which can improve the export efficiency of online documents, and for online documents with custom formats, can also export the online documents.
[0005] According to one aspect of the present disclosure, there is provided a document export method, which is applied to a client, and the document export method includes:
[0006] Receiving an export request for the currently presented document;
[0007] In response to the export request, send the rendering basic data of the current presentation document at the client to the document server, so that the document server, without the client rendering tool for rendering the rendering basic data, uses a headless browser to execute the data rendering control to perform the rendering of the rendering basic data, and uses the file tool of the headless browser to file the rendering result as the export document of the current presentation document;
[0008] Receive the export document from the document server.
[0009] According to one aspect of the present disclosure, there is provided a document export method, applied to a document server, the document export method comprising:
[0010] Create a page container having a data rendering control;
[0011] Receive the rendering basic data of the current presentation document of the client from the client;
[0012] Without the client rendering tool for rendering the rendering basic data, use a headless browser to execute the data rendering control to perform the rendering of the rendering basic data to obtain a rendering result;
[0013] Use the file tool of the headless browser to file the rendering result as the export document of the current presentation document;
[0014] Output the export document.
[0015] According to one aspect of the present disclosure, there is provided a document export device, applied to a client, the document export device comprising:
[0016] A first receiving unit, configured to receive an export request for a current presentation document;
[0017] A response unit, configured to, in response to the export request, send the rendering basic data of the current presentation document at the client to the document server, so that the document server, without the client rendering tool for rendering the rendering basic data, uses a headless browser to execute the data rendering control to perform the rendering of the rendering basic data, and uses the file tool of the headless browser to file the rendering result as the export document of the current presentation document;
[0018] A second receiving unit, configured to receive the export document from the document server.
[0019] Optionally, the response unit is specifically configured to:
[0020] In response to the export request, determine the boundary of the current presented document on the presentation interface of the client;
[0021] Extract format template data from within the boundary, and use the remaining data after extracting the format template data within the boundary as the rendering basic data;
[0022] Send the rendering basic data to the document server.
[0023] Optionally, the response unit is further specifically configured to:
[0024] In response to the export request, send the rendering basic data of the current presented document on the client and the target type of the exported document to the document server;
[0025] The second receiving unit is specifically configured to:
[0026] Receive the exported document of the target type from the document server.
[0027] Optionally, the first receiving unit is specifically configured to:
[0028] Receive the export requests for multiple current presented documents, where the multiple current presented documents have the same format template;
[0029] The response unit is further specifically configured to:
[0030] In response to the export request, send the rendering basic data of the multiple current presented documents on the client to the document server;
[0031] The second receiving unit is further specifically configured to:
[0032] Receive the merged exported document corresponding to the multiple current presented documents from the document server.
[0033] According to one aspect of the present disclosure, there is provided a document export device applied to a document server. The document export device includes:
[0034] A first creation unit for creating a page container, where the page container has a data presentation control;
[0035] A third receiving unit for receiving the rendering basic data of the current presented document of the client from the client;
[0036] An execution unit for, in the case of not having a client rendering tool of the client for rendering the rendering basic data, using a headless browser to execute the data presentation control to perform rendering of the rendering basic data to obtain a rendering result;
[0037] A documentation unit, which uses the documentation tool of the headless browser to document the rendering result into an export document of the current presented document;
[0038] An output unit, which outputs the export document.
[0039] Optionally, after creating the page container, the document export device further includes:
[0040] A second creation unit, which creates a format template component within the page container, and the format template component corresponds to the format template data within the boundary of the rendering interface of the current presented document on the client;
[0041] Specifically, the execution unit is used for:
[0042] Executing the data presentation control by using the headless browser to transfer the rendering basic data into the format template component to obtain the rendering result.
[0043] Optionally, specifically, the second creation unit is used for:
[0044] Creating a plurality of the format template components within the page container, where the plurality of format template components include a target format template component corresponding to the format template data within the boundary of the rendering interface of the current presented document on the client;
[0045] Specifically, the execution unit is further used for:
[0046] Determining the template type corresponding to the rendering basic data;
[0047] Determining, among the plurality of format template components, the format template component corresponding to the template type as the target format template component;
[0048] Executing the data presentation control by using the headless browser to transfer the rendering basic data into the target format template component to obtain the rendering result.
[0049] Optionally, specifically, the third receiving unit is used for:
[0050] Receiving, from the client, the rendering basic data of a plurality of the current presented documents of the client, where the plurality of current presented documents correspond to the same target format template component;
[0051] Specifically, the execution unit is further used for:
[0052] Execute the data rendering control using the headless browser to separately pass the rendering basic data of each current rendering document into the target format template component, obtain the sub-rendering result of each current rendering document, and merge the sub-rendering results into the rendering result.
[0053] Optionally, the third receiving unit is further specifically configured to:
[0054] Receive, from the client, the rendering basic data of the current rendering document of the client and the export document recipient identifier;
[0055] The execution unit is further specifically configured to:
[0056] Determine the template type corresponding to the rendering basic data based on the export document recipient identifier;
[0057] The output unit is specifically configured to:
[0058] Send the export document to the export document recipient corresponding to the export document recipient identifier.
[0059] Optionally, the execution unit is further specifically configured to:
[0060] Execute the data rendering control using the headless browser to determine that the target format template component matches the rendering basic data;
[0061] Pass the rendering basic data into the target format template component to obtain the rendering result.
[0062] Optionally, the creating unit is specifically configured to:
[0063] Use the export service to call the headless browser to create the page container;
[0064] The execution unit is further specifically configured to:
[0065] In an environment where the compilation of the export service is separated, execute the data rendering control using the headless browser to perform the rendering of the rendering basic data to obtain the rendering result.
[0066] Optionally, the file tool includes a printing tool and a screenshot tool;
[0067] The third receiving unit is further specifically configured to:
[0068] Receive, from the client, the rendering basic data of the current rendering document of the client and the target export document type;
[0069] The filing unit is specifically configured to:
[0070] If the target export document type is the first type, use the printing tool of the headless browser to print the rendering result as the export document of the first type; if the target export document type is the second type, use the screenshot tool of the headless browser to capture the rendering result as the export document of the second type;
[0071] The output unit is further specifically configured to:
[0072] Send the export document to the client.
[0073] Optionally, the file unit is further specifically configured to:
[0074] If the target export document type is the third type, use the printing tool of the headless browser to print the rendering result as the export document of the first type;
[0075] The output unit is further specifically configured to:
[0076] Store the export document of the first type on the cloud server as the export document of the third type.
[0077] Optionally, before outputting the export document, the document export device further includes:
[0078] A first acquisition unit, configured to acquire the registration level of the client and the security level of the rendering basic data;
[0079] A determination unit, configured to determine a target backup server in the backup server cluster based on the registration level and the security level;
[0080] A backup unit, configured to back up the export document to the target backup server.
[0081] Optionally, after receiving the rendering basic data of the current presentation document of the client from the client, the document export device further includes:
[0082] A second acquisition unit, configured to acquire the registration level of the client;
[0083] A first verification unit, configured to perform a first verification based on the rendering basic data and the registration level.
[0084] Optionally, the third receiving unit is further specifically configured to:
[0085] Receive from the client the rendering basic data of the current presentation document of the client and a first signature of the client, where the first signature is generated based on a predetermined digest algorithm and the private key of the client;
[0086] After receiving the rendering basic data of the current rendered document of the client from the client, the document export device further includes:
[0087] A third acquisition unit, configured to acquire the public key of the client;
[0088] A second verification unit, configured to perform a second verification on the first signature by using the predetermined digest algorithm and the public key of the client.
[0089] Optionally, the data rendering control is a link to a rendering code segment;
[0090] The execution unit is further specifically configured to:
[0091] In response to receiving the rendering basic data from the client, generate a control call statement for the headless browser;
[0092] Based on the control call statement, cause the headless browser to call the link, so as to execute the rendering code segment and obtain the rendering result.
[0093] According to an 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 document export method described above is implemented.
[0094] According to an 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 document export method described above is implemented.
[0095] According to an 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 document export method described above.
[0096] In the embodiments of the present disclosure, when implementing document export, the rendering basic data of the client is sent to the document server to implement document export according to the rendering basic data on the document server. Since the prior art requires parsing the data format on both the server and the client, the workload is large and the export speed is relatively slow. However, in the embodiments of the present disclosure, it is not necessary for the client to process the rendering basic data of the currently presented document on the client. Instead, the document server renders the rendering basic data and generates an exported document, improving the export efficiency of online documents. Moreover, for online document applications with custom formats (i.e., the document server does not have the client rendering tool used by the client to render the rendering basic data), the prior art may not be able to implement the export of online documents. In the embodiments of the present disclosure, in the case where the document server does not have the client rendering tool used by the client to render the rendering basic data, a headless browser is used to execute the rendering of the rendering basic data by the data presentation control, and the file generation tool of the headless browser is used to file the rendering result into the exported document of the currently presented document. In this way, the embodiments of the present disclosure can export the rendering basic data of different formats by using the data presentation control and the file generation tool of the headless browser. The client can directly receive the exported document from the document server, improving the export efficiency of online documents, and for online documents with custom formats, the export of online documents can also be implemented.
[0097] Other features and advantages of the present disclosure will be described in the following description, and in part, will be obvious from the description, or will be understood by implementing the present disclosure. The objectives and other advantages of the present disclosure can be achieved and obtained by the structures specifically pointed out in the description, the claims, and the drawings. Brief Description of the Drawings
[0098] The drawings are used to provide a further understanding of the technical solutions of the present disclosure, and constitute a part of the description. 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.
[0099] Figure 1 It is a framework diagram of the system to which the document export method according to the embodiment of the present disclosure is applied;
[0100] Figures 2A - 2F It is a schematic diagram of the interface in the scenario of online export of an edited PDF resume document applied in the embodiment of the present disclosure;
[0101] Figure 3 It is a schematic diagram of the interaction between the client and the document server provided according to an embodiment of the present disclosure;
[0102] Figure 4 It is a schematic diagram of the first interaction between the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0103] Figure 5 It is a schematic diagram of the second interaction among the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0104] Figure 6 It is Figure 3 a schematic diagram of obtaining the rendering basic data of the currently presented document on the client in step 320 in
[0105] Figure 7 It is a schematic diagram of the third interaction among the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0106] Figure 8 It is a schematic diagram of the interaction among the client, the document server, the cloud server, and the recipient of the exported document provided according to an embodiment of the present disclosure;
[0107] Figure 9 It is a schematic diagram of the fourth interaction among the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0108] Figure 10 It is Figure 3 a schematic diagram of creating a page container in step 410 in
[0109] Figure 11 It is a schematic diagram of the structure among the components of the client and the document server provided according to an embodiment of the present disclosure;
[0110] Figure 12 It is a schematic diagram of the fifth interaction among the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0111] Figure 13 It is a schematic diagram of the sixth interaction among the client, the document server, and the cloud server provided according to an embodiment of the present disclosure;
[0112] Figure 14A It is a schematic diagram of the first type of exported document provided according to an embodiment of the present disclosure;
[0113] Figure 14B It is a schematic diagram of the second type of exported document provided according to an embodiment of the present disclosure;
[0114] Figure 15 It is a schematic diagram of the interaction among the client, the document server, the cloud server, and the target backup server provided according to an embodiment of the present disclosure;
[0115] Figure 16It is a detailed implementation diagram among a client, a document server, a cloud server, and a target backup server provided according to an embodiment of the present disclosure;
[0116] Figure 17 It is a file schematic diagram of the prior art and after the execution of document export provided by an embodiment of the present disclosure;
[0117] Figure 18 It is a module diagram of a document export device applied to a client according to an embodiment of the present disclosure;
[0118] Figure 19 It is a module diagram of a document export device applied to a document server according to an embodiment of the present disclosure;
[0119] Figure 20 It is executed according to an embodiment of the present disclosure Figure 3 The structural diagram of the client for the document export method shown;
[0120] Figure 21 It is executed according to an embodiment of the present disclosure Figure 3 The structural diagram of the document server for the document export method shown. Detailed implementation
[0121] 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.
[0122] 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:
[0123] Online document: It refers to a document on the Internet that supports multiple people to edit the document online simultaneously and can be accessed and viewed in real time on the cloud network. These documents can be in various formats, including text documents, spreadsheets, presentation slides, PDF files, etc. Through online document applications, it is possible to achieve tasks such as multi-person collaborative writing, project discussion, meeting minutes, and information sharing, without repeatedly sending and receiving files, greatly improving the document processing efficiency.
[0124] Doc: A file type, generally a text document, such as a text document in versions of Word before 2003.
[0125] Sheet: A file type. Sheet is the most important part of Excel for storing and processing data. It contains cells arranged in rows and columns. It is part of a workbook and is also called a spreadsheet. Using a Sheet, data can be organized and analyzed. Data can be input and edited on multiple Sheets simultaneously, and summary calculations can be performed on data from different worksheets.
[0126] Slide: A slide. A file type, which is an electronic slide in this disclosure, also known as a presentation or briefing. It is a playable file made up of text, pictures, etc., with some special effects and dynamic display effects added.
[0127] PPT: An image presentation. A file type, which is a playable file made up of multimedia elements such as text, images, audio, and video, and can have some special effects and dynamic display effects added.
[0128] Front-end and back-end isomorphism: It refers to a development method that realizes the sharing and reuse of front-end and back-end code. Specifically, front-end and back-end isomorphism means using the same set of code to implement front-end and back-end functions, making front-end and back-end development more efficient and consistent. For example, for the Server Side Rendering (SSR) method, it means rendering the front-end page using front-end code on the server and directly returning the rendered html to the browser.
[0129] Image PDF: It refers to a PDF in which all the text in the current presented document has been converted into picture form. The text in an Image PDF does not exist in an editable text form, that is, it cannot be selected or read. For example, the PDF generated by a copier scan is an Image PDF.
[0130] Text PDF: It refers to a PDF in which all the text in the current presented document has been converted into text form. Contrary to Image PDF, the text in a Text PDF exists in an editable text form, that is, it can be selected for text search, copying, and editing. A Text PDF can be generated by document processing software or by extracting text from a scanned image through Optical Character Recognition (OCR) technology.
[0131] Headless Browser: It is a web browser without a graphical user interface (GUI). A headless browser can be controlled by code to perform web browsing operations in the background without showing any visible window or interface to the user. Since a headless browser does not need to display the page, it usually consumes less system resources and can run multiple instances efficiently on a server.
[0132] At present, the existing online document export methods include a front-end online document export solution and a back-end online document export solution. The front-end online document export solution usually refers to a solution that converts a web page into a picture in a browser and then converts the picture into an exported PDF file. At this time, since the generated PDF file is a picture PDF, the text in the web page will also be converted into a picture, which easily leads to problems such as the text in the PDF file being difficult to be recognized by other software and the large volume of the generated PDF file. The back-end online document export solution refers to a solution that, based on the data format of a specific application as the protocol between the front-end and the back-end, parses this data format in the back-end to obtain information such as the content, layout, and style of the online document, and then writes code to output the obtained document information as a target format (i.e., PDF, picture, etc.) file. At this time, since the parsing of the data format is implemented separately in the back-end and the front-end, the workload is large, the export speed is slow, and for online documents with custom formats, the online document export may not be realized.
[0133] Based on this, the embodiments of the present disclosure provide a document export method, related device, and medium. The document export method can export rendering basic data in different formats by using the data presentation control and file tool of a headless browser. The client can directly receive the exported document from the document server, which improves the export efficiency of the online document, and for online documents with custom formats, the online document export can also be realized.
[0134] System architecture and scenario description applied in the embodiments of the present disclosure
[0135] Figure 1 It is a system architecture diagram to which the document export method according to the embodiments of the present disclosure is applied. In the document export scenario, a document server and multiple clients are involved. As Figure 1 shown, it includes: client 110, Internet 120, gateway 130, and document server 140.
[0136] Client 110 is a device used by an object to view the currently presented document and the corresponding exported document. Client 110 can be a device of an object that generates an export request for the currently presented document. Client 110 includes various forms such as a desktop computer, a laptop computer, a PDA (Personal Digital Assistant), a mobile phone, a vehicle-mounted terminal, a home theater terminal, and a dedicated terminal. In addition, it can be a single device or a set composed 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.
[0137] 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. The current rendered document's basic data on the client sent by the client 110 to the document server 140 needs to be sent to the corresponding document server 140 through the gateway 130. The exported document of the current rendered document sent by the document server 140 to the client 110 also needs to be sent to the corresponding client 110 through the gateway 130.
[0138] The document server 140 refers to a computer system that generates an exported document of the current rendered document based on the client's rendered basic data to provide the exported document of the current rendered document to the client 110. Compared with the client 110, the document server 140 has higher requirements in terms of stability, security, performance, etc. The document 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 document server 140 can also communicate with the Internet 120 through wired or wireless means to exchange data.
[0139] The embodiments of the present disclosure can be applied in various scenarios. To understand the document export method provided by the embodiments of the present disclosure in more detail, please refer to Figures 2A - 2F the schematic diagram of the interface for online exporting the edited PDF resume document in the A Document - Resume Assistant application shown in
[0140] As Figure 2A shown, in the interface of the A Document - Resume Assistant application in the client 110, the A Document - Resume Assistant can be used to create a new resume document, can also be used to perform document analysis on the completed resume document, can also beautify the initially filled resume document according to the resume templates pre-constructed for different job requirements, and can also make ID photos for the object. When creating a new resume document, after triggering the "Template" option in the lower function bar, a resume template list is displayed to select the resume template required by the object.
[0141] As Figure 2B shown, the object can select the first resume template in the resume template list and then trigger the "New" option in the upper function bar to enter the initial editing page created based on the selected resume template. The object can also not select any resume template in the resume template list. At this time, trigger the "New" option in the upper function bar to enter the initial editing page created based on the default resume template.
[0142] As Figure 2C shown, in the initial editing page, the object fills in personal relevant information of the object at a preset position in the selected resume template, such as job intention, educational experience, internship experience, etc., to generate a resume document presented on the current page of the client 110. After filling in the information at the set position in the template, it is shown that the filling at this position has been completed in the template management part on the right.
[0143] As Figure 2D shown, after the object finishes editing the personal resume document, the object selects to trigger the "Export Resume" option in the upper function bar to export the edited resume document. After triggering the "Export Resume" option in the upper function bar, a list of export file types is displayed. The list of export file types contains multiple export file type options, such as online PDF document type, local PDF document type, and local picture type.
[0144] As Figure 2E shown, after triggering the "Online PDF Document" option in the list of export file types, the document server 140 communicatively connected to the client 110 exports the edited resume document (i.e., the currently presented document) according to the selected export file type at the backend.
[0145] As Figure 2F shown, after the document server 140 executes the document export, an online PDF document of the resume document edited by the object is displayed on the page of the client 110. The online PDF document at this time refers to a PDF file hosted on the Internet, and the object can directly access and view these PDF documents through a browser without downloading them to a local device. Such online PDF documents are usually provided by websites or online document storage services, and the object can view these documents on a web page in a way of Uniform Resource Locator (URL) link or embedding.
[0146] In the embodiments of the present disclosure, the document export method is applicable to various types of documents such as text documents (such as Doc), spreadsheets (such as Sheet, etc.), presentation documents (such as Slide, PPT, etc.). The above export of the PDF resume document is only a part involved in the online document export. When actually performing the online document export, other editing operations (such as resume beautification operations, document export operations for various types of documents such as Sheet, Slide, etc.) can also be exported.
[0147] It should be noted that the document export method provided in this disclosure can be applied to various types of documents, such as text documents (e.g., Doc), spreadsheets (e.g., Sheet, etc.), presentation documents (e.g., Slide, PPT, etc.). The above export of PDF resume documents is only a part involved in online document export. When actually performing online document export, document export can also be performed on other editing operations (such as resume beautification operations, document export operations for various types of documents such as Sheet and Slide). The document export method of this disclosure can also be applicable to various platforms, such as the common Window platform, Android platform, IOS platform, and Linux platform, etc.
[0148] In this disclosure, when the document server does not have a client rendering tool for rendering basic data, a headless browser can be used to execute the data presentation control to obtain a rendering result, and a file conversion tool can be used to convert the rendering result into an export document of the currently presented document. Therefore, through the isomorphic front-end and back-end approach adopted in the embodiments of this disclosure, basic rendering data is provided on the client side, and the document server performs pre-rendering on the basic rendering data, which has higher security, can greatly reduce the workload of the document server for export, and improve the document export efficiency. Moreover, by using the functions of the headless browser and the file conversion tool of the document server, document export for online document applications in custom formats can be achieved.
[0149] General description of the embodiments of this disclosure
[0150] According to an embodiment of this disclosure, a document export method is provided.
[0151] The document export method refers to the process of exporting the currently presented document of the client 110 into an export document of the required document type. The export document can be opened, edited, or shared on other software or devices.
[0152] It should be emphasized that the embodiments of this disclosure can be applicable to the online document export scenario, such as scenarios of document export for tables, text, presentation documents, etc. The document export method of the embodiments of this disclosure can be executed alternately between the client 110 and the document server 140.
[0153] In an embodiment of the present disclosure, when the document server does not have a client rendering tool for rendering the rendering basic data, a headless browser is used to execute the rendering of the rendering basic data by the data rendering control, and the rendering result is file-ized into an exported document of the current presented document by the file-izing tool of the headless browser. In this way, the embodiments of the present disclosure can export rendering basic data in different formats by using the data rendering control and the file-izing tool of the headless browser. The client can directly receive the exported document from the document server, which improves the export efficiency of online documents. Moreover, for online documents in custom formats, the export of online documents can also be realized.
[0154] As Figure 3 shown, according to an embodiment of the present disclosure, when the document export method is applied to a client, it includes:
[0155] Step 310, receiving an export request for the current presented document;
[0156] Step 320, in response to the export request, sending the rendering basic data of the current presented document on the client to the document server, so that when the document server does not have a client rendering tool for rendering the rendering basic data, a headless browser is used to execute the data rendering control to perform the rendering of the rendering basic data, and the rendering result is file-ized into an exported document of the current presented document by the file-izing tool of the headless browser;
[0157] Step 330, receiving the exported document from the document server.
[0158] The advantages of the above embodiments are that on the client side, by responding to the export request for the current presented document, the rendering basic data of the current presented document on the client is sent to the document server, so that the document server can perform document export on the rendering basic data. That is to say, the embodiments of the present disclosure do not require the client to process the rendering basic data of the current presented document on the client, but instead perform rendering on the rendering basic data through the document server and generate an exported document, which improves the export efficiency of online documents. In the embodiments of the present disclosure, when the document server does not have a client rendering tool for rendering the rendering basic data, it is also possible to export rendering basic data in different formats by using the data rendering control and the file-izing tool of the headless browser. Compared with the front-end online document export solution in the related art, the embodiments of the present disclosure can generate documents in target formats (such as text PDF, picture PDF) on the document server. Moreover, for online documents in custom formats, the embodiments of the present disclosure only send the rendering basic data to the client and do not need to parse information such as the layout and style of this custom format, and can flexibly adapt to the export of custom format documents.
[0159] As Figure 3As shown, according to an embodiment of the present disclosure, when the document export method is applied to a document server, it includes:
[0160] Step 410, create a page container, and the page container has a data presentation control;
[0161] Step 420, receive from the client the rendering basic data of the currently presented document of the client;
[0162] Step 430, in the case of not having the client rendering tool of the client for rendering the rendering basic data, use a headless browser to execute the data presentation control to perform the rendering of the rendering basic data and obtain a rendering result;
[0163] Step 440, use the file tool of the headless browser to file the rendering result as the export document of the currently presented document;
[0164] Step 450, output the export document.
[0165] The advantages of the above embodiment are that, due to the newly developed online document application having a specific data format for this application, compared with the existing back-end online document export solution, the embodiment of the present disclosure does not need to parse the specific data format of this application, but according to the received rendering basic data of the currently presented document of the client, use a headless browser to execute the data presentation control to render the rendering basic data, and use the file tool of the headless browser to file the rendering result as the export document of the currently presented document. In this way, in the case where the document server does not have the client rendering tool of the client for rendering the rendering basic data, it is also possible to realize the document export of the online document in a custom format. Therefore, the embodiment of the present disclosure can effectively improve the efficiency and flexibility of online document export.
[0166] Because steps 310 - 330 and steps 410 - 450 are executed crosswise, and there is no situation where all steps of the client need to be completed first before the steps of the document server can be executed. Therefore, steps 310 - 330 and steps 410 - 450 will be described in detail in a crosswise manner below.
[0167] Detailed description of step 310
[0168] In step 310, receive an export request for the currently presented document.
[0169] The currently presented document refers to the document that is currently being displayed or processed on the interface of the client. The currently presented document can be a document of types such as a web page, text document, spreadsheet, presentation, PDF file, etc.
[0170] An export request refers to a request to perform an export operation on the currently presented document. This export request can be initiated by the target object, or by the internal logic of the program or other systems according to preset rule instructions. The target object refers to the user with the need to export the document.
[0171] In one embodiment, as Figure 2D shown, after the object edits their personal resume document, they select the "Export Resume" option in the upper function bar. At this time, an export request for the currently presented resume document is generated according to the trigger action of the object to export the edited resume document. In another embodiment, the preset rule instruction is to automatically generate an export request after a preset time interval. The preset time interval can be set to 30 minutes, 1 hour, etc., and is not specifically limited here. For example, after the object edits their personal resume document and does not trigger the operation to generate an export request within the preset time interval, an export request is automatically generated to the client to export the currently presented document.
[0172] Note that when obtaining the currently presented document edited by the target object, the consent of the target object should be sought in advance. Moreover, the collection, use, and processing of these documents will comply with relevant laws, regulations, and standards. When seeking the consent of the target object, the target object's separate permission or separate consent can be obtained through methods such as pop-up windows or redirecting to a confirmation page.
[0173] An export request for the currently presented document means saving the currently presented document in a certain format (such as PDF, Excel, XML, PPT, etc.) to the local client, uploading it to the cloud server, or sending it to other systems, etc. Therefore, when the client receives an export request for the currently presented document, it is necessary to perform corresponding operations on the currently displayed document according to this request and export the document to the specified target location. The target location refers to the location for storing the exported document, which can be the client, the cloud server, etc.
[0174] In another embodiment, as Figure 4 shown, receiving an export request for the currently presented document includes:
[0175] Step 3101, receive export requests for multiple currently presented documents, where the multiple currently presented documents have the same format template.
[0176] It should be noted that Figure 3 and Figure 4 The other steps will be described in detail in subsequent embodiments and will not be specifically described here.
[0177] The currently presented document will be described in detail in the above embodiments and will not be elaborated here. A format template refers to a template used to specify the appearance and layout style of a document. The format template of a document refers to a template used to specify the appearance and layout style of a document. A format template usually includes the structure, font, color, header, footer, title style, paragraph style, title style, etc. of the document. Therefore, using a format template can ensure the consistency of the appearance of the document and simplify the process of creating and editing the document. For example, a company may create a standard format template to specify the appearance and layout of reports created by all employees. This format template may include the company's logo, a specific font and color scheme, the styles of titles and paragraphs, etc. When employees create reports, they can edit based on this format template to ensure that all reports are consistent in appearance.
[0178] A request to export multiple currently presented documents refers to a request to perform an export operation on multiple currently presented documents simultaneously. In this case, the multiple currently presented documents in the export request are treated as a whole for the document export operation. Since the multiple currently presented documents are automatically exported as a whole, at this time, if the multiple currently presented documents have the same format template, the exported documents will have a unified layout, style, and structure, which will also make the processing logic simpler and more consistent, effectively improving the document export efficiency. For example, after the human resources department of a company receives multiple resumes (i.e., currently presented documents), it can select multiple resumes and trigger an export operation to export multiple resumes simultaneously. At this time, the client receives a request to export multiple currently presented documents.
[0179] The advantages of the above embodiments are that personalized export processing can be performed according to the specific requirements of a single currently presented document, which can meet specific format requirements. Exporting multiple currently presented documents simultaneously can batch process the export requests of multiple documents, improve the processing efficiency, and ensure that multiple documents are consistent in appearance and format. Therefore, according to the specific application scenario and requirements, one can choose to export a currently presented document or export multiple currently presented documents.
[0180] Detailed description of step 320
[0181] In step 320, in response to the export request, the rendering basic data of the currently presented document on the client is sent to the document server so that the document server, in the case of not having the client rendering tool for rendering the rendering basic data on the client, uses a headless browser to execute the data rendering control to perform the rendering of the rendering basic data, and uses the file generation tool of the headless browser to generate the rendering result into an exported document of the currently presented document.
[0182] It should be noted that the specific export process of the document server will be described in detail in the following embodiments and will not be specifically described here. The export request and the current presented document have been described in detail in the above embodiments and will not be elaborated here. The advantage of obtaining the current presented document in response to the export request is that it reduces unnecessary processing overhead when the object does not trigger the export request. Moreover, the manner of responding to the export request is more real-time, and in some scenarios with strict real-time requirements, it can improve the real-time performance of document export.
[0183] In one embodiment, as Figure 4 shown, step 320 includes:
[0184] Step 3201, in response to the export request, send the rendering basic data of multiple current presented documents on the client to the document server.
[0185] The export request here refers to a request that includes performing an export operation on multiple current presented documents. For example, for the accounting department of a company, when settling the salaries of employees for a certain month, it is necessary to check the monthly salary sheets filled in by each employee. Since employees use the same salary template when filling in the monthly salary sheets. At this time, when Accountant B performs the export operation of the monthly salary sheets of multiple employees in the system, the client of Accountant B, in response to the export request, sends the rendering basic data of the salary sheets of multiple employees (i.e., the current presented documents) on the client to the document server.
[0186] Combined with step 3101, after the client receives the export request for multiple current presented documents with the same format template, in response to the export request, it sends the rendering basic data of multiple current presented documents on the client to the document server. Therefore, by using the same format template to export multiple documents simultaneously, it is possible to avoid multiple template adjustments, greatly improve the efficiency of exporting documents, and moreover, exporting multiple documents at one time can simplify maintenance and ensure the consistency of the format and appearance of the documents.
[0187] In another embodiment, as Figure 5 shown, step 320 includes:
[0188] Step 32021, in response to the export request, determine the boundary of the current presented document on the presentation interface of the client;
[0189] Step 32022, extract the format template data from within the boundary, and use the remaining data after extracting the format template data within the boundary as the rendering basic data;
[0190] Step 32023, send the rendering basic data to the document server.
[0191] The following is a detailed description of steps 32021 - 32023.
[0192] In step 32021, the rendering interface of the client refers to the interface where the client displays the document content. The boundary of the currently rendered document on the client's rendering interface refers to the boundary range of the actual display area when the currently rendered document is displayed on the client. Since the document content is usually displayed within a fixed area, the boundary at this time represents the edge range of the currently rendered document within this document display area, and is used to determine the display range of the content of the currently rendered document. During the process of exporting the document, determining the boundary of the currently rendered document on the client's rendering interface can help the system accurately extract the content part of the currently rendered document, avoid extracting irrelevant interface elements, and thus improve the accuracy and efficiency of document export. As Figure 6 shown, if the currently rendered document is a resume document about "A Xiaodang" filled in based on the A product internship resume template in the A Document - Resume Assistant application, then the document boundary of "A Xiaodang" is the boundary of the currently rendered document on the client's rendering interface.
[0193] In step 32022, the format template data refers to the data in the client used to define the formats, styles, and layouts adopted in the document. The format template data includes information such as the fonts, font sizes, colors, paragraph styles, title styles, table styles, etc. used in the document. These information are used to define the appearance and layout of the currently rendered document, so that the currently rendered document presents the same effect on different devices and platforms.
[0194] The data of the currently rendered document includes format template data and rendering basic data. The rendering basic data refers to the data formed by the remaining content after removing the relevant content about the format template within the boundary. During the process of exporting the document, by extracting the format template data, the relevant information of the document's format template can be separated from the document content (i.e., the rendering basic data). During the export process on the document server, these format template data are reapplied to ensure that the format and style of the exported document are consistent with the original currently rendered document, thereby improving the readability and visualization effect of the exported document.
[0195] As Figure 6As shown, when filling out a resume according to a resume template, the presentation interface of the client includes a resume filling area, a module management area for different preset modules in the resume template, etc. The preset modules refer to the modules for filling different contents preset in this resume template, such as basic information, job intention, education experience, internship experience, project experience, skill certificates, work experience, education experience, etc. The module management area refers to the area used to reflect the completion status of the currently filled resume document. At this time, the currently presented document is a resume document about "Xiaodang A" filled out based on the internship resume template of Product A in the A Document - Resume Assistant application. The document boundary of "Xiaodang A" is the boundary of the currently presented document on the presentation interface of the client. Data extraction is performed on the currently presented document from within the boundary, and format template data and rendering basic data are extracted. For another example, the currently presented document is a resume document filled out by the target object, and the "Internship Experience" part fills in "Internship at Company D from XX month, XXXX to XX month, XXXX". At this time, "Internship at Company D from XX month, XXXX to XX month, XXXX" belongs to the rendering basic data, and "Internship Experience" belongs to the format template data.
[0196] In step 32023, after the client extracts the rendering basic data, it sends the rendering basic data to the document server so that the document server can perform document export processing on the rendering basic data to obtain the export document of the currently presented document. In the embodiments of the present disclosure, it is not necessary for the client to process the rendering basic data of the currently presented document on the client side. Instead, the document server renders the rendering basic data and generates an export document, which improves the export efficiency of online documents.
[0197] In another embodiment, in response to an export request, the rendering basic data of multiple currently presented documents on the client is sent to the document server, including: in response to the export request, determining the boundary of each currently presented document on the presentation interface of the client; extracting format template data from within the boundary, and using the remaining data after extracting the format template data from within the boundary as rendering basic sub - data; performing data merging on the rendering basic sub - data to obtain rendering basic data; and sending the rendering basic data to the document server. At this time, the rendering basic data also includes document separation data for identifying different currently presented documents to distinguish different currently presented documents.
[0198] In another embodiment, as Figure 7 shown, step 320 includes:
[0199] Step 3203: In response to the export request, send the rendering basic data of the currently presented document on the client and the target type of the export document to the document server.
[0200] The target type refers to the format type into which the currently presented document is converted after document export. The target types include online document types, local document types, picture document types, etc. The online document types can be online PDF types, online Word types, etc.
[0201] It should be noted that the target type of the exported document can be the type determined based on the historical exported document type of the client, or the type set by the client according to current needs, which is not specifically limited here.
[0202] The online document type means that the exported document is saved on the cloud server, and the object can access and view the document through a browser or application. This method is suitable for documents that require multi-person collaborative editing and sharing, such as team collaboration documents, online reports, etc. The local document type means that the exported document is saved on the local device of the object, such as a computer, mobile phone, etc. The object can open and edit the document through local applications (such as Microsoft Word, PDF reader, etc.). This method is suitable for documents that users need to edit and save on local devices. The picture document type means that the content of the exported document is converted into a picture format (such as PNG, JPG, etc.). This method is suitable for scenarios where the document content needs to be presented in the form of pictures, such as generating posters, converting slides into pictures, etc. The target type of the exported document can be flexibly set according to the needs and usage scenarios of the object.
[0203] In another embodiment, as Figure 8 shown, step 320 includes:
[0204] Step 3204, in response to the export request, send the rendering basic data of the current presented document on the client and the export document recipient identifier to the document server.
[0205] The export document recipient identifier refers to an identifier that determines the specific recipient or group of recipients to whom the currently presented document will be sent after export. This identifier can be the recipient's username, email address, phone number, or even a specific ID or identifier. Through the recipient identifier, the system can accurately send the exported document to the designated recipient. In practical applications, the export document recipient identifier can be used to specify the recipient of the document. For example, directly sending the exported document to a specific user, team, department, or external partner helps ensure that the document can be accurately delivered to the designated recipient, effectively improving communication efficiency and meeting specific communication and collaboration needs. For example, Object E and Object F need to cooperate on a project, and Object E and Object F are not in the same region. To quickly confirm the details of the task completion, after Object E edits the current task completion status into a currently presented document, in response to the export request, the client of Object E sends the rendering basic data of the currently presented document on the client of Object E and the export document recipient identifier of Object F to the document server. At this time, after the document server generates the export document of the currently presented document, it sends the export document of the currently presented document to the client of Object F to display the export document of the currently presented document on the client of Object F.
[0206] In another embodiment, step 320 includes: in response to the export request, sending the rendering basic data of the currently presented document on the client, the target type of the export document, and the export document recipient identifier to the document server.
[0207] It should be noted that Figure 5 、 Figure 7 and Figure 8 The other steps in will be described in detail in subsequent embodiments and will not be specifically described here. The methods for the rendering basic data of the client in step 3201, step 3203, and step 3203 of the embodiments of the present disclosure can all be determined by step 32021 and step 32022 and will not be elaborated here.
[0208] The advantages of the above embodiments are that the client can send at least one of the target type of the export document, the export document recipient identifier, and one or more rendering basic data of the currently presented document on the client to the document server according to actual needs, which can improve the efficiency, real-time performance, and flexibility of document export.
[0209] Detailed description of step 410
[0210] In step 410, a page container is created, and the page container has a data presentation control. The time to create the page container can be any time before receiving the rendering basic data of the currently presented document on the client.
[0211] A page container refers to a component or element used to carry and display page content. In the embodiments of the present disclosure, the page container at this time only contains data presentation controls. The page container can be a container built based on any framework that can achieve front-end componentization, such as React, Vue, or Angular.
[0212] A data presentation control refers to a component used to perform the rendering of basic rendering data. In the embodiments of the present disclosure, the data control on the document server is used to present data to the user in a visual manner, such as tables, lists, charts, graphs, etc. The data presentation control can display data in a suitable manner according to different types and structures of data, as well as the interaction requirements of users. In React or other front-end frameworks, the data presentation control can be a custom component or a ready-made component provided by a third-party library. These controls usually receive data as input and convert the data into visual elements on the user interface. The data presentation control can be a control built by the document server based on the render (render basic data) method to send the received basic rendering data to the rendering component of the document server and perform the rendering of the basic rendering data. The rendering component of the document server is used to render the document in the browser and compile this page into a static html file for export.
[0213] In one embodiment, as Figure 9 shown, creating a page container in step 410 includes:
[0214] Step 4101: Use the export service to call a headless browser to create a page container.
[0215] The export service refers to a service that calls a headless browser to create a page container. In the embodiments of the present disclosure, any language that can call a headless browser, such as Node.js, python (a programming language), java (a programming language), etc., can be used to implement an export service set on the document server. Node.js is a JavaScript runtime environment based on the Chrome V8 engine, used to build fast and scalable network applications. As Figure 10 shown, call a headless browser through the export service to create an export page html (i.e., page container 1010) according to the headless browser, and this page container 1010 only contains data presentation controls 1011 and waits for an export request sent by the client.
[0216] Because existing client components rely on the Node.js service for compilation, the server side of existing front-end and back-end isomorphic applications needs to compile front-end code in a Node.js environment. However, in the embodiments of the present disclosure, a common page container is pre-compiled in the document server, and any language of the document server can be opened using a headless browser. Therefore, when the document server of the embodiments of the present disclosure renders the rendering basic data, it is independent of the language environment of the document server and can support any server language for document export. At the same time, creating a page container using a headless browser in advance can help developers better control the layout and style of the page and achieve more complex data presentation effects.
[0217] In one embodiment, as Figure 4 shown, after creating the page container, according to one embodiment of the present disclosure, the document export method further includes:
[0218] Step 411, create a format template component within the page container.
[0219] The format template component refers to a component that displays the format template data corresponding to the currently presented document on the page corresponding to the page container. The format template component corresponds to the format template data within the boundary on the presentation interface of the currently presented document on the client. The format template component can help developers uniformly and accurately display the document on the page, improving the user experience and data visualization effect. As Figure 11 shown, the edit preview component on the client refers to a tool for implementing text editing and preview on the client. The rendering component refers to a component that can be used by both the headless browser provided to the export service and the edit preview component on the client. The local server uses the export service to call the headless browser to create a page container. After receiving the rendering basic data of the currently presented document of the client sent by the client according to the export request, the local server uses the headless browser to execute the data presentation control and calls the tools in the rendering component for document rendering.
[0220] The embodiments of the present disclosure use the export service to call the headless browser to create a page container and create a format template component within the page container. At this time, the document server only needs to receive the rendering basic data to render the currently presented document. In this way, it is no longer necessary for both the client and the document server to parse and render the data of the currently presented document, effectively reducing the development workload.
[0221] In one embodiment, as Figure 4 shown, step 411 includes:
[0222] Step 41101, create multiple format template components within the page container.
[0223] Multiple format template components include target format template components corresponding to format template data within the boundaries on the client's rendering interface of the current rendered document. Since before receiving the current rendered document of the client, format template components corresponding to multiple format templates in the current online document application are created within the page container to match the rendered documents corresponding to different format templates. For example, in the A Document - Resume Assistant application, the pre - set format templates include templates such as A Product Internship Resume, A Product Manager Resume, A Product Game Operation Resume, A Product Human Resources Resume, etc. In this way, the current rendered document can be generated by selecting different templates for editing.
[0224] In the embodiments of the present disclosure, by pre - rendering a fixed part of the format template, that is, creating multiple general format template components within the page container. In this way, only incremental rendering of different rendering basic data is required for the current rendered document, improving the rendering speed and thus the document export efficiency.
[0225] Detailed description of step 420
[0226] In step 420, receive the rendering basic data of the client's current rendered document from the client.
[0227] It should be noted that the current rendered document and the rendering basic data have been described in detail in the above embodiments and will not be elaborated here. After the client sends the rendering basic data of the client's current rendered document to the document server, the document server receives the rendering basic data of the client's current rendered document from the client.
[0228] In one embodiment, as Figure 4 shown, step 420 includes:
[0229] Step 4201: Receive the rendering basic data of multiple current rendered documents of the client from the client, and the multiple current rendered documents correspond to the same target format template component.
[0230] Combined with step 3201 of the above - mentioned client, after the client receives an export request for multiple current rendered documents with the same format template, in response to the export request, it sends the rendering basic data of the multiple current rendered documents on the client to the document server. At this time, the document server receives the rendering basic data of the multiple current rendered documents with the same format template of the client from the client. That is to say, the multiple current rendered documents correspond to the same target format template component.
[0231] In the above - mentioned embodiments, by using the same format template to export multiple documents simultaneously, multiple template adjustments can be avoided, greatly improving the efficiency of exporting documents. Moreover, exporting multiple documents at one time can simplify maintenance and ensure the consistency of the format and appearance of the documents.
[0232] In another embodiment, as Figure 7 shown, step 420 includes:
[0233] Step 4202, receiving from the client the rendering basic data of the client's current presented document and the target export document type.
[0234] Combined with step 3203 of the above client, in response to the export request, the client sends the rendering basic data of the current presented document on the client and the target type of the export document to the document server. At this time, the document server receives from the client the rendering basic data of the client's current presented document and the target export document type to export an export document that conforms to the target export document type.
[0235] The target export document type is the same as the above target type and is used to represent the format type into which the current presented document is converted after document export. The target export document type includes an online document type, a local document type, and a picture document type. The online document type can be an online PDF type, an online Word type, etc. For example, if the target type is an online PDF type, at this time, the exported document is an online PDF. If the document server does not receive the target export document type of the client, the type of the exportable document can be the default export document type. The default export document type can be determined based on the client's historical export document type, or can be determined according to the type with the highest frequency of the historical export document type of the object for which the client initiates the export request, or can be a preset default type, which is not specifically limited here.
[0236] In another embodiment, as Figure 8 shown, step 420 includes:
[0237] Step 4203, receiving from the client the rendering basic data of the client's current presented document and the export document recipient identifier. The export document recipient identifier has been described in detail in the above embodiment and will not be elaborated here.
[0238] Combined with step 3204 of the above client, in response to the export request, the client sends the rendering basic data of the current presented document on the client and the export document recipient identifier to the document server. At this time, the document server receives from the client the rendering basic data of the client's current presented document and the export document recipient identifier to send the export document to the client of the recipient corresponding to the export document recipient identifier.
[0239] In another embodiment, in response to an export request, the client sends the rendering basic data of the currently presented document at the client, the target type of the exported document, and the identification of the recipient of the exported document to the document server. At this time, the document server receives from the client the rendering basic data of the currently presented document at the client, the target type of the exported document, and the identification of the recipient of the exported document, so as to send an exported document conforming to the target exported document type to the client of the recipient corresponding to the identification of the recipient of the exported document.
[0240] The advantages of the above embodiment are that the document server can perform document export according to at least one of the target type of the exported document and the identification of the recipient of the exported document sent by the client, and the rendering basic data of one or more currently presented documents at the client, which can improve the efficiency, real-time performance, and flexibility of document export.
[0241] Related description of the verification performed by the document server after receiving the rendering basic data in the embodiments of the present disclosure
[0242] In one embodiment, as Figure 12 shown, after step 420, according to an embodiment of the present disclosure, the document export method further includes:
[0243] Step 421, obtain the registration level of the client;
[0244] Step 422, perform a first verification based on the rendering basic data and the registration level.
[0245] In step 421, the registration level of the client refers to the permission or access level of the client in the document export application. Depending on the registration level, the client may have different permissions and functions. For example, the registration levels include a first registration level, a second registration level, and a third registration level, and the first registration level is higher than the second registration level, and the second registration level is higher than the third registration level. The higher the registration level, the more permissions the client enjoys.
[0246] In step 422, the first verification refers to the process of performing verification based on the rendering basic data and the registration level. Since it is stipulated in the document export application that only clients with a specific level or above can implement document export, it is necessary to verify the registration level to determine whether the client has the permission to export documents. If the registration level of the client meets the standard for document export of the rendering basic data, the first verification is successful. If the registration level of the client does not meet the standard for document export of the rendering basic data, the first verification fails, and at this time, step 430 will not be executed.
[0247] In one embodiment, as Figure 12 shown, step 420 includes:
[0248] Step 4204: Receive, from the client, the rendering basic data of the current rendered document of the client and the first signature of the client.
[0249] The first signature refers to the signature generated by the client based on the rendering basic data of the current rendered document. The first signature is generated based on a predetermined digest algorithm and the private key of the client. The first signature can be used to verify whether the rendering basic data of the current rendered document has been tampered with during transmission, thereby ensuring the security and integrity of the rendering basic data.
[0250] Differences in signature algorithms can be reflected in the use of different predetermined digest algorithms, etc. Therefore, the client calculates the digest of the rendering basic data of the current rendered document using a predetermined digest algorithm, and encrypts the digest using the private key of the client to obtain the first signature.
[0251] Therefore, in document export, in order to ensure the validity and security of the rendering basic data of the current rendered document, the rendering basic data of the current rendered document is first signed. The client uses its private key to sign the rendering basic data of the current rendered document to prove that the rendering basic data of the current rendered document is initiated by it. After receiving the rendering basic data of the current rendered document, the document server needs to verify the first signature to confirm the authenticity and integrity of the rendering basic data of the current rendered document.
[0252] At this time, as Figure 12 shown, after step 420, according to an embodiment of the present disclosure, the document export method further includes:
[0253] Step 423: Obtain the public key of the client;
[0254] Step 424: Use a predetermined digest algorithm and the public key of the client to perform a second verification on the first signature.
[0255] In step 423, the public key is a key generated and publicly disclosed by the client. The public key can be used by the document server to verify the first signature generated by the client. During document export, the public key is usually used for signature verification operations to verify the validity of the rendering basic data of the current rendered document. The public key and private key of the client are a pair of keys, and they are interrelated. The private key is used to generate the first signature, and the public key is used to verify the first signature. Only the client holding the corresponding private key can generate a valid signature and be verified through the public key.
[0256] In step 424, the document server for signature verification decrypts the first signature using the public key of the client to obtain a decryption result. At this time, the decryption result is a digest value. The document server recalculates the digest of the rendering basic data of the currently presented document using the same predetermined digest algorithm (such as a hashing algorithm) as in the signature process. If the decryption result is consistent with the recalculated digest, it is determined that the result of the second verification of the first signature is successful signature verification. If the decryption result is inconsistent with the recalculated digest, it is determined that the result of the second verification of the first signature is failed signature verification.
[0257] The advantages of the above embodiments are that signature verification of the first signature using the public key of the client can verify the integrity and authenticity of the rendering basic data of the currently presented document. Therefore, by performing the first verification on the rendering basic data and the registration level, and by performing the second verification on the first signature, malicious operations or data tampering by unauthorized objects can be prevented, ensuring the legality and credibility of the operations.
[0258] It should be noted that Figure 12 Steps 421 - 424 in Figures 4 - 5 can be applied simultaneously to Figures 7 - 9 the corresponding step processes in
[0259] Detailed description of step 430
[0260] In step 430, in the case where there is no client rendering tool for rendering the rendering basic data of the client, a headless browser is used to execute the data presentation control to perform the rendering of the rendering basic data to obtain a rendering result.
[0261] It should be noted that the currently presented document, the rendering basic data, the headless browser, and the data presentation control have been described in detail in the above embodiments and will not be elaborated here.
[0262] Rendering refers to the process of converting abstract data into visual images, graphics, or pages. This process usually includes steps such as processing data, layout, and styling, and finally presenting the data in a form that can be perceived by users. The rendering in the present disclosure refers to document rendering, which means converting document content into a visual form, such as converting text in Markdown format into formats such as HTML, PDF, pictures, etc., for users to display, download, view, print, etc. on the web page.
[0263] A client-side rendering tool is a software or library used to process and render data on the client side. Client-side rendering tools can be tools built based on React, Angular, Vue, etc. For example, a client-side rendering tool can dynamically inject data into the HTML structure of the client, use JavaScript to process the data, and render the content in the browser. Client-side rendering tools enable developers to process and display data more efficiently, providing a more flexible and interactive user interface experience.
[0264] The document server according to the embodiments of the present disclosure can efficiently and accurately implement the export of the currently presented document on the client without a client-side rendering tool for rendering the rendering base data, effectively solving the problem that in the prior art, for online document applications with custom formats, the export of online documents may not be achieved.
[0265] In one embodiment, as Figure 4 shown, in step 430, a headless browser is used to execute a data presentation control to perform the rendering of the rendering base data to obtain a rendering result, including:
[0266] Step 4301: Use a headless browser to execute a data presentation control to pass the rendering base data into a format template component to obtain a rendering result. The format template component has been described in detail in the above embodiments and will not be elaborated here.
[0267] In the embodiments of the present disclosure, the client sends the rendering base data to the document server, and the document server only needs to receive the rendering base data to render the currently presented document. In this way, it is no longer necessary for both the client and the document server to parse and render the data of the currently presented document, effectively reducing the development workload. Compared with the front-end and back-end isomorphic applications in the related art, where the server needs to fully render the html for each request, the embodiments of the present disclosure pre-create multiple format template components in the page container, greatly improving the rendering efficiency of the document.
[0268] In another embodiment, as Figure 4 shown, step 4301 includes:
[0269] Step 43011: Determine the template type corresponding to the rendering base data;
[0270] Step 43012: Among multiple format template components, determine the format template component corresponding to the template type as the target format template component;
[0271] Step 43013: Use a headless browser to execute a data presentation control to pass the rendering base data into the target format template component to obtain a rendering result.
[0272] In step 43011, the template type refers to the type of the document template that renders the current presentation document corresponding to the basic data and is displayed on the client interface. For example, in the A Document - Resume Assistant application, the pre-set format templates include templates such as A Product Internship Resume, A Product Manager Resume, A Product Game Operation Resume, A Product Human Resources Resume, etc. The template type at this time is one of the templates such as A Product Internship Resume, A Product Manager Resume, A Product Game Operation Resume, A Product Human Resources Resume, etc. Among them, each template type also defines that the template is in the form of PDF, Excel, PPT, etc.
[0273] It should be noted that if the rendering basic data refers to receiving the rendering basic data of multiple current presentation documents of the client from the client, the rendering basic data of the multiple current presentation documents corresponds to the same format template. That is to say, the template type corresponding to the rendering basic data at this time is also one of the preset templates selected.
[0274] In one embodiment, as Figure 8 shown, step 43011 includes:
[0275] Step 430111: Determine the template type corresponding to the rendering basic data based on the export document recipient identifier. The export document recipient identifier can also receive a document sub-identifier, and the receivable document sub-identifier is used to indicate the template type that the recipient's client can receive.
[0276] Because the client that receives the export request may send the export document to other clients. At this time, it is necessary to send the export document recipient identifier to the document server at the same time. However, since the recipient's client corresponding to the export document recipient identifier may not be able to recognize the template type selected by the sender client, it is necessary to determine the template type that the recipient's client can receive according to the export document recipient identifier, so as to determine the template type corresponding to the rendering basic data. For example, if it is determined according to the export document recipient identifier that the recipient's client cannot recognize a PDF-type document, the template type corresponding to the rendering basic data cannot be of the PDF type.
[0277] Combined with step 3204 of the above client and step 4203 of the document server, in response to the export request, the client sends the rendering basic data of the current presented document on the client and the recipient identifier of the exported document to the document server. At this time, the document server receives from the client the rendering basic data of the current presented document on the client and the recipient identifier of the exported document. Before rendering, the document server needs to determine the template type corresponding to the rendering basic data based on the recipient identifier of the exported document. Among multiple format template components, determine the format template component corresponding to the template type as the target format template component. Use a headless browser to execute the data presentation control to pass the rendering basic data into the target format template component to obtain the rendering result.
[0278] In step 43012, the format template component has been described in detail in the above embodiments and will not be elaborated here. The target format template component refers to the format template component that matches the template type corresponding to the rendering basic data. That is to say, according to the target format template component, a document with the same document format as the current presented document displayed on the client interface can be rendered. For example, if the current presented document is a resume document about "A Xiaodang" filled in based on the A product internship resume template in the A Document - Resume Assistant application, then the format template component corresponding to the A product internship resume template is the target format template component corresponding to the rendering basic data.
[0279] In the embodiment of the present disclosure, by selecting the format template component corresponding to the template type from multiple format template components, it can be ensured that the format template selected by the document server has a format and structure that matches the format template selected by the client, so that the subsequent document export processing can be carried out in an accurate manner.
[0280] In step 43013, after determining the target format template component that matches the template type corresponding to the rendering basic data, the document server uses a headless browser to execute the data presentation control to pass the rendering basic data into the target format template component to obtain the rendering result.
[0281] In one embodiment, as Figure 4 shown, step 43013 includes:
[0282] Step 430131: Use a headless browser to execute the data presentation control to pass the rendering basic data of each current presented document into the target format template component respectively to obtain the sub - rendering result of each current presented document, and merge the sub - rendering results into the rendering result.
[0283] The sub-rendering result refers to the result obtained after the document server renders a single currently presented document based on the target format template component. At this time, the rendering result refers to the result obtained by splicing and merging the sub-rendering results corresponding to multiple currently presented documents. Therefore, the exported document is obtained based on the merged rendering result.
[0284] The rendering basic data of each currently presented document is respectively passed into the target format template component, so that the target format template component can use the rendering basic data of each currently presented document to render the content of the corresponding currently presented document.
[0285] Combined with step 3201 of the client and step 4201 of the document server above, after the client receives an export request for multiple currently presented documents with the same format template, in response to the export request, the client sends the rendering basic data of the multiple currently presented documents on the client to the document server. At this time, the document server receives from the client the rendering basic data of multiple currently presented documents of the client with the same format template. After determining the target format template component corresponding to the rendering basic data of the multiple currently presented documents, the headless browser is used to execute the data rendering control to respectively pass the rendering basic data of each currently presented document into the target format template component, obtain the sub-rendering result of each currently presented document, and merge the sub-rendering results into the rendering result.
[0286] In the above embodiment, the document server can avoid adjusting the template multiple times and improve the efficiency of exporting documents by using the same target format template component to export multiple currently presented documents corresponding to an export request at the same time. Moreover, exporting multiple documents at one time can simplify the maintenance process and ensure the consistency of the format and appearance of the documents.
[0287] In another embodiment, as Figure 8 shown, step 43013 includes:
[0288] Step 4301321: Use the headless browser to execute the data rendering control to determine that the target format template component matches the rendering basic data;
[0289] Step 4301322: Pass the rendering basic data into the target format template component to obtain the rendering result.
[0290] It can be understood that if the client does not send the export document recipient identifier to the document server, the target format template component in the document server must match the rendering basic data. However, if the client sends the export document recipient identifier to the document server, the target format template component in the document server may not match the rendering basic data.
[0291] In combination with step 430111, the document server determines the template type corresponding to the rendering basic data based on the recipient identifier of the exported document. Among multiple format template components, it determines the format template component corresponding to the template type as the target format template component. That is to say, at this time, the target format template component is determined based on the recipient identifier of the exported document, rather than the rendering basic data. Therefore, it is necessary to use a headless browser to execute the data presentation control to determine whether the target format template component matches the rendering basic data. If the target format template component matches the rendering basic data, the rendering basic data is passed into the target format template component to obtain a rendering result. If the target format template component does not match the rendering basic data, the subsequent rendering process cannot be executed.
[0292] In another embodiment, as Figure 9 shown, step 430 uses a headless browser to execute the data presentation control to perform the rendering of the rendering basic data to obtain a rendering result, including:
[0293] Step 4302, in a compilation environment detached from the export service, use a headless browser to execute the data presentation control to perform the rendering of the rendering basic data to obtain a rendering result.
[0294] In combination with step 4101 of the above-mentioned document server, the document server uses the export service to call a headless browser to create a page container. It can be understood that the export service sends an instruction to create a page container to the headless browser. This instruction can be a piece of code that controls the headless browser to create a page container, which is not specifically limited here. However, the export service can control all operations of the headless browser or can control some operations of the headless browser. For example, the embodiments of the present disclosure can limit the export service to only be used to call a headless browser to create a page container. That is to say, in a compilation environment detached from the export service, the headless browser executes the data presentation control to perform the rendering of the rendering basic data to obtain a rendering result.
[0295] In one embodiment, the data presentation control is a link to a rendering code segment. This link refers to an address outside the headless browser for storing the rendering code segment. The rendering code segment refers to the code segment for presenting data on the page container. The rendering code segment can be HTML, JavaScript, or other front-end code, which is not specifically limited here. By executing the data presentation control, it can be linked to the rendering code segment, and thus by running the rendering code segment, the rendering of the rendering basic data can be achieved.
[0296] At this time, as Figure 13 shown, step 430 uses a headless browser to execute the data presentation control to perform the rendering of the rendering basic data to obtain a rendering result, including:
[0297] Step 43031: Generate a control call statement for the headless browser in response to receiving rendering basic data from the client;
[0298] Step 43032: Based on the control call statement, cause the headless browser to call the link, thereby executing the rendering code segment to obtain a rendering result.
[0299] In step 43031, the control call statement refers to the statement used to initiate the headless browser to call and execute the rendering code segment. Since the headless browser is essentially a browser instance, it needs to be started and controlled through statements. Therefore, the statement to start the headless browser is the control call statement. Trigger the data presentation control to link and obtain the rendering code segment according to the control call statement.
[0300] In step 43032, based on the control call statement, cause the headless browser to call the link. That is to say, obtain the code rendering segment according to this link address, and thus by executing the rendering code segment, the rendering of the rendering basic data is realized to obtain a rendering result.
[0301] In another embodiment, the data presentation control may also refer to an address inside the headless browser for storing the rendering code segment. Therefore, setting the data presentation control as an address inside the headless browser can effectively improve the rate at which the headless browser obtains the rendering code segment, thereby improving the document rendering efficiency. At this time, generate a control call statement for the headless browser in response to receiving rendering basic data from the client. Based on the control call statement, find the address from the headless browser, thereby executing the rendering code segment to obtain a rendering result. It can be seen that this data presentation control can be flexibly set according to actual needs and is not fixed.
[0302] It should be noted that in combination with step 3203 of the client and step 4202 of the document server above, the client, in response to the export request, sends the rendering basic data of the currently presented document on the client and the target type of the exported document to the document server. At this time, the document server receives the rendering basic data of the currently presented document of the client and the target export document type from the client. After determining the target format template component corresponding to the rendering basic data of the currently presented document, use the headless browser to execute the data presentation control to transfer the rendering basic data of the currently presented document into the target format template component to obtain the rendering result of the currently presented document.
[0303] In the embodiments of the present disclosure, in the case where the document server does not have a client rendering tool for rendering the rendering basic data, using a headless browser to execute the rendering of the rendering basic data by the data presentation control can solve the problem in the prior art that the online document application with a custom format cannot export the online document. The headless browser can execute front-end code such as JavaScript and CSS, so it can support complex rendering logics. Moreover, by selecting a format template component corresponding to the template type from multiple format template components, it can be ensured that the format template selected by the document server has a format and structure matching that of the format template selected by the client, so that the subsequent document export process can be carried out in an accurate manner.
[0304] Detailed description of step 440
[0305] In step 440, using the file conversion tool of the headless browser, the rendering result is converted into an export document of the current presented document. The method of obtaining the rendering result has been described in detail in the above embodiments. For the sake of saving space, it will not be elaborated here.
[0306] The file conversion tool of the headless browser refers to a tool provided by the headless browser for converting the document content in the page container into a file format. These tools can convert the document content in the page container into files in formats such as PDF, pictures, and HTML for export, archiving, or printing. The file conversion tools of the headless browser include a printing tool and a screenshot tool. The printing tool refers to the function in the headless browser for converting the web page content in the page container into the PDF format. Through the printing tool of the headless browser, the web page content can be exported as a PDF file according to the specified format and layout, realizing the printing and archiving of the web page content. The screenshot tool refers to the function in the headless browser for capturing the web page content in the page container as a picture format. Through the screenshot tool of the headless browser, the entire web page or the content of a specified area can be captured as a picture file, and it supports export in formats such as PNG and JPEG. This function is usually used to generate thumbnails of web pages, display page snapshots, or for picture files for archiving and sharing.
[0307] The export document refers to the document generated after the rendering result of the current presented document is converted into a file in the document server. The export document is a document in accordance with the target export document type of the current presented document. For example, if the target export document type is the local PDF type, then the export document is an editable local PDF type document.
[0308] In one embodiment, as Figure 4 shown, step 440 includes:
[0309] Step 4401: If the target export document type is the first type, use the printing tool of the headless browser to print the rendering result as an export document of the first type.
[0310] Step 4402: If the target export document type is the second type, use the screenshot tool of the headless browser to capture the rendering result as an export document of the second type.
[0311] In Step 4401, the first type refers to the document types saved on the local client. The documents on the local client refer to the documents stored on the local computer. The document types of the local client include local PDF, local PPT and other document types. When it is determined that the target export document type is the first type, use the printing tool of the headless browser to print the rendering result as an export document of the first type.
[0312] As Figure 14A shown, the currently presented document is a resume document about "A Xiaodang" filled in based on the internship resume template of Product A in the A Document - Resume Assistant application. After the user finishes editing their personal resume document, select and trigger the "Export Resume" option in the upper function bar to export the edited resume document. After triggering the "Export Resume" option in the upper function bar, an export file type list is displayed. The export file type list contains multiple export file type options. For example, online PDF document type, local PDF document type, and local picture type. After triggering the "Local PDF Document" option in the export file type list, the document server connected to the client uses the printing tool of the headless browser to print the rendering result as an export document of the first type. After the document server executes the document export, the local PDF document of the resume document after the user finishes editing is displayed on the client page, that is, the document named "Product A Internship Resume - 16987.pdf". At this time, the exported document can be previewed locally in the browser and can also be downloaded to the local device.
[0313] In Step 4402, the second type refers to the document type in picture format. When it is determined that the target export document type is the second type, use the screenshot tool of the headless browser to print the rendering result as an export document of the second type.
[0314] As Figure 14BAs shown, the currently presented document is a resume document about "A Profile" filled in based on the internship resume template of Product A in the A Document - Resume Assistant application. After the user finishes editing their resume document, they select the "Export Resume" option in the upper function bar to export the edited resume document. After triggering the "Export Resume" option in the upper function bar, a list of export file types is displayed. After triggering the "Local Image" option in the export file type list, the document server connected to the client uses the screenshot tool of the headless browser to print the rendering result as a second type of export document. After the document server executes the document export, the local PDF document of the resume document after the user finishes editing is displayed on the client's page, namely the document named "Product A Internship Resume - 169678.png". At this time, the document picture can be viewed locally.
[0315] In another embodiment, as Figure 4 shown, step 440 further includes:
[0316] Step 4403: If the target export document type is the third type, use the printing tool of the headless browser to print the rendering result as a first type of export document.
[0317] The third type refers to the online document type stored on the cloud server. A cloud server is a remote server that provides computing services through the Internet, and users can access and utilize the resources on these servers through the Internet. The online document type stored on the cloud server refers to various types of online documents stored on the cloud server. Documents of the third type can be stored on the cloud server and accessed, shared, and edited through the Internet.
[0318] Both the first type and the third type of export documents need to use the printing tool of the headless browser. Only the first type of export document will be sent to the client that sends the export request, and the third type of export document will be stored on the cloud server.
[0319] Detailed description of step 450
[0320] In step 450, the export document is output. The export document output by the document server has been described in detail in the above embodiments and will not be elaborated here.
[0321] In one embodiment, as Figure 8 shown, step 450 includes:
[0322] Step 4501: If the target export document is of the first type or the second type, send the export document to the client. The first type and the second type have been described in detail in the above embodiments and will not be elaborated here.
[0323] It should be noted that the target export document is the export document of the current presented document after the document server files the rendering result. If the rendering basic data received by the document server is the rendering basic data of a current presented document on the client side, the target export document is the export document output after the document export of this current presented document. If the rendering basic data received by the document server is the rendering basic data of multiple current presented documents on the client side, the target export document is the merged export document of these multiple current presented documents.
[0324] In another embodiment, as Figure 8 shown, step 450 includes:
[0325] Step 4502, if the target export document is of the third type, store the export document of the first type in the cloud server as the export document of the third type. Since the third type refers to the online document type, after the document server generates the export document of the current presented document, store the export document of the first type in the cloud server.
[0326] In another embodiment, as Figure 8 shown, step 450 includes:
[0327] Step 4503, send the export document to the export document recipient corresponding to the export document recipient identifier.
[0328] The export document recipient identifier has been described in detail in the above embodiments and will not be elaborated here.
[0329] Combined with step 3204 of the client, step 4203 of the document server, and step 430111 of the document server above, in response to the export request, the client sends the rendering basic data of the current presented document on the client side and the export document recipient identifier to the document server. At this time, the document server receives the rendering basic data of the current presented document of the client and the export document recipient identifier from the client. Before rendering, the document server needs to determine the template type corresponding to the rendering basic data based on the export document recipient identifier. Among multiple format template components, determine the format template component corresponding to the template type as the target format template component. Use a headless browser to execute the data presentation control to pass the rendering basic data into the target format template component to obtain the rendering result. The document server uses the file tool of the headless browser to file the rendering result as the export document of the current presented document. Finally, send the export document to the export document recipient corresponding to the export document recipient identifier.
[0330] In another embodiment, step 450 includes: sending the merged export document of multiple current presented documents to the client.
[0331] Related description of the document server in the embodiments of the present disclosure for backing up exported documents
[0332] In one embodiment, as Figure 15 shown, before step 450, according to an embodiment of the present disclosure, the document export method further includes:
[0333] Step 441: Obtain the registration level of the client and the security level of the rendering basic data;
[0334] Step 442: Determine the target backup server in the backup server cluster based on the registration level and the security level;
[0335] Step 443: Back up the exported document to the target backup server.
[0336] In step 441, the registration level has been described in detail in the above embodiment. For the sake of saving space, it will not be elaborated here. The security level of the rendering basic data refers to the level of security requirements for accessing, transmitting, storing, and processing the rendering basic data. The security level of the rendering basic data includes the first security level, the second security level, and the third security level, and the first security level is higher than the second security level, and the second security level is higher than the third security level. The higher the security level, the higher the security requirements for the rendering basic data.
[0337] In step 442, the backup server cluster refers to a cluster composed of multiple backup servers, which is used to store and manage the data that needs to be backed up. The backup server cluster is used to create a backup document of the exported document to ensure that the data can be quickly restored when the client or the cloud server fails or data is lost. The target backup server refers to the determined backup server for backing up the target exported document.
[0338] The process of determining the target backup server in the backup server cluster based on the registration level and the security level includes: determining a first score based on the registration level of the client; determining a second score based on the security level of the rendering basic data; determining a total score based on the first score and the second score, and then determining the target backup server in the backup server cluster according to the total score.
[0339] Determining the first score based on the registration level of the client is through a first look-up table. Table 1 shows an example of a first look-up table.
[0340] Registration level First score First registration level 100 Second registration level 60 Third registration level 20
[0341] Table 1
[0342] Based on the above example, the registration level is the first registration level. Looking up Table 1, the corresponding first score is 100; the registration level is the third registration level. Looking up Table 1, the corresponding first score is 20.
[0343] Determining the second score based on the security level of the rendering basic data can be done through a second look-up table. Table 2 shows an example of a second look-up table.
[0344] Security level Second score First security level 100 Second security level 60 Third security level 20
[0345] Table 2
[0346] Based on the above example, the security level is the first security level. Looking up Table 2, the corresponding second score is 100; the security level is the third registration level. Looking up Table 2, the corresponding second score is 20.
[0347] In one embodiment, the total score is determined by using the average of the first score and the second score. For example, if the first score determined according to the registration level of the client is 100 and the second score determined according to the security level of the rendering basic data is 60, then the total score is (100 + 60) / 2 = 80. The advantage of calculating the total score by using the average is that it makes the influence of the registration level of the client and the security level of the rendering basic data on determining the target backup server the same, improving the fairness of determining the target backup server.
[0348] In another embodiment, the total score is calculated by using the weighted average of the first score and the second score. In this embodiment, first, weights need to be set for the first score corresponding to the registration level of the client and the second score corresponding to the security level of the rendering basic data respectively. For example, the weight of the first score is 0.6, the weight of the second score is 0.4, the first score is 100, and the second score is 60. Then the total score is 100*0.6 + 60*0.4 = 84. The advantage of determining the target backup server by using the weighted average is that different weights can be flexibly set for the first score corresponding to the registration level of the client and the second score corresponding to the security level of the rendering basic data according to the actual application needs, improving the flexibility of determining the target backup server.
[0349] The target backup server in the backup server cluster is determined according to the total score. The higher the total score, the higher the performance requirements for the target backup server required. For example, the backup server cluster includes the first backup server, the second backup server, the third backup server, the fourth backup server, and the fifth backup server. The first backup server has the best performance, that is, it is not easily damaged. The fifth backup server has the worst performance, such as the shortest storage time for backup.
[0350] In one embodiment, the target backup server can be determined through a third look-up table between the total score and the backup servers in the corresponding backup server cluster set. Table 3 shows an example of a third look-up table.
[0351] Total score Backup server 80-100 First backup server 60-79 Second backup server 40-59 Third backup server 20-39 Fourth backup server Below 20 Fifth backup server
[0352] Table 3
[0353] Based on the above example, when the total score is 80, looking up Table 3, the corresponding target backup server is the first backup server; when the total score is 78, looking up Table 3, the corresponding target backup server is the second backup server.
[0354] In step 443, after determining the target backup server, the exported document is backed up to the target backup server.
[0355] The advantage of the above embodiment is that the target backup server is determined based on the registration level of the client and the security level of the rendered basic data. The scores corresponding to the registration level of the client and the security level of the rendered basic data can be adjusted according to the actual application needs, so as to adjust the target backup server, improving the flexibility of determining the target backup server.
[0356] It should be noted that regarding Figure 15 steps 441 - 443 in Figures 4 - 5 can be simultaneously applied to Figures 7 - 9 and Figures 12 - 13 the corresponding step processes in, which will not be elaborated here.
[0357] Detailed description of step 330
[0358] In step 330, an exported document is received from the document server. The exported document is the target exported document in the above embodiment, which has been described in detail and will not be elaborated here.
[0359] In one embodiment, the exported document can be an exported document corresponding to a current presented document.
[0360] In another embodiment, as Figure 4 shown, step 330 includes:
[0361] Step 3301: Receive a merged exported document corresponding to multiple current presented documents from the document server.
[0362] Combining step 3201 of the client and step 4201 of the document server, after the client receives an export request for multiple current rendered documents with the same format template, in response to the export request, the client sends the rendering basic data of the multiple current rendered documents on the client to the document server. At this time, the document server receives from the client the rendering basic data of the multiple current rendered documents of the client with the same format template. After determining the target format template components corresponding to the rendering basic data of the multiple current rendered documents, the headless browser is used to execute the data rendering control to separately pass the rendering basic data of each current rendered document into the target format template components to obtain the sub-rendering results of each current rendered document. And the sub-rendering results are merged into the rendering result. Using the file conversion tool of the headless browser, the rendering result is converted into an export document of the multiple current rendered documents. The document server outputs the export document, and then the client can receive from the document server the merged export document corresponding to the multiple current rendered documents.
[0363] In another embodiment, as Figure 7 shown, step 330 includes:
[0364] Step 3302, receiving an export document of the target type from the document server.
[0365] Combining step 3203 of the client and step 4202 of the document server, in response to the export request, the client sends the rendering basic data of the current rendered document on the client and the target type of the export document to the document server. At this time, the document server receives from the client the rendering basic data of the current rendered document of the client and the target export document type to output an export document that conforms to the target export document type. At this time, the client can receive from the document server an export document of the target type.
[0366] An implementation detail diagram of the document export method according to the embodiments of the present disclosure
[0367] Next, with reference to Figure 16 , a flowchart of an implementation detail of the document export method according to the embodiments of the present disclosure applied to the client and the document server is described in detail by way of example.
[0368] Step 4101, using the export service to call the headless browser to create a page container;
[0369] Step 41101, creating multiple format template components in the page container;
[0370] Step 310, receiving an export request for the current rendered document;
[0371] Step 32021, in response to the export request, determining the boundary of the current rendered document on the presentation interface of the client;
[0372] Step 32022: Extract format template data from within the boundary, and use the remaining data after extracting the format template data within the boundary as the rendering basic data;
[0373] Step 32023: Send the rendering basic data to the document server;
[0374] Step 4204: Receive from the client the rendering basic data of the currently rendered document of the client and the first signature of the client;
[0375] Step 421: Obtain the registration level of the client;
[0376] Step 422: Perform a first verification based on the rendering basic data and the registration level;
[0377] Step 423: Obtain the public key of the client;
[0378] Step 424: Use a predetermined digest algorithm and the public key of the client to perform a second verification on the first signature;
[0379] Step 43031: In response to receiving the rendering basic data from the client, generate a control call statement for the headless browser;
[0380] Step 43032: Based on the control call statement, cause the headless browser to call a link, thereby executing a rendering code segment to obtain a rendering result;
[0381] Step 4401: If the target export document type is the first type, use the printing tool of the headless browser to print the rendering result as an export document of the first type; Step 4402: If the target export document type is the second type, use the screenshot tool of the headless browser to capture the rendering result as an export document of the second type; Step 4403: If the target export document type is the third type, use the printing tool of the headless browser to print the rendering result as an export document of the first type;
[0382] Step 441: Obtain the registration level of the client and the security level of the rendering basic data;
[0383] Step 442: Based on the registration level and the security level, determine the target backup server in the backup server cluster;
[0384] Step 443: Back up the export document to the target backup server;
[0385] Step 4501: If the target export document is of the first type or the second type, send the export document to the client; Step 4502: If the target export document is of the third type, store the export document of the first type on the cloud server as the export document of the third type;
[0386] Step 330: Receive an exported document from the server in the second year.
[0387] The advantages of the above embodiments are as follows: in the case where the document server does not have a client rendering tool for rendering the rendering basic data, the headless browser is used to execute the rendering of the rendering basic data by the data rendering control, and the file tool of the headless browser is used to file the rendering result into the exported document of the current presented document. In this way, the embodiments of the present disclosure can export the rendering basic data in different formats by using the data rendering control and the file tool of the headless browser. The client can directly receive the exported document from the document server, which improves the export efficiency of online documents. Moreover, for online documents in custom formats, the export of online documents can also be realized. And because the execution environment for document export is the document server, the running environment is stable, avoiding the compatibility problems caused by different device environments of objects in the client solution.
[0388] In practical applications, as Figure 17 shown, the storage size of the picture PDF document "A Product Internship...16968427.pdf" exported by using the document export method of the prior art is 1.4MB, while the storage size of the text PDF document "A Product Internship...16968418.pdf" exported by using the document export method of the embodiments of the present disclosure is 263KB. Therefore, the online PDF output by using the printing function of the headless browser in the embodiments of the present disclosure is a text PDF, which is smaller in size and higher in quality.
[0389] It should be noted that according to the above embodiments, in step 310 of the client, one or more of the first signature, export type, document recipient identifier, etc., and the rendering basic data of multiple current presented documents on the client can be selected and sent to the document server according to actual needs. At this time, the document server can flexibly execute corresponding steps according to the received data, which is not specifically limited herein.
[0390] Description of the device and equipment of the embodiments of the present disclosure
[0391] It can be understood that although the steps in the above respective flowcharts are sequentially shown according to 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 limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above 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 alternately with at least a part of other steps or steps or stages in other steps.
[0392] Figure 18 This is a module diagram of the document export device 1800 applied to the client 110 provided by the embodiments of the present disclosure. The document export device 1800 includes:
[0393] A first receiving unit 1810, configured to receive an export request for the currently presented document;
[0394] A response unit 1820, configured to, in response to the export request, send the rendering basic data of the currently presented document on the client to the document server, so that the document server, in the case of not having the client rendering tool for rendering the rendering basic data on the client, uses a headless browser to execute a data rendering control to perform the rendering of the rendering basic data, and uses the fileification tool of the headless browser to fileify the rendering result into an export document of the currently presented document;
[0395] A second receiving unit 1830, configured to receive the export document from the document server.
[0396] Optionally, the response unit 1820 is specifically configured to:
[0397] In response to the export request, determine the boundary of the currently presented document on the presentation interface of the client;
[0398] Extract format template data from within the boundary, and use the data remaining after extracting the format template data within the boundary as the rendering basic data;
[0399] Send the rendering basic data to the document server.
[0400] Optionally, the response unit 1820 is further specifically configured to:
[0401] In response to the export request, send the rendering basic data of the currently presented document on the client and the target type of the export document to the document server;
[0402] The second receiving unit 1830 is specifically configured to:
[0403] Receive the export document of the target type from the document server.
[0404] Optionally, the first receiving unit 1810 is specifically configured to:
[0405] Receive export requests for multiple currently presented documents, where the multiple currently presented documents have the same format template;
[0406] The response unit 1820 is further specifically configured to:
[0407] In response to the export request, send the rendering basic data of the multiple currently presented documents on the client to the document server;
[0408] The second receiving unit 1830 is further specifically configured to:
[0409] Receive, from the document server, a merged exported document corresponding to a plurality of currently presented documents.
[0410] Figure 19 FIG. is a schematic structural diagram of a document export device 1900 applied to a document server 140 according to an embodiment of the present disclosure. The document export device 1900 includes:
[0411] A first creation unit 1910, configured to create a page container, where the page container has a data presentation control;
[0412] A third receiving unit 1920, configured to receive, from the client, rendering basic data of the currently presented document of the client;
[0413] An execution unit 1930, configured to, in the case of not having a client rendering tool for rendering the rendering basic data on the client, use a headless browser to execute the data presentation control to perform rendering on the rendering basic data to obtain a rendering result;
[0414] A file unit 1940, configured to use a file tool of the headless browser to file the rendering result into an exported document of the currently presented document;
[0415] An output unit 1950, configured to output the exported document.
[0416] Optionally, after creating the page container, the document export device further includes:
[0417] A second creation unit (not shown), configured to create a format template component in the page container, where the format template component corresponds to format template data within a boundary on a presentation interface of the currently presented document on the client;
[0418] The execution unit 1930 is specifically configured to:
[0419] Use the headless browser to execute the data presentation control to transfer the rendering basic data into the format template component to obtain a rendering result.
[0420] Optionally, the second creation unit (not shown) is specifically configured to:
[0421] Create a plurality of format template components in the page container, where the plurality of format template components include a target format template component corresponding to format template data within a boundary on a presentation interface of the currently presented document on the client;
[0422] The execution unit 1930 is further specifically configured to:
[0423] Determine a template type corresponding to the rendering basic data;
[0424] Among multiple format template components, determine the format template component corresponding to the template type as the target format template component;
[0425] Use a headless browser to execute a data presentation control to pass the rendering basic data into the target format template component to obtain a rendering result.
[0426] Optionally, the third receiving unit 1920 is specifically configured to:
[0427] Receive, from a client, the rendering basic data of multiple current rendering documents of the client, where the multiple current rendering documents correspond to the same target format template component;
[0428] The execution unit 1930 is further specifically configured to:
[0429] Use a headless browser to execute a data presentation control to separately pass the rendering basic data of each current rendering document into the target format template component to obtain a sub-rendering result of each current rendering document, and merge the sub-rendering results into a rendering result.
[0430] Optionally, the third receiving unit 1920 is further specifically configured to:
[0431] Receive, from a client, the rendering basic data of the current rendering document of the client and an export document recipient identifier;
[0432] The execution unit 1930 is further specifically configured to:
[0433] Determine the template type corresponding to the rendering basic data based on the export document recipient identifier;
[0434] The output unit 1950 is specifically configured to:
[0435] Send the export document to the export document recipient corresponding to the export document recipient identifier.
[0436] Optionally, the execution unit 1930 is further specifically configured to:
[0437] Use a headless browser to execute a data presentation control to determine that the target format template component matches the rendering basic data;
[0438] Pass the rendering basic data into the target format template component to obtain a rendering result.
[0439] Optionally, the first creation unit 1910 is specifically configured to:
[0440] Use an export service to call a headless browser to create a page container;
[0441] The execution unit 1930 is further specifically configured to:
[0442] In a compiled environment detached from the export service, a headless browser is used to execute the data presentation control to perform the rendering of the rendering basic data, and a rendering result is obtained.
[0443] Optionally, the documentation tool includes a printing tool and a screenshot tool;
[0444] The third receiving unit 1920 is further specifically configured to:
[0445] Receive, from the client, the rendering basic data of the current presentation document of the client and the target export document type;
[0446] The documentation unit 1940 is specifically configured to:
[0447] If the target export document type is the first type, use the printing tool of the headless browser to print the rendering result as an export document of the first type; if the target export document type is the second type, use the screenshot tool of the headless browser to capture the rendering result as an export document of the second type;
[0448] The output unit 1950 is further specifically configured to:
[0449] Send the export document to the client.
[0450] Optionally, the documentation unit 1940 is further specifically configured to:
[0451] If the target export document type is the third type, use the printing tool of the headless browser to print the rendering result as an export document of the first type;
[0452] The output unit 1950 is further specifically configured to:
[0453] Store the export document of the first type on the cloud server as an export document of the third type.
[0454] Optionally, before outputting the export document, the document export device further includes:
[0455] A first obtaining unit (not shown), configured to obtain the registration level of the client and the security level of the rendering basic data;
[0456] A determination unit (not shown), configured to determine a target backup server in the backup server cluster based on the registration level and the security level;
[0457] A backup unit (not shown), configured to back up the export document to the target backup server.
[0458] Optionally, after receiving the rendering basic data of the current presentation document of the client from the client, the document export device further includes:
[0459] A second acquisition unit (not shown) for acquiring the registration level of the client;
[0460] A first verification unit (not shown) for performing a first verification based on the rendering basic data and the registration level.
[0461] Optionally, the third receiving unit 1920 is further specifically configured to:
[0462] Receive, from the client, the rendering basic data of the current presentation document of the client and a first signature of the client, where the first signature is generated based on a predetermined digest algorithm and the private key of the client;
[0463] After receiving the rendering basic data of the current presentation document of the client from the client, the document export device further includes:
[0464] A third acquisition unit (not shown) for acquiring the public key of the client;
[0465] A second verification unit (not shown) for performing a second verification on the first signature by using the predetermined digest algorithm and the public key of the client.
[0466] Optionally, the data presentation control is a link to a rendering code segment;
[0467] The execution unit 1930 is further specifically configured to:
[0468] Generate a control call statement for the headless browser in response to receiving the rendering basic data from the client;
[0469] Based on the control call statement, cause the headless browser to call the link, thereby executing the rendering code segment to obtain a rendering result.
[0470] Refer to Figure 20 , Figure 20 FIG. is a block diagram of a part of the structure of the client 110 for implementing the document export method according to an embodiment of the present disclosure. The terminal includes components such as a radio frequency (RF) circuit 2010, a memory 2015, an input unit 2030, a display unit 2040, a sensor 2050, an audio circuit 2060, a wireless fidelity (WiFi) module 2070, a processor 2080, and a power supply 2090. Those skilled in the art can understand that Figure 20 The shown structure of the client 110 does not limit a mobile phone or a computer, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0471] The RF circuit 2010 can be used for receiving and transmitting information during information reception or call processes. Specifically, after receiving the downlink information from the base station, it is processed by the processor 2080. Additionally, the uplink data is sent to the base station.
[0472] The memory 2015 can be used to store software programs and modules. The processor 2080 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 2015.
[0473] The input unit 2030 can be used to receive input digital or character information and generate key signal inputs related to the settings and function controls of the content terminal. Specifically, the input unit 2030 can include a touch panel 2031 and other input devices 2032.
[0474] The display unit 2040 can be used to display the input information or provided information and various menus of the content terminal. The display unit 2040 can include a display panel 2041.
[0475] The audio circuit 2060, speaker 2061, and microphone 2062 can provide an audio interface.
[0476] In this embodiment, the processor 2080 included in the client 110 can execute the document export method of the previous embodiment.
[0477] The client 110 of the embodiments of the present disclosure includes, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present disclosure can be applied to various scenarios, including but not limited to online office, data export, etc.
[0478] Figure 21 It is a structural block diagram of a part of the document server 140 for implementing the document export method of the embodiments of the present disclosure. The document server 140 can vary greatly due to configuration or performance differences and can include one or more central processing units (CPUs) 2122 (for example, one or more processors) and a memory 2132, and one or more storage media 2130 (for example, one or more mass storage devices) for storing application programs 2142 or data 2144. Among them, the memory 2132 and the storage media 2130 can be transient storage or persistent storage. The programs stored in the storage media 2130 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations on the server. Further, the central processor 2122 can be configured to communicate with the storage media 2130 and execute a series of instruction operations in the storage media 2130 on the server.
[0479] The document server 140 may also include one or more power supplies 2126, one or more wired or wireless network interfaces 2150, one or more input / output interfaces 2158, and / or one or more operating systems 2141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSD TM, and so on.
[0480] The central processing unit 2122 in the document server 140 may be used to execute the document export method of the embodiments of the present disclosure.
[0481] The embodiments of the present disclosure also provide a computer-readable storage medium for storing program codes for executing the document export methods of the foregoing embodiments.
[0482] The embodiments of the present disclosure also provide a computer program product including a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes to implement the above-mentioned document export method.
[0483] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, which works together with other related 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 the overall module or unit including the function of the module or unit.
[0484] In the specification of the present disclosure and the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar contents, and do not have to be 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.
[0485] It should be understood that in this 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, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates that the associated content before and after is an "or" relationship. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one (item) 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, and c can be single or plural.
[0486] It should be understood that in the description of the embodiments of this disclosure, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as "greater than", "less than", and "exceeding" do not include the present number, and understandings such as "above", "below", and "within" include the present number.
[0487] In several embodiments provided in this 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. In actual implementation, there can be other division methods. 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, direct coupling, or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.
[0488] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or 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.
[0489] In addition, each functional unit in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0490] When 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 such 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. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may 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 that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0491] It should also be understood that the various embodiments provided by the present disclosure can be combined arbitrarily to achieve different technical effects.
[0492] 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 document export method, characterized in that, Applied to a client, the document export method includes: Receiving an export request for the currently presented document; In response to the export request, sending the rendering basic data of the currently presented document on the client to a document server, so that the document server, without the client rendering tool for rendering the rendering basic data on the client, uses a headless browser to execute a data presentation control to perform rendering of the rendering basic data, and uses the file generation tool of the headless browser to generate the rendering result into an export document of the currently presented document; Receiving the export document from the document server.
2. The document export method according to claim 1, wherein The step of, in response to the export request, sending the rendering basic data of the currently presented document on the client to the document server includes: In response to the export request, determining the boundary of the currently presented document on the presentation interface of the client; Extracting format template data from within the boundary, and using the data remaining after extracting the format template data within the boundary as the rendering basic data; Sending the rendering basic data to the document server.
3. The document export method according to claim 1, characterized in that, The step of, in response to the export request, sending the rendering basic data of the currently presented document on the client to the document server includes: in response to the export request, sending the rendering basic data of the currently presented document on the client and the target type of the export document to the document server; The step of receiving the export document from the document server includes: receiving the export document of the target type from the document server.
4. The document export method according to claim 1, wherein The step of receiving an export request for the currently presented document includes: receiving export requests for multiple currently presented documents, where the multiple currently presented documents have the same format template; The step of, in response to the export request, sending the rendering basic data of the currently presented document on the client to the document server includes: in response to the export request, sending the rendering basic data of multiple currently presented documents on the client to the document server; The step of receiving the export document from the document server includes: receiving the merged export document corresponding to multiple currently presented documents from the document server.
5. A document export method, characterized in that, Applied to a document server, the document export method includes: Creating a page container that has a data presentation control; Receiving the rendering basic data of the currently presented document of the client from the client; Without the client rendering tool for rendering the rendering basic data on the client, using a headless browser to execute the data presentation control to perform rendering of the rendering basic data to obtain a rendering result; Using the file generation tool of the headless browser to generate the rendering result into an export document of the currently presented document; Outputting the export document.
6. The document export method according to claim 5, wherein After creating the page container, the document export method further includes: creating a format template component within the page container, where the format template component corresponds to the format template data within the boundary of the currently presented document on the presentation interface of the client; Executing the data rendering control using a headless browser to perform rendering of the rendering basic data to obtain a rendering result, including: executing the data rendering control using the headless browser to pass the rendering basic data into the format template component to obtain the rendering result.
7. The document export method according to claim 6, characterized in that Creating a format template component in the page container, including: creating a plurality of the format template components in the page container, where the plurality of the format template components include a target format template component corresponding to format template data within the boundaries on the rendering interface of the current rendering document on the client side; Executing the data rendering control using the headless browser to pass the rendering basic data into the format template component to obtain the rendering result, including: Determining the template type corresponding to the rendering basic data; Among the plurality of the format template components, determining the format template component corresponding to the template type as the target format template component; Executing the data rendering control using the headless browser to pass the rendering basic data into the target format template component to obtain the rendering result.
8. The document export method according to claim 7, characterized in that Receiving the rendering basic data of the client's current rendering document from the client, including: receiving the rendering basic data of a plurality of the client's current rendering documents from the client, where the plurality of the current rendering documents correspond to the same target format template component; Executing the data rendering control using the headless browser to pass the rendering basic data into the target format template component to obtain the rendering result, including: executing the data rendering control using the headless browser to separately pass the rendering basic data of each of the current rendering documents into the target format template component to obtain a sub-rendering result of each of the current rendering documents, and merging the sub-rendering results into the rendering result.
9. The document export method according to claim 7, wherein Receiving the rendering basic data of the client's current rendering document from the client, including: receiving the rendering basic data of the client's current rendering document and an export document recipient identifier from the client; Determining the template type corresponding to the rendering basic data, including: determining the template type corresponding to the rendering basic data based on the export document recipient identifier; Outputting the export document, including: sending the export document to the export document recipient corresponding to the export document recipient identifier.
10. The document export method according to claim 5, characterized in that, Creating the page container, including: using an export service to call the headless browser to create the page container; Executing the data rendering control using the headless browser to perform rendering of the rendering basic data to obtain a rendering result, including: in an environment without compilation of the export service, using the headless browser to execute the data rendering control to perform rendering of the rendering basic data to obtain a rendering result.
11. The document export method according to claim 5, wherein The file processing tool includes a printing tool and a screenshot tool; Receiving, from the client, rendering basic data of the current rendered document of the client, including: receiving, from the client, the rendering basic data of the current rendered document of the client, and a target export document type; Using the file conversion tool of the headless browser to convert the rendering result into an export document of the current rendered document, including: if the target export document type is the first type, using the printing tool of the headless browser to print the rendering result as the export document of the first type; if the target export document type is the second type, using the screenshot tool of the headless browser to capture the rendering result as the export document of the second type; Outputting the export document, including: sending the export document to the client.
12. The document export method according to claim 11, wherein Using the file conversion tool of the headless browser to convert the rendering result into an export document of the current rendered document, further including: if the target export document type is the third type, using the printing tool of the headless browser to print the rendering result as the export document of the first type; Outputting the export document, including: storing the export document of the first type in a cloud server as the export document of the third type.
13. The document export method according to claim 5, wherein After receiving, from the client, the rendering basic data of the current rendered document of the client, the document export method further includes: Obtaining the registration level of the client; Performing a first verification based on the rendering basic data and the registration level.
14. The document export method according to claim 5, wherein Receiving, from the client, rendering basic data of the current rendered document of the client, including: receiving, from the client, the rendering basic data of the current rendered document of the client, and a first signature of the client, the first signature being generated based on a predetermined digest algorithm and a private key of the client; After receiving, from the client, the rendering basic data of the current rendered document of the client, the document export method further includes: Obtaining the public key of the client; Performing a second verification on the first signature using the predetermined digest algorithm and the public key of the client.
15. The document export method according to claim 5, wherein The data presentation control is a link to a rendering code segment; Using the headless browser to execute the data presentation control to perform rendering on the rendering basic data to obtain a rendering result, including: In response to receiving the rendering basic data from the client, generating a control call statement for the headless browser; Based on the control call statement, causing the headless browser to call the link, thereby executing the rendering code segment to obtain the rendering result.
16. A document export device, characterized in that, Applied to a client, the document export apparatus includes: A first receiving unit, configured to receive an export request for a current rendered document; A response unit, configured to, in response to the export request, send the rendering basic data of the current presentation document at the client to a document server, so that the document server, in the case of not having a client rendering tool at the client for rendering the rendering basic data, uses a headless browser to execute a data rendering control to perform rendering on the rendering basic data, and uses a file generation tool of the headless browser to generate the rendering result into an export document of the current presentation document; A second receiving unit, configured to receive the export document from the document server.
17. A document export device, characterized in that, Applied to a document server, the document export device includes: A first creation unit, configured to create a page container, where the page container has a data rendering control; A third receiving unit, configured to receive the rendering basic data of the current presentation document of the client from the client; An execution unit, configured to, in the case of not having a client rendering tool at the client for rendering the rendering basic data, use a headless browser to execute the data rendering control to perform rendering on the rendering basic data to obtain a rendering result; A file generation unit, configured to use a file generation tool of the headless browser to generate the rendering result into an export document of the current presentation document; An output unit, configured to output the export document.
18. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the document export method according to any one of claims 1 to 15.
19. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the document export method according to any one of claims 1 to 15.
20. A computer program product, the computer program product 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 document export method according to any one of claims 1 to 15.