A method for online browsing and modifying file contents based on object storage

By providing online browsing and modification functions in the object storage service, and using the SDK for paging processing and keyword retrieval, the problem of cumbersome file content modification operations in the existing technology is solved, and the user experience and response efficiency are improved.

CN112084149BActive Publication Date: 2024-10-18SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010909552.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-02
Publication Date
2024-10-18
Estimated Expiration
2040-09-02

AI Technical Summary

Technical Problem

Existing object storage services lack the function of online browsing and modification of file content. Users need to download files for modification and upload them manually, which makes the operation cumbersome and time-consuming, and the customized file metadata after modification will be overwritten.

Method used

Provides a method for online browsing and modification of file content based on object storage. It obtains and processes user requests through the front-end page, uses the SDK to obtain file content from object storage, supports paging operations and keyword retrieval, and decides whether to modify the content after the user has finished modifying it. Keep the original file metadata and upload the modified file directly.

Benefits of technology

It reduces users' download and upload operations, supports online browsing and modification of file content, improves user experience, and optimizes response time and object storage service pressure through paging processing and keyword retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112084149B_ABST
    Figure CN112084149B_ABST
Patent Text Reader

Abstract

The present invention provides an object storage-based file content online browsing and modification method, which belongs to the field of object storage technology. After a user clicks to modify on a front-end page, the front-end page first obtains the size of the file from the object storage, saves it to a cache, and pages the file according to the file size (the paging can be implemented by either the front-end or the back-end). The range (starting from range[0] and ending at range[0]) of the file content to be obtained on each page is set by the number of front-end pages (the number of pages can be customized by the user, with a maximum value and a minimum value), thereby reducing the response time of the front-end page and the amount of data transmitted from the object storage, thereby improving data acquisition efficiency, saving time, and optimizing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to object storage technology, and in particular to an online browsing and modification method of file content based on object storage. Background Art

[0002] Currently, there are three main types of cloud storage: block storage, file storage, and object storage. Object storage is gradually gaining an increasingly important position in the field of cloud computing storage services because it combines the advantages of high-speed direct access to disks of block storage with the distributed sharing characteristics of file storage.

[0003] Most of the object storage services provided by cloud service providers on the market do not provide the function of browsing and modifying file contents. If users need to browse or modify the contents of files, they must first download the files to the local computer or find the original files of the files locally before browsing or modifying them. And after modifying the contents of files, users also need to manually upload files to overwrite the previous files. However, when overwriting, the user-defined file metadata will also be cleared, and users need to set the metadata again after the upload is completed. In this process, users need to manually download and upload files, and record the metadata information. The whole process is cumbersome and time-consuming.

[0004] Although the existing object storage function can modify the file content, the whole process is very complicated and time-consuming, which poses a great obstacle to users modifying files. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides an online browsing and modification method for file content based on object storage. When the modification is required, it also supports keyword retrieval and retains the metadata of the original file, thereby meeting user needs and optimizing user experience from multiple aspects.

[0006] The technical solution of the present invention is:

[0007] A method for online browsing and modifying file content based on object storage includes the following steps:

[0008] 1) The front-end page obtains the parameters that need to be passed;

[0009] 2) Get and return file information;

[0010] 3) The user chooses to browse content;

[0011] 4) Process user needs and return;

[0012] 5) The front-end page sends the user modified file information;

[0013] 6) Replace the original file with the modified file.

[0014] Furthermore,

[0015] The front-end page obtains the parameters that need to be passed

[0016] When a user clicks to modify a file through the front-end page, the front-end page will first query the metadata of the modified file after receiving the request, thereby obtaining the file size information, and determine the number of pages of the file and the starting position of the pages based on the size, and then send the file information and the starting position of the file content to be obtained to the back-end of the file online browsing and modification system.

[0017] Furthermore,

[0018] Get and return file information

[0019] After the backend receives the request sent by the frontend, it obtains the content of the specified location of the file from the object storage by downloading the file-related SDK, and returns the content of the first page to the frontend page for display.

[0020] Furthermore,

[0021] Users choose to browse content,

[0022] The user selects the page number to be browsed or the keyword to be filtered. The front-end page receives the user's request and sends the parameters of the request to the back-end of the file online browsing and modification system.

[0023] Furthermore,

[0024] Process user needs and return

[0025] If the keyword information passed in by the front-end is an empty list, the back-end only needs to obtain the file content of the corresponding page number by downloading the file-related SDK, and return the content to the front-end page for display.

[0026] If the front-end passes in keyword information that is not an empty list, the back-end needs to obtain all the content of the file, page the file content on the back-end according to the front-end paging size requirements, and determine whether it contains keywords. The page number and keywords containing the keywords are saved in the form of key-values ​​until all keywords are retrieved and the list is returned to the front-end page for display (displayed in strips by keyword: keyword A: page number a page number b page number c...) If the keyword is truncated at the end and beginning of two pages, the page number where the keyword starts is returned. Users can use these page numbers to quickly locate the content that needs to be browsed or modified.

[0027] Furthermore,

[0028] The front-end page sends the user modified file information

[0029] The user can repeat steps 3 and 4 to find the file content that he needs to browse or modify. If the user makes corresponding modifications to the file content, the front-end page will store the user's modified content (including modified, deleted, and added content) and the location of the modified content in the cache system until the user has modified all the content that needs to be modified and submitted it. Before submitting, the user can choose whether to retain the metadata information of the original file. After the user submits, the front-end page will send the information of the modified content to the back-end of the file online browsing and modification system.

[0030] Furthermore,

[0031] Replace the original file with the modified file

[0032] After the file online browsing and modification system backend receives the file modification information sent by the frontend, it will obtain the entire content of the file from the object storage by downloading the file-related SDK, and modify the file content based on the key information of the file modification content (the cache information can be performed on the frontend or on the system backend). After modifying the file, based on whether to retain the original file metadata information field returned by the frontend, if the option is to retain, the system backend will assemble the modified file and the metadata of the original file, and upload it to the object storage through the SDK related to uploading the file; otherwise, the modified file will be uploaded directly. After the upload is successful, the frontend page will be notified that the modification is successful and updated to a new file.

[0033] The beneficial effects of the present invention are

[0034] It can reduce the tedious operations of users downloading and uploading back and forth, and can retain the metadata information of the original file in the modified file. By obtaining the file content online and paging according to the size of the file content, the corresponding range of content is obtained from the object storage according to the page number for display, thereby reducing the pressure on the object storage service, page response time and user request costs. At the same time, the file content can be retrieved according to multiple keywords, and the page number where the keywords are located can be displayed, which can effectively improve the user experience during use. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a workflow diagram for requesting file content for the first time;

[0036] Figure 2 It is a workflow diagram for browsing or modifying file contents. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0038] The present invention discloses an online browsing and modification method for file content based on object storage. After a user clicks to modify on a front-end page, the front-end page first obtains the size of the file from the object storage, saves it to a cache, and pages the file according to the file size (the paging can be implemented by either the front-end or the back-end). The range of the file content obtained on each page is set (starting from range[0] and ending at range[0]) through the number of front-end pages (the number of pages can be customized by the user, with a maximum value and a minimum value), thereby reducing the response time of the front-end page and the amount of data transmitted from the object storage, thereby improving data acquisition efficiency, saving time, and optimizing user experience.

[0039] At the same time, users can also filter file contents by searching keywords (multi-keyword search is supported). After the backend receives the filter field, page number and file content range, it will parse the file content obtained from the object storage, and return all page numbers (page number) and corresponding page numbers containing the keyword to the front-end page for display. Users can view and modify the corresponding content according to the page number where the displayed keyword is located.

[0040] The user modifies the file content through the front-end page. After the user confirms the modified content, the front-end page returns the content of all pages modified by the user to the back-end of the file online browsing and modification system in the form of a list. The data stream of the original file is replaced with the content returned by the front-end on the back-end, and the metadata information of the original file is retained. Finally, the file is uploaded to the object storage through the SDK, and the success result is returned to the front-end. The front-end completes the file modification and updates it to the modified file.

[0041] Through this system, users can greatly reduce tedious operations, while reducing user resource consumption as much as possible and greatly improving user experience.

[0042] in,

[0043] The file upload and download SDK includes but is not limited to file upload, file download, multi-segment upload, breakpoint resume, multi-segment download, and breakpoint download; the cache system includes but is not limited to the browser's default cache system, various databases (MySql, Oracle, Redis, etc.), local cache, etc.

[0044] This system can effectively reduce the complicated operations that users need to perform to modify files; through caching technology and retrieval system, response time and cost expenditure can be further reduced while reducing user operations; through customized upload and download SDK, the fault tolerance of the system during upload and download can be increased.

[0045] The front-end display is implemented as:

[0046] If it is not a keyword search result, users can jump to the content, browse or modify the file through ordinary page numbers.

[0047] If it is the result of a keyword search, the keyword search results displayed on the front end are highlighted keywords, and different keywords are displayed in different colors, which can be customized; users can quickly jump to the page number displayed by the keyword, or jump to the content through the ordinary page number, browse or modify the file.

[0048] The backend algorithm is implemented as:

[0049] Obtain the corresponding file content from the object storage through the front-end request.

[0050] If the front end obtains file metadata, the entire file is directly obtained, and the file size is obtained from the file metadata attributes and returned to the front end.

[0051] If the front-end requests the file content for the first time, the back-end obtains the content of the first page of the file from the object storage based on the range of each page of content passed in by the front-end, and returns it to the front-end.

[0052] If the keyword list passed in by the front-end request is not empty, the back-end will obtain the entire file content, and find all the page numbers containing the keywords by traversing, and use the keywords as keys and page numbers as values ​​to save all the relevant page numbers of the keywords and return them to the front-end.

[0053] After the front end processes the user's modification and sends the modification request to the back end, the back end first obtains the metadata information and file content of the original file and saves them; then, based on the relevant position and content of the content modified by the user, the original file content is added, modified, deleted, and other operations are performed. After processing the content, it is determined whether the user needs to retain the metadata of the original file. If so, the metadata of the original file and the modified file are combined and uploaded to the object storage; otherwise, the modified file is directly uploaded, and the modification is returned to the front end after completion. Success.

[0054] The caching of information related to user modification of file content can be implemented on the front end or on the back end.

[0055] The operation of the system can be further optimized:

[0056] When the front end requests the file content for the first time, the content is saved in pages and stored in the local database or cache system where the back-end system is located to reduce the response time of the request.

[0057] The present invention puts the modification of files online, which can avoid users from repeatedly uploading and downloading files and modifying the metadata of files. By obtaining file content in a truncated manner, the present invention can respond to user requests more quickly and reduce the pressure on object storage services. While reducing user operations, it provides a user keyword retrieval function, thereby further reducing the time and cost spent by users on modifying files and greatly improving the user experience.

[0058] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for online browsing and modifying file content based on object storage, characterized in that: The following steps are involved: 1) The front-end page obtains the parameters that need to be passed; 2) Get and return file information; 3) The user chooses to browse content; 4) Process user needs and return; 5) The front-end page sends the user modified file information; 6) Replace the original file with the modified file; In step 1), the user clicks to modify the file through the front-end page. After receiving the request, the front-end page will first query the metadata of the modified file to obtain the file size information, and determine the number of pages of the file and the starting position of the page according to the size, and send the file information and the starting position of the file content to be obtained to the back-end of the file online browsing and modification system; In step 2), after receiving the request sent by the front-end, the back-end obtains the content of the specified location of the file from the object storage by downloading the file-related SDK, and returns the content of the first page to the front-end page for display; In step 3), the user selects the page number to be browsed or the keyword to be filtered, and the front-end page receives the user's request and sends the parameters of the request to the back-end of the file online browsing and modification system; In step 4), if the keyword information passed in by the front-end is an empty list, the back-end only needs to obtain the file content of the corresponding page number by downloading the file-related SDK, and return the content to the front-end page for display; If the front-end passes in keyword information that is not an empty list, the back-end needs to obtain all the content of the file, page the file content on the back-end according to the front-end paging size requirements, and determine whether it contains keywords. The page number and keywords containing the keywords are saved in the form of key-values ​​until all keywords are retrieved and the list is returned to the front-end page for display; if the keyword is truncated at the end and beginning of two pages, the page number where the keyword starts is returned, and users can quickly locate the content they need to browse or modify through these page numbers.

2. The method according to claim 1, characterized in that In step 5), the user can repeat steps 3) and 4) to find the file content that he needs to browse or modify. If the user makes corresponding modifications to the file content, the front-end page will store the user's modified content and the location of the modified content in the cache system until the user has modified all the content that needs to be modified and submitted it. Before submitting, the user can choose whether to retain the metadata information of the original file. After the user submits, the front-end page will send the information of the modified content to the back-end of the file online browsing and modification system.

3. The method according to claim 1, characterized in that In step 6), after the file online browsing and modification system backend receives the file modification information sent by the frontend, it will obtain the entire content of the file from the object storage by downloading the file-related SDK, and modify the file content based on the key information of the file modification content. After modifying the file, based on whether to retain the original file metadata information field returned by the frontend, if the choice is to retain, the system backend will assemble the modified file and the metadata of the original file, and upload it to the object storage through the upload file-related SDK; otherwise, the modified file will be uploaded directly, and after the upload is successful, the front-end page will be notified that the modification is successful and updated to a new file.

4. The method according to claim 3, characterized in that Caching information can be done on the front end or on the back end of the system.

Citation Information

Patent Citations

  • Method for directly operating file stored at cloud end

    CN103605798A

  • Document safety access method for cloud storage environment

    CN104992124A

  • Online previewing method, device and system and cloud storage platform

    CN106874278A

  • Method and device for multiplexing SaaS platform webpage components

    CN110554874A

  • Electronic contract signing and storing method and device, computer equipment and storage medium

    CN110555299A