Aggregation method and system for uniformly accessing, previewing and editing all types of files

Through the combination of preview gateway and related modules, the preview editing efficiency and permission management problems caused by file format differences in the existing technology are solved, and the unified access to preview editing of all types of files is realized, and the system compatibility and management capabilities are improved. .

CN118981452APending Publication Date: 2024-11-19SICHUAN LEWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411058571.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing preview editing system cannot process all types of files uniformly, resulting in users needing to switch between different applications, which is inefficient and error-prone, and the permission control of multi-format files is difficult to centrally manage.

Method used

Through the preview gateway as a unified entrance, access keys and security keys are used for signature verification, file format conversion and permission control are carried out, and files are unified access preview editing, including traffic control, authentication, format conversion, permission control and Content processing module to ensure compatibility and security of file formats.

Benefits of technology

It realizes unified preview and editing of various file formats, improves development efficiency, simplifies application development process, enhances system compatibility and management capabilities, and ensures correct processing of preview requests and precise control of user permissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981452A_ABST
    Figure CN118981452A_ABST
Patent Text Reader

Abstract

The invention discloses an aggregation method and system for unified access, preview and editing of all types of files, and belongs to the technical field of file processing. According to the invention, the preview gateway is used as a unified entrance, so that the automatic distribution and processing of the preview flow are realized. According to the method, intelligent routing and filtering can be carried out according to the file type and the suffix name, so that the preview request can be accurately forwarded to a back-end service system. And meanwhile, a flexible control mechanism is provided, and fine-grained preview mode control is allowed for different applications. The unique access key and the security key are generated for each application, so that the preview mode can be accurately controlled, and the requirements of different applications are met. Meanwhile, the preview gateway also provides a set of standard preview formats, so that application calling becomes simpler and more consistent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of file processing, and in particular relates to an aggregation method and system for unified access, preview and editing of all types of files. Background Art

[0002] With the rapid development of Internet technology, electronic documents have become an indispensable part of people's daily work and life. More and more users are trying to preview and edit all types of files online. Electronic documents of different formats require different applications to open and edit, which brings great inconvenience to users, as shown in the following: First, existing preview editing systems are usually designed based on specific file formats and cannot achieve unified processing of all types of files; Second, business docking requires switching between different applications to process documents in different formats. This approach is not only inefficient but also prone to errors; Third, the existing multi-format file docking permission systems are independent of each other and cannot centrally manage different types of permissions. However, due to the wide variety of file formats and different processing methods, this poses certain challenges to developers. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide an aggregation method and system for unified access, preview and editing of all types of files.

[0004] The objective of the present invention is achieved through the following technical solutions: The first aspect of the present invention discloses an aggregation method for unified access, preview and editing of all types of files, including: S100. The application assembles the preview editing address of the file according to its own access key and security key, as well as the signature verification algorithm; S200. The user creates a preview edit request in the application, and the application sends the preview edit request to the service capability module. The service capability module verifies the basic parameters. For parameters that fail to be verified, the service capability module returns the corresponding exception code and terminates the subsequent process. S300. The preview gateway compares the file extension with the file preview and editing support list stored in Redis, and returns the corresponding exception code for unsupported formats; S400. The authentication module performs signature verification on the preview edit request. If the signature verification fails, the preview edit request is blocked; S500. The format conversion module confirms whether file transcoding is required according to the stored conversion rules. If so, the file transcoding logic is called to convert the file into the corresponding format; S600. The format conversion module sends the request content to the corresponding content processing module; the content processing module determines whether to perform file format transcoding according to the correspondence between the transcoding source format and the target format recorded in the database. If transcoding is required, the transcoding logic is called to perform transcoding, and the transcoded file is stored in the object storage, and the original storage address is replaced with the object storage address; if transcoding is not required, the original storage address is directly used; S700. The content processing module resets the path information of the preview edit request according to the file type; S800. The content processing module encodes the download address of the file that needs to be transcoded for preview editing, adds a verification signature to the encoded download address, generates a new download address for the file and sends it to the back-end preview editing system; for files that do not need to be transcoded, the download address of the file is directly sent to the back-end preview editing system; S900. The content processing module deletes the original parameter key and adds the parameter key of the back-end preview service through the request param parameter according to the API interface corresponding to the back-end preview service, using the same value value, and also deletes the preview file path address and adds the parameters required for the back-end preview service; S1000. The content processing module queries the permission details of a specific application according to the appid, and adds the permission details of the application to the corresponding parameter list; S1100. The content processing module executes the reverse proxy logic to automatically adapt and forward the preview editing request to the corresponding preview editing system in the backend; S1200. The content processing module performs reverse proxy according to the cluster configuration content of the recorded preview editing system, and reversely proxies to the backend preview editing service in proportion to the recorded backend preview service cluster information and the backend service configuration; S1300. If the preview editing system file needs to be transcoded, after receiving the corresponding request, the transmitted file URL address is analyzed and decoded, and the file content is downloaded to the local in the system. The preview editing system analyzes the file content and converts it into the required content for preview editing rendering; S1400. The preview editing system writes the permission control parameters into the preview editing implementation according to the permission control parameters transmitted from the preview gateway. The preview editing service determines whether to execute the control according to the permission control parameters. S1500. After receiving the file data response data returned by the backend editing system, the content processing module replaces the path in the data stream with the address of the preview gateway, and then compresses the response data with gzip, and renders the page content in the Web browser; S1600. When the front-end browser renders, it will download the file content according to the preview file address returned to the browser by the preview network disk. The download address is downloaded from the file service module of the preview gateway. The file service module parses the original download address from the encrypted parameters and performs proxy download; S1700. When outputting the rendering effect content, the Web browser controls the front-end effect through js according to the returned permission parameters; S1800. The front-end page loads static resource content or initiates an ajax request to the preview gateway to obtain the corresponding content request. After the service capability module obtains the request, the service capability module converts the video stream segment offset information of the pronunciation video into the corresponding audio and video content processing module of golang according to the path type mark; S1900. After the audio and video content processing module replaces the video stream address, it reversely proxies to the specific audio and video service system, obtains the corresponding resources and returns the corresponding response content to the content processing module. The content processing module receives the video stream content, and the preview gateway outputs the static resource content and performs the completed preview or editing presentation in the Web browser.

[0005] Furthermore, the method further comprises: The authentication module of the preview gateway generates a unique access key and security key for each application.

[0006] Furthermore, the method further comprises: Create a list of supported file preview and edits in advance, and then store the list in Redis.

[0007] Furthermore, the signature verification is: performing signature verification of md5(AK+sha1(SK+URL+sign_time)) parameters and path.

[0008] The second aspect of the present invention discloses an aggregation system for unified access, preview and editing of all types of files, including: Traffic control module, used to count the number of preview calls made by each application in real time; Preview and edit system, which is used to support collaborative preview and edit capabilities; The file service module is used to preview and edit the storage of files and provide reading based on local remote files; Authentication module, used to provide authentication access capabilities for API interfaces; The permission control module is used to authenticate the file preview, edit, copy, focus, and print; Format conversion module, used to provide conversion capability between files of the same format; Capability abstraction module, used to encapsulate the unified preview editing API provided by file preview editing; Traffic control module: used to control the access traffic of different formats and different users; Content processing module: reset and replace request and response parameters.

[0009] The beneficial effects of the present invention are: (1) The present invention uses the preview gateway as a unified entrance to achieve automatic distribution and processing of preview traffic. It can intelligently route and filter according to file type and suffix name to ensure that preview requests can be accurately forwarded to the backend business system. At the same time, it provides a flexible control mechanism to allow fine-grained preview mode control for different applications. By generating unique access keys and security keys for each application, precise control of the preview mode can be achieved to meet the needs of different applications. At the same time, the preview gateway also provides a set of standard preview formats, making application calls simpler and more consistent; (2) Through the present invention, all file formats, whether documents, images, compressed packages, 3D, or audio and video, can be previewed and edited through a unified interface. This eliminates the need for developers to develop separate interfaces for each file format, greatly improving development efficiency; (3) Since a standard preview format is provided, developers do not need to worry about the specific format and content of the file when previewing and editing the file. This greatly simplifies the application development process and reduces errors caused by file format conversion; (4) The present invention can be easily connected with third-party applications such as wps, onlyoffice, Yongzhongoffice, cad, audio and video, 3D, compressed packages, etc., which not only expands the application scope of the system, but also enhances the compatibility of the system with multiple formats; (5) The preview gateway can automatically distribute and filter preview requests based on file type and extension. This automated approach greatly improves processing efficiency and ensures that each preview request is processed correctly. (6) The statistical function of the present invention can record the preview times and various statistical information of each application in detail. This provides data support for system optimization and also provides users with system usage statistics to help users better manage and optimize their own applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flow chart of the polymerization method of the present invention. DETAILED DESCRIPTION

[0011] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0012] See also Figure 1 The present invention provides an aggregation method and system for unified access, preview and editing of all types of files: The first aspect of this embodiment provides an aggregation method for unified access preview and editing of all types of files. Figure 1 As shown, the method includes S100 to S1900.

[0013] S100. The application assembles the preview editing address of the file according to its own access key and security key, as well as the signature verification algorithm.

[0014] Signature assembly URL: Assemble the parameter information of the request, including uri and query parameters. The value of the query parameter needs to be urlencoded, and then the key of the query parameter is sorted in ascending order according to the ASCII code. The complete signature sign = md5(AK+sha1(SK+URL+sign_time)). Example: The preview request assembly example address is as follows: http: / / xxx.com / v1 / vec_file / edit?ak=ak20219999&download_url=aHR0cDovLzE5Mi4xNjguNTUuMjI6ODA4MC9hYWEueGxzeA&file_name=%E4%B8%AD%E6%96%87.xlsx&sign=adasdasdasdsa&sign_time=1635335369.

[0015] The preview gateway includes a flow control module, a preview editing system, a file service module, an authentication module, a permission control module, a format conversion module, a capability abstraction module, a flow control module and a content processing module.

[0016] In some embodiments, the authentication module of the preview gateway generates a unique access key AK and security key SK for each application, ensuring the security and independence of the access method of each application.

[0017] S200. The user creates a preview edit request in the application, and the application sends the preview edit request to the service capability module and verifies the basic parameters. For parameters that fail to be verified, the service capability module returns the corresponding exception code and terminates the subsequent process.

[0018] Verification of basic parameters includes verification of whether basic parameters such as ak, download_url, file_name, sign, sign_time, etc. are empty, regular expression matching, etc.

[0019] In some embodiments, the service capability module provides reverse proxy service capabilities for static and ajax. Different preview service systems at the back end may have different static resources for different format files, etc. The preview gateway uses the reverse proxy mode to proxy the various static and ajax at the back end to the browser for rendering.

[0020] S300. The preview gateway compares the file extension with the file preview editing support list stored in Redis, and returns the corresponding exception code for unsupported formats. For supported formats, the next step is to use the authentication module to verify the signature and continue the backward process.

[0021] In this embodiment, a file preview and editing support list is created in advance, and then the file preview and editing list is stored in Redis.

[0022] S400. The authentication module performs signature verification on the preview and edit request. If the signature verification fails, the preview and edit request is blocked. If the signature verification passes, the next step is to enter the flow control module and enter the file preview and edit phase according to the real-time flow situation.

[0023] In some embodiments, the signature verification is: performing a signature verification of the md5(AK+sha1(SK+URL+sign_time)) parameters and the path.

[0024] S500. Confirm whether transcoding is required based on the file extension. The format conversion module downloads the file content, provides the content and analyzes whether file format transcoding is required based on the record of whether a certain format file needs transcoding stored in the database. If so, the file transcoding logic is called to convert the file into the corresponding format.

[0025] S600. The format conversion module sends the request content to the corresponding content processing module; the content processing module determines whether to perform file format transcoding based on the correspondence between the transcoding source format and the target format recorded in the database. If transcoding is required, the transcoding logic is called to perform transcoding, and the transcoded file is stored in the object storage, using the object storage address to replace the original storage address; if transcoding is not required, the original storage address is used directly.

[0026] S700. The content processing module resets the path information of the preview editing request according to the file type.

[0027] For example, the content processing module resets information such as the path of the preview editing request according to different backend preview editing systems such as office, audio and video, pictures, compressed packages, and 3D.

[0028] S800. The content processing module encodes the download address of the file that needs to be transcoded for preview and editing, adds a verification signature to the encoded download address, generates a new download address for the file and sends it to the back-end preview and editing system; for files that do not need to be transcoded, the download address of the file is directly sent to the back-end preview and editing system.

[0029] S900. The content processing module deletes the original parameter key and adds the parameter key of the backend preview service through the requestparam parameter according to the corresponding parameters of the API interface required by the backend specific preview service, using the same value. It also deletes the preview file path address and adds the path of the backend preview service.

[0030] S1000. The content processing module queries the permission details of the specific application according to the appid, and adds the permission details of the application (copy, edit, print, download, version, focus) to the corresponding file address, ak, sk and other parameter lists.

[0031] S1100. The content processing module executes the reverse proxy logic to automatically adapt and forward the preview editing request to the corresponding preview editing system of the backend.

[0032] Specifically, after replacing parameters, paths, etc. with the rules required by the preview service, the content processing module executes the reverse proxy logic and automatically adapts and forwards the request to the corresponding preview editing system at the backend.

[0033] S1200. The content processing module performs reverse proxy according to the cluster configuration content of the recorded preview editing system, and reverse proxies to the backend preview editing service in proportion according to the recorded backend preview service cluster information and the proportion of the backend service configuration.

[0034] Specifically, the content processing module will perform load proxy or cluster proxy according to the configuration content such as the cluster of the record preview editing system to ensure that the preview request can accurately reach the system that processes the request.

[0035] S1300. After receiving the corresponding request, the preview editing system analyzes and decodes the transmitted file URL address, and downloads the file content to the local in the system. The preview editing system analyzes the file content, converts it into the required content, and then renders the preview editing.

[0036] S1400. The preview editing system writes the permission control parameters (copy, edit, print, download, version, focus) transmitted from the preview gateway into the preview editing implementation. The preview editing service determines whether to execute the control based on the permission control parameters.

[0037] Specifically, the preview editing system writes permission control into the implementation of preview editing according to the transfer permission model, controlling permissions such as copying, editing, printing, downloading, versioning, and focus.

[0038] S1500. After receiving the file data response data returned by the backend editing system, the content processing module replaces the path in the data stream with the address of the preview gateway, then compresses the response data with gzip, and renders the page content in the Web browser.

[0039] Specifically, after receiving the response data from the reverse proxy, the content processing module of the preview gateway replaces the static and other paths in the data stream with the address of the preview gateway, for example, / a / b / c is uniformly replaced with / v1 / vec_file / media / a / b / c.

[0040] S1600. When the front-end browser renders, it will download the file content according to the preview file address returned to the browser by the preview network disk. The download address is downloaded from the file service module of the preview gateway. The file service module parses the original download address from the encrypted parameters and performs proxy download.

[0041] S1700. When outputting the rendering effect content, the Web browser controls the front-end effect through js according to the returned permission parameters.

[0042] S1800. The front-end page loads static resource content or initiates an ajax request, and initiates a request to obtain the corresponding content to the preview gateway. After the service capability module obtains the request, it marks the type of path and converts the video stream segment offset information of the audio and video into the corresponding audio and video content processing module of golang.

[0043] S1900. After the audio and video content processing module replaces the video stream address, it reversely proxies to the specific audio and video service system, obtains the corresponding resources and returns the corresponding response content to the content processing module. The content processing module receives the video stream content, and the preview gateway outputs the static resource content and performs the completed preview or editing presentation in the Web browser.

[0044] A second aspect of this embodiment provides an aggregation system for unified access, preview and editing of all types of files, including: Traffic control module, used to count the number of times each application calls preview in real time, such as call frequency, peak period, proportion of each type, proportion of each user, etc. The preview and editing system provides backend office, image, PDF, audio and video services to support collaborative preview and editing capabilities; The file service module is used to preview and edit the storage of files and provide reading based on local remote files; The authentication module is used to provide authentication access capabilities for the API interface to ensure the security of the interface; The permission control module is used to authenticate the file preview, editing, copying, focus, printing, etc. to protect the security of the file; Format conversion module, used to provide the ability to convert documents, pictures, audio and video files of the same format; Capability abstraction module, used to encapsulate the unified preview editing API provided by file preview editing; Traffic control module: used to control the access traffic of different formats and different users; Content processing module: reset and replace request and response parameters, etc.

[0045] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for unified access, preview and editing of all types of files, characterized in that: include: S100. The application assembles the preview editing address of the file according to its own access key and security key, as well as the signature verification algorithm; S200. The user creates a preview edit request in the application, and the application sends the preview edit request to the service capability module. The service capability module verifies the basic parameters. For parameters that fail to be verified, the service capability module returns the corresponding exception code and terminates the subsequent process. S300. The preview gateway compares the file extension with the file preview and editing support list stored in Redis, and returns the corresponding exception code for unsupported formats; S400. The authentication module performs signature verification on the preview edit request. If the signature verification fails, the preview edit request is blocked; S500. The format conversion module confirms whether file transcoding is required according to the stored conversion rules. If so, the file transcoding logic is called to convert the file into the corresponding format; S600. The format conversion module sends the request content to the corresponding content processing module; the content processing module determines whether to perform file format transcoding according to the correspondence between the transcoding source format and the target format recorded in the database. If transcoding is required, the transcoding logic is called to perform transcoding, and the transcoded file is stored in the object storage, and the original storage address is replaced with the object storage address; if transcoding is not required, the original storage address is directly used; S700. The content processing module resets the path information of the preview edit request according to the file type; S800. The content processing module encodes the download address of the file that needs to be transcoded for preview editing, adds a verification signature to the encoded download address, generates a new download address for the file and sends it to the back-end preview editing system; for files that do not need to be transcoded, the download address of the file is directly sent to the back-end preview editing system; S900. The content processing module deletes the original parameter key through the requestparam parameter according to the API interface corresponding to the back-end preview service, and adds the parameter key of the back-end preview service, using the same value value, and also deletes the preview file path address, and adds the parameters required for the back-end preview service; S1000. The content processing module queries the permission details of a specific application according to the appid, and adds the permission details of the application to the corresponding parameter list; S1100. The content processing module executes the reverse proxy logic to automatically adapt and forward the preview editing request to the corresponding preview editing system in the backend; S1200. The content processing module performs reverse proxy according to the cluster configuration content of the recorded preview editing system, and reversely proxies to the backend preview editing service in proportion to the recorded backend preview service cluster information and the backend service configuration; S1300. If the preview editing system file needs to be transcoded, after receiving the corresponding request, the transmitted file URL address is analyzed and decoded, and the file content is downloaded to the local in the system. The preview editing system analyzes the file content and converts it into the required content for preview editing rendering; S1400. The preview editing system writes the permission control parameters into the preview editing implementation according to the permission control parameters transmitted from the preview gateway. The preview editing service determines whether to execute the control according to the permission control parameters. S1500. After receiving the file data response data returned by the backend editing system, the content processing module replaces the path in the data stream with the address of the preview gateway, and then gzips the response data and renders the page content in the Web browser; S1600. When the front-end browser renders, it will download the file content according to the preview file address returned to the browser by the preview network disk. The download address is downloaded from the file service module of the preview gateway. The file service module parses the original download address from the encrypted parameters and performs proxy download; S1700. When outputting the rendering effect content, the Web browser controls the front-end effect through js according to the returned permission parameters; S1800. The front-end page loads static resource content or initiates an ajax request to the preview gateway to obtain the corresponding content request. After the service capability module obtains the request, the service capability module converts the video stream segment offset information of the pronunciation video into the corresponding audio and video content processing module of golang according to the path type mark; S1900. After the audio and video content processing module replaces the video stream address, it reversely proxies to the specific audio and video service system, obtains the corresponding resources and returns the corresponding response content to the content processing module. The content processing module receives the video stream content, and the preview gateway outputs the static resource content and performs the completed preview or editing presentation in the Web browser.

2. According to claim 1, a method for aggregating all types of files for unified access, preview and editing is characterized in that: The method further comprises: The authentication module of the preview gateway generates a unique access key and security key for each application.

3. According to claim 1, a method for aggregating all types of files for unified access, preview and editing is characterized in that: The method further comprises: Create a list of supported file preview and edits in advance, and then store the list in Redis.

4. According to claim 1, a method for aggregating all types of files for unified access, preview and editing is characterized in that: The signature verification is as follows: performing signature verification of md5(AK+sha1(SK+URL+sign_time)) parameters and path.

5. An aggregation system for unified access, preview and editing of all types of files, characterized by: include: Traffic control module, used to count the number of preview calls made by each application in real time; Preview and edit system, which is used to support collaborative preview and edit capabilities; The file service module is used to preview and edit the storage of files and provide reading based on local remote files; Authentication module, used to provide authentication access capabilities for API interfaces; The permission control module is used to authenticate the file preview, edit, copy, focus, and print; Format conversion module, used to provide conversion capability between files of the same format; Capability abstraction module, used to encapsulate the unified preview editing API provided by file preview editing; Traffic control module: used to control the access traffic of different formats and different users; Content processing module: reset and replace request and response parameters.

Citation Information

Cited By

  • Dynamic expansion method and system for S3 standard object storage interface and medium

    CN119720161A