A method, apparatus, electronic device, and storage medium for viewing PPT files.
By converting PPT files into images and generating web page files, device compatibility issues were resolved, enabling multimedia playback and link redirection to function correctly in the browser.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CAIXUAN TECH CO LTD
- Filing Date
- 2022-12-23
- Publication Date
- 2026-06-30
Smart Images

Figure CN116226419B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of document processing technology, and in particular to a method, apparatus, electronic device, and storage medium for browsing PPT files. Background Technology
[0002] Currently, PowerPoint (PPT) documents are primarily used for information presentation and dissemination. Presenters use either live PPT explanations or share PPT documents to communicate information. When the audience (document viewer, recipient) wants to view the PPT content on their own device, the presenter needs to send the PPT file (or a PDF file converted from the PPT) to the audience, who then receives, stores, and plays / views it on their local device. However, this model has drawbacks: file transfer is limited by device, and various compatibility issues (device, software, font layout, file size, etc.) can cause playback failures or errors.
[0003] Currently, PPTs can be converted to PDF files before transmission. This can prevent theft, tampering, and reduce file size. However, PPTs converted to PDF files will lose multimedia information (video, audio, etc.), and embedded website links in the PPT cannot be opened directly in the PDF.
[0004] There is currently no good solution for how to use multimedia information and links in PowerPoint without being limited by device specifications. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for browsing PPT files, so as to solve the problems of PPT file opening being limited by device and the inability to properly use multimedia information and links in PDFs. The specific technical solution is as follows:
[0006] Firstly, a method for viewing PPT files is provided, the method comprising:
[0007] Read the target information from the PPT file sent by the sending terminal, wherein the target information includes multimedia information or link information;
[0008] Convert each page in the PPT file into an image;
[0009] An initial webpage file is generated based on the image, wherein the multimedia information in the initial webpage file has a static visual effect and the links cannot be clicked to jump to the page;
[0010] The read target information is overwritten in its original position in the initial webpage file to obtain the target webpage file;
[0011] The network address generated based on the target webpage file is sent to the receiving terminal, so that the receiving terminal loads the network address in its browser to display PPT files, multimedia files, and link jumps.
[0012] Optionally, when reading target information from a PPT file sent by a sending terminal, the method further includes: reading the target position of the target information in the PPT file; and determining the correspondence between the target information and the target position.
[0013] Overwriting the read target information to its original position in the initial webpage file includes: overwriting the target information to the target position in the initial webpage file according to the correspondence.
[0014] Optionally, reading the target location of the target information in the PPT file includes:
[0015] Determine the target page in the PPT file where the target information is located;
[0016] Determine the target size of the target information in the target page, wherein the target indicates the width and height of the target information;
[0017] The target page and the target size are used as the target location.
[0018] Optionally, generating the initial webpage file based on the image includes:
[0019] The images are displayed sequentially according to the page order in the PowerPoint file to obtain the initial webpage file.
[0020] Optionally, sending the network address generated based on the target webpage file to the receiving terminal includes:
[0021] Generate a network address based on the server identifier and the identifier parameters of the target web page file;
[0022] The network address is sent to the receiving terminal.
[0023] Secondly, a device for viewing PPT files is provided, the device comprising:
[0024] The reading module is used to read the target information in the PPT file sent by the sending terminal, wherein the target information includes multimedia information or link information;
[0025] The conversion module is used to convert each page of the PPT file into an image;
[0026] The generation module is used to generate an initial webpage file based on the image, wherein the multimedia information in the initial webpage file has a static visual effect and the links cannot be clicked to jump to the page;
[0027] The overlay module is used to overwrite the read target information onto the original position in the initial webpage file to obtain the target webpage file;
[0028] The sending module is used to send the network address generated based on the target webpage file to the receiving terminal, so that the receiving terminal loads the network address in the browser to display PPT files, multimedia files, and link jumps.
[0029] Optionally, the device is further configured to: read the target location of the target information in the PPT file; and determine the correspondence between the target information and the target location;
[0030] The overlay module is used to: overlay the target information onto the target position in the initial webpage file according to the correspondence.
[0031] Optionally, the read module is used for:
[0032] Determine the target page in the PPT file where the target information is located;
[0033] Determine the target size of the target information in the target page, wherein the target indicates the width and height of the target information;
[0034] The target page and the target size are used as the target location.
[0035] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0036] Memory, used to store computer programs;
[0037] A processor, when executing a program stored in memory, implements the steps of any of the described ppt file browsing methods.
[0038] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the above-described methods for browsing a PowerPoint file.
[0039] Beneficial effects of the embodiments in this application:
[0040] This application provides a method for browsing PPT files. By first reading out the target information and generating an initial webpage file from the image-based pages, the PPT file is essentially divided into a static underlying page and the target information, both of which are treated as webpage resources. Then, multimedia information and link information are overlaid in the original location of the PPT file to construct a complete and native target webpage file. By generating the network address of the target webpage file, users can directly open the PPT file in a browser without using local PPT software, thus avoiding compatibility issues and allowing for normal playback of multimedia files and link navigation.
[0041] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A schematic diagram of the hardware environment for a method of browsing PPT files provided in this application embodiment;
[0044] Figure 2 A flowchart illustrating a method for browsing PPT files provided in this application embodiment;
[0045] Figure 3 A schematic diagram of the structure of a PPT file viewing device provided in an embodiment of this application;
[0046] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module" and "part" may be used interchangeably.
[0049] To address the problems mentioned in the background art, according to one aspect of the embodiments of this application, an embodiment of a method for browsing PPT files is provided.
[0050] Optionally, in the embodiments of this application, the above-described method for browsing PPT files can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 101 and server 103. Figure 1 As shown, server 103 is connected to terminal 101 via a network and can be used to provide services to the terminal or clients installed on the terminal. Database 105 can be set up on the server or independently of the server to provide data storage services for server 103. The network mentioned above includes, but is not limited to, wide area network, metropolitan area network or local area network. Terminal 101 includes, but is not limited to, PC, mobile phone, tablet computer, etc.
[0051] One method for browsing a PPT file in this application embodiment can be executed by server 103, which is used to use the multimedia information and links in the PPT normally without being limited by the device.
[0052] The following will describe in detail a method for browsing PPT files provided in this application embodiment, with reference to specific implementation methods. Figure 2 As shown, the specific steps are as follows:
[0053] Step 201: Read the target information from the PowerPoint file sent by the sending terminal.
[0054] The target information includes multimedia information or link information.
[0055] The sending terminal sends a PowerPoint file to the server. The XML specification of the PowerPoint file defines the information characteristics of multimedia and link information. The server identifies the multimedia and link information based on these characteristics, then reads and saves the multimedia and link information to its database. The original PowerPoint file retains this target information. The multimedia information includes audio and video, among other things.
[0056] Step 202: Convert each page in the PPT file into an image.
[0057] The server uses a method for converting PPT files to images to convert each page of the PPT file into an image in sequence.
[0058] Step 203: Generate an initial webpage file based on the image.
[0059] The multimedia information in the initial webpage file has a static visual effect, and the links cannot be clicked to jump to the next page.
[0060] The server displays the images sequentially according to the original page arrangement in the PPT file to obtain an initial webpage file. At this time, the content of the initial webpage file is displayed in the form of images, so the animation effects of multimedia information are lost, presenting a static visual effect, and the links cannot jump to the relevant webpages after being clicked.
[0061] Step 204: Overwrite the original position of the read target information in the initial webpage file to obtain the target webpage file.
[0062] The server reads the target information and overwrites it in its original position in the initial webpage file to obtain the target webpage file. In this way, the target webpage file is actually divided into a static underlying page and target information, but they are treated as the same webpage resource.
[0063] Step 205: Send the network address generated based on the target webpage file to the receiving terminal, so that the receiving terminal loads the network address in the browser to display the PPT file, multimedia files, and link jumps.
[0064] The server generates a network address based on the server identifier and the identifier parameters of the target webpage file, and then sends the network address to the receiving terminal. Upon receiving the network address, the receiving terminal directly loads it into its browser to display the PowerPoint file. Because the static underlying page and the target information in the target webpage file are not a unified whole, and the target information is not in image format, the multimedia information can play normally, and links can redirect to the relevant webpage when clicked.
[0065] In this application, the target information is first read out, and an initial webpage file is generated based on the image-based page. This essentially divides the PPT file into a static underlying page and the target information, both of which are treated as webpage resources. Then, multimedia information and link information are overlaid in the original location of the PPT file to construct a complete and native target webpage file. By generating the network address of the target webpage file, users can directly open the PPT file in a browser without using local PPT software, thus avoiding compatibility issues and allowing for normal playback of multimedia files and link navigation.
[0066] As an optional implementation, when the terminal reads the target information in the PPT file sent by the sending terminal, it also reads the target position of the target information in the PPT file, and then determines the correspondence between each target information and the target position. After obtaining the initial web page file, the service overwrites the target information to the target position in the initial web page file according to the correspondence, thus realizing that the target information is overwritten to the original position in the PPT file.
[0067] The process of reading the target location of the target information in the PPT file includes: the server first determining the target page in the PPT file where the target information is located, i.e., which page the target information is on, and then determining the target size of the target information on the target page, i.e., determining the width and height occupied by the target information on the target page. The target size can be represented in coordinate form. The target page and the target size are used as the target location.
[0068] When communicating between a terminal and a cloud server (e.g., transmitting target information or network addresses), the encryption mechanism between the two parties is as follows: A (one of the terminal and the cloud server) XORs the following n characters from its own identifier (which can be a device identifier or account; if this information is not binary encoded, it is converted to binary encoding): if the i-th bit of its own identifier is 0, the first n bits of its own identifier are taken; if the i-th bit of its own identifier is 1, the last n bits of its own identifier are taken, where i is the integer part of the number of bits of the identifier divided by 2) with a preset string (stored by both the terminal and the cloud server, initially sent to the terminal by the cloud server, with a length of n, which the cloud server will periodically change). The result is converted to a decimal number j to determine the current timestamp. If the last digit of the timestamp is odd, then the encryption scheme set (which contains 2^n characters) is used. n-1 From the set of encryption schemes, the j-th encryption scheme is selected in sequence. If the last digit of the timestamp is not odd, the j-th encryption scheme in reverse order is selected from the set of encryption schemes. The target data is encrypted using the selected encryption scheme to obtain encrypted data. Then, the encrypted data, its own identifier, and the timestamp are used to form a data packet, which is sent to B (the other of the terminal and cloud server). After receiving the data packet, B reads the timestamp and its own identifier and processes it in reverse order.
[0069] Based on the same technical concept, embodiments of this application also provide a device for viewing PPT files, such as... Figure 3 As shown, the device includes:
[0070] The reading module 301 is used to read target information from a PPT file sent by the sending terminal, wherein the target information includes multimedia information or link information;
[0071] The conversion module 302 is used to convert each page of the PPT file into an image;
[0072] The generation module 303 is used to generate an initial webpage file based on the image, wherein the multimedia information in the initial webpage file has a static visual effect and the links cannot be clicked to jump to the page;
[0073] The overlay module 304 is used to overwrite the read target information onto the original position in the initial webpage file to obtain the target webpage file;
[0074] The sending module 305 is used to send the network address generated based on the target webpage file to the receiving terminal, so that the receiving terminal loads the network address in the browser and displays the PPT file, multimedia files, and links.
[0075] Optionally, the device is further configured to: read the target location of the target information in the PPT file; and determine the correspondence between the target information and the target location;
[0076] The overlay module 304 is used to: overlay the target information onto the target position in the initial webpage file according to the correspondence.
[0077] Optionally, the read module 301 is used for:
[0078] Determine the target page in the PPT file where the target information is located;
[0079] Determine the target size of the target information in the target page, wherein the target indicates the width and height of the target information;
[0080] Optionally, the generation module 303 is used for:
[0081] The images are displayed sequentially according to the page order in the PowerPoint file to obtain the initial webpage file.
[0082] Optionally, the sending module 305 is used for:
[0083] Generate a network address based on the server identifier and the identifier parameters of the target web page file;
[0084] The network address is sent to the receiving terminal.
[0085] The target page and the target size are used as the target location. According to another aspect of the embodiments of this application, this application provides an electronic device, such as... Figure 4 As shown, the system includes a memory 403, a processor 401, a communication interface 402, and a communication bus 404. The memory 403 stores a computer program that can run on the processor 401. The memory 403 and the processor 401 communicate through the communication interface 402 and the communication bus 404. When the processor 401 executes the computer program, it implements the steps of the above method.
[0086] The memory and processor in the aforementioned electronic devices communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0087] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0088] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0089] According to another aspect of the embodiments of this application, a computer-readable medium having processor-executable non-volatile program code is also provided.
[0090] Optionally, in embodiments of this application, the computer-readable medium is configured to store program code for the processor to execute the above-described method.
[0091] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0092] In specific implementation, the embodiments of this application can be referred to the above embodiments and have corresponding technical effects.
[0093] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0094] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0095] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0096] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0097] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0099] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0100] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0101] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method of browsing a ppt file, characterized by, The method includes: Read the target information from the PPT file sent by the sending terminal, wherein the target information includes multimedia information or link information; Convert each page in the PPT file into an image; An initial webpage file is generated based on the image, wherein the multimedia information in the initial webpage file has a static visual effect and the links cannot be clicked to jump to the page; The read target information is overwritten in the original position of the initial webpage file to obtain the target webpage file; the target webpage file includes a static bottom page composed of the images and the target information overlaid on it, the static bottom page and the target information are different layers in the same webpage resource; A dynamic encryption method is used to send the network address generated based on the target webpage file to the receiving terminal. The dynamic encryption method includes: dynamically selecting an encryption scheme from multiple preset encryption schemes based on the sender's own identifier and current timestamp to encrypt the network address, and sending the encrypted data together with the sender's own identifier and the timestamp to the receiving terminal. This allows the receiving terminal to decrypt the encrypted data based on the sender's own identifier and the timestamp, load the network address in the browser, and display PPT files, multimedia files, and link redirects.
2. The method of claim 1, wherein, When reading target information from a PPT file sent by a sending terminal, the method further includes: reading the target position of the target information in the PPT file; and determining the correspondence between the target information and the target position. Overwriting the read target information to its original position in the initial webpage file includes: overwriting the target information to the target position in the initial webpage file according to the correspondence.
3. The method of claim 2, wherein, Reading the target information from the target location in the PPT file includes: Determine the target page in the PPT file where the target information is located; Determine the target size of the target information on the target page, wherein the target size indicates the width and height of the target information; The target page and the target size are used as the target location.
4. The method according to claim 1, characterized in that, The step of generating the initial webpage file based on the image includes: The images are displayed sequentially according to the page order in the PowerPoint file to obtain the initial webpage file.
5. The method according to claim 1, characterized in that, The step of sending the network address generated based on the target webpage file to the receiving terminal includes: Generate a network address based on the server identifier and the identifier parameters of the target web page file; The network address is sent to the receiving terminal.
6. A device for viewing PPT files, characterized in that, The device includes: The reading module is used to read the target information in the PPT file sent by the sending terminal, wherein the target information includes multimedia information or link information; The conversion module is used to convert each page of the PPT file into an image; The generation module is used to generate an initial webpage file based on the image, wherein the multimedia information in the initial webpage file has a static visual effect and the links cannot be clicked to jump to the page; The overlay module is used to overlay the read target information onto the original position in the initial webpage file to obtain the target webpage file; the target webpage file includes a static bottom page composed of the images and the target information overlaid on it, wherein the static bottom page and the target information are different layers in the same webpage resource; The sending module is used to send a network address generated based on the target webpage file to the receiving terminal using a dynamic encryption method. The dynamic encryption method includes: dynamically selecting an encryption scheme from multiple preset encryption schemes based on the sender's own identifier and current timestamp to encrypt the network address, and sending the encrypted data together with the sender's own identifier and the timestamp to the receiving terminal. This allows the receiving terminal to decrypt the encrypted data based on the sender's own identifier and the timestamp, load the network address in the browser, and display PPT files, multimedia files, and link redirects.
7. The apparatus according to claim 6, characterized in that, The device is also used to: read the target location of the target information in the PowerPoint file; and determine the correspondence between the target information and the target location. The overlay module is used to: overlay the target information onto the target position in the initial webpage file according to the correspondence.
8. The apparatus according to claim 6, characterized in that, The read module is used for: Determine the target page in the PPT file where the target information is located; Determine the target size of the target information on the target page, wherein the target size indicates the width and height of the target information; The target page and the target size are used as the target location.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-5.