File preview system and method for realizing real-time online preview of multi-format file

By designing a file preview system that integrates application system interface, file stream processor, format recognition module, conversion module and rendering engine, the problem of online preview of multi-format files is solved, and user-friendly file access experience and resource optimization are achieved.

CN119513049APending Publication Date: 2025-02-25SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411536127.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

On the basis of ensuring file security and user experience, how to achieve online preview of files, especially real-time online preview of multi-format files.

Method used

A file preview system is designed, including an application system interface, a file stream processor, a format recognition module, a conversion module and a rendering engine. The system realizes online preview of multi-format files by receiving user file preview requests, reading file streams, identifying file formats, converting file streams, and rendering file contents in real time.

Benefits of technology

Real-time online preview of multi-format files is realized, which improves user experience, simplifies file access, reduces the demand for device resources, and optimizes the use of storage space and bandwidth resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513049A_ABST
    Figure CN119513049A_ABST
Patent Text Reader

Abstract

The invention discloses a file previewing system and method for realizing real-time online previewing of multi-format files, belongs to the technical field of file processing, and aims to solve the technical problem of how to realize online previewing of files on the basis of ensuring file security and user experience. Comprising an application system interface used for receiving a file preview request and forwarding the file preview request to a file stream processor; the file stream processor is used for reading a file stream of a specified file from the server based on the file preview request and sending the file stream to the format identification module; the format identification module is used for carrying out format identification on the file stream read from the server and sending the file stream and the file stream format to the conversion module; the conversion module is used for calling the corresponding parser and renderer to convert the file stream into a file stream in a renderable format based on the file stream format; and the rendering engine is used for rendering the file stream in the renderable format in real time and returning the file preview content to the service system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of file processing, in particular to a file preview system and method for realizing real-time online preview of multi-format files. Background Art

[0002] In the traditional file processing process, users often need to download files to their local devices before viewing them through specific applications. This process is not only time-consuming, but may also cause unnecessary burden on the user's device storage space. With the continuous advancement of cloud computing technology and the rapid development of Web technology, people's demand for instant online preview of files is becoming more and more urgent. Especially today, with the increasing popularity of mobile office and cloud services, users hope to be able to access and view file content anytime, anywhere, conveniently and quickly, without worrying about device resource limitations or time consumption of file transfer.

[0003] The ability to preview files online has many advantages. First, it eliminates the need to download files and install specific applications, making it easier for users to access and view files. Second, since files are stored in the cloud, users can access files on any device, regardless of device resources. In addition, previewing files online can also improve data security, as files no longer need to be transferred between multiple devices, reducing the risk of data leakage.

[0004] With the continuous development of cloud computing and Web technologies, people's demand for instant online preview of files is becoming stronger and stronger. The function of online preview of files provides users with a more convenient and efficient way to process files, saving time and storage space. However, ensuring the security of files and optimizing user experience remains an important challenge.

[0005] How to achieve online preview of files while ensuring file security and user experience is a technical problem that needs to be solved. Summary of the invention

[0006] The technical task of the present invention is to address the above shortcomings and provide a file preview system and method for realizing real-time online preview of multi-format files, so as to solve the technical problem of how to realize online preview of files while ensuring file security and user experience.

[0007] In a first aspect, the present invention provides a file preview system for realizing real-time online preview of multi-format files, wherein the file preview system is integrated into each business system, and comprises an application system interface, a file stream processor, a format recognition module, a conversion module and a rendering engine;

[0008] The application system interface is used to receive a file preview request triggered by a user through a business system, and forward the file preview request to a file stream processor;

[0009] The file stream processor is used to read the file stream of the specified file from the server based on the file preview request, and send the file stream to the format recognition module;

[0010] The format recognition module is used to perform format recognition on the file stream read from the server, obtain the file stream format, and send the file stream and the file stream format to the conversion module;

[0011] The conversion module is used to call the corresponding parser and renderer based on the file stream format to convert the file stream into a file stream in a renderable format;

[0012] The rendering engine is used to render the file stream in a renderable format in real time, form file preview content, and return the file preview content to the business system. Correspondingly, the business system is used to jump to the preview page based on the file preview request and display the received file preview content through the preview page.

[0013] Preferably, the file stream processor is used to read the binary data stream corresponding to the file specified in the file preview request from the server through AJAX technology as the file stream.

[0014] Preferably, the format identification module is used to identify the file stream format through file header information or file signature.

[0015] Preferably, for a file uploaded by a user, the file is configured with a unique file identifier docid, the file is stored in a server, and a user file association table is constructed in the business system, the user file association table is used to record the corresponding relationship between the user and the file based on the user unique identifier uid and the file unique identifier docid;

[0016] For a file preview request triggered by a user through a business system, the file preview request includes a URL for redirecting to a preview page, and the URL carries a unique file identifier docid of the file to be previewed;

[0017] The file stream processor is used to read the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid.

[0018] Preferably, the file stream processor is used to parse the file preview request, obtain the parsing result including the user uid and the file unique identifier uid, and send the user uid and the file unique identifier uid to the business system for a user authority verification request;

[0019] Correspondingly, after receiving the user permission verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user permission verification request, and determines whether the file corresponding to the file unique identifier ui in the user permission verification request belongs to the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor. If not, the unauthorized information is returned to the user through the business system.

[0020] Correspondingly, after receiving the authorization information, the data stream processor is used to read the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

[0021] In a second aspect, the present invention provides a file preview method for implementing real-time online preview of files in multiple formats, wherein real-time online preview of files in multiple formats of a business system is implemented by using a file preview system for implementing real-time online preview of files in multiple formats as described in any one of the first aspects, and the method comprises the following steps:

[0022] Receive a file preview request triggered by a user through a business system through an application system interface, and forward the file preview request to a file stream processor;

[0023] Based on the file preview request, the file stream of the specified file is read from the server through the file stream processor, and the file stream is sent to the format recognition module;

[0024] The format recognition module recognizes the file stream read from the server to obtain the file stream format, and sends the file stream and the file stream format to the conversion module;

[0025] Based on the file stream format, the conversion module calls the corresponding parser and renderer to convert the file stream into a file stream in a renderable format;

[0026] The rendering engine performs real-time rendering of the file stream in a renderable format to form file preview content, and returns the file preview content to the business system. Correspondingly, the business system jumps to the preview page based on the file preview request and displays the received file preview content through the preview page.

[0027] Preferably, the file stream processor reads the binary data stream corresponding to the file specified in the file preview request from the server through AJAX technology as the file stream.

[0028] Preferably, the format identification module identifies the file stream format through file header information or file signature.

[0029] Preferably, for a file uploaded by a user, the file is configured with a unique file identifier docid, the file is stored in a server, and a user file association table is constructed in the business system, the user file association table is used to record the corresponding relationship between the user and the file based on the user unique identifier uid and the file unique identifier docid;

[0030] For a file preview request triggered by a user through a business system, the file preview request includes a URL for redirecting to a preview page, and the URL carries a unique file identifier docid of the file to be previewed;

[0031] The file stream processor reads the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid.

[0032] Preferably, the file stream processor parses the file preview request, obtains a parsing result including the user uid and the file unique identifier uid, and sends the user uid and the file unique identifier uid to the business system for a user authority verification request;

[0033] Correspondingly, after receiving the user permission verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user permission verification request, and determines whether the file corresponding to the file unique identifier ui in the user permission verification request belongs to the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor. If not, the unauthorized information is returned to the user through the business system.

[0034] Correspondingly, after receiving the authorization information, the data stream processor reads the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

[0035] The file preview system and method for realizing real-time online preview of multi-format files of the present invention have the following advantages:

[0036] 1. It can quickly and accurately identify the content of files and realize instant conversion, so that users can preview the file information immediately. The quick preview function greatly enhances the user experience, allowing users to understand the content more intuitively when processing files, and improves the convenience and satisfaction of work;

[0037] 2. The file preview system is versatile and extensible, making it easy to integrate into various application systems, whether existing or future business systems. This flexibility ensures that the preview system can meet various business needs and adapt to the ever-changing market and technical environment. Through simple configuration and adjustment, the services provided by the system can be seamlessly integrated into various business processes, bringing sustainable benefits and competitive advantages to enterprises.

[0038] 3. The system enables real-time online preview of business system files, significantly reducing the complexity of user operations and making the workflow smoother and more efficient. While reducing the number of operating steps, it also greatly improves work efficiency, allowing users to complete more tasks in a shorter time. It also optimizes the use of storage space and bandwidth resources, and reduces the demand for hardware resources through efficient data compression and transmission technology, thereby reducing costs and improving system operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] The present invention is further described below in conjunction with the accompanying drawings.

[0041] Figure 1 This is a flowchart of the workflow of a file preview system for implementing real-time online preview of multi-format files in Example 1. DETAILED DESCRIPTION

[0042] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.

[0043] The embodiments of the present invention provide a file preview system and method for realizing real-time online preview of multi-format files, which are used to solve the technical problem of how to realize online preview of files while ensuring file security and user experience.

[0044] Embodiment 1:

[0045] The present invention discloses a file preview system for realizing real-time online preview of multi-format files. The file preview system is integrated in various business systems and comprises an application system interface, a file stream processor, a format recognition module, a conversion module and a rendering engine.

[0046] The application system interface is used to receive a file preview request triggered by a user through the business system, and forward the file preview request to the file stream processor.

[0047] In this embodiment, there are one or more application system interfaces, which are used to connect with the business system. After receiving a file preview request, the file preview process is triggered, and the file preview content generated by the file preview system is returned to the business system for online preview.

[0048] In this embodiment, for files uploaded by users, the files are configured with a unique file identifier docid, the files are stored in the server, and a user file association table is constructed in the business system, and the user file association table is used to record the corresponding relationship between users and files based on the user unique identifier uid and the file unique identifier docid. For a file preview request triggered by a user through the business system, the file preview request includes a URL for realizing a preview page jump, and the URL carries the unique file identifier docid of the file to be previewed.

[0049] The file stream processor is used to read the file stream of the specified file from the server based on the file preview request, and send the file stream to the format recognition module.

[0050] As a specific implementation, the file stream processor is used to read the binary data stream corresponding to the file specified in the file preview request from the server through the AJAX technology as the file stream. When the user selects a file for preview through the user interface provided by the business system, the file preview request is triggered. The file preview request is transmitted to the file stream processor through the application system interface. The file stream processor obtains the binary data stream of the file from the server through AJAX or other modern front-end technologies.

[0051] In this embodiment, the file stream processor is used to read the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid, as follows:

[0052] (1) Parse the file preview request, obtain the parsing result including the user uid and the file unique identifier uid, and send the user uid and the file unique identifier uid to the business system for a user authority verification request;

[0053] (2) After receiving the user authority verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user authority verification request, and determines whether the file corresponding to the file unique identifier ui in the user authority verification request is uploaded by the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor; if not, the unauthorized information is returned to the user through the business system;

[0054] (3) After receiving the authorization information, the data stream processor is used to read the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

[0055] The format recognition module is used to perform format recognition on the file stream read from the server, obtain the file stream format, and send the file stream and the file stream format to the conversion module.

[0056] As a specific implementation, the format recognition module is used to identify the file stream format through the file header information or file signature. In the specific implementation process, the format recognition module automatically analyzes the received file header information, including searching for a specific file signature or identifier, so as to accurately determine the type and format of the file. This operation is the basis for subsequent processing.

[0057] The conversion module is used to call the corresponding parser and renderer based on the file stream format to convert the file stream into a file stream in a renderable format.

[0058] As a specific implementation, the conversion module adopts different strategies to convert the file stream into content that can be rendered by the browser according to the identified file format.

[0059] The file formats include PDF, Word, Excel, pictures, TXT and other formats. The conversion module is configured with parsers and renderers corresponding to each format. The parsers and renderers corresponding to each format cooperate to convert the file stream format.

[0060] PDF format recognition and conversion: When processing PDF files, the conversion module uses advanced technical means such as PDF.js and other libraries to deeply analyze the file stream. This process involves not only the recognition of the file structure, but also the precise extraction of the graphics and text content contained therein. In this way, the conversion module is able to convert PDF documents that can only be viewed in a specific reader into a form that can be directly displayed on the web page. Specifically, the converted content is fully compatible with the rendering mechanism of HTML5 Canvas, which means that users can smoothly browse all the contents of the PDF document in a browser that supports HTML5 without any additional plug-ins or software. This conversion not only retains the layout and formatting of the original document, but also ensures the searchability of the text and the clarity of the graphics, greatly improving the user's reading experience.

[0061] Word format recognition and conversion: For Word documents (.docx), the conversion module uses tools such as Mammoth.js to convert document content into HTML format, preserving the layout and style of the original document for easy online reading and editing. This process involves in-depth analysis of the Word document to ensure that every element can be accurately converted into HTML. In this way, users can view and edit documents directly in the browser without installing any additional software, greatly improving work efficiency and convenience.

[0062] When processing Excel (.xlsx) files, the conversion module integrates advanced libraries such as SheetJS for in-depth analysis. This process involves not only identifying the Excel file structure, but also accurately reading the data contained in it. In this way, the system can completely extract complex table data in Excel.

[0063] After the data extraction is completed, the conversion module further converts the data into HTML table format. This conversion makes the data display more intuitive, and users can view the table content directly on the web page without downloading or using special software to open Excel files. In addition, the data converted into HTML tables is easier to operate, and users can easily perform operations such as sorting and filtering, which greatly improves the efficiency and convenience of data processing.

[0064] The conversion module has efficient image format recognition and display functions, and can directly parse various image file streams. This process avoids tedious intermediate conversion steps and ensures fast loading and clear display of images on the page. Whether it is common JPEG, PNG format, or professional RAW, TIFF format, the system can quickly identify and accurately present it, greatly improving the user experience.

[0065] The TXT format recognition and display function, the conversion module can quickly present the information in the file directly on the web page by accurately parsing the text content, without the need for a complicated conversion process. This processing method not only ensures the originality of the information, but also greatly improves the convenience of the reading experience. When browsing these texts, users can enjoy a lightweight and efficient reading method, whether they are looking up information or reading articles, they can get a satisfactory experience.

[0066] The rendering engine is used to render the file stream in a renderable format in real time, form file preview content, and return the file preview content to the business system. Correspondingly, the business system is used to jump to the preview page based on the file preview request and display the received file preview content through the preview page.

[0067] The working process of the system in this embodiment is as follows Figure 1 As shown in the figure, the file preview system improves the user experience, work efficiency and convenience of data sharing. The specific system is as follows:

[0068] (1) The file preview system has the following features: Users only need to click the preview button on the interface, which will trigger the jump mechanism within the system. Without any additional waiting or confirmation steps, the system will quickly respond to the user's instructions. This is followed by a smooth transition of the interface, and the user will be seamlessly brought to a new file preview interface. In this interface, users can view the content, format, and structure of the file in detail, ensuring that they can fully grasp the required information before taking further actions. This intuitive and efficient design not only saves users' time, but also greatly improves work efficiency.

[0069] (2) Enhanced interactive functions of the file preview system: To improve the user experience, the system has added a variety of interactive functions to the preview interface. Users can zoom in and out on the document.

[0070] (3) The file preview system provides security protection: Considering the security and privacy protection of files, the system implements strict security measures. All file transfers use encryption protocols to ensure that data is not intercepted or tampered with during the transmission process. At the same time, the system strictly controls user access rights, and only authorized users can access specific file contents.

[0071] (4) The file preview system provides performance optimization: The system has carried out in-depth performance optimization for the processing of large and complex files. By adopting block loading technology, the system can achieve fast preview of large files, avoiding the long waiting time caused by loading the entire file at one time. In addition, for dynamically generated content, the system adopts a caching mechanism to reduce the time of repeated calculation and rendering, and improve the response speed.

[0072] Embodiment 2:

[0073] The present invention provides a file preview method for realizing real-time online preview of files in multiple formats. The system disclosed in Example 1 realizes real-time online preview of files in multiple formats of a business system. The method includes five steps: request docking, file stream processing, format identification, format conversion and file rendering.

[0074] Step S100: Request for docking: receiving a file preview request triggered by a user through a business system through an application system interface, and forwarding the file preview request to a file stream processor.

[0075] In this embodiment, there are one or more application system interfaces, which are used to connect with the business system. After receiving a file preview request, the file preview process is triggered, and the file preview content generated by the file preview system is returned to the business system for online preview.

[0076] In this embodiment, for files uploaded by users, the files are configured with a unique file identifier docid, the files are stored in the server, and a user file association table is constructed in the business system, and the user file association table is used to record the corresponding relationship between users and files based on the user unique identifier uid and the file unique identifier docid. For a file preview request triggered by a user through the business system, the file preview request includes a URL for realizing a preview page jump, and the URL carries the unique file identifier docid of the file to be previewed.

[0077] Step S200: File stream processing: Based on the file preview request, the file stream of the specified file is read from the server through the file stream processor, and the file stream is sent to the format recognition module.

[0078] As a specific implementation, the file stream processor reads the binary data stream corresponding to the file specified in the file preview request from the server through AJAX technology as the file stream. When the user selects a file for preview through the user interface provided by the business system, the file preview request is triggered, and the file preview request is transmitted to the file stream processor through the application system interface. The file stream processor obtains the binary data stream of the file from the server through AJAX or other modern front-end technologies.

[0079] In this embodiment, the file stream processor reads the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid. The specific operation is as follows:

[0080] (1) Parse the file preview request, obtain the parsing result including the user uid and the file unique identifier uid, and send the user uid and the file unique identifier uid to the business system for a user authority verification request;

[0081] (2) After receiving the user authority verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user authority verification request, and determines whether the file corresponding to the file unique identifier ui in the user authority verification request is uploaded by the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor; if not, the unauthorized information is returned to the user through the business system;

[0082] (3) After receiving the authorization information, the data stream processor is used to read the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

[0083] Step S300 Format identification: The format identification module performs format identification on the file stream read from the server to obtain the file stream format, and sends the file stream and the file stream format to the conversion module.

[0084] As a specific implementation, the file stream format is identified through file header information or file signature. In the specific implementation process, the received file header information is automatically analyzed, including searching for specific file signatures or identifiers, so as to accurately determine the type and format of the file. This step is the basis for subsequent processing.

[0085] Step S400 Format conversion: Based on the file stream format, the conversion module calls the corresponding parser and renderer to convert the file stream into a file stream in a renderable format.

[0086] As a specific implementation, step S400 adopts different strategies to convert the file stream into content that can be rendered by the browser according to the identified file format.

[0087] The file formats include PDF, Word, Excel, pictures, TXT and other formats. The conversion module is configured with parsers and renderers corresponding to each format. The parsers and renderers corresponding to each format cooperate to convert the file stream format.

[0088] PDF format recognition and conversion: When processing PDF files, the conversion module uses advanced technical means such as PDF.js and other libraries to deeply analyze the file stream. This process involves not only the recognition of the file structure, but also the precise extraction of the graphics and text content contained therein. In this way, the conversion module is able to convert PDF documents that can only be viewed in a specific reader into a form that can be directly displayed on the web page. Specifically, the converted content is fully compatible with the rendering mechanism of HTML5 Canvas, which means that users can smoothly browse all the contents of the PDF document in a browser that supports HTML5 without any additional plug-ins or software. This conversion not only retains the layout and formatting of the original document, but also ensures the searchability of the text and the clarity of the graphics, greatly improving the user's reading experience.

[0089] Word format recognition and conversion: For Word documents (.docx), the conversion module uses tools such as Mammoth.js to convert document content into HTML format, preserving the layout and style of the original document for easy online reading and editing. This process involves in-depth analysis of the Word document to ensure that every element can be accurately converted into HTML. In this way, users can view and edit documents directly in the browser without installing any additional software, greatly improving work efficiency and convenience.

[0090] When processing Excel (.xlsx) files, the conversion module integrates advanced libraries such as SheetJS for in-depth analysis. This process involves not only identifying the Excel file structure, but also accurately reading the data contained in it. In this way, the system can completely extract complex table data in Excel.

[0091] After the data extraction is completed, the conversion module further converts the data into HTML table format. This conversion makes the data display more intuitive, and users can view the table content directly on the web page without downloading or using special software to open Excel files. In addition, the data converted into HTML tables is easier to operate, and users can easily perform operations such as sorting and filtering, which greatly improves the efficiency and convenience of data processing.

[0092] The format conversion in this step has efficient image format recognition and display functions, and can directly parse various image file streams. This process avoids tedious intermediate conversion steps and ensures fast loading and clear display of images on the page. Whether it is common JPEG, PNG format, or professional RAW, TIFF format, the system can quickly identify and accurately present it, greatly improving the user experience.

[0093] The TXT format recognition and display function, the conversion module can quickly present the information in the file directly on the web page by accurately parsing the text content, without the need for a complicated conversion process. This processing method not only ensures the originality of the information, but also greatly improves the convenience of the reading experience. When browsing these texts, users can enjoy a lightweight and efficient reading method, whether they are looking up information or reading articles, they can get a satisfactory experience.

[0094] Step S500 file rendering: The rendering engine performs real-time rendering of the file stream in a renderable format to form a file preview content, and returns the file preview content to the business system. Correspondingly, the business system jumps to the preview page based on the file preview request and displays the received file preview content through the preview page.

[0095] The method of this embodiment improves user experience, and also increases work efficiency and convenience of data sharing.

[0096] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A file preview system for realizing real-time online preview of multi-format files, characterized in that: The file preview system is integrated into each business system, including an application system interface, a file stream processor, a format recognition module, a conversion module and a rendering engine; The application system interface is used to receive a file preview request triggered by a user through a business system, and forward the file preview request to a file stream processor; The file stream processor is used to read the file stream of the specified file from the server based on the file preview request, and send the file stream to the format recognition module; The format recognition module is used to perform format recognition on the file stream read from the server, obtain the file stream format, and send the file stream and the file stream format to the conversion module; The conversion module is used to call the corresponding parser and renderer based on the file stream format to convert the file stream into a file stream in a renderable format; The rendering engine is used to render the file stream in a renderable format in real time, form file preview content, and return the file preview content to the business system. Correspondingly, the business system is used to jump to the preview page based on the file preview request and display the received file preview content through the preview page.

2. The file preview system for realizing real-time online preview of multi-format files according to claim 1, characterized in that: The file stream processor is used to read the binary data stream corresponding to the file specified in the file preview request from the server through the AJAX technology as the file stream.

3. The file preview system for realizing real-time online preview of multi-format files according to claim 1, characterized in that: The format identification module is used to identify the file stream format through file header information or file signature.

4. The file preview system for realizing real-time online preview of multi-format files according to any one of claims 1 to 3, characterized in that: For files uploaded by users, the files are configured with a unique file identifier docid, the files are stored in the server, and a user file association table is constructed in the business system, the user file association table is used to record the correspondence between users and files based on the user unique identifier uid and the file unique identifier docid; For a file preview request triggered by a user through a business system, the file preview request includes a URL for redirecting to a preview page, and the URL carries a unique file identifier docid of the file to be previewed; The file stream processor is used to read the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid.

5. The file preview system for realizing real-time online preview of multi-format files according to claim 4, characterized in that: The file stream processor is used to parse the file preview request, obtain the parsing result including the user uid and the file unique identifier uid, and send the user uid and the file unique identifier uid to the business system for a user authority verification request; Correspondingly, after receiving the user permission verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user permission verification request, and determines whether the file corresponding to the file unique identifier ui in the user permission verification request belongs to the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor. If not, the unauthorized information is returned to the user through the business system. Correspondingly, after receiving the authorization information, the data stream processor is used to read the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

6. A file preview method for realizing real-time online preview of multi-format files, characterized in that: The real-time online preview of files in multiple formats of a business system is realized by a file preview system for realizing real-time online preview of files in multiple formats as claimed in any one of claims 1 to 5, and the method comprises the following steps: Receive a file preview request triggered by a user through a business system through an application system interface, and forward the file preview request to a file stream processor; Based on the file preview request, the file stream of the specified file is read from the server through the file stream processor, and the file stream is sent to the format recognition module; The format recognition module recognizes the file stream read from the server to obtain the file stream format, and sends the file stream and the file stream format to the conversion module; Based on the file stream format, the conversion module calls the corresponding parser and renderer to convert the file stream into a file stream in a renderable format; The rendering engine performs real-time rendering of the file stream in a renderable format to form file preview content, and returns the file preview content to the business system. Correspondingly, the business system jumps to the preview page based on the file preview request and displays the received file preview content through the preview page.

7. The file preview method for realizing real-time online preview of multi-format files according to claim 6, characterized in that: The file stream processor reads the binary data stream corresponding to the file specified in the file preview request from the server through the AJAX technology as the file stream.

8. The file preview method for realizing real-time online preview of multi-format files according to claim 6, characterized in that: The format identification module identifies the file stream format through file header information or file signature.

9. The file preview method for realizing real-time online preview of multi-format files according to any one of claims 6 to 8, characterized in that: For files uploaded by users, the files are configured with a unique file identifier docid, the files are stored in the server, and a user file association table is constructed in the business system, the user file association table is used to record the correspondence between users and files based on the user unique identifier uid and the file unique identifier docid; For a file preview request triggered by a user through a business system, the file preview request includes a URL for redirecting to a preview page, and the URL carries a unique file identifier docid of the file to be previewed; The file stream processor reads the file stream corresponding to the file specified in the file preview request from the server based on the file unique identifier docid.

10. The file preview method for realizing real-time online preview of multi-format files according to claim 9, characterized in that: The file stream processor parses the file preview request, obtains the parsing result including the user uid and the file unique identifier uid, and sends the user uid and the file unique identifier uid to the business system for a user authority verification request; Correspondingly, after receiving the user permission verification request, the business system verifies through the user file association table based on the user uid and the file unique identifier uid specified in the user permission verification request, and determines whether the file corresponding to the file unique identifier ui in the user permission verification request belongs to the user corresponding to the user uid. If yes, the authorization information is returned to the data stream processor. If not, the unauthorized information is returned to the user through the business system. Correspondingly, after receiving the authorization information, the data stream processor reads the corresponding file stream from the server based on the file unique identifier uid specified in the file preview request.

Citation Information

Patent Citations

  • Shared document display method and device, equipment and computer readable storage medium

    CN112861472A

  • Online file previewing method and device and computer equipment

    CN115686663A

  • Front-end multi-format file online preview method based on vue3.0

    CN118364193A

  • Active preview of hyperlink content in browser supported file-format

    US8578261B1

Cited By

  • Method and device for previewing open format document, electronic equipment and storage medium

    CN121092804A

  • Method, device, electronic equipment and storage medium for open format document preview

    CN121092804B