CN110020242A - A kind of document reading progress synchronous method and device based on Web - Google Patents
A kind of document reading progress synchronous method and device based on Web Download PDFInfo
- Publication number
- CN110020242A CN110020242A CN201710930298.XA CN201710930298A CN110020242A CN 110020242 A CN110020242 A CN 110020242A CN 201710930298 A CN201710930298 A CN 201710930298A CN 110020242 A CN110020242 A CN 110020242A
- Authority
- CN
- China
- Prior art keywords
- target document
- reading
- page
- reading progress
- document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000001360 synchronised effect Effects 0.000 title abstract description 5
- 238000005096 rolling process Methods 0.000 claims description 35
- 230000028838 turning behavior Effects 0.000 claims description 18
- 230000009191 jumping Effects 0.000 claims description 10
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 3
- 230000002708 enhancing effect Effects 0.000 abstract 1
- 238000011161 development Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 235000014510 cooky Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of document reading progress synchronous method and device based on Web, the described method includes: S1 obtains the filename of the destination document of click when capturing the operation of user's click destination document, wherein, the destination document is the document that the user uploads onto the server in advance;S2 obtains the destination document according to the filename of the information of the user and destination document on the server;S3 if the destination document calls the first Javascript script to load the destination document there are corresponding pre-stored reading progress, and jumps to corresponding reading page according to the reading progress of the destination document.One aspect of the present invention, Javascript script can compatible browser, operating system and equipment, be suitable for various application environments, have versatility;On the other hand the synchronization that multi-platform middle document reads progress is realized, enhancing reads consistency and continuity, improves user's reading experience.
Description
Technical Field
The invention relates to the field of application development, in particular to a Web-based document reading progress synchronization method and device.
Background
In recent years, with the rapid development of networks and various intelligent terminals, more and more users select digital reading, which means that reading contents are presented in a digital manner, such as electronic books, network novels, electronic maps, blogs, web pages and the like; and the other hand refers to the digitalization of a reading mode, namely, a carrier for reading contents is electronic equipment with a screen display, such as a desktop computer, a mobile phone, a notebook, a reader and the like.
At present, operating systems used by different electronic devices are different, for example, the operating systems of the electronic devices are Windows, MacOS, Linux, Android, iOS, and the like, and versions of the operating systems may also be different. In addition, the reading applications installed on each electronic device are different or the versions of the applications are not uniform, so that the document reading progress on each electronic device cannot be synchronized. When a user switches the electronic device to read, the correct reading progress of the same document on the electronic device cannot be obtained, and the user needs to spend extra time and energy to manually synchronize the reading progresses of documents on different electronic devices, so that the reading experience of the user is poor.
In summary, in the prior art, due to the fact that the operating systems and the reading applications of different electronic devices are different in version, the document reading schedules of different electronic devices cannot be synchronized, manual synchronization is required, time and labor are wasted, and the reading experience is poor.
Disclosure of Invention
In order to overcome the problem that the document reading progress on different platforms cannot be synchronized or at least partially solve the problem, the invention provides a document reading progress synchronization method and device based on Web.
According to a first aspect of the present invention, there is provided a Web-based document reading progress synchronization method, including:
s1, when capturing the operation that a user clicks a target document, acquiring the file name of the target document, wherein the target document is a document uploaded to a server by the user in advance;
s2, acquiring the target document on the server according to the information of the user and the file name of the target document;
s3, if the target document has a corresponding pre-stored reading progress, calling a first Javascript to load the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
Specifically, the step S3 specifically includes:
if the target document has a corresponding pre-stored reading progress, acquiring a reading page corresponding to the reading progress;
and calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
Specifically, the step S3 is followed by:
calling an onScroll event of the HTMLelement in the second Javascript, monitoring the operation of scrolling the target document, and updating the reading progress of the target document.
Specifically, the step of monitoring the operation of scrolling the target document and updating the reading progress of the target document specifically includes:
acquiring a read page after scrolling in the rolling event callback of the target document;
comparing the read page after rolling with a read page before rolling which is cached in advance;
if the operation of rolling the target document is known as a page turning behavior according to the comparison result, taking the page number of the reading page of the rolled target document as the new reading progress of the target document;
and updating the reading progress of the target document before scrolling by using the new reading progress of the target document.
Specifically, if it is known that the operation of scrolling the target document is a page turning behavior according to the comparison result, the step of taking the page number of the reading page after the target document is scrolled as the new reading progress of the target document specifically includes:
if the page number of the read page after rolling is different from the page number of the read page before rolling, which is cached in advance, the operation of rolling the target document is known as a page turning behavior;
and receiving the scrolled reading page sent by the second Javascript, and storing the page number of the scrolled reading page in a database as the new reading progress of the target document.
Specifically, the step S3 further includes:
and if the target document does not have the corresponding reading progress, calling the first Javascript to load the target document and generating a Web page of a preset default reading page of the target document.
According to a second aspect of the present invention, there is provided a Web-based document reading progress synchronizing apparatus, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the file name of a target document when capturing the operation that a user clicks the target document, and the target document is a document uploaded to a server by the user in advance;
the second acquisition unit is used for acquiring the target document on the server according to the information of the user and the file name of the target document;
and the synchronization unit is used for loading the target document by using the first Javascript when the corresponding pre-stored reading progress exists in the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
Specifically, the synchronization unit includes:
the third acquisition subunit is used for acquiring a reading page corresponding to the reading progress when the target document has the corresponding pre-stored reading progress;
and the generating subunit is used for calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
According to a third aspect of the present invention, there is provided a Web-based document reading progress synchronizing device, comprising:
at least one processor, at least one memory, and a bus; wherein,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the method as previously described.
According to a fourth aspect of the invention, there is provided a non-transitory computer readable storage medium storing a computer program of the method as described above.
The invention provides a Web-based document reading progress synchronizing method and a Web-based document reading progress synchronizing device, wherein a target document to be read by a user is stored in a server, and when the user clicks the target document, the target document is loaded by using a Javascript according to the file name and the reading progress of the target document, and the Javascript script jumps to a reading page corresponding to the reading progress; on the other hand, the synchronization of the reading progress of the target document in the multiple platforms is realized, the reading consistency and consistency are enhanced, and the reading experience of the user is provided.
Drawings
FIG. 1 is a schematic overall flow chart of a Web-based document reading progress synchronization method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an overall structure of a Web-based document reading progress synchronization apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an overall structure of a Web-based document reading progress synchronization apparatus according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In an embodiment of the present invention, a method for synchronizing a document reading progress based on a Web is provided, and fig. 1 is a schematic overall flow chart of the method for synchronizing a document reading progress based on a Web according to an embodiment of the present invention, where the method includes: s1, when capturing the operation that a user clicks a target document, acquiring the file name of the target document, wherein the target document is a document uploaded to a server by the user in advance; s2, acquiring the target document on the server according to the information of the user and the file name of the target document; s3, if the target document has a corresponding pre-stored reading progress, calling a first Javascript to load the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
Specifically, before reading the target document, the user uploads the target document to the server through the upload page, so that the target document to be read is stored in the server from the local, and the reading application program is extended to the internet, so that the user is free from dependence on a specific platform, and can access the uploaded target document through the internet without limitation on time, place and equipment. For example, after the user logs in, the target document is uploaded through the/upload page. In S1, the target document is a PDF, a Word target document, etc., and when reading the target document, the user enters a personal resource page and clicks the target document uploaded to the server in advance. And the browser jumps to a route appointed by the server according to the link of the target document clicked by the user, and the server acquires the link of the target document according to the appointed route. And the server acquires the file name of the target document according to the link of the target document. In S2, the information of the user includes a user number. The user number is used for uniquely identifying the user. And the server acquires the target document on the server according to the information of the user and the file name of the target document. And the file names of all target documents stored by the user are different. In S3, the reading progress is the page number of the target document that the user has turned over last time, and is updated by monitoring the operation of the user when reading the target document each time. And if the target document exists on the server, judging whether the target document clicked by the user has a corresponding reading progress in a database. And if the target document does not exist on the server, terminating the subsequent operation. And the database stores the corresponding relation between the target document and the reading progress. And if the reading progress corresponding to the target document exists in the database, transmitting the file name and the reading progress of the target document into the first Javascript so that the Javascript loads the target document according to the file name of the target document, and jumping to a corresponding reading page according to the reading page of the target document. For example, the file name and the reading progress of the target document are transmitted into the first Javascript script in the form of/read/view. The reading page is a page in the target document corresponding to the reading progress.
According to the embodiment, the target document to be read by the user is stored in the server, when the user clicks the target document, the target document is loaded by using the Javascript according to the file name and the reading progress of the target document, and the reading page corresponding to the reading progress is jumped to, so that the synchronization of the reading progress of the target document in multiple platforms is realized, the reading consistency and the reading consistency are enhanced, and the reading experience of the user is provided; in addition, the Javascript script can be compatible with a browser, an operating system and equipment, can be suitable for various application environments, and has universality.
On the basis of the foregoing embodiment, step S3 in this embodiment specifically includes: if the target document has a corresponding pre-stored reading progress, acquiring a reading page corresponding to the reading progress; and calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
Specifically, whether a reading progress corresponding to the target document exists in the database is judged, and if yes, a reading page corresponding to the reading progress is read. And calling the first Javascript script to load and render the target document, and presenting a reading page corresponding to the reading progress to the user in a Web page form.
In the embodiment, the target document is loaded and rendered through the first Javascript script, and the reading page is presented to the user, because the Javascript script can be compatible with a browser, an operating system and equipment, the method and the device are applicable to various application environments, have universality, and the main development target is only focused on the reading progress synchronization, so that the development efficiency is improved.
On the basis of the foregoing embodiments, in this embodiment, after the step S3, the method further includes: calling an onScroll event of the HTMLelement in the second Javascript, monitoring the operation of scrolling the target document, and updating the reading progress of the target document.
Specifically, after finishing rendering the target document, the server calls the second Javascript script in the Web page of the rendered target document, monitors the scrolling operation performed by the user on the target document by using the onScroll event of the html element in the second Javascript script, and determines whether the scrolling operation of the user is a page turning behavior. And if the scrolling operation of the user is a page turning behavior, updating the reading progress of the target document. And injecting a second Javascript which is written in advance into the Web page generated by the server to process the operation of the user for rolling the target document on the Web page, thereby judging whether the user turns pages.
In this embodiment, since the server finally generates the Web page, and the content of the target document rendered by the first Javascript script is inserted into the Web page in the form of an HTML element, it is convenient to monitor an event of scrolling the target document on the HTML element of the target document and process the event of scrolling the target document, so that it is easy to determine whether the user turns a page.
On the basis of the foregoing embodiment, the step of monitoring the operation of scrolling the target document and updating the reading progress of the target document in this embodiment specifically includes: acquiring a read page after scrolling in the rolling event callback of the target document; comparing the read page after rolling with a read page before rolling which is cached in advance; if the operation of rolling the target document is known as a page turning behavior according to the comparison result, taking the page number of the reading page of the rolled target document as the new reading progress of the target document; and updating the reading progress of the target document before scrolling by using the new reading progress of the target document.
Specifically, in the process of reading the target document by the user, a new reading progress of the target document is obtained by monitoring the operation of the user for scrolling the target document, and the new reading progress is stored in a database so as to be used for jumping to a corresponding reading page according to the reading progress in the subsequent target document rendering process. The operation of scrolling the target document includes keyboard and mouse operations. In the callback of the event of the scroll target document, the second Javascript script acquires a scrolled reading page pdfvviewership application.page2, and compares the scrolled reading page pdfvviewership application.page2 with a pre-cached reading page pdfvviewership application.page1 before scrolling. And judging whether the operation of scrolling the target document is a page turning behavior or not according to the comparison result. And if the operation of scrolling the target document is known as page turning behavior, taking the page number of the reading page of the scrolled target document as the new reading progress of the target document. And sending the new reading progress to an interface provided by a server, and updating the reading progress of the target document before rolling by the server according to the new reading progress so as to update the reading progress of the target document. After the new reading progress of the target document is obtained in the second Javascript script, the new reading progress is sent to the server, and the new reading progress is also stored in a local cache of the user client, such as Cookies or LocalStorage, so as to reduce network requests, prevent server overload, and optimize network resources.
On the basis of the foregoing embodiment, in this embodiment, if it is known that the operation of scrolling the target document is a page turning behavior according to the comparison result, the step of taking the page number of the reading page after the target document is scrolled as the new reading progress of the target document specifically includes: if the page number of the read page after rolling is different from the page number of the read page before rolling, which is cached in advance, the operation of rolling the target document is known as a page turning behavior; and receiving the scrolled reading page sent by the second Javascript, and storing the page number of the scrolled reading page in a database as the new reading progress of the target document.
Specifically, whether the page of the read page after the scrolling is the same as the page of the read page before the scrolling, which is cached in advance, is judged. And if the page number of the read page after rolling is different from the page number of the read page before rolling which is cached in advance, acquiring that the operation of rolling the target document is a page turning behavior, otherwise, acquiring that the operation of rolling the target document is not the page turning behavior. And if the operation of rolling the target document is known as a page turning behavior, transmitting the rolled reading page to a server through an API (application programming interface) provided by the server by the second Javascript, receiving the transmitted rolled reading page by the server, and storing the page number of the rolled reading page in a database as the new reading progress of the target document so as to update the reading progress of the target document.
On the basis of the foregoing embodiment, step S3 in this embodiment further includes: and if the target document does not have the corresponding reading progress, calling the first Javascript to load the target document and generating a Web page of a preset default reading page of the target document.
Specifically, if the reading progress corresponding to the target document does not exist in the database, the first Javascript script is called to load the target document according to the file name of the target document, for example, the file name of the target document is transmitted to the first Javascript script in a form of read/view. And the preset default reading page of the target document is a preset default page of the target document. The default page is used when the reading progress of the target document does not exist, and the reading progress of the target document does not exist when the target document is clicked for reading for the first time. The preset default page is generally set to the first page. At this time, the first Javascript script generates a Web page of a preset default page of the target document.
In another embodiment of the present invention, a document reading progress synchronizing device based on Web is provided, and fig. 2 is a schematic diagram of an overall structure of the document reading progress synchronizing device based on Web according to the embodiment of the present invention, where the device includes a first obtaining unit 1, a second obtaining unit 2, and a synchronizing unit 3, where:
the first obtaining unit 1 is configured to obtain a file name of a target document when an operation that a user clicks the target document is captured, where the target document is a document that is uploaded to a server by the user in advance; the second obtaining unit 2 is configured to obtain the target document on the server according to the information of the user and the file name of the target document; the synchronization unit 3 is configured to load the target document using the first Javascript script when the target document has a corresponding pre-stored reading progress, and jump to a corresponding reading page according to the reading progress of the target document.
Specifically, before reading the target document, the user uploads the target document to the server through the upload page, so that the target document to be read is stored in the server from the local, and the reading application program is extended to the internet, so that the user is free from dependence on a specific platform, and can access the uploaded target document through the internet without limitation on time, place and equipment. For example, after the user logs in, the target document is uploaded through the/upload page. The target documents are PDF, Word target documents and the like, when the target documents are read, a user enters a personal resource page and clicks the target documents uploaded to the server in advance. The browser jumps to a route designated by a server according to the link of the target document clicked by the user, and the first obtaining unit 1 obtains the link of the target document according to the designated route and obtains the file name of the target document according to the link of the target document. The information of the user includes a user number. The user number is used for uniquely identifying the user. The second obtaining unit 2 obtains the target document on the server according to the information of the user and the file name of the target document. And the file names of all target documents stored by the user are different. The reading progress is the page number of the target document which is turned over by the user for the last time, and the updating is carried out by monitoring the operation of the user when reading the target document every time. And when the target document exists on the server, the synchronization unit 3 judges whether the target document clicked by the user has a corresponding reading progress in a database. And if the target document does not exist on the server, terminating the subsequent operation. And the database stores the corresponding relation between the target document and the reading progress. And if the reading progress corresponding to the target document exists in the database, transmitting the file name and the reading progress of the target document into the first Javascript so that the Javascript loads the target document according to the file name of the target document, and jumping to a corresponding reading page according to the reading page of the target document. The reading page is a page in the target document corresponding to the reading progress.
According to the embodiment, the target document to be read by the user is stored in the server, when the user clicks the target document, the target document is loaded by using the Javascript according to the file name and the reading progress of the target document, and the reading page corresponding to the reading progress is jumped to, so that the synchronization of the reading progress of the target document in multiple platforms is realized, the reading consistency and the reading consistency are enhanced, and the reading experience of the user is provided; in addition, the Javascript script can be compatible with a browser, an operating system and equipment, can be suitable for various application environments, and has universality.
On the basis of the foregoing embodiment, the synchronization unit in this embodiment includes: the third acquisition subunit is used for acquiring a reading page corresponding to the reading progress when the target document has the corresponding pre-stored reading progress; and the generating subunit is used for calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
On the basis of the foregoing embodiments, the apparatus in this embodiment further includes an updating unit, configured to invoke an onScroll event of an html element in a second Javascript script, monitor an operation of scrolling the target document, and update the reading progress of the target document.
On the basis of the foregoing embodiment, in this embodiment, the updating unit is specifically configured to: acquiring a read page after scrolling in the rolling event callback of the target document; comparing the read page after rolling with a read page before rolling which is cached in advance; if the operation of rolling the target document is known as a page turning behavior according to the comparison result, taking the page number of the reading page of the rolled target document as the new reading progress of the target document; and updating the reading progress of the target document before scrolling by using the new reading progress of the target document.
On the basis of the foregoing embodiments, in this embodiment, the updating unit is further specifically configured to: if the page number of the read page after rolling is different from the page number of the read page before rolling, which is cached in advance, the operation of rolling the target document is known as a page turning behavior; and receiving the scrolled reading page sent by the second Javascript, and storing the page number of the scrolled reading page in a database as the new reading progress of the target document.
On the basis of the foregoing embodiments, in this embodiment, the synchronization unit is further configured to: and when the target document does not have the corresponding reading progress, calling the first Javascript to load the target document and generating a Web page of a preset default reading page of the target document.
The embodiment provides a document reading progress synchronization device based on Web, and fig. 3 is a schematic diagram of an overall structure of the document reading progress synchronization device based on Web according to the embodiment of the present invention, where the device includes: at least one processor 31, at least one memory 32, and a bus 33; wherein,
the processor 31 and the memory 32 complete mutual communication through the bus 33;
the memory 32 stores program instructions executable by the processor 31, and the processor calls the program instructions to execute the methods provided by the method embodiments, for example, the method includes: s1, when capturing the operation that a user clicks a target document, acquiring the file name of the target document, wherein the target document is a document uploaded to a server by the user in advance; s2, acquiring the target document on the server according to the information of the user and the file name of the target document; s3, if the target document has a corresponding pre-stored reading progress, calling a first Javascript to load the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: s1, when capturing the operation that a user clicks a target document, acquiring the file name of the target document, wherein the target document is a document uploaded to a server by the user in advance; s2, acquiring the target document on the server according to the information of the user and the file name of the target document; s3, if the target document has a corresponding pre-stored reading progress, calling a first Javascript to load the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the Web-based document reading progress synchronizing device are merely illustrative, wherein the units illustrated as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A document reading progress synchronization method based on Web is characterized by comprising the following steps:
s1, when capturing the operation that a user clicks a target document, acquiring the file name of the target document, wherein the target document is uploaded to a server by the user in advance;
s2, acquiring the target document on the server according to the information of the user and the file name;
s3, if the target document has a corresponding pre-stored reading progress, calling a first Javascript to load the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
2. The method according to claim 1, wherein the step S3 specifically includes:
if the target document has a corresponding pre-stored reading progress, acquiring a reading page corresponding to the reading progress;
and calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
3. The method according to claim 1 or 2, wherein the step S3 is further followed by:
calling an onScroll event of the HTMLelement in the second Javascript, monitoring the operation of scrolling the target document, and updating the reading progress of the target document.
4. The method according to claim 3, wherein the operation of scrolling the target document is monitored, and the step of updating the reading progress of the target document specifically comprises:
acquiring a read page after scrolling in the rolling event callback of the target document;
comparing the read page after rolling with a read page before rolling which is cached in advance;
if the operation of rolling the target document is known as a page turning behavior according to the comparison result, taking the page number of the reading page of the rolled target document as the new reading progress of the target document;
and updating the reading progress of the target document before scrolling by using the new reading progress of the target document.
5. The method according to claim 4, wherein if it is known from the comparison result that the operation of scrolling the target document is a page turning behavior, the step of taking the page number of the reading page after the scrolling of the target document as the new reading progress of the target document specifically comprises:
if the page number of the read page after rolling is different from the page number of the read page before rolling, which is cached in advance, the operation of rolling the target document is known as a page turning behavior;
and receiving the scrolled reading page sent by the second Javascript, and storing the page number of the scrolled reading page in a database as the new reading progress of the target document.
6. The method according to claim 1 or 2, wherein the step S3 further comprises:
and if the target document does not have the corresponding reading progress, calling the first Javascript to load the target document and generating a Web page of a preset default reading page of the target document.
7. A Web-based document reading progress synchronizing device, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the file name of a target document when capturing the operation that a user clicks the target document, and the target document is a document uploaded to a server by the user in advance;
the second acquisition unit is used for acquiring the target document on the server according to the information of the user and the file name of the target document;
and the synchronization unit is used for loading the target document by using the first Javascript when the corresponding pre-stored reading progress exists in the target document, and jumping to a corresponding reading page according to the reading progress of the target document.
8. The apparatus of claim 7, wherein the synchronization unit comprises:
the third acquisition subunit is used for acquiring a reading page corresponding to the reading progress when the target document has the corresponding pre-stored reading progress;
and the generating subunit is used for calling the first Javascript script to load the target document and generating a Web page of a reading page corresponding to the reading progress.
9. A Web-based document reading progress synchronizing device, comprising:
at least one processor, at least one memory, and a bus; wherein,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710930298.XA CN110020242A (en) | 2017-10-09 | 2017-10-09 | A kind of document reading progress synchronous method and device based on Web |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710930298.XA CN110020242A (en) | 2017-10-09 | 2017-10-09 | A kind of document reading progress synchronous method and device based on Web |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110020242A true CN110020242A (en) | 2019-07-16 |
Family
ID=67186489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710930298.XA Pending CN110020242A (en) | 2017-10-09 | 2017-10-09 | A kind of document reading progress synchronous method and device based on Web |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110020242A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851456A (en) * | 2019-11-08 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Information processing method, electronic equipment and storage medium |
CN113051505A (en) * | 2021-03-24 | 2021-06-29 | 北京百度网讯科技有限公司 | Document display method and device and electronic equipment |
CN113157656A (en) * | 2021-04-09 | 2021-07-23 | 宋彦震 | Multi-terminal document page number synchronous distribution display control method based on online live broadcast |
CN113742550A (en) * | 2021-08-20 | 2021-12-03 | 广州市易工品科技有限公司 | Data acquisition method, device and system based on browser |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080028292A1 (en) * | 1997-12-22 | 2008-01-31 | Ricoh Company, Ltd. | Techniques to facilitate reading of a document |
CN102238197A (en) * | 2010-04-20 | 2011-11-09 | 上海博路信息技术有限公司 | Mobile reading multi-screen synchronization method |
CN102710761A (en) * | 2012-05-24 | 2012-10-03 | 上海克而瑞信息技术有限公司 | PDF (portable document format) file online storage and access method |
CN102855226A (en) * | 2012-08-21 | 2013-01-02 | 广州市渡明信息技术有限公司 | Synchronous reading method, reading equipment and server |
CN104239426A (en) * | 2014-08-25 | 2014-12-24 | 武汉天喻信息产业股份有限公司 | System and method for realizing cross-platform document reading |
CN105630525A (en) * | 2014-10-31 | 2016-06-01 | 广州市动景计算机科技有限公司 | Page synchronization method and apparatus |
-
2017
- 2017-10-09 CN CN201710930298.XA patent/CN110020242A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080028292A1 (en) * | 1997-12-22 | 2008-01-31 | Ricoh Company, Ltd. | Techniques to facilitate reading of a document |
CN102238197A (en) * | 2010-04-20 | 2011-11-09 | 上海博路信息技术有限公司 | Mobile reading multi-screen synchronization method |
CN102710761A (en) * | 2012-05-24 | 2012-10-03 | 上海克而瑞信息技术有限公司 | PDF (portable document format) file online storage and access method |
CN102855226A (en) * | 2012-08-21 | 2013-01-02 | 广州市渡明信息技术有限公司 | Synchronous reading method, reading equipment and server |
CN104239426A (en) * | 2014-08-25 | 2014-12-24 | 武汉天喻信息产业股份有限公司 | System and method for realizing cross-platform document reading |
CN105630525A (en) * | 2014-10-31 | 2016-06-01 | 广州市动景计算机科技有限公司 | Page synchronization method and apparatus |
Non-Patent Citations (2)
Title |
---|
(美)外林编著:聂松译: "《PHP与MySQL Web开发权威指南》", 31 October 2002, 中国电力出版社 * |
张光辉等: "《基于.NET平台的WEB开发》", 29 February 2016, 西南交通大学出版社 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110851456A (en) * | 2019-11-08 | 2020-02-28 | 北京字节跳动网络技术有限公司 | Information processing method, electronic equipment and storage medium |
CN110851456B (en) * | 2019-11-08 | 2022-03-29 | 北京字节跳动网络技术有限公司 | Information processing method, electronic equipment and storage medium |
CN113051505A (en) * | 2021-03-24 | 2021-06-29 | 北京百度网讯科技有限公司 | Document display method and device and electronic equipment |
CN113051505B (en) * | 2021-03-24 | 2024-09-20 | 北京百度网讯科技有限公司 | Document display method and device and electronic equipment |
CN113157656A (en) * | 2021-04-09 | 2021-07-23 | 宋彦震 | Multi-terminal document page number synchronous distribution display control method based on online live broadcast |
CN113742550A (en) * | 2021-08-20 | 2021-12-03 | 广州市易工品科技有限公司 | Data acquisition method, device and system based on browser |
CN113742550B (en) * | 2021-08-20 | 2024-04-19 | 广州市易工品科技有限公司 | Browser-based data acquisition method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107622135B (en) | Method and apparatus for displaying information | |
CN110096660B (en) | Method and device for loading page pictures and electronic equipment | |
EP2916243B1 (en) | Method, apparatus, server and system for implementing web application | |
US8527862B2 (en) | Methods for making ajax web applications bookmarkable and crawlable and devices thereof | |
CN104572843B (en) | The loading method and device of a kind of page | |
CN104426925B (en) | Web page resources acquisition methods and device | |
CN110020329B (en) | Method, device and system for generating webpage | |
CN106874519B (en) | Page display method and device | |
CN107679214B (en) | Link positioning method, device, terminal and computer readable storage medium | |
US20170032494A1 (en) | Methods for displaying a webpage fragment on a desktop and systems for taking a snapshot of webpage fragment for displaying on a desktop | |
CN110471656B (en) | Component hierarchy adjustment method and device | |
CN106294658A (en) | The quick methods of exhibiting of webpage and device | |
CN107357890B (en) | Webpage file processing method, device and system and storage equipment | |
CN110020242A (en) | A kind of document reading progress synchronous method and device based on Web | |
CN113382083B (en) | Webpage screenshot method and device | |
US20140095579A1 (en) | System and method for increasing web site serving performance | |
US20130138770A1 (en) | Apparatus and method for sharing web contents using inspector script | |
CN107305528B (en) | Application testing method and device | |
US9294538B1 (en) | Dynamic content injection | |
CN106649581B (en) | Webpage repairing method and client | |
CN105224611A (en) | Based on the operation processing method of browser, device and browser | |
CN116126880A (en) | Table data processing method, apparatus, electronic device and storage medium | |
CN111783005A (en) | Method, apparatus and system for displaying web page, computer system and medium | |
US10095791B2 (en) | Information search method and apparatus | |
US20170048181A1 (en) | Method and System for Creating Dynamic Email Signatures |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190716 |