Methods, apparatus, computer equipment, media and products for previewing presentation files

CN122570751APending Publication Date: 2026-08-14GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2026-08-14

AI Technical Summary

Benefits of technology

[0040]本申请提供了一种演示文稿文件的预览方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,其中演示文稿文件的预览方法包括:响应于针对网页中的任一演示文稿文件的触发操作,将该演示文稿文件确定待预览的目标文件,并确定关联于网页的操作系统的软件安装情况,以确定针对目标文件的解析方式;在软件安装情况表征当前操作系统中已安装演示软件的情况下,调用本地的演示软件对目标文件进行解析,得到能够在网页上展示的目标图片集,无需将目标文件通过无线通信上传至文件存储服务器后才进一步通过无线通信调用第三方的解析服务器所提供的解析服务进行解析操作,直接调用本地解析服务向本地的演示软件发起针对目标文件的解析任务,以对目标文件进行解析,缩短了目标文件的解析流程,其中,解析任务用于指示所述本地解析服务,基于预设的脚本代码调用所述演示软件对所述目标文件进行解析;其中,演示软件的功能包括展示演示文稿文件;或者,在软件安装情况表征未安装演示软件的情况下,调用解析服务器对目标文件进行解析,得到目标图片集,从而考虑了更全面的目标文件的解析方式,增加了对目标文件进行解析的灵活性;得到目标图片集后,在网页中展示目标图片集中的图片,以实现目标文件的内容预览功能;可见,在当前操作系统中已安装演示软件的情况下,缩短了从选中目标文件到预览目标文件内容的流程,从而提高了演示文稿文件的预览效率;且还提供了在当前操作系统中未安装演示软件的情况下,对于演示文稿文件的预览方法,增加了对目标文件进行解析的灵活性,也能够保障在多种情况下实现对于目标文件的解析预览。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570751A_ABST
    Figure CN122570751A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, medium, and product for previewing presentation files, and pertains to the field of file processing technology. The method includes: in response to a trigger operation on any presentation file on a webpage, determining the target file to be previewed and determining the software installation status of the operating system associated with the webpage; if the software installation status indicates that presentation software is installed, invoking a local parsing service to initiate a parsing task for the target file to the presentation software, obtaining a target image set; the parsing task instructs the local parsing service to invoke the presentation software to parse the target file based on preset script code; the presentation software's function includes displaying the presentation file; or, if the software installation status indicates that presentation software is not installed, invoking a parsing server to parse the target file, obtaining a target image set; and displaying the target image set on the webpage. This method can improve the efficiency of presentation preview.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document processing technology, and in particular to a method, apparatus, computer device, medium, and product for previewing presentation files. Background Technology

[0002] Presentation software is widely used for meeting presentations, sales proposals, and project promotions, and is the most common content presentation tool in business, management, academia, and education. Currently, domestic users typically use Microsoft PowerPoint or WPS Office to process presentation files with the .ppt or .pptx extension (hereinafter referred to as "PPT"). With the rapid development of cloud storage and file sharing technologies, more and more people are storing files on online cloud drives or sharing them with others, and PPTs account for a large proportion of these shared files. Users have a need to directly preview PPT content on web pages. Summary of the Invention

[0003] Therefore, it is necessary to provide a preview method, apparatus, computer device, computer-readable storage medium, and computer program product for presentation files that can improve preview efficiency in response to the above-mentioned technical problems.

[0004] Firstly, this application provides a method for previewing presentation files, including:

[0005] In response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined.

[0006] If the software installation status indicates that the demo software is installed, a local parsing service is invoked to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or,

[0007] If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set;

[0008] The target image set is displayed on the webpage.

[0009] In one embodiment, the step of invoking the local parsing service to initiate a parsing task for the target file to the demonstration software includes:

[0010] The local parsing service is invoked to execute the preset script code to create an application instance for the target file, and the demo software is launched to trigger the demo software to execute a parsing task for the target file based on the application instance.

[0011] In one embodiment, the presentation file preview method described above further includes:

[0012] If the demonstration software fails to start, or if the demonstration software fails to perform the parsing task for the target file, the parsing server is invoked to parse the target file and obtain the target image set.

[0013] In one embodiment, the application instance is used to instruct the demonstration software to open the target file, traverse the target file, and export the target file as a target image in a preset format.

[0014] In one embodiment, the step of calling the parsing server to parse the target file to obtain the target image set includes:

[0015] Upload the target file to the file storage server and receive the resource identifier returned by the file storage server;

[0016] Based on the resource identifier, a parsing task for the target file is initiated to the parsing server; the parsing server is used to obtain the target file from the file storage server and parse the target file into a target image set.

[0017] Receive the target image set returned by the parsing server.

[0018] In one embodiment, when the software installation status indicates that the demonstration software is not installed, calling the parsing server to parse the target file includes:

[0019] In the case where the demo software is not installed as indicated by the software installation status, the target file is uploaded to the file storage server, and the parsing server is invoked to parse the target file stored on the file storage server.

[0020] Secondly, this application also provides a preview device for presentation files, including:

[0021] The preview confirmation module is used to respond to a trigger operation on any presentation file in the webpage, determine the target file to be previewed, and determine the software installation status of the operating system associated with the webpage.

[0022] The file parsing module, when the software installation status indicates that the demo software is installed, invokes a local parsing service to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or...

[0023] If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set;

[0024] The file preview module is used to display the target image set on the webpage.

[0025] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0026] In response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined.

[0027] If the software installation status indicates that the demo software is installed, a local parsing service is invoked to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or,

[0028] If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set;

[0029] The target image set is displayed on the webpage.

[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0031] In response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined.

[0032] If the software installation status indicates that the demo software is installed, a local parsing service is invoked to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or,

[0033] If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set;

[0034] The target image set is displayed on the webpage.

[0035] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0036] In response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined.

[0037] If the software installation status indicates that the demo software is installed, a local parsing service is invoked to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or,

[0038] If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set;

[0039] The target image set is displayed on the webpage.

[0040] This application provides a method, apparatus, computer device, computer-readable storage medium, and computer program product for previewing presentation files. The method includes: in response to a trigger operation on any presentation file on a webpage, determining the presentation file to be previewed as a target file, and determining the software installation status of the operating system associated with the webpage to determine the parsing method for the target file; if the software installation status indicates that presentation software is installed on the current operating system, calling the local presentation software to parse the target file to obtain a set of target images that can be displayed on the webpage. This eliminates the need to wirelessly upload the target file to a file storage server before further calling a third-party parsing server for parsing; instead, it directly calls the local parsing service to initiate a parsing task for the target file to the local presentation software, shortening the parsing process. The parsing task is used for... The system instructs the local parsing service to call the presentation software to parse the target file based on a preset script. The presentation software's functions include displaying presentation files. Alternatively, if the presentation software is not installed, the system calls the parsing server to parse the target file, obtaining a target image set. This approach considers a more comprehensive approach to target file parsing, increasing flexibility. After obtaining the target image set, the images in the set are displayed on a webpage to preview the target file's content. Therefore, when the presentation software is installed on the current operating system, the process from selecting the target file to previewing its content is shortened, improving the efficiency of previewing presentation files. Furthermore, it provides a preview method for presentation files even when the presentation software is not installed on the current operating system, increasing the flexibility of target file parsing and ensuring that target file parsing and previewing are possible in various situations. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a diagram illustrating the application environment of a presentation file preview method in one embodiment.

[0043] Figure 2 This is a flowchart illustrating the target file parsing steps in one embodiment;

[0044] Figure 3This is a schematic diagram illustrating the process of calling a parsing server to parse a target file in one embodiment;

[0045] Figure 4 This is a flowchart illustrating a method for previewing presentation files in another embodiment;

[0046] Figure 5 This is a schematic diagram illustrating the process of calling a local parsing service to parse a file in one embodiment;

[0047] Figure 6 This is a structural block diagram of a presentation file preview device in one embodiment;

[0048] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0050] As described in the background section, there is a need for previewing presentation files in related technologies. The inventors have discovered that this arises because presentation software is widely used in conference presentations, sales proposals, and project promotions, making it the most common content presentation tool in business, management, academia, and education. Currently, many users use Microsoft PowerPoint or Kingsoft WPS Office to process presentations with extensions ".ppt" or ".pptx" (hereinafter referred to as "PPT"). With the rapid development of cloud storage and file sharing technologies, more and more people are choosing to store files in the cloud or share them with others, and PPTs account for a large proportion of these shared files. Therefore, the demand for users to be able to directly preview PPT content on web pages is constantly increasing.

[0051] For the reasons mentioned above, this application provides a method for previewing presentation files, which aims to enable the previewing of presentation files.

[0052] The presentation file preview method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with parsing server 104 via a network. A data storage system can store the data that parsing server 104 needs to process. The data storage system can be integrated onto parsing server 104, or it can be located on a cloud or other network server. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. Parsing server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Based on the user's trigger operation on the webpage, terminal 102 determines the target file to be previewed and determines the software installation status of the operating system corresponding to terminal 102 to determine the parsing method for the target file. If the software installation status indicates that demo software is installed, terminal 102 calls the demo software to parse the target file and obtain the target image set; or, if the software installation status indicates that demo software is not installed, terminal 102 calls parsing server 104 to parse the target file and obtain the target image set, which terminal 102 then displays on the webpage.

[0053] In one exemplary embodiment, such as Figure 2 As shown, a method for previewing presentation files is provided, which can be applied to... Figure 2 Taking terminal 102 as an example, the explanation includes the following steps S202 to S206. Wherein:

[0054] In step S202, in response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined.

[0055] A presentation is a file used to display information, with the extension ".ppt" or ".pptx". The file usually contains text, graphics and videos, and is often used as a content presentation tool in academic conferences, business reports and other occasions. In addition, presentations can be created using presentation software.

[0056] A webpage can be an information resource unit on the Web (World Wide Web), typically written in HTML (HyperText Markup Language), and can be accessed through a web browser. A webpage can contain text, images, videos, and links to other webpages.

[0057] An operating system is software that runs on a computer. It is responsible for managing the computer's hardware and software resources and providing an interface for interaction between the user and the computer. Common operating systems include Windows, macOS, and Linux.

[0058] Software installation status typically refers to the specific status of software already installed on a computer, including information such as the software type, version, installation path, and whether it is running normally.

[0059] Optionally, when a user triggers a presentation file on a webpage through a mouse click or touch action in a webpage client deployed on a terminal, the system responds to the trigger operation on any presentation file on the webpage, determines the selected presentation file as the target file to be previewed based on the trigger operation, and simultaneously confirms the software installation status of the webpage client's operating system, thereby determining the parsing method for the target file based on the software installation status.

[0060] Step S204: If the software installation status indicates that the demo software is installed, call the local parsing service to initiate a parsing task for the target file to the demo software to obtain the target image set; or, if the software installation status indicates that the demo software is not installed, call the parsing server to parse the target file to obtain the target image set.

[0061] The local parsing service can be a service running on the user's local computer, used to handle data or file parsing tasks without relying on a remote server. It should be noted that the local parsing service in this embodiment can run in Node.js. Node.js is a JavaScript runtime environment that can directly execute JavaScript code, allowing developers to use JavaScript to write command-line tools and server-side applications. This means that JavaScript, originally mainly used within web browsers, can operate independently of the browser and perform various tasks on the server side, such as file reading and network communication. JavaScript is a widely used scripting language for client-side web development. It is an interpreted programming language that can not only manipulate the Document Object Model (DOM) but also interact with the browser through the Browser Object Model (BOM), thereby achieving dynamic webpage effects.

[0062] The parsing task is used to instruct the local parsing service to call the presentation software to parse the target file based on the preset script code. The parsing task can refer to the work of processing and analyzing specific data or files, which usually involves converting complex formats into usable structured data. In this embodiment, it specifically refers to parsing the presentation file into an image file.

[0063] Presentation software can be a specialized application for creating and displaying presentations, such as Microsoft PowerPoint, Apple Keynote, WPS, and Google Slides. Different operating systems are compatible with different presentation software. The functions of presentation software include displaying presentation files.

[0064] The parsing server can be a server specifically designed to process presentation files, responsible for parsing uploaded presentation files into a format that can be displayed on a webpage, or for extracting content from presentation files.

[0065] Optionally, if the terminal determines that presentation software for creating and displaying presentation files is installed on the operating system, it can directly invoke a local parsing service to initiate a parsing task for the target file to the presentation software. This allows the presentation software to parse the target file, convert it into image format, and obtain a set of target images that can be displayed on a webpage. The target image set includes multiple target images; for example, one target image can display the content of one presentation, or multiple presentation-related content can be displayed on one target image. If the terminal determines that no presentation software is installed on the operating system, it uploads the target file to a cloud server or remote server for file storage and invokes a third-party parsing server. This parsing server can provide parsing services for the target file, thereby obtaining a set of target images that can be displayed on a webpage.

[0066] Step S206: Display the target image set on the webpage.

[0067] Optionally, the terminal displays the target photos in the target image set in a certain order or arrangement on the webpage. The display format can be the slide presentation order of a presentation file or other orders, and this application does not make any specific limitations on this.

[0068] In summary, there are two ways to preview target files. First, if the demo software is not installed locally on the terminal, the terminal needs to first upload the target file to a cloud-based file storage server via wireless communication. Then, it needs to initiate a parsing task to a third-party parsing server via wireless communication. The third-party parsing server reads the target file from the file storage server, parses it, and returns the target image set to the terminal. Second, if the demo software is installed locally on the terminal, upon receiving a trigger operation for the target file, the terminal instructs the local parsing service to call the local demo software based on preset script code to parse the target file and obtain the target image set. The entire parsing process is completed locally, without uploading the target file to a file storage server or relying on the quality of communication with a third-party parsing service or wireless communication. This shortens the parsing process and improves file preview efficiency.

[0069] In the above-described method for previewing presentation files, in response to a trigger operation on any presentation file on a webpage, the presentation file to be previewed is identified as the target file, and the software installation status of the operating system associated with the webpage is determined to determine the parsing method for the target file. If the software installation status indicates that presentation software is already installed on the current operating system, the local presentation software is invoked to parse the target file, obtaining a set of target images that can be displayed on the webpage. This eliminates the need to upload the target file to a file storage server via wireless communication before further invoking a third-party parsing server for parsing. Instead, the local parsing service is directly invoked to initiate a parsing task for the target file to the local presentation software, shortening the parsing process. The parsing task instructs the local parsing service to invoke the parsing service based on preset script code. The presentation software parses the target file; its functions include displaying the presentation file; or, if the presentation software is not installed, it calls a parsing server to parse the target file to obtain a target image set, thus considering a more comprehensive approach to target file parsing and increasing the flexibility of target file parsing; after obtaining the target image set, it displays the images in the target image set on a webpage to achieve a preview function of the target file content; it is evident that, when the presentation software is installed on the current operating system, the process from selecting the target file to previewing its content is shortened, thereby improving the preview efficiency of the presentation file; it also provides a preview method for presentation files when the presentation software is not installed on the current operating system, increasing the flexibility of target file parsing and ensuring that target file parsing and previewing can be achieved in various situations.

[0070] In one exemplary embodiment, after invoking the local parsing service to initiate a parsing task for the target file to the demonstration software, the target image set returned by the local parsing service is received.

[0071] The demonstration software is used to parse target files according to the parsing task and store the parsed target image set to the file storage system.

[0072] Optionally, the terminal invokes a local parsing service to initiate a parsing task for the target file to the demonstration software. For example, the terminal invokes script code from the local parsing service, which sends the target file to be parsed, the specified format, and other information to the demonstration software, instructing it to perform the corresponding parsing operations. The demonstration software saves the parsed target image set to the file storage system and sends a parsing completion signal to the local parsing service. The local parsing service then reads the target image set from the file storage system, and the web client receives the target image set returned by the local parsing service.

[0073] In this embodiment, a parsing task for the target file is sent to the local presentation software by calling the local parsing service, and the target image set that can be displayed on the webpage returned by the local parsing service is received. All processes are completed locally on the terminal, without the need to perform an upload operation on the target file before calling the parsing server, which shortens the parsing process of the presentation file and thus improves the preview efficiency.

[0074] In an exemplary embodiment, step S204, which involves invoking the local parsing service to initiate a parsing task for the target file to the demonstration software, includes:

[0075] The local parsing service is invoked to execute a preset script to create an application instance for the target file and launch the demo software to trigger the demo software to perform a parsing task for the target file based on the application instance.

[0076] The application instance is used to instruct the presentation software to open the target file, traverse the target file, and export the target file as a target image in a preset format. The application instance can be an object representing a presentation file. Through the application instance, a series of automated tasks can be performed, allowing developers to control the functionality of the presentation software without manually opening and operating it. The image format refers to the storage format of the digital image, which determines the image compression method and quality. Common image formats include JPEG, PNG, GIF, and BMP. Technical personnel pre-set the image format type after parsing the presentation file in the code according to actual display requirements.

[0077] Script code is a type of programming code typically used to automate tasks and control applications. Scripts can be interpreted and executed at runtime without being compiled into machine code. Common scripting languages ​​include JavaScript and Python.

[0078] Optionally, the terminal invokes a local parsing service to execute pre-defined script code to create an application instance targeting the target file. Specifically, the local parsing service runs on Node.js and provides the `child_process` toolkit. The `child_process` toolkit is a core module of Node.js that allows developers to create child processes within Node.js applications to execute operating system commands or run other programs. The `exec` or `spawn` methods can be used to invoke the operating system's command-line tools to execute specified commands. The `exec` method executes a shell command and returns the command's output as a callback function parameter; the `spawn` method executes a command asynchronously and returns a child process object representing that command. If the operating system is Windows, the Windows command-line tools include the `cscript` command (a command-line tool for running script code) to execute pre-defined VBScript script code (VBScript is a scripting language based on the Visual Basic programming language and integrated development environment). The terminal uses the `CreateObject` method in VBScript to create an instance of a specified type of object. Using the `CreateObject` method, a PowerPoint (a presentation software) application instance is created, and the presentation software installed on the operating system is launched, triggering the presentation software to execute the parsing task targeting the target file based on the application instance.

[0079] It should be noted that the description of this embodiment uses the Windows operating system as an example. The operating system can also be macOS, Linux, etc. Different types of operating systems use the appropriate programming language environment to compile the corresponding script code for automatically launching the demonstration software, which can achieve the effect of automatically calling the demonstration software to automatically parse the target file. The implementation method of this process is not specifically limited.

[0080] In this embodiment, Node.js's subprocess management capabilities enable the automated execution of a series of operations. This automatically invokes the presentation software installed on the operating system to parse the target file and obtain the target image set. This achieves automated parsing of the target file locally, avoiding long waiting times caused by poor parsing server performance or network fluctuations, further improving the preview efficiency of presentation files. Furthermore, parsing services typically require purchase from presentation software providers, incurring fixed costs for each parsing session; local parsing services reduce these costs.

[0081] In an exemplary embodiment, the preview method for presentation files described above further includes:

[0082] If the demo software fails to start or fails to perform the parsing task for the target file, the parsing server is invoked to parse the target file and obtain the target image set.

[0083] Optionally, if the operating system has demo software installed and is enabled to perform local parsing using the demo software, and the demo software fails to start or fails to perform the parsing task for the target file, the terminal switches to a parsing method that calls a parsing server to parse the target file, in order to obtain a set of target images that can be used for web page display.

[0084] In this embodiment, if the presentation software fails to start or the parsing task fails during the parsing of the target file using the local parsing service, the parsing can be switched to calling the parsing server. This can further improve the flexibility and robustness of the presentation file parsing process, ensuring that a target image set that can be used for web page display can be obtained under various circumstances.

[0085] In an exemplary embodiment, step S204, when the software installation status indicates that the demo software is not installed, involves calling the parsing server to parse the target file, including:

[0086] In the case where the demo software is not installed, the target file is uploaded to the file storage server, and the parsing server is invoked to parse the target file stored on the file storage server.

[0087] Optionally, if the terminal does not have the demo software installed, it uploads the target file to the file storage server. The file storage server returns the resource identifier corresponding to the target file to the terminal. The terminal then calls the parsing server based on the resource identifier to instruct the parsing server to parse the target file stored on the file storage server according to the resource identifier.

[0088] In this embodiment, the target file to be previewed is uploaded to a file storage server. The file storage server can be a cloud server or a third-party server that provides storage services. It does not require local resources, and the file can be more easily integrated with other services to form a complete file workflow, thereby reducing the local resource usage rate.

[0089] In an exemplary embodiment, step S204 calls a parsing server to parse the target file to obtain a target image set, including:

[0090] Upload the target file to the file storage server and receive the resource identifier returned by the file storage server; based on the resource identifier, initiate a parsing task for the target file to the parsing server; receive the target image set returned by the parsing server.

[0091] Among them, a file storage server can be a server specifically designed for storing and managing files. It can be a cloud server or a remote server, allowing users to access, upload, and download files over a network. It is typically used in data storage solutions for enterprises and organizations.

[0092] The resource identifier can be a Remote Resource Identifier (RRID), which is a string or code used to uniquely identify and locate resources (such as files, data, or services) stored on a network.

[0093] The parsing server is used to retrieve the target file from the file storage server and parse the target file into a target image set.

[0094] Optionally, such as Figure 3 The diagram illustrates the process of calling a parsing server to parse and obtain the target image set. The web client on the terminal uploads the target file to the file storage server. The file storage server returns a remote resource identifier to the terminal based on the target file. Based on the resource identifier, it initiates a parsing task for the target file to a third-party parsing server used for parsing PPTs. After the parsing server parses the target file into a target image set (image list), the terminal receives the target image set returned by the file parsing server.

[0095] In this embodiment, when the operating system does not have presentation software installed, a presentation file parsing service provided by a third-party parsing server is used to parse the target file into a set of target images that can be displayed on a webpage, thus meeting the preview requirements of presentation files in scenarios where presentation software is not installed locally.

[0096] In one exemplary embodiment, such as Figure 4 As shown, another method for previewing presentation files is provided, including:

[0097] Step 1: In response to the selection of any presentation file on the webpage, determine the type of operating system and software installation status associated with the webpage.

[0098] Step 2: If presentation software (the software itself) is installed locally on the operating system, the local presentation software is invoked to perform a parsing task on the selected presentation file (target file). If presentation software is not installed locally on the operating system, invoking the presentation software fails, or the presentation software fails to parse the presentation file, the selected presentation file is uploaded to a file storage server, and the parsing server is invoked to parse the presentation file.

[0099] For example, such as Figure 5 The diagram illustrates the process of calling a local parsing service to parse a file. It calls the locally installed office presentation software to parse the PowerPoint presentation. Taking Windows as an example, the implementation process is as follows: Node.js provides the `child_process` toolkit, which can use the `exec` or `spawn` methods to call the operating system's command-line tools (such as cmd or PowerShell) to execute specified commands. Windows' command-line tools have built-in `cscript` commands for executing VBScript code (VBScript is a scripting language based on Visual Basic). The `CreateObject` method in VBScript can be used to create instances of objects of a specified type. The `CreateObject` method is used to create a PowerPoint application instance and launch the PowerPoint application installed on the system. This PowerPoint instance provides methods for opening a specified PPT file, traversing slides, and exporting slides as images.

[0100] Step 3: Receive the image list (target image set) returned by the presentation software or the server, and display the content of the image list through the web client application.

[0101] In this embodiment, a local parsing scheme is adopted, which can quickly parse PPT into images using the presentation software already installed on the user's computer, allowing for faster content display in web applications. This effectively avoids long waiting times caused by poor parsing server performance or network fluctuations. Furthermore, parsing services typically need to be purchased from presentation software providers, incurring fixed costs for each parsing session. The local parsing scheme can reduce these costs to a certain extent, achieving the goal of cost reduction and efficiency improvement.

[0102] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed 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 performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0103] Based on the same inventive concept, this application also provides a presentation file previewing device for implementing the presentation file previewing method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more presentation file previewing device embodiments provided below can be found in the limitations of the presentation file previewing method described above, and will not be repeated here.

[0104] In one exemplary embodiment, such as Figure 6 As shown, a presentation file preview device 600 is provided, including: a preview confirmation module 602, a file parsing module 604, and a file preview module 606, wherein:

[0105] The preview determination module 602 is used to determine the target file to be previewed in response to a trigger operation on any presentation file in the webpage, and to determine the software installation status of the operating system associated with the webpage.

[0106] The file parsing module 604 is used to, when the software installation status indicates that the demo software is installed, call the local parsing service to initiate a parsing task for the target file to the demo software to obtain the target image set; the parsing task is used to instruct the local parsing service to call the demo software to parse the target file based on preset script code; the demo software's functions include displaying presentation files; or, when the software installation status indicates that the demo software is not installed, call the parsing server to parse the target file to obtain the target image set.

[0107] File preview module 606 is used to display the target image set on a webpage.

[0108] Furthermore, in one embodiment, the file parsing module 604 is also used to call a local parsing service to initiate a parsing task for the target file to the demonstration software; the demonstration software is used to parse the target file according to the parsing task and return the parsed target image set to the local parsing service; and receive the target image set returned by the local parsing service.

[0109] Furthermore, in one embodiment, the file parsing module 604 is also used to call the local parsing service to execute preset script code to create an application instance for the target file and start the demo software to trigger the demo software to execute a parsing task for the target file according to the application instance.

[0110] Furthermore, in one embodiment, the file parsing module 604 is also configured to call the parsing server to parse the target file and obtain the target image set in the event that the demonstration software fails to start or the demonstration software fails to execute the parsing task for the target file.

[0111] Furthermore, in one embodiment, the file parsing module 604 is also used to upload the target file to the file storage server and receive the resource identifier returned by the file storage server; based on the resource identifier, initiate a parsing task for the target file to the parsing server; the parsing server is used to obtain the target file from the file storage server, parse the target file into a target image set; and receive the target image set returned by the parsing server.

[0112] Furthermore, in one embodiment, the file parsing module 604 is also configured to, when the software installation status indicates that the demo software is not installed, call the parsing server to upload the target file to the file storage server, and call the parsing server to parse the target file stored on the file storage server.

[0113] Each module in the aforementioned presentation file preview device 600 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0114] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as target files and target image sets. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a method for previewing presentation files.

[0115] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0116] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0117] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0118] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0119] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0121] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for previewing presentation files, characterized in that, The method includes: In response to a trigger operation on any presentation file in the webpage, the target file to be previewed is determined, and the software installation status of the operating system associated with the webpage is determined. If the software installation status indicates that the demo software is installed, a local parsing service is invoked to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or, If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set; The target image set is displayed on the webpage.

2. The method according to claim 1, characterized in that, The step of invoking the local parsing service to initiate a parsing task for the target file in the demonstration software includes: The local parsing service is invoked to execute the preset script code to create an application instance for the target file, and the demo software is launched to trigger the demo software to execute a parsing task for the target file based on the application instance.

3. The method according to claim 2, characterized in that, The method further includes: If the demonstration software fails to start, or if the demonstration software fails to perform the parsing task for the target file, the parsing server is invoked to parse the target file and obtain the target image set.

4. The method according to claim 2, characterized in that, The application instance is used to instruct the demonstration software to open the target file, traverse the target file, and export the target file as a target image in a preset format.

5. The method according to claim 1, characterized in that, In the case where the software installation status indicates that the demonstration software is not installed, the step of calling the parsing server to parse the target file includes: If the demo software is not installed as indicated by the software installation status, the target file is uploaded to the file storage server, and the parsing server is invoked to parse the target file stored on the file storage server.

6. The method according to claim 1, characterized in that, The process of calling the parsing server to parse the target file and obtain the target image set includes: Upload the target file to the file storage server and receive the resource identifier returned by the file storage server; Based on the resource identifier, a parsing task for the target file is initiated to the parsing server; the parsing server is used to obtain the target file from the file storage server and parse the target file into a target image set. Receive the target image set returned by the parsing server.

7. A preview device for presentation files, characterized in that, The device includes: The preview confirmation module is used to respond to a trigger operation on any presentation file in the webpage, determine the target file to be previewed, and determine the software installation status of the operating system associated with the webpage. The file parsing module, when the software installation status indicates that the demo software is installed, invokes a local parsing service to initiate a parsing task for the target file to the demo software, obtaining the target image set; the parsing task instructs the local parsing service to invoke the demo software to parse the target file based on preset script code; the demo software's functions include displaying the presentation file; or... If the demo software is not installed as indicated by the software installation status, the parsing server is invoked to parse the target file to obtain the target image set; The file preview module is used to display the target image set on the webpage.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.