CN114218441B - Method for calling and displaying UOF document - Google Patents

Method for calling and displaying UOF document Download PDF

Info

Publication number
CN114218441B
CN114218441B CN202111386583.2A CN202111386583A CN114218441B CN 114218441 B CN114218441 B CN 114218441B CN 202111386583 A CN202111386583 A CN 202111386583A CN 114218441 B CN114218441 B CN 114218441B
Authority
CN
China
Prior art keywords
document
uof
user terminal
data
called
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.)
Active
Application number
CN202111386583.2A
Other languages
Chinese (zh)
Other versions
CN114218441A (en
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.)
China Standard Intelligent Security Technology Co Ltd
Original Assignee
China Standard Intelligent Security Technology 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 China Standard Intelligent Security Technology Co Ltd filed Critical China Standard Intelligent Security Technology Co Ltd
Priority to CN202111386583.2A priority Critical patent/CN114218441B/en
Publication of CN114218441A publication Critical patent/CN114218441A/en
Application granted granted Critical
Publication of CN114218441B publication Critical patent/CN114218441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/835Query processing
    • G06F16/8373Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/838Presentation of query results

Abstract

The invention provides a method for calling and displaying a UOF document, which determines corresponding actual calling demand information of the UOF document by acquiring and analyzing a document calling request from a user terminal, and then calls a proper UOF document from a document library; then, carrying out decompression processing and analysis processing on the called UOF document to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal; and finally, the display of the UOF document on the user terminal is realized by directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal or copying and displaying the called UOF document from the document library in the user terminal, so that the data burden of an application program can be effectively reduced, and the convenience of UOF document calling can be improved.

Description

Method for calling and displaying UOF document
Technical Field
The invention relates to the technical field of document calling and displaying, in particular to a method for calling and displaying a UOF document.
Background
The uof (approved office document format) document is an XML-based open document format, which is also referred to as a "standard through" document. Different application programs in mobile terminals such as smart phones and the like may need to call corresponding UOF documents for data editing in the running process. In the actual calling process, due to the influence of the running state of the application program, the required UOF document cannot be completely downloaded from the document library, so that the completed document information cannot be displayed on the mobile terminal, and the UOF document also needs to be downloaded again until the application program is restarted, which not only increases the data burden of the application program, but also cannot improve the convenience of UOF document calling.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for calling and displaying a UOF document, which determines the corresponding actual calling requirement information of the UOF document by acquiring and analyzing a document calling request from a user terminal, and then calls a proper UOF document from a document library; then, carrying out decompression processing and analysis processing on the called UOF document to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal; and finally, the display of the UOF document on the user terminal is realized by directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal or copying and displaying the called UOF document from the document library in the user terminal, so that the data burden of an application program can be effectively reduced, and the convenience of UOF document calling can be improved.
The invention provides a method for calling and displaying a UOF document, which is characterized by comprising the following steps:
step S1, obtaining a document calling request from a user terminal, and analyzing the document calling request to determine actual calling requirement information of the UOF document corresponding to the user terminal; according to the actual demand information of the UOF document, calling a proper UOF document from a document library;
step S2, carrying out decompression processing and analysis processing on the called UOF document so as to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in the document cache of the user terminal, and locking the document cache of the user terminal;
step S3, when determining that the called UOF document exists in the document cache, directly obtaining the needed UOF document from the document cache and displaying the needed UOF document in a user terminal; when determining that the called UOF document does not exist in the document cache, copying the called UOF document from the document library to a user terminal and displaying;
further, in step S1, the obtaining of the document invocation request from the user terminal, and analyzing the document invocation request to determine that the actual UOF document invocation demand information corresponding to the user terminal specifically includes:
step S101, a user terminal is instructed to send an application operation history record acquisition instruction to an application program installed by the user terminal, and the application operation history record fed back by the application program according to the application operation history data record acquisition instruction is received;
step S102, analyzing the application operation history record, and extracting a document sending and/or receiving history record of an application program from the application operation history data record; determining the unfinished document sent and/or received by the application program according to the document sending and/or document receiving history record, and taking the document information corresponding to the unfinished document sent and/or received as a document calling request of the user terminal;
step S103, analyzing the document calling request, determining UOF document information in documents which are not sent and/or received by the user terminal from the document information corresponding to the documents which are not sent and/or received, wherein the UOF document information is used as actual UOF document calling requirement information corresponding to the user terminal;
further, in step S1, the step of retrieving, according to the actual retrieval requirement information of the UOF document, a suitable UOF document from the document repository specifically includes:
determining a document name and document creation time corresponding to the UOF document to be called by the user terminal according to the actual calling requirement information of the UOF document; then, according to the document name and the document creation time, a matched UOF document is called from a document library;
further, in the step S2, the decompressing and parsing the called UOF document to obtain the document attribute data corresponding to the UOF document specifically includes:
the called UOF document is subjected to blocking processing, so that a plurality of UOF document subdata blocks are obtained; independently decompressing each UOF document subdata block to obtain a corresponding UOF document decompressed data block; splicing all the UOF document decompressed data blocks to obtain fully decompressed document data of the called UOF document;
finally, analyzing the fully decompressed document data to obtain document theme information and document version information of the called UOF document, wherein the document theme information and the document version information are used as the document attribute data;
further, in step S2, performing blocking processing on the called UOF document to obtain a plurality of UOF document sub-data blocks; independently decompressing each UOF document sub-data block to obtain a corresponding UOF document decompressed data block specifically includes:
the UOF document may have a decompressed data file when being decompressed, the decompressed data file includes a string of decompressed arrays, each bit of the decompressed array is a binary number corresponding to each byte of the UOF document before being compressed, at this time, the UOF document is firstly subjected to blocking processing according to the decompressed data file, so that after the blocking processing, a part of blocks to be decompressed are divided into independent sub-blocks, then each sub-block is decompressed, and the decompressed data is subjected to total verification, and the specific process is as follows:
step S201, using the following formula (1), according to the document division number obtained from the decompressed data file of the UOF document, performing block processing on the UOF document,
Figure BDA0003367277810000031
in the above formula (1), k1A value representing a first digit in the document partition array; k is a radical ofi+1Representing the value of the (i + 1) th bit in the document segmentation array; a isiRepresenting the ith numerical value of a decompression array in a decompression data file of the UOF document; a isi+1Representing the value of the (i + 1) th digit of a decompression array in a decompression data file of the UOF document; n represents the digit of the numerical value in the decompression array in the decompression data file of the UOF document;
obtaining a document segmentation array according to the steps, finding a bit numerical value corresponding to a numerical value of 1 from the first bit by using the document segmentation array, finding a corresponding byte digit in the UOF document according to the bit numerical value corresponding to the numerical value of 1, and segmenting the corresponding byte digit at the middle position of the corresponding byte and the previous byte, thereby segmenting the UOF document into a plurality of independent sub-data blocks; dividing the middle of the bit value in the decompression array corresponding to the value of 1 and the previous bit value to obtain a decompression sub-array corresponding to each independent sub-data block;
step S202, using the following formula (2), performing decompression processing according to each UOF document sub-data block obtained after the blocking processing of the UOF document and the corresponding decompression sub-array
Figure BDA0003367277810000041
In the above formula (3), Wt,1' represents an ASCII value of the 1 st byte in the decompressed tth sub-block; wt,1An ASCII value representing the 1 st byte in the t-th sub-data block after the blocking processing; ctRepresenting the number of bytes in the t-th sub-data block after the blocking processing; (W)t,2′→Wt,Ct') indicates the 2 nd to C th sub-data blocks after decompression processingtAn ASCII value of a byte; (W)t,2→Wt,Ct) Representing the 2 nd to C th sub data blocks after the blocking processtAn ASCII value of a byte; a. thet,cThe binary value of the c bit in the decompressed sub-array corresponding to the t sub-data block after the block processing is represented;
if it is detected
Figure BDA0003367277810000042
Then 2 nd to C th sub data blocks in the tth sub data block after the blocking processingtReplacing all the ASCII values of the bytes with the ASCII values of the 1 st bytes in the t-th sub-data block after the block processing to finish decompression, and if the decompression is detected
Figure BDA0003367277810000043
Then will (W)t,2′→Wt,Ct') the original ASCII value is kept unchanged;
substituting the value of T from 1 to T into the formula (2) to complete the operation on each sub data block so as to complete the decompression processing, wherein T represents the total number of the sub data blocks after the block division processing;
step S203, using the following formula (3), according to the decompressed data obtained after all the UOF document sub-data blocks are decompressed, obtaining check values to match with the recorded check values, and further checking whether each UOF document sub-data block is successfully decompressed,
Figure BDA0003367277810000051
in the above formula (3), η represents a check value of successful decompression of the UOF document; d represents a document check value recorded before document compression; ()2Indicating that the value in parentheses is converted to binary; sum [ ()2]The method comprises the following steps of (1) calculating the number of a numerical value in a binary number in parentheses;
if eta is 0, the UOF document is successfully decompressed; if η ≠ 0, which indicates that the UOF document is unsuccessfully decompressed, re-decompressing is required to be repeated in the steps S201-S203;
further, in step S2, the splicing processing is performed on all UOF document decompressed data blocks, so as to obtain fully decompressed document data of the called UOF document, which specifically includes:
acquiring data information of a data block head area and data information of a data block tail area of each UOF document decompressed data block;
comparing data information of the head area of each data block of the decompressed data blocks of the UOF document with data information of the tail area of the data block, so as to determine the text data connection sequence between the decompressed data blocks of different UOF documents; splicing all the UOF document decompressed data blocks according to the text data joining sequence to obtain fully decompressed document data of the called UOF document;
further, in step S2, comparing the document attribute data with the document browsing history of the user terminal, so as to determine whether the called UOF document exists in the document cache of the user terminal, and locking the document cache of the user terminal specifically includes:
step S201, the document theme information and the document version information are used as index information and are compared with the document browsing history of the application program of the user terminal, so as to determine whether the incomplete downloaded UOF document needing to be called exists in the document cache of the user terminal;
step S202, when determining that there is a UOF document which is not downloaded and needs to be called, locking a document cache of a user terminal so as not to change the document cache;
step S203, when determining that there is no Unfinished downloaded UOF document to be called, not locking the document cache of the user terminal;
further, in step S3, when it is determined that the called UOF document exists in the document cache, the specifically obtaining the required UOF document directly from the document cache and displaying the UOF document in the user terminal includes:
when determining that the unfinished and required-to-be-called UOF document exists in the document cache, indicating the application program to continue downloading the corresponding UOF document; after the downloading of the corresponding UOF document is finished, directly obtaining the needed UOF document from the document cache and displaying the UOF document in a user terminal;
further, in step S3, when it is determined that the called UOF document does not exist in the document cache, the copying and displaying the called UOF document from the document repository to the user terminal specifically includes:
and when determining that the unfinished and downloaded UOF document needing to be called does not exist in the document cache, directly copying the called UOF document from the document library to an application program of a user terminal and displaying the called UOF document.
Compared with the prior art, the method for calling and displaying the UOF document obtains and analyzes the document calling request from the user terminal so as to determine the corresponding actual calling requirement information of the UOF document, and then calls the appropriate UOF document from the document library; then, carrying out decompression processing and analysis processing on the called UOF document to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal; and finally, the display of the UOF document on the user terminal is realized by directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal or copying and displaying the called UOF document from the document library into the user terminal, so that the data burden of an application program can be effectively reduced, and the convenience of UOF document calling can be improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method for invoking and displaying a UOF document according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for calling and displaying a UOF document according to an embodiment of the present invention. The method for calling and displaying the UOF document comprises the following steps:
step S1, obtaining a document calling request from a user terminal, analyzing the document calling request, and determining actual calling requirement information of the UOF document corresponding to the user terminal; according to the actual call demand information of the UOF document, calling a proper UOF document from the document library;
step S2, carrying out decompression processing and analysis processing on the called UOF document so as to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal and lock the document cache of the user terminal;
step S3, when determining that the called UOF document exists in the document cache, directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal; and when determining that the called UOF document does not exist in the document cache, copying the called UOF document from the document library to the user terminal and displaying the called UOF document.
The beneficial effects of the above technical scheme are: the method for calling and displaying the UOF document obtains and analyzes a document calling request from a user terminal so as to determine corresponding actual calling demand information of the UOF document, and then calls a proper UOF document from a document library; then, carrying out decompression processing and analysis processing on the called UOF document to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal; and finally, the display of the UOF document on the user terminal is realized by directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal or copying and displaying the called UOF document from the document library into the user terminal, so that the data burden of an application program can be effectively reduced, and the convenience of UOF document calling can be improved.
Preferably, in step S1, the obtaining of the document invocation request from the user terminal, and analyzing the document invocation request, so as to determine that the actual UOF document invocation demand information corresponding to the user terminal specifically includes:
step S101, a user terminal is instructed to send an application operation history record acquisition instruction to an application program installed by the user terminal, and the application operation history record fed back by the application program according to the application operation history data record acquisition instruction is received;
step S102, analyzing the application operation history record, and extracting the document sending and/or receiving history record of the application program from the application operation history data record; determining unfinished sending and/or receiving documents of the application program according to the document sending and/or receiving history records, and taking document information corresponding to the unfinished sending and/or receiving documents as a document calling request of the user terminal;
step S103, analyzing the document calling request, determining UOF document information in the documents which are not sent and/or received by the user terminal from the document information corresponding to the documents which are not sent and/or received, and taking the UOF document information as actual calling requirement information of the UOF document corresponding to the user terminal.
The beneficial effects of the above technical scheme are: different application programs APP are usually installed in a user terminal such as a smart phone, and these application programs APP may send or receive different types of documents in the running process, where these documents may include but are not limited to UOF documents, and meanwhile, corresponding UOF document sending or receiving record information may exist in the running history of the application program APP, and it is also clear whether the UOF document completes sending or receiving corresponding document information in the sending or receiving record information. The document information is used as a document calling request, actual calling requirement information of the UOF document of the user terminal can be conveniently and accurately determined, and therefore the UOF document can be conveniently and quickly searched and positioned in a document library subsequently.
Preferably, in step S1, the step of retrieving an appropriate UOF document from the document repository according to the UOF document actual retrieval requirement information specifically includes:
determining a document name and document creation time corresponding to the UOF document to be called by the user terminal according to the actual calling requirement information of the UOF document; and then, according to the document name and the document creation time, calling the matched UOF document from the document library.
The beneficial effects of the above technical scheme are: and determining the document name and the document creation time of the UOF document to be called from the actual UOF document calling requirement information, and calling the matched and consistent UOF document from the document library by taking the determined document name and document creation time as the reference, so that the calling accuracy of the UOF document is improved.
Preferably, in step S2, the decompressing and parsing the called UOF document to obtain the document attribute data corresponding to the UOF document specifically includes:
the called UOF document is subjected to blocking processing, so that a plurality of UOF document subdata blocks are obtained; independently decompressing each UOF document subdata block to obtain a corresponding UOF document decompressed data block; splicing all the UOF document decompressed data blocks to obtain fully decompressed document data of the called UOF document;
and finally, analyzing the full decompressed document data to obtain document theme information and document version information of the called UOF document, wherein the document theme information and the document version information are used as the document attribute data.
The beneficial effects of the above technical scheme are: since the called UOF document is usually a large data document in a compressed state, if the called UOF document is directly decompressed, the decompression workload is excessively large, and a decompression error is likely to occur. By sequentially carrying out the blocking processing and the decompression processing on the called UOF document, the parallel decompression processing can be conveniently carried out on a plurality of UPF document sub-data blocks obtained by the blocking processing, so that the decompression processing efficiency is improved. And finally, splicing all the decompressed data blocks of the UOF document to obtain the UOF document by restoration.
Preferably, in the step S2, the called UOF document is subjected to blocking processing, so as to obtain a plurality of UOF document sub-data blocks; independently decompressing each UOF document sub-data block to obtain a corresponding UOF document decompressed data block specifically comprises:
when the UOF document is decompressed, there may be a decompressed data file, where the decompressed data file includes a string of decompressed arrays, each bit of the decompressed array is a binary number corresponding to each byte of the UOF document before compression (for example, if the binary number of the 2 nd bit of the decompressed array is 1, it indicates that the 2 nd byte of the UOF document before compression is compressed, that is, the data of the 2 nd byte is emptied to be 0 for compression), at this time, the UOF document is firstly subjected to block processing according to the decompressed data file, so that a part of the UOF document that needs to be decompressed is divided into independent sub-data blocks after the block processing, then each sub-data block is decompressed, and the decompressed data is subjected to total verification, which specifically includes:
step S201, using the following formula (1), according to the decompressed data file of the UOF document, obtaining a document division group, and performing block processing on the UOF document,
Figure BDA0003367277810000101
in the above formula (1), k1A value representing a first digit in the document partition array; k is a radical ofi+1The value representing the (i + 1) th bit in the document segmentation array; a isiThe ith numerical value of a decompression array in a decompression data file of the UOF document is represented; a is ai+1The value of the (i + 1) th digit of a decompression array in a decompression data file of the UOF document is represented; n represents the digit of the numerical value in the decompression array in the decompression data file of the UOF document;
obtaining a document segmentation array according to the steps, finding a bit value corresponding to a value of 1 from the first bit by using the document segmentation array, finding a corresponding byte digit in the UOF document according to the bit value corresponding to the value of 1, and segmenting the corresponding byte digit at the middle position of the corresponding byte and the previous byte, thereby segmenting the UOF document into a plurality of independent sub-data blocks; dividing the middle of the bit value in the decompression array corresponding to the value of 1 and the previous bit value to obtain a decompression sub-array corresponding to each independent sub-data block;
for example, if the decompressed array is [0,1,1,1,0,0,0,1,1, 1] then the obtained document division array is [0,1,0,0,1,0,0, 0], then the division place is the boundary part of 0 and 1, the middle of the byte is divided corresponding to the document, and then the decompressed array is also divided into [0], [1,1,1], [0,0,0], [1,1,1 ];
step S202, using the following formula (2), performing decompression processing according to each UOF document sub-data block obtained after the block processing of the UOF document and the corresponding decompression sub-array
Figure BDA0003367277810000111
In the above formula (3), Wt,1' represents the ASCII value of the 1 st byte in the t-th sub-data block after decompression processing; w is a group oft,1An ASCII value representing the 1 st byte in the t-th sub-data block after the blocking processing; ctRepresenting the number of bytes in the t-th sub-data block after the blocking processing; (W)t,2′→Wt,Ct') indicates the 2 nd to C th sub-data blocks after decompression processingtAn ASCII value of a byte; (W)t,2→Wt,Ct) Representing the 2 nd to C th sub data blocks after the blocking processtAn ASCII value of a byte; a. thet,cRepresenting the binary value of the c bit in the decompressed sub-array corresponding to the t sub-data block after the blocking processing;
if it is detected
Figure BDA0003367277810000112
Then the 2 nd to the C th sub data blocks after the blocking process are carried outtReplacing all the ASCII values of the bytes with the ASCII values of the 1 st bytes in the t-th sub-data block after the block processing to finish decompression, and if the decompression is detected
Figure BDA0003367277810000113
Then will (W)t,2′→Wt,Ct') keep the original ASCII value unchanged;
substituting the value of T from 1 to T into the formula (2) to complete the operation of each sub data block so as to complete the decompression processing, wherein T represents the total number of the sub data blocks after the block division processing;
step S203, using the following formula (3), according to the decompressed data obtained after all the UOF document sub-data blocks are decompressed, obtaining a check value to match with the recorded check value, and further checking whether each UOF document sub-data block is successfully decompressed,
Figure BDA0003367277810000114
in the above formula (3), η represents a check value of successful decompression of the UOF document; d represents a document check value recorded before document compression; ()2Means to convert the value in parentheses to binary; sum [ ()2]The method comprises the following steps of (1) calculating the number of a numerical value in a binary number in parentheses;
if eta is 0, the UOF document is successfully decompressed; if η ≠ 0, which indicates that the UOF document is unsuccessfully decompressed, it is necessary to repeat the above steps S201 to S203 again to perform re-decompression.
The beneficial effects of the above technical scheme are: the method has the advantages that the UOF document is subjected to block processing by utilizing the formula (1) according to the document segmentation number obtained by decompressing the data file of the UOF document, and then the parts of the document which need to be decompressed and do not need to be decompressed are segmented, so that the subsequent decompression calculation is facilitated, the decompression time is saved, and the working efficiency of the system is improved; then, carrying out decompression processing on each UOF document sub-data block obtained by carrying out blocking processing according to the UOF document and a decompression sub-array corresponding to the UOF document sub-data block by using the formula (2), and supplementing the part with data removed before back to finish decompression operation; and (3) matching the decompressed data calculation check value after decompression processing is carried out on all the UOF document sub-data blocks according to the formula (3) with the recorded check value to check whether each UOF document sub-data block is successfully decompressed, and checking through checking the check value to ensure the reliability and accuracy of decompression and reduce the decompression error rate.
Preferably, in step S2, the splicing processing all UOF document decompressed data blocks, so as to obtain fully decompressed document data of the called UOF document specifically includes:
acquiring data information of a data block head area and data information of a data block tail area of each UOF document decompressed data block;
comparing data information of the head area of each data block of all the decompressed data blocks of the UOF document with data information of the tail area of the data block, so as to determine the text data joining sequence among the decompressed data blocks of different UOF documents; and according to the text data connection sequence, splicing all the UOF document decompressed data blocks to obtain the fully decompressed document data of the called UOF document.
The beneficial effects of the above technical scheme are: data text relevance exists between data block head area data information and data block tail area data information of each UOF document decompressed data block and data block head area data information or data block tail area data information of other UOF document decompressed data blocks, and a text data connection sequence between different UOF document decompressed data blocks can be determined based on the relevance. And finally, according to the text data connection sequence, splicing all the decompressed data blocks of the UOF document, so that the called UOF document can be effectively restored.
Preferably, in step S2, the comparing the document attribute data with the document browsing history of the user terminal to determine whether the called UOF document exists in the document cache of the user terminal, and the locking the document cache of the user terminal specifically includes:
step S201, the document theme information and the document version information are used as index information and are compared with the document browsing history of the application program of the user terminal, so as to determine whether the incomplete downloaded UOF document needing to be called exists in the document cache of the user terminal;
step S202, when determining that there is a UOF document which is not downloaded and needs to be called, locking a document cache of the user terminal so as not to change the document cache;
step S203, when determining that there is no Unfinished downloaded UOF document needing to be called, not locking the document cache of the user terminal.
The beneficial effects of the above technical scheme are: and determining whether the UOF document to be called is downloaded from the document browsing history of the application program of the user terminal by using the document theme information and the document version information as index information, so that whether the download data record of the UOF document to be called exists in the document cache of the user terminal can be determined.
Preferably, in step S3, when it is determined that the called UOF document exists in the document cache, the specifically obtaining the required UOF document directly from the document cache and displaying the desired UOF document in the user terminal includes:
when determining that the unfinished and to-be-called UOF document exists in the document cache, indicating the application program to continue downloading the corresponding UOF document; and after the downloading of the corresponding UOF document is finished, directly obtaining the needed UOF document from the document cache and displaying the needed UOF document in the user terminal.
The beneficial effects of the above technical scheme are: when determining that the unfinished and required-to-call UOF document exists in the document cache, the method indicates that the application program already has part of document data of the required-to-call UOF document, and indicates the application program to continue downloading the corresponding UOF document at the moment, so that the document data downloading flow of the user terminal can be effectively saved. And finally, directly opening the UOF document on the user terminal after the downloading of the corresponding UOF document is finished, so as to display the UOF document.
Preferably, in step S3, when it is determined that the called UOF document does not exist in the document cache, the copying and displaying the called UOF document from the document repository to the user terminal specifically includes:
and when determining that the unfinished and downloaded UOF document needing to be called does not exist in the document cache, directly copying the called UOF document from the document library into an application program of the user terminal and displaying the called UOF document.
The beneficial effects of the above technical scheme are: when determining that the UOF document which is not downloaded and needs to be called does not exist in the document cache, directly copying the called UOF document from the document library to an application program of a user terminal, so that the calling speed of the UOF document can be improved. And after the copying is finished, directly opening the UOF document on the user terminal so as to display the UOF document.
As can be seen from the content of the above embodiment, the method for calling and displaying the UOF document determines the corresponding actual call requirement information of the UOF document by acquiring and analyzing the document call request from the user terminal, and then calls the appropriate UOF document from the document library; then, carrying out decompression processing and analysis processing on the called UOF document to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal; and finally, the display of the UOF document on the user terminal is realized by directly obtaining the required UOF document from the document cache and displaying the required UOF document in the user terminal or copying and displaying the called UOF document from the document library into the user terminal, so that the data burden of an application program can be effectively reduced, and the convenience of UOF document calling can be improved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. The method for calling and displaying the UOF document is characterized by comprising the following steps:
step S1, obtaining a document calling request from a user terminal, and analyzing the document calling request to determine actual calling requirement information of the UOF document corresponding to the user terminal; according to the actual invoking requirement information of the UOF document, an appropriate UOF document is invoked from a document library;
step S2, carrying out decompression processing and analysis processing on the called UOF document so as to obtain document attribute data corresponding to the UOF document; comparing the document attribute data with a document browsing history record of the user terminal so as to determine whether the called UOF document exists in a document cache of the user terminal and lock the document cache of the user terminal;
step S3, when determining that the called UOF document exists in the document cache, directly obtaining the needed UOF document from the document cache and displaying the needed UOF document in a user terminal; and when determining that the called UOF document does not exist in the document cache, copying the called UOF document from the document library to the user terminal and displaying the called UOF document.
2. The method of calling and exposing a UOF document according to claim 1, wherein:
in step S1, the obtaining of the document invocation request from the user terminal, and analyzing the document invocation request to determine that the actual UOF document invocation demand information corresponding to the user terminal specifically includes:
step S101, a user terminal is instructed to send an application running history acquisition instruction to an application program installed by the user terminal, and an application running history fed back by the application program according to the application running history acquisition instruction is received;
step S102, analyzing the application operation history record, and extracting a document sending and/or receiving history record of an application program from the application operation history data record; determining unfinished sending and/or receiving documents of the application program according to the document sending and/or receiving history records, and taking document information corresponding to the unfinished sending and/or receiving documents as a document calling request of the user terminal;
step S103, analyzing the document calling request, determining UOF document information in the documents which are not sent and/or received by the user terminal from the document information corresponding to the documents which are not sent and/or received, wherein the UOF document information is used as actual UOF document calling requirement information corresponding to the user terminal.
3. A method of invoking and presenting a UOF document according to claim 2, characterized by:
in step S1, the step of retrieving, according to the UOF document actual retrieval requirement information, a suitable UOF document from a document library specifically includes:
determining a document name and document creation time corresponding to the UOF document to be called by the user terminal according to the actual calling requirement information of the UOF document; and then, according to the document name and the document creation time, calling a matched UOF document from a document library.
4. The method of calling and exposing a UOF document according to claim 1, wherein:
in step S2, the decompressing and parsing the called UOF document to obtain the document attribute data corresponding to the UOF document specifically includes:
the called UOF document is subjected to blocking processing, so that a plurality of UOF document subdata blocks are obtained; independently decompressing each UOF document subdata block to obtain a corresponding UOF document decompressed data block; splicing all the UOF document decompressed data blocks to obtain fully decompressed document data of the called UOF document;
and finally, analyzing the fully decompressed document data to obtain document theme information and document version information of the called UOF document, wherein the document theme information and the document version information are used as the document attribute data.
5. A method of invoking and exposing a UOF document according to claim 4, characterized by:
in step S2, performing blocking processing on the called UOF document to obtain a plurality of UOF document sub-data blocks; independently decompressing each UOF document sub-data block to obtain a corresponding UOF document decompressed data block specifically comprises:
the UOF document may have a decompressed data file when being decompressed, the decompressed data file includes a string of decompressed arrays, each bit of the decompressed array is a binary number corresponding to each byte of the UOF document before being compressed, at this time, the UOF document is firstly subjected to blocking processing according to the decompressed data file, so that after the blocking processing, a part of blocks to be decompressed are divided into independent sub-blocks, then each sub-block is decompressed, and the decompressed data is subjected to total verification, and the specific process is as follows:
step S201, using the following formula (1), according to the document division number obtained from the decompressed data file of the UOF document, performing block processing on the UOF document,
Figure FDA0003367277800000031
in the above formula (1), k1A value representing a first digit in the document partition array; k is a radical of formulai+1Representing the value of the (i + 1) th bit in the document segmentation array; a is aiRepresenting the ith numerical value of a decompression array in a decompressed data file of the UOF document; a is ai+1Representing the value of the (i + 1) th digit of a decompression array in a decompression data file of the UOF document; n represents the digit of the numerical value in the decompression array in the decompression data file of the UOF document;
obtaining a document segmentation array according to the steps, finding a bit numerical value corresponding to a numerical value of 1 from the first bit by using the document segmentation array, finding a corresponding byte digit in the UOF document according to the bit numerical value corresponding to the numerical value of 1, and segmenting the corresponding byte digit at the middle position of the corresponding byte and the previous byte, thereby segmenting the UOF document into a plurality of independent sub-data blocks; dividing the middle of the bit value in the decompression array corresponding to the value of 1 and the previous bit value to obtain a decompression sub-array corresponding to each independent sub-data block;
step S202, using the following formula (2), performing decompression processing according to each UOF document sub-data block obtained after the block processing of the UOF document and the corresponding decompression sub-array
Figure FDA0003367277800000032
In the above formula (3), Wt,1' represents an ASCII value of the 1 st byte in the decompressed tth sub-block; wt,1An ASCII value representing the 1 st byte in the t-th sub-data block after the blocking processing; ctRepresenting the number of bytes in the t-th sub-data block after the blocking processing;
Figure FDA0003367277800000041
representing 2 nd to C th sub data blocks after decompression processingtAn ASCII value of a byte;
Figure FDA0003367277800000042
representing the 2 nd to C th sub data blocks after the blocking processtAn ASCII value of a byte; a. thet,cThe binary value of the c bit in the decompressed sub-array corresponding to the t sub-data block after the block processing is represented;
if it is detected
Figure FDA0003367277800000043
Then 2 nd to C th sub data blocks in the tth sub data block after the blocking processingtReplacing all the ASCII values of the bytes with the ASCII values of the 1 st bytes in the t-th sub-data block after the block processing to finish decompression, and if the decompression is detected
Figure FDA0003367277800000044
Then will be
Figure FDA0003367277800000045
Keeping the original ASCII value unchanged;
substituting the value of T from 1 to T into the formula (2) to complete the operation on each sub data block so as to complete the decompression processing, wherein T represents the total number of the sub data blocks after the block division processing;
step S203, using the following formula (3), according to the decompressed data obtained after all the UOF document sub-data blocks are decompressed, obtaining a check value to match with the recorded check value, and further checking whether each UOF document sub-data block is successfully decompressed,
Figure FDA0003367277800000046
in the above formula (3), η represents a check value of successful decompression of the UOF document; d represents a document check value recorded before document compression; ()2Indicating that the value in parentheses is converted to binary; sum [ ()2]The method comprises the following steps of (1) calculating the number of a numerical value in a binary number in parentheses;
if eta is 0, the UOF document is successfully decompressed; if η ≠ 0, which indicates that the UOF document is unsuccessfully decompressed, the steps S201-S203 are required to be repeated again for re-decompressing.
6. A method of invoking and exposing a UOF document according to claim 4, characterized by: in step S2, the splicing processing is performed on all UOF document decompressed data blocks, so as to obtain fully decompressed document data of the called UOF document, which specifically includes:
acquiring data information of a data block head area and data information of a data block tail area of each UOF document decompressed data block;
comparing data information of the head area of each data block of all the decompressed data blocks of the UOF document with data information of the tail area of the data block, so as to determine the text data joining sequence among the decompressed data blocks of different UOF documents; and according to the text data connection sequence, splicing all the UOF document decompressed data blocks to obtain the fully decompressed document data of the called UOF document.
7. The method of calling and exposing a UOF document according to claim 4, wherein:
in step S2, comparing the document attribute data with the document browsing history of the user terminal, to determine whether the called UOF document exists in the document cache of the user terminal, and locking the document cache of the user terminal specifically includes:
step S201, the document theme information and the document version information are used as index information and are compared with the document browsing history of the application program of the user terminal, so as to determine whether the incomplete downloaded UOF document needing to be called exists in the document cache of the user terminal;
step S202, when determining that there is a UOF document which is not downloaded and needs to be called, locking a document cache of a user terminal so as not to change the document cache;
step S203, when determining that there is no Unfinished downloaded UOF document needing to be called, not locking the document cache of the user terminal.
8. The method of claim 7 for invoking and exposing a UOF document, wherein:
in step S3, when it is determined that the called UOF document exists in the document cache, the specifically obtaining the required UOF document directly from the document cache and displaying the UOF document in the user terminal includes:
when determining that the unfinished and required-to-be-called UOF document exists in the document cache, indicating the application program to continue downloading the corresponding UOF document; and after the downloading of the corresponding UOF document is finished, directly obtaining the needed UOF document from the document cache and displaying the UOF document in the user terminal.
9. The method of claim 8 for invoking and exposing a UOF document, wherein:
in step S3, when it is determined that the called UOF document does not exist in the document cache, the copying and displaying the called UOF document from the document repository to the user terminal specifically includes:
and when determining that the unfinished and downloaded UOF document to be called does not exist in the document cache, directly copying the called UOF document from the document library to an application program of the user terminal and displaying the called UOF document.
CN202111386583.2A 2021-11-22 2021-11-22 Method for calling and displaying UOF document Active CN114218441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111386583.2A CN114218441B (en) 2021-11-22 2021-11-22 Method for calling and displaying UOF document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111386583.2A CN114218441B (en) 2021-11-22 2021-11-22 Method for calling and displaying UOF document

Publications (2)

Publication Number Publication Date
CN114218441A CN114218441A (en) 2022-03-22
CN114218441B true CN114218441B (en) 2022-07-12

Family

ID=80697737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111386583.2A Active CN114218441B (en) 2021-11-22 2021-11-22 Method for calling and displaying UOF document

Country Status (1)

Country Link
CN (1) CN114218441B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101430684A (en) * 2007-11-09 2009-05-13 北大方正集团有限公司 Method and apparatus for mutual conversion between Chinese work office software document and documents with other format
CN106227713B (en) * 2016-08-31 2018-11-06 广州视睿电子科技有限公司 The processing method and processing device of document
CN107423271B (en) * 2017-08-01 2020-08-21 北京信息科技大学 Document generation method and device
CN111191257A (en) * 2019-12-02 2020-05-22 泰康保险集团股份有限公司 File preview processing method and device

Also Published As

Publication number Publication date
CN114218441A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
US6925467B2 (en) Byte-level file differencing and updating algorithms
US20040260734A1 (en) Processing software images for use in generating difference files
CN110837393A (en) Method and device for manufacturing firmware differential upgrade package and readable storage medium
CN111352907A (en) Method and device for analyzing pipeline file, computer equipment and storage medium
CN108108260B (en) Resource file verification method and device
CN110532107B (en) Interface calling method, device, computer equipment and storage medium
CN110995273B (en) Data compression method, device, equipment and medium for power database
CN111158741A (en) Method and device for monitoring change of dependency relationship of business module on third-party class library
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN111143434A (en) Intelligent data checking method, device, equipment and storage medium
CN108446224B (en) Performance analysis method of application program on mobile terminal and storage medium
CN114218441B (en) Method for calling and displaying UOF document
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN106326310B (en) Resource encryption updating method for mobile phone client software
CN114169318A (en) Process identification method, apparatus, device, medium, and program
WO2021114101A1 (en) Method and apparatus for incremental update of file, and terminal and computer-readable storage medium
WO2021087662A1 (en) Memory allocation method and apparatus, terminal, and computer readable storage medium
CN102347772B (en) Compression processing method and equipment for base station files
CN111538651A (en) Interface testing method, device, server and storage medium
CN114402286A (en) File processing method, file processing device and terminal equipment
CN111241096A (en) Text extraction method, system, terminal and storage medium for EXCEL document
CN110750266A (en) Program compiling method, program compiling device, computer equipment and storage medium
CN112347095B (en) Data table processing method, device and server
CN113031959B (en) Variable replacement method, device, system and storage medium
CN112433743B (en) File updating method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant