CN113901355A - Method for intercepting H5 document preview sharing at iOS client - Google Patents

Method for intercepting H5 document preview sharing at iOS client Download PDF

Info

Publication number
CN113901355A
CN113901355A CN202111206661.6A CN202111206661A CN113901355A CN 113901355 A CN113901355 A CN 113901355A CN 202111206661 A CN202111206661 A CN 202111206661A CN 113901355 A CN113901355 A CN 113901355A
Authority
CN
China
Prior art keywords
document
intercepting
sandbox
judgment
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111206661.6A
Other languages
Chinese (zh)
Inventor
张福军
李祥兵
罗豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Green City Technology Industry Service Group Co ltd
Original Assignee
Green City Technology Industry Service Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Green City Technology Industry Service Group Co ltd filed Critical Green City Technology Industry Service Group Co ltd
Priority to CN202111206661.6A priority Critical patent/CN113901355A/en
Publication of CN113901355A publication Critical patent/CN113901355A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9558Details of hyperlinks; Management of linked annotations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The invention relates to a method for intercepting H5 document preview sharing at an iOS client, which comprises the steps that after a user clicks an H5 link, an APP intercepts first, the content corresponding to the current link is judged in a first stage, if the current link does not correspond to a document, the interception is removed, otherwise, document information is obtained, multi-stage judgment is carried out, display rendering is carried out when display conditions are met, and otherwise, the document corresponding to the link is downloaded and post-processing is carried out. According to the invention, a user can preview the document in the H5 content in the App in a non-inductive manner by utilizing the capability of the iOS, besides the downloading time for waiting for the first time, the user can repeatedly preview or partially download the document for a plurality of times, so that the effects of saving flow, accelerating the previewing time and improving the document previewing experience are achieved, meanwhile, in the system above the iOS11, the functions including but not limited to sharing, storing, printing and editing can be integrated, the processing capability of the user on the document at a mobile terminal is improved, and the work and life of the user are facilitated.

Description

Method for intercepting H5 document preview sharing at iOS client
Technical Field
The invention relates to the technical field of electric digital data processing, in particular to a method for intercepting H5 document preview sharing at an iOS client.
Background
With the wide application of H5 at the client App and the increasing popularity of mobile office at the mobile phone end, the demand for viewing and processing documents such as H5Word within the App is increasing.
In the prior art, the direct display document in the iOS client App is very mature, but the display processing H5 document still has certain defects, such as messy codes, incapability of realizing editing, sharing and printing functions and the like after multiple times of loading.
Disclosure of Invention
The invention solves the problems in the prior art, provides an optimized method for intercepting H5 document preview sharing at the iOS client, processes the document link at H5, further gives full play to App capability, improves the capability of a user for operating the document at a mobile terminal, and is convenient for the user to use.
The technical scheme adopted by the invention is that the method for intercepting H5 document preview sharing at the iOS client comprises the following steps:
step 1: clicking an H5 link by a user, and intercepting an APP;
step 2: the APP performs primary judgment on the content corresponding to the current link, if the content is a document, the next step is performed, and if the content is a document, the interception is removed, and the process is exited;
and step 3: acquiring document information, performing multi-stage judgment, performing display rendering if the display condition is met, and performing the next step if the display condition is not met;
and 4, step 4: and downloading the document corresponding to the link and executing post-processing.
Preferably, in step 2, the document includes an excel, word, ppt, pdf document.
Preferably, in step 2, if the content corresponding to the current link is determined to be a non-document by the first-level determination, the interception is removed, and the security protection is opened.
Preferably, in step 3, the document information is acquired and the multi-level judgment includes cache judgment and modification judgment.
Preferably, the cache determination includes the following steps:
step 3.1: acquiring a document fingerprint attached to downloading information of a current document;
step 3.2: comparing the document fingerprints with document fingerprints of files stored in an APP inner sandbox one by one;
step 3.3: and if the document with the same document fingerprint as the document fingerprint in the step 3.1 exists in the sandbox, the display condition is met, the corresponding document in the sandbox is directly displayed, and otherwise, modification judgment is executed.
Preferably, the modification judgment comprises the following steps:
step 3.4: downloading a current document;
step 3.5: comparing the current document with a file stored in an APP internal sandbox;
step 3.6: if the similarity between the current document and any file reaches a threshold value, the display condition is met, the current document is blocked and extracted relative to the modified part of the file, and the file is synchronously blocked; otherwise, performing step 4;
step 3.7: deleting the unmodified part of the current document;
step 3.8: and displaying the file corresponding to the document in the sandbox which is rendered to modify the blocks of the part for corresponding replacement.
Preferably, the modified blocks are attached to the file as replaceable document blocks and stored separately in the sandbox.
Preferably, if the modified part is a picture, the picture is stored independently.
Preferably, in step 4, performing post-processing includes storing the downloaded document in a sandbox in the APP and displaying the document.
Preferably, if any opened document has messy codes, traversing the associated file in the sandbox; if the associated file exists, the garbled area is directly opened or replaced by the blocks corresponding to the garbled area in the associated file, otherwise, an error is reported.
The invention relates to an optimized method for intercepting H5 document preview sharing at an iOS client, which comprises the steps that after a user clicks an H5 link, an APP intercepts first, the content corresponding to the current link is judged in a first stage, if the content does not correspond to the document, the interception is removed, otherwise, document information is obtained, multi-stage judgment is carried out, display rendering is carried out when display conditions are met, and otherwise, the document corresponding to the link is downloaded and post-processing is carried out.
According to the invention, a user can preview the document in the H5 content in the App in a non-inductive manner by utilizing the capability of the iOS, besides the downloading time for waiting for the first time, the user can repeatedly preview or partially download the document for a plurality of times, so that the effects of saving flow, accelerating the previewing time and improving the document previewing experience are achieved, meanwhile, in the system above the iOS11, the functions including but not limited to sharing, storing, printing and editing can be integrated, the processing capability of the user on the document at a mobile terminal is improved, and the work and life of the user are facilitated.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The present invention is described in further detail with reference to the following examples, but the scope of the present invention is not limited thereto.
The invention relates to a method for intercepting H5 document preview sharing at an iOS client, which is different from the method for opening a document by a common H5 link in an App in the prior art, and is based on the capability of the iOS, the document is coordinated and downloaded once and previewed for all or part of the document for multiple times, so that the problems of messy codes of partial models or overlarge occupied memory space when the document is opened by H5 are solved, and simultaneously, the document sharing, printing and storing can be carried out by utilizing the capability of the iOS file App (supported by more than iOS 11), and the capability of a user for operating the document at a mobile terminal is improved; the document may also be saved to a file App (supported above iOS 11), which may be implemented by a three-party App when editing of the document is required.
The method comprises the following steps:
step 1: clicking an H5 link by a user, and intercepting an APP;
step 2: the APP performs primary judgment on the content corresponding to the current link, if the content is a document, the next step is performed, and if the content is a document, the interception is removed, and the process is exited;
in the step 2, the documents include excel, word, ppt and pdf documents.
In the step 2, if the content corresponding to the current link is judged to be a non-document by the first-level judgment, the interception is removed, and the security protection is started.
In the invention, after a user clicks an H5 link, an App intercepts the link and judges whether the link is a document, specifically, judges whether the link contains documents such as excel, word, ppt, pdf and the like, if not, the original content is continuously executed, and if the links are document links of several types, the next judgment is needed to be continuously carried out.
And step 3: acquiring document information, performing multi-stage judgment, performing display rendering if the display condition is met, and performing the next step if the display condition is not met;
in the step 3, the document information is acquired and multi-level judgment including cache judgment and modification judgment is performed.
The cache judgment comprises the following steps:
step 3.1: acquiring a document fingerprint attached to downloading information of a current document;
step 3.2: comparing the document fingerprints with document fingerprints of files stored in an APP inner sandbox one by one;
step 3.3: and if the document with the same document fingerprint as the document fingerprint in the step 3.1 exists in the sandbox, the display condition is met, the corresponding document in the sandbox is directly displayed, and otherwise, modification judgment is executed.
The modification judgment comprises the following steps:
step 3.4: downloading a current document;
step 3.5: comparing the current document with a file stored in an APP internal sandbox;
step 3.6: if the similarity between the current document and any file reaches a threshold value, the display condition is met, the current document is blocked and extracted relative to the modified part of the file, and the file is synchronously blocked; otherwise, performing step 4;
step 3.7: deleting the unmodified part of the current document;
step 3.8: and displaying the file corresponding to the document in the sandbox which is rendered to modify the blocks of the part for corresponding replacement.
And in the sandbox, the modified blocks are attached to the file as replaceable document blocks and are independently stored.
And if the modified part is the picture, independently storing the picture.
In the invention, the step 3 is to compare the document with the files stored in the sandbox in the App one by one in principle, and if the files exist locally, the document display is rendered by directly using the local file and utilizing the UIDocument Interactive controller capability of the iOS.
In the invention, in practical application, the existing possibility is various, so the realization and the expansion of the method are carried out based on the basic thought;
in the aspect of implementation, namely cache judgment, namely judging whether the same document exists in the sandbox or not, wherein the comparison is realized through document fingerprints, in the application process, the document fingerprints are generally hash values of the document, and through comparing document fingerprints attached to the downloading information of the current document with document fingerprints of files in the APP sandbox, when the same document fingerprints, such as the hash values, exist, the two files are the same, the display condition is met, and the corresponding document in the sandbox can be directly displayed and rendered;
the extension comprises two situations, one is that the current document to be downloaded is a brand new document, and the other is that the current document to be downloaded is actually partially in a certain document in the sandbox, including deletion, addition, paragraph or content movement and the like, wherein the former is directly downloaded, and the latter needs to be further determined and processed; specifically, after the current document A is pre-downloaded, the document B in the sandbox with higher similarity to the current document A is marked by comparing with the file stored in the sandbox in the APP, C, D, E blocks are included in the current document A, the document B actually corresponds to C, D, F blocks, C, D blocks in the current document A are removed, E blocks are reserved, after processing, the document B is practically unchanged (still C, D, F blocks) and can be directly called and displayed, the reserved E blocks are attached to the F blocks, a new document can be formed by C, D blocks and E blocks, namely another representation of the document A, after processing, the storage space is obviously effectively reduced, and the document content is complete.
In the present invention, the threshold in step 3.6 generally means that the similar content of two documents exceeds 80% of the content of any document, and in practical application, one or more documents with the highest similarity to the current document are generally taken for processing, and even if a plurality of blocks in the current document are extracted, the total storage amount is much smaller than that of a completely stored document; when a plurality of documents with the highest similarity exist in the sandbox, the documents are all marked as the associated documents.
In the present invention, there is a case where the modified part is a picture, and generally, the picture is directly and independently stored, and the picture is directly replaced in order to avoid invalid replacement or excessive calculation amount.
And 4, step 4: and downloading the document corresponding to the link and executing post-processing.
In step 4, the post-processing includes storing the downloaded document in a sandbox in the APP and displaying the document.
If any opened document has messy codes, traversing the associated file in the sandbox; if the associated file exists, the garbled area is directly opened or replaced by the blocks corresponding to the garbled area in the associated file, otherwise, an error is reported.
In the invention, the document is downloaded by using a network request, is stored in a sandbox in the App, is prepared for local persistence for subsequent reopening, is displayed at the same time, and a user can also share, print and other operations on a software system of the iOS11 by using the iOS capability and can also edit the document by using the App supporting the editing capability.
In the invention, there is a possibility that the opened document has messy codes, which is divided into several processing logics:
(1) if the files are directly opened after cache judgment, traversing the associated files in the sandbox, and rolling back to the last normal opening or replacing the messy code areas by the blocks corresponding to the messy code areas in the associated files; the related files are the same files stored in the sandbox;
(2) if the code is opened after modification judgment, traversing the associated file in the sandbox, and replacing the messy code area by the block corresponding to the messy code area in the associated file; the related files are files with similarity exceeding a threshold value and stored in a sandbox;
(3) otherwise, an error is reported, and the document provider provides the document again.
In the invention, of course, the user can manually delete the document stored in the App.

Claims (10)

1. A method for intercepting H5 document preview sharing at an iOS client is characterized in that: the method comprises the following steps:
step 1: clicking an H5 link by a user, and intercepting an APP;
step 2: the APP performs primary judgment on the content corresponding to the current link, if the content is a document, the next step is performed, and if the content is a document, the interception is removed, and the process is exited;
and step 3: acquiring document information, performing multi-stage judgment, performing display rendering if the display condition is met, and performing the next step if the display condition is not met;
and 4, step 4: and downloading the document corresponding to the link and executing post-processing.
2. The method for intercepting H5 document preview sharing at an iOS client according to claim 1, wherein: in the step 2, the documents include excel, word, ppt and pdf documents.
3. The method for intercepting H5 document preview sharing at an iOS client according to claim 1, wherein: in the step 2, if the content corresponding to the current link is judged to be a non-document by the first-level judgment, the interception is removed, and the security protection is started.
4. The method for intercepting H5 document preview sharing at an iOS client according to claim 1, wherein: in the step 3, the document information is acquired and multi-level judgment including cache judgment and modification judgment is performed.
5. The method for intercepting H5 document preview sharing at an iOS client according to claim 4, wherein: the cache judgment comprises the following steps:
step 3.1: acquiring a document fingerprint attached to downloading information of a current document;
step 3.2: comparing the document fingerprints with document fingerprints of files stored in an APP inner sandbox one by one;
step 3.3: and if the document with the same document fingerprint as the document fingerprint in the step 3.1 exists in the sandbox, the display condition is met, the corresponding document in the sandbox is directly displayed, and otherwise, modification judgment is executed.
6. The method for intercepting H5 document preview sharing at an iOS client according to claim 5, wherein: the modification judgment comprises the following steps:
step 3.4: downloading a current document;
step 3.5: comparing the current document with a file stored in an APP internal sandbox;
step 3.6: if the similarity between the current document and any file reaches a threshold value, the display condition is met, the current document is blocked and extracted relative to the modified part of the file, and the file is synchronously blocked; otherwise, performing step 4;
step 3.7: deleting the unmodified part of the current document;
step 3.8: and displaying the file corresponding to the document in the sandbox which is rendered to modify the blocks of the part for corresponding replacement.
7. The method for intercepting H5 document preview sharing at an iOS client according to claim 6, wherein: and in the sandbox, the modified blocks are attached to the file as replaceable document blocks and are independently stored.
8. The method for intercepting H5 document preview sharing at an iOS client according to claim 6, wherein: and if the modified part is the picture, independently storing the picture.
9. The method for intercepting H5 document preview sharing at an iOS client according to claim 1, wherein: in step 4, the post-processing includes storing the downloaded document in a sandbox in the APP and displaying the document.
10. The method for intercepting H5 document preview sharing at an iOS client according to claim 9, wherein: if any opened document has messy codes, traversing the associated file in the sandbox; if the associated file exists, the garbled area is directly opened or replaced by the blocks corresponding to the garbled area in the associated file, otherwise, an error is reported.
CN202111206661.6A 2021-10-17 2021-10-17 Method for intercepting H5 document preview sharing at iOS client Pending CN113901355A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111206661.6A CN113901355A (en) 2021-10-17 2021-10-17 Method for intercepting H5 document preview sharing at iOS client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111206661.6A CN113901355A (en) 2021-10-17 2021-10-17 Method for intercepting H5 document preview sharing at iOS client

Publications (1)

Publication Number Publication Date
CN113901355A true CN113901355A (en) 2022-01-07

Family

ID=79192520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111206661.6A Pending CN113901355A (en) 2021-10-17 2021-10-17 Method for intercepting H5 document preview sharing at iOS client

Country Status (1)

Country Link
CN (1) CN113901355A (en)

Similar Documents

Publication Publication Date Title
CN110221817B (en) Data recall module and recommendation system
US20150082294A1 (en) Method and Apparatus for Generating Firmware Over the Air Upgrade Package
US20040027593A1 (en) Techniques for resolution independent rendering of images
CN104679570A (en) Image loading display method, equipment and system
US20130021361A1 (en) Method and device for rendering user interface font
US20100277754A1 (en) Mosaic image generating apparatus and method
CN1981555A (en) Method for enhancing services concerning multimedia data in mobile telephony
JP5173898B2 (en) Image processing method, image processing apparatus, and program
JP2009509272A (en) Software image processing and difference file generation
CN107408401B (en) User slider for simplified adjustment of images
CN109893854B (en) Server data management method and system
CN106713689A (en) Picture uploading method and device
US8660348B2 (en) Information processing apparatus and information processing method
KR20090091351A (en) System, method, apparatus and computer program product for providing content selection in a network environment
CN1886976A (en) Method, software and apparatus for performing actions on a wireless device using action lists and versioning
CN113901355A (en) Method for intercepting H5 document preview sharing at iOS client
CN1908952A (en) Information processing server, information processing system, information processing method and storage medium storing information processing program
CN113111281A (en) DWG drawing preview service method, system and storage medium
CN112637609B (en) Image real-time transmission method, sending end and receiving end
US7934155B2 (en) Method and electronic device for reducing size of an electronic collection of media elements
CN107562311A (en) Icon control method and device, terminal and readable storage medium storing program for executing
CN109389546B (en) Multi-block reversible watermark embedding method and device and watermark extracting method and device
CN114371810B (en) Data storage method and device of HDFS
CN113849670B (en) Method for rapidly acquiring image data of sentinels in batches
CN112085025A (en) Object segmentation method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination