A file preview method, device and equipment and computer readable storage medium

By obtaining the file's location identifier and converting it into an image format for previewing, the problem of low file preview efficiency is solved, achieving efficient file preview and scene expansion.

CN115145873BActive Publication Date: 2026-04-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-03-31
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies have low file preview efficiency, especially since the entire file needs to be downloaded during network preview, resulting in low efficiency. Furthermore, file rendering cannot be achieved in certain scenarios, limiting the expansion of preview scenarios.

Method used

By obtaining the location identifier of the file to be previewed, determining the information to be previewed, converting the image format, and generating the preview image, this supports application scenarios for image display and expands the scenarios for file preview.

Benefits of technology

It improves the efficiency of file preview, supports more preview scenarios, and enables efficient previewing of file information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145873B_ABST
    Figure CN115145873B_ABST
Patent Text Reader

Abstract

The application provides a file preview method, device and equipment and a computer readable storage medium. The method comprises the following steps: obtaining a preview identifier of a file to be previewed, wherein the file to be previewed is a document type file, and the preview identifier is a position identifier of file information in the file to be previewed; determining preview information corresponding to the preview identifier from the file to be previewed; performing picture format conversion on the preview information to obtain a preview picture; and previewing the preview information in the file to be previewed based on the preview picture. Through the application, the file preview efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to file management technology in the field of computer applications, and more particularly to a file preview method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of computer networks, online preview services have been rapidly deployed, and more and more files need to be viewed online. Therefore, file previewing has become increasingly important.

[0003] Generally, to preview a file, the file is downloaded on the preview client and then displayed on the preview client via the application client. However, this process requires downloading the entire file, making file previewing inefficient. Summary of the Invention

[0004] This application provides a file preview method, apparatus, device, and computer-readable storage medium, which can improve file preview efficiency.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a file preview method, including:

[0007] Obtain the preview identifier of the file to be previewed, wherein the file to be previewed refers to a document type file, and the preview identifier refers to the position identifier of the file information in the file to be previewed within the file to be previewed;

[0008] From the file to be previewed, determine the preview information corresponding to the preview identifier;

[0009] The image format of the information to be previewed is converted to obtain the image to be previewed;

[0010] Based on the image to be previewed, preview the information to be previewed in the file to be previewed.

[0011] This application provides a file preview device, including:

[0012] The identifier acquisition module is used to acquire the preview identifier of the file to be previewed, wherein the file to be previewed refers to a document type file, and the preview identifier refers to the position identifier of the file information in the file to be previewed within the file to be previewed;

[0013] The information determination module is used to determine the preview information corresponding to the preview identifier from the preview file;

[0014] The image conversion module is used to convert the image format of the information to be previewed to obtain the image to be previewed;

[0015] The information preview module is used to preview the information to be previewed in the file to be previewed based on the image to be previewed.

[0016] In this embodiment of the application, the image conversion module is further configured to convert the image format of the information to be previewed to obtain an image to be processed; obtain the preview object information corresponding to the preview identifier, wherein the preview object information includes at least one of preview object, preview time, and preview device; and embed the preview object information into the image to be processed to obtain the image to be previewed.

[0017] In this embodiment of the application, the image conversion module is further configured to generate a watermark image including the preview object information; perform domain transformation on the watermark image and the image to be processed respectively to obtain a watermark domain image corresponding to the watermark image and a image to be processed corresponding to the image to be processed; fuse the watermark domain image and the image to be processed to obtain a preview image to be transformed; and perform an inverse domain transformation on the preview image to be transformed to obtain the preview image to be previewed.

[0018] In this embodiment, the image conversion module is further configured to perform frequency domain transformation on the watermark image and the image to be processed respectively, to obtain a watermark frequency domain image corresponding to the watermark image and a processing frequency domain image corresponding to the image to be processed, wherein the watermark frequency domain image is the watermark domain image and the processing frequency domain image is the processing domain image; or, to perform spatial domain transformation on the watermark image and the image to be processed respectively, to obtain a watermark spatial domain image corresponding to the watermark image and a processing spatial domain image corresponding to the image to be processed, wherein the watermark spatial domain image is the watermark domain image and the processing spatial domain image is the processing domain image.

[0019] In this embodiment of the application, the file preview device further includes an image decoding module, which is used to perform a domain transformation on the image to be decoded when it is determined that the image to be previewed is a preview image to be decoded, to obtain the preview image to be transformed; to obtain the image difference between the preview image to be transformed and the image to be processed corresponding to the image to be previewed, and to perform an inverse domain transformation on the image difference to obtain the watermark image including the preview object information.

[0020] In this embodiment of the application, the information preview module is further configured to store the image to be previewed, obtain the generated image preview link; obtain the preview time corresponding to the preview identifier; determine the preview validity period of the image preview link based on the preview time and the link validity period; when the obtained current time is within the preview validity period, display the stored image to be previewed based on the image preview link, wherein the displayed stored image to be previewed is used to preview the information to be previewed in the file to be previewed.

[0021] In this embodiment, the information preview module is further configured to: determine the image preview link as a sharing link in response to a link acquisition operation for the image to be previewed; send the sharing link to a sharing device in response to a sending operation for the sharing link; obtain the image browsing time in response to an image browsing request carrying the sharing link sent by the sharing device; send a link expiration message to the sharing device when the image browsing time is outside the preview validity period; and send the image to be previewed to the sharing device based on the sharing link when the image browsing time is within the preview validity period.

[0022] In this embodiment of the application, the file preview device further includes a preview authentication module, used to obtain the set of previewable objects corresponding to the file to be previewed, and the preview object corresponding to the preview identifier.

[0023] In this embodiment of the application, the information determination module is further configured to determine the preview information corresponding to the preview identifier from the preview file when the preview object belongs to the previewable object set.

[0024] In this embodiment of the application, the information preview module is further configured to obtain a new preview identifier for the file to be previewed, wherein the new preview identifier is obtained after the preview identifier; when the new preview identifier is the preview identifier, the preview information corresponding to the new preview identifier in the file to be previewed is previewed based on the preview image.

[0025] In this embodiment of the application, the identifier acquisition module is further configured to display a file preview control, wherein the file preview control is used to trigger a preview of the file to be previewed; in response to a preview request operation performed on the file preview control, display preview navigation information of the file to be previewed, wherein the preview navigation information includes at least one of preview progress information, preview navigation control, and initial preview image; and in response to a preview operation on the preview navigation information, acquire the identifier to be previewed.

[0026] In this embodiment of the application, when the preview navigation information includes the preview progress information and the initial preview image, the identifier acquisition module is further configured to acquire the identifier to be previewed in response to the preview operation performed on the initial preview image; when the preview navigation information includes the preview progress information, the preview navigation control, and the initial preview image, the identifier acquisition module is further configured to acquire the identifier to be previewed in response to the preview operation performed on the preview directory in the preview navigation control.

[0027] In this embodiment of the application, when the preview navigation information includes at least the preview progress information and the initial preview image, the information preview module is further configured to display the image to be previewed in the display area of ​​the initial preview image, and update the current identifier in the preview progress information to the image to be previewed.

[0028] In this embodiment of the application, the identifier acquisition module is further configured to receive a preview call request sent by the preview device; and to obtain the preview identifier of the file to be previewed from the preview call request.

[0029] This application provides a file preview device, including:

[0030] Memory, used to store executable instructions;

[0031] The processor, when executing executable instructions stored in the memory, implements the file preview method provided in the embodiments of this application.

[0032] This application provides a computer-readable storage medium storing executable instructions for implementing the file preview method provided in this application when executed by a processor.

[0033] The embodiments of this application have at least the following beneficial effects: Since the specified information to be previewed can be converted into an image and then displayed by identifying the position of the file information in the file to be previewed during the previewing process, it is only necessary to perform image format conversion on the specified information to be previewed when previewing the information to be previewed in the file to be previewed, thus improving the efficiency of file previewing. Attached Figure Description

[0034] Figure 1 This is an optional architecture diagram of the file preview system provided in this application embodiment;

[0035] Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the composition structure of a server;

[0036] Figure 3This is an optional flowchart illustrating the file preview method provided in this application embodiment;

[0037] Figure 4 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application;

[0038] Figure 5 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application;

[0039] Figure 6 This is a schematic diagram illustrating an exemplary link acquisition operation provided in an embodiment of this application;

[0040] Figure 7 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application;

[0041] Figure 8 This is an exemplary schematic diagram of obtaining a preview identifier provided in an embodiment of this application;

[0042] Figure 9 This is another exemplary schematic diagram of obtaining the identifier to be previewed provided in the embodiments of this application;

[0043] Figure 10 This is a flowchart illustrating an exemplary file preview method provided in an embodiment of this application.

[0044] Figure 11 This is a schematic diagram illustrating an exemplary process for obtaining an image preview link, provided in an embodiment of this application.

[0045] Figure 12 This is a schematic diagram illustrating an exemplary blind watermark embedding process provided in an embodiment of this application;

[0046] Figure 13 This is a schematic diagram of an exemplary blind watermark decoding process provided in an embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on 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, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0050] In the implementation of this application, the collection and processing of relevant data should be strictly in accordance with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0051] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0052] 1) Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software and networks within a wide area network or local area network to realize the computing, storage, processing and sharing of data.

[0053] 2) An operation is a way to trigger a device to perform processing, such as a click operation, a double-click operation, a long press operation, a swipe operation, a gesture operation, a received trigger command, etc. In addition, the various operations in the embodiments of this application can be a single operation or a collective term for multiple operations; and the various operations in the embodiments of this application can be touch operations or non-touch operations.

[0054] 3) In response to, used to indicate the conditions or states on which the performed processing depends, when the conditions or states on which it depends are met, one or more operations performed may be performed in real time or may have a set delay; unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0055] 4) Document type refers to the document generated by text editing software; for example, PDF (Portable Document Format) type; or OFD (Open Fixed-layout Document) type.

[0056] 5) Watermarks are information embedded in images for tracing their origin, including ordinary watermarks and blind watermarks; among them, blind watermarks, also known as implicit watermarks, are a type of information embedded in an image that cannot be seen by the naked eye.

[0057] 6) Spatial Domain, also known as Image Space. This is the space comprised of image pixels. Processing pixel values ​​directly within the image space, using length (distance) as the independent variable, is called spatial domain processing.

[0058] 7) Spatial Frequency Domain: This domain describes the characteristics of an image using frequency (i.e., wavenumber) as the independent variable. It decomposes the spatial variation of pixel values ​​in an image into a linear superposition of simple vibration functions with different amplitudes, spatial frequencies, and phases. The composition and distribution of various frequency components in the image are called the spatial spectrum. This decomposition, processing, and analysis of the frequency characteristics of an image is called frequency domain processing or wavenumber domain processing.

[0059] It's important to note that cloud computing is a computing model that distributes computing tasks across a resource pool comprised of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud"; from the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go. As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices. Logically, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be directly deployed on top of IaaS. Here, PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and SMS mass mailers. Generally, SaaS and PaaS are upper layers compared to IaaS. The file preview method provided in this application embodiment can be implemented using IaaS, PaaS, and PaaS in cloud computing.

[0060] Generally, to preview a file, the file is downloaded to the preview client, such as a PDF or OFD file, and then displayed on the preview client via the application client. However, this process requires downloading the entire file, making file previewing inefficient.

[0061] Alternatively, file previews can be achieved using a file renderer on the preview platform; however, this requires loading the entire file to be previewed before rendering, resulting in high time costs and low efficiency. Furthermore, file rendering is not feasible in some scenarios; for example, PDF files cannot be rendered in mini-programs, limiting the number of file preview scenarios.

[0062] Based on this, embodiments of this application provide a file preview method, apparatus, device, and computer-readable storage medium, which can improve file preview efficiency and expand file preview scenarios. The exemplary applications of the file preview device provided in this application embodiment are described below. The file preview device provided in this application embodiment can be implemented as various types of user terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server. The exemplary application of the file preview device as a server will be described below.

[0063] See Figure 1 , Figure 1 This is an optional architecture diagram of the file preview system provided in this application embodiment; as shown... Figure 1 As shown, to support a file preview application, in the file preview system 100, terminal 200 (terminals 200-1 and 200-2 are shown as examples) connects to server 400 via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. Additionally, the file preview system 100 also includes a database 500, used to provide data support to server 400 when server 400 performs file preview processing, such as providing storage services for files and images to be previewed.

[0064] Terminal 200 is used to display a file preview control, wherein the file preview control is used to trigger a preview of the file to be previewed; in response to a preview request operation applied to the file preview control, it displays preview navigation information of the file to be previewed, wherein the preview navigation information includes at least one of preview progress information, a preview navigation control, and an initial preview image; in response to a preview operation on the preview navigation information, it sends a preview identifier of the file to be previewed to server 400 via network 300. It is also used to display a preview image received via network 300 from server 400 to preview the preview information in the file to be previewed.

[0065] Server 400 is used to receive a preview identifier of a file to be previewed from terminal 200 via network 300. The file to be previewed refers to a document file, and the preview identifier is the location identifier of the file information within the file to be previewed. Server 400 then determines the preview information corresponding to the preview identifier from the file to be previewed; performs image format conversion on the preview information to obtain a preview image. Server 400 is also used to send the preview image to terminal 200 via network 300.

[0066] It should be noted that when the processing of the server 200 acquiring the image to be previewed and the processing of the terminal 200 displaying the image to be previewed are integrated into one device, that device is the file preview device.

[0067] In some embodiments, server 400 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Terminal 200 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0068] See Figure 2 , Figure 2 This is provided by the embodiments of this application. Figure 1 A schematic diagram of the composition structure of a server. Figure 2 The server 400 shown includes at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0069] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0070] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0071] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0072] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0073] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0074] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0075] The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0076] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430.

[0077] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0078] In some embodiments, the file preview device provided in this application can be implemented in software. Figure 2 A file preview device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an identifier acquisition module 4551, an information determination module 4552, an image conversion module 4553, an information preview module 4554, an image decoding module 4555, and a preview authentication module 4556. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0079] In other embodiments, the file preview device provided in this application can be implemented in hardware. As an example, the file preview device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the file preview method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0080] The following will describe the file preview method provided in this application embodiment, with reference to exemplary applications and implementations of the file preview device provided in the embodiments of this application.

[0081] See Figure 3 , Figure 3 This is an optional flowchart illustrating the file preview method provided in this application embodiment, which will be combined with... Figure 3 The steps shown are explained.

[0082] S301. Obtain the preview identifier of the file to be previewed.

[0083] In this embodiment of the application, when a specified content in a document file is previewed, the document preview device obtains the document file's preview identifier, where the document file is the file to be previewed.

[0084] It should be noted that the file to be previewed refers to a document-type file, such as an electronic contract, a preview file before download, etc., and can be in PDF format, OFD format, Word type, text format, XML (Extensible Markup Language) type, etc. The preview identifier refers to the position identifier of the file information in the file to be previewed, which can be a page number, a paragraph number, or the starting information of the file information, etc., and this application embodiment does not specifically limit it in this way.

[0085] Here, when previewing specified content in a document file, it can be triggered by an operation, such as clicking the trigger control corresponding to a page of the file to be previewed; or it can be triggered by a program instruction, such as receiving a call instruction carrying a preview identifier of the file to be previewed; etc., and this application embodiment does not specifically limit it in this way.

[0086] S302. From the file to be previewed, determine the information to be previewed that corresponds to the identifier to be previewed.

[0087] In this embodiment of the application, the file to be previewed is a file that includes an identifier and file information. The identifier is used to represent the position of the file information in the file to be previewed, such as page 2 or paragraph 5. The file information refers to the content of the file to be previewed. Here, the identifier to be previewed is also a kind of identifier. Thus, the file preview device can determine the file information corresponding to the identifier to be previewed from the file to be previewed, which is referred to as the information to be previewed. For example, the content of page 2 or the content of paragraph 5.

[0088] It should be noted that the identifiers included in the file to be previewed can be the content of the file to be previewed (e.g., page numbers), or information determined according to rules (e.g., page numbers determined based on the context of the content of the file to be previewed), etc. This application embodiment does not specifically limit this. It is readily apparent that the information to be previewed, like the file to be previewed, is also document type information.

[0089] S303. Convert the image format of the information to be previewed to obtain the image to be previewed.

[0090] In this embodiment, the file preview device can preview the information to be previewed by displaying the information to be previewed; it can also convert the information to be previewed into an image, and then preview the information to be previewed based on the converted image; here, the image obtained after image format conversion is the image to be previewed.

[0091] S304. Based on the image to be previewed, preview the information to be previewed in the file to be previewed.

[0092] In this embodiment of the application, after obtaining the image to be previewed, the file preview device previews the information to be previewed in the file to be previewed by previewing the image.

[0093] Understandably, during the previewing process, the location of the file information within the preview file can be used to convert the specified information into an image for display. Therefore, previewing the specified information only requires processing that information, allowing for targeted previewing based on preview needs, thus improving file preview efficiency. Furthermore, since there are many application scenarios that support image display, converting the preview information into images expands the preview scenarios for file previews.

[0094] See Figure 4 , Figure 4 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application; such as Figure 4 As shown in the embodiment of this application, S303 can be implemented through S3031 to S3033; that is, the file preview device performs image format conversion on the information to be previewed to obtain the image to be previewed, including S3031 to S3033. Each step is described below.

[0095] S3031. Convert the image format of the preview information to obtain the image to be processed.

[0096] It should be noted that after the file preview device converts the image format of the information to be previewed, the resulting image to be previewed is the image to be processed, which is the original image corresponding to the information to be previewed.

[0097] S3032. Obtain the preview object information corresponding to the identifier to be previewed.

[0098] It should be noted that when the file preview device obtains the preview identifier, the preview identifier is associated with relevant information about the preview object, namely the preview object information; the preview object information includes at least one of the preview object, preview time, and preview device; wherein, the preview object is the object that previews the information to be previewed in the file to be previewed, such as the currently logged-in account, or the preview account obtained from the request; the preview time is the time corresponding to the request to preview the information to be previewed; and the preview device is the device that requests to preview the information to be previewed in the file to be previewed.

[0099] S3033. Implant the preview object information into the image to be processed to obtain the image to be previewed.

[0100] In this embodiment, the file preview device can directly use the image to be processed as the image to be previewed corresponding to the preview information, or it can process the image to be processed, embed the preview object information into the image to be processed, and then use it as the image to be previewed corresponding to the preview information; here, the image to be processed after embedding the preview object information is the image to be previewed.

[0101] Understandably, by embedding the preview object information into the image after the preview information has been converted, the file preview device can trace the source of the preview image, thereby improving the security of file preview.

[0102] In this embodiment, S3033 can be implemented through S30331 to S30334; that is, the file preview device embeds the preview object information into the image to be processed to obtain the image to be previewed, including S30331 to S30334. Each step is described below.

[0103] S30331. Generate a watermark image that includes preview object information.

[0104] It should be noted that the watermark image includes preview object information. Here, the preview object information can be the explicit content of the watermark image or the implicit content of the watermark image. This application embodiment does not specifically limit this.

[0105] S30332. Perform domain transformation on the watermark image and the image to be processed respectively to obtain the watermark domain image corresponding to the watermark image and the image to be processed corresponding to the image to be processed.

[0106] In this embodiment, the file preview device can add a watermark image to the spatial domain information of the image to be processed, and it can also add a watermark image to the frequency domain information of the image to be processed, etc. This embodiment does not specifically limit the specific additions. When the file preview device adds a watermark image to the frequency domain information of the image to be processed, the domain transformations performed on both the watermark image and the image to be processed are frequency domain transformations; and when the watermark image is added to the spatial domain information of the image to be processed, the domain transformations performed on both the watermark image and the image to be processed are spatial domain transformations.

[0107] It should be noted that the watermarked image after domain transformation is the watermarked domain image, and the image to be processed after domain transformation is the image to be processed domain image.

[0108] S30333: Merge the watermarked image and the image to be processed to obtain a preview image to be transformed.

[0109] In this embodiment of the application, the file preview device fuses the watermarked image and the image to be processed, and the fusion result is the preview image to be transformed; it is easy to see that the preview image to be transformed is spatial domain image information or temporal domain image information.

[0110] S30334. Perform an inverse domain transformation on the image to be transformed to obtain the image to be previewed.

[0111] In this embodiment of the application, since the preview image to be transformed is image information after domain transformation, it may be spatial domain image information or frequency domain image information; therefore, the file preview device performs an inverse transformation on the preview image to be transformed based on the domain transformation, that is, performs an inverse domain transformation, and the preview image to be transformed obtained after inverse transformation is the preview image to be previewed.

[0112] It should be noted that domain transformation and inverse domain transformation are two relative transformation processes, such as Fourier transform and inverse Fourier transform.

[0113] In this embodiment, S30332 can be implemented by S303321 or S303322; that is, the file preview device performs domain transformation on the watermark image and the image to be processed respectively to obtain the watermark domain image corresponding to the watermark image and the image to be processed corresponding to the image to be processed, including S303321 or S303322. Each step is described below.

[0114] S303321. Perform frequency domain transformation on the watermark image and the image to be processed respectively to obtain the watermark frequency domain image corresponding to the watermark image and the image to be processed frequency domain image corresponding to the image to be processed, wherein the watermark frequency domain image is the watermark domain image and the image to be processed frequency domain image is the image to be processed.

[0115] It should be noted that when the file preview device performs domain transformation on the watermark image and the image to be processed into frequency domain transformation, the resulting image in the frequency domain corresponding to the watermark image is the watermark frequency domain image, i.e., the watermark domain image, and the resulting image in the frequency domain corresponding to the image to be processed is the image in the frequency domain to be processed, i.e., the image in the domain to be processed.

[0116] S303322. Perform spatial transformation on the watermark image and the image to be processed respectively to obtain the watermark spatial image corresponding to the watermark image and the image to be processed spatial image corresponding to the image to be processed. The watermark spatial image is the watermark domain image and the image to be processed is the image to be processed.

[0117] It should be noted that when the file preview device performs domain transformation on the watermark image and the image to be processed into spatial transformation, the resulting image in the spatial domain corresponding to the watermark image is the watermark spatial domain image, i.e., the watermark domain image, and the resulting image in the spatial domain corresponding to the image to be processed is the image in the spatial domain to be processed, i.e., the image in the domain to be processed.

[0118] In this embodiment of the application, S304 may be followed by S305 to S307; that is, after the file preview device previews the preview information in the file based on the image to be previewed, the file preview method may further include S305 to S307. Each step will be described below.

[0119] S305. When it is determined that the image to be previewed is the image to be decoded, perform a domain transformation on the image to be decoded to obtain the image to be transformed.

[0120] In this embodiment, the file preview device also has the function of decoding watermarked images. Here, when the file preview device determines that the image to be previewed is an image that has been maliciously spread, or when it needs to determine the watermarked image of the image to be previewed according to business requirements, it also determines that the image to be previewed is a preview image to be decoded. At this time, the file preview device performs watermarked image decoding processing on the preview image to be previewed; first, the file preview device performs a domain transformation on the preview image to be decoded, which is also a domain transformation of the preview image to be previewed. The resulting domain-transformed preview image to be decoded is the object that underwent the inverse domain transformation during the process of adding the watermarked image to the image to be processed, i.e., the preview image to be transformed. The domain transformation here is the same as the domain transformation in S30332, and will not be described again in this embodiment.

[0121] S306. Obtain the image difference between the preview image to be transformed and the image to be processed corresponding to the preview image.

[0122] In this embodiment, the file preview device can determine the corresponding original image, i.e., the image to be processed, based on the marking information on the preview image to be decoded, or it can determine the corresponding original image based on an image similarity matching method, etc. This embodiment does not specifically limit the specific determination. Here, since the preview image to be transformed is frequency domain image information or spatial domain image information, the file preview device needs to obtain the frequency domain image information or spatial domain image information corresponding to the image to be processed, i.e., the image to be processed.

[0123] It should be noted that the file preview device can obtain the image difference between the preview image to be transformed and the image to be processed by subtraction; the marking information on the preview image to be decoded can be file name, page number or paragraph identifier, etc.

[0124] S307. Perform an inverse domain transformation on the image differences to obtain a watermark image that includes preview object information.

[0125] It should be noted that since the image differences are frequency domain or spatial domain image information, the file preview device needs to perform an inverse domain transformation on the image differences to obtain the image used for presentation. Here, the file preview device performs an inverse domain transformation on the image differences, and the resulting inverse domain transformation includes the watermark image containing the preview object information.

[0126] Understandably, by decoding the watermark image that includes information about the preview object, it is possible to trace the source of the preview image, thereby improving the security of file previews.

[0127] See Figure 5 , Figure 5 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application; as shown Figure 5 As shown in the embodiment of this application, S304 can be implemented through S3041 to S3044; that is, the file preview device previews the information to be previewed in the file to be previewed based on the image to be previewed, including S3041 to S3044. Each step is described below.

[0128] S3041. Store the image to be previewed and obtain the generated image preview link.

[0129] It should be noted that after the file preview device obtains the image to be previewed, it stores the image and generates a link to preview the image based on the storage path of the stored image, thus obtaining the image preview link.

[0130] S3042. Obtain the preview time corresponding to the identifier to be previewed.

[0131] In this embodiment, after obtaining the image preview link, the file preview device can further enhance the security of file preview by processing the image preview link's expiration date. Here, the file preview device determines the expiration date of the image preview link based on the time when the preview identifier is obtained, i.e., the preview time. The preview time can be the time when the request to obtain the preview identifier is received, or the time when the operation to determine the preview identifier is received from the preview object, etc., and this embodiment does not specifically limit this.

[0132] S3043. Based on the preview time and link validity period, determine the preview validity period of the image preview link.

[0133] It should be noted that the file preview device uses the preview time as the start time for timing. Based on a preset time period used to determine the link validity period (i.e., the link validity period), it determines the length of the link validity period from the start of the preview time, thus obtaining the preview validity segment. The link validity period can be obtained through settings, such as 5 minutes or 3 minutes, or it can be fixed.

[0134] S3044. When the current time obtained is within the preview period, the stored image to be previewed is displayed based on the image preview link. The displayed stored image to be previewed is used to preview the information to be previewed in the file to be previewed.

[0135] In this embodiment, when the file preview device displays an image to be previewed based on an image preview link, it first obtains the current time of displaying the image to be previewed, i.e., the current time; then, it determines the relationship between the current time and the preview validity period. If the current time is within the preview validity period, it indicates that the image preview link is valid; at this time, the file preview device obtains the stored image to be previewed through the image preview link and displays the image to be previewed. It is easy to see that by displaying the image to be previewed, the preview of the information to be previewed in the file to be previewed is achieved.

[0136] It should be noted that the function of displaying the image to be previewed can also be implemented through another device different from the file preview device; in this case, when the file preview device determines that the current time is within the preview period, it will send the image to be previewed obtained through the image preview link to the other device so that the image to be previewed can be displayed on the other device.

[0137] In this embodiment of the application, after obtaining the image preview link, the preview time and link validity period can be added to the image preview link. At this time, the file preview device determines whether the added image preview link is invalid based on the preview time and link validity period in the added image preview link and the current time; or, the validity period corresponding to the preview time and link validity period is determined in real time based on the current time in the added image preview link, a validity period identifier is generated, and then the validity period identifier is used to determine whether the added image preview link is invalid.

[0138] In this embodiment, S3044 may be followed by S3045 to S3049; that is, after the file preview device displays the stored image to be previewed, the file preview method may further include S3045 to S3049. Each step will be described below.

[0139] S3045. In response to the operation of obtaining the link for the image to be previewed, the image preview link is determined as the sharing link.

[0140] It should be noted that when the user corresponding to the preview object performs the operation of obtaining the image preview link for the image to be previewed, the file preview device also receives the link obtaining operation for the image to be previewed; at this time, the file preview device responds to the link obtaining operation and obtains the image preview link, which is the sharing link, used to share the image to be previewed.

[0141] For example, see Figure 6 , Figure 6 This is a schematic diagram illustrating an exemplary link acquisition operation provided in an embodiment of this application; as shown... Figure 6 As shown, on page 6-1 displaying the image to be previewed 6-11, when you long-press the image to be previewed 6-11 and select the "Get Link" option 6-121 from the displayed options page 6-12, you will receive the link retrieval operation. It is easy to see that the link retrieval operation includes the operation of long-pressing the image to be previewed 6-11 and the operation of selecting option 6-121.

[0142] S3046. In response to a sending operation for a shared link, the shared link is sent to the sharing device.

[0143] In this embodiment of the application, when the user corresponding to the preview object performs the operation of sharing the obtained sharing link, for example, by sending the sharing link to the sharing object through an instant messaging client, the file preview device also receives the sending operation for the sharing link; at this time, the file preview device responds to the sending operation and sends the sharing link to the sharing object.

[0144] It should be noted that the sharing object corresponds to the sharing device, and the sharing device establishes a communication connection with the file preview device.

[0145] S3047. In response to an image browsing request sent by a sharing device carrying a sharing link, obtain the image browsing time.

[0146] It's important to note that when the sharing target triggers browsing of the image to be previewed based on the sharing link sent by the file preview device, the sharing device also receives the image browsing operation for the sharing link. At this point, in response to this image browsing operation, the sharing device sends an image browsing request carrying the sharing link to the file preview device. The file preview device then responds to this image browsing request and obtains the time corresponding to the image browsing request, thus acquiring the image browsing time. In other words, the image browsing time is the time when the sharing device triggers browsing of the image to be previewed based on the sharing link.

[0147] S3048. When the image viewing time is outside the preview validity period, send a link failure message to the sharing device.

[0148] It should be noted that the file preview device determines the relationship between the image browsing time and the preview validity period. If it determines that the image browsing time is outside the preview validity period, it indicates that the sharing link is invalid. Therefore, the file preview device ends the file preview process, that is, it does not obtain the image to be previewed based on the sharing link (image generation link), but sends a link invalidation prompt message to the sharing device so that the sharing device displays the link invalidation prompt message.

[0149] S3049. When the image browsing time is within the preview validity period, send the image to be previewed to the sharing device based on the sharing link.

[0150] It should be noted that the file preview device determines the relationship between the image browsing time and the preview validity period. If the image browsing time is determined to be within the preview validity period, it indicates that the sharing link is valid. Therefore, the file preview device obtains the image to be previewed based on the sharing link (image generation link) and sends the image to be previewed to the sharing device so that the sharing device can display the image to be previewed and complete the browsing of the image to be previewed on the sharing device.

[0151] See Figure 7 , Figure 7 This is another optional flowchart illustrating the file preview method provided in the embodiments of this application; as shown Figure 7 As shown in the embodiments of this application, after S301 and before S302, S308 may also be included; that is, after the file preview device obtains the preview identifier of the file to be previewed and before determining the preview information corresponding to the preview identifier from the file to be previewed, the file preview method further includes S308, which will be described below.

[0152] S308. Obtain the set of previewable objects corresponding to the file to be previewed, and the preview object corresponding to the preview identifier.

[0153] It should be noted that the previewable object set is a collection of objects that have preview permissions for the file to be previewed, including at least one previewable object.

[0154] Accordingly, see also Figure 7 S302 can be achieved through S3021; ​​that is, the file preview device determines the preview information corresponding to the preview identifier from the file to be previewed, including S3021, which will be explained below.

[0155] S3021. When the preview object belongs to the set of previewable objects, determine the preview information corresponding to the preview identifier from the file to be previewed.

[0156] It should be noted that when the file preview device determines that the previewable object is included in the set of previewable objects, it means that the previewable object has the permission to preview the information to be previewed in the file to be previewed. At this time, the file preview device will then proceed with the process of previewing the information to be previewed in the file to be previewed. Conversely, when the file preview device determines that the previewable object is not included in the set of previewable objects, it means that the previewable object does not have the permission to preview the information to be previewed in the file to be previewed. At this time, the file preview device will terminate the process of previewing the information to be previewed in the file to be previewed.

[0157] Understandably, file preview devices perform authentication before processing the information to be previewed in the file, and only proceed with file preview after successful authentication, which can improve the security of file preview.

[0158] In this embodiment of the application, S304 may be followed by S309 and S310; that is, after the file preview device previews the preview information in the file based on the image to be previewed, the file preview method may further include S309 and S310. Each step will be described below.

[0159] S309. Obtain the new preview identifier for the file to be previewed.

[0160] It should be noted that the new preview identifier is obtained after the preview identifier and is also the identifier corresponding to the file to be previewed.

[0161] S310. When the new preview identifier is a preview identifier, preview the preview information in the preview file corresponding to the new preview identifier based on the preview image.

[0162] It should be noted that when the new preview identifier is a preview identifier, it means that the file information in the preview file corresponding to the new preview identifier is also preview information. The preview information has already obtained the preview image when the preview identifier was obtained. Therefore, the file preview device directly displays the preview image to preview the preview information in the preview file corresponding to the new preview identifier.

[0163] In this embodiment of the application, image reuse can also be achieved in another way; that is, after the file preview device converts the image format of the information to be previewed and obtains the image to be processed, it obtains a new preview identifier for the file to be previewed. When the new preview identifier is the same as the preview identifier, it obtains the new preview object information corresponding to the new preview identifier, and embeds the new preview object information into the image to be processed to obtain a new preview image. Based on the new preview image, it previews the information to be previewed in the file to be previewed that corresponds to the new preview identifier.

[0164] Understandably, by reusing the images converted from the information to be previewed (either the image to be previewed or the image to be processed), the preview of the information to be previewed can be achieved without repeatedly converting the image format, which reduces the resource consumption of file preview and improves the efficiency of file preview.

[0165] In this embodiment, S301 can be implemented through S3011 to S3013; that is, the file preview device obtains the preview identifier of the file to be previewed, including S3011 to S3013. Each step is described below.

[0166] S3011, Display file preview control.

[0167] It should be noted that the file preview control is used to trigger a preview of the file to be previewed, such as the "Preview" button for an electronic contract, or the "Read Online" button for an online document.

[0168] S3012. In response to a preview request operation performed on the file preview control, display preview navigation information for the file to be previewed.

[0169] In this embodiment of the application, when a user who is previewing a file triggers the file preview control to preview the file, the file preview device receives a preview request operation applied to the file preview control; at this time, the file preview device responds to the preview request operation and displays navigation information for previewing the file.

[0170] It should be noted that the preview navigation information includes at least one of preview progress information, preview navigation controls, and initial preview images; wherein, the preview progress information refers to the preview progress of the file to be previewed, which may be a progress bar, a relative number, etc., and this application embodiment does not specifically limit this; the preview navigation control is used to trigger the preview of the file to be previewed, which may be a thumbnail, a marker, a table of contents, etc., and this application embodiment does not specifically limit this; furthermore, the preview navigation control corresponds to the initial preview image through the marker of the initial preview image. For example, the preview navigation control is a preset number of thumbnail sequences including thumbnails of the initial preview image, and the thumbnails of the initial preview image in the preview navigation control are displayed with markers; the initial preview image is any preview image corresponding to the file to be previewed, such as the image corresponding to the homepage of the file to be previewed.

[0171] S3013, In response to a preview operation on the preview navigation information, obtain the identifier to be previewed.

[0172] It should be noted that when a user previewing a file performs an operation to preview specified file information within the file to be previewed, the file preview device receives the preview operation for the preview navigation information; at this time, the file preview device responds to the preview operation and obtains the preview identifier.

[0173] In this embodiment of the application, when the preview navigation information includes preview progress information and initial preview image, S3013 can be implemented through S30131; that is, the file preview device responds to the preview operation for the preview navigation information and obtains the preview identifier, including S30131, which will be described below.

[0174] S30131. In response to a preview operation applied to the initial preview image, obtain the identifier to be previewed.

[0175] It should be noted that when a user performs an operation to preview file information in a file to be previewed using the initial preview image, such as performing a swipe operation on the initial preview image, the file preview device receives the preview operation; at this time, the file preview device responds to the preview operation and obtains the preview identifier; where the preview identifier is the previous or next identifier of the identifier corresponding to the initial preview image.

[0176] See Figure 8 , Figure 8 This is an exemplary schematic diagram of obtaining a preview identifier provided in an embodiment of this application; as shown... Figure 8 As shown, when the file to be previewed is an electronic contract, page 8-1 displays a title 8-11, an initial preview image 8-12, and preview progress information 8-13, as well as a prompt message 8-14. The initial preview image 8-12 corresponds to the information on the first page of the electronic contract; in the preview progress information 8-13, "1 / 35" indicates that "1" represents the identifier (page number) corresponding to the initial preview image, and "35" represents the total number of identifiers (total page numbers) of the electronic contract; sliding the initial preview image 8-12 allows previewing the information on other pages of the electronic contract, and the operation of sliding the initial preview image 8-12 is the preview operation.

[0177] In this embodiment of the application, when the preview navigation information includes preview progress information, preview navigation controls and initial preview image, S3013 can also be implemented through S30132; that is, the file preview device responds to the preview operation for the preview navigation information and obtains the preview identifier, including S30132, which will be described below.

[0178] S30132. In response to a preview operation performed on the preview directory in the preview navigation control, obtain the identifier to be previewed.

[0179] It should be noted that when a user performs an operation to preview file information in a file to be previewed through the preview navigation control, such as scrolling the information displayed on the preview navigation control or clicking the information displayed on the preview navigation control, the file preview device receives the preview operation; at this time, the file preview device responds to the preview operation and obtains the preview indicator.

[0180] See Figure 9 , Figure 9 This is another exemplary schematic diagram of obtaining the identifier to be previewed provided in the embodiments of this application; as shown Figure 9 As shown, when the file to be previewed is an online document, page 9-1 displays a title 9-11, an initial preview image 9-12, preview progress information 9-13, and preview navigation controls 9-14. The initial preview image 9-12 corresponds to the information on the first page of the online document; in the preview progress information 9-13, "1 / 6" indicates that "1" represents the identifier (page number) corresponding to the initial preview image, and "6" represents the total number of identifiers (total page numbers) in the electronic contract; the preview navigation controls 9-14 are thumbnails including the initial preview image 9-12. Figure 9-1 A preset number of 41 (5) thumbnail sequences, and a thumbnail of the initial preview image in the preview navigation control. Figure 9-1 41 is the marker display; here, the preview identifier is obtained by sliding the preview navigation control 9-14. During the sliding preview navigation control 9-14, the thumbnail sequence changes adaptively. Alternatively, the preview identifier can be obtained by clicking any thumbnail in the thumbnail sequence of the preview navigation control 9-14. Both the sliding preview navigation control 9-14 and the clicking preview navigation control 9-14 are preview operations. It is easy to see that the preview operation can also be the operation of scrolling first and then clicking.

[0181] In this embodiment of the application, when the preview navigation information includes at least preview progress information and initial preview image, S304 can also be implemented through S30410; that is, the file preview device previews the preview information in the preview file based on the preview image, including S30410, which will be described below.

[0182] S30410, Display the image to be previewed in the display area of ​​the initial preview image, and update the current identifier in the preview progress information to the preview identifier.

[0183] It should be noted that the file preview device replaces the initial preview image with the image to be previewed and updates the preview progress information, that is, updates the current identifier in the preview progress information to the identifier to be previewed.

[0184] In this embodiment, S301 can also be implemented through S3014 and S3015; that is, the file preview device obtains the preview identifier of the file to be previewed, including S3014 and S3015. The steps are described below.

[0185] S3014. Receive a preview call request sent by the preview device.

[0186] In this embodiment, when the preview device sends a request to the file preview device to preview specified file information in the file to be previewed according to business needs, the file preview device receives the preview call request sent by the preview device. At this time, the file preview method corresponding to the file preview device acts as a call interface, receives the call from the preview device, responds to the call from the preview device, and executes the file preview method provided in this embodiment.

[0187] S3015. Obtain the preview identifier of the file to be previewed from the preview call request.

[0188] It should be noted that since the preview call request is used to request a preview of the specified file information in the file to be previewed, the preview call request carries the preview identifier of the file to be previewed. Thus, the file preview device can obtain the preview identifier of the file to be previewed from the preview call request.

[0189] In this embodiment, the file preview device can also implement the file preview method through the following steps: obtaining a file to be previewed; dividing the file to be previewed into a sequence of pages based on the page numbers of the file to be previewed; converting the sequence of pages into images to obtain a sequence of images to be processed; obtaining information to be implanted, wherein the information to be implanted is used to trace the browsing history of the file to be previewed; implanting the preview object information into each image to be processed in the sequence of images to be processed in sequence to obtain a sequence of images to be previewed corresponding to the sequence of images to be processed; and previewing the file to be previewed based on the sequence of images to be previewed.

[0190] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0191] See Figure 10 , Figure 10 This is a flowchart illustrating an exemplary file preview method provided in an embodiment of this application; as shown... Figure 10 As shown, when the user swipes... Figure 8 See the initial preview images 8-12, or click [link]. Figure 9When the preview service 10-1 receives any thumbnail in the thumbnail sequence corresponding to the preview navigation control 9-14, it also receives page number 10-12 (preview identifier) ​​of the electronic contract 10-11 (file to be previewed); in addition, when the preview service 10-1 receives page number 10-12, it will also receive the user's swipe... Figure 8 See the initial preview images 8-12, or click [link]. Figure 9 The preview navigation control 9-14 displays the time 10-13 (preview time) and login account 10-14 (preview object) of any thumbnail in the thumbnail sequence. Next, the preview service 10-1 sends the page number 10-12, time 10-13, and login account 10-14 of the electronic contract 10-11 to the link generation service 10-2.

[0192] The link generation service 10-2 is used to perform authentication processing based on the received login account 10-14 10-21. If the authentication fails, it sends a prompt message 10-22 indicating that the user does not have permission to preview to the preview service 10-1; while if the authentication is successful, it sends the page number 10-12, time 10-13, and login account 10-14 of the electronic contract 10-11 to the image processing service 10-3.

[0193] Image processing service 10-3 is used to generate an image 10-31 based on page number 10-12 of the received electronic contract 10-11, that is, to generate an image 10-32 (the image to be processed) from the contract content (the information to be previewed) corresponding to page number 10-12 of the electronic contract 10-11; then, based on the received time 10-13 and login account 10-14 (time 10-13 and login account 10-14 are the preview object information) on image 10-32, that is, to embed time 10-13 and login account 10-14 into image 10-32, to obtain an image 10-34 (the image to be previewed) for preview. Finally, image 10-34 is stored in database 10-4, and the storage path 10-35 of image 10-34 is sent to link generation service 10-2.

[0194] The link generation service 10-2 is also used to perform image link generation processing 10-23 based on the storage path 10-35 to obtain image link 10-24 (image preview link), and to perform link validity processing 10-25 on image link 10-24 based on the received time 10-13, that is, to determine the validity period (preview validity period) of image link 10-24, and to add a validity period identifier to image link 10-24 based on the determined validity period to obtain image link 10-26 (image preview link); finally, image link 10-26 is sent to preview service 10-1.

[0195] The preview service 10-1 is also used to access the image download service 10-5 based on the received image link 10-26.

[0196] Image download service 10-5 is used to perform timeliness judgment processing on image link 10-26 10-51. If the result obtained is that image link 10-26 has expired, then image link expiration information is sent to preview service 10-1 10-52; if the result obtained is that image link 10-26 has not expired, then image download processing is performed based on image link 10-26 10-53, that is, image 10-34 is obtained from database 10-4 through image link 10-26, and image 10-34 is sent to preview service 10-1.

[0197] The preview service 10-1 is also used to display a link failure message based on the received image link failure information 10-52; it is also used to display the received image 10-34 to preview the contract content corresponding to page number 10-12 of the electronic contract 10-11.

[0198] In addition, the image processing service 10-3 also includes blind watermark decoding processing 10-36.

[0199] Below, based on Figure 10 The process of obtaining image links will be explained further; see [link to documentation]. Figure 11 , Figure 11 This is a schematic diagram illustrating an exemplary process for obtaining an image preview link, provided in an embodiment of this application; Figure 11 As shown, this exemplary process of obtaining the image to be previewed includes:

[0200] S1101, Begin.

[0201] S1102. Determine whether the authentication was successful; that is... Figure 10 The authentication process is described in section 10-21. If yes, execute S1103; otherwise, execute S1108.

[0202] S1103. Generate images of the contract content corresponding to the page numbers of the electronic contract. That is... Figure 10 Image generation and processing 10-31.

[0203] S1104. Embed a blind watermark into the generated image. That is... Figure 10 Blind watermarking processing in 10-33.

[0204] S1105. Store the image with the embedded blind watermark in the database. Figure 10 The image processing service 10-3 stores image 10-34 into database 10-4.

[0205] S1106. Generate image links based on storage paths. That is... Figure 10 Image link generation and processing in 10-23.

[0206] S1107. Add a time-sensitive marker to image links. That is... Figure 10 Link timeliness processing 10-25.

[0207] S1108, End.

[0208] Below, based on Figure 10 Explain the process of embedding and decoding blind watermarks; see [link / reference]. Figure 12 , Figure 12 This is a schematic diagram illustrating an exemplary blind watermark embedding process provided in an embodiment of this application; as shown... Figure 12 As shown, for including Figure 10 The image with the watermark 12-1 (time 10-13 and login account 10-14) and the original image 12-2 are included. Figure 10 Images 10-32 and the image to be processed are subjected to frequency domain transformation 12-3, and the transformed results (watermarked image and image to be processed image) are fused 12-4. Then, the fused result (preview image to be transformed) is subjected to inverse frequency domain transformation 12-5 (inverse domain transformation), thus obtaining preview image 12-6. Figure 10 (Images 10-34 in the image).

[0209] based on Figure 12 See Figure 13 , Figure 13 This is a schematic diagram of an exemplary blind watermark decoding process provided in an embodiment of this application; as shown... Figure 13 As shown, for the preview image 12-6, the corresponding original image 12-2 is obtained; frequency domain transformation 12-3 is performed on the preview image 12-6 and the original image 12-2 respectively, and the transformed results (the preview image to be transformed and the image to be processed) are subtracted 13-1. Then, the subtraction result (image difference) is subjected to inverse frequency domain transformation 12-5 to obtain the result including... Figure 10 The watermark image in the image is dated 10-13 and the login account was 10-14, and the image is dated 12-1.

[0210] It is understood that the file preview method provided in this application, on the one hand, expands the preview scenario of the file to be previewed (e.g., an electronic contract) by converting the file to be previewed (e.g., a page number) into an image according to the identifier to be previewed (e.g., page number); on the other hand, it expands the preview scenario by storing the converted image (e.g., ...). Figure 10 Images 10-34 in the image library enable image reuse, improving the preview efficiency of the file to be previewed and reducing resource consumption. On the other hand, by embedding blind watermarks into the converted images, the source can be quickly traced, improving the security of the file to be previewed.

[0211] The following description continues to illustrate the exemplary structure of the file preview device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software module stored in the file preview device 455 of the memory 450 may include:

[0212] The identifier acquisition module 4551 is used to acquire the preview identifier of the file to be previewed, wherein the file to be previewed refers to a document type file, and the preview identifier refers to the position identifier of the file information in the file to be previewed.

[0213] The information determination module 4552 is used to determine the preview information corresponding to the preview identifier from the preview file;

[0214] Image conversion module 4553 is used to convert the image format of the information to be previewed to obtain the image to be previewed;

[0215] The information preview module 4554 is used to preview the information to be previewed in the file to be previewed based on the image to be previewed.

[0216] In this embodiment of the application, the image conversion module 4553 is further configured to convert the image format of the information to be previewed to obtain an image to be processed; obtain the preview object information corresponding to the preview identifier, wherein the preview object information includes at least one of preview object, preview time, and preview device; and embed the preview object information into the image to be processed to obtain the image to be previewed.

[0217] In this embodiment of the application, the image conversion module 4553 is further configured to generate a watermark image including the preview object information; perform domain transformation on the watermark image and the image to be processed respectively to obtain a watermark domain image corresponding to the watermark image and a processing domain image corresponding to the image to be processed; fuse the watermark domain image and the processing domain image to obtain a preview image to be transformed; and perform an inverse domain transformation on the preview image to be transformed to obtain the preview image to be previewed.

[0218] In this embodiment, the image conversion module 4553 is further configured to perform frequency domain transformation on the watermark image and the image to be processed respectively, to obtain a watermark frequency domain image corresponding to the watermark image and a processing frequency domain image corresponding to the image to be processed, wherein the watermark frequency domain image is the watermark domain image and the processing frequency domain image is the processing domain image; or, to perform spatial domain transformation on the watermark image and the image to be processed respectively, to obtain a watermark spatial domain image corresponding to the watermark image and a processing spatial domain image corresponding to the image to be processed, wherein the watermark spatial domain image is the watermark domain image and the processing spatial domain image is the processing domain image.

[0219] In this embodiment of the application, the file preview device 455 further includes an image decoding module 4555, which is used to perform a domain transformation on the image to be decoded when it is determined that the image to be previewed is a preview image to be decoded, to obtain the preview image to be transformed; to obtain the image difference between the preview image to be transformed and the image to be processed corresponding to the image to be previewed, and to perform an inverse domain transformation on the image difference to obtain the watermark image including the preview object information.

[0220] In this embodiment of the application, the information preview module 4554 is further configured to store the image to be previewed, obtain the generated image preview link; obtain the preview time corresponding to the preview identifier; determine the preview validity period of the image preview link based on the preview time and the link validity period; when the obtained current time is within the preview validity period, display the stored image to be previewed based on the image preview link, wherein the displayed stored image to be previewed is used to preview the information to be previewed in the file to be previewed.

[0221] In this embodiment of the application, the information preview module 4554 is further configured to: determine the image preview link as a sharing link in response to a link acquisition operation for the image to be previewed; send the sharing link to a sharing device in response to a sending operation for the sharing link; obtain the image browsing time in response to an image browsing request carrying the sharing link sent by the sharing device; send a link failure prompt message to the sharing device when the image browsing time is outside the preview validity period; and send the image to be previewed to the sharing device based on the sharing link when the image browsing time is within the preview validity period.

[0222] In this embodiment of the application, the file preview device 455 further includes a preview authentication module 4556, which is used to obtain the set of previewable objects corresponding to the file to be previewed, and the preview object corresponding to the preview identifier.

[0223] In this embodiment of the application, the information determination module 4552 is further configured to determine the preview information corresponding to the preview identifier from the preview file when the preview object belongs to the previewable object set.

[0224] In this embodiment of the application, the information preview module 4554 is further configured to obtain a new preview identifier for the file to be previewed, wherein the new preview identifier is obtained after the preview identifier; when the new preview identifier is the preview identifier, the preview information corresponding to the new preview identifier in the file to be previewed is previewed based on the preview image.

[0225] In this embodiment of the application, the identifier acquisition module 4551 is further configured to display a file preview control, wherein the file preview control is used to trigger a preview of the file to be previewed; in response to a preview request operation performed on the file preview control, display preview navigation information of the file to be previewed, wherein the preview navigation information includes at least one of preview progress information, preview navigation control, and initial preview image; and in response to a preview operation on the preview navigation information, acquire the identifier to be previewed.

[0226] In this embodiment of the application, when the preview navigation information includes the preview progress information and the initial preview image, the identifier acquisition module 4551 is further configured to acquire the identifier to be previewed in response to the preview operation performed on the initial preview image; when the preview navigation information includes the preview progress information, the preview navigation control, and the initial preview image, the identifier acquisition module 4551 is further configured to acquire the identifier to be previewed in response to the preview operation performed on the preview directory in the preview navigation control.

[0227] In this embodiment of the application, when the preview navigation information includes at least the preview progress information and the initial preview image, the information preview module 4554 is further configured to display the image to be previewed in the display area of ​​the initial preview image, and update the current identifier in the preview progress information to the image to be previewed.

[0228] In this embodiment of the application, the identifier acquisition module 4551 is further configured to receive a preview call request sent by the preview device; and obtain the preview identifier of the file to be previewed from the preview call request.

[0229] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the file preview method described in this application.

[0230] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to execute the file preview method provided in this application. For example, ... Figure 3 The file preview method is shown.

[0231] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0232] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0233] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0234] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0235] In summary, the file preview method provided by this application has several advantages. First, during the preview process, the specified information to be previewed can be converted into an image for display based on its position within the file. Therefore, previewing the specified information only requires processing that information, thus improving the efficiency of file previewing. Second, converting the file to be previewed into an image based on the preview identifier expands the preview scenarios. Third, storing the converted image enables image reuse, improving preview efficiency and reducing resource consumption. Fourth, embedding a blind watermark into the converted image allows for rapid traceability, enhancing the security of previewing the file.

[0236] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A file preview method, characterized in that, include: Obtain the preview identifier of the file to be previewed, wherein the file to be previewed refers to a document type file, and the preview identifier refers to the position identifier of the file information in the file to be previewed within the file to be previewed; From the file to be previewed, determine the preview information corresponding to the preview identifier; The image format of the information to be previewed is converted to obtain the image to be processed; Obtain the preview object information corresponding to the preview identifier, wherein the preview object information includes the preview object, preview time, and preview device; The preview object information is used as a blind watermark and implanted into the image to be processed to obtain the preview image; Based on the image to be previewed, obtain the image preview link; Based on the preview time and the preset link validity period, a preview validity period is determined with the preview time as the starting point and the duration as the link validity period. When the current time is obtained within the preview period, the image to be previewed is displayed based on the image preview link of the image to be previewed, wherein the image to be previewed is used to preview the preview information in the file to be previewed; In response to the link acquisition operation for the image to be previewed, the image preview link is determined as a shareable link; In response to the sending operation for the shared link, the shared link is sent to the sharing device; In response to an image browsing request carrying the sharing link sent by the sharing device, the image browsing time is obtained; When the image viewing time is outside the preview time period, a link failure message is sent to the sharing device. When the image viewing time is within the preview period, the image to be previewed is sent to the sharing device based on the sharing link.

2. The method according to claim 1, characterized in that, The step of embedding the preview object information as a blind watermark into the image to be processed to obtain the preview image includes: Generate a watermark image that includes the information of the preview object; Perform domain transformations on the watermark image and the image to be processed respectively to obtain a watermark domain image corresponding to the watermark image and a processing domain image corresponding to the image to be processed. By fusing the watermarked image and the image to be processed, a preview image to be transformed is obtained; Perform an inverse domain transformation on the preview image to be transformed to obtain the preview image.

3. The method according to claim 2, characterized in that, The step of performing domain transformations on the watermark image and the image to be processed, respectively, to obtain a watermark domain image corresponding to the watermark image and a processing domain image corresponding to the image to be processed, includes: Frequency domain transformations are performed on the watermark image and the image to be processed, respectively, to obtain a watermark frequency domain image corresponding to the watermark image and a processing frequency domain image corresponding to the image to be processed, wherein the watermark frequency domain image is the watermark domain image and the processing frequency domain image is the processing domain image; or... Spatial transformations are performed on the watermark image and the image to be processed, respectively, to obtain a watermark spatial image corresponding to the watermark image and a spatial image to be processed corresponding to the image to be processed, wherein the watermark spatial image is the watermark domain image and the spatial image to be processed is the spatial image to be processed.

4. The method according to claim 2 or 3, characterized in that, After displaying the image to be previewed based on the image preview link, the method further includes: When it is determined that the image to be previewed is a preview image to be decoded, a domain transformation is performed on the preview image to be decoded to obtain the preview image to be transformed. Obtain the image difference between the preview image to be transformed and the image to be processed corresponding to the preview image; Perform an inverse domain transformation on the image differences to obtain the watermark image that includes the preview object information.

5. The method according to any one of claims 1 to 3, characterized in that, After obtaining the preview identifier of the file to be previewed, and before determining the preview information corresponding to the preview identifier from the file to be previewed, the method further includes: Obtain the set of previewable objects corresponding to the file to be previewed, and the preview object corresponding to the preview identifier; The step of determining the preview information corresponding to the preview identifier from the preview file includes: When the preview object belongs to the set of previewable objects, the preview information corresponding to the preview identifier is determined from the preview file.

6. The method according to any one of claims 1 to 3, characterized in that, After displaying the image to be previewed based on the image preview link, the method further includes: Obtain a new preview identifier for the file to be previewed, wherein the new preview identifier is obtained after the previous preview identifier; When the new preview identifier is the preview identifier, the preview information corresponding to the new preview identifier in the preview file is previewed based on the preview image.

7. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the preview identifier of the file to be previewed includes: A file preview control is displayed, wherein the file preview control is used to trigger a preview of the file to be previewed; In response to a preview request operation applied to the file preview control, preview navigation information of the file to be previewed is displayed, wherein the preview navigation information includes at least one of preview progress information, preview navigation control, and initial preview image; In response to a preview operation on the preview navigation information, the identifier to be previewed is obtained.

8. The method according to claim 7, characterized in that, When the preview navigation information includes the preview progress information and the initial preview image, the step of obtaining the preview identifier in response to a preview operation on the preview navigation information includes: In response to the preview operation applied to the initial preview image, the identifier to be previewed is obtained; When the preview navigation information includes the preview progress information, the preview navigation control, and the initial preview image, the preview identifier is obtained in response to the preview operation performed on the preview directory in the preview navigation control. When the preview navigation information includes at least the preview progress information and the initial preview image, the image to be previewed is displayed in the display area of ​​the initial preview image, and the current identifier in the preview progress information is updated to the identifier to be previewed.

9. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the preview identifier of the file to be previewed includes: Receive preview request sent by the preview device; Obtain the preview identifier of the file to be previewed from the preview call request.

10. A file preview device, characterized in that, include: The identifier acquisition module is used to acquire the preview identifier of the file to be previewed, wherein the file to be previewed refers to a document type file, and the preview identifier refers to the position identifier of the file information in the file to be previewed within the file to be previewed; The information determination module is used to determine the preview information corresponding to the preview identifier from the preview file; The image conversion module is used to convert the image format of the information to be previewed to obtain the image to be processed; to obtain the preview object information corresponding to the preview identifier, wherein the preview object information includes the preview object, preview time and preview device; and to embed the preview object information as a blind watermark into the image to be processed to obtain the image to be previewed. The information preview module is used to: obtain an image preview link based on the image to be previewed; determine a preview validity period based on the preview time and a preset link validity period, with the preview time as the starting point and the duration as the link validity period; when the obtained current time is within the preview validity period, display the image to be previewed based on the image preview link, wherein the image to be previewed is used to preview the information to be previewed in the file to be previewed; in response to the link acquisition operation for the image to be previewed, determine the image preview link as a sharing link; in response to the sending operation for the sharing link, send the sharing link to a sharing device; in response to the image browsing request carrying the sharing link sent by the sharing device, obtain the image browsing time; when the image browsing time is outside the preview validity period, send a link failure prompt message to the sharing device; when the image browsing time is within the preview validity period, send the image to be previewed to the sharing device based on the sharing link.

11. The apparatus according to claim 10, characterized in that, The image conversion module is also used for: Generate a watermark image that includes the information of the preview object; Perform domain transformations on the watermark image and the image to be processed respectively to obtain a watermark domain image corresponding to the watermark image and a processing domain image corresponding to the image to be processed. By fusing the watermarked image and the image to be processed, a preview image to be transformed is obtained; Perform an inverse domain transformation on the preview image to be transformed to obtain the preview image.

12. The apparatus according to claim 11, characterized in that, The image conversion module is also used for: Frequency domain transformations are performed on the watermark image and the image to be processed, respectively, to obtain a watermark frequency domain image corresponding to the watermark image and a processing frequency domain image corresponding to the image to be processed, wherein the watermark frequency domain image is the watermark domain image and the processing frequency domain image is the processing domain image; or... Spatial transformations are performed on the watermark image and the image to be processed, respectively, to obtain a watermark spatial image corresponding to the watermark image and a spatial image to be processed corresponding to the image to be processed, wherein the watermark spatial image is the watermark domain image and the spatial image to be processed is the spatial image to be processed.

13. A file preview device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the method according to any one of claims 1 to 9.

14. A computer-readable storage medium, characterized in that, It stores executable instructions for implementing the method according to any one of claims 1 to 9 when executed by a processor.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Page sharing method and device

    CN104765744A

  • Online document preview method, online document preview device, computer equipment and storage medium

    CN108256114A

  • Method and device for file preview processing

    CN111191257A

  • Watermark adding method and device, watermark extracting method and device and electronic equipment

    CN111737662A