CN111316618B - Network page storage method and terminal - Google Patents

Network page storage method and terminal Download PDF

Info

Publication number
CN111316618B
CN111316618B CN201880072499.3A CN201880072499A CN111316618B CN 111316618 B CN111316618 B CN 111316618B CN 201880072499 A CN201880072499 A CN 201880072499A CN 111316618 B CN111316618 B CN 111316618B
Authority
CN
China
Prior art keywords
terminal
page
browsing
webpage
server
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
CN201880072499.3A
Other languages
Chinese (zh)
Other versions
CN111316618A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111316618A publication Critical patent/CN111316618A/en
Application granted granted Critical
Publication of CN111316618B publication Critical patent/CN111316618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A network page storage method and a terminal relate to the technical field of terminals, wherein the method comprises the following steps: the terminal displays a first browsing webpage; the terminal receives a collection operation of a user, wherein the collection operation is used for indicating the terminal to collect the first browsing webpage; the terminal responds to the collection operation and collects a second browsing page; and the second browsing page is obtained after the first browsing page is subjected to format typesetting. According to the technical scheme, the user can be helped to view the second browsing page off line, the first browsing webpage is not required to be searched by a mobile network or WiFi any more so as to obtain the second browsing page, and the first browsing webpage is subjected to format typesetting processing, so that the second browsing page with a regular format can be helped to be obtained. In this way, the saved second browsing page is facilitated to be viewed offline by the user.

Description

Network page storage method and terminal
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a network page storage method and a terminal.
Background
At present, a plurality of Applications (APPs) can be installed in a mobile terminal, and most APPs provide article collection functions, such as APPs for news information, popular comment, browser and the like. However, in the existing collection scheme, when a user collects an original article through a collection button in an APP, a page link is generally stored, and when the original article is viewed next time, an original browsing webpage in the internet is searched through the stored page link, so that the original article is read.
In the existing collection scheme, once a mobile network or a wireless fidelity (WiFi) does not exist or an original article is deleted from an APP or moved, the original article cannot be continuously viewed through a collected page link. Moreover, when there is a network, it will consume one flow each time the original article is viewed through the collected page links. Therefore, the existing collection scheme is inconvenient for a user to check the page information of the network page off line.
Disclosure of Invention
The embodiment of the application provides a network page storage method and a terminal, so that a user can conveniently view page information of a collected network page in an off-line manner.
In a first aspect, an embodiment of the present application provides a method for saving a web page, where the method includes: the terminal displays a first browsing webpage; the terminal receives a collection operation of a user, wherein the collection operation is used for indicating the terminal to collect the first browsing webpage; the terminal responds to the collection operation and collects a second browsing page; and the second browsing page is obtained after the first browsing page is subjected to format typesetting.
Based on the scheme, the terminal collects the second browsing page obtained after the formatting processing is performed on the first browsing page in response to the collection operation, so that the second browsing page can be viewed off line without depending on a mobile network or WiFi to search the first browsing page so as to obtain the second browsing page, and the formatting processing is performed on the first browsing page, which is beneficial to obtaining the second browsing page with a regular format. In this way, the saved second browsing page is facilitated to be viewed offline by the user.
Based on the method, the terminal collects the second browsing page in response to the collection operation, and the following optional implementation methods can be included.
The first implementation method is that a terminal sends a collection request to a server, the collection request is used for requesting the server to perform format typesetting processing on a first browsed webpage, a second browsed page is generated, and the second browsed page is returned; the terminal receives a second browsing page returned by the server; the terminal stores the second browsing page.
By the implementation method, the terminal receives the second browsing page returned by the server, which is beneficial to simplifying the processing process of the terminal for collecting the first browsing page.
As a specific example, the favorites request includes the following: article titles and application names corresponding to the first browsing webpage; or, a page address corresponding to the first browsing webpage; or the article title, the application name and the page address corresponding to the first browsed webpage.
Further, as a possible implementation manner, the receiving, by the terminal, the second browsing page returned by the server may include: the terminal receives an information identifier corresponding to a collection request sent by a server; the terminal sends a downloading request to the server, wherein the downloading request comprises an information identifier; and the terminal receives a second browsing page returned by the server according to the information identifier.
Through the technical scheme, the terminal and the server interact to obtain the information identifier corresponding to the collection request, so that the second browsing page can be accurately obtained from the server according to the information identifier, and the processing process of collecting the first browsing page by the terminal can be simplified.
Based on any of the above embodiments, after the terminal sends the collection request to the server, before the terminal stores the second browsing page, the method further includes: the terminal receives a collection failure message sent by the server; the collection failure message is used for informing the terminal that the second browsing page fails to be acquired; and the terminal performs format typesetting processing on the first browsed webpage to obtain a second browsed webpage.
According to the technical scheme, when the terminal fails to obtain the second browsing page from the server, the terminal collects the first browsing webpage and automatically processes the first browsing page to obtain the second browsing page, so that the terminal is facilitated to successfully collect the first browsing webpage.
The terminal responds to the collection operation to acquire a first browsing webpage; the terminal performs format typesetting processing on the first browsed webpage to obtain and generate a second browsed webpage; the terminal stores the second browsing page.
Through the technical scheme, the terminal collects the first browsing webpage and automatically processes the first browsing webpage to obtain the second browsing webpage, so that the interactive process between the terminal and the server is facilitated to be simplified.
Based on any one of the above implementation manners, the receiving, by the terminal, the collection operation of the user specifically includes: the terminal receives the collection operation in a mode of pressing the two fingers of the user.
Through the technical scheme, the terminal is not limited by the fact that the APP does not have the collection function when the first browsing webpage is collected, and the universality of collecting the first browsing webpage in the APP is improved.
In a second aspect, an embodiment of the present application provides a method for saving a web page, where the method includes: the method comprises the steps that a server receives a collection request of a first browsed webpage sent by a terminal, wherein the collection request comprises an article title and an application name corresponding to the first browsed webpage; or, a page address corresponding to the first browsing webpage; or the article title, the application name and the page address corresponding to the first browsed webpage; the server acquires page information of a first browsed webpage according to the collection request; performing format typesetting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed webpage; and the server sends the second browsing page to the terminal.
According to the technical scheme, the server acquires the first browsed webpage according to the collection request, performs format typesetting processing to generate a second browsed webpage, and then sends the second browsed webpage to the terminal, so that the method is beneficial to simplifying the processing process of collecting the first browsed webpage by the terminal.
In a possible design, after the server receives the collection request of the first browsed webpage sent by the terminal, and before the server obtains the page information of the first browsed webpage, the method further includes: the server determines that the collection request meets a preset condition.
As an implementation manner, if the server determines that the collection request meets the preset condition, the server acquires page information of the first browsed webpage, performs format typesetting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed webpage, and sends the second browsed webpage to the terminal. Thus, the server is facilitated to successfully acquire the second browsing page.
As another implementation manner, if the server determines that the collection request does not meet the preset condition, the server sends a collection failure message to the terminal; correspondingly, the terminal acquires the first browsed webpage, and performs format typesetting processing on the first browsed webpage to obtain a second browsed webpage. Therefore, when the terminal fails to obtain the second browsing page from the server, the terminal collects the first browsing webpage and automatically processes the first browsing webpage to obtain the second browsing page, and the terminal is facilitated to successfully collect the first browsing webpage.
In one possible design, the preset condition includes any one or more of the following: the word number of the article title is not more than the preset word number, and the application name is one of a preset application name set; the page address includes characters contained within a preset character set.
Based on any of the above embodiments, after the server receives the collection request of the first browsing webpage sent by the terminal, and before the server sends the second browsing webpage to the terminal, the method further may further include: and the server acquires a second browsing page from a database for storing page information according to the collection request.
Through the technical scheme, the server acquires the stored second browsing page from the database, so that the implementation process of acquiring the second browsing page by the server can be further simplified.
Further, as a possible implementation manner, the server obtains the second browsing page from the database for storing the page information according to the collection request, and specifically includes: the server acquires an information identifier corresponding to the collection request from a database for storing page information according to the collection request; the server sends an information identifier corresponding to the collection request to the terminal; the server receives a downloading request sent by the terminal, wherein the downloading request comprises an information identifier corresponding to the collection request; and the server acquires a second browsing page from a database for storing page information according to the information identifier corresponding to the collection request.
By the technical scheme, the processing process of collecting the first browsing webpage by the terminal is facilitated to be simplified.
Further, as a possible implementation manner, after the server receives the collection request of the first browsing webpage sent by the terminal, the method further includes: the server acquires page information of the first browsing webpage according to the collection request if the server determines that the second browsing webpage is not stored in the database according to the collection request; and the server performs format typesetting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed webpage.
According to the technical scheme, when the second browsing page is not stored in the database, the server carries out format typesetting processing on the first browsing page, so that the second browsing page is obtained, and the processing process of collecting the first browsing page by the terminal is facilitated to be simplified.
Further, after the server performs formatting processing on the first browsed webpage to obtain a second browsed webpage, the method further includes: and the server stores the second browsing page in the database.
By the technical scheme, the implementation process of obtaining the second browsing page next time by the server is facilitated to be simplified.
Based on any embodiment, if the server fails to acquire the page information to be collected according to the collection request, the server feeds back a collection failure message to the terminal. Therefore, the terminal can timely and automatically process the second browsing page when the terminal does not successfully obtain the second browsing page from the server.
In a third aspect, an embodiment of the present application provides a page-saving graphical user interface GUI, where the graphical user interface is stored in a terminal, the terminal includes a touch screen, a memory, and one or more processors, where the one or more processors are configured to execute one or more computer programs stored in the memory, and the graphical user interface includes:
displaying a first browsing webpage on the touch screen; the first browsing webpage is a page of a first application; displaying a favorite button on the touch screen in response to a first operation; collecting the first browsing webpage in response to a second operation on the collection button; and responding to a third operation of the user for viewing the first browsing webpage, and displaying a second browsing page on the touch screen.
In one possible design, in response to a second operation on the favorites button, favoring the first browsed webpage includes: performing format typesetting processing on the first browsed webpage in response to a second operation on the collection button to obtain a second browsed webpage; and storing the second browsing page.
In another possible design, the favoring the first browsed webpage in response to the second operation on the favorites button includes: responding to a second operation of the collection button, the terminal sends a collection request to a server, wherein the collection request is used for requesting the server to perform format typesetting processing on the first browsed webpage, generate a second browsed webpage, and return the second browsed webpage to the terminal; and the terminal receives the second browsing page returned by the server.
In a fourth aspect, an embodiment of the present application provides a terminal for page saving, including: a touch screen, wherein the touch screen comprises a touch sensitive surface and a display; one or more processors; a memory; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the terminal, cause the terminal to perform the method of the first aspect and any possible design of the first aspect thereof. It should be noted that the memory may be integrated into the processor or may be independent from the processor.
In a fifth aspect, an embodiment of the present application provides a server for page saving, including: a memory for storing one or more computer programs and a processor; the one or more computer programs stored in the memory, when executed by the processor, enable the server to implement the method of any of the second aspect of the embodiments of the present application and its second aspect. It should be noted that the memory may be integrated into the processor or may be independent from the processor.
In a sixth aspect, the chip of the embodiment of the present application, coupled with a memory in a terminal, executes a technical solution of any one of the first aspect of the embodiment of the present application and the first aspect of the embodiment of the present application. "coupled" in the context of this application means that two elements are joined to each other either directly or indirectly.
In a seventh aspect, a chip of the embodiment of the present application, where the chip is coupled to a memory in a server, and implements a technical solution of any one of the second aspect of the embodiment of the present application and its possible design. "coupled" in the context of this application means that two elements are joined to each other either directly or indirectly.
In an eighth aspect, a computer storage medium of the embodiments of the present application includes a computer program, which, when executed on a terminal, causes the terminal to perform the method of the first aspect of the embodiments of the present application and any one of the possible designs of the first aspect thereof; alternatively, the computer program, when run on a server, causes the server to perform a method as embodied in the second aspect of the embodiments of the present application and any of its possible designs in the second aspect.
In a ninth aspect, a computer program product in the embodiments of the present application, when running on a terminal, causes the terminal to execute the method according to any one of the first aspect and its possible design; alternatively, the computer program, when run on a server, causes the server to perform a method as embodied in the second aspect of the embodiments of the present application and any of its possible designs in the second aspect.
Drawings
Fig. 1 is a schematic structural diagram of a possible terminal 100 according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a possible graphical user interface provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a user interface of a possible application scenario provided by an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a process for collecting a web page according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a method for saving a web page according to an embodiment of the present application;
fig. 6 is a schematic diagram of a possible communication system architecture according to an embodiment of the present application;
fig. 7 is a schematic diagram of a possible software architecture of a communication system according to an embodiment of the present application;
fig. 8 is a flowchart of another network page saving method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a possible terminal according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a possible server provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of another possible server provided in the embodiment of the present application.
Detailed Description
It should be understood that "at least one" in the embodiments of the present application means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a alone, both A and B, and B alone, where A, B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b and c can be single or multiple.
The embodiments disclosed in the embodiments of the present application can be applied to a terminal. In some embodiments, the terminal may be a portable terminal, such as a cell phone, a tablet, a wearable device with wireless communication capabilities (e.g., a smart watch), an in-vehicle device, and/or the like, that includes functionality such as a personal digital assistant and/or a music player. Exemplary embodiments of the portable terminal include, but are not limited to, a mount
Figure GDA0003021793460000053
Or other operating system. The portable terminal may also be a portable terminal such as a Laptop computer (Laptop) with a touch sensitive surface, e.g. a touch panel, etc. It should also be understood that in other embodiments, the terminal may be a desktop computer with a touch-sensitive surface (e.g., a touch panel).
Fig. 1 shows a schematic structural diagram of a terminal 100.
It should be understood that the illustrated terminal 100 is merely an example, and that the terminal 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The various components of the terminal 100 are described in detail below:
the processor 101 is a control center of the terminal 100, connects various parts of the terminal 100 using various interfaces and lines, and performs various functions of the terminal 100 and processes data by running or executing an application (App) stored in the memory 102 and calling data and instructions stored in the memory 102. For example, the processor 101 may perform a typesetting process on the browsing page in the APP.
In some embodiments, processor 101 may include one or more processing units. The processor 101 may also integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, application programs and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 101. For example, the processor 101 may be a kylin 970 chip manufactured by Huanti technologies, Inc. In some other embodiments of the present application, the processor 101 may further include a fingerprint verification chip, configured to verify the collected fingerprint.
The memory 102 is used to store applications and data. The memory 102 mainly includes a program storage area and a data storage area. Wherein, the program storage area can store an operating system, and application programs (such as a sound playing function, an image playing function, etc.) required by at least one function; the data storage area may store data (such as audio data, a phonebook, web pages, files, etc.) created according to the use of the terminal 100. Illustratively, the data storage area may also store photos taken by the user, or pictures synthesized based on the photos taken by the user, or the like. It should be understood that,the photos taken by the user using the terminal 100 or the photos synthesized based on the photos taken by the user using the terminal 100 can also be stored in the cloud, and when the terminal 100 receives the operation of the user for checking the photos, the corresponding photos are obtained from the cloud and displayed on the terminal 100. Further, the memory 102 may include high speed random access memory, and may also include non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other non-volatile solid state storage device. The memory 102 may also store various operating systems, such as those developed by apple Inc
Figure GDA0003021793460000051
Operating System, developed by Google
Figure GDA0003021793460000052
An operating system, etc.
The RF circuit 103 may be used for receiving and transmitting wireless signals during the transmission and reception of information or during a call. Specifically, the RF circuit 103 may receive downlink data of the base station and process the downlink data to the processor 101. In addition, the RF circuit 103 may also transmit uplink data to the base station. In general, the RF circuitry 103 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the RF circuitry 103 may also enable communication with other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
The audio circuitry 140, speaker 141, and microphone 142 may provide an audio interface between a user and the terminal 100. The audio circuit 140 may transmit the electrical signal converted from the received audio data to the speaker 141, and convert the electrical signal into a sound signal by the speaker 141 and output the sound signal; on the other hand, the microphone 142 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 140, and outputs the audio data to the RF circuit 103 to be transmitted to, for example, a terminal or outputs the audio data to the memory 102 for further processing.
The touch screen 150 may include a touch sensitive surface 151 and a display 152. Among other things, touch-sensitive surface 151 (e.g., a touch panel) can collect touch events on or near the touch-sensitive surface of a user of terminal 100 (e.g., user manipulation of a finger, stylus, etc. on or near touch-sensitive surface 151) and transmit the collected touch information to other devices, such as processor 101. Among other things, a touch event of a user near the touch-sensitive surface 151 may be referred to as a hover touch. Hover touch may refer to a user not needing to directly contact the touchpad in order to select, move, or drag a target (e.g., App icon, etc.), but only needing to be located near the terminal in order to perform a desired function. In the context of a hover touch application, the terms "touch," "contact," and the like do not imply a contact that is used to directly contact the touch screen 150, but rather a contact that is near or in proximity thereto. The touch-sensitive surface 151 capable of floating touch control can be implemented by using capacitance, infrared light sensing, ultrasonic waves and the like.
The touch sensitive surface 151 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 101, and the touch controller can also receive and execute instructions sent by the processor 101. In addition, the touch-sensitive surface 151 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves.
A display (also referred to as a display screen) 152 may be used to display information entered by or provided to the user as well as various Graphical User Interfaces (GUIs). For example, the display 152 may display a photograph, video, web page, or file, etc. As another example, the display 152 may display a graphical user interface as shown in FIG. 2. The graphical user interface shown in fig. 2 includes, among other things, a status bar 201, a concealable navigation bar 202, a time and weather widget (widget)203, and icons of applications, such as a browser icon 204. The status bar 201 includes the name of the operator (e.g., china mobile), the mobile network (e.g., 4G), the time and the remaining power. Navigation bar 202 includes a back (back) key icon, a home (home) key icon, and a forward key icon. Further, it is understood that in some embodiments, a Bluetooth icon, a Wi-Fi icon, an add-on icon, etc. may also be included in the status bar 201. It is also understood that, in other embodiments, a Dock bar may be included in the graphical user interface shown in fig. 2, and common application icons may be included in the Dock bar. When the processor 101 detects a touch event of a finger (or a stylus, etc.) of a user with respect to an application icon, in response to the touch event, a user interface of an application corresponding to the application icon is opened and displayed on the display 152.
In the case where the display 152 currently displays the graphical user interface shown in fig. 2, if the processor 101 detects an operation of the browser icon 204 by the user, the user interface of the browser application is displayed on the display 152 in response to the operation. For example, the operation of the browser icon 204 by the user may be an operation of the user clicking or touching the browser icon 204, or may be an operation of the user touching the top of the browser icon 204, which is not limited to this.
It should be understood that in general, the display 152 may include both a display controller and a display device. The display controller is configured to receive a signal or data sent by the processor 101 to drive a display device to display a corresponding interface. For example, the display device may be configured by an Active Matrix Organic Light Emitting Diode (AMOLED).
It will be appreciated that the touch sensitive surface 151 may overlie the display 152, and that when a touch event is detected on or near the touch sensitive surface 151, it is communicated to the processor 101 to determine the type of touch event, and the processor 101 may then provide a corresponding visual output on the display 152 in dependence on the type of touch event. Although in fig. 1 the touch-sensitive surface 151 and the display 152 are shown as two separate components to implement input and output functions of the terminal 100, in some embodiments the touch-sensitive surface 151 and the display 152 may be integrated to implement input and output functions of the terminal 100. It is understood that the touch screen 150 is formed by stacking multiple layers of materials, only the touch-sensitive surface (layer) and the display (layer) are shown in the embodiment of the present application, and the other layers are not described in detail in the embodiment of the present application. In addition, in some other embodiments of the present application, the touch-sensitive surface 151 may be covered on the display 152, and the size of the touch-sensitive surface 151 is larger than that of the display 152, so that the display 152 is completely covered under the touch-sensitive surface 151, or the touch-sensitive surface 151 may be configured on the front side of the terminal 100 in a full-panel manner, that is, all touches of the user on the front side of the terminal 100 can be sensed by the terminal, so that a full-touch experience on the front side of the terminal can be achieved. In other embodiments, the touch-sensitive surface 151 is disposed on the front side of the terminal 100 in a full-panel manner, and the display 152 may be disposed on the front side of the terminal 100 in a full-panel manner, so that a frameless structure can be implemented on the front side of the terminal. In some other embodiments of the present application, the touch screen 150 may further include a series of pressure sensor arrays, which may enable the terminal to sense the pressure applied to the touch screen 150 by the touch event.
One or more sensors 106, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display of the touch screen 150 according to the brightness of ambient light, and a proximity sensor that turns off the power of the display when the terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like. Other sensors, such as gyroscopes, may be used to detect the angle of rotation of terminal 100 about a fixed point or axis.
In some embodiments of the present application, the sensor 106 may also include a fingerprint sensor. For example, the fingerprint sensor may be disposed on the rear surface of the terminal 100 (e.g., below the rear camera), or disposed on the front surface of the terminal 100 (e.g., below the touch screen 150). In addition, the fingerprint recognition function may also be implemented by configuring a fingerprint sensor in the touch screen 150, that is, the fingerprint sensor may be integrated with the touch screen 150 to implement the fingerprint recognition function of the terminal 100. In this case, the fingerprint sensor may be disposed in the touch screen 250, may be a part of the touch screen 150, or may be otherwise disposed in the touch screen 150. Additionally, the fingerprint sensor may be implemented as a full panel fingerprint sensor, and thus, the touch screen 150 may be considered as a panel that can be used for fingerprint acquisition at any location. In some embodiments, the fingerprint sensor may process the captured fingerprint (e.g., verify the captured fingerprint), and send the fingerprint processing result (e.g., whether the fingerprint is verified) to the processor 101, and the processor 101 performs corresponding processing according to the fingerprint processing result. In other embodiments, the fingerprint sensor may also send the captured fingerprint to the processor 101 for processing (e.g., fingerprint verification, etc.) by the processor 101. The fingerprint sensor in embodiments of the present application may employ any type of sensing technology including, but not limited to, optical, capacitive, piezoelectric, or ultrasonic sensing technologies, among others. In addition, as to a specific technical solution for integrating the fingerprint sensor in the touch screen 150 in the embodiment of the present application, reference may be made to a patent application with application number US 2015/0036065 a1, entitled "fingerprint sensor in terminal", published by the united states patent and trademark office, the entire controls of which are incorporated by reference in various embodiments of the present application. In addition, the terminal 200 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described in detail herein.
Wi-Fi apparatus 107 for providing terminal 100 with network access compliant with Wi-Fi related standard protocols. The terminal 100 may access a Wi-Fi access point via the Wi-Fi device 107 to assist the user in sending and receiving e-mail, browsing web pages, accessing streaming media, etc., which provides the user with wireless broadband internet access. In other embodiments, the Wi-Fi device 207 can also act as a Wi-Fi wireless access point and can provide Wi-Fi network access to other terminals.
The peripheral interface 108 is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, SIM card, etc.). For example, the mouse is connected through a universal serial bus interface, and the SIM card provided by an operator is connected through metal contacts on a user identification module card slot. Peripheral interface 108 may be used to couple the aforementioned external input/output peripherals to processor 101 and memory 103.
The terminal 100 may further include a power supply device 109 (such as a battery and a power management chip) for supplying power to each component, and the battery may be logically connected to the processor 101 through the power management chip, so as to implement functions of managing charging, discharging, and power consumption through the power supply device 109.
Although not shown in fig. 1, the terminal 100 may further include a bluetooth device, a positioning device, a flash, a micro-projection device, a Near Field Communication (NFC) device, and the like, which are not described in detail herein. The front-facing camera can be used for capturing face feature information, and the processor 101 can perform face recognition on the face feature information, so as to perform subsequent processing.
Although not shown in fig. 1, the terminal 100 may further include a bluetooth device, a positioning device, a flash, a micro-projection device, a Near Field Communication (NFC) device, and the like, which are not described in detail herein.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the terminal 100. In other embodiments of the present application, terminal 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The following embodiments can be implemented in the terminal 100 having the above-described hardware structure.
Based on the terminal 100 shown in fig. 1, a plurality of applications, such as preset system applications, e.g., settings, phone calls, etc., and third-party applications installed by a user, e.g., a browser, a news application, a communication application, etc., may be supported in the terminal. The user may browse web pages in the system application or the third-party application, taking as an example that the first browsed webpage of the first application (hereinafter, the first application is referred to as APP1) is displayed on the touch screen 150 of the terminal, the user may be interested in the page information of the first browsed webpage, and may not read immediately due to the work at hand or the surrounding environment, and may collect the first browsed webpage in APP1 first, and continue to read the page information of the collected first browsed webpage when reading is convenient.
In order to solve the problem that the existing collection scheme is inconvenient for a user to view the page information of the collected web pages offline, the embodiment of the application provides a web page storage method. According to the method, the first browsing webpage in the APP1 can be collected by the terminal, the second browsing webpage obtained by formatting the first browsing webpage is stored in the second application (hereinafter, the second application is referred to as the APP2), and therefore the user can view the second browsing webpage in the APP2 in an off-line mode.
As an example, the display 152 of the terminal may display graphical user interfaces 301 and 302 as shown in fig. 3. For example, the terminal currently displays a graphical user interface 301 as shown in a of fig. 3, and icons of various applications (e.g., browser icons 204) and various widgets (e.g., slide widgets 303 from side to side) are included on the graphical user interface 301. The terminal may display a graphical user interface 302 as shown in B in fig. 3 on the display 152 in response to an operation of sliding the screen to the right on the graphical user interface 301 as shown in a in fig. 3, for example, a sliding direction as shown by a dashed arrow on the graphical user interface 301. It should be noted that the graphical user interface 302 may also be referred to as minus one screen.
On the graphical user interface 302 shown in B in fig. 3, system applications with various functions, such as context intelligence 310, read-later application 320, etc., are included, and it is to be understood that in some embodiments, system applications with other functions, such as intelligent reminders, voice assistants, etc., may also be included in the graphical user interface shown in B in fig. 3. The scenario intelligence 310 includes a mobile phone use card 311, and the read-later application 320 includes a card for displaying page information of a favorite web page, for example, the card 321 includes a web page of a first education question browsed in a current headline, and for another example, the card 322 includes page information of a web page of vitamins; as another example, the card 323 includes page information of a web page of a healthy diet.
Taking APP1 in fig. 3 as a browser application and APP2 as a read-later application as an example, a process diagram of collecting a web page as shown in fig. 4 is shown.
As shown in fig. 4, the display 152 of the terminal displays a graphical user interface 410 in a browser application. Where graphical user interface 410 includes a first browsed web page. The first browsing webpage is provided with page information related to the healthy diet. In response to a user's two-hand screen pressing collection operation (specifically, as shown in a in fig. 4), which may also be referred to as a first operation, the processor 101 may display, on the display 152, a graphical user interface 420 as shown in B in fig. 4, where the graphical user interface 420 includes two cards 421 and 422, respectively, where the card 421 includes virtual buttons for search, copy, map, share, and the like, and the card 422 includes a later reading button (which may also be referred to as a collection button) 423. In addition to the two-hand screen-pressed collection operation shown in fig. 4 a, the collection operation may be triggered by clicking a collection button (not shown in fig. a) in the browser application in fig. a.
In response to the second operation of the user clicking the read-later button 423, the processor 101 will collect page information about healthy diet on the first browsing webpage into the read-later application (i.e. in the card 422), and display the graphical user interface 430 as shown in C in fig. 4. The graphical user interface 430 includes a card 422, wherein the card 422 includes a go view button 431. In response to the user clicking the go view button 431, the processor 101 may display a graphical user interface 440, as shown at D in fig. 4, on the display 152, the graphical user interface 440 including a second browse page stored in the later reading application (i.e., card 422).
In other examples, the page information about the healthy diet on the first browsing webpage can also be viewed through a card 323 included in the read-later application 320 shown as B in fig. 3 displayed by minus one screen.
In the above example, after the operation of collecting the page information of the first browsing webpage is triggered, the processor 101 of the terminal performs formatting processing on the page information related to the healthy diet on the first browsing webpage to obtain a second browsing page, and stores the second browsing page in the later reading application.
With reference to the foregoing embodiments and the accompanying drawings, embodiments of the present application provide a method for saving a web page, where the method may be implemented in a terminal having a hardware structure shown in fig. 1.
Specifically, as shown in fig. 5, a flowchart of a method for saving a web page provided in the embodiment of the present application is shown. Comprises the following steps.
In step 501, the processor 101 displays a first browsing webpage on the touch screen 150. It should be noted that, in the embodiment of the present application, the first browsing webpage may be a page of the first application. The first application can be a system application or a third-party application downloaded from an application store and installed on the terminal. By way of example, the first browsing webpage may include articles, pictures, advertisements, and the like. To facilitate interaction with the user, the first browsed webpage may further include function buttons such as hyperlinks, favorites, and the like.
In step 502, the processor 101 receives a user's collection operation through an input device such as the touch screen 150 or the peripheral interface 108. And the collection operation is used for indicating the terminal to collect the first browsing webpage.
When browsing a first browsing webpage, a user wants to collect the first browsing webpage so as to read page information on the first browsing webpage offline at a later time. To collect the first browsed webpage, the processor 101 receives a user's collection operation, which may be detecting a user's operation on a collection button included in the first browsed webpage displayed on the touch screen 150, and the processor 101 may further respond to the user's collection operation on the touch screen 150 and display a collection button.
In some embodiments, the user may trigger the favorites operation by clicking on a favorites button. In other embodiments, the stow operation may also be a shortcut operation with some settings, such as pressing the touch screen 150 with two fingers.
The network page storage scheme of the embodiment of the application is not limited by whether the APP1 has the collection function or the sharing function, even if the APP1 does not have the collection function, the collection operation can be triggered by detecting the operation of pressing the touch screen 150 by two fingers, and therefore the universality of collecting the first browsing webpage in the APP can be improved. A specific example may be that, when the user presses the touch screen 150 with two fingers, and the processor 101 detects the pressing operation, a reading function card is popped up on the touch screen 150, and the reading function card displays a collection button, which may also be referred to as a later reading button, and the specific name of the collection button is not limited herein. After the user clicks the collection button on the touch screen 150, the processor 101 knows that the collection button is triggered, starts to perform a collection operation, and further performs an operation of collecting the first browsed webpage.
In step 503, the processor 101 collects the second browsing page in response to the collecting operation. And the second browsing page is obtained after the first browsing page is subjected to format typesetting.
In response to the collecting operation, the processor 101 may have at least three possible implementations of collecting the second browsing page, which may be as follows:
in a first implementation manner, the processor 101 responds to the collection operation to acquire a first browsing webpage; the processor 101 performs formatting processing on the first browsed webpage to generate a second browsed webpage; the processor 101 stores the second browsing page to be collected in the memory 102. Therefore, the processor 101 collects the first browsing webpage and processes the first browsing webpage to obtain the second browsing webpage, which is beneficial to simplifying the interaction process between the terminal and the server.
Specifically, the processor 101, in response to a collection operation of a user for a first browsing webpage, acquires page information of the first browsing webpage, such as an article text, an article picture, an advertisement picture, and the like, by calling an Android (Android) frame interface, and generates a page in an mht file format. The processor 101 performs format typesetting processing on the generated page in the mht file format to obtain a second browsing page, and stores the second browsing page in the second application.
The format typesetting processing result may be that the processor 101 stores the page information of the first browsed webpage into the second browsed page according to a preset file format, or that the processor 101 generates a page in an mht file format according to the page information of the first browsed webpage in response to an operation of collecting the first browsed webpage, and then processes the page according to a later reading algorithm to obtain the second browsed page. The content included in the page in the mht file format is laid out in a tag manner, such as a tag < title >, and the content corresponding to the tag < title > is a title name. The main principles of the read-later algorithm are: and (3) scoring each label in the page in the mht file format according to the interest degree, for example, setting a high score for the interested label and setting a low score for the uninteresting label. And then rejecting tags with scores lower than a preset threshold value, such as advertisement tags. And reserving tags with scores higher than a preset threshold value, such as tags of article texts, article pictures and the like, deleting some tags, and then splicing the content corresponding to each reserved tag again according to the score of each tag to obtain a second browsing page, wherein the second browsing page is also a page in an mht file format.
For example, the user may be interested in text of an article, picture of an article, or not interested in picture of an advertisement, video of an advertisement, etc. If the page information of the first browsed webpage comprises: article text, article explanation video, advertisement pictures, article pictures, advertisement video, and the like. After the processing by the processor 101 according to the later reading algorithm, page information such as article text, article explanation video, article picture and the like in the first browsing webpage is retained, the advertisement picture, the advertisement video and the like are deleted, and the second browsing page including the content such as the article text, the article explanation video, the article picture and the like is obtained after the typesetting is carried out again.
By way of this example, in the embodiment of the present application, the page in the mht file format generated after the processor 101 acquires the page information of the first browsed webpage may be edited, for example, copy, paste, and the like, and compared with the scheme in the prior art, such as caching the html webpage, generating the long screenshot of the first browsed webpage, and the like, the scheme in the embodiment of the present application may perform operations of re-editing, re-typesetting, and the like for the second browsed webpage, which is beneficial to regulating the typesetting of the collected pages, and improving the reading experience of the user. Further, the processor 101 may remove content that is not interested by the user, such as advertisement pictures and advertisement videos, in the first browsed webpage by using format typesetting processing, so as to obtain a second browsed webpage with a structured format.
In a second implementation manner, the processor 101 receives a second browsing page sent by the server through the peripheral interface 108, the radio frequency circuit 103, or the Wi-Fi device 107, and the like, and the processor 101 stores the second browsing page to be collected in the memory 102. The following describes in detail a process of the terminal receiving the second browse page sent by the server, with reference to the schematic diagram of the communication system architecture shown in fig. 6.
As shown in fig. 6, the system architecture includes a terminal 100 and a server 110, and the terminal 100 and the server 110 are connected through a wireless connection or a wired connection or other means. The terminal 100 includes the APP1 and APP 2. The server 110 may be a device for communicating with the terminal.
Illustratively, the terminal 100 has at least two types of clients (clients) installed thereon, the clients being applications installed in the terminal, such as WeChat, read-later, and the like. One type of client is used for displaying a first browsing webpage, such as the APP1 described above, specifically, for example, WeChat; another type of client (such as the one shown in fig. 7) is used to favorites a first browsing webpage in APP1, such as APP2 described above, specifically, for example, for later reading.
The server 110 is a late-reading server and includes a digest interface (Readability) component and a digest-service-logic (Readability-part) component. In some embodiments, the system architecture of the embodiments of the present application may further include: as shown in fig. 7, other components such as a grabbed component (crawler), a grabbed Structured Data Store (SDS), a digest SDS, a Distributed Message Queue (DMQ), a Push system (Push), etc. may be located in the server 110 or in other devices.
The terminal 100 and the server 110 may communicate directly with each other or indirectly via a proxy server. The terminal 100 sends a collection request to the server 110, taking the system architecture shown in fig. 7 as an example, the terminal 100 sends the collection request to the proxy server, the proxy server sends the collection request to the server 110, the server 110 obtains the page information of the first browsed webpage according to the collection request, performs format typesetting processing to obtain a second browsed page, and returns the second browsed page to the terminal 100.
Specifically, when the system architecture is as shown in fig. 7, the functions of the components are as follows:
the proxy server is used for providing services for interaction between the client and the availability component and interaction between the client and the availability-part component.
The Readability component is used for interacting with the client, receiving and processing various requests sent by the client, taking receiving a collection request as an example, checking whether the collection request meets a preset condition, and sending the collection request meeting the preset condition to the DMQ; taking receiving the download request as an example, the component is configured to search, according to the information identifier in the download request, for a second browsing page corresponding to the information identifier from the digest SDS, and send the second browsing page to the client.
The crawling component Crawl is used for crawling page information of the first browsed webpage, page addresses corresponding to the first browsed webpage and other contents.
The grab SDS is used to store the contents of the Crawl grab.
The DMQ is used to store the favorites request.
The abstract service logic Readability-part component is used for searching an information identifier corresponding to the collection request from an abstract SDS after the collection request is obtained from the DMQ, and if the information identifier corresponding to the collection request is searched, transmitting the information identifier corresponding to the collection request to a client; if the information identifier corresponding to the collection request is not found, searching the first browsing webpage, executing format typesetting processing on the first browsing webpage to obtain a second browsing page and the like, and storing the second browsing page, the corresponding relation between the collection request and the information identifier and the corresponding relation between the information identifier and the second browsing page in a abstract SDS.
The abstract SDS is used for storing the second browsing page obtained by the Readability-part component, the corresponding relation between the collection request and the information identifier and the corresponding relation between the information identifier and the second browsing page.
And the Push system (Push) is used for pushing the information identifier corresponding to the collection request to the client when the information identifier corresponding to the collection request is determined by the Readability-part component, so that the client can download the second browsing page from the database through the Readability component according to the information identifier corresponding to the collection request.
As an implementation manner, the processor 101 may send a collection request to the Readability component in the server 110 through the peripheral interface 108, the radio frequency circuit 103, or the Wi-Fi device 107, and receive the second browsing page returned by the Readability component through the peripheral interface 108, the radio frequency circuit 103, or the Wi-Fi device 107, where the collection request is used to request the server 110 to perform formatting processing on the first browsing page, generate the second browsing page, and return the second browsing page to the terminal 100. Thus, the terminal 100 receives the second browsing page returned by the server 110, which helps to simplify the process of collecting the first browsing page by the terminal 100.
Wherein, the collection request may include, but is not limited to, the following: article titles and application names corresponding to the first browsing webpage; or, a page address corresponding to the first browsing webpage; or the article title, the application name and the page address corresponding to the first browsed webpage. Here, the page address refers to a Uniform Resource Locator (URL) corresponding to the first browsing webpage.
After the processor 101 in the terminal 100 sends a collection request to the server 110 through the peripheral interface 108, the rf circuit 103 or the Wi-Fi device 107, the server 110 may perform the following steps:
s1, the Readability component receives the collection request of the first browsing webpage sent by the terminal 100, and stores the collection request in the DMQ.
S2, the Readability-part component acquires the collection request from the DMQ and acquires the page information of the first browsed webpage according to the collection request. Here, the Readability-part component may search for the first browsing webpage through the proxy server according to the content included in the collection request, and may specifically have the following three cases.
In a first case, if the collection request includes an article title corresponding to the first browsed webpage and an application name corresponding to the first browsed webpage, the Readability-part component searches the first browsed webpage according to the article title corresponding to the first browsed webpage.
In the second case, if the collection request includes the page address corresponding to the first browsed webpage, the Readability-part component may accurately search the first browsed webpage according to the page address corresponding to the first browsed webpage.
In a third case, if the collection request includes the article title corresponding to the first browsed webpage, the application name corresponding to the first browsed webpage, and the page address corresponding to the first browsed webpage, the Readability-parse component may search the first browsed webpage according to the page address corresponding to the first browsed webpage, or may search the first browsed webpage according to the article title and the application name corresponding to the first browsed webpage.
In the above three cases, the accuracy of searching the first browsed webpage according to the page address by the Readability-part component involved in the second case and the third case is high, and the first browsed webpage can be preferentially searched according to the page address corresponding to the first browsed webpage. And under the condition that the page address corresponding to the first browsed webpage is not obtained, the Readability-part component can further search the first browsed webpage according to the article title corresponding to the first browsed webpage.
In the first and third cases, when the first browsing webpage is searched according to the article title, a situation may occur in which the article title searched by the Readability-part component is the same as the article title corresponding to the first browsing webpage, but the article text of the searched network page is different from the article text of the first browsing webpage.
In order to enable the Readability-part component to accurately search the first browsed webpage to be collected by the user, the collection request may further include a preset text segment in the page information of the first browsed webpage, for example, the first 150 characters of the text of the first browsed webpage, the specific number of characters may be determined according to an actual situation, and the specific number of characters is not limited herein. It can be understood that the number of words of the preset word segment is too small, and the accuracy of the result of determining the similarity between the searched network page and the first network page is not high; when the number of words of the preset text segment is too large, the terminal 100 consumes a large amount of traffic when transmitting the collection request including the preset text segment to the server 110. The preset character segment is set to 150 characters, so that the accuracy of determining the similarity result between the searched network page and the first network page can be improved to a certain extent, and too much flow can not be consumed.
Taking the collection request including the first 150 characters of the article text of the first browsed webpage as an example, when the Readability-part component searches the web page corresponding to the article title of the first browsed webpage and having the same article title as the article title corresponding to the first browsed webpage, the first 150 characters of the article text in the searched web page can be extracted through the text recognition capability, and the first 150 characters of the extracted article text are compared with the first 150 characters of the article text of the first browsed webpage included in the collection request. If the two are consistent, the Readability-part component determines that the searched web page is the first browsing web page; if the two are not consistent, the Readability-part component determines that the searched web page is not the first browsed web page.
And S3, the Readability-part component carries out format typesetting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed webpage.
Specifically, the Readability-part component may perform formatting processing on the page information of the first browsed webpage. As an example, the Readability-part component obtains page information of a first browsing webpage, such as an article text, an article picture, an advertisement picture, and the like, generates a page in an html file format, performs format typesetting processing on the page in the html file format according to a later reading algorithm, and obtains a second browsing page, where a specific format typesetting processing process refers to a description related to format typesetting processing in an implementation manner, and is not described herein again.
Based on the example, the second browsing page obtained by the Readability-part component is a page in an html file format, the page in the html file format is editable, and compared with the page in the mht file format obtained by the terminal 100 through an android frame interface, the page in the html file format is not limited by a system platform and can be opened on any system platform, and the content on the page is not disordered, for example, the problem of messy codes does not occur when the character intervals of different system platforms are the same.
After obtaining the second browsing page, the reality-part component may further store the second browsing page in the second application, so that the user can view the second browsing page offline in the second application.
S4, the reality-part component transmits the content of the second browsing page to the terminal 100 through the communication interface of the server 110.
Based on the steps S1 to S4, according to the above technical solution, the Readability-part component obtains the first browsed webpage according to the collection request, performs formatting processing to generate a second browsed webpage, and then sends the second browsed webpage to the terminal 100, which is helpful to simplify the processing procedure of collecting the first browsed webpage by the terminal 100. And moreover, the formatting and typesetting processing are carried out on the first browsed webpage, which is beneficial to the formatting of the first browsed webpage to be collected by the user.
Based on the above embodiment, after the Readability component receives the collection request of the first browsing webpage sent by the terminal 100, if the Readability component determines that the collection request meets the preset condition, the collection request may be put into the DMQ, so that the Readability-part component may obtain the collection request from the DMQ. Wherein the preset condition comprises any one or more of the following: the first item, the word number of the article title is not more than the preset word number; a second item, wherein the application name is one of the preset application name sets; in the third item, the page address includes characters contained in a preset character set. Correspondingly, after the Readability component receives the collection request of the first browsing webpage sent by the terminal 100, if the Readability component determines that the collection request does not satisfy the preset condition, the Readability component may send a collection failure message to the terminal 100 through the communication interface of the server 110.
For example, taking the preset condition including the first condition as an example, the Readability-part component determines whether the collection request satisfies the first condition, and if so, executes the steps S2, S3, and S4; if not, the collection failure message is sent to the terminal 100. For another example, taking the preset conditions including the first condition and the third condition as an example, the Readability-parse component determines whether the collection request satisfies the first condition and the third condition at the same time, and if so, executes the steps S2, S3, and S4; if not, the collection failure message is sent to the terminal 100. Thus, the Readability-part component is facilitated to successfully acquire the second browsing page.
Further, after the Readability component receives the collection request of the first browsing webpage sent by the terminal 100, the Readability-part component determines how to acquire the second browsing page according to whether the second browsing page is stored in the database. Specifically, the following two possible implementations may be included.
As one implementation mode, the Readability-part component acquires the second browsing page from the database for storing the page information according to the collection request. After that, the second browsing page is transmitted to the terminal 100. Therefore, the Readability-part component acquires the stored second browsing page from the database, and the implementation process of acquiring the second browsing page by the Readability-part component can be further simplified.
Specifically, the Readability-part component acquires an information identifier corresponding to a collection request from a database for storing page information according to the collection request; the Readability-party component sends the information identifier corresponding to the collection request to the terminal 100 by calling the push component; correspondingly, the terminal 100 receives the information identifier corresponding to the collection request and sends a download request to the Readability component, where the download request includes the information identifier. The Readability component receives the download request sent by the terminal 100, and obtains the second browsing page from the database for storing the page information according to the information identifier corresponding to the collection request. The Readability component sends the second browsing page to the terminal 100, and correspondingly, the terminal 100 receives the second browsing page returned by the Readability component according to the information identifier.
As another implementation manner, the Readability-part component acquires page information of the first browsing webpage according to the collection request if it is determined that the second browsing page is not stored in the database.
Specifically, the Readability-part component searches for a first browsed webpage according to the content included in the collection request, and acquires page information of the first browsed webpage from the internet through the proxy server interface. And then, the Readability-part component carries out format typesetting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed webpage. Thus, when the second browsing page is not stored in the database, the Readability-part component performs formatting processing on the first browsing page, so as to obtain the second browsing page, which is helpful for simplifying the processing procedure of collecting the first browsing page by the terminal 100.
Furthermore, after the Readability-part component performs formatting processing on the first browsed webpage according to the page information of the first browsed webpage to obtain a second browsed page, the Readability-part component can also store the second browsed page in the database. Therefore, the time for returning the second browsing page to the terminal when the terminal collects the first browsing page next time is saved.
Based on any of the above embodiments, if the Readability-part component fails to acquire the page information to be collected according to the collection request, a collection failure message is fed back to the terminal 100. Therefore, when the terminal 100 does not successfully obtain the second browsing page from the server 110, the second browsing page can be obtained by self-processing in time.
After the processor 101 of the terminal 100 sends a collection request to the Readability component through the peripheral interface 108, the radio frequency circuit 103 or the Wi-Fi device 107, and receives a collection failure message sent by the Readability-part component through the peripheral interface 108, the radio frequency circuit 103 or the Wi-Fi device 107, the processor 101 performs format typesetting on the first browsed webpage to obtain a second browsed webpage; the processor 101 stores the second browsing page to be collected in the memory 102. The collection failure message is used to notify the terminal 100 that the second browsing page fails to be acquired. The specific process of format typesetting refers to the related description of format typesetting in the first implementation manner, and is not described herein again.
Through the implementation manner, when the terminal 100 fails to obtain the second browsing page from the server 100, the terminal 100 collects the first browsing webpage and automatically processes the first browsing webpage to obtain the second browsing page, which is helpful for the terminal 100 to successfully collect the first browsing webpage.
In the above three manners, one possible implementation manner for the processor 101 to store the second browsing page to be collected in the memory 102 is as follows: the processor 101 stores the second browsing page in the memory 102 and saves a card 422 in the second application that can access the second browsing page in the memory 102.
Further, in response to the user clicking on the card 422, the processor 101 accesses a second browsing page in the memory 102 and displays the second browsing page on the touch screen 150. Optionally, the memory 102 may store the second browsing page processed by the processor 101, may also store the received second browsing page processed by the server, and may also store the received second browsing page processed by the server and the second browsing page processed by the terminal at the same time.
When the processor 101 receives a second operation of viewing the first browsed webpage from the user through an input device such as the peripheral interface 108, the processor 101 displays a second browsed webpage on the touch screen 150 in response to the second operation. Specifically, if the second browsing page processed by the server is stored in the memory 102, the second browsing page processed by the server is displayed on the touch screen 150; if the second browsing page obtained by the terminal processing is stored in the memory 102, displaying the second browsing page obtained by the terminal processing on the touch screen 150; if the second browsed page obtained by the terminal processing and the second browsed page obtained by the server processing are stored in the memory 102, any one of the second browsed page obtained by the server processing and the second browsed page obtained by the terminal processing is displayed on the touch screen 150.
Based on the above steps 501 to 503, since the processor 101 collects the second browsing page obtained after the formatting process is performed on the first browsing page in response to the collecting operation, the second browsing page can be viewed offline, and the second browsing page stored in the memory 102 can be viewed without depending on a mobile network or WiFi for searching the first browsing page, and the processor 101 performs the formatting process on the first browsing page, which is helpful for obtaining the formatted second browsing page. In this way, the saved second browsing page is facilitated to be viewed offline by the user.
A possible implementation manner of the above-mentioned web page saving method is described in detail below with reference to fig. 8.
Based on fig. 7, fig. 8 illustrates a schematic flowchart of another network page saving method provided in the embodiment of the present application. The method comprises the following steps:
step 801, the Client displays a first browsing webpage.
Step 802, the Client sends a collection request to the readability component.
The collection request is used for requesting the server to perform format typesetting processing on the first browsing webpage, generating a second browsing page and returning to the second browsing page; the collection request includes the following: the article title and the application name corresponding to the first browsed webpage; or, a page address corresponding to the first browsing webpage; or the article title, the application name and the page address corresponding to the first browsed webpage.
Step 803, the readability component determines whether the collection request meets a preset condition; if yes, go to step 804; if not, go to step 815.
Wherein the preset condition comprises any one or more of the following: the word number of the article title is not more than the preset word number, and the application name is one of a preset application name set; the page address includes characters contained within a preset character set.
In step 804, the readability component sends a collection request to the DMQ.
In step 805, the availability-part component obtains the collection request from the DMQ.
Step 806, the availability-part component determines whether the database has an information identifier corresponding to the collection request according to the collection request; if yes, go to step 807; if not, go to step 808.
In step 807, the availability-part component obtains the information identifier corresponding to the collection request from the database for storing the page information. Thereafter, step 811 is performed.
And 808, accessing the first browsing webpage by the availability-party component through the proxy-forward proxy service according to the collection request. If the page information of the first browsed webpage is acquired, executing step 809; if the page information of the first browsed webpage fails to be obtained, step 815 is executed.
Step 809, the ready-part component performs format typesetting processing on the first browsing webpage to obtain a second browsing webpage;
step 810, the availability-part component stores the second browsing page, and the corresponding relationship between the second browsing page and the information identifier in the database. Thereafter, step 811 is performed.
Step 811, the ready-part component sends a push message to the Client; the push message comprises an information identifier corresponding to the collection request.
Step 812, the Client sends a download request to the ready component; the download request comprises an information identifier corresponding to the collection request.
In step 813, the readability component reads the second browsing page corresponding to the information identifier from the database.
In step 814, the ready component sends the second browse page to the Client. Thereafter, step 817 is performed.
In step 815, the readability component feeds back a collection failure message to the Client. Thereafter, step 816 is performed.
Step 816, the Client acquires the first browsing webpage by calling the android frame interface, and performs format typesetting processing on the first browsing webpage to obtain a second browsing webpage. Thereafter, step 817 is performed.
In step 817, the Client stores and displays the second browse page.
It should be noted that the step 816 may also be completed in step 802, in which case, the Client processes itself to obtain the second browsing page and stores the second browsing page in the Client. And if the Client receives the second browsing page from the readability component, storing the second browsing page from the readability component in the Client, and replacing the second browsing page obtained by the Client through self-processing.
Through the embodiment, the terminal can automatically and intelligently remove the unimportant elements on the first network page, typeset again, and store the processed second browsing page in the Client, so that the second browsing page can be viewed off line, clean and tidy text parts can be presented for a user, and the reading experience of the user is improved.
The embodiments of the present application can be combined in any manner, or can be used alone to achieve different technical effects.
Based on the same inventive concept as that of the method embodiment, an embodiment of the present invention provides a terminal 900, which is specifically configured to implement the method executed by the terminal in the embodiments described in fig. 5 and fig. 8, where the structure of the apparatus is shown in fig. 9, and the apparatus includes a display module 901, a receiving module 902, and a processing module 903, and optionally, may further include a sending module 904. Wherein:
if the terminal 900 executes the method for saving a web page in fig. 5, the display module 901 executes step 501; the receiving module 902 performs step 502; the processing module 903 executes step 503.
If the terminal 900 executes the method for saving a web page in fig. 8, the display module 901 executes step 801 and step 817; the receiving module 902 performs step 815; the processing module 903 executes step 816; the sending module 904 performs step 802.
Based on the same inventive concept as that of the method embodiment, an embodiment of the present invention provides a server 1000, which is specifically configured to implement the method executed by the server in the embodiment illustrated in fig. 8, where a structure of the server 1000 is shown in fig. 10, and includes a receiving module 1001, a processing module 1002, and a sending module 1003, where:
when the server 1000 executes the web page saving method in fig. 8, the receiving module 1001 executes step 802; the processing module 1002 performs step 803, steps 805 to 810, step 813; the sending module 1003 performs steps 804 and 814 to 815.
When implemented in hardware, the hardware implementation of the terminal may refer to fig. 1 and its related description.
Referring to fig. 1, the terminal 100 includes: a touch screen 150, wherein the touch screen 150 comprises a touch sensitive surface and a display; one or more processors 101; a memory 102; a plurality of application programs; and one or more computer programs, wherein the one or more computer programs are stored in the memory 102, the one or more computer programs comprising instructions which, when executed by the terminal 100, the terminal 100 performs any of the methods of the possible designs performed by the terminal 100 in the embodiments of the present application. It should be noted that the memory 102 may be integrated into the processor 101, or may be independent from the processor 101.
In this embodiment, the touch screen 150 may perform the method performed by the display module 901 as shown in fig. 9, and the processor 101 may perform the method performed by the receiving module 902, the processing module 903 and the sending module 904 as shown in fig. 9.
Based on the same concept, referring to fig. 11, a hardware structure diagram of a server 1100 provided in the embodiment of the present application is shown. As shown in fig. 11, the apparatus includes one or more processors 1101, a memory 1102 and a transceiver 1103, where one processor 1101 is taken as an example in fig. 11.
Wherein the memory 1102 is configured to store one or more computer programs; when the one or more computer programs stored in the memory 1102 are executed by the processor 1101, the server 1100 is enabled to implement any method that may be designed to be performed by the server 110 in the embodiment of the present application, for example, when the server executes the method shown in fig. 8, the transceiver 1103 executes steps 802, 804 and 814 to 815, and the processor 1101 executes steps 803, 805 to 810 and 813. The memory 1102 may be integrated with the processor 1101, or may be independent of the processor 1101.
The processors referred to in the various embodiments above may be general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a Random Access Memory (RAM), a flash memory, a read-only memory (ROM), a programmable ROM, an electrically erasable programmable memory, a register, or other storage media that are well known in the art. The storage medium is located in a memory, and a processor reads instructions in the memory and combines hardware thereof to complete the steps of the method.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium, and including several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope of the embodiments of the present application shall be covered by the scope of the embodiments of the present application, and therefore the scope of the embodiments of the present application shall be subject to the scope of the claims.

Claims (13)

1. A method for saving a web page, comprising:
the terminal displays a first browsing webpage in a first application;
the terminal receives a collection operation of a user, wherein the collection operation is used for indicating the terminal to collect the first browsing webpage;
and the terminal responds to the collection operation and collects a second browsing page, wherein the second browsing page is obtained after the first browsing page is formatted and typeset, the second browsing page is displayed by the terminal in response to the operation of a user on a second application, the second browsing page is an editable page, and the first application is different from the second application.
2. The method of claim 1, wherein the terminal favoring a second browse page in response to the favorites operation comprises:
the terminal sends a collection request to a server, wherein the collection request is used for requesting the server to perform format typesetting processing on the first browsed webpage, generate a second browsed page and return to the second browsed page;
the terminal receives the second browsing page returned by the server;
and the terminal stores the second browsing page returned by the server.
3. The method of claim 2, wherein the favorites request includes the following:
the article title and the application name corresponding to the first browsed webpage; or, a page address corresponding to the first browsing webpage; or the article title, the application name and the page address corresponding to the first browsed webpage.
4. The method according to claim 2 or 3, wherein the terminal receiving the second browsing page returned by the server comprises:
the terminal receives an information identifier corresponding to the collection request sent by the server;
the terminal sends a downloading request to the server, wherein the downloading request comprises the information identifier;
and the terminal receives the second browsing page returned by the server according to the information identifier.
5. The method according to claim 2 or 3, wherein after the terminal sends the favorite request to the server and before the terminal stores the second browsing page, further comprising:
the terminal receives a collection failure message sent by the server; the collection failure message is used for informing the terminal that the second browsing page fails to be acquired;
and the terminal performs format typesetting processing on the first browsed webpage to obtain a second browsed webpage.
6. The method of claim 1, wherein the terminal favoring a second browse page in response to the favorites operation comprises:
the terminal responds to the collection operation, and carries out format typesetting processing on the first browsed webpage to obtain a second browsed webpage;
and the terminal stores the second browsing page.
7. The method according to any one of claims 1 to 3 and 6, wherein the terminal receives a user's favorite operation, comprising:
the terminal receives the collection operation in a double-finger pressing mode of the user.
8. A page-saving graphical user interface, GUI, stored in a terminal comprising a touch screen, a memory, one or more processors for executing one or more computer programs stored in the memory, the graphical user interface comprising:
displaying a first browsing webpage on the touch screen; the first browsing webpage is a page of a first application;
displaying a favorite button on the touch screen in response to a first operation;
collecting the first browsing webpage in response to a second operation on the collection button;
and responding to a third operation of the user for viewing the first browsed webpage, and displaying a second browsed page on the touch screen, wherein the second browsed page is a page displayed by the terminal in response to the operation of the user on a second application, the second browsed page is an editable page, and the first application is different from the second application.
9. The GUI of claim 8, wherein said favoring the first browsed webpage in response to the second operation of the favorites button comprises:
performing format typesetting processing on the first browsed webpage in response to a second operation on the collection button to obtain a second browsed webpage;
and storing the second browsing page.
10. The GUI of claim 8, wherein said favoring the first browsed webpage in response to the second operation of the favorites button comprises:
responding to a second operation of the collection button, the terminal sends a collection request to a server, wherein the collection request is used for requesting the server to perform format typesetting processing on the first browsed webpage, generate a second browsed webpage, and return the second browsed webpage to the terminal;
and the terminal receives the second browsing page returned by the server.
11. A terminal for web page saving, comprising:
a touch screen, wherein the touch screen comprises a touch sensitive surface and a display;
one or more processors;
a memory;
a plurality of application programs;
and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the terminal, cause the terminal to carry out the method of any of claims 1 to 7.
12. A chip, characterized in that it is coupled to a memory in a terminal, carrying out the method according to any one of claims 1 to 7.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program which, when run on a terminal, causes the terminal to perform the method according to any one of claims 1 to 7.
CN201880072499.3A 2018-10-11 2018-10-11 Network page storage method and terminal Active CN111316618B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/109899 WO2020073290A1 (en) 2018-10-11 2018-10-11 Web page storage method and terminal

Publications (2)

Publication Number Publication Date
CN111316618A CN111316618A (en) 2020-06-19
CN111316618B true CN111316618B (en) 2021-11-30

Family

ID=70164180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880072499.3A Active CN111316618B (en) 2018-10-11 2018-10-11 Network page storage method and terminal

Country Status (2)

Country Link
CN (1) CN111316618B (en)
WO (1) WO2020073290A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114117269A (en) * 2022-01-26 2022-03-01 荣耀终端有限公司 Memorandum information collection method and device, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238706B (en) * 2021-05-10 2023-06-20 北京字跳网络技术有限公司 View display method, device, equipment and medium
CN113536164B (en) * 2021-07-23 2024-05-17 中信银行股份有限公司 Page collection and access method and device, electronic equipment and readable storage medium
CN114168022A (en) * 2021-11-04 2022-03-11 厦门知本家科技有限公司 Vibration feedback system and method for editing house type structure model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685514A (en) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 Method for storing page in webpage favorite and browser
CN107193975A (en) * 2017-05-25 2017-09-22 北京小米移动软件有限公司 Information resources collecting method, device and computer-readable recording medium
CN107203630A (en) * 2017-05-31 2017-09-26 北京安云世纪科技有限公司 Application program page collecting method, device and corresponding mobile terminal

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216825A1 (en) * 2004-03-12 2005-09-29 Onfolio, Inc. Local storage of script-containing content
CN103365860A (en) * 2012-03-28 2013-10-23 腾讯科技(深圳)有限公司 Method, device and terminal for processing web pages
CN102646135B (en) * 2012-03-31 2014-01-08 北京奇虎科技有限公司 Webpage collecting method, device and system
CN102737121A (en) * 2012-06-01 2012-10-17 北京奇乐客科技有限公司 Webpage collection method, client side and server of cloud platform
CN103020263A (en) * 2012-12-24 2013-04-03 北京小米科技有限责任公司 Method, device and terminal for storing webpage information
CN103116616B (en) * 2013-01-28 2016-04-06 东莞宇龙通信科技有限公司 webpage collection method and communication terminal
CN103064989B (en) * 2013-02-03 2016-05-04 广州市动景计算机科技有限公司 Webpage preservation, deployment method and device
CN104077314A (en) * 2013-03-28 2014-10-01 腾讯科技(深圳)有限公司 Method and system for adding browser into favorites and terminal equipment
CN104239297A (en) * 2013-06-06 2014-12-24 腾讯科技(北京)有限公司 Webpage bookmarking method, system and device
CN103699674B (en) * 2013-12-31 2018-04-13 优视科技有限公司 Webpage preservation, webpage deployment method and device and Web browsing system
CN104536993B (en) * 2014-12-10 2018-03-20 北京奇虎科技有限公司 Collect the processing method of webpage, collect the processing unit and client of webpage
CN108153778B (en) * 2016-12-05 2021-05-14 腾讯科技(深圳)有限公司 Webpage storage method, webpage reading method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685514A (en) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 Method for storing page in webpage favorite and browser
CN107193975A (en) * 2017-05-25 2017-09-22 北京小米移动软件有限公司 Information resources collecting method, device and computer-readable recording medium
CN107203630A (en) * 2017-05-31 2017-09-26 北京安云世纪科技有限公司 Application program page collecting method, device and corresponding mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114117269A (en) * 2022-01-26 2022-03-01 荣耀终端有限公司 Memorandum information collection method and device, electronic equipment and storage medium
CN114117269B (en) * 2022-01-26 2022-09-20 荣耀终端有限公司 Memo information collection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111316618A (en) 2020-06-19
WO2020073290A1 (en) 2020-04-16

Similar Documents

Publication Publication Date Title
US10182101B2 (en) Method, apparatus and system for sharing webpage
CN108470041B (en) Information searching method and mobile terminal
US11237724B2 (en) Mobile terminal and method for split screen control thereof, and computer readable storage medium
US11798107B2 (en) Scenario-based application recommendation method and apparatus
CN111316618B (en) Network page storage method and terminal
US10643021B2 (en) Method and device for processing web page content
CN106296255B (en) Page information display method and device
CN110168566B (en) Method and terminal for recognizing screenshot characters
US20140315584A1 (en) Information recommendation method and apparatus
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
CN110020293B (en) Multimedia data display method, device and storage medium
US11481357B2 (en) Album display method, electronic device, and storage medium
CN110989847B (en) Information recommendation method, device, terminal equipment and storage medium
CN108491148B (en) Application sharing method and terminal
WO2021083091A1 (en) Screenshot capturing method and terminal device
US20140351212A1 (en) Method and apparatus for processing reading history
WO2015000430A1 (en) Intelligent word selection method and device
US20150153921A1 (en) Apparatuses and methods for inputting a uniform resource locator
CN113127773A (en) Page processing method and device, storage medium and terminal equipment
CN110688497A (en) Resource information searching method and device, terminal equipment and storage medium
CN106844572B (en) Search result processing method and device for search result processing
CN106230919B (en) File uploading method and device
CN110175063B (en) Operation assisting method, device, mobile terminal and storage medium
CN106339402B (en) Method, device and system for pushing recommended content
CN115379113B (en) Shooting processing method, device, equipment and storage medium

Legal Events

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