WO2020073290A1 - 一种网络页面保存方法及终端 - Google Patents

一种网络页面保存方法及终端 Download PDF

Info

Publication number
WO2020073290A1
WO2020073290A1 PCT/CN2018/109899 CN2018109899W WO2020073290A1 WO 2020073290 A1 WO2020073290 A1 WO 2020073290A1 CN 2018109899 W CN2018109899 W CN 2018109899W WO 2020073290 A1 WO2020073290 A1 WO 2020073290A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
browsing
page
server
webpage
Prior art date
Application number
PCT/CN2018/109899
Other languages
English (en)
French (fr)
Inventor
任翔
梁恒洲
张文
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/109899 priority Critical patent/WO2020073290A1/zh
Priority to CN201880072499.3A priority patent/CN111316618B/zh
Publication of WO2020073290A1 publication Critical patent/WO2020073290A1/zh

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

Definitions

  • the embodiments of the present application relate to the technical field of terminals, and in particular, to a method for saving web pages and a terminal.
  • Embodiments of the present application provide a method and terminal for saving a web page, so that a user can view page information of a favorite web page offline.
  • an embodiment of the present application provides a method for saving a web page.
  • the method includes: the terminal displays a first browsing webpage; the terminal receives a user's favorite operation, and the collecting operation is used to instruct the terminal to bookmark the first browsing webpage; the terminal responds Collection operation, collecting the second browsing page; wherein, the second browsing page is obtained after formatting and processing the first browsing web page.
  • the terminal collects the second browsing page obtained by formatting and processing the first browsing webpage in response to the collection operation, the second browsing page can be viewed offline without relying on the mobile network, or WiFi searches the first browsing webpage to obtain the second browsing page, and formatting and processing the first browsing webpage helps to obtain the second browsing page in a regular format. In this way, it helps to facilitate the user to view the saved second browsing page offline.
  • the terminal bookmarks the second browsing page which may include the following optional implementation methods.
  • Implementation method 1 The terminal sends a collection request to the server.
  • the collection request is used to request the server to format and format the first browsing webpage, generate a second browsing page, and return the second browsing page;
  • the terminal receives the second Browse the page;
  • the terminal stores the second browse page.
  • the terminal receives the second browsing page returned by the server, which helps to simplify the process of collecting the first browsing webpage by the terminal.
  • the collection request includes the following content: the article title and application name corresponding to the first browsing webpage; or, the page address corresponding to the first browsing webpage; or, the article title and application name corresponding to the first browsing webpage And page address.
  • the terminal receiving the second browsing page returned by the server may include: the terminal receives the information identifier corresponding to the collection request sent by the server; the terminal sends a download request to the server, and the download request includes the information identifier; the terminal The second browsing page returned by the receiving server according to the information identifier.
  • the terminal interacts with the server to obtain the information identifier corresponding to the collection request, so that the second browsing page is accurately obtained from the server according to the information identifier, which helps to simplify the process of the terminal collecting the first browsing webpage.
  • the terminal further includes: the terminal receives a collection failure message sent by the server; The page acquisition fails; the terminal performs format typesetting processing on the first browsing web page to obtain the second browsing page.
  • the terminal when the terminal fails to obtain the second browsing page from the server, the terminal collects the first browsing webpage and processes the second browsing page by itself, which is helpful for the terminal to successfully collect the first browsing webpage.
  • Implementation manner 2 The terminal obtains the first browsing webpage in response to the collection operation; the terminal performs format typesetting processing on the first browsing webpage to obtain and generate a second browsing page; and the terminal stores the second browsing page.
  • the terminal collects the first browsing webpage and processes the second browsing page by itself, which helps to simplify the interaction process between the terminal and the server.
  • the terminal receiving the user's favorite operation specifically includes: the terminal receiving the user's favorite operation in a two-finger pressing manner.
  • the terminal is not limited to the APP when collecting the first browsing webpage and does not have a collection function, which helps to improve the universality of collecting the first browsing webpage in the APP.
  • an embodiment of the present application provides a method for saving a web page.
  • the method includes: the server receives a collection request of a first browsing webpage sent by a terminal, and the collection request includes an article title and an application name corresponding to the first browsing webpage; or, The page address corresponding to the first browsing webpage; or, the article title, application name and page address corresponding to the first browsing webpage; the server obtains the page information of the first browsing webpage according to the collection request; based on the page information of the first browsing webpage, the The first browsing webpage performs format typesetting processing to obtain a second browsing page; the server sends the second browsing page to the terminal.
  • the server obtains the first browsing webpage according to the collection request and performs format typesetting processing to generate a second browsing page, and then sends the second browsing page to the terminal, which helps to simplify the processing of the terminal collecting the first browsing webpage process.
  • the method further includes: the server determines that the collection request meets a preset condition.
  • the server determines that the collection request meets the preset condition, it obtains the page information of the first browsing webpage, and performs format typesetting processing on the first browsing webpage according to the page information of the first browsing webpage to obtain the second browsing page And send the second browsing page to the terminal. In this way, it helps the server successfully obtain the second browsing page.
  • the server sends a collection failure message to the terminal; correspondingly, the terminal obtains the first browsing webpage, and performs format typesetting processing on the first browsing webpage to obtain the second Browse the page.
  • the terminal collects the first browsing webpage and processes the second browsing page by itself, which is helpful for the terminal to successfully collect the first browsing webpage.
  • the preset condition includes any one or more of the following: the number of words in the article title is not greater than the preset number of words, and the application name is one of the set of preset application names; the page address includes Of characters are included in the preset character set.
  • the server may further include: the server according to the collection request, from the database for storing page information Get the second browsing page.
  • the server obtains the stored second browsing page from the database, which can further simplify the implementation process of the server acquiring the second browsing page.
  • the server obtains the second browsing page from the database for storing page information according to the collection request, which specifically includes: the server obtains the collection from the database for storing page information according to the collection request The information identifier corresponding to the request; the server sends the information identifier corresponding to the collection request to the terminal; the server receives the download request sent by the terminal.
  • the download request includes the information identifier corresponding to the collection request; the server uses the information identifier corresponding to the collection request to store page information The second browsing page from the database.
  • the server further includes: according to the collection request, if the server determines that the second browsing page is not stored in the database, the server according to the collection request, Obtain the page information of the first browsing webpage; the server performs format typesetting processing on the first browsing webpage according to the page information of the first browsing webpage to obtain the second browsing page.
  • the server when the second browsing page is not stored in the database, the server performs format typesetting processing on the first browsing webpage, thereby obtaining the second browsing page, which helps to simplify the processing process of the terminal collecting the first browsing webpage.
  • the method further includes: the server storing the second browsing webpage in the database.
  • the server fails to obtain the page information to be bookmarked according to the collection request, and then feeds back a collection failure message to the terminal. In this way, when the terminal does not successfully obtain the second browsing page from the server, it can help to process the second browsing page in time.
  • an embodiment of the present application provides a graphical user interface GUI for page saving, the graphical user interface is stored in a terminal, the terminal includes a touch screen, a memory, one or more processors, and the one or more The processor is used to execute one or more computer programs stored in the memory, and the graphical user interface includes:
  • a first browsing webpage is displayed on the touch screen; the first browsing webpage is a page of a first application; in response to a first operation, a collection button is displayed on the touchscreen; in response to a second operation on the collection button, collection The first browsing webpage; in response to a third operation of the user viewing the first browsing webpage, displaying a second browsing page on the touch screen.
  • bookmarking the first browsing webpage includes: in response to the second operation on the favorite button, performing on the first browsing webpage Format typesetting processing to obtain the second browsing page; store the second browsing page.
  • the responding to the second operation on the favorite button to bookmark the first browsing webpage includes: in response to the second operation on the favorite button, the terminal Sending a collection request, the collection request is used to request the server to format the first browsing webpage, generate the second browsing page, and return the second browsing page to the terminal; the terminal receives the The second browsing page returned by the server.
  • an embodiment of the present application provides a terminal for saving pages, including: a touch screen, where the touch screen includes a touch-sensitive surface and a display; one or more processors; a memory; multiple applications; and one Or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs include instructions, and when the instructions are executed by the terminal, the terminal executes the first Any possible design method in one aspect and its first aspect.
  • the memory may be integrated in the processor or independent of the processor.
  • an embodiment of the present application provides a server for saving pages, including: a memory and a processor, where the memory is used to store one or more computer programs; when the memory stores one or more computer programs When executed by the processor, the server can implement the second aspect of the embodiments of the present application and any possible design method of the second aspect.
  • the memory may be integrated in the processor or independent of the processor.
  • a chip of an embodiment of the present application is coupled to a memory in a terminal, and executes the first aspect of the embodiment of the present application and any technical solution that may be designed in the first aspect.
  • “coupled” means that two components are directly or indirectly combined with each other.
  • a chip of an embodiment of the present application is coupled to a memory in a server, and executes the second aspect of the embodiment of the present application and any technical solution that may be designed in the second aspect.
  • “coupled” means that two components are directly or indirectly combined with each other.
  • An eighth aspect is a computer storage medium according to an embodiment of the present application.
  • the computer-readable storage medium includes a computer program.
  • the terminal causes the terminal to perform the first aspect and the first embodiment of the present application.
  • any possible design method or, when the computer program runs on the server, causing the server to execute the second aspect of the embodiments of the present application and any possible design method of the second aspect.
  • a computer program product in an embodiment of the present application when the computer program product runs on a terminal, causes the terminal to perform the first aspect of the embodiment of the present application and any possible design of the first aspect Method; or, when the computer program runs on the server, causing the server to perform the second aspect of the embodiments of the present application and any possible design method of the second aspect.
  • FIG. 1 is a schematic structural diagram of a possible terminal 100 provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a possible graphical user interface provided by an embodiment of this 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 of a possible process of collecting a web page provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for saving a web page provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of a possible communication system architecture provided by an embodiment of this application.
  • FIG. 7 is a schematic diagram of a possible software architecture of a communication system provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of another web page saving method provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a possible terminal provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a possible server provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another possible server provided by an embodiment of the present application.
  • At least one refers to one or more, and “multiple” refers to two or more than two.
  • the character “/” generally indicates that the related object is a "or” relationship.
  • “At least one (item) of the following” or similar expressions refer to any combination of these items, including any combination of a single item (s) or a plurality of items (s).
  • At least one (a) of a, b, or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c It can be single or multiple.
  • the terminal may be a portable terminal containing functions such as a personal digital assistant and / or a music player, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with wireless communication capabilities, an in-vehicle device, and the like.
  • portable terminals include but are not limited to piggybacking Or portable terminals of other operating systems.
  • the above-mentioned portable terminal may also be a laptop computer (Laptop) having a touch-sensitive surface (for example, a touch panel) or the like. It should also be understood that, in some other embodiments, the terminal may also be a desktop computer with a touch-sensitive surface (such as a touch panel).
  • FIG. 1 shows a schematic structural diagram of a terminal 100.
  • the illustrated terminal 100 is only an example, and the terminal 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations .
  • the various components shown in the figures can 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 processor 101 is the control center of the terminal 100, connects various parts of the terminal 100 with various interfaces and lines, and runs or executes an application program (application, App for short) stored in the memory 102, and calls the stored in the memory 102
  • the data and instructions execute various functions of the terminal 100 and process data.
  • the processor 101 may perform format typesetting processing on the browsing page in the APP.
  • the 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 deals with the operating system, user interface and application programs, etc.
  • the modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 101.
  • the processor 101 may be a Kirin 970 chip manufactured by Huawei Technologies Co., Ltd.
  • the processor 101 may further include a fingerprint verification chip for verifying the collected fingerprints.
  • the memory 102 is used to store application programs and data.
  • the memory 102 mainly includes a program storage area and a data storage area.
  • the program storage area can store the operating system, at least one function required application programs (such as sound playback function, image playback function, etc.);
  • the data storage area can store data created when using the terminal 100 (such as audio data, phone Books, web pages, documents, etc.).
  • the data storage area may also store photos taken by the user, or pictures synthesized based on the photos taken by the user, and so on.
  • 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 user's operation to view the photos, the corresponding photos are obtained from the cloud and displayed On the terminal 100.
  • the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 102 can also store various operating systems, such as developed by Apple Operating system, developed by Google Operating system, etc.
  • the RF circuit 103 can be used to receive and transmit wireless signals during the process of receiving and sending information or talking. Specifically, the RF circuit 103 may process the downlink data of the base station to the processor 101 for processing. In addition, the RF circuit 103 can also send uplink data to the base station. Generally, the RF circuit 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 circuit 103 can also communicate with other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global mobile communication system, general packet radio service, code division multiple access, broadband code division multiple access, long-term evolution, e-mail, and short message service.
  • the audio circuit 140, the speaker 141, and the microphone 142 may provide an audio interface between the user and the terminal 100.
  • the audio circuit 140 can transmit the converted electrical signal of the received audio data to the speaker 141, which converts the speaker 141 into a sound signal output; on the other hand, the microphone 142 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 140 After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 103 to be sent to, for example, a terminal, or the audio data is output to the memory 102 for further processing.
  • the touch screen 150 may include a touch-sensitive surface 151 and a display 152.
  • the touch-sensitive surface 151 (for example, a touch panel) can collect touch events on or near the user of the terminal 100 (such as the user using a finger, a stylus, or any other suitable object on the touch-sensitive surface 151 or on the touch-sensitive surface) Operation near the surface 151), and send the collected touch information to other devices such as the processor 101.
  • the user's touch event near the touch-sensitive surface 151 may be referred to as a floating touch.
  • Floating touch can mean that the user does not need to directly touch the touchpad in order to select, move, or drag an object (such as an App icon, etc.), but only needs the user to be near the terminal to perform the desired function.
  • the terms “touch”, “contact”, etc. do not imply direct contact with the touch screen 150, but contact near or close to it.
  • the touch-sensitive surface 151 capable of floating touch can be realized by capacitive, infrared light sensing and ultrasonic waves.
  • the touch-sensitive surface 151 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then It is sent to the processor 101, and the touch controller can also receive the instruction sent by the processor 101 and execute it.
  • the touch-sensitive surface 151 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the display (also referred to as a display screen) 152 may be used to display information input by the user or provided to the user and various graphical user interfaces (GUIs).
  • GUIs graphical user interfaces
  • the display 152 may display photos, videos, web pages, or files.
  • the display 152 may display a graphical user interface as shown in FIG. 2.
  • the graphical user interface shown in FIG. 2 includes a status bar 201, a hideable navigation bar 202, a time and weather widget 203, and application icons, such as a browser icon 204.
  • the status bar 201 includes the name of the operator (eg China Mobile), mobile network (eg 4G), time and remaining power.
  • the navigation bar 202 includes a back button icon, a home button icon and a forward button icon.
  • the status bar 201 may further include a Bluetooth icon, a Wi-Fi icon, an external device icon, and the like.
  • the graphical user interface shown in FIG. 2 may further include a Dock bar, and the Dock bar may include commonly used application icons and the like.
  • the processor 101 detects the user's operation on the browser icon 204, in response to the operation, the user who displays the browser application on the display 152 interface.
  • the user's operation on the browser icon 204 may be a user's operation of clicking or touching the browser icon 204, or a user's touch operation above the browser icon 204, which is not limited.
  • the display 152 may include a display controller and a display device.
  • the display controller is used to receive signals or data sent by the processor 101 to drive the corresponding interface to be displayed on the display device.
  • the embodiments of the present application may configure the display device through an LCD (liquid crystal), liquid crystal display, or organic light-emitting diode (OLED), etc.
  • LCD liquid crystal
  • OLED organic light-emitting diode
  • an active matrix organic light-emitting diode active matrix organic light-emitting diode
  • AMOLED light emitting diode
  • the touch-sensitive surface 151 may cover the display 152.
  • the touch-sensitive surface 151 detects a touch event on or near it, it is transmitted to the processor 101 to determine the type of touch event, and then the processor 101 may The type of touch event provides corresponding visual output on the display 152.
  • the touch-sensitive surface 151 and the display 152 are implemented as two independent components to realize the input and output functions of the terminal 100, in some embodiments, the touch-sensitive surface 151 and the display 152 may be integrated to realize Input and output functions of the terminal 100. It can be understood that the touch screen 150 is formed by stacking multiple layers of materials.
  • the touch-sensitive surface 151 may cover the display 152, and the size of the touch-sensitive surface 151 is larger than the size of the display 152, so that the display 152 completely covers the touch-sensitive surface 151,
  • the above touch-sensitive surface 151 may be configured on the front of the terminal 100 in the form of a full-scale board, that is, the user's touch on the front of the terminal 100 can be sensed by the terminal, so that a full touch experience on the front of the terminal can be realized.
  • the touch-sensitive surface 151 is arranged on the front of the terminal 100 in the form of a full board, and the display 152 may also be arranged on the front of the terminal 100 in the form of a full board, so that the front of the terminal can be borderless structure.
  • 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.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display of the touch screen 150 according to the brightness of the ambient light, and the proximity sensor may turn off the power of the display when the terminal 100 moves to the ear .
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when at rest, and can be used to identify terminal posture applications (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tap), etc.
  • Other sensors such as gyroscopes can be used to detect the angle of rotation of the terminal 100 about a fixed point or axis.
  • the sensor 106 may further include a fingerprint sensor.
  • the fingerprint sensor may be arranged on the back of the terminal 100 (for example, below the rear camera), or on the front of the terminal 100 (for example, below the touch screen 150).
  • 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.
  • the fingerprint sensor may be configured in the touch screen 250, may be a part of the touch screen 150, or may be configured in the touch screen 150 in other ways.
  • the fingerprint sensor can also be implemented as a full-board fingerprint sensor.
  • the touch screen 150 can be regarded as a panel that can perform fingerprint collection at any position.
  • the fingerprint sensor may process the collected fingerprint (for example, verify the collected fingerprint), and send the fingerprint processing result (for example, whether the fingerprint is verified or not) to the processor 101, and the processor 101 Make the corresponding processing according to the fingerprint processing results.
  • the fingerprint sensor may also send the collected fingerprint to the processor 101, so that the processor 101 processes the fingerprint (eg, fingerprint verification, etc.).
  • the fingerprint sensor in the embodiment of the present application may use any type of sensing technology, including but not limited to optical, capacitive, piezoelectric, or ultrasonic sensing technology.
  • the terminal 200 may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be repeated here.
  • the Wi-Fi device 107 is used to provide the terminal 100 with network access following Wi-Fi related standard protocols.
  • the terminal 100 can be connected to a Wi-Fi access point through the Wi-Fi device 107, thereby helping users to send and receive e-mails, browse web pages, and access streaming media. It provides users with wireless broadband Internet access.
  • the Wi-Fi device 207 may also serve as a Wi-Fi wireless access point, and may provide Wi-Fi network access for other terminals.
  • the peripheral interface 108 is used to provide various interfaces for external input / output devices (for example, keyboard, mouse, external display, external memory, user identification module card, etc.). For example, it connects to the mouse through the universal serial bus interface, and connects to the SIM card provided by the operator through the metal contacts on the card slot of the user identification module.
  • the peripheral interface 108 may be used to couple the above-mentioned external input / output peripheral devices to the processor 101 and the memory 103.
  • the terminal 100 may further include a power supply device 109 (such as a battery and a power management chip) that supplies power to various components.
  • a power supply device 109 such as a battery and a power management chip
  • the battery may be logically connected to the processor 101 through the power management chip, so that the power supply device 109 can manage charging, discharging, and power consumption management And other functions.
  • the terminal 100 may further include a Bluetooth device, a positioning device, a flash lamp, a micro-projection device, a near field communication (NFC) device, and so on, and details are not described herein.
  • the front camera can be used to capture face feature information, and the processor 101 can perform face recognition on the face feature information, and then perform subsequent processing.
  • the terminal 100 may further include a Bluetooth device, a positioning device, a flash lamp, a micro-projection device, a near field communication (NFC) device, and so on, and details are not described herein.
  • a Bluetooth device a positioning device
  • a flash lamp a micro-projection device
  • NFC near field communication
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal 100.
  • the terminal 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the terminal can support multiple applications, such as preset system applications, such as settings, phones, etc., and then third-party applications installed by users, such as browsers, news applications, and communication applications.
  • the user can browse a web page in a system application or a third-party application, taking the first browsing webpage of the first application (hereinafter referred to as the APP1) displayed on the touch screen 150 of the terminal as an example. If you are interested in the page information and cannot read it immediately because of the work at hand or the surrounding environment, you can first bookmark the first browsing webpage in APP1 and continue reading the page information of the favorite first browsing webpage when it is convenient to read.
  • the embodiment of the present application provides a method for saving a web page.
  • This method can realize that the terminal collects the first browsing webpage in APP1, and saves the second browsing webpage obtained by formatting the first browsing webpage in the second application (hereinafter the second application is referred to as APP2), Therefore, the user can view the second browsing page offline in APP2.
  • the display 152 of the terminal may display graphical user interfaces 301 and 302 as shown in FIG. 3.
  • the terminal currently displays a graphical user interface 301 as shown in A of FIG. 3, and the graphical user interface 301 includes icons of various applications (for example, the browser icon 204), and various widgets (for example, sliding left and right Widget 303).
  • the terminal may respond to the operation of sliding the screen to the right on the graphical user interface 301 as shown in A of FIG. 3, for example, the sliding direction is as indicated by the dotted arrow on the graphical user interface 301, and then displayed on the display 152 as B in FIG.
  • the graphical user interface 302 is shown. It should be noted that the graphical user interface 302 may also be referred to as a negative one screen.
  • system applications including multiple functions, such as situational intelligence 310, later reading application 320, etc.
  • the graphical user interface shown in B may also include system applications such as intelligent reminders, voice assistants, and other functions.
  • the scenario intelligence 310 includes a mobile phone use card 311
  • the later reading application 320 includes a card for displaying page information of a favorite web page, for example, the card 321 includes a web page of the education top issue browsed in today ’s headline, and another example
  • the card 322 includes page information of the vitamin web page; for another example, the card 323 includes page information of the healthy diet web page.
  • FIG. 3 Taking APP1 in FIG. 3 as a browser application and APP2 as a later reading application as an example, a schematic diagram of a process of collecting a web page as shown in FIG. 4 is shown.
  • the display 152 of the terminal displays the graphical user interface 410 in the browser application.
  • the graphical user interface 410 includes a first browsing webpage.
  • the first browsing web page has information about healthy eating.
  • the terminal responds to a collection operation in which the user presses the screen with both hands (specifically shown in FIG. 4A), which may also be called a first operation, and the processor 101 displays a graphical user interface 420 as shown in B in FIG. 4 on the display 152
  • the graphical user interface 420 includes two cards, 421 and 422, respectively.
  • the card 421 includes virtual buttons such as search, copy, map, and share.
  • the card 422 includes a later reading button (also called a favorite button) 423.
  • it can also be triggered by clicking the collection button (not shown in Figure A) in the browser application in Figure A.
  • the processor 101 collects the information about the healthy diet on the first browsing webpage into the later reading application (ie, the card 422), and displays 4 graphical user interface 430 shown in C.
  • the graphical user interface 430 includes a card 422, wherein the card 422 includes a go button 431.
  • the processor 101 displays a graphical user interface 440 as shown in D in FIG. 4 on the display 152.
  • the graphical user interface 440 includes a later reading application (ie, card 422 ) The second browsing page stored in.
  • the card information 323 included in the later reading application 320 as shown in B in FIG. 3 displayed on the negative screen may also be used to view the page information about the healthy diet on the first browsing webpage.
  • the processor 101 of the terminal formats and typographically processes the page information about the healthy diet on the first browsing webpage to obtain the second browsing page, and Save the second browsing page in the later reading application.
  • embodiments of the present application provide a method for saving a web page, which can be implemented in a terminal having the hardware structure shown in FIG. 1.
  • FIG. 5 it is a flowchart of a method for saving a web page provided by an embodiment of the present application. It includes the following steps.
  • the processor 101 displays the first browsed webpage on the touch screen 150.
  • the first browsing webpage may be a page of the first application.
  • the first application may be a system application or a third-party application downloaded from the application store and installed on the terminal.
  • the first browsed webpage may include articles, pictures, advertisements, and so on.
  • the first browsing webpage may also include function buttons such as hyperlinks and favorites.
  • step 502 the processor 101 receives a user's favorite operation through an input device such as a touch screen 150 or a peripheral interface 108.
  • the bookmarking operation is used to instruct the terminal to bookmark the first browsing webpage.
  • the processor 101 receiving the user's favorite operation may be detecting a user's operation on a favorite button included in the first browsing webpage displayed on the touch screen 150, and the processor 101 may also respond to the user's operation on the touch screen 150. Favorite operation and display a favorite button.
  • the user can trigger the favorite operation by clicking the favorite button.
  • the storing operation may also be a set shortcut operation, such as pressing the touch screen 150 with two fingers.
  • the web page saving solution in the embodiment of the present application is not limited to whether APP1 has a collection function or a sharing function. Even if APP1 does not have a collection function, by detecting the operation of pressing the touch screen 150 with two fingers, the collection operation can be triggered, which is helpful In order to improve the universality of collecting the first browsing webpage in the APP.
  • a specific example may be that the user presses the touch screen 150 with two fingers, and after the processor 101 detects the two-finger pressing operation, a reading function card will pop up on the touch screen 150, and the reading function card displays a favorite button, the favorite The button may also be called a read button later, and the specific name of the favorite button is not limited here. After the user clicks the favorite button on the touch screen 150, the processor 101 learns that the favorite button is triggered, and starts a favorite operation, and then performs the favorite operation of collecting the first browsed webpage.
  • step 503 the processor 101 bookmarks the second browsing page in response to the bookmarking operation.
  • the second browsing page is obtained after formatting and processing the first browsing web page.
  • the processor 101 may bookmark at least three possible implementation manners of the second browsing page, which may be as follows:
  • the processor 101 obtains the first browsing webpage in response to the collection operation; the processor 101 performs format typesetting processing on the first browsing webpage to generate a second browsing page; the processor 101 stores the to-be-collected in the memory 102 Second browse page. In this way, the processor 101 collects the first browsing webpage and processes the second browsing webpage by itself, which helps to simplify the interaction process between the terminal and the server.
  • the processor 101 obtains the page information of the first browsed webpage by calling the Android framework interface, such as the article body, article picture, advertisement picture, etc., to generate the mht file format Page.
  • the processor 101 performs format typesetting on the generated mht file format page to obtain a second browsing page, and stores the second browsing page in the second application.
  • the result of the format typesetting process may be that the processor 101 saves the page information of the first browsing webpage as the second browsing page according to the preset file format, or the processor 101 may respond to the operation of collecting the first browsing webpage according to After the page information of the first browsing webpage generates a page in an mht file format, the second browsing page is processed according to a later reading algorithm.
  • the pages included in the mht file format include content that is laid out in tags, such as the tag ⁇ title>, and the content corresponding to the tag ⁇ title> is the title name.
  • the main principle of reading the algorithm later is to score each tag in the page of the mht file format according to the degree of interest, such as setting a high score for the tags of interest and setting a low score for tags that are not of interest. Then remove labels that are rated below the preset threshold, such as advertising labels. And retain the tags that are higher than the preset threshold, such as the article body, article picture and other tags, you can also delete some tags, and then re-splice the content corresponding to each reserved tag according to the score of each tag, so as to get the second browsing page ,
  • the second browsing page is also a page in mht file format.
  • the page information of the first browsing webpage includes: article body, article explanation video, advertisement picture, article picture, advertisement video, etc.
  • the page information of the article body, article explanation video, article picture and other pages in the first browsing webpage are retained, the advertisement pictures and advertisement videos are deleted, and after re-typing, the article body and article are included A second browsing page that explains videos, article pictures, etc.
  • the page in the mht file format generated after the processor 101 obtains the page information of the first browsed web page can be edited, for example, copy and paste operations are performed, compared with the cache in the prior art.
  • html webpage, generating a long screenshot of the first browsing webpage, etc. the solution of the embodiment of the present application can perform operations such as re-editing and re-typing for the second browsing page, which helps to regulate the layout of the favorite pages and improve the user reading experience .
  • the processor 101 may use format typesetting processing to remove advertisement pictures, advertisement videos, and other content that are not of interest to the user in the first browsing webpage, to obtain a second browsing page with a regular format.
  • Implementation manner 2 The processor 101 receives the second browsing page sent by the server through the peripheral interface 108, the radio frequency circuit 103, or the Wi-Fi device 107, etc.
  • the processor 101 stores the second browsing page to be stored in the memory 102 .
  • the process of receiving the second browsing page sent by the server by the terminal will be described in detail in conjunction with the schematic diagram of the communication system architecture 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 by a wireless connection or a wired connection or other means.
  • the terminal 100 includes the above-mentioned APP1 and APP2.
  • the server 110 may be a device for communicating with a terminal.
  • At least two types of clients are installed on the terminal 100, and the client is an application installed in the terminal, such as WeChat, read later, and so on.
  • the client is used to display the first browsing webpage, such as the above-mentioned APP1, specifically, for example, WeChat;
  • another type of client (such as the client shown in FIG. 7) is used to collect the first browsing webpage in APP1, for example The above APP2, for example, read later.
  • the server 110 is a later reading server and includes an abstract interface (Readability) component and an abstract business logic (Readability-parse) component.
  • the system architecture of the embodiment of the present application may further include: a crawling component (Crawl), a structured data storage (SDS), an abstract SDS, and a distributed message as shown in FIG. 7 Queue (distributed message queue, DMQ), push system (Push) and other components, these other components may be in the server 110, or may be located in other devices.
  • a crawling component Crawl
  • SDS structured data storage
  • DMQ distributed message queue
  • Push push system
  • the terminal 100 and the server 110 may communicate directly or indirectly through a proxy server.
  • the terminal 100 sends a collection request to the server 110.
  • the terminal 100 sends a collection request to the proxy server.
  • the proxy server sends the collection request to the server 110, and the server 110 obtains the collection request according to the collection request.
  • the proxy server is used to provide services for the interaction between the client and Readability components and between the client and Readability-parse components.
  • the Readability component is used to interact with the client, receive and process various requests sent by the client, take the collection request as an example, check whether the collection request meets the preset condition, and send the collection request that meets the preset condition to the DMQ; Taking receiving a download request as an example, the component is used to find a second browsing page corresponding to the information identifier from the digest SDS according to the information identifier in the download request and send it to the client.
  • the crawling component Crawl is used to crawl the page information of the first browsing webpage, the page address corresponding to the first browsing webpage, and the like.
  • Crawl SDS is used to store the content crawled by Crawl.
  • DMQ is used to store collection requests.
  • the abstract business logic Readability-parse component is used to find the information identifier corresponding to the collection request from the abstract SDS after obtaining the collection request from the DMQ. If it is found, the information identifier corresponding to the collection request is sent to the client; if it is not found For the information identifier corresponding to the collection request, search the first browsing webpage, and perform formatting processing on the first browsing webpage to obtain the second browsing page, etc., and compare the second browsing page, the correspondence between the collection request and the information identifier, and the information The correspondence between the logo and the second browsing page is stored in the digest SDS.
  • the digest SDS is used to store the correspondence between the second browsing page obtained by the Readability-parse component, the collection request and the information identifier, and the correspondence between the information identifier and the second browsing page.
  • the push system is used to push the information identifier corresponding to the collection request to the client when the information identifier corresponding to the collection request determined by the Readability-parse component is downloaded, so that the client downloads from the database through the Readability component according to the information identifier corresponding to the collection request Second browse page.
  • 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 other components, and through the peripheral interface 108, the radio frequency circuit 103, or Wi -The Fi device 107 and other components receive the second browsing page returned by the Readability component.
  • the collection request is used to request the server 110 to format the first browsing web page, generate a second browsing page, and return the second browsing page to the terminal 100. In this way, the terminal 100 receives the second browsing page returned by the server 110, which helps to simplify the process of collecting the first browsing webpage by the terminal 100.
  • the collection request may include, but is not limited to, the following: the article title and application name corresponding to the first browsing webpage; or, the page address corresponding to the first browsing webpage; or, the article title, application name and page corresponding to the first browsing webpage address.
  • the page address refers to a uniform resource locator (URL) corresponding to the first browsed webpage.
  • the server 110 may perform the following steps accordingly:
  • the Readability component receives the collection request of the first webpage browsing sent by the terminal 100 and stores it in the DMQ.
  • the Readability-parse component obtains a collection request from the DMQ, and obtains page information of the first browsed webpage according to the collection request.
  • the Readability-parse component may search the first browsing webpage through the proxy server, which may specifically include the following three situations.
  • the Readability-parse component searches the first browsing webpage according to the article title corresponding to the first browsing webpage.
  • the Readability-parse component can accurately search for the first browsing webpage according to the page address corresponding to the first browsing webpage.
  • the Readability-parse component may Searching the first browsing webpage by the page address, or searching the first browsing webpage according to the article title and application name corresponding to the first browsing webpage.
  • the Readability-parse component involved in the second case and the third case has higher accuracy in searching the first browsed webpage according to the page address, and may preferentially search according to the page address corresponding to the first browsed webpage.
  • the Readability-parse component can further search the first browsing webpage according to the article title corresponding to the first browsing webpage.
  • the collection request may also include a preset text fragment in the page information of the first browsed webpage, such as the first 150 articles of the first browsed webpage.
  • Words the specific number of words can be determined according to the actual situation, here does not limit the specific number of words. It can be understood that the number of words in the preset text segment is too small, and the accuracy of the result of determining the similarity between the searched web page and the first web page is not high;
  • the server 110 sends a collection request including a preset text segment, it consumes more traffic. Setting the preset text segment to 150 words not only improves the accuracy of determining the similarity result between the searched web page and the first web page to a certain extent, but also does not consume too much traffic.
  • the Readability-parse component searches for a web page with the same article title corresponding to the first browsed webpage according to the article title
  • the text recognition capability extracts the first 150 words of the article body in the searched web page, and compares the first 150 words of the article body with the first 150 words of the first browsing webpage included in the collection request. If the two are consistent, the Readability-parse component determines that the searched web page is the first browsing webpage; if the two are not consistent, the Readability-parse component determines that the searched web page is not the first browsing webpage.
  • the Readability-parse component performs format typesetting processing on the first browsing webpage according to the page information of the first browsing webpage to obtain the second browsing page.
  • the Readability-parse component may perform format typesetting processing on the page information of the first browsed webpage.
  • the Readability-parse component obtains the page information of the first browsed web page, such as the article body, article picture, advertisement picture, etc., and generates an html file format page, formatting the html file format page according to the later reading algorithm After processing, a second browsing page is obtained.
  • the specific format typesetting process refer to the relevant description of the format typesetting process in one implementation manner, and details are not described herein again.
  • the second browsing page obtained by the Readability-parse component is a page in the html file format.
  • the page in the html file format is editable, and compared to the page in the mht file format obtained by the terminal 100 through the Android framework interface, the html file
  • the format of the format page is not limited by the system platform, and can be opened on any system platform, and the content on the page will not be messy.
  • the character spacing is the same on different system platforms, and the problem of garbled characters will not occur.
  • the Readability-parse component may also store the second browsing page in the second application, so that the user can view the second browsing page offline in the second application.
  • the Readability-parse component sends the content of the second browsing page to the terminal 100 through the communication interface of the server 110.
  • the Readability-parse component obtains the first browsing webpage according to the collection request and performs format layout processing to generate a second browsing page, and then sends the second browsing page to the terminal 100. It helps to simplify the process of the terminal 100 collecting the first browsed webpage. Moreover, formatting and processing the first browsing webpage helps to regulate the format of the first browsing webpage that the user wants to collect.
  • the Readability component After the Readability component receives the collection request of the first webpage browsing sent by the terminal 100, if the Readability component determines that the collection request meets the preset condition, it can put the collection request into the DMQ, so that the Readability-parse component can Get the favorite request.
  • the preset condition includes any one or more of the following: the first item, the number of words in the article title is not greater than the preset number of words; the second item, and the application name is one of the set of preset application names; Three items, the characters included in the page address are included in the preset character set.
  • the Readability component may send a collection failure message to the terminal 100 through the communication interface of the server 110.
  • the Readability-parse component determines whether the collection request meets the first condition, and if it is met, the above steps S2, S3, and S4 are executed; if it is not met, the terminal 100 Send favorite failure message.
  • the Readability-parse component determines whether a colleague of the collection request meets the first and third conditions, and if so, executes the above step S2. S3, and S4; if not satisfied, send a collection failure message to the terminal 100. In this way, it helps the Readability-parse component to successfully obtain the second browsing page.
  • the Readability-parse component determines how to obtain the second browsing page according to whether the second browsing page is stored in the database. Specifically, the following two possible implementation manners may be included.
  • the Readability-parse component obtains the second browsing page from the database for storing page information according to the collection request. After that, the second browsing page is sent to the terminal 100. In this way, the Readability-parse component obtains the stored second browsing page from the database, which can further simplify the implementation process of the Readability-parse component obtaining the second browsing page.
  • the Readability-parse component obtains the information identifier corresponding to the collection request from the database used to store page information according to the collection request; the Readability-parse 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.
  • 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 page information according to the information identifier corresponding to the collection request.
  • the Readability component sends the second browsing page to the terminal 100.
  • the terminal 100 receives the second browsing page returned by the Readability component according to the information identifier.
  • the Readability-parse component determines that the second browsing page is not stored in the database according to the collection request, the Readability-parse component obtains the page information of the first browsing webpage according to the collection request.
  • the Readability-parse component searches the first browsing webpage according to the content included in the collection request, and obtains the page information of the first browsing webpage from the Internet through the proxy server interface. After that, the Readability-parse component performs format typesetting processing on the first browsing webpage according to the page information of the first browsing webpage to obtain the second browsing page. In this way, when the Readability-parse component does not store the second browsing page in the database, the first browsing webpage is formatted and processed to obtain the second browsing page, which helps to simplify the processing process of the terminal 100 collecting the first browsing webpage.
  • the Readability-parse component may also save the second browsing page to the database. In this way, it helps to save the time for returning the second browsing page to the terminal the next time the terminal bookmarks the first browsing webpage.
  • the Readability-parse component fails to obtain the page information to be bookmarked according to the collection request, and then feeds back a collection failure message to the terminal 100. In this way, when the terminal 100 fails to obtain the second browsing page from the server 110, it helps to process the second browsing page in time.
  • Implementation Mode 3 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 other components, and through the peripheral interface 108, the radio frequency circuit 103, or Wi-Fi After the device 107 and other components receive the collection failure message sent by the Readability-parse component, the processor 101 performs format typesetting processing on the first browsing web page to obtain the second browsing page; the processor 101 stores the to-be-collected in the memory 102 The second browse page. The collection failure message is used to notify the terminal 100 that the acquisition of the second browsing page has failed.
  • the specific format typesetting process please refer to the relevant description of the format typesetting process in one implementation manner, which will not be repeated here.
  • the terminal 100 when the terminal 100 fails to obtain the second browsing page from the server 100, the terminal 100 collects the first browsing webpage and processes the second browsing page by itself, which helps the terminal 100 to successfully collect the first browsing webpage.
  • a possible implementation manner that the processor 101 stores the second browsing page to be bookmarked in the memory 102 is: the processor 101 stores the second browsing page in the memory 102, and The second application stores a card 422 that can access the second browsing page in the memory 102.
  • the processor 101 accesses the second browsing page in the memory 102, and displays the second browsing page on the touch screen 150.
  • the memory 102 may store the second browsing page processed by the processor 101, the second browsing page processed by the received server, or the second browsing page processed by the server at the same time. And the second browsing page obtained by processing with the terminal.
  • the processor 101 When the processor 101 receives the second operation of the user viewing the first browsing webpage through the input device such as the peripheral interface 108, the processor 101 displays the second browsing page 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 processed by the terminal is stored in the memory 102 When browsing the page, the second browsing page processed by the terminal is displayed on the touch screen 150; if the second browsing page processed by the terminal and the second browsing page processed by the server are stored in the memory 102, the server is displayed on the touch screen 150 Either of the processed second browsing page and the terminal processed second browsing page.
  • the processor 101 responds to the collection operation, so the second browsing page obtained after formatting and processing the first browsing webpage is bookmarked, so the second browsing page can be viewed offline and no longer dependent on Searching the first browsing webpage on the mobile network or WiFi can view the second browsing page stored in the memory 102, and the processor 101 performs format typesetting processing on the first browsing webpage, which helps to obtain a second browsing page with a regular format . In this way, it helps to facilitate the user to view the saved second browsing page offline.
  • FIG. 8 exemplarily shows a schematic flowchart of another web page saving method provided by an embodiment of the present application.
  • the method includes the following steps:
  • step 801 the client displays the first browsed webpage.
  • Step 802 the Client sends a collection request to the readability component.
  • the collection request is used to request the server to format and format the first browsing webpage, generate the second browsing page, and return the second browsing page;
  • the collection request includes the following content: the first An article title and application name corresponding to a browsing webpage; or, a page address corresponding to the first browsing webpage; or, an article title, application name and page address corresponding to the first browsing webpage.
  • step 803 the readability component determines whether the collection request satisfies the preset condition; if so, step 804 is performed; if not, step 815 is performed.
  • the preset conditions include any one or more of the following: the number of words in the article title is not greater than the preset number of words, and the application name is one of the set of preset application names; the characters included in the page address are included in the preset characters Within the collection.
  • Step 804 the readability component sends a collection request to the DMQ.
  • Step 805 the readability-parse component obtains a collection request from the DMQ.
  • step 806 the readability-parse component determines whether the information identifier corresponding to the collection request exists in the database according to the collection request; if it exists, step 807 is executed; if not, step 808 is executed.
  • Step 807 The readability-parse component obtains the information identifier corresponding to the collection request from the database for storing page information. After that, step 811 is executed.
  • step 808 the readability-parse component accesses the first browsing webpage through the proxy-forward proxy service according to the collection request. Wherein, if the page information of the first browsed webpage is obtained, step 809 is performed; if the acquisition of the page information of the first browsed webpage fails, step 815 is performed.
  • Step 809 the readability-parse component performs format typesetting on the first browsing webpage to obtain the second browsing webpage;
  • Step 810 The readability-parse component stores the second browsing page and the correspondence between the second browsing page and the information identifier in the database. After that, step 811 is executed.
  • Step 811 The readability-parse component sends a push message to the Client; the push message includes the information identifier corresponding to the collection request.
  • step 812 the Client sends a download request to the readability component; the download request includes the information identifier corresponding to the collection request.
  • Step 813 The readability component reads the second browsing page corresponding to the information identifier from the database.
  • Step 814 The readability component sends the second browsing page to the Client. After that, step 817 is executed.
  • step 815 the readability component feeds back a collection failure message to the Client. After that, step 816 is executed.
  • Step 816 The client obtains the first browsing webpage by calling the Android framework interface, and performs format typesetting processing on the first browsing webpage to obtain the second browsing webpage. After that, step 817 is executed.
  • step 817 the Client stores and displays the second browsing page.
  • step 816 can also be completed in step 802.
  • the Client first processes the second browsing page by itself and stores it in the client. If the Client receives the second browsing page from the readability component, it stores the second browsing page from the readability component in the client, and replaces the second browsing page obtained by the Client.
  • the terminal can automatically and intelligently remove unimportant elements on the first web page and re-typeset, save the processed second browsing page in the Client, and then can view the second browsing page offline, and The user presents a clean and tidy body part, which improves the user's reading experience.
  • an embodiment of the present invention provides a terminal 900, which is specifically used to implement the method executed by the terminal in the embodiments described in FIG. 5 and FIG. 8, the structure of the device is shown in FIG. 9, It includes a display module 901, a receiving module 902, and a processing module 903. Optionally, it may also include a sending module 904. among them:
  • the display module 901 executes step 501; the receiving module 902 executes step 502; and the processing module 903 executes step 503.
  • the display module 901 executes steps 801 and 817; the receiving module 902 executes step 815; the processing module 903 executes step 816; and the sending module 904 executes step 802.
  • an embodiment of the present invention provides a server 1000, which is specifically used to implement the method performed by the server in the embodiment shown in FIG. 8, and the structure of the server 1000 is shown in FIG. 10, including receiving Module 1001, processing module 1002 and sending module 1003, where:
  • the receiving module 1001 executes step 802; the processing module 1002 executes steps 803, steps 805 to 810, and step 813; and the sending module 1003 executes steps 804 and steps 814 to 815.
  • the hardware implementation of the terminal can refer to FIG. 1 and related descriptions.
  • the terminal 100 includes: a touch screen 150, wherein the touch screen 150 includes 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 include instructions, and when the instructions are executed by the terminal 100, the terminal 100 executes the application In the example, any possible design method performed by the terminal 100. It should be noted that the memory 102 may be integrated in the processor 101, or may be independent of the processor 101.
  • the touch screen 150 may execute the method performed by the display module 901 as shown in FIG. 9, and the processor 101 may execute the method performed by the receiving module 902, the processing module 903, and the sending module 904 as shown in FIG. 9. .
  • FIG. 11 it is a schematic diagram of a hardware structure of a server 1100 provided by an embodiment of the present application. As shown in FIG. 11, it includes one or more processors 1101, a memory 1102, and a transceiver 1103. In FIG. 11, a processor 1101 is used as an example.
  • the memory 1102 is used 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 can implement the embodiments of the present application Any possible design method performed by the server 110, for example, when the server performs the method shown in FIG. 8, the transceiver 1103 performs steps 802, 804, and steps 814 to 815, and the processor 1101 performs steps 803, 805 Go to 810, step 813. It should be noted that the memory 1102 may be integrated in the processor 1101, or may be independent of the processor 1101.
  • the processors involved in the above embodiments may be general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), ready-made programmable gate arrays (FPGAs) ) Or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSPs digital signal processors
  • ASICs application-specific integrated circuits
  • FPGAs ready-made programmable gate arrays
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application may be implemented or executed.
  • the 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 conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory or electrically erasable programmable memory, registers, etc.
  • Storage media The storage medium is located in the memory, and the processor reads the instructions in the memory and completes the steps of the above method in combination with its hardware.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each of 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 function is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application may essentially be a part that contributes to the existing technology or a part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of the present application.
  • the foregoing storage media include various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

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

一种网络页面保存方法及终端,涉及终端技术领域,其中该方法包括:终端显示第一浏览网页;终端接收用户的收藏操作,收藏操作用于指示终端收藏该第一浏览网页;终端响应于收藏操作,收藏第二浏览页面;其中,该第二浏览页面是对第一浏览网页进行格式排版处理后得到的。该技术方案,可以有助于用户离线查看第二浏览页面,而不再依赖于移动网络、或WiFi搜索第一浏览网页从而得到第二浏览页面,而且对第一浏览网页进行格式排版处理,有助于得到格式规整的第二浏览页面。如此,有助于实现便于用户离线查看所保存的第二浏览页面。

Description

一种网络页面保存方法及终端 技术领域
本申请实施例涉及终端技术领域,特别涉及一种网络页面保存方法及终端。
背景技术
目前移动终端中可以安装很多应用(application,APP),大多APP都提供了文章收藏功能,比如新闻资讯类、大众点评、浏览器等APP。但是现有的收藏方案中,当用户通过APP中的收藏按钮收藏原始文章时,一般保存的是以页面链接,下次再查看原始文章时,通过保存的页面链接搜索到互联网中的原始浏览网页,进而阅读原始文章。
现有的收藏方案中,一旦没有移动网络、或无线保真技术(wireless fidelity,WiFi),或者原始文章已从APP中删除或移动,则无法继续通过所收藏的页面链接查看原始文章。而且,在有网络时,每次通过所收藏的页面链接查看原始文章都会消耗一次流量。可见,现有的收藏方案不便于用户离线查看网络页面的页面信息。
发明内容
本申请实施例提供了一种网络页面保存方法及终端,以便于用户离线查看所收藏的网络页面的页面信息。
第一方面,本申请实施例提供一种网络页面保存方法,该方法包括:终端显示第一浏览网页;终端接收用户的收藏操作,收藏操作用于指示终端收藏该第一浏览网页;终端响应于收藏操作,收藏第二浏览页面;其中,该第二浏览页面是对第一浏览网页进行格式排版处理后得到的。
基于该方案,由于终端响应于收藏操作,收藏该对第一浏览网页进行格式排版处理后所得到的第二浏览页面,因此,可以离线查看第二浏览页面,而不再依赖于移动网络、或WiFi搜索第一浏览网页从而得到第二浏览页面,而且对第一浏览网页进行格式排版处理,有助于得到格式规整的第二浏览页面。如此,有助于实现便于用户离线查看所保存的第二浏览页面。
基于上述方法,终端响应于收藏操作,收藏第二浏览页面,可以包括以下几种可选的实现方法。
实现方法一,终端向服务器发送收藏请求,该收藏请求用于请求服务器对该第一浏览网页进行格式排版处理,生成第二浏览页面,并返回该第二浏览页面;终端接收服务器返回的第二浏览页面;终端存储该第二浏览页面。
通过该实现方法,终端接收服务器返回的第二浏览页面,有助于简化终端收藏第一浏览网页的处理过程。
作为一种具体的示例,该收藏请求包括以下内容:第一浏览网页对应的文章标题及应用名称;或者,第一浏览网页对应的页面地址;或者,第一浏览网页对应的文章标题、应用名称及页面地址。
进一步的,作为一种可能的实现方式,终端接收服务器返回的第二浏览页面,可以包括:终端接收服务器发送的收藏请求对应的信息标识;终端向服务器发送下载请求,下载 请求包括信息标识;终端接收服务器根据信息标识返回的第二浏览页面。
通过上述技术方案,终端与服务器交互得到收藏请求对应的信息标识,从而根据信息标识准确的从服务器得到第二浏览页面,有助于简化终端收藏第一浏览网页的处理过程。
基于上述任一实施例,在终端向服务器发送收藏请求之后,在终端存储该第二浏览页面之前,进一步还包括:终端接收到服务器发送的收藏失败消息;收藏失败消息用于通知终端第二浏览页面获取失败;终端对第一浏览网页进行格式排版处理,得到第二浏览页面。
通过该技术方案,终端从服务器得到第二浏览页面失败时,终端收藏第一浏览网页,并自行处理得到第二浏览页面,有助于终端成功收藏第一浏览网页。
实现方式二,终端响应于收藏操作,获取第一浏览网页;终端对第一浏览网页进行格式排版处理,得到生成第二浏览页面;终端存储该第二浏览页面。
通过上述技术方案,终端收藏第一浏览网页,自行处理得到第二浏览页面,有助于简化终端与服务器交互过程。
基于上述任一种实现方式,终端接收用户的收藏操作,具体包括:终端接收用户双指按压方式的收藏操作。
通过上述技术方案,终端在收藏第一浏览网页时不受限于APP不具有收藏功能,有助于实现提高在APP中收藏第一浏览网页的普适性。
第二方面,本申请实施例提供一种网络页面保存方法,该方法包括:服务器接收终端发送的第一浏览网页的收藏请求,收藏请求包括第一浏览网页对应的文章标题及应用名称;或者,第一浏览网页对应的页面地址;或者,第一浏览网页对应的文章标题、应用名称及页面地址;服务器根据收藏请求,获取第一浏览网页的页面信息;根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面;服务器向终端发送第二浏览页面。
通过上述技术方案,服务器根据该收藏请求,获取第一浏览网页并进行格式排版处理生成第二浏览页面,然后向终端发送第二浏览页面,如此,有助于简化终端收藏第一浏览网页的处理过程。
在一种可能的设计中,服务器接收终端发送的第一浏览网页的收藏请求之后,服务器获取第一浏览网页的页面信息之前,还包括:服务器确定收藏请求满足预设条件。
作为一种实现方式,服务器若确定收藏请求满足预设条件,则获取第一浏览网页的页面信息,根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面,并向终端发送第二浏览页面。如此,有助于服务器成功获取第二浏览页面。
作为另一种实现方式,服务器若确定收藏请求不满足预设条件,则向终端发送收藏失败消息;相应的,终端获取第一浏览网页,并对第一浏览网页进行格式排版处理,得到第二浏览页面。如此,终端从服务器得到第二浏览页面失败时,终端收藏第一浏览网页,并自行处理得到第二浏览页面,有助于终端成功收藏第一浏览网页。
在一种可能的设计中,该预设条件包括以下内容中的任一项或多项:文章标题的字数不大于预设字数、且应用名称为预设应用名称集合中的一个;页面地址包括的字符包含在预设字符集合内。
基于上述任一实施例,服务器接收终端发送的第一浏览网页的收藏请求之后,服务器向终端发送第二浏览页面之前,进一步还可以包括:服务器根据收藏请求,从用于存储页面信息的数据库中获取第二浏览页面。
通过上述技术方案,服务器从数据库中获取存储的第二浏览页面,可以进一步简化服务器获取第二浏览页面的实现过程。
进一步的,作为一种可能的实现方式,服务器根据收藏请求,从用于存储页面信息的数据库中获取第二浏览页面,具体包括:服务器根据收藏请求,从用于存储页面信息的数据库中获取收藏请求对应的信息标识;服务器向终端发送收藏请求对应的信息标识;服务器接收终端发送的下载请求,下载请求包括收藏请求对应的信息标识;服务器根据收藏请求对应的信息标识,从用于存储页面信息的数据库中获取第二浏览页面。
通过上述技术方案,有助于简化终端收藏第一浏览网页的处理过程。
进一步的,作为一种可能的实现方式,服务器接收终端发送的第一浏览网页的收藏请求之后,还包括:服务器根据收藏请求,若确定数据库中未存储第二浏览页面,则服务器根据收藏请求,获取第一浏览网页的页面信息;服务器根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面。
通过上述技术方案,服务器在数据库中未存储第二浏览页面时,对第一浏览网页进行格式排版处理,从而得到第二浏览页面,有助于简化终端收藏第一浏览网页的处理过程。
进一步的,服务器对第一浏览网页进行格式排版处理,得到第二浏览页面之后,还包括:服务器将第二浏览页面保存至数据库中。
通过上述技术方案,有助于简化服务器下一次得到该第二浏览页面的实现过程。
基于上述任一实施例,服务器根据收藏请求,获取待收藏的页面信息失败,则向终端反馈收藏失败消息。如此,有助于终端未成功从服务器得到第二浏览页面时,及时自行处理得到第二浏览页面。
第三方面,本申请实施例提供一种页面保存的图形用户界面GUI,所述图形用户界面存储在终端中,所述终端包括触摸屏、存储器、一个或多个处理器,所述一个或多个处理器用于执行存储在所述存储器中的一个或多个计算机程序,所述图形用户界面包括:
在所述触摸屏显示第一浏览网页;所述第一浏览网页为第一应用的页面;响应于第一操作,在所述触摸屏显示收藏按钮;响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页;响应于用户查看所述第一浏览网页的第三操作,在所述触摸屏显示第二浏览页面。
在一种可能的设计中,响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页,包括:响应于对所述收藏按钮的第二操作,对所述第一浏览网页进行格式排版处理,得到所述第二浏览页面;存储所述第二浏览页面。
在另一种可能的设计中,所述响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页,包括:响应于对所述收藏按钮的第二操作,所述终端向服务器发送收藏请求,所述收藏请求用于请求所述服务器对所述第一浏览网页进行格式排版处理,生成所述第二浏览页面,并返回所述第二浏览页面给终端;所述终端接收所述服务器返回的所述第二浏览页面。
第四方面,本申请实施例提供一种用于页面保存的终端,包括:触摸屏,其中,所述触摸屏包括触敏表面和显示器;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端执行时,所述终端执行第一方面及其第一方面任一可能设计的方法。需要说明的是,该存储器可以集成于处理器中,也可以是独立于处理器之外。
第五方面,本申请实施例提供一种用于页面保存的服务器,包括:存储器和处理器,所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述服务器能够实现本申请实施例第二方面及其第二方面任一可能设计的方法。需要说明的是,该存储器可以集成于处理器中,也可以是独立于处理器之外。
第六方面,本申请实施例的一种芯片,所述芯片与终端中的存储器耦合,执行本申请实施例第一方面及其第一方面任一可能设计的技术方案。本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
第七方面,本申请实施例的一种芯片,所述芯片与服务器中的存储器耦合,执行本申请实施例第二方面及其第二方面任一可能设计的技术方案。本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
第八方面,本申请实施例的一种计算机存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行本申请实施例第一方面及其第一方面任一可能设计的方法;或者,当计算机程序在服务器上运行时,使得所述服务器执行本申请实施例第二方面及其第二方面任一可能设计的方法。
第九方面,本申请实施例的中一种计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述终端执行本申请实施例第一方面及其第一方面任一可能设计的方法;或者,当计算机程序在服务器上运行时,使得所述服务器执行本申请实施例第二方面及其第二方面任一可能设计的方法。
附图说明
图1为本申请实施例提供的一种可能的终端100的结构示意图;
图2为本申请实施例提供的一种可能的图形用户界面的示意图;
图3为本申请实施例提供的一种可能的应用场景的用户界面示意图;
图4为本申请实施例提供的一种可能的收藏网络页面的过程示意图;
图5为本申请实施例提供的一种网络页面保存方法的流程图;
图6为本申请实施例提供的一种可能的通信系统架构示意图;
图7为本申请实施例提供的一种可能的通信系统软件架构示意图;
图8为本申请实施例提供的另一种网络页面保存方法的流程图;
图9为本申请实施例提供的一种可能的终端的结构示意图;
图10为本申请实施例提供的一种可能的服务器的结构示意图;
图11为本申请实施例提供的另一种可能的服务器的结构示意图。
具体实施方式
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、 b和c,其中a、b、c可以是单个,也可以是多个。
本申请实施例公开的各个实施例可以应用于终端中。在一些实施例中,终端可以是包含诸如个人数字助理和/或音乐播放器等功能的便携式终端,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)、车载设备等。便携式终端的示例性实施例包括但不限于搭载
Figure PCTCN2018109899-appb-000001
或者其它操作系统的便携式终端。上述便携式终端也可以是诸如具有触敏表面(例如触控面板)的膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述终端也可以是具有触敏表面(例如触控面板)的台式计算机。
图1示出了一种终端100的结构示意图。
应理解,图示终端100仅是一个范例,并且终端100可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面对终端100的各个部件进行具体的介绍:
处理器101是终端100的控制中心,利用各种接口和线路连接终端100的各个部分,通过运行或执行存储在存储器102内的应用程序(application,简称App),以及调用存储在存储器102内的数据和指令,执行终端100的各种功能和处理数据。示例性地,处理器101可以对APP中的浏览页面进行格式排版处理。
在一些实施例中,处理器101可包括一个或多个处理单元。处理器101还可以集成应用处理器和调制解调处理器。其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器101中。举例来说,处理器101可以是华为技术有限公司制造的麒麟970芯片。在本申请实施例其他一些实施例中,上述处理器101还可以包括指纹验证芯片,用于对采集到的指纹进行验证。
存储器102用于存储应用程序以及数据。存储器102主要包括程序存储区以及数据存储区。其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);数据存储区可以存储根据使用终端100时所创建的数据(比如音频数据、电话本、网络页面、文件等)。示例性的,数据存储区还可以存储用户拍摄的照片,或者基于用户拍摄的照片合成的图片等。应理解,用户使用终端100拍摄的照片、或者基于用户使用终端100拍摄的照片合成的照片还可以存储到云端,当终端100接收到用户查看照片的操作时,从云端获取相应的照片,显示在终端100上。此外,存储器102可以包括高速随机存取存储器,还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他非易失性固态存储器件等。存储器102还可以存储各种操作系统,例如苹果公司所开发的
Figure PCTCN2018109899-appb-000002
操作系统、谷歌公司所开发的
Figure PCTCN2018109899-appb-000003
操作系统等。
RF电路103可用于在收发信息或通话过程中进行无线信号的接收和发送。具体地,RF电路103可以将基站的下行数据接收后,给处理器101处理。另外,RF电路103还可以将上行数据发送给基站。通常,RF电路103包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪放大器、双工器等。此外,RF电路103还可以通过无线通信实现与其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短消息服务等。
音频电路140、扬声器141、麦克风142可提供用户与终端100之间的音频接口。音频电路140可将接收到的音频数据转换后的电信号,传输到扬声器141,由扬声器141转换为声音信号输出;另一方面,麦克风142将收集的声音信号转换为电信号,由音频电路140接收后转换为音频数据,再将音频数据输出至RF电路103以发送给比如一个终端,或者将音频数据输出至存储器102以便进一步处理。
触摸屏150可以包括触敏表面151和显示器152。其中,触敏表面151(例如触控面板)可采集终端100的用户在其上或附近的触摸事件(比如用户使用手指、触控笔等任何适合的物体在触敏表面151上或在触敏表面151附近的操作),并将采集到的触摸信息发送给其他器件例如处理器101。其中,用户在触敏表面151附近的触摸事件可以称之为悬浮触控。悬浮触控可以是指,用户无需为了选择、移动或拖动目标(例如App图标等)而直接接触触控板,而只需用户位于终端附近以便执行所想要的功能。在悬浮触控的应用场景下,术语“触摸”、“接触”等不会暗示用于直接接触触摸屏150,而是在其附近或接近的接触。能够进行悬浮触控的触敏表面151可以采用电容式、红外光感以及超声波等实现。
触敏表面151可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再发送给处理器101,触摸控制器还可以接收处理器101发送的指令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型来实现触敏表面151。
显示器(也称为显示屏)152可用于显示由用户输入的信息或提供给用户的信息以及各种图形用户界面(graphical user interface,GUI)。例如,显示器152可以显示照片、视频、网页、或者文件等。再例如,显示器152可以显示如图2所示的图形用户界面。其中,如图2所示的图形用户界面上包括状态栏201、可隐藏的导航栏202、时间和天气小组件(widget)203、以及应用的图标,例如浏览器图标204等。状态栏201中包括运营商名称(例如中国移动)、移动网络(例如4G)、时间和剩余电量。导航栏202中包括后退(back)键图标、主屏幕(home)键图标和前进键图标。此外,可以理解的是,在一些实施例中,状态栏201中还可以包括蓝牙图标、Wi-Fi图标、外接设备图标等。还可以理解的是,在另一些实施例中,图2所示的图形用户界面中还可以包括Dock栏,Dock栏中可以包括常用的应用图标等。当处理器101检测到用户的手指(或触控笔等)针对某一应用图标的触摸事件后,响应于该触摸事件,打开与该应用图标对应的应用的用户界面,并在显示器152上显示该应用的用户界面。
当显示器152当前显示的为图2所示的图形用户界面的情况下,若处理器101检测到用户对浏览器图标204的操作,则响应于该操作,在显示器152上显示浏览器应用的用户界面。例如,用户对浏览器图标204的该操作可以为用户点击或者触摸浏览器图标204的操作,也可以为用户在浏览器图标204的上方的触摸操作等,对此不作限定。
应理解,通常情况下,显示器152可以包括显示控制器和显示装置两部分。其中,显示控制器用于接收处理器101发送的信号或数据,来驱动在显示装置上显示相应的界面。示例的,本申请实施例可以通过LCD(liquid crystal display,液晶显示器、或者有机发光二极管(organic light-emitting diode,OLED)等来配置显示装置。例如,采用有源矩阵有机发光二极管(active matrix organic light emitting diode,AMOLED)来配置显示装置。
应理解,触敏表面151可以覆盖在显示器152之上,当触敏表面151检测到在其上或 附近的触摸事件后,传送给处理器101以确定触摸事件的类型,随后处理器101可以根据触摸事件的类型在显示器152上提供相应的视觉输出。虽然在图1中,触敏表面151与显示器152是作为两个独立的部件来实现终端100的输入和输出功能,但是在某些实施例中,可以将触敏表面151与显示器152集成而实现终端100的输入和输出功能。可以理解的是,触摸屏150是由多层材料堆叠而成,本申请实施例中只展示出了触敏表面(层)和显示器(层),其他层在本申请实施例中不予赘述。另外,在本申请实施例其他一些实施例中,触敏表面151可以覆盖在显示器152之上,并且触敏表面151的尺寸大于显示器152的尺寸,使得显示器152全部覆盖在触敏表面151下面,或者,上述触敏表面151可以以全面板的形式配置在终端100的正面,也即用户在终端100正面的触摸均能被终端感知,这样就可以实现终端正面的全触控体验。在其他一些实施例中,触敏表面151以全面板的形式配置在终端100的正面,显示器152也可以以全面板的形式配置在终端100的正面,这样在终端的正面就能够实现无边框的结构。在本申请实施例其他一些实施例中,触摸屏150还可以包括一系列的压力传感器阵列,可以使得终端感测触摸事件所施加给触摸屏150的压力。
一个或多个传感器106,比如光传感器、运动传感器以及其他传感器。具体的,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触摸屏150的显示器的亮度,接近传感器可在终端100移动到耳边时,关闭显示器的电源。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。其他传感器例如陀螺仪,可以用于检测终端100围绕一个定点或轴的旋转的角度。
在本申请实施例一些实施例中,传感器106还可以包括指纹传感器。例如,可以在终端100的背面(例如后置摄像头的下方)配置指纹传感器,或者在终端100的正面(例如触摸屏150的下方)配置指纹传感器。另外,也可以通过在触摸屏150中配置指纹传感器来实现指纹识别功能,即指纹传感器可以与触摸屏150集成在一起来实现终端100的指纹识别功能。在这种情况下,该指纹传感器可以配置在触摸屏250中,可以是触摸屏150的一部分,也可以以其他方式配置在触摸屏150中。另外,该指纹传感器还可以被实现为全面板指纹传感器,因此,可以把触摸屏150看成是任何位置都可以进行指纹采集的一个面板。在一些实施例中,该指纹传感器可以对采集到的指纹进行处理(例如对采集到的指纹进行验证),并将指纹处理结果(例如指纹是否验证通过)发送给处理器101,由处理器101根据指纹处理结果做出相应的处理。在另一些实施例中,该指纹传感器还可以将采集到的指纹发送给处理器101,以便处理器101对该指纹进行处理(例如指纹验证等)。本申请实施例中的指纹传感器可以采用任何类型的感测技术,包括但不限于光学式、电容式、压电式或超声波传感技术等。另外,关于本申请实施例中在触摸屏150中集成指纹传感器的具体技术方案,可以参见美国专利与商标局公告的申请号为US 2015/0036065 A1,名称为“在终端中的指纹传感器”的专利申请,其全部控件通过引用结合在本申请实施例各个实施例中。此外,终端200还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不予赘述。
Wi-Fi装置107,用于为终端100提供遵循Wi-Fi相关标准协议的网络接入。终端100可以通过Wi-Fi装置107接入到Wi-Fi接入点,进而帮助用户收发电子邮件、浏览网页和 访问流媒体等,它为用户提供了无线的宽带互联网访问。在其他一些实施例中,该Wi-Fi装置207也可以作为Wi-Fi无线接入点,可以为其他终端提供Wi-Fi网络接入。
外设接口108用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线接口与鼠标连接,通过用户识别模块卡卡槽上的金属触点与运营商提供的SIM卡连接。外设接口108可以被用来将上述外部的输入/输出外围设备耦接到处理器101和存储器103。
终端100还可以包括给各个部件供电的电源装置109(比如电池和电源管理芯片),电池可以通过电源管理芯片与处理器101逻辑相连,从而通过电源装置109实现管理充电、放电、以及功耗管理等功能。
尽管图1未示出,终端100还可以包括蓝牙装置、定位装置、闪光灯、微型投影装置、近场通信(near field communication,NFC)装置等,在此不予赘述。其中,前置摄像头可以用于捕捉人脸特征信息,处理器101可以对该人脸特征信息进行人脸识别,进而进行后续处理。
尽管图1未示出,终端100还可以包括蓝牙装置、定位装置、闪光灯、微型投影装置、近场通信(near field communication,NFC)装置等,在此不予赘述。
可以理解的是,本申请实施例示意的结构并不构成对终端100的具体限定。在本申请实施例另一些实施例中,终端100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或软件和硬件的组合实现。
以下实施例均可以在具有上述硬件结构的终端100中实现。
基于图1所示的终端100,终端中可以支持多种应用,比如预置的系统应用,如设置、电话等,再比如用户安装的第三方应用,如浏览器、新闻应用、通讯应用等。用户可以在系统应用或第三方应用中浏览网络页面,以在终端的触摸屏150显示第一应用(以下将第一应用称之为APP1)的第一浏览网页为例,用户对第一浏览网页的页面信息感兴趣,又因为手头工作或周围环境而不能马上阅读,可以先收藏APP1中的第一浏览网页,在方便阅读的时候继续阅读收藏的第一浏览网页的页面信息。
为了解决现有的收藏方案中存在的不便于用户离线查看所收藏的网络页面的页面信息的问题,本申请实施例提供了一种网络页面保存方法。该方法可以实现终端收藏APP1中的第一浏览网页,并将对第一浏览网页进行格式处理后得到的第二浏览页面,保存在第二应用(以下将第二应用称之为APP2)中,从而用户可以在APP2中离线查看第二浏览页面。
作为一个示例,终端的显示器152可以显示如图3所示的图形用户界面301和302。例如,终端当前显示的是如图3中的A所示的图形用户界面301,图形用户界面301上包括多种应用的图标(比如,浏览器图标204)、以及多种小组件(如左右滑动小组件303)。终端可以响应于在如图3中A所示的图形用户界面301上向右滑动屏幕的操作,例如滑动方向如图形用户界面301上虚线箭头所示,则在显示器152上显示如图3中B所示的图形用户界面302。需要说明的是,图形用户界面302也可以称为负一屏。
在图3中B所示的图形用户界面302上,包括多种功能的系统应用,比如情景智能310、稍后阅读应用320等,此外,可以理解的是,在一些实施例中,如图3中B所示的图形用户界面中还可以包括如智能提醒、语音助手等其他功能的系统应用。其中,情景智能310 中包括手机使用卡片311,稍后阅读应用320包括用于显示收藏的网络页面的页面信息的卡片,比如卡片321包括在今日头条中浏览的教育首要问题的网络页面,再比如,卡片322包括维生素的网络页面的页面信息;又比如,卡片323包括健康饮食的网络页面的页面信息。
以图3中的APP1为浏览器应用,APP2为稍后阅读应用为例,示出了如图4所示的收藏网络页面的过程示意图。
如图4所示,终端的显示器152显示浏览器应用中的图形用户界面410。其中,图形用户界面410包括第一浏览网页。第一浏览网页上有关于健康饮食的页面信息。终端响应于用户双手按压屏幕的收藏操作(具体如图4中A图所示),也可称为第一操作,处理器101会在显示器152显示如图4中B所示的图形用户界面420,图形用户界面420包括两个卡片,分别为421和422,其中,卡片421包括搜索、复制、地图、分享等虚拟按钮,卡片422包括稍后阅读按钮(也可以称为收藏按钮)423。其中,除了图4中A图所示的双手按压屏幕触发的收藏操作之外,在A图中还可以通过点击浏览器应用中的收藏按钮(A图中未画出)触发。
终端响应于用户点击该稍后阅读按钮423的第二操作,处理器101会将第一浏览网页上有关于健康饮食的页面信息收藏到稍后阅读应用(即卡片422中),并显示如图4中C所示的图形用户界面430。该图形用户界面430包括卡片422,其中,卡片422包括去查看按钮431。终端响应于用户点击该去查看按钮431的第三操作,处理器101会在显示器152显示如图4中D所示的图形用户界面440,该图形用户界面440包括稍后阅读应用(即卡片422)中存储的第二浏览页面。
在另一些示例中,还可以通过负一屏显示的如图3中B所示的稍后阅读应用320包括的卡片323,来查看第一浏览网页上有关于健康饮食的页面信息。
上述示例中,在触发收藏该第一浏览网页的页面信息的操作之后,终端的处理器101对第一浏览网页上的有关于健康饮食的页面信息进行格式排版处理,得到第二浏览页面,并将该第二浏览页面保存于稍后阅读应用中。
结合上述实施例及附图,本申请实施例提供一种网络页面保存方法,该方法可以在具有图1所示的硬件结构的终端中实现。
具体的,如图5所示,为本申请实施例提供的一种网络页面保存方法的流程图。包括以下步骤。
步骤501,处理器101在触摸屏150显示第一浏览网页。需要说明的是,本申请实施例中第一浏览网页可以为第一应用的页面。其中第一应用可以是系统应用,也可以是从应用商店下载安装在终端的第三方应用。示例的,第一浏览网页可以包括文章、图片、广告等。为了便于与用户交互,第一浏览网页还可以包括超链接、收藏等功能按钮。
步骤502,处理器101通过触摸屏150或外设接口108等输入装置接收用户的收藏操作。所述收藏操作用于指示终端收藏所述第一浏览网页。
用户在浏览第一浏览网页时,希望收藏该第一浏览网页,以便在稍后离线阅读第一浏览网页上的页面信息。为了收藏第一浏览网页,处理器101接收用户的收藏操作可以为检测用户对触摸屏150上显示的第一浏览网页中包含的收藏按钮的操作,处理器101还可以响应于用户在触摸屏150上的收藏操作并显示一个收藏按钮。
在一些实施例中,用户可以通过点击收藏按钮触发收藏操作。在另一些实施例中,收 藏操作还可以为一些设定的快捷操作,例如双指按压触摸屏150等。
本申请实施例的网络页面保存方案不受限于APP1是否具有收藏功能或分享功能,即使APP1不具有收藏功能,通过检测双指按压触摸屏150的操作,也可以实现触发收藏操作,如此,有助于实现提高在APP中收藏第一浏览网页的普适性。一种具体的示例可以为,用户通过双指按压触摸屏150,处理器101检测到这个双指按压操作后,会在触摸屏150上弹出阅读功能卡片,该阅读功能卡片上显示有收藏按钮,该收藏按钮也可以称为稍后阅读按钮,收藏按钮的具体名称这里不作限制。用户在触摸屏150上点击该收藏按钮后,处理器101得知该收藏按钮被触发,开始实施收藏操作,进而进行收藏上述第一浏览网页的操作。
步骤503,处理器101响应于该收藏操作,收藏第二浏览页面。其中,该第二浏览页面是对该第一浏览网页进行格式排版处理后得到的。
处理器101响应于该收藏操作,收藏第二浏览页面可以有至少三种可能的实现方式,具体可以如下:
实现方式一,处理器101响应于收藏操作,获取第一浏览网页;处理器101对第一浏览网页进行格式排版处理,生成第二浏览页面;处理器101在存储器102中存储待收藏的所述第二浏览页面。如此,处理器101收藏第一浏览网页,自行处理得到第二浏览页面,有助于简化终端与服务器交互过程。
具体的,处理器101响应于用户针对第一浏览网页的收藏操作,通过调用安卓(Android)框架接口获取第一浏览网页的页面信息,比如文章正文、文章图片、广告图片等,生成mht文件格式的页面。处理器101对生成的mht文件格式的页面进行格式排版处理,得到第二浏览页面,并将第二浏览页面存储于第二应用中。
其中,格式排版处理的结果,可以是处理器101将第一浏览网页的页面信息按照预设文件格式保存成第二浏览页面,也可以是处理器101响应于收藏第一浏览网页的操作,根据第一浏览网页的页面信息生成mht文件格式的页面之后,按照稍后阅读算法处理得到第二浏览页面。mht文件格式的页面中包括内容是以标签的方式布局,比如标签<title>,该标签<title>对应的内容为标题名称。稍后阅读算法的主要原理为:对mht文件格式的页面中各个标签按照感兴趣的程度进行打分,比如对于感兴趣的标签设置高分,对于不感兴趣的标签设置低分。然后剔除打分低于预设阈值的标签,比如广告标签。并保留打分高于预设阈值的标签,比如文章正文、文章图片等标签,也可以删掉一些标签,然后根据各个标签的分值重新拼接各个保留的标签对应的内容,从而得到第二浏览页面,该第二浏览页面也是mht文件格式的页面。
举个例子,比如用户对文章正文、文章图片感兴趣,对广告图片、广告视频等不感兴趣。若第一浏览网页的页面信息包括:文章正文、文章讲解视频、广告图片、文章图片、广告视频等。经过处理器101按照稍后阅读算法处理之后,第一浏览网页中的文章正文、文章讲解视频、文章图片等页面信息保留,广告图片和广告视频等被删除,重新排版后得到包括文章正文、文章讲解视频、文章图片等内容的第二浏览页面。
通过该示例,本申请实施例中处理器101获取第一浏览网页的页面信息后生成的mht文件格式的页面可以编辑,比如,进行复制、粘贴等操作,相较于现有技术中的缓存的html网页、生成第一浏览网页的长截图等方案,本申请实施例的方案可以针对第二浏览页面进行再次编辑、重新排版等操作,有助于规整所收藏的页面的排版,改善用户阅读体验。进 一步的,处理器101可以采用格式排版处理去除第一浏览网页中的广告图片、广告视频等用户不感兴趣的内容,得到格式规整的第二浏览页面。
实现方式二,处理器101通过外设接口108、射频电路103或Wi-Fi装置107等部件接收服务器发送的第二浏览页面,处理器101在存储器102中存储待收藏的所述第二浏览页面。下面将结合图6所示的通信系统架构示意图,进行详细说明终端接收服务器发送的第二浏览页面的过程。
如图6所示,该系统架构中包括终端100和服务器110,终端100和服务器110之间通过无线连接或有线连接或其他方式连接。其中,终端100中包括上述APP1和APP2。服务器110可以是用于与终端进行通信的设备。
示例的,终端100上安装有至少两类客户端(client),客户端为安装在终端中的应用,例如微信、稍后阅读等。其中,一类客户端用于显示第一浏览网页,例如上述APP1,具体例如微信;另一类客户端(如图7中示出的客户端)用于收藏APP1中的第一浏览网页,例如上述APP2,具体例如稍后阅读。
服务器110为稍后阅读服务器,包括文摘接口(Readability)组件和文摘业务逻辑(Readability-parse)组件。在一些实施例中,本申请实施例的系统架构还可以包括:如图7所示的抓取组件(Crawl)、抓取结构化数据存储(structured data store,SDS)、文摘SDS、分布式消息队列(distributed message queue,DMQ)、推送系统(Push)等其他组件,这些其他组件可以是服务器110中的,也可以是位于其他设备中的。
需要说明的是,上述终端100和服务器110之间可以直接进行通信,也可以通过代理服务器间接进行通信。终端100向服务器110发送收藏请求,以图7所示的系统架构为例,终端100向代理服务器发送收藏请求,代理服务器将该收藏请求发送至服务器110,由服务器110根据该收藏请求,获取第一浏览网页的页面信息,并进行格式排版处理得到第二浏览页面,并将第二浏览页面返回至终端100。
具体的,当系统架构如图7所示时,各个组件的功能如下:
代理服务器用于为client与Readability组件之间、以及client和Readability-parse组件之间的交互提供服务。
Readability组件用于与客户端交互,接收并处理客户端发送的各类请求,以接收收藏请求为例,检验收藏请求是否满足预设条件,并将满足预设条件的收藏请求发送至DMQ中;以接收下载请求为例,该组件用于根据下载请求中的信息标识,从文摘SDS中查找信息标识对应的第二浏览页面,发送至client。
抓取组件Crawl用于抓取第一浏览网页的页面信息、第一浏览网页对应的页面地址等内容。
抓取SDS用于存储Crawl抓取的内容。
DMQ用于存储收藏请求。
文摘业务逻辑Readability-parse组件用于在从DMQ中获取到收藏请求之后,从文摘SDS中查找收藏请求对应的信息标识,若查找到,则向client发送收藏请求对应的信息标识;若未查找到收藏请求对应的信息标识,则搜索第一浏览网页,并执行对第一浏览网页的格式排版处理得到第二浏览页面等,并将第二浏览页面、收藏请求与信息标识的对应关系、以及信息标识与第二浏览页面的对应关系存储于文摘SDS中。
文摘SDS用于存储Readability-parse组件得到的第二浏览页面、收藏请求与信息标识 的对应关系、以及信息标识与第二浏览页面的对应关系。
推送系统(Push)用于在Readability-parse组件确定出的收藏请求对应的信息标识时,将收藏请求对应的信息标识推送至client,以便client根据收藏请求对应的信息标识,通过Readability组件从数据库下载第二浏览页面。
作为一种实现方式,处理器101可以通过外设接口108、射频电路103或Wi-Fi装置107等部件向服务器110中的Readability组件发送收藏请求,并通过外设接口108、射频电路103或Wi-Fi装置107等部件接收Readability组件返回的第二浏览页面,收藏请求用于请求服务器110对第一浏览网页进行格式排版处理,生成第二浏览页面,并向终端100返回第二浏览页面。如此,终端100接收服务器110返回的第二浏览页面,有助于简化终端100收藏第一浏览网页的处理过程。
其中,收藏请求可以但不限于包括以下内容:第一浏览网页对应的文章标题及应用名称;或者,第一浏览网页对应的页面地址;或者,第一浏览网页对应的文章标题、应用名称及页面地址。此处,页面地址指的是第一浏览网页对应的统一资源定位符(uniform resource locator,URL)。
在终端100中的处理器101通过外设接口108、射频电路103或Wi-Fi装置107等部件向服务器110发送收藏请求之后,相应的,服务器110就可以执行如下步骤:
S1,Readability组件接收终端100发送的第一浏览网页的收藏请求,并存储于DMQ中。
S2,Readability-parse组件从DMQ中获取收藏请求,并根据收藏请求获取第一浏览网页的页面信息。此处,Readability-parse组件根据收藏请求包括的内容,可以通过代理服务器搜索第一浏览网页,具体可以有如下三种情况。
第一种情况,若收藏请求包括第一浏览网页对应的文章标题及第一浏览网页对应的应用名称,则Readability-parse组件根据该第一浏览网页对应的文章标题搜索第一浏览网页。
第二种情况,若收藏请求包括第一浏览网页对应的页面地址,则Readability-parse组件根据该第一浏览网页对应的页面地址可以准确的搜索到该第一浏览网页。
第三种情况,若收藏请求包括第一浏览网页对应的文章标题、第一浏览网页对应的应用名称及第一浏览网页对应的页面地址,则Readability-parse组件可以根据该第一浏览网页对应的页面地址搜索该第一浏览网页,也可以根据该第一浏览网页对应的文章标题及应用名称搜索第一浏览网页。
上述三种情况中,第二种情况以及第三种情况中涉及的Readability-parse组件按照页面地址搜索第一浏览网页的准确度较高,可以优先根据第一浏览网页对应的页面地址进行搜索第一浏览网页。在获取不到第一浏览网页对应的页面地址的情况下,Readability-parse组件进而可以根据第一浏览网页对应的文章标题来搜索第一浏览网页。
在上述第一种情况和第三种情况中,由于根据文章标题搜索第一浏览网页时,可能会出现Readability-parse组件搜索到的文章标题与第一浏览网页对应的文章标题相同的网络页面、但搜索到的网络页面的文章正文与第一浏览网页的文章正文不同的情况,这种情况可以说明Readability-parse组件搜索到的网络页面并不是用户要收藏的第一浏览网页。
为了Readability-parse组件能够准确的搜索到用户要收藏的第一浏览网页,收藏请求中还可以包括第一浏览网页的页面信息中的预设文字片段,比如第一浏览网页的文章正文前150个字,具体字数可以根据实际情况确定,此处不限制具体字数。可以理解的是,预 设文字片段的字数太少,在确定搜索到的网络页面与第一网络页面之间的相似度结果的准确性不高;预设文字片段的字数太多,终端100向服务器110发送包括预设文字片段的收藏请求时,消耗较多流量。将预设文字片段设置为150字,既可以在一定程度上提高确定搜索到的网络页面与第一网络页面之间相似度结果的准确度,又可以不消耗太多流量。
以收藏请求中包括第一浏览网页的文章正文前150个字为例,Readability-parse组件根据第一浏览网页对应的文章标题搜索到第一浏览网页对应的文章标题相同的网络页面时,可以通过文字识别能力提取搜索到的网络页面中的文章正文前150个字,并将提取的文章正文前150个字与收藏请求中包括的第一浏览网页的正文前150个字进行比对。若二者一致,则Readability-parse组件确定该搜索到的网络页面即为第一浏览网页;若二者不一致,则Readability-parse组件确定该搜索到的网络页面并不是第一浏览网页。
S3,Readability-parse组件根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面。
具体的,Readability-parse组件可以针对第一浏览网页的页面信息进行格式排版处理。作为一个示例,Readability-parse组件获取第一浏览网页的页面信息,如文章正文、文章图片、广告图片等,并生成html文件格式的页面,对html文件格式的页面按照稍后阅读算法进行格式排版处理,得到第二浏览页面,具体的格式排版处理过程参见实现方式一种的格式排版处理的相关描述,在此不再赘述。
基于该示例,Readability-parse组件得到的第二浏览页面是html文件格式的页面,html文件格式的页面可编辑,而且相较于终端100通过安卓框架接口得到mht文件格式的页面来说,html文件格式的页面的格式不受系统平台的限制,可以在任意系统平台打开,并且页面上的内容不会乱,比如在不同的系统平台字符间距一样,不会出现乱码的问题。
在得到第二浏览页面后,Readability-parse组件还可以将第二浏览页面存储在第二应用中,以便用户在第二应用中离线查看第二浏览页面。
S4,Readability-parse组件将第二浏览页面的内容通过服务器110的通信接口向终端100发送。
基于上述步骤S1至S4,通过上述技术方案,Readability-parse组件根据该收藏请求,获取第一浏览网页并进行格式排版处理生成第二浏览页面,然后向终端100发送第二浏览页面,如此,有助于简化终端100收藏第一浏览网页的处理过程。而且,对第一浏览网页进行格式排版处理,有助于规整用户要收藏的第一浏览网页的格式。
基于上述实施例,在Readability组件接收终端100发送的第一浏览网页的收藏请求之后,若Readability组件确定收藏请求满足预设条件,则可以将收藏请求放入DMQ,从而Readability-parse组件可以从DMQ获取该收藏请求。其中,该预设条件包括以下内容中的任一项或多项:第一项,文章标题的字数不大于预设字数;第二项,且应用名称为预设应用名称集合中的一个;第三项,页面地址包括的字符包含在预设字符集合内。相应的,在Readability组件接收终端100发送的第一浏览网页的收藏请求之后,Readability组件若确定收藏请求不满足预设条件,则Readability组件可以通过服务器110的通信接口向终端100发送收藏失败消息。
比如,以预设条件包括上述第一项条件为例,Readability-parse组件确定收藏请求是否满足第一项条件,若满足,则执行上述步骤S2、S3、以及S4;若不满足,则向终端100发送收藏失败消息。再比如,以预设条件包括上述第一项条件和第三项条件为例, Readability-parse组件确定收藏请求是否同事满足第一项条件和第三项条件,若满足,则执行上述步骤S2、S3、以及S4;若不满足,则向终端100发送收藏失败消息。如此,有助于Readability-parse组件成功获取第二浏览页面。
进一步,在上述Readability组件接收终端100发送的第一浏览网页的收藏请求之后,Readability-parse组件根据数据库中是否存储有第二浏览页面来确定如何获取第二浏览页面。具体的,可以包括以下两种可能的实现方式。
作为一种实现方式,Readability-parse组件根据收藏请求,从用于存储页面信息的数据库中获取第二浏览页面。之后,向终端100发送第二浏览页面。如此,Readability-parse组件从数据库中获取存储的第二浏览页面,可以进一步简化Readability-parse组件获取第二浏览页面的实现过程。
具体的,Readability-parse组件根据收藏请求,从用于存储页面信息的数据库中获取收藏请求对应的信息标识;Readability-parse组件通过调用push组件向终端100发送收藏请求对应的信息标识;相应的,终端100接收收藏请求对应的信息标识,并向Readability组件发送下载请求,下载请求包括信息标识。Readability组件接收终端100发送的下载请求,根据收藏请求对应的信息标识,从用于存储页面信息的数据库中获取第二浏览页面。Readability组件向终端100发送该第二浏览页面,相应的,终端100接收Readability组件根据信息标识返回的第二浏览页面。
作为另一种实现方式,Readability-parse组件根据收藏请求,若确定数据库中未存储第二浏览页面,则Readability-parse组件根据收藏请求,获取第一浏览网页的页面信息。
具体的,Readability-parse组件根据收藏请求包括的内容,搜索第一浏览网页,并通过代理服务器接口从互联网中获取该第一浏览网页的页面信息。之后,Readability-parse组件根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面。如此,Readability-parse组件在数据库中未存储第二浏览页面时,对第一浏览网页进行格式排版处理,从而得到第二浏览页面,有助于简化终端100收藏第一浏览网页的处理过程。
进一步的,在Readability-parse组件根据第一浏览网页的页面信息,对第一浏览网页进行格式排版处理,得到第二浏览页面之后,Readability-parse组件还可以将第二浏览页面保存至数据库中。如此,有助于节省下一次终端收藏该第一浏览网页时,向终端返回该第二浏览页面的时间。
基于上述任一实施例,Readability-parse组件根据收藏请求,获取待收藏的页面信息失败,则向终端100反馈收藏失败消息。如此,有助于终端100未成功从服务器110得到第二浏览页面时,及时自行处理得到第二浏览页面。
实现方式三、在终端100的处理器101通过外设接口108、射频电路103或Wi-Fi装置107等部件向Readability组件发送收藏请求之后,并通过外设接口108、射频电路103或Wi-Fi装置107等部件接收到Readability-parse组件发送的收藏失败消息,则处理器101对所述第一浏览网页进行格式排版处理,得到所述第二浏览页面;处理器101在存储器102中存储待收藏的该第二浏览页面。其中,所述收藏失败消息用于通知所述终端100所述第二浏览页面获取失败。具体的格式排版处理过程参见实现方式一种的格式排版处理的相关描述,在此不再赘述。
通过该实现方式,终端100从服务器100得到第二浏览页面失败时,终端100收藏第一浏览网页,并自行处理得到第二浏览页面,有助于终端100成功收藏第一浏览网页。
上述三种方式中,处理器101在存储器102中存储待收藏的所述第二浏览页面的一种可能的实施方式为:处理器101将该第二浏览页面存储在存储器102中,并在第二应用中保存可以访问存储器102中的第二浏览页面的卡片422。
进一步的,处理器101响应于用户点击卡片422的操作,访问存储器102中的第二浏览页面,并在触摸屏150上显示该第二浏览页面。可选的,在存储器102中可以存储处理器101处理得到的第二浏览页面,也可以存储接收到的服务器处理得到的第二浏览页面,还可以同时存储接收到服务器处理得到的第二浏览页面和终端处理得到的第二浏览页面。
在处理器101通过外设接口108等输入装置接收到用户查看所述第一浏览网页的第二操作时,处理器101响应于该第二操作,在触摸屏150上显示第二浏览页面。具体的,若在存储器102中存储的是服务器处理得到的第二浏览页面,则在触摸屏150上显示该服务器处理得到的第二浏览页面;若在存储器102中存储的是终端处理得到的第二浏览页面,则在触摸屏150上显示终端处理得到的第二浏览页面;若在存储器102中存储的有终端处理得到的第二浏览页面和服务器处理得到的第二浏览页面,在触摸屏150上显示服务器处理得到的第二浏览页面和终端处理得到的第二浏览页面中的任一个。
基于上述步骤501至503,由于处理器101响应于收藏操作,收藏该对第一浏览网页进行格式排版处理后所得到的第二浏览页面,因此,可以离线查看第二浏览页面,而且不再依赖于移动网络、或WiFi搜索第一浏览网页就可以查看在存储器102中存储的第二浏览页面,而且处理器101对第一浏览网页进行格式排版处理,有助于得到格式规整的第二浏览页面。如此,有助于实现便于用户离线查看所保存的第二浏览页面。
下面结合图8,详细介绍上述网络页面保存方法的一种可能的实现方式。
基于图7,图8示例示出了本申请实施例提供的另一种网络页面保存方法流程示意图。该方法包括以下步骤:
步骤801,Client显示第一浏览网页。
步骤802,Client向readability组件发送收藏请求。
其中,收藏请求用于请求所述服务器对所述第一浏览网页进行格式排版处理,生成所述第二浏览页面,并返回所述第二浏览页面;所述收藏请求包括以下内容:所述第一浏览网页对应的文章标题及应用名称;或者,所述第一浏览网页对应的页面地址;或者,所述第一浏览网页对应的文章标题、应用名称及页面地址。
步骤803,readability组件确定收藏请求是否满足预设条件;若是,则执行步骤804;若否,则执行步骤815。
其中,预设条件包括以下内容中的任一项或多项:文章标题的字数不大于预设字数、且应用名称为预设应用名称集合中的一个;页面地址包括的字符包含在预设字符集合内。
步骤804,readability组件向DMQ发送收藏请求。
步骤805,readability-parse组件从DMQ获取收藏请求。
步骤806,readability-parse组件根据收藏请求,确定数据库中是否存在收藏请求对应的信息标识;若存在,则执行步骤807;若否,则执行步骤808。
步骤807,readability-parse组件从用于存储页面信息的数据库中获取收藏请求对应的信息标识。之后,执行步骤811。
步骤808,readability-parse组件根据收藏请求,通过proxy-forward代理服务访问第一浏览网页。其中,若获取到第一浏览网页的页面信息,则执行步骤809;若获取第一浏览 网页的页面信息失败,则执行步骤815。
步骤809,readability-parse组件对第一浏览网页进行格式排版处理,得到第二浏览页面;
步骤810,readability-parse组件将第二浏览页面、以及第二浏览页面和信息标识的对应关系存储在数据库中。之后,执行步骤811。
步骤811,readability-parse组件向Client发送推送消息;该推送消息包括收藏请求对应的信息标识。
步骤812,Client向readability组件发送下载请求;下载请求包括收藏请求对应的信息标识。
步骤813,readability组件从数据库读取信息标识对应的第二浏览页面。
步骤814,readability组件向Client发送第二浏览页面。之后,执行步骤817。
步骤815,readability组件向Client反馈收藏失败消息。之后,执行步骤816。
步骤816,Client通过调用安卓框架接口获取第一浏览网页,并对第一浏览网页进行格式排版处理得到第二浏览页面。之后,执行步骤817。
步骤817,Client存储并显示第二浏览页面。
需要说明的是,上述步骤816也可以在步骤802完成,这种情况下,Client先自行处理得到第二浏览页面,并存储于client中。若Client收到来自readability组件的第二浏览页面时,将来自readability组件的第二浏览页面存储于client中,并替换掉Client自行处理得到的第二浏览页面。
通过上述实施例,终端能够自动智能的剔除第一网络页面上不重要的元素,并重新排版,将处理后得到的第二浏览页面保存在Client,进而可以离线查看该第二浏览页面,并为用户呈现干净整洁的正文部分,改善用户的阅读体验。
本申请实施例的各实施方式可以任意方式进行组合,也可以单独使用,以实现不同的技术效果。
基于与方法实施例的同一发明构思,本发明实施例提供一种终端900,具体用于实现图5和图8所述的实施例中终端执行的方法,该装置的结构如图9所示,包括显示模块901、接收模块902和处理模块903,可选的,还可以包括发送模块904。其中:
若终端900执行图5中的网络页面保存方法时,显示模块901执行步骤501;接收模块902执行步骤502;处理模块903执行步骤503。
若终端900执行图8中的网络页面保存方法时,显示模块901执行步骤801和步骤817;接收模块902执行步骤815;处理模块903执行步骤816;发送模块904执行步骤802。
基于与方法实施例的同一发明构思,本发明实施例提供一种服务器1000,具体用于实现图8所述的实施例中服务器执行的方法,该服务器1000的结构如图10所示,包括接收模块1001、处理模块1002和发送模块1003,其中:
当服务器1000执行图8中的网络页面保存方法时,接收模块1001执行步骤802;处理模块1002执行步骤803、步骤805至810、步骤813;发送模块1003执行步骤804和步骤814至815。
采用硬件实现时,该终端的硬件实现可参考图1及其相关描述。
参见图1,所述终端100,包括:触摸屏150,其中,所述触摸屏150包括触敏表面和显示器;一个或多个处理器101;存储器102;多个应用程序;以及一个或多个计算机程 序,其中所述一个或多个计算机程序被存储在所述存储器102中,所述一个或多个计算机程序包括指令,当所述指令被所述终端100执行时,所述终端100执行本申请实施例中终端100执行的任一可能设计的方法。需要说明的是,该存储器102可以集成于处理器101中,也可以是独立于处理器101之外。
本申请实施例中,触摸屏150可以执行如图9涉及到的显示模块901所执行的方法,处理器101可以执行如图9涉及到的接收模块902、处理模块903和发送模块904所执行的方法。
基于相同构思,参见图11,为本申请实施例提供的一种服务器1100的硬件结构示意图。如图11所示,包括一个或多个处理器1101、存储器1102和收发器1103,图11中以一个处理器1101为例。
其中,所述存储器1102用于存储一个或多个计算机程序;当所述存储器1102存储的一个或多个计算机程序被所述处理器1101执行时,使得所述服务器1100能够实现本申请实施例中服务器110执行的任一可能设计的方法,比如,当服务器执行如图8所示的方法时,收发器1103执行步骤802、步骤804和步骤814至步骤815,处理器1101执行步骤803、步骤805至810、步骤813。需要说明的是,该存储器1102可以集成于处理器1101中,也可以是独立于处理器1101之外。
上述各个实施例中涉及处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的指令,结合其硬件完成上述方法的步骤。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请实施例各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请实施例的保护范围之内,因此本申请实施例的保护范围应以权利要求的保护范围为准。

Claims (13)

  1. 一种网络页面保存方法,其特征在于,包括:
    终端显示第一浏览网页;
    所述终端接收用户的收藏操作,所述收藏操作用于指示终端收藏所述第一浏览网页;
    所述终端响应于所述收藏操作,收藏第二浏览页面,其中,所述第二浏览页面是对所述第一浏览网页进行格式排版处理后得到的。
  2. 如权利要求1所述的方法,其特征在于,所述终端响应于所述收藏操作,收藏第二浏览页面,包括:
    所述终端向服务器发送收藏请求,所述收藏请求用于请求所述服务器对所述第一浏览网页进行格式排版处理,生成所述第二浏览页面,并返回所述第二浏览页面;
    所述终端接收所述服务器返回的所述第二浏览页面;
    所述终端存储所述服务器返回的所述第二浏览页面。
  3. 如权利要求2所述的方法,其特征在于,所述收藏请求包括以下内容:
    所述第一浏览网页对应的文章标题及应用名称;或者,所述第一浏览网页对应的页面地址;或者,所述第一浏览网页对应的文章标题、应用名称及页面地址。
  4. 如权利要求2或3所述的方法,其特征在于,所述终端接收所述服务器返回的所述第二浏览页面,包括:
    所述终端接收所述服务器发送的所述收藏请求对应的信息标识;
    所述终端向所述服务器发送下载请求,所述下载请求包括所述信息标识;
    所述终端接收所述服务器根据所述信息标识返回的所述第二浏览页面。
  5. 如权利要求2至4中任一所述的方法,其特征在于,所述终端向服务器发送收藏请求之后,所述终端存储所述第二浏览页面之前,还包括:
    所述终端接收到所述服务器发送的收藏失败消息;所述收藏失败消息用于通知所述终端所述第二浏览页面获取失败;
    所述终端对所述第一浏览网页进行格式排版处理,得到所述第二浏览页面。
  6. 如权利要求1所述的方法,其特征在于,所述终端响应于所述收藏操作,收藏第二浏览页面,包括:
    所述终端响应于所述收藏操作,对所述第一浏览网页进行格式排版处理,得到所述第二浏览页面;
    所述终端存储所述第二浏览页面。
  7. 如权利要求1至6任一所述的方法,其特征在于,所述终端接收用户的收藏操作,包括:
    所述终端接收用户双指按压方式的收藏操作。
  8. 一种页面保存的图形用户界面GUI,所述图形用户界面存储在终端中,所述终端包括触摸屏、存储器、一个或多个处理器,所述一个或多个处理器用于执行存储在所述存储器中的一个或多个计算机程序,其特征在于,所述图形用户界面包括:
    在所述触摸屏显示第一浏览网页;所述第一浏览网页为第一应用的页面;
    响应于第一操作,在所述触摸屏显示收藏按钮;
    响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页;
    响应于用户查看所述第一浏览网页的第三操作,在所述触摸屏显示第二浏览页面。
  9. 如权利要求8所述的GUI,其特征在于,所述响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页,包括:
    响应于对所述收藏按钮的第二操作,对所述第一浏览网页进行格式排版处理,得到所述第二浏览页面;
    存储所述第二浏览页面。
  10. 如权利要求8所述的GUI,其特征在于,所述响应于对所述收藏按钮的第二操作,收藏所述第一浏览网页,包括:
    响应于对所述收藏按钮的第二操作,所述终端向服务器发送收藏请求,所述收藏请求用于请求所述服务器对所述第一浏览网页进行格式排版处理,生成所述第二浏览页面,并返回所述第二浏览页面给终端;
    所述终端接收所述服务器返回的所述第二浏览页面。
  11. 一种用于网页保存的终端,其特征在于,包括:
    触摸屏,其中,所述触摸屏包括触敏表面和显示器;
    一个或多个处理器;
    存储器;
    多个应用程序;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端执行时,使得所述终端实现如权利要求1至7任一所述的方法。
  12. 一种芯片,其特征在于,所述芯片与终端中的存储器耦合,执行如权利要求1至7任一所述的方法。
  13. 一种计算机存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行如权利要求1至7任一所述的方法。
PCT/CN2018/109899 2018-10-11 2018-10-11 一种网络页面保存方法及终端 WO2020073290A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/109899 WO2020073290A1 (zh) 2018-10-11 2018-10-11 一种网络页面保存方法及终端
CN201880072499.3A CN111316618B (zh) 2018-10-11 2018-10-11 一种网络页面保存方法及终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/109899 WO2020073290A1 (zh) 2018-10-11 2018-10-11 一种网络页面保存方法及终端

Publications (1)

Publication Number Publication Date
WO2020073290A1 true WO2020073290A1 (zh) 2020-04-16

Family

ID=70164180

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109899 WO2020073290A1 (zh) 2018-10-11 2018-10-11 一种网络页面保存方法及终端

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113536164A (zh) * 2021-07-23 2021-10-22 中信银行股份有限公司 页面的收藏与访问方法、装置、电子设备及可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238706B (zh) * 2021-05-10 2023-06-20 北京字跳网络技术有限公司 一种视图展示方法、装置、设备及介质
CN114168022A (zh) * 2021-11-04 2022-03-11 厦门知本家科技有限公司 一种用于户型结构模型编辑的震动反馈系统及方法
CN114117269B (zh) * 2022-01-26 2022-09-20 荣耀终端有限公司 备忘信息收藏方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737121A (zh) * 2012-06-01 2012-10-17 北京奇乐客科技有限公司 一种网页收藏方法、客户端及云平台的服务器
CN103116616A (zh) * 2013-01-28 2013-05-22 东莞宇龙通信科技有限公司 网页收藏方法及通信终端
CN103685514A (zh) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 网页收藏夹中页面的保存方法和浏览器
WO2014153991A1 (en) * 2013-03-28 2014-10-02 Tencent Technology (Shenzhen) Company Limited Browser collection method, system and terminal device, and computer-readable storage medium

Family Cites Families (11)

* 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 (zh) * 2012-03-28 2013-10-23 腾讯科技(深圳)有限公司 网页处理的方法、装置和终端
CN102646135B (zh) * 2012-03-31 2014-01-08 北京奇虎科技有限公司 一种网页收藏方法、装置及系统
CN103020263A (zh) * 2012-12-24 2013-04-03 北京小米科技有限责任公司 一种网页信息的保存方法、装置及终端
CN103064989B (zh) * 2013-02-03 2016-05-04 广州市动景计算机科技有限公司 网页保存、打开方法及装置
CN104239297A (zh) * 2013-06-06 2014-12-24 腾讯科技(北京)有限公司 一种网页收藏方法、系统和装置
CN103699674B (zh) * 2013-12-31 2018-04-13 优视科技有限公司 网页保存、网页打开方法及装置和网页浏览系统
CN104536993B (zh) * 2014-12-10 2018-03-20 北京奇虎科技有限公司 收藏网页的处理方法、收藏网页的处理装置和客户端
CN108153778B (zh) * 2016-12-05 2021-05-14 腾讯科技(深圳)有限公司 网页保存方法、网页读取方法及装置
CN107193975A (zh) * 2017-05-25 2017-09-22 北京小米移动软件有限公司 信息资源收藏方法、装置及计算机可读存储介质
CN107203630B (zh) * 2017-05-31 2020-11-24 北京安云世纪科技有限公司 应用程序页面收藏方法、装置及相应的移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737121A (zh) * 2012-06-01 2012-10-17 北京奇乐客科技有限公司 一种网页收藏方法、客户端及云平台的服务器
CN103116616A (zh) * 2013-01-28 2013-05-22 东莞宇龙通信科技有限公司 网页收藏方法及通信终端
WO2014153991A1 (en) * 2013-03-28 2014-10-02 Tencent Technology (Shenzhen) Company Limited Browser collection method, system and terminal device, and computer-readable storage medium
CN103685514A (zh) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 网页收藏夹中页面的保存方法和浏览器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113536164A (zh) * 2021-07-23 2021-10-22 中信银行股份有限公司 页面的收藏与访问方法、装置、电子设备及可读存储介质
CN113536164B (zh) * 2021-07-23 2024-05-17 中信银行股份有限公司 页面的收藏与访问方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN111316618B (zh) 2021-11-30
CN111316618A (zh) 2020-06-19

Similar Documents

Publication Publication Date Title
US10182101B2 (en) Method, apparatus and system for sharing webpage
WO2020258929A1 (zh) 文件夹界面切换方法及终端设备
US10643021B2 (en) Method and device for processing web page content
US10775979B2 (en) Buddy list presentation control method and system, and computer storage medium
WO2020073290A1 (zh) 一种网络页面保存方法及终端
WO2020259024A1 (zh) 图标分类方法、移动终端及计算机可读存储介质
WO2019184666A1 (zh) 一种显示内容的方法及终端
US20230129384A1 (en) Method for Browsing Application Folder and Electronic Device
CN108255372B (zh) 一种桌面应用图标整理方法及移动终端
WO2019104478A1 (zh) 一种识别截图文字的方法及终端
US11481357B2 (en) Album display method, electronic device, and storage medium
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
WO2015043443A1 (en) Information storage method and apparatus, and communication terminal
WO2020156118A1 (zh) 管理方法及终端设备
WO2020259033A1 (zh) 文件管理方法及终端
WO2015000430A1 (zh) 智能选词的方法和装置
WO2021169954A1 (zh) 搜索方法及电子设备
US20150153921A1 (en) Apparatuses and methods for inputting a uniform resource locator
US10540415B2 (en) Apparatus and method for managing history information in an electronic device
WO2015043405A1 (en) Service processing method, apparatus, and electronic device
WO2020019330A1 (zh) 一种邮件翻译的方法及电子设备
CN108780400B (zh) 数据处理方法及电子设备
WO2020156117A1 (zh) 文件处理方法和装置以及终端
WO2020135272A1 (zh) 信息显示方法及终端设备
WO2019219084A1 (zh) 一种显示控制方法及终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18936701

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18936701

Country of ref document: EP

Kind code of ref document: A1