CN113204639B - Document online playing method and device, computing equipment and readable storage medium - Google Patents

Document online playing method and device, computing equipment and readable storage medium Download PDF

Info

Publication number
CN113204639B
CN113204639B CN202110560374.9A CN202110560374A CN113204639B CN 113204639 B CN113204639 B CN 113204639B CN 202110560374 A CN202110560374 A CN 202110560374A CN 113204639 B CN113204639 B CN 113204639B
Authority
CN
China
Prior art keywords
file
swf
document
page numbers
files
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
CN202110560374.9A
Other languages
Chinese (zh)
Other versions
CN113204639A (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.)
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Digital Network 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 Zhuhai Kingsoft Digital Network Technology Co Ltd filed Critical Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority to CN202110560374.9A priority Critical patent/CN113204639B/en
Publication of CN113204639A publication Critical patent/CN113204639A/en
Application granted granted Critical
Publication of CN113204639B publication Critical patent/CN113204639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The specification provides a document online playing method and device, a computing device and a readable storage medium, wherein the document online playing method comprises the following steps: in the event that an uploaded document is detected, converting the document into at least one swf file in swf format; and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers. According to the document online playing method, various documents are converted into swf files, formats stored in the original documents are not lost after loading, and a lazy loading mode is adopted during loading, so that the burden of a server is reduced, the running efficiency of the server is improved, and a user experiences smoothly when reading and cannot get stuck, so that the user experience is improved.

Description

Document online playing method and device, computing equipment and readable storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method and apparatus for online playing a document, a computing device, and a readable storage medium.
Background
Various types of documents in the information age need to be read in an online mode, and many documents are copied in a simple violent mode and then displayed in a webpage mode, after release, the formats stored in many original documents are lost, and extremely poor reading experience is brought to users.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a document online playing method. The present disclosure also relates to a document online playing device, a computing device, and a computer readable storage medium, so as to solve the technical defects in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a document online playing method, including:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
Optionally, the online document playing method further comprises the following steps:
receiving a search command input by the user based on a swf file corresponding to a browsed current page number, wherein the search command comprises a search keyword;
searching according to the search keywords, obtaining page numbers of swf files related to the search keywords, and displaying the page numbers.
Optionally, generating at least one text file corresponding to at least one swf file one by one when converting the document into the at least one swf file in swf format, searching according to the search keyword, and obtaining the page number of the swf file related to the search keyword, including:
searching in the at least one text file according to the search keyword to obtain a target text file, wherein the search keyword exists in the target text file;
and obtaining the page number corresponding to the target text file.
Optionally, generating a record file when converting the document into at least one swf file in swf format, wherein at least a directory of the at least one text file and a corresponding page number are recorded in the record file, and the obtaining the page number corresponding to the target text file includes:
and searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files.
Optionally, the online document playing method further comprises the following steps:
receiving a highlighting command input by the user based on the swf file corresponding to the browsed current page number;
and highlighting the search keyword in the obtained swf file related to the search keyword.
Optionally, generating a record file when converting the document into at least one swf file in a swf format, recording a page number and a file path corresponding to each swf file in the record file, and loading a target swf file in the at least one swf file includes:
searching a corresponding file path in the record file according to the current page browsed by the user, the first preset number of pages before the current page and/or the second preset number of pages after the current page;
and loading the target swf file stored in the corresponding file path.
Optionally, the online document playing method further comprises the following steps:
receiving a positioning command input by the user based on the swf file corresponding to the browsed current page number;
and jumping to a first page number in the obtained page numbers of swf files related to the search key, and positioning to the first search key in the first page number.
Optionally, before converting the document into at least one swf file in swf format, further comprising:
adding the document to a conversion queue;
accordingly, converting the document into at least one swf file in swf format includes:
converting the document into at least one swf file in swf format, in case the document is dequeued from the conversion queue.
Optionally, before adding the document to the conversion queue, further comprising:
scanning and analyzing the document;
accordingly, adding the document to the conversion queue includes:
and adding the document to a conversion queue under the condition that the scanning analysis result is normal.
According to a second aspect of embodiments of the present specification, there is provided a document online playing device, including:
a conversion module configured to: in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
a loading module configured to: and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
According to a third aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions to implement the method of:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
According to a fourth aspect of embodiments of the present description, there is provided a computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the document online playing method.
According to the document online playing method provided by the specification, uploaded documents in various formats are converted into swf files; when a user browses a document, loading swf files corresponding to a current page browsed by the user, a first preset number of pages before the current page and/or a second preset number of pages after the current page. According to the document online playing method, different modes are adopted compared with the mode that copy documents in the prior art are displayed in the form of web pages, various documents are converted into swf files, formats stored in the original documents are not lost after loading, a lazy loading mode is adopted during loading, a user can see which page loads the swf files of the page and the upper and lower related pages, the burden of a server is reduced, the running efficiency of the server is improved, and the user experiences smoothly and cannot be blocked when reading, so that the user experience is improved.
Drawings
FIG. 1 is a flowchart of a method for online playing a document according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating format conversion and playing of a document online playing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram showing a playing interface when a document online playing method according to an embodiment of the present disclosure plays;
FIG. 4 is a flowchart illustrating a document online playing method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating a structure of a document online playing device according to an embodiment of the present disclosure;
FIG. 6 illustrates a block diagram of a computing device provided in an embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In the present specification, a document online playing method is provided, and the present specification relates to a document online playing apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 shows a flowchart of a method for online playing a document according to an embodiment of the present disclosure, which specifically includes steps 102 to 104.
Step 102: in the event that an uploaded document is detected, the document is converted into at least one swf file in swf format.
The documents may be documents uploaded by users or developers, etc. using clients, the uploaded documents having various formats, such as, pdf, xls, doc, ppt, txt, etc. In the event that an uploaded document is detected, it is automatically converted in the background to swf format. Specifically, formats other than the format of the pdf are converted to the format of the pdf, which is then converted to the swf format, and if the document format is already the pdf, no conversion to the pdf is necessary. As shown in FIG. 2, various types of documents may be converted to SWF files using a pdftoswf.jar conversion tool, which is one of the SWF Tools, and played using a document reader. After conversion, each page of original document is converted into one swf file.
Step 104: and loading a target swf file in the at least one swf file in response to a browsing request of a user. The target swf files comprise swf files corresponding to current pages browsed by a user, and first preset number of pages before the current pages and/or second preset number of pages after the current pages.
In the case that the user uses the terminal to open the document for reading and browsing, the user clicks the document or otherwise issues a browsing request, and the server loads the target swf file in the generated swf file. Firstly, loading swf files corresponding to the first page number and the preset number of page numbers. Under the condition that a user inputs a page number switching command, designating a page number to be hopped to, and loading swf files corresponding to the page number to be hopped to and the page numbers preset before and after. When the user browses the swf file of the last page, the swf file of the last page is loaded and the swf files corresponding to the preset number of pages. The first preset number may be the same or different from the second preset number, for example, the first preset number is 1 and the second preset number is 2.
In one embodiment, when converting a document into at least one swf file in swf format, generating a record file, recording a page number and a file path corresponding to each swf file in the record file, and loading a target swf file in the at least one swf file can be achieved by: searching a corresponding file path in the record file according to the current page browsed by the user, the first preset number of pages before the current page and/or the second preset number of pages after the current page; and loading the target swf file stored in the corresponding file path.
For example, the transferred document is converted into 100 swf files, and page numbers and stored file paths corresponding to each swf file of the 100 swf files are recorded in a one-to-one correspondence manner in the recorded files. And searching a corresponding file path according to the page number, and displaying contents of the pages corresponding to the uploaded document after loading the swf file stored in the file path. Fig. 3 shows, by way of example, a schematic diagram of a playing interface when playing by the document online playing method, in this example, the document corresponds to 20 pages, that is, 20 swf files after conversion, and when the user opens to browse, only swf files of the first page and the next page may be loaded.
According to the document online playing method, different modes are adopted compared with the mode that copy documents in the prior art are displayed in the form of web pages, various documents are converted into swf files, formats stored in the original documents cannot be lost after loading, a lazy loading mode is adopted during loading, a user can see which page loads the swf files of the page and the upper and lower related pages, the burden of a server is reduced, the running efficiency of the server is improved, the user experiences smooth and cannot be blocked when reading, and therefore the user experience is improved.
In one embodiment, the online document playing method further includes: receiving a search command input by a user based on a swf file corresponding to a browsed current page number, wherein the search command comprises a search keyword; searching according to the search keywords, obtaining page numbers of swf files related to the search keywords, and displaying.
The user can input a search command in a mode of calling an API interface, and the search keyword can be any text, symbol and the like existing or not in the swf file. In one embodiment, for example, the user enters "hello", "? "etc. Taking the above 100 swf files as an example for explanation, the input search keywords are searched in the first swf file, and then the search keywords are searched in the second swf file until the 100 th swf file is searched. After each page is searched separately, the search result is displayed, and the search result can display the page number of the swf file related to the search keyword or display the page number of the swf file related to the search keyword and how many search keywords exist in each page. How many search keys exist per page is obtained by traversing the number of strings in the swf file. By displaying page numbers of swf files with search keywords and displaying the page numbers, a user can search the whole text of the files by utilizing flash when reading and browsing the files, the number of pages and the number of pages of the search keywords in the files are obtained, the whole text search can be carried out under the condition that formats stored in the original files are not lost, the recording positions and the recording frequencies of the interested search keywords in the files are obtained, and the user experience is improved.
In one embodiment, when converting a document into at least one swf file in swf format, generating at least one text file corresponding to the at least one swf file one by one, searching according to a search keyword, and obtaining page numbers of the swf files related to the search keyword may be achieved by: searching in at least one text file according to the search keywords to obtain a target text file, wherein the search keywords exist in the target text file; a page number corresponding to the target text file is obtained.
A text file (txt) corresponding to the swf file is generated, a user can search for a specified search keyword through textsnap shot, findText (begin index: int, textToFind: string, casesense: boolean): int, search is performed, and the position of the first matching item of textToFind found at or after the begin index is returned, wherein the begin index is a parameter specifying from which number of search starts, the textToFind specifies text content to be searched, and the casesense specifies whether the case is sensitive. Searching the searching keywords in at least one text file, taking all text files with the searching keywords as target text files, and obtaining page numbers corresponding to the target text files. the txt file is stored on the server side, and because the client loading mode for the user is lazy loading, the client has no full text information, so the txt file needs to be utilized in searching.
In an embodiment, when converting a document into at least one swf file in swf format, generating a record file, and at least recording a directory of at least one text file and a corresponding page number in the record file, obtaining the page number corresponding to the target text file may be achieved by: and searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files. The catalog of the txt file and the corresponding page number are stored in the record file, and the corresponding page number is obtained and displayed according to the catalog of the target text file.
In one embodiment, the online document playing method further includes: receiving a highlighting command input by a user based on a swf file corresponding to a current page number browsed by the user; and highlighting the search keyword in the obtained swf file related to the search keyword. And the user calls an API interface to input a highlighting command, positions the corresponding swf file according to the searching keyword, namely the index value index, and sets the searching result to be highlighted. Specifically, according to the zoom information when the user browses the document, the distance between each row and each column in the swf file can be obtained, a rectangular area is set in each swf file with the search keywords according to the coordinates of the upper left corner of the border of the search keywords and the obtained distance, and the rectangular area is highlighted. The user can be quickly browsed to the search keyword of interest by highlighting the search keyword.
In one embodiment, the online document playing method further includes: receiving a positioning command input by a user based on a swf file corresponding to a browsed current page number; and jumping to a first page number in the obtained page numbers of swf files related to the search keywords, and positioning to the first search keyword in the first page number.
The positioning command is a command input by a user through calling an API interface, and may be input through gettextrunfo (begin index: int, endIndex: int): array returns an Array containing objects for text run information, where begin index specifies the start position of the position, endIndex specifies the end position of the position, and Array specifies the type of return value as an Array.
And under the condition that a command of a user for locating the next search keyword is received, for example, under the condition that the user clicks a control of 'next', jumping to a second search keyword, and if the second search keyword is not in the first page number, jumping to the second page number with the search keyword. And when the user jumps, scrolling based on the coordinates of the left upper corner of the search keyword frame by combining the zoom parameter of the at least one swf file during display. For example, the search results in full text search are that there are search keywords on pages 2 and 8, 2 on page 1, and 6 on page 8. When positioning, if the current page is not the 1 st page, jumping to the first page to search, and after positioning the search key of the 1 st page, jumping to the first search key of the 8 th page by scrolling. The user can quickly search the interested search keywords through positioning.
In an embodiment, before converting the document into at least one swf file in swf format, further comprising: the document is added to a conversion queue, and in the event that the document is dequeued from the conversion queue, the document is converted to at least one swf file in swf format. Before adding the document to the conversion queue, further comprising: and carrying out scanning analysis on the document, and adding the document into a conversion queue under the condition that the scanning analysis result is normal. The user uploads the document to the server, the server may not immediately convert, and the document may be uploaded to the temporary storage area first, for example, scan analysis is performed when the uploading is monitored, security of the document is verified, and the document is added to the conversion queue after passing, so that security is improved. In the case where documents are dequeued from the conversion queue, they are converted again so that a plurality of documents can be managed in order.
The method for online playing the document is further described below with reference to fig. 4. Fig. 4 shows a process flow chart of a document online playing method according to an embodiment of the present disclosure, which specifically includes the following steps:
step 402: in the case of detecting an uploaded PDF document, scan analysis is performed on the PDF document.
Step 404: in the case where the scan analysis result is normal, the PDF document is added to the conversion queue.
The security of the document and the like are verified, and the PDF document is added to the conversion queue after the verification is passed.
Step 406: in the case where the PDF document is dequeued from the conversion queue, the PDF document is converted into at least one swf file in swf format while at least one text file is generated for the at least one swf file in one-to-one correspondence, and a record file is generated. And recording page numbers, file paths, catalogues of at least one text file and corresponding page numbers corresponding to each swf file in the record file.
Step 408: in response to a browsing request of a user, a file path of an swf file with a page number of 1 and a file path of an swf file with a page number of 2 are searched from the record file, and swf files stored in the two file paths are loaded.
Step 410: responding to a page switching command input by a user, and searching a current page and a file path corresponding to one page before and after the current page in a record file according to the current page to be switched to contained in the page switching command.
The user designates the page number to be jumped to, and searches the page number to be jumped to and the file path corresponding to one page number before and after the page number in the record file. The front and the rear are examples, and file paths corresponding to any preset number of pages before and after can be loaded.
Step 412: and loading the swf file stored in the corresponding file path.
Step 414: and receiving a search command input by a user based on the swf file corresponding to the browsed current page number, wherein the search command comprises a search keyword 'hello'.
Step 416: searching in at least one text file according to the 'hello', and obtaining a target text file, wherein the 'hello' is recorded in the target text file.
Step 418: searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files, and displaying the page numbers.
Step 420: and receiving a highlighting command input by a user based on the swf file corresponding to the current page number browsed, and highlighting the searched keyword in the obtained swf file with the 'hello'.
Step 422: and receiving a positioning command input by a user based on the swf file corresponding to the current browsed page number, jumping to a first page number in the obtained page numbers of the swf file with the 'hello', and positioning to a first search keyword in the first page number.
Although steps 420 and 422 are described above in terms of a sequential order, it will be appreciated by those skilled in the art that the sequential order of steps 422 and 420 is not limited, and that step 422 may be performed prior to step 420. Alternatively, step 420 or steps 422 to 424 may be omitted.
Step 424: in the case of receiving a user's command to locate the next "hello", the user scrolls to locate the second search key by combining the zoom information when browsing the swf file.
According to the document online playing method, different modes are adopted compared with the mode that copy documents in the prior art are displayed in the form of web pages, various documents are converted into swf files, formats stored in the original documents cannot be lost after loading, a lazy loading mode is adopted during loading, a user can see which page loads the swf files of the page and the upper and lower related pages, the burden of a server is reduced, the running efficiency of the server is improved, and the user experiences smooth and cannot be blocked when reading. By displaying page numbers of swf files with search keywords and displaying the page numbers, a user can search the whole text of the files by utilizing flash when reading and browsing the files, the number of pages and the number of pages of the search keywords in the files are obtained, the whole text search can be carried out under the condition that formats stored in the original files are not lost, the recording positions and the recording frequencies of the interested search keywords in the files are obtained, and the user experience is improved. Through further highlighting and positioning, a user can conveniently and rapidly browse or search the search keywords, and user experience is further improved.
Corresponding to the above method embodiment, the present disclosure further provides an embodiment of a document online playing device, and fig. 5 shows a schematic structural diagram of a document online playing device provided in an embodiment of the present disclosure. As shown in fig. 5, the apparatus includes:
a conversion module 502 configured to: in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
a loading module 504 configured to: and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
According to the document online playing device, different modes are adopted to display copied documents in the prior art in the form of web pages, various documents are converted into swf files, formats stored in the original documents cannot be lost after loading, a lazy loading mode is adopted during loading, a user can see which page loads the swf files of the page and the upper and lower related pages, the burden of a server is reduced, the running efficiency of the server is improved, the user experiences smooth and cannot be blocked when reading, and therefore the user experience is improved.
Optionally, the document online playing device further comprises:
the first receiving module is configured to receive a search command input by the user based on the swf file corresponding to the browsed current page number, wherein the search command comprises a search keyword;
and the search module is configured to search according to the search keywords, obtain page numbers of swf files related to the search keywords and display the page numbers.
Optionally, in converting the document to at least one swf file in swf format, generating at least one text file for the at least one swf file in a one-to-one correspondence, the search module is further configured to:
searching in the at least one text file according to the search keyword to obtain a target text file, wherein the search keyword exists in the target text file;
and obtaining the page number corresponding to the target text file.
Optionally, generating a record file when converting the document into at least one swf file in swf format, wherein at least a directory and a corresponding page number of the at least one text file are recorded in the record file, and the search module is further configured to:
and searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files.
Optionally, the document online playing device further comprises:
a second receiving module configured to receive a highlighted command input by the user based on the swf file corresponding to the current page number browsed;
a highlighting module configured to: and highlighting the search keyword in the obtained swf file related to the search keyword.
Optionally, generating a record file when converting the document into at least one swf file in swf format, wherein the record file records page numbers and file paths corresponding to each swf file, and the loading module is further configured to:
searching a corresponding file path in the record file according to the current page browsed by the user, the first preset number of pages before the current page and/or the second preset number of pages after the current page;
and loading the target swf file stored in the corresponding file path.
Optionally, the document online playing device further comprises:
the third receiving module is configured to receive a positioning command input by the user based on the swf file corresponding to the browsed current page number;
and the positioning module is configured to jump to a first page number in the obtained page numbers of the swf files related to the search keywords and position to the first search keyword in the first page number.
Optionally, the document online playing device further comprises:
an add module configured to add the document to a conversion queue;
accordingly, the conversion module is configured to:
converting the document into at least one swf file in swf format, in case the document is dequeued from the conversion queue.
Optionally, the document online playing device further comprises:
a scan analysis module configured to scan analyze the document;
accordingly, the add module is configured to:
and adding the document to a conversion queue under the condition that the scanning analysis result is normal.
The above is a schematic scheme of a document online playing device of this embodiment. It should be noted that, the technical solution of the document online playing device and the technical solution of the document online playing method belong to the same conception, and the details of the technical solution of the document online playing device which are not described in detail can be referred to the description of the technical solution of the document online playing method.
Fig. 6 illustrates a block diagram of a computing device 600 provided in accordance with an embodiment of the present specification. The components of computing device 600 include, but are not limited to, memory 610 and processor 620. The processor 620 is coupled to the memory 610 via a bus 630 and a database 650 is used to hold data.
Computing device 600 also includes access device 640, access device 640 enabling computing device 600 to communicate via one or more networks 660. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 640 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 600, as well as other components not shown in FIG. 6, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device shown in FIG. 6 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 600 may also be a mobile or stationary server.
Wherein the processor 620 is configured to execute the following computer-executable instructions:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the above-mentioned document online playing method belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the above-mentioned document online playing method.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are configured to:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
and loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the above-mentioned document online playing method belong to the same concept, and the details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the above-mentioned document online playing method.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present description is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present description. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all necessary in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the disclosure and the practical application, to thereby enable others skilled in the art to best understand and utilize the disclosure. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (9)

1. An online document playing method is characterized by comprising the following steps:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers;
receiving a search command input by the user based on a swf file corresponding to a browsed current page number, wherein the search command comprises a search keyword;
searching in at least one text file according to the search key word to obtain a target text file, wherein the search key word exists in the target text file, when converting the document into at least one swf file in a swf format, generating at least one text file corresponding to the at least one swf file one by one and generating a record file, and at least recording a catalog of the at least one text file and a corresponding page number in the record file;
searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files, and displaying the page numbers.
2. The document online playing method according to claim 1, further comprising:
receiving a highlighting command input by the user based on the swf file corresponding to the browsed current page number;
and highlighting the search keyword in the obtained swf file related to the search keyword.
3. The online document playing method according to claim 1, wherein recording page numbers and file paths corresponding to each swf file in the recording file, and loading a target swf file in the at least one swf file comprises:
searching a corresponding file path in the record file according to the current page browsed by the user, the first preset number of pages before the current page and/or the second preset number of pages after the current page;
and loading the target swf file stored in the corresponding file path.
4. A document online playing method according to claim 1 or 3, further comprising:
receiving a positioning command input by the user based on the swf file corresponding to the browsed current page number;
and jumping to a first page number in the obtained page numbers of swf files related to the search key, and positioning to the first search key in the first page number.
5. The document online playing method according to claim 1, further comprising, before converting the document into at least one swf file in swf format:
adding the document to a conversion queue;
accordingly, converting the document into at least one swf file in swf format includes:
converting the document into at least one swf file in swf format, in case the document is dequeued from the conversion queue.
6. The document online playing method of claim 5, further comprising, before adding the document to a conversion queue:
scanning and analyzing the document;
accordingly, adding the document to the conversion queue includes:
and adding the document to a conversion queue under the condition that the scanning analysis result is normal.
7. An online document playing device, comprising:
a conversion module configured to: in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
a loading module configured to: loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers;
the first receiving module is configured to receive a search command input by the user based on the swf file corresponding to the browsed current page number, wherein the search command comprises a search keyword;
the search module is configured to search in at least one text file according to the search key words to obtain a target text file, wherein the search key words exist in the target text file, the at least one text file corresponding to at least one swf file one by one is generated for the at least one swf file when the document is converted into the at least one swf file in a swf format, and a record file is generated, and at least the catalogue of the at least one text file and the corresponding page number are recorded in the record file; searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files, and displaying the page numbers.
8. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions to implement the method of:
in the event that an uploaded document is detected, converting the document into at least one swf file in swf format;
loading a target swf file in the at least one swf file in response to a browsing request of a user, wherein the target swf file comprises swf files corresponding to current page numbers browsed by the user, and first preset number of page numbers before the current page numbers and/or second preset number of page numbers after the current page numbers;
receiving a search command input by the user based on a swf file corresponding to a browsed current page number, wherein the search command comprises a search keyword;
searching in at least one text file according to the search key word to obtain a target text file, wherein the search key word exists in the target text file, when converting the document into at least one swf file in a swf format, generating at least one text file corresponding to the at least one swf file one by one and generating a record file, and at least recording a catalog of the at least one text file and a corresponding page number in the record file;
searching page numbers corresponding to the target text files in the record files according to the catalogues of the target text files, and displaying the page numbers.
9. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the document online playing method of any one of claims 1 to 6.
CN202110560374.9A 2021-05-21 2021-05-21 Document online playing method and device, computing equipment and readable storage medium Active CN113204639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110560374.9A CN113204639B (en) 2021-05-21 2021-05-21 Document online playing method and device, computing equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110560374.9A CN113204639B (en) 2021-05-21 2021-05-21 Document online playing method and device, computing equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113204639A CN113204639A (en) 2021-08-03
CN113204639B true CN113204639B (en) 2023-07-18

Family

ID=77023026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110560374.9A Active CN113204639B (en) 2021-05-21 2021-05-21 Document online playing method and device, computing equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113204639B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809827A (en) * 2000-11-21 2006-07-26 汤姆森许可公司 System and process for network site fragmented search
WO2007095834A1 (en) * 2006-02-22 2007-08-30 Dong Wang Composite display method and system for search engine of same resource information based on degree of attention
CN101194255A (en) * 2004-10-08 2008-06-04 派特拉公司 Classification-expanded indexing and retrieval of classified documents
CN101916293A (en) * 2010-08-27 2010-12-15 中国电信股份有限公司 Method and device for introducing media information into file
CN104156341A (en) * 2014-07-31 2014-11-19 武钢集团昆明钢铁股份有限公司 Online reading system and method
US8898137B1 (en) * 2010-06-24 2014-11-25 Amazon Technologies, Inc. URL rescue by execution of search using information extracted from invalid URL
CN106776506A (en) * 2017-02-27 2017-05-31 努比亚技术有限公司 Methods of exhibiting, device and system on document line based on browser
CN107168935A (en) * 2017-05-25 2017-09-15 山大鲁能信息科技有限公司 The online code-transferring method of document and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1809827A (en) * 2000-11-21 2006-07-26 汤姆森许可公司 System and process for network site fragmented search
CN101194255A (en) * 2004-10-08 2008-06-04 派特拉公司 Classification-expanded indexing and retrieval of classified documents
WO2007095834A1 (en) * 2006-02-22 2007-08-30 Dong Wang Composite display method and system for search engine of same resource information based on degree of attention
US8898137B1 (en) * 2010-06-24 2014-11-25 Amazon Technologies, Inc. URL rescue by execution of search using information extracted from invalid URL
CN101916293A (en) * 2010-08-27 2010-12-15 中国电信股份有限公司 Method and device for introducing media information into file
CN104156341A (en) * 2014-07-31 2014-11-19 武钢集团昆明钢铁股份有限公司 Online reading system and method
CN106776506A (en) * 2017-02-27 2017-05-31 努比亚技术有限公司 Methods of exhibiting, device and system on document line based on browser
CN107168935A (en) * 2017-05-25 2017-09-15 山大鲁能信息科技有限公司 The online code-transferring method of document and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Google信息检索的引擎查询技巧;张兴华,张晓碧;现代情报(第02期);79-81 *
一种改进的页面相似性度量方法;张霞;王建东;顾海花;;计算机工程与应用;第46卷(第19期);141-144+147 *
如何获取网络教学资源;薛科翼;;中国新技术新产品(第16期);1 *

Also Published As

Publication number Publication date
CN113204639A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN109614504B (en) Internet electronic book management system and method
US20220100811A1 (en) Content management methods for providing automated generation of content suggestions
US9195717B2 (en) Image result provisioning based on document classification
US7793209B2 (en) Electronic apparatus with a web page browsing function
US11675874B2 (en) Content management systems for providing automated generation of content suggestions
US20080021876A1 (en) Action tags
US8180757B2 (en) System and method for leveraging tag context
US20090299990A1 (en) Method, apparatus and computer program product for providing correlations between information from heterogenous sources
US20140250110A1 (en) Image attractiveness based indexing and searching
JP2018504727A (en) Reference document recommendation method and apparatus
WO2010000914A1 (en) Method and system for searching multiple data types
KR20110000679A (en) Method, apparatus and computer program product for providing an information model-based user interface
WO2023241332A1 (en) Snippet information generation method and apparatus, search result display method and apparatus, device, and medium
KR101508583B1 (en) Semantic searching system and method for smart device
CN114297143A (en) File searching method, file displaying device and mobile terminal
KR101651963B1 (en) Method of generating time and space associated data, time and space associated data generation server performing the same and storage medium storing the same
CN113204639B (en) Document online playing method and device, computing equipment and readable storage medium
US20130226619A1 (en) Input support device and input support method
US20240169000A1 (en) Information processing method and apparatus, device, and medium
CN110020260A (en) The generation of label and search method and system
EP3859578B1 (en) Phishing site detection device, phishing site detection method and phishing site detection program
KR100933269B1 (en) Search method and system using color keyword
EP3273365B1 (en) Method for generating search index and server utilizing the same
US20150082155A1 (en) Data sharing service system, and device and method for data sharing service
JP2002132825A (en) System, method, and program for image retrieval, computer-readable storage medium with recorded image retrieving program, and image retrieving device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant