WO2017219293A1 - 一种获取网页内容的方法及装置 - Google Patents

一种获取网页内容的方法及装置 Download PDF

Info

Publication number
WO2017219293A1
WO2017219293A1 PCT/CN2016/086787 CN2016086787W WO2017219293A1 WO 2017219293 A1 WO2017219293 A1 WO 2017219293A1 CN 2016086787 W CN2016086787 W CN 2016086787W WO 2017219293 A1 WO2017219293 A1 WO 2017219293A1
Authority
WO
WIPO (PCT)
Prior art keywords
webpage
operating system
interface
webpage content
smart terminal
Prior art date
Application number
PCT/CN2016/086787
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 EP16905835.1A priority Critical patent/EP3460675A1/en
Priority to CN201680080539.XA priority patent/CN108604245B/zh
Priority to US16/312,111 priority patent/US10796087B2/en
Priority to PCT/CN2016/086787 priority patent/WO2017219293A1/zh
Publication of WO2017219293A1 publication Critical patent/WO2017219293A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/197Version control

Definitions

  • the present invention relates to the field of terminal technologies, and in particular, to a method and an apparatus for acquiring webpage content.
  • a user needs a smart terminal to recommend useful content for it, and the like.
  • the smart terminal needs to recommend useful content for the user.
  • the smart terminal needs to obtain some necessary content, for example, the smart terminal needs to obtain the webpage content displayed by the display interface when the application (application, APP) installed on the website accesses the website.
  • a commonly used method is to obtain the webpage content displayed by the display interface when the APP accesses the website by analyzing the log and the domain name system (DNS) record recorded by the APP running on the smart terminal.
  • DNS domain name system
  • the APP records logs when it runs, such as logging into the website, exiting the website, clicking actions in the website, and interactions between modules; the operating system of the smart terminal also logs when running, such as the creation of a record APP. And destruction, as well as changes in network status; when the APP visits the website, the operating system of the smart terminal also stores the domain name of the website accessed by the APP and the Internet Protocol (IP) address between the networks of the intelligent terminal.
  • IP Internet Protocol
  • the smart terminal cannot obtain the webpage content displayed by the display interface of the APP runtime.
  • the present application provides a method and apparatus for acquiring webpage content, which enables a smart terminal to acquire webpage content displayed by an APP runtime display interface.
  • the first aspect provides a method for obtaining content of a webpage, the method comprising: determining a webpage view control corresponding to webpage content displayed by a first display interface displayed on a display screen of the smart terminal of the application terminal of the smart terminal;
  • the operating system of the smart terminal registers a webpage content loading completion function; and determines that the operating system invokes the webpage content loading completion function, wherein the operating system invokes the webpage content loading completion function after determining that the webpage content displayed by the webpage view control is loaded And obtaining the webpage content after determining that the operating system invokes the webpage content loading completion function; and transmitting the obtained webpage content to the operating system.
  • the interface displayed by the display screen of the smart terminal may be referred to as the display interface of the smart terminal.
  • the interface currently displayed on the display screen of the smart terminal may be referred to as the current display interface of the smart terminal;
  • the first display interface displayed on the display screen of the smart terminal during the APP running may be referred to as the first display interface of the smart terminal or the like.
  • the webpage content loading completion function is registered to the operating system of the smart terminal, so that the webpage view can be guaranteed.
  • the operating system may respond to the event that the webpage content loading is completed by calling the webpage content loading completion function, that is, determining that the operating system invokes the webpage content loading completion function to determine that the webpage content is loaded.
  • the webpage content is obtained, and the obtained webpage content is sent to the operating system, so that the operating system can obtain the webpage displayed by the display interface of the smart terminal of the APP runtime.
  • the webpage content displayed on the display interface of the smart terminal is the webpage content displayed by the webpage view control in the display interface.
  • the webpage view control corresponding to the webpage content displayed by the first display interface of the smart terminal refers to a webpage view control that is visible to the user in the first display interface.
  • the determining the first display boundary The method for displaying the webpage view control corresponding to the webpage content of the webpage includes: determining an operating system call redrawing notification interface of the smart terminal, wherein the operating system is currently displayed on the display screen of the smart terminal (ie, the current display interface of the smart terminal) Calling the redraw notification interface when the change occurs; and after determining that the operating system calls the redraw notification interface, traversing the control corresponding to the content displayed by the changed first display interface to determine the content of the webpage displayed by the first display interface Web page view control.
  • the smart terminal when the APP is running, when the interface currently displayed on the display screen of the smart terminal (ie, the current display interface of the smart terminal) changes, for example, the current display interface of the smart terminal has been updated to the first display interface, the smart terminal
  • the operating system calls the redrawing notification interface, and the redrawing notification interface (specifically, the code for implementing the redrawing notification interface) is saved in the acquiring device that executes the method for obtaining the webpage content provided by the embodiment of the present invention, so when the operating system calls the heavy
  • the acquiring device can learn that the operating system calls the redraw notification interface, so that the acquiring device can know that the current display interface of the smart terminal changes, and the acquiring device can traverse the content displayed on the first display interface after the change.
  • Corresponding control in which the webpage view control corresponding to the webpage content displayed by the first display interface is determined.
  • the event that the operating system calls the redraw notification interface may be converted into a traversal event, and then the traversal event is executed, that is, traversing the display of the first display interface.
  • the content corresponding control determines a webpage view control corresponding to the webpage content displayed by the first display interface. This can improve the response speed of the first display interface when traversing the first display interface.
  • the webpage view control corresponding to the webpage content displayed by the display interface of the smart terminal of the APP runtime (ie, the first display interface) can be accurately determined, so that the webpage content displayed by the webpage view control can be accurately obtained.
  • the foregoing step is to register a webpage content loading completion function with an operating system of the smart terminal; and determining, by the operating system, the method for loading the webpage content loading completion function comprises: operating an operating system of the smart terminal
  • the webpage registration and callback interface registers a webpage content loading completion function with the operating system; and determines, by the operating system's webpage registration and callback interface, that the operating system invokes the webpage content loading Complete the function.
  • the registering the webpage content loading completion function to the operating system of the smart terminal and determining that the operating system invokes the webpage content loading completion function may be referred to as setting an event callback of the webpage view control.
  • the webpage view control can only set an event callback, and usually the APP can set the event callback of the webpage view control through the webpage view proxy, and obtain the corresponding callback notification and process the callback notification, the application can be operated on the smart terminal.
  • An additional web page registration and callback interface is added to the system, and the event callback of the web view control is set through the web page registration and callback interface. Therefore, since the application does not need to set the event callback of the webpage view control through the webpage view proxy, the problem that the event callback of the webpage view control set by the APP is invalid can be avoided.
  • the method for sending the webpage content displayed by the obtained webpage view control to the operating system of the smart terminal includes: acquiring the interface through the webpage content receiving interface of the operating system The content of the web page is sent to the operating system.
  • the obtained webpage content can be sent to the operating system of the smart terminal through the webpage content receiving interface shared by the plurality of APPs, so that the operating system completes the collection of data generated during the running of the APP.
  • the method for obtaining webpage content displayed by the webpage view control includes: injecting a pre-injection into the webpage view control after determining that the operating system of the smart terminal invokes the webpage content loading completion function a scripting language; execute the scripting language to obtain the content of the webpage.
  • the webpage content displayed by the webpage view control is obtained by injecting a preset scripting language into the webpage view control and executing the scripting language.
  • the smart terminal when the user triggers the running APP to make it necessary to create a new APP interface, the smart terminal can create an APP interface for the APP by calling the creation window function of the operating system of the smart terminal, and when creating the APP interface, The code for implementing the method for obtaining webpage content provided by the embodiment of the present invention is loaded into the running loop of the APP.
  • the operating system of the smart terminal can obtain the webpage content displayed by the display interface of the smart terminal of the APP runtime, that is, the smart terminal acquires the webpage content displayed by the display interface of the smart terminal of the APP runtime.
  • an apparatus for obtaining webpage content comprising a determining module, a registration and callback module, an obtaining module, and a callback processing module.
  • the determining module is configured to determine a webpage view control corresponding to the webpage content displayed by the first display interface displayed by the smart terminal in the smart terminal, and the registration and callback module is configured to load the webpage content into the operating system of the smart terminal. Completing the function, and determining that the operating system calls the webpage content loading completion function, wherein the operating system calls the webpage content loading completion function after determining that the webpage content displayed by the webpage view control determined by the determining module is completed; the obtaining module is used to After the registration and callback module determines that the operating system calls the webpage content loading completion function, the webpage content displayed by the webpage view control is obtained; the callback processing module is configured to send the webpage content acquired by the obtaining module to the operating system.
  • the determining module is specifically configured to determine an operating system call redraw notification interface of the smart terminal, where the operating system is currently displayed on the display screen of the smart terminal (ie, The redraw notification interface is invoked when the current display interface of the smart terminal changes; and after determining that the operating system calls the redraw notification interface, traversing the control corresponding to the content displayed by the changed first display interface to determine the first display The web page view control corresponding to the webpage content displayed on the interface.
  • the foregoing registration and callback module is specifically configured to register a webpage content loading completion function with the operating system through a webpage registration and callback interface of the operating system of the smart terminal, and perform the operation.
  • the webpage registration and callback interface of the system determines that the operating system invokes the webpage content loading completion function.
  • the callback processing module is configured to send, by using a webpage content receiving interface of the operating system of the smart terminal, the webpage content acquired by the obtaining module to the operating system.
  • the acquiring module is specifically configured to determine, by the registration and callback module, that the operating system invokes the loading of the webpage content. After the function, the preset scripting language is injected into the webpage view control, and the scripting language is executed to obtain the webpage content displayed by the webpage view control.
  • an intelligent terminal comprising at least one processor, an interface circuit, a memory, and a system bus.
  • the memory is used to store computer execution instructions, and at least one processor, the interface circuit and the memory are connected to each other through a system bus.
  • at least one processor executes a computer-executed instruction stored in the memory, so that the smart terminal executes the above-mentioned A method of obtaining webpage content as described in any of the various alternative implementations.
  • a computer readable storage medium storing one or more programs, the one or more programs including computer execution instructions, when the at least one processor of the smart terminal executes the computer to execute the instructions
  • the smart terminal performs the method of obtaining webpage content as described in any one of the above first aspects and various alternative implementations thereof.
  • the third aspect, and the fourth aspect refer to the foregoing description of the technical effects of the first aspect and various optional implementations thereof. No longer.
  • FIG. 1 is a schematic structural diagram of an intelligent terminal according to an embodiment of the present disclosure
  • FIG. 2 is a first schematic diagram of a method for acquiring webpage content according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a display interface of a smart terminal according to an embodiment of the present disclosure
  • FIG. 4 is a second schematic diagram of a method for obtaining webpage content according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram 1 of interaction between an operating system and an acquiring device of an intelligent terminal according to an embodiment of the present invention
  • FIG. 6 is a third schematic diagram of a method for acquiring webpage content according to an embodiment of the present invention.
  • FIG. 7 is a second schematic diagram of interaction between an operating system and an acquiring device of an intelligent terminal according to an embodiment of the present disclosure
  • FIG. 8 is a schematic diagram 4 of a method for acquiring webpage content according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram 5 of a method for obtaining webpage content according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an operating system of an intelligent terminal according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of an apparatus for acquiring webpage content according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of hardware of a smart phone according to an embodiment of the present invention.
  • the words “exemplary” or “such as” are used to mean an example, illustration, or illustration. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words “exemplary” or “such as” is intended to present the concepts in a particular manner.
  • a plurality means two or more unless otherwise indicated.
  • a plurality of web page view controls refer to two or more web page view controls;
  • a plurality of APPs refers to two or more apps or the like.
  • the method and device for obtaining webpage content provided by the embodiments of the present invention can be applied to an intelligent terminal.
  • the smart terminal can acquire a lot of information of the user, such as the user's name, age, home address, and preferences (such as music, video, diet, shopping, etc.), and the smart terminal can combine the smart terminal to obtain the user's information.
  • the user uses the actual situation of the smart terminal to recommend some useful content for the user. For example, suppose that around 12 noon, when the smart terminal acquires the user near the food street, the smart terminal can recommend some user-friendly food preferences according to the user's dietary preferences. Food or restaurant; for example, if the smart terminal obtains the user's dietary preference as Sichuan cuisine, the smart terminal can recommend the most Sichuan restaurant in the food street for the user.
  • FIG. 1 is a schematic structural diagram of an intelligent terminal according to an embodiment of the present invention.
  • the smart terminal includes a plurality of APPs, such as a shopping APP 101, a news APP 102, and a communication APP 103, and the like; a content collection module 11, an intelligent analysis module 12, an intelligent scene determination module 13, a smart sensor 14, a geographic location acquisition module 15, and a user history.
  • the content collection module 11 collects data generated when the user uses each APP, and sends the data to the intelligent analysis module 12 for analysis processing.
  • the intelligent analysis module 12 These data are analyzed and processed and saved to the user history database 16.
  • the smart terminal When the user uses an APP, the smart terminal performs unified analysis on the APP, the user history database 16, the state of the smart sensor 14, and the geographic location of the smart terminal acquired by the geographic location obtaining module 15, and obtains the user's use of the smart terminal. In actuality, the smart terminal then combines the user's preferences with the smart recommendation module 17, the smart reminder module 18 or the presentation module 19 to present the user with some content that matches the user's preferences.
  • the smart terminal shown in FIG. 1 When the smart terminal shown in FIG. 1 is actually implemented, the smart terminal needs to acquire data generated when the user uses each APP.
  • HTML hypertext markup language
  • more and more APPs use a hybrid framework.
  • the core implementation of the hybrid framework is that the APP in the smart terminal adopts a web view. HTML to render the display interface.
  • the smart terminal needs to obtain the data generated when the user uses the APP, and the smart terminal needs to obtain the webpage content displayed by the display interface displayed on the display screen of the smart terminal when the user uses the APP (ie, the display of the display screen of the smart terminal).
  • the interface displayed by the display screen of the smart terminal may be referred to as the display interface of the smart terminal.
  • the interface currently displayed by the display screen of the smart terminal to be mentioned in the following embodiments may be referred to as the current display interface of the smart terminal; and the display of the smart terminal at the APP runtime as will be mentioned in the following embodiments
  • the first display interface displayed on the screen may be referred to as a first display interface of the smart terminal or the like.
  • the embodiment of the invention provides a method and device for acquiring webpage content.
  • the executor of the method for obtaining the content of the webpage provided by the embodiment of the present invention may be a device for acquiring the content of the webpage (hereinafter referred to as an obtaining device for convenience of description in the following method embodiment), and the device for obtaining the content of the webpage may be one capable of realizing the obtaining
  • the component, firmware or independent function module of the method of webpage content may also be the component, firmware or function of the content collection module 11 as shown in FIG. 1 or the method integrated in the content collection module 11 capable of realizing the method for acquiring webpage content.
  • the module may also be a smart terminal or a component, a firmware or a function module integrated in the smart terminal, which can implement the method for obtaining the content of the webpage, and may be determined according to the actual use requirement or the application scenario, which is not limited by the embodiment of the present invention.
  • an embodiment of the present invention provides a method for acquiring content of a webpage, where the method includes:
  • the acquiring device determines a webpage view control corresponding to the webpage content displayed by the first display interface.
  • the first display interface is an interface displayed on the display screen of the smart terminal of the application program running in the smart terminal.
  • the APP may be any APP installed on the smart terminal, such as a shopping APP, a news APP, or a communication APP.
  • the above APP running specifically may be that the APP runs in the foreground of the smart terminal.
  • the interface currently displayed on the display screen of the smart terminal ie, the current display interface of the smart terminal
  • the smart terminal After the smart terminal receives the message of the APP, the smart terminal can directly display the message on the interface of the APP (ie, the current display interface of the smart terminal).
  • the current display interface of the smart terminal may continuously change due to the user's trigger on the APP.
  • the smart terminal triggers the obtaining device to perform the method for obtaining webpage content provided by the embodiment of the present invention.
  • the smart terminal triggers the acquiring device to search for the webpage view control in the first display interface displayed on the display screen of the smart terminal, that is, the first display interface of the smart terminal.
  • the obtaining device may determine the webpage view control corresponding to the webpage content displayed by the first display interface. Specifically, the acquiring device may first determine all the controls corresponding to the content displayed by the first display interface of the smart terminal, and then determine, from the controls, the webpage view control corresponding to the webpage content displayed by the first display interface.
  • the display interface of the smart terminal (including the current display interface of the smart terminal and the first display interface of the smart terminal) is an interface displayed on the display screen of the smart terminal, the content displayed on the display interface of the smart terminal corresponds to
  • the control can also be understood as a control in the display interface of the smart terminal.
  • the acquiring device may determine the control in the display interface of the smart terminal according to the coordinates of the control on the display screen of the smart terminal. For example, if the coordinates of a control are within the display screen of the smart terminal, it indicates that the control is a control in the display interface of the smart terminal. After the obtaining device determines the control in the display interface of the smart terminal, the acquiring device determines the webpage view control from the controls.
  • a control is a wrapper around data and methods. Controls can have their own properties and methods. Attributes are simple visitors to the control data. The method is some simple and visible function of the control. Controls usually have text controls, image controls, and web view controls. Among them, the web view control refers to a control that can directly load web content. For example, in some application scenarios, when a text control, a button control, or a picture control is triggered, the APP re-creates a new display interface, and displays the corresponding webpage content through the webpage view control in the display interface.
  • FIG. 3 it is a schematic diagram of a display interface of a smart terminal running smart terminal.
  • the options in the A area such as recommendations, hotspots, local, video, and subscriptions
  • options in the B area such as the home page, videos, topics, and mys
  • Each news message (such as news message 1, news message 2, news message 3, news message 4, and news message 5, etc.) is a text control or a picture control.
  • the APP re-creates a new display interface, and displays the news through the webpage view control in the display interface.
  • the acquiring device registers a webpage content loading completion function with an operating system of the smart terminal.
  • the embodiment of the present invention may not limit the execution order of S101 and S102. That is, in the embodiment of the present invention, S101 may be executed first, and then S102 may be performed; S102 may be executed first, then S101 may be performed; and S101 and S102 may be simultaneously executed.
  • the embodiment of the present invention may perform S102 after executing S101.
  • the acquiring device determines that the operating system invokes the webpage content loading completion function.
  • the operating system calls the webpage content loading completion function after determining that the webpage content displayed by the webpage view control is loaded.
  • the webpage content displayed by the webpage view control is loaded by the APP, so the obtaining device cannot know when the webpage content displayed by the webpage view control is loaded, and the acquiring device needs to register the acquiring device with the operating system of the smart terminal.
  • the internally saved web page content loading completion function Therefore, after the operating system determines that the APP loads the webpage content displayed by the webpage view control, the operating system responds to the event that the webpage content loading is completed, that is, the operating system invokes the webpage content loading completion function.
  • the operating system of the smart terminal can know that the webpage content displayed by the webpage view control is loaded. This event is completed, that is, the operating system of the smart terminal can determine that the webpage content displayed by the webpage view control has been loaded.
  • S102 and S103 adopt an event callback mechanism, that is, the acquiring device registers a function with the operating system of the smart terminal, and the function is only specific.
  • the event is called by the operating system, so that when the operating system calls the function, the acquiring device can know that the specific event occurs.
  • the acquiring device in order to ensure the integrity of the webpage content acquired by the acquiring device in the process of acquiring the webpage content, the acquiring device starts after the webpage content displayed by the webpage view control is completely loaded. Get the content of this page. Therefore, the specific event in the embodiment of the present invention is that the webpage content displayed by the webpage view control has been loaded.
  • the webpage view control is displayed in the webpage view control.
  • the operating system of the smart terminal responds to this specific event, that is, the operating system of the smart terminal calls the webpage content loading completion function.
  • the webpage content loading completion function (specifically, the code for implementing the webpage content loading completion function) is saved in the acquiring device, when the operating system calls the webpage content loading completion function, the acquiring device can learn that the operating system calls the webpage content loading. Completing the function to obtain the device can know that the webpage content displayed by the webpage view control has been loaded.
  • the acquiring device After determining that the operating system invokes the webpage content loading completion function, the acquiring device acquires webpage content displayed by the webpage view control.
  • the obtaining device may determine that the webpage content displayed by the webpage view control has been loaded, so that the obtaining device may start to obtain the webpage content displayed by the webpage view control.
  • the acquiring device sends the acquired content of the webpage to an operating system of the smart terminal.
  • the acquiring device may send the obtained webpage content to the operating system of the smart terminal, that is, the operating system of the smart terminal acquires the webpage view in the display interface of the smart terminal of the APP runtime.
  • the content of the web page displayed by the control is not limited to, the operating system of the smart terminal.
  • the webpage view control in the first display interface may have one or more.
  • the method for obtaining the webpage content displayed by each webpage view control in the plurality of webpage view controls is obtained by the embodiment of the present invention.
  • the method of the content of the webpage is similar, and the embodiment of the present invention is not described in detail.
  • the obtaining device after obtaining the webpage view control in the first display interface displayed on the display screen of the smart terminal when the APP is running, the obtaining device can ensure the webpage view by registering the webpage content loading completion function with the operating system of the smart terminal.
  • the operating system may respond to the event that the webpage content has been loaded by calling the webpage content loading completion function, that is, the obtaining device determines that the operating system calls the webpage content loading completion function to determine The webpage content has been loaded, so that the obtaining device can start to obtain the webpage content after the webpage content is completely loaded, and send the obtained webpage content to the operating system, so that the operating system can acquire the APP runtime intelligence.
  • the webpage content displayed on the display interface of the terminal enables the smart terminal to obtain the webpage content displayed by the APP runtime display interface.
  • the foregoing S101 may specifically include:
  • the acquiring device determines that an operating system of the smart terminal invokes a redraw notification interface.
  • the operating system invokes the redraw notification interface when the current display interface changes, and the current display interface is an interface currently displayed on the display screen of the smart terminal.
  • the acquiring device traverses the control corresponding to the content displayed by the changed first display interface to determine a webpage view control corresponding to the webpage content displayed by the first display interface.
  • the smart The operating system of the terminal invokes the redraw notification interface. Since the redraw notification interface (specifically, the code for implementing the redraw notification interface) is saved inside the acquiring device, when the operating system calls the redraw notification interface, the acquiring device can learn the operation. The system calls the redraw notification interface, so that the device can obtain the change of the current display interface of the smart terminal, and then the device can traverse the control corresponding to the content displayed on the first display interface after the change, to determine the first among the controls. A web page view control corresponding to the webpage content displayed on the display interface.
  • the redraw notification interface specifically, the code for implementing the redraw notification interface
  • S101a and S101b also adopt an event callback mechanism.
  • the registration process in the event callback involved in the embodiment may be increased by inserting the weight in the traversal redraw function 201.
  • the notification notification interface 202 is implemented (such as inserting the interface name of the redraw notification interface 202 into the traversal redraw function 201); on the other hand, in S101a and S101b, the specific event involved in the event callback mechanism is the current display interface of the smart terminal. A change has occurred.
  • the operating system determines that the current display interface of the smart terminal changes, the operating system invokes the redraw notification interface 202, because the redraw notification interface 202 ( Specifically, the code for implementing the redraw notification interface 202 is saved in the internal device. Therefore, when the operating system invokes the redraw notification interface 202, the acquiring device can learn that the operating system invokes the redraw notification interface 202, thereby acquiring the device. It can be known that the current display interface of the smart terminal changes, that is, the operating system can notify the acquiring device by calling the redraw notification interface 202, and the current display interface of the smart terminal changes.
  • control and the webpage view control refer to the related description of the control and the webpage view control in the embodiment shown in FIG. 2, and details are not described herein again.
  • the operating system of the smart terminal may
  • the traversal redraw function 201 is executed to traverse the controls corresponding to the content displayed by the current display interface, calculate the size of the controls, and redraw the display interface of the smart terminal.
  • Components are packages of data and methods. Components can have their own properties and methods.
  • a property is a simple visitor to component data.
  • the method is some simple and visible function of the component.
  • the above control is a kind of component. Specifically, the control is a component having a user interface (UI).
  • UI user interface
  • the acquiring device may operate the operating system.
  • the event of invoking the redraw notification interface is converted into a traversal event, and then the acquiring device executes the traversal event, that is, the acquiring device traverses the control corresponding to the content displayed by the first display interface to determine the webpage corresponding to the webpage content displayed by the first display interface. View control.
  • the method is configured to delay the traversal of the control corresponding to the content displayed by the first display interface after determining that the current display interface of the smart terminal changes (ie, the current display interface is updated to the first display interface), ie,
  • the obtaining device waits for the control corresponding to the content displayed by the first display interface after waiting for the first display interface to be redrawn (ie, refreshed), so that the response speed of the first display interface when the acquiring device traverses the first display interface can be improved.
  • the acquiring device can accurately determine the webpage view control corresponding to the webpage content displayed by the display interface of the smart terminal of the APP runtime (ie, the first display interface), thereby accurately acquiring the webpage content displayed by the webpage view control. .
  • the foregoing S102 and S103 may specifically include:
  • the acquiring device registers a webpage content loading completion function with the operating system through a webpage registration and a callback interface of the operating system of the smart terminal.
  • the acquiring device determines, by using a webpage registration and callback interface of the operating system, the operating system invokes a webpage content loading completion function.
  • the obtaining device registers the webpage content loading completion function with the operating system of the smart terminal, and the obtaining device determines that the operating system invokes the webpage content loading completion function, which may be referred to as an event callback of the acquiring device setting webpage view control.
  • the event callback that is, the description that the acquiring device registers the webpage content loading completion function with the operating system of the smart terminal and the obtaining device determines that the operating system invokes the webpage content loading completion function, refer to the related descriptions of S102 and S103 above. I won't go into details here.
  • the webpage view control can only set one event callback, and usually the APP can set the event callback of the webpage view control through the web view client, and obtain corresponding callback notification and The callback notification is processed. Therefore, in the embodiment of the present invention, in order to prevent the acquisition device from setting the event callback of the webpage view control through the webpage view proxy, the webpage set by the APP is caused.
  • the event callback of the map control is invalid, and an additional webpage registration and callback interface may be added to the operating system of the smart terminal, so that the acquiring device can set the event callback of the webpage view control through the webpage registration and callback interface, that is, as described above in S102a and S103a is shown.
  • the webpage view component 30 in the operating system of the smart terminal includes a webpage view notification interface 301, and the webpage view notification interface 301 provides a webpage registration and callback interface 302 through which the obtaining device can
  • the registration and callback interface 302 sets the event callback of the web view control.
  • the acquiring device can set the event callback of the webpage view control through the webpage registration and callback interface of the operating system of the smart terminal, the obtaining device does not need to set the event callback of the webpage view control through the webpage view proxy, thereby avoiding the APP setting.
  • the problem with the event callback of the web view control is invalid.
  • the foregoing S105 may specifically include:
  • the acquiring device sends the webpage content displayed by the obtained webpage view control to the operating system through the webpage content receiving interface of the operating system of the smart terminal.
  • the acquiring device may send the webpage content acquired by the webpage content receiving interface shared by the multiple APPs to the operating system of the smart terminal, so that the operating system completes the running of the APP. Collection of data.
  • the foregoing S104 may specifically include:
  • the acquiring device injects a preset scripting language into the webpage view control.
  • the acquiring device executes the script language to obtain webpage content displayed by the webpage view control.
  • the obtaining device determines that the operating system of the smart terminal invokes the webpage content loading completion function, it may determine that the webpage content displayed by the webpage view control has been added.
  • the loading is completed so that the fetching device can inject a preset scripting language (JavaScript, JS) into the web view control.
  • the acquiring device injects the preset script language into the webpage view control by using the following statement:
  • the inbound parameter script of the statement is a preset script language, and the script language is used to obtain the webpage content displayed by the webpage view control; the return parameter resultCallback of the statement returns a callback function ValueCallback.
  • the callback function includes the content of the webpage displayed by the obtained webpage view control.
  • the parameter value of the statement is the content of the webpage displayed by the obtained webpage view control.
  • the obtaining device can obtain the webpage content displayed by the webpage view control by injecting a preset scripting language into the webpage view control and executing the scripting language.
  • the smart terminal when the user triggers the running APP to create a new APP interface, the smart terminal first creates an APP interface for the APP by calling a creation window function of the operating system of the smart terminal, and When the APP interface is created, the code of the method for obtaining webpage content provided by the embodiment of the present invention is loaded into the running environment of the APP, so that when the current display interface of the smart terminal changes, the smart terminal triggers the acquiring apparatus to execute the code.
  • a method for obtaining webpage content provided by an embodiment of the present invention is implemented.
  • the APP interface created by the smart terminal includes an interface that has been displayed on the display screen of the smart terminal (for example, the current display interface and the first display interface of the smart terminal in the embodiment of the present invention) and the display screen of the smart terminal are not displayed yet. interface.
  • FIG. 10 it is a schematic structural diagram of an operating system of an intelligent terminal according to an embodiment of the present invention.
  • implementation of the present invention is implemented
  • the code (shown as code X in FIG. 10) of the method for obtaining webpage content provided in the example is stored in the framework layer of the operating system of the smart terminal.
  • the smart terminal can call the above-mentioned creation window function to create an interface of the APP, and create an interface of the APP.
  • the code X is loaded into the running environment of the APP, so that the smart terminal can trigger the acquiring device to execute the code X to obtain the webpage content displayed by the display interface of the smart terminal of the APP runtime, and the content of the webpage is corresponding to the operating system.
  • the interface (for example, the webpage content receiving interface illustrated in FIG. 10) is sent to the operating system, so that the operating system of the smart terminal can obtain the webpage content displayed by the display interface of the smart terminal of the APP runtime without modifying the APP. That is, the smart terminal is required to obtain the webpage content displayed by the display interface of the smart terminal of the APP runtime.
  • the method for obtaining webpage content when the smart terminal invokes the creation window function of the operating system of the smart terminal to create a new APP interface for the APP, the smart terminal can implement the embodiment of the present invention by using the creation window function.
  • the code of the method for obtaining the webpage content is loaded into the running environment of the APP, so that the obtaining device can obtain the display interface of the smart terminal (for example, the first display interface included in the APP interface) by executing the code in the running environment of the APP.
  • the content of the webpage displayed by the webpage view control is sent to the operating system, so that the operating system can obtain the webpage content displayed by the display interface of the smart terminal of the APP runtime, so that the smart terminal can obtain the APP runtime. Display the content of the web page displayed on the interface.
  • an embodiment of the present invention provides an apparatus for acquiring webpage content, where the apparatus is configured to perform the steps performed by the obtaining apparatus in the foregoing method embodiments.
  • the device may include modules corresponding to the respective steps.
  • the apparatus may include a determining module 40, a registration and callback module 41, an obtaining module 42 and a callback processing module 43.
  • the determining module 40 is configured to determine a webpage view control corresponding to the webpage content displayed by the first display interface, where the first display interface is An interface of the display screen of the smart terminal; the registration and callback module 41 is configured to register a webpage content loading completion function with the operating system of the smart terminal, and determine that the operating system invokes the webpage content loading completion function, wherein The operating system invoking the webpage content loading completion function after determining that the webpage content displayed by the webpage view control determined by the determining module 40 is completed; the obtaining module 42 is configured to perform the registration and callback according to the The module 41 determines that the operating system invokes the webpage content loading completion function, and acquires the webpage content; the callback processing module 43 is configured to send the webpage content acquired by the obtaining module 42 to the operating system. .
  • the determining module 40 is specifically configured to determine that the operating system invokes a redraw notification interface, where the operating system invokes the redraw notification interface when the current display interface changes, and the current display interface An interface currently displayed on the display screen of the smart terminal; and after determining that the operating system invokes the redraw notification interface, traversing a control corresponding to the content displayed by the changed first display interface to determine the first A web page view control corresponding to the webpage content displayed on the display interface.
  • the registration and callback module 41 is specifically configured to register, by using a webpage registration and callback interface of the operating system, the webpage content loading completion function to the operating system, and registering through the webpage of the operating system.
  • the callback interface determines that the operating system invokes the webpage content loading completion function.
  • the callback processing module 43 is configured to send the webpage content acquired by the obtaining module 42 to the operating system by using a webpage content receiving interface of the operating system.
  • the obtaining module 42 is configured to: after the registration and callback module 41 determines that the operating system invokes the webpage content loading completion function, inject a preset scripting language into the webpage view control, and execute The scripting language to obtain the webpage content.
  • the determining module, the registration and callback module, the obtaining module, and the callback processing module are all implemented by using at least one processor.
  • the apparatus for acquiring webpage content in this embodiment may correspond to the method for obtaining webpage content in the embodiment shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8, or FIG.
  • the obtaining device, and the division and/or function of each module in the device for acquiring webpage content of the embodiment are all for implementing the method flow shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8, or FIG. In order to avoid repetition, it will not be repeated here.
  • the obtaining device after obtaining the webpage view control in the first display interface displayed on the display screen of the smart terminal when the APP is running, the obtaining device can ensure the webpage view by registering the webpage content loading completion function with the operating system of the smart terminal.
  • the operating system may respond to the event that the webpage content has been loaded by calling the webpage content loading completion function, that is, the obtaining device determines that the operating system calls the webpage content loading completion function to determine The webpage content has been loaded, so that the obtaining device can start to obtain the webpage content after the webpage content is completely loaded, and send the obtained webpage content to the operating system, so that the operating system can acquire the APP runtime intelligence.
  • the webpage content displayed on the display interface of the terminal enables the smart terminal to obtain the webpage content displayed by the APP runtime display interface.
  • the embodiment of the invention provides an intelligent terminal, in which multiple APPs are installed in an operating system of the smart terminal. At least one of the plurality of APPs is displayed in a web page view.
  • the smart terminal includes the above-mentioned apparatus for acquiring webpage content as shown in FIG. 11, and the apparatus can be used to execute the method for acquiring webpage content as shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8, or FIG.
  • the smart terminal may include at least one processor, an interface circuit, a memory, and a system bus.
  • the memory is configured to store a computer execution instruction, and the at least one processor, the interface circuit, and the memory are connected to each other through the system bus and complete communication with each other, when the smart terminal is running, the at least A processor executes the computer-executed instructions stored by the memory to cause the smart terminal to perform a method of acquiring webpage content as shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8, or FIG.
  • the at least A processor executes the computer-executed instructions stored by the memory to cause the smart terminal to perform a method of acquiring webpage content as shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8 or FIG. 9 , and details are not described herein again.
  • the intelligent terminal may be a smart terminal device such as a smart phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
  • the smart terminal is a smart phone as an example for illustration.
  • FIG. 12 is a schematic block diagram showing a part of the structure of the smart phone related to the embodiments of the present invention.
  • the smart phone may specifically include components such as a radio frequency (RF) circuit 50, a memory 51, an input unit 52, a display unit 53, an audio unit 54, a processor 55, a power source 56, and an interface 57.
  • RF radio frequency
  • the structure of the smart phone shown in FIG. 12 does not constitute a limitation on the smart phone, and the smart phone may specifically include more or less components than the components shown in FIG. 12, or combine some of them. These components, or different components, are distributed in different locations.
  • the processor 55 may be the at least one processor described above; the memory 51 may be the above-mentioned memory; the RF circuit 50, the input unit 52, the display unit 53, the audio unit 54, the power source 56, and the interface 57 may be the interface circuits described above; The wiring connecting these components in Fig. 12 may be the above-described system bus.
  • the RF circuit 50 can be used for receiving and transmitting signals during transmission and reception of information or during a call, in particular, after receiving the downlink signal, processing to the processor 55; in addition, transmitting the uplink signal.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • RF circuitry 50 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code) Division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), e-mail, short messaging service (SMS), and the like.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • code code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • SMS short messaging service
  • the memory 51 can be used to store software programs and modules, and the processor 55 executes various functional applications and signal processing of the smartphone by running software programs and modules stored in the memory 51.
  • the memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system of the smart phone, an application required for at least one function (such as a sound playing function, an image playing function, etc.); and the storage data area may be Stores data created based on the use of the smartphone (such as audio data, image data, phone book, etc.).
  • the memory 51 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 52 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the smartphone.
  • input unit 52 may include touch screen 521 and other input devices 522.
  • the touch screen 521 also referred to as a touch panel, can collect touch operations on or near the user (such as the operation of the user using a finger, a stylus, or the like on the touch screen 521 or near the touch screen 521), and The corresponding connecting device is driven according to a preset program.
  • the touch screen 521 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 55 is provided and can receive commands from the processor 55 and execute them.
  • the touch screen 521 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • Other input devices 522 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 53 can be used to display information input by the user or information provided to the user as well as various menus of the smartphone.
  • the display unit 53 can include a display panel 531.
  • the display panel 531 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen 521 can cover the display panel 531, and when the touch screen 521 detects a touch operation on or near it, it is transmitted to the processor 55 to determine a touch event. The type, then processor 55 provides a corresponding visual output on display panel 531 depending on the type of touch event.
  • the touch screen 521 and the display panel 531 are implemented as two separate components to implement the input and output functions of the smartphone, in some embodiments, the touch screen 521 can be integrated with the display panel 531 to implement intelligence. The input and output functions of the phone.
  • the audio unit 54 includes an audio circuit 541, a speaker 542, and a microphone 543.
  • the audio unit 54 can provide an audio interface between the user and the smartphone.
  • the audio circuit 541 can transmit the converted electrical data of the received audio data to the speaker 542 for conversion to the sound signal output by the speaker 542; on the other hand, the microphone 543 converts the collected sound signal into an electrical signal by the audio circuit 541. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 50 for transmission to, for example, another smartphone, or the audio data is output to the memory 51 for further processing.
  • the processor 55 is a control center of the smartphone, and connects various parts of the entire smartphone using various interfaces and lines, and executes by executing or executing software programs and modules stored in the memory 51, and calling data stored in the memory 51.
  • the processor 55 may include one or more processing units; preferably, the processor 55 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 55.
  • the smart phone also includes a power source 56 (such as a battery) that supplies power to the various components.
  • a power source 56 such as a battery
  • the power source can be logically coupled to the processor 55 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the interface 57 can be used to connect with other devices and transmit data between the smartphone and other devices.
  • the smart phone may also include a wireless fidelity (WiFi) module, a Bluetooth module, and the like, which are not shown in FIG. 12, and details are not described herein again.
  • WiFi wireless fidelity
  • Bluetooth Bluetooth
  • the embodiment of the invention further provides a computer readable storage medium, the computer readable storage
  • One or more programs are stored in the storage medium, and the one or more programs include computer execution instructions.
  • the smart terminal performs the above-mentioned FIG. 2, FIG. 4, FIG.
  • the method of obtaining webpage content shown in FIG. 8 or FIG. For a specific method for obtaining the content of the webpage, refer to the related description in the embodiment shown in FIG. 2, FIG. 4, FIG. 6, FIG. 8 or FIG. 9 , and details are not described herein again.
  • the device for registering the webpage content is completed by registering the webpage with the operating system of the smart terminal.
  • the function can ensure that when the webpage content displayed by the webpage view control is completely loaded, the operating system can respond to the event that the webpage content has been loaded by calling the webpage content loading completion function, that is, the device that obtains the webpage content determines the operating system.
  • the webpage content loading completion function is called to determine that the webpage content has been loaded, so that the obtaining device can start acquiring the webpage content after the webpage content is completely loaded, and send the obtained webpage content to the operating system.
  • the operating system can obtain the webpage content displayed by the display interface of the APP runtime smart terminal, so that the smart terminal can obtain the webpage content displayed by the APP runtime display interface.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • Another point, the mutual coupling or direct coupling shown or discussed The or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
  • 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例提供一种获取网页内容的方法及装置,涉及终端技术领域,能够使得智能终端获取APP运行时显示界面显示的网页内容。该方法包括:确定第一显示界面显示的网页内容对应的网页视图控件,第一显示界面为智能终端中的APP运行时智能终端的显示屏幕显示的界面;向智能终端的操作系统注册网页内容加载完成函数;确定该操作系统调用网页内容加载完成函数,其中,操作系统在确定网页视图控件显示的网页内容加载完成之后调用网页内容加载完成函数;在确定操作系统调用网页内容加载完成函数之后,获取该网页内容;将获取的该网页内容发送给该操作系统。

Description

一种获取网页内容的方法及装置 技术领域
本发明涉及终端技术领域,尤其涉及一种获取网页(web)内容的方法及装置。
背景技术
随着智能终端的不断发展,用户对智能终端的需求越来越高。例如用户需要智能终端为其推荐有用的内容等。智能终端为用户推荐有用的内容,首先需要智能终端获取一些必要的内容,例如需要智能终端获取其上安装的应用程序(application,APP)访问网站时显示界面显示的网页内容等。
一种常用的方式是,智能终端通过分析其上安装的APP运行时记录的日志和域名系统(domain name system,DNS)记录来获取APP访问网站时显示界面显示的网页内容。通常,APP在运行时会记录日志,如记录进入网站、退出网站、网站中的点击动作以及各个模块之间的交互等;智能终端的操作系统在运行时也会记录日志,如记录APP的创建和销毁,以及网络状态的变化等;APP在访问网站时,智能终端的操作系统还会保存APP访问的网站的域名和智能终端的网络之间互连的协议(Internet protocol,IP)地址之间的映射关系,即DNS记录。
然而,由于上述日志的内容通常不会涉及网站的内容或者甚至有的APP并不会记录日志;且DNS记录也只能反映APP访问了哪些网站,而无法反映APP访问这些网站时显示界面显示的网页内容,因此通过上述方式,智能终端无法获取APP运行时显示界面显示的网页内容。
发明内容
本申请提供一种获取网页内容的方法及装置,能够使得智能终端获取APP运行时显示界面显示的网页内容。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种获取网页内容的方法,该方法包括:确定智能终端中的应用程序APP运行时智能终端的显示屏幕显示的第一显示界面显示的网页内容对应的网页视图控件;并向智能终端的操作系统注册网页内容加载完成函数;且确定该操作系统调用该网页内容加载完成函数,其中,该操作系统在确定该网页视图控件显示的网页内容加载完成之后调用该网页内容加载完成函数;以及在确定操作系统调用网页内容加载完成函数之后,获取该网页内容;并将获取的该网页内容发送给该操作系统。
为了方便描述,本申请中,智能终端的显示屏幕显示的界面可以称为智能终端的显示界面。例如,智能终端的显示屏幕当前显示的界面可以称为智能终端的当前显示界面;在APP运行时智能终端的显示屏幕显示的第一显示界面可以称为智能终端的第一显示界面等。
本申请中,在确定APP运行时智能终端的显示屏幕显示的第一显示界面显示的网页内容对应的网页视图控件后,通过向智能终端的操作系统注册网页内容加载完成函数,可以保证当网页视图控件显示的网页内容全部加载完成后,该操作系统可以通过调用该网页内容加载完成函数响应该网页内容加载完成这一事件,即确定操作系统调用网页内容加载完成函数即可确定该网页内容已加载完成,从而可以保证在该网页内容全部加载完成之后才开始获取该网页内容,并将获取的该网页内容发送给该操作系统,如此该操作系统可以获取APP运行时智能终端的显示界面显示的网页内容,从而使得智能终端能够获取APP运行时显示界面显示的网页内容。
本申请中,智能终端的显示界面显示的网页内容即为显示界面中网页视图控件显示的网页内容。另外,上述智能终端的第一显示界面显示的网页内容对应的网页视图控件是指第一显示界面中中对用户可见的网页视图控件。
在第一方面的第一种可选的实现方式中,上述确定第一显示界 面显示的网页内容对应的网页视图控件的方法包括:确定智能终端的操作系统调用重绘通知接口,其中,该操作系统在智能终端的显示屏幕当前显示的界面(即智能终端的当前显示界面)发生变化时调用重绘通知接口;并在确定该操作系统调用重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定第一显示界面显示的网页内容对应的网页视图控件。
本申请中,APP运行时,当智能终端的显示屏幕当前显示的界面(即智能终端的当前显示界面)发生变化,例如智能终端的当前显示界面已被更新为第一显示界面时,智能终端的操作系统调用重绘通知接口,由于重绘通知接口(具体为实现重绘通知接口的代码)保存在执行本发明实施例提供的获取网页内容的方法的获取装置内部,因此当操作系统调用该重绘通知接口时,获取装置即可获知操作系统调用该重绘通知接口,从而获取装置即可获知智能终端的当前显示界面发生变化,进而获取装置可遍历发生变化后的第一显示界面显示的内容对应的控件,以在这些控件中确定第一显示界面显示的网页内容对应的网页视图控件。
本申请中,在确定智能终端的操作系统调用重绘通知接口之后,可将操作系统调用重绘通知接口这一事件转换为遍历事件,然后再执行该遍历事件,即遍历第一显示界面显示的内容对应的控件,以确定第一显示界面显示的网页内容对应的网页视图控件。如此可以提升遍历第一显示界面时,第一显示界面的响应速度。
由于获取装置可以准确地确定APP运行时智能终端的显示界面(即上述第一显示界面)显示的网页内容对应的网页视图控件,从而能够准确地获取该网页视图控件显示的网页内容。
在第一方面的第二种可选的实现方式中,上述向智能终端的操作系统注册网页内容加载完成函数;确定该操作系统调用该网页内容加载完成函数的方法包括:通过智能终端的操作系统的网页注册及回调接口向该操作系统注册网页内容加载完成函数;并通过该操作系统的网页注册及回调接口确定该操作系统调用该网页内容加载 完成函数。
其中,上述向智能终端的操作系统注册网页内容加载完成函数和确定该操作系统调用该网页内容加载完成函数可以称为设置网页视图控件的事件回调。
由于网页视图控件只能设置一个事件回调,且通常APP可以通过网页视图代理设置网页视图控件的事件回调,并得到相应的回调通知以及对该回调通知进行处理,因此本申请可以在智能终端的操作系统中额外增加一个网页注册及回调接口,并通过该网页注册及回调接口设置网页视图控件的事件回调。如此由于本申请无需再通过网页视图代理设置网页视图控件的事件回调,因此可以避免APP设置的网页视图控件的事件回调失效的问题。
在第一方面的第三种可选的实现方式中,上述将获取的网页视图控件显示的网页内容发送给智能终端的操作系统的方法包括:通过该操作系统的网页内容接收接口,将获取的该网页内容发送给该操作系统。
本申请中,可以通过多个APP共用的网页内容接收接口将获取到的网页内容发送给智能终端的操作系统,从而使得操作系统完成对APP运行时产生的数据的收集。
在第一方面的第四种可选的实现方式中,上述获取网页视图控件显示的网页内容的方法包括:在确定智能终端的操作系统调用网页内容加载完成函数之后,向网页视图控件中注入预设的脚本语言;执行该脚本语言,以获取该网页内容。
本申请中,可以在确定智能终端的操作系统调用网页内容加载完成函数之后,通过向网页视图控件中注入预设的脚本语言,并执行该脚本语言获取该网页视图控件显示的网页内容。
本申请中,当用户触发正在运行的APP以使得需要创建一个新的APP界面时,智能终端可以通过调用智能终端的操作系统的创建窗口函数,为APP创建APP界面,并在创建APP界面时将实现本发明实施例提供的获取网页内容的方法的代码加载到APP的运行环 境中。如此可以在不对APP进行修改的情况下,保证智能终端的操作系统获取APP运行时智能终端的显示界面显示的网页内容,即保证智能终端获取APP运行时智能终端的显示界面显示的网页内容。
第二方面,提供一种获取网页内容的装置,该装置包括确定模块、注册及回调模块、获取模块和回调处理模块。
其中,确定模块用于确定智能终端中的应用程序APP运行时智能终端显示的第一显示界面显示的网页内容对应的网页视图控件;注册及回调模块用于向智能终端的操作系统注册网页内容加载完成函数,并确定该操作系统调用该网页内容加载完成函数,其中,该操作系统在确定该确定模块确定的网页视图控件显示的网页内容加载完成之后调用该网页内容加载完成函数;获取模块用于在注册及回调模块确定该操作系统调用该网页内容加载完成函数之后,获取网页视图控件显示的网页内容;回调处理模块用于将获取模块获取的网页内容发送给该操作系统。
在第二方面的第一种可选的实现方式中,上述确定模块具体用于确定智能终端的操作系统调用重绘通知接口,其中,该操作系统在智能终端的显示屏幕当前显示的界面(即智能终端的当前显示界面)发生变化时调用重绘通知接口;并在确定该操作系统调用重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定第一显示界面显示的网页内容对应的网页视图控件。
在第二方面的第二种可选的实现方式中,上述注册及回调模块具体用于通过智能终端的操作系统的网页注册及回调接口向该操作系统注册网页内容加载完成函数,并通过该操作系统的网页注册及回调接口确定该操作系统调用该网页内容加载完成函数。
在第二方面的第三种可选的实现方式中,上述回调处理模块具体用于通过智能终端的操作系统的网页内容接收接口,将获取模块获取的网页内容发送给该操作系统。
在第二方面的第四种可选的实现方式中,上述获取模块具体用于在注册及回调模块确定确定该操作系统调用该网页内容加载完成 函数之后,向网页视图控件中注入预设的脚本语言,并执行该脚本语言,以获取该网页视图控件显示的网页内容。
第三方面,提供一种智能终端,该智能终端包括至少一个处理器、接口电路、存储器和系统总线。其中,存储器用于存储计算机执行指令,至少一个处理器、接口电路和存储器通过系统总线相互连接,当智能终端运行时,至少一个处理器执行存储器存储的计算机执行指令,以使智能终端执行上述第一方面及其各种可选的实现方式中任意一项所述的获取网页内容的方法。
第四方面,提供一种计算机可读存储介质,计算机可读存储介质中存储有一个或多个程序,一个或多个程序包括计算机执行指令,当智能终端的至少一个处理器执行该计算机执行指令时,智能终端执行上述第一方面及其各种可选的实现方式中任意一项所述的获取网页内容的方法。
上述第二方面及其各种可选的实现方式、第三方面和第四方面的技术效果具体可参见上述对第一方面及其各种可选的实现方式的技术效果的相关描述,此处不再赘述。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例。
图1为本发明实施例提供的智能终端的结构示意图;
图2为本发明实施例提供的获取网页内容的方法示意图一;
图3为本发明实施例提供的智能终端的显示界面的示意图;
图4为本发明实施例提供的获取网页内容的方法示意图二;
图5为本发明实施例提供的智能终端的操作系统与获取装置之间的交互示意图一;
图6为本发明实施例提供的获取网页内容的方法示意图三;
图7为本发明实施例提供的智能终端的操作系统与获取装置之间的交互示意图二;
图8为本发明实施例提供的获取网页内容的方法示意图四;
图9为本发明实施例提供的获取网页内容的方法示意图五;
图10为本发明实施例提供的一种智能终端的操作系统的架构示意图;
图11为本发明实施例提供的获取网页内容的装置的结构示意图;
图12为本发明实施例提供的智能手机的硬件示意图。
具体实施方式
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本发明的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个网页视图控件是指两个或两个以上的网页视图控件;多个APP是指两个或两个以上的APP等。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。
本发明实施例提供的获取网页内容的方法及装置可以应用于智能终端中。该智能终端可以获取用户的很多信息,例如用户的姓名、年龄、家庭住址以及喜好(如音乐、视频、饮食和购物等)等,在智能终端获取用户的这些信息的基础上,智能终端可以结合用户使用该智能终端的实际情况,为用户推荐一些有用的内容。例如,假设在中午12点左右,当智能终端获取用户处于美食街附近时,智能终端可以根据用户的饮食喜好为用户推荐一些符合用户饮食喜好的 食物或饭店;例如假设智能终端获取用户的饮食喜好为川菜,那么智能终端可以为用户推荐美食街中点评最高的几家川菜馆。
如图1所示,为本发明实施例提供的一种智能终端的结构示意图。该智能终端包括多个APP,例如购物APP 101、新闻APP 102和通讯APP 103等;内容收集模块11、智能分析模块12、智能场景判断模块13、智能传感器14、地理位置获取模块15、用户历史数据库16、智能推荐模块17、智能提醒模块18以及呈现模块19。如图1所示,用户在使用每个APP时,可以由内容收集模块11收集用户使用每个APP时产生的数据,并将这些数据发送给智能分析模块12进行分析处理,智能分析模块12对这些数据进行分析处理后将这些数据保存到用户历史数据库16中。当用户使用某个APP时,智能终端会对该APP、用户历史数据库16、智能传感器14的状态以及地理位置获取模块15获取的智能终端的地理位置等进行统一分析,得到用户使用该智能终端的实际情况,然后智能终端再结合用户的喜好,通过智能推荐模块17、智能提醒模块18或者呈现模块19向用户呈现符合用户喜好的一些内容。
在如图1所示的智能终端实际实现时,智能终端需要获取用户使用每个APP时产生的数据。而随着超文本标记语言(hyper text markup language,HTML)5技术的发展,越来越多的APP使用混合框架,混合框架的核心实现就是智能终端中的APP采用网页视图(web view),通过HTML来呈现显示界面。在这种场景中,智能终端要获取用户使用APP时产生的数据,智能终端就需要获取用户使用APP时智能终端的显示屏幕显示的显示界面显示的网页内容(即智能终端的显示屏幕显示的显示界面中的网页视图控件显示的网页内容)。
为了方便描述,本发明实施例中,智能终端的显示屏幕显示的界面可以称为智能终端的显示界面。例如,下述实施例中将要提及的智能终端的显示屏幕当前显示的界面可以称为智能终端的当前显示界面;并且下述实施例中将要提及的在APP运行时智能终端的显 示屏幕显示的第一显示界面可以称为智能终端的第一显示界面等。
为了使得智能终端获取用户使用APP(或者APP运行)时智能终端的显示界面显示的网页内容,本发明实施例提供一种获取网页内容的方法及装置。
本发明实施例提供的获取网页内容的方法的执行主体可以是获取网页内容的装置(以下方法实施例中为了方便描述均简称为获取装置),该获取网页内容的装置可以是一个能够实现该获取网页内容的方法的组件、固件或者独立功能模块,也可以是上述如图1所示的内容收集模块11或者集成在内容收集模块11中的能够实现该获取网页内容的方法的组件、固件或者功能模块,还可以是智能终端或者集成在智能终端中的能够实现该获取网页内容的方法的组件、固件或者功能模块,具体的可以根据实际使用需求或应用场景确定,本发明实施例不作限定。
如图2所示,本发明实施例提供一种获取网页内容的方法,该方法包括:
S101、获取装置确定第一显示界面显示的网页内容对应的网页视图控件。
其中,该第一显示界面为智能终端中的应用程序APP运行时智能终端的显示屏幕显示的界面。
本发明实施例中,上述APP可以为智能终端上安装的任意一个APP,例如购物APP、新闻APP或者通讯APP等。
上述APP运行具体可以为APP在智能终端的前台运行。例如,如果智能终端的显示屏幕当前显示的界面(即智能终端的当前显示界面)为某个APP的界面,则表示该APP为在智能终端的前台运行的APP。对于智能终端的前台运行的APP,智能终端接收到该APP的消息之后,智能终端可直接将该消息显示在该APP的界面(即智能终端的当前显示界面)上。
当用户使用APP,即APP运行时,由于用户对APP的触发,智能终端的当前显示界面可能会不断的发生变化。本发明实施例中, 一旦智能终端的当前显示界面发生变化,智能终端就会触发获取装置执行本发明实施例提供的获取网页内容的方法。具体的,当智能终端的当前显示界面发生变化时,智能终端就会触发获取装置在智能终端的显示屏幕上显示的第一显示界面(即智能终端的第一显示界面)中查找网页视图控件,当获取装置在第一显示界面中查找到第一显示界面显示的网页内容对应的网页视图控件后,获取装置则可以确定第一显示界面显示的网页内容对应的网页视图控件。具体的,获取装置可以先确定智能终端的第一显示界面显示的内容对应的所有控件,然后再从这些控件中确定第一显示界面显示的网页内容对应的网页视图控件。
本发明实施例中,由于智能终端的显示界面(包括智能终端的当前显示界面和智能终端的第一显示界面)为智能终端的显示屏幕显示的界面,因此智能终端的显示界面显示的内容对应的控件也可以理解为智能终端的显示界面中的控件。
可选的,本发明实施例中,获取装置可以根据控件在智能终端的显示屏幕上的坐标确定智能终端的显示界面中的控件。例如,若某个控件的坐标在智能终端的显示屏幕范围内,则表示该控件为智能终端的显示界面中的控件。获取装置确定出智能终端的显示界面中的控件之后,获取装置再从这些控件中确定出网页视图控件。
控件是对数据和方法的封装。控件可以有自己的属性和方法。属性是控件数据的简单访问者。方法则是控件的一些简单且可见的功能。控件通常有文本控件、图片控件以及网页视图控件等。其中,网页视图控件是指能够直接加载网页内容的控件。例如,某些应用场景中,当触发某个文本控件、按钮控件或者图片控件时,APP会重新创建一个新的显示界面,并在该显示界面中通过网页视图控件显示相应的网页内容。
如图3所示,为新闻APP运行时智能终端的显示界面的示意图。在图3中,A区域中的选项(如推荐、热点、本地、视频及订阅等)、B区域中的选项(如首页、视频、话题及我的等)以及C区域中的 各条新闻消息(如新闻消息1、新闻消息2、新闻消息3、新闻消息4及新闻消息5等)均为文本控件或者图片控件。当用户需要阅读C区域中的某条新闻消息,例如新闻消息1时,该条新闻消息被触发,此时APP会重新创建一个新的显示界面,并在该显示界面中通过网页视图控件显示新闻消息1对应的网页内容。
S102、获取装置向智能终端的操作系统注册网页内容加载完成函数。
可选的,本发明实施例可以不限定S101和S102的执行顺序。即本发明实施例可以先执行S101,后执行S102;也可以先执行S102,后执行S101;还可以同时执行S101和S102。
优选的,为了节省获取装置和智能终端的资源,本发明实施例可以在执行S101之后再执行S102。
S103、获取装置确定该操作系统调用该网页内容加载完成函数。
其中,操作系统在确定网页视图控件显示的网页内容加载完成之后调用该网页内容加载完成函数。
由于APP采用网页视图进行显示时,由APP加载网页视图控件显示的网页内容,因此获取装置无法获知网页视图控件显示的网页内容何时加载完成,从而获取装置需要向智能终端的操作系统注册获取装置内部保存的网页内容加载完成函数。从而当操作系统确定APP将网页视图控件显示的网页内容加载完成之后,操作系统会对网页内容加载完成这一事件作出响应,即操作系统调用该网页内容加载完成函数。
本领域技术人员可以理解,由于APP运行在智能终端的操作系统上,因此当APP加载完成网页视图控件显示的网页内容之后,智能终端的操作系统即可以获知该网页视图控件显示的网页内容已加载完成这一事件,即智能终端的操作系统可以确定该网页视图控件显示的网页内容已加载完成。
需要说明的是,上述S102和S103采用的是事件回调机制,即获取装置向智能终端的操作系统注册一个函数,这个函数只在特定 事件发生时才由操作系统调用,从而当操作系统调用该函数时,获取装置即可获知该特定事件发生。
结合上述事件回调机制,本发明实施例中,为了在获取网页内容的过程中,保证获取装置获取到的网页内容的完整性,当网页视图控件显示的网页内容全部加载完成后,获取装置才开始获取该网页内容。因此本发明实施例中的特定事件是网页视图控件显示的网页内容已加载完成,当获取装置向智能终端的操作系统注册上述获取装置内部保存的网页内容加载完成函数之后,在该网页视图控件显示的网页内容已加载完成时,智能终端的操作系统会对这一特定事件作出响应,即智能终端的操作系统调用该网页内容加载完成函数。由于该网页内容加载完成函数(具体为实现网页内容加载完成函数的代码)保存在获取装置内部,因此当操作系统调用该网页内容加载完成函数时,获取装置即可获知操作系统调用该网页内容加载完成函数,从而获取装置即可获知该网页视图控件显示的网页内容已加载完成。
S104、获取装置在确定该操作系统调用该网页内容加载完成函数之后,获取网页视图控件显示的网页内容。
获取装置确定智能终端的操作系统调用网页内容加载完成函数之后,获取装置可以确定上述网页视图控件显示的网页内容已加载完成,从而获取装置可以开始获取该网页视图控件显示的网页内容。
S105、获取装置将获取的该网页内容发送给智能终端的操作系统。
获取装置获取到网页视图控件显示的网页内容之后,获取装置可以将获取的该网页内容发送给智能终端的操作系统,即智能终端的操作系统获取到APP运行时智能终端的显示界面中的网页视图控件显示的网页内容。
可选的,本发明实施例中,第一显示界面中的网页视图控件可以有一个,也可以有多个。具体的,获取多个网页视图控件中每个网页视图控件显示的网页内容的方法均与本发明实施例提供的获取 网页内容的方法类似,本发明实施例不再详述。
本发明实施例中,获取装置在确定APP运行时智能终端的显示屏幕显示的第一显示界面中的网页视图控件后,通过向智能终端的操作系统注册网页内容加载完成函数,可以保证当网页视图控件显示的网页内容全部加载完成后,该操作系统可以通过调用该网页内容加载完成函数响应该网页内容已加载完成这一事件,即获取装置确定该操作系统调用该网页内容加载完成函数即可确定该网页内容已加载完成,从而可以保证获取装置在该网页内容全部加载完成之后才开始获取该网页内容,并将获取的该网页内容发送给该操作系统,如此该操作系统可以获取APP运行时智能终端的显示界面显示的网页内容,从而使得智能终端能够获取APP运行时显示界面显示的网页内容。
可选的,结合图2,如图4所示,本发明实施例提供的获取网页内容的方法中,上述S101具体可以包括:
S101a、获取装置确定智能终端的操作系统调用重绘通知接口。
其中,该操作系统在当前显示界面发生变化时调用该重绘通知接口,当前显示界面为智能终端的显示屏幕当前显示的界面。
S101b、获取装置在确定该操作系统调用该重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定第一显示界面显示的网页内容对应的网页视图控件。
本发明实施例中,APP运行时,当智能终端的显示屏幕当前显示的界面(即智能终端的当前显示界面)发生变化,例如智能终端的当前显示界面已被更新为第一显示界面时,智能终端的操作系统调用重绘通知接口,由于重绘通知接口(具体为实现重绘通知接口的代码)保存在获取装置内部,因此当操作系统调用该重绘通知接口时,获取装置即可获知操作系统调用该重绘通知接口,从而获取装置即可获知智能终端的当前显示界面发生变化,进而获取装置可遍历发生变化后的第一显示界面显示的内容对应的控件,以在这些控件中确定第一显示界面显示的网页内容对应的网页视图控件。
需要说明的是,S101a和S101b采用的也是事件回调机制。具体的,对于事件回调机制的描述可参见上述实施例中对S102和S103的相关描述,此处不再赘述。与S102和S103不同的是:一方面,本发明实施例中,如图5所示,本实施例中所涉及到的事件回调中的注册过程可以通过在上述遍历重绘函数201中增加插入重绘通知接口202实现(比如将该重绘通知接口202的接口名称插入遍历重绘函数201中);另一方面,S101a和S101b中,事件回调机制中涉及的特定事件为智能终端的当前显示界面发生变化。
结合上述事件回调机制,本发明实施例中,如图5所示,当操作系统确定智能终端的当前显示界面发生变化时,操作系统调用该重绘通知接口202,由于该重绘通知接口202(具体为实现该重绘通知接口202的代码)保存在获取装置内部,因此当操作系统调用该重绘通知接口202时,获取装置即可获知操作系统调用了该重绘通知接口202,从而获取装置即可获知智能终端的当前显示界面发生变化,即操作系统通过调用该重绘通知接口202可以通知获取装置,智能终端的当前显示界面发生变化。
对于控件和网页视图控件的描述具体可以参见上述如图2所示的实施例中对控件和网页视图控件的相关描述,此处不再赘述。
本发明实施例在具体实现时,示例性的,如图5所示,当智能终端的当前显示界面发生变化时,智能终端的操作系统(具体可以为该操作系统中的窗口组件20)还会执行遍历重绘函数201,以遍历当前显示界面显示的内容对应的控件、计算这些控件的大小以及重绘智能终端的显示界面。
组件是对数据和方法的封装。组件可以有自己的属性和方法。属性是组件数据的简单访问者。方法则是组件的一些简单且可见的功能。上述控件是组件的一种,具体的,控件是具有用户界面(user interface,UI)的一种组件。
可选的,本发明实施例中,结合上述S101b,获取装置确定智能终端的操作系统调用重绘通知接口之后,获取装置可将操作系统 调用重绘通知接口这一事件转换为遍历事件,然后获取装置再执行该遍历事件,即获取装置遍历第一显示界面显示的内容对应的控件,以确定第一显示界面显示的网页内容对应的网页视图控件。该方法与上述S101b相比,由于获取装置在确定智能终端的当前显示界面发生变化(即当前显示界面更新为第一显示界面)之后,会延迟遍历第一显示界面显示的内容对应的控件,即获取装置在等待第一显示界面重绘(即刷新)完成之后再遍历第一显示界面显示的内容对应的控件,如此可以提升获取装置遍历第一显示界面时,第一显示界面的响应速度。
通过上述方法,由于获取装置可以准确地确定APP运行时智能终端的显示界面(即上述第一显示界面)显示的网页内容对应的网页视图控件,从而能够准确地获取该网页视图控件显示的网页内容。
可选的,结合图2,如图6所示,本发明实施例提供的获取网页内容的方法中,上述S102和S103具体可以包括:
S102a、获取装置通过智能终端的操作系统的网页注册及回调接口向该操作系统注册网页内容加载完成函数。
S103a、获取装置通过该操作系统的网页注册及回调接口确定该操作系统调用网页内容加载完成函数。
其中,获取装置向智能终端的操作系统注册网页内容加载完成函数和获取装置确定该操作系统调用该网页内容加载完成函数可以称为获取装置设置网页视图控件的事件回调。具体的,对于事件回调,即获取装置向智能终端的操作系统注册网页内容加载完成函数和获取装置确定该操作系统调用该网页内容加载完成函数的描述可参见上述对S102和S103的相关描述,此处不再赘述。
本发明实施例在具体实现时,由于网页视图控件只能设置一个事件回调,且通常APP可以通过网页视图代理(web view client)设置网页视图控件的事件回调,并得到相应的回调通知以及对该回调通知进行处理,因此本发明实施例中,为了避免获取装置通过网页视图代理设置网页视图控件的事件回调而导致APP设置的网页视 图控件的事件回调失效的问题,可以在智能终端的操作系统中额外增加一个网页注册及回调接口,从而获取装置可以通过该网页注册及回调接口设置网页视图控件的事件回调,即如上述S102a和S103a所示。
示例性的,如图7所示,智能终端的操作系统中的网页视图组件30中包括网页视图通知接口301,该网页视图通知接口301提供一个网页注册及回调接口302,获取装置可以通过该网页注册及回调接口302设置网页视图控件的事件回调。
可选的,上述网页内容加载完成函数可以通过下述语句实现:
public void onPageFinished(WebView view,String url)。
通过上述方法,由于获取装置可以通过智能终端的操作系统的网页注册及回调接口设置网页视图控件的事件回调,因此获取装置无需再通过网页视图代理设置网页视图控件的事件回调,从而可以避免APP设置的网页视图控件的事件回调失效的问题。
可选的,结合图2,如图8所示,本发明实施例提供的获取网页内容的方法中,上述S105具体可以包括:
S105a、获取装置通过智能终端的操作系统的网页内容接收接口,将获取的网页视图控件显示的网页内容发送给该操作系统。
可选的,本发明实施例中,获取装置可以通过多个APP共用的网页内容接收接口将其获取到的网页内容发送给智能终端的操作系统,从而使得该操作系统完成对APP运行时产生的数据的收集。
可选的,结合图2,如图9所示,本发明实施例提供的获取网页内容的方法中,上述S104具体可以包括:
S104a、获取装置在确定该操作系统调用该网页内容加载完成函数之后,向网页视图控件中注入预设的脚本语言。
S104b、获取装置执行该脚本语言,以获取网页视图控件显示的网页内容。
上述S104a中,获取装置确定智能终端的操作系统调用网页内容加载完成函数之后,即可确定网页视图控件显示的网页内容已加 载完成,从而获取装置可向网页视图控件中注入预设的脚本语言(JavaScript,JS)。
可选的,上述S104a中,获取装置向网页视图控件中注入预设的脚本语言可以通过下述语句实现:
public void evaluateJavascript(String script,ValueCallback<String>resultCallback);
其中,该语句的传入参数script为预设的脚本语言,该脚本语言用于获取网页视图控件显示的网页内容;该语句的返回参数resultCallback返回回调函数ValueCallback。该回调函数中包括获取到的网页视图控件显示的网页内容。
可选的,上述回调函数具体可以通过下述语句实现:
public abstract void onReceiveValue(String value);
其中,该语句的参数value即为上述获取到的网页视图控件显示的网页内容。
通过上述方法,获取装置可以通过向网页视图控件中注入预设的脚本语言,并执行该脚本语言获取该网页视图控件显示的网页内容。
可选的,本发明实施例中,当用户触发正在运行的APP以使得需要创建一个新的APP界面时,智能终端首先通过调用智能终端的操作系统的创建窗口函数为该APP创建APP界面,并在创建APP界面时将实现本发明实施例提供的获取网页内容的方法的代码加载到APP的运行环境中,从而以使得智能终端的当前显示界面发生变化时,智能终端触发获取装置通过执行该代码实现本发明实施例提供的获取网页内容的方法。其中,上述智能终端创建的APP界面包括智能终端的显示屏幕已经显示出来的界面(例如本发明实施例中智能终端的当前显示界面和第一显示界面)和智能终端的显示屏幕还未显示出来的界面。
示例性的,如图10所示,为本发明实施例提供的一种智能终端的操作系统的架构示意图。在图10中的(a)中,实现本发明实施 例提供的获取网页内容的方法的代码(图10中表示为代码X)保存在智能终端的操作系统的框架(framework)层。在图10中的(b)中,当用户触发正在运行的APP以使得需要创建一个新的APP界面时,智能终端可以调用上述的创建窗口函数创建该APP的界面,并在创建该APP的界面时,将代码X加载至APP的运行环境中,从而智能终端可触发获取装置通过执行代码X,以获取APP运行时智能终端的显示界面显示的网页内容,并将该网页内容通过操作系统上相应的接口(例如图10中示意的网页内容接收接口)发送给操作系统,如此可以在不对APP进行修改的情况下,保证智能终端的操作系统获取APP运行时智能终端的显示界面显示的网页内容,即保证智能终端获取APP运行时智能终端的显示界面显示的网页内容。
本发明实施例提供的获取网页内容的方法,在智能终端调用智能终端的操作系统的创建窗口函数为APP创建一个新的APP界面时,智能终端可以通过该创建窗口函数将实现本发明实施例提供的获取网页内容的方法的代码加载到APP的运行环境中,从而获取装置可以通过在APP的运行环境中执行该代码获取智能终端的显示界面(例如APP界面中包括的第一显示界面)中的网页视图控件显示的网页内容,然后获取装置再将获取的该网页内容发送给操作系统,如此操作系统能够获取APP运行时智能终端的显示界面显示的网页内容,从而使得智能终端能够获取APP运行时显示界面显示的网页内容。
如图11所示,本发明实施例提供一种获取网页内容的装置,该装置用于执行以上各个方法实施例中的获取装置所执行的步骤。该装置可以包括相应步骤所对应的模块。示例性的,该装置可以包括确定模块40、注册及回调模块41、获取模块42以及回调处理模块43。
其中,所述确定模块40,用于确定第一显示界面显示的网页内容对应的网页视图控件,所述第一显示界面为所述APP运行时所述 智能终端的显示屏幕显示的界面;所述注册及回调模块41,用于向所述智能终端的操作系统注册网页内容加载完成函数,并确定所述操作系统调用所述网页内容加载完成函数,其中,所述操作系统在确定所述确定模块40确定的所述网页视图控件显示的网页内容加载完成之后调用所述网页内容加载完成函数;所述获取模块42,用于根据在所述注册及回调模块41确定所述操作系统调用所述网页内容加载完成函数之后,获取所述网页内容;所述回调处理模块43,用于将所述获取模块42获取的所述网页内容发送给所述操作系统。
可选的,所述确定模块40,具体用于确定所述操作系统调用重绘通知接口,其中,所述操作系统在当前显示界面发生变化时调用所述重绘通知接口,所述当前显示界面为所述智能终端的显示屏幕当前显示的界面;并在确定所述操作系统调用所述重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定所述第一显示界面显示的网页内容对应的网页视图控件。
可选的,所述注册及回调模块41,具体用于通过所述操作系统的网页注册及回调接口向所述操作系统注册所述网页内容加载完成函数,并通过所述操作系统的网页注册及回调接口确定所述操作系统调用所述网页内容加载完成函数。
可选的,所述回调处理模块43,具体用于通过所述操作系统的网页内容接收接口,将所述获取模块42获取的所述网页内容发送给所述操作系统。
可选的,所述获取模块42,具体在所述注册及回调模块41确定所述操作系统调用所述网页内容加载完成函数之后,向所述网页视图控件中注入预设的脚本语言,并执行所述脚本语言,以获取所述网页内容。
本发明实施例中,具体实现时,上述确定模块、注册及回调模块、获取模块以及回调处理模块均可以通过至少一个处理器实现。
可以理解,本实施例的获取网页内容的装置可对应于上述如图2、图4、图6、图8或图9所示的实施例的获取网页内容的方法中 的获取装置,并且本实施例的获取网页内容的装置中的各个模块的划分和/或功能等均是为了实现如图2、图4、图6、图8或图9所示的方法流程,为了避免重复,在此不再赘述。
本发明实施例中,获取装置在确定APP运行时智能终端的显示屏幕显示的第一显示界面中的网页视图控件后,通过向智能终端的操作系统注册网页内容加载完成函数,可以保证当网页视图控件显示的网页内容全部加载完成后,该操作系统可以通过调用该网页内容加载完成函数响应该网页内容已加载完成这一事件,即获取装置确定该操作系统调用该网页内容加载完成函数即可确定该网页内容已加载完成,从而可以保证获取装置在该网页内容全部加载完成之后才开始获取该网页内容,并将获取的该网页内容发送给该操作系统,如此该操作系统可以获取APP运行时智能终端的显示界面显示的网页内容,从而使得智能终端能够获取APP运行时显示界面显示的网页内容。
本发明实施例提供一种智能终端,该智能终端的操作系统中安装有多个APP。该多个APP中的至少一个APP采用网页视图进行显示。该智能终端包括上述如图11所示的获取网页内容的装置,该装置可用于执行上述如图2、图4、图6、图8或图9所示的获取网页内容的方法。
上述智能终端可以包括:至少一个处理器、接口电路、存储器和系统总线。
所述存储器用于存储计算机执行指令,所述至少一个处理器、所述接口电路和所述存储器通过所述系统总线相互连接并完成相互间的通信,当所述智能终端运行时,所述至少一个处理器执行所述存储器存储的所述计算机执行指令,以使所述智能终端执行如图2、图4、图6、图8或图9所示的获取网页内容的方法。具体的获取网页内容的方法可参见上述如图2、图4、图6、图8或图9所示的实施例中的相关描述,此处不再赘述。
上述智能终端可以为智能手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等智能终端设备,本发明实施例以智能终端是智能手机为例进行示例性的说明,图12示出的是与本发明各实施例相关的智能手机的部分结构的示意框图。
如图12所示,智能手机具体可以包括:射频(radio frequency,RF)电路50、存储器51、输入单元52、显示单元53、音频单元54、处理器55、电源56以及接口57等部件。本领域技术人员可以理解,图12中示出的智能手机的结构并不构成对智能手机的限定,智能手机具体可以包括比图12所示的部件更多或更少的部件,或者组合其中某些部件,或者不同的部件分布的位置不同。
其中,处理器55可以为上述的至少一个处理器;存储器51可以为上述的存储器;RF电路50、输入单元52、显示单元53、音频单元54、电源56以及接口57可以为上述的接口电路;图12中连接这些部件的连线可以为上述的系统总线。
下面结合图12对智能手机的各个构成部件进行具体的介绍:
RF电路50可用于在收发信息或通话过程中,信号的接收和发送,特别地,接收到下行信号后,给处理器55处理;另外,将上行信号发送出去。通常,RF电路包括但不限于天线、至少一个放大器、收发机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路50还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、短消息服务(short messaging service,SMS)等。
存储器51可用于存储软件程序以及模块,处理器55通过运行存储在存储器51中的软件程序以及模块,从而执行智能手机的各种功能应用以及信号处理。存储器51可主要包括存储程序区和存储数据区,其中,存储程序区可存储智能手机的操作系统、至少一个功能所需的应用(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据智能手机的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器51可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元52可用于接收输入的数字或字符信息,以及产生与智能手机的用户设置以及功能控制有关的按键信号输入。具体地,输入单元52可包括触摸屏521以及其他输入设备522。触摸屏521,也称为触控面板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏521上或在触摸屏521附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触摸屏521可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器55,并能接收处理器55发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏521。其他输入设备522可以包括但不限于物理键盘、功能键(比如音量控制键、电源键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元53可用于显示由用户输入的信息或提供给用户的信息以及智能手机的各种菜单。显示单元53可包括显示面板531,可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板531。进一步的,触摸屏521可覆盖显示面板531,当触摸屏521检测到在其上或附近的触摸操作后,传送给处理器55以确定触摸事件 的类型,随后处理器55根据触摸事件的类型在显示面板531上提供相应的视觉输出。虽然在图12中,触摸屏521与显示面板531是作为两个独立的部件来实现智能手机的输入和输出功能的,但是在某些实施例中,可以将触摸屏521与显示面板531集成而实现智能手机的输入和输出功能。
音频单元54包括音频电路541、扬声器542以及麦克风543。音频单元54可提供用户与智能手机之间的音频接口。音频电路541可将接收到的音频数据转换后的电信号,传输到扬声器542,由扬声器542转换为声音信号输出;另一方面,麦克风543将收集的声音信号转换为电信号,由音频电路541接收后转换为音频数据,再将音频数据输出至RF电路50以发送给比如另一智能手机,或者将音频数据输出至存储器51以便进一步处理。
处理器55是智能手机的控制中心,利用各种接口和线路连接整个智能手机的各个部分,通过运行或执行存储在存储器51内的软件程序和模块,以及调用存储在存储器51内的数据,执行智能手机的各种功能和处理数据,从而完成智能手机的相应功能。可选的,处理器55可包括一个或多个处理单元;优选的,处理器55可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器55中。
智能手机还包括给各个部件供电的电源56(比如电池),优选的,电源可以通过电源管理系统与处理器55逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
接口57,可用于与其他设备连接,并传输智能手机与其他设备之间的数据。
可选的,智能手机还可以包括图12中未示出的无线保真(wireless fidelity,WiFi)模块、蓝牙模块等,本发明实施例在此不再赘述。
本发明实施例还提供一种计算机可读存储介质,计算机可读存 储介质中存储有一个或多个程序,一个或多个程序包括计算机执行指令,当智能终端的至少一个处理器执行该计算机执行指令时,智能终端执行上述如图2、图4、图6、图8或图9所示的获取网页内容的方法。具体的获取网页内容的方法可参见上述如图2、图4、图6、图8或图9所示的实施例中的相关描述,此处不再赘述。
本发明实施例中,智能终端中的获取网页内容的装置在确定APP运行时智能终端的显示屏幕显示的第一显示界面中的网页视图控件后,通过向智能终端的操作系统注册网页内容加载完成函数,可以保证当网页视图控件显示的网页内容全部加载完成后,该操作系统可以通过调用该网页内容加载完成函数响应该网页内容已加载完成这一事件,即获取网页内容的装置确定该操作系统调用该网页内容加载完成函数即可确定该网页内容已加载完成,从而可以保证获取装置在该网页内容全部加载完成之后才开始获取该网页内容,并将获取的该网页内容发送给该操作系统,如此该操作系统可以获取APP运行时智能终端的显示界面显示的网页内容,从而使得智能终端能够获取APP运行时显示界面显示的网页内容。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦 合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (11)

  1. 一种获取网页内容的方法,其特征在于,所述方法包括:
    确定第一显示界面显示的网页内容对应的网页视图控件,所述第一显示界面为智能终端中的应用程序APP运行时所述智能终端的显示屏幕显示的界面;
    向所述智能终端的操作系统注册网页内容加载完成函数;
    确定所述操作系统调用所述网页内容加载完成函数,其中,所述操作系统在确定所述网页视图控件显示的网页内容加载完成之后调用所述网页内容加载完成函数;
    在确定所述操作系统调用所述网页内容加载完成函数之后,获取所述网页内容;
    将获取的所述网页内容发送给所述操作系统。
  2. 根据权利要求1所述的方法,其特征在于,所述确定第一显示界面显示的网页内容对应的网页视图控件,包括:
    确定所述操作系统调用重绘通知接口,其中,所述操作系统在当前显示界面发生变化时调用所述重绘通知接口,所述当前显示界面为所述智能终端的显示屏幕当前显示的界面;
    在确定所述操作系统调用所述重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定所述第一显示界面显示的网页内容对应的网页视图控件。
  3. 根据权利要求1或2所述的方法,其特征在于,所述向所述智能终端的操作系统注册网页内容加载完成函数;所述确定所述操作系统调用所述网页内容加载完成函数,包括:
    通过所述操作系统的网页注册及回调接口向所述操作系统注册所述网页内容加载完成函数;
    通过所述操作系统的网页注册及回调接口确定所述操作系统调用所述网页内容加载完成函数。
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,所述将获取的所述网页内容发送给所述操作系统,包括:
    通过所述操作系统的网页内容接收接口,将获取的所述网页内容发送给所述操作系统。
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,所述获取所述网页内容,包括:
    向所述网页视图控件中注入预设的脚本语言;
    执行所述脚本语言,以获取所述网页内容。
  6. 一种获取网页内容的装置,其特征在于,所述装置包括:
    确定模块,用于确定第一显示界面显示的网页内容对应的网页视图控件,所述第一显示界面为智能终端中的应用程序APP运行时所述智能终端的显示屏幕显示的界面;
    注册及回调模块,用于向所述智能终端的操作系统注册网页内容加载完成函数,并确定所述操作系统调用所述网页内容加载完成函数,其中,所述操作系统在确定所述确定模块确定的所述网页视图控件显示的网页内容加载完成之后调用所述网页内容加载完成函数;
    获取模块,用于在所述注册及回调模块确定所述操作系统调用所述网页内容加载完成函数之后,获取所述网页内容;
    回调处理模块,用于将所述获取模块获取的所述网页内容发送给所述操作系统。
  7. 根据权利要求6所述的装置,其特征在于,
    所述确定模块,具体用于确定所述操作系统调用重绘通知接口,其中,所述操作系统在当前显示界面发生变化时调用所述重绘通知接口,所述当前显示界面为所述智能终端的显示屏幕当前显示的界面;并在确定所述操作系统调用所述重绘通知接口之后,遍历发生变化后的第一显示界面显示的内容对应的控件,以确定所述第一显示界面显示的网页内容对应的网页视图控件。
  8. 根据权利要求6或7所述的装置,其特征在于,
    所述注册及回调模块,具体用于通过所述操作系统的网页注册及回调接口向所述操作系统注册所述网页内容加载完成函数,并通过所述操作系统的网页注册及回调接口确定所述操作系统调用所述网页 内容加载完成函数。
  9. 根据权利要求6至8任意一项所述的装置,其特征在于,
    所述回调处理模块,具体用于通过所述操作系统的网页内容接收接口,将所述获取模块获取的所述网页内容发送给所述操作系统。
  10. 根据权利要求6至9任意一项所述的装置,其特征在于,
    所述获取模块,具体用于在所述注册及回调模块确定所述操作系统调用所述网页内容加载完成函数之后,向所述网页视图控件中注入预设的脚本语言,并执行所述脚本语言,以获取所述网页内容。
  11. 一种智能终端,其特征在于,包括至少一个处理器、接口电路、存储器和系统总线;
    所述存储器用于存储计算机执行指令,所述至少一个处理器、所述接口电路和所述存储器通过所述系统总线相互连接,当所述智能终端运行时,所述至少一个处理器执行所述存储器存储的所述计算机执行指令,以使所述智能终端执行如权利要求1至5任意一项所述的获取网页内容的方法。
PCT/CN2016/086787 2016-06-22 2016-06-22 一种获取网页内容的方法及装置 WO2017219293A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP16905835.1A EP3460675A1 (en) 2016-06-22 2016-06-22 Method and device for acquiring web content
CN201680080539.XA CN108604245B (zh) 2016-06-22 2016-06-22 一种获取网页内容的方法及装置
US16/312,111 US10796087B2 (en) 2016-06-22 2016-06-22 Method and apparatus for obtaining web content
PCT/CN2016/086787 WO2017219293A1 (zh) 2016-06-22 2016-06-22 一种获取网页内容的方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/086787 WO2017219293A1 (zh) 2016-06-22 2016-06-22 一种获取网页内容的方法及装置

Publications (1)

Publication Number Publication Date
WO2017219293A1 true WO2017219293A1 (zh) 2017-12-28

Family

ID=60783587

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086787 WO2017219293A1 (zh) 2016-06-22 2016-06-22 一种获取网页内容的方法及装置

Country Status (4)

Country Link
US (1) US10796087B2 (zh)
EP (1) EP3460675A1 (zh)
CN (1) CN108604245B (zh)
WO (1) WO2017219293A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815427A (zh) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 展示h5页面的方法、客户端应用模块、h5模块及系统
CN110209461A (zh) * 2019-06-11 2019-09-06 北京金山安全软件有限公司 一种界面显示方法和装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783093A (zh) * 2018-12-12 2019-05-21 四川商通实业有限公司 一种iOS加载页和缺省页的动态组合方法
CN112527422B (zh) * 2019-09-17 2024-03-22 腾讯科技(深圳)有限公司 视图更新方法、装置、设备及存储介质
CN112559069B (zh) * 2020-12-08 2022-04-12 腾讯科技(深圳)有限公司 子应用的运行控制方法、装置、存储介质和电子设备
CN116303096B (zh) * 2023-05-15 2023-08-11 安元科技股份有限公司 一种低代码设计器本地组件代码调试的方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013025193A1 (en) * 2011-08-14 2013-02-21 Savnor Technologies Llc Web content capturing, packaging distribution
CN104216698A (zh) * 2013-05-31 2014-12-17 华为终端有限公司 一种注册网页方法及相关装置
CN105095207A (zh) * 2014-04-18 2015-11-25 阿里巴巴集团控股有限公司 检索、获取应用软件内容的方法和装置
CN105677730A (zh) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 一种读取网页资源的方法、装置及电子设备

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8365082B2 (en) * 2008-10-23 2013-01-29 Savnor Technologies Llc Universal content referencing, packaging, distribution system, and a tool for customizing web content
US20120010995A1 (en) * 2008-10-23 2012-01-12 Savnor Technologies Web content capturing, packaging, distribution
US7962547B2 (en) * 2009-01-08 2011-06-14 International Business Machines Corporation Method for server-side logging of client browser state through markup language
US20120137233A1 (en) * 2010-05-26 2012-05-31 Nokia Corporation Method and Apparatus for Enabling Generation of Multiple Independent User Interface Elements from a Web Page
US8595551B2 (en) * 2010-06-11 2013-11-26 Microsoft Corporation Web application transitioning and transient web applications
US9418388B1 (en) * 2010-09-08 2016-08-16 Imdb.Com, Inc. Techniques for displaying third party content
US8881035B2 (en) * 2010-11-16 2014-11-04 International Business Machines Corporation Rendering dynamic contents with static file based graphical user interface form control
JP2012185651A (ja) * 2011-03-04 2012-09-27 Canon Inc 情報処理装置、情報処理システム、情報処理装置の制御方法、及びプログラム
CN102902785B (zh) * 2012-09-29 2016-08-10 合一网络技术(北京)有限公司 一种网页信息获取系统及方法
US9971752B2 (en) * 2013-08-19 2018-05-15 Google Llc Systems and methods for resolving privileged edits within suggested edits
CN104156485B (zh) * 2014-08-27 2018-05-18 北京国双科技有限公司 网页数据传输方法、装置及系统
CN104363569B (zh) 2014-11-28 2018-03-30 北京大学 一种基于情景感知的向移动用户推荐最优联系方式的方法
US9524278B2 (en) * 2014-12-04 2016-12-20 Cynny Spa Systems and methods to present content
CN104822156B (zh) 2015-04-01 2018-12-11 中国联合网络通信集团有限公司 一种用户行为分析的方法及装置
US20160381204A1 (en) * 2015-06-24 2016-12-29 International Business Machines Corporation Mobile management framework
CN104951375B (zh) 2015-07-01 2017-12-08 北京博睿宏远数据科技股份有限公司 基于函数拦截技术的手机app性能数据采集方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013025193A1 (en) * 2011-08-14 2013-02-21 Savnor Technologies Llc Web content capturing, packaging distribution
CN104216698A (zh) * 2013-05-31 2014-12-17 华为终端有限公司 一种注册网页方法及相关装置
CN105095207A (zh) * 2014-04-18 2015-11-25 阿里巴巴集团控股有限公司 检索、获取应用软件内容的方法和装置
CN105677730A (zh) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 一种读取网页资源的方法、装置及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3460675A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815427A (zh) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 展示h5页面的方法、客户端应用模块、h5模块及系统
CN110209461A (zh) * 2019-06-11 2019-09-06 北京金山安全软件有限公司 一种界面显示方法和装置

Also Published As

Publication number Publication date
US10796087B2 (en) 2020-10-06
CN108604245B (zh) 2022-06-17
CN108604245A (zh) 2018-09-28
EP3460675A4 (en) 2019-03-27
US20190205367A1 (en) 2019-07-04
EP3460675A1 (en) 2019-03-27

Similar Documents

Publication Publication Date Title
WO2017219293A1 (zh) 一种获取网页内容的方法及装置
US11798107B2 (en) Scenario-based application recommendation method and apparatus
AU2012258293B2 (en) Browsing context continuation across multiple devices
CN108345543B (zh) 一种数据处理方法、装置、设备及存储介质
CN110869907B (zh) 一种浏览应用页面的方法及终端
CN104636664B (zh) 基于文档对象模型的跨站脚本攻击漏洞检测方法及装置
CN107391768B (zh) 网页数据处理方法、装置、设备及计算机可读存储介质
CN108156508B (zh) 弹幕信息处理的方法、装置、移动终端、服务器及系统
WO2015096747A1 (zh) 操作响应方法、客户端、浏览器及系统
KR20140073243A (ko) Http 메시지 처리 방법 및 장치
WO2014206143A1 (zh) 未读消息数目显示方法、装置和设备
CN107766358B (zh) 一种页面分享的方法及相关装置
CN110020293B (zh) 多媒体数据展示方法、装置及存储介质
WO2015003549A1 (en) Method and system for application message alerting
WO2017028692A1 (zh) 一种视频播放器调用方法、装置及存储介质
WO2015003636A1 (zh) 一种页面元素的拦截方法和装置
CN112749074B (zh) 一种测试用例推荐方法以及装置
US20160308879A1 (en) Application-Based Service Providing Method, Apparatus, and System
WO2018137528A1 (zh) 资源访问方法及装置
CN104750722B (zh) 一种信息的获取及展示方法和装置
WO2014026581A1 (zh) 信息管理的方法、客户端及移动终端
CN106230919B (zh) 一种文件上传的方法和装置
CN111177612B (zh) 一种页面登录鉴权的方法及相关装置
CN109145182B (zh) 数据采集方法、装置、计算机设备及系统
CN107798008B (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: 16905835

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2016905835

Country of ref document: EP

Effective date: 20181219