CN109189588B - Browser function implementation method, device, terminal and storage medium - Google Patents

Browser function implementation method, device, terminal and storage medium Download PDF

Info

Publication number
CN109189588B
CN109189588B CN201810892873.6A CN201810892873A CN109189588B CN 109189588 B CN109189588 B CN 109189588B CN 201810892873 A CN201810892873 A CN 201810892873A CN 109189588 B CN109189588 B CN 109189588B
Authority
CN
China
Prior art keywords
communication module
client
browser
built
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810892873.6A
Other languages
Chinese (zh)
Other versions
CN109189588A (en
Inventor
魏洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810892873.6A priority Critical patent/CN109189588B/en
Publication of CN109189588A publication Critical patent/CN109189588A/en
Application granted granted Critical
Publication of CN109189588B publication Critical patent/CN109189588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (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)

Abstract

The embodiment of the invention discloses a method, a device, a terminal and a storage medium for realizing browser functions, wherein the method comprises the following steps: establishing communication connection between a client communication module in a client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language; and transmitting a link between the client communication module and the built-in browser communication module based on the communication connection so as to enable the client to realize the skipping or collection of the link through the built-in browser. The technical scheme provided by the embodiment of the invention overcomes the problems that the QML-based client can not directly load the WEB page through HTML (hypertext markup language) and interfaces such as skipping and collection of WEB page links do not exist between the QML-based client and the HTML in the prior art, so that the client realizes the link skipping or collection function through a built-in browser.

Description

Browser function implementation method, device, terminal and storage medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a browser function implementation method, a browser function implementation device, a browser function implementation terminal and a storage medium.
Background
Since the birth of browsers, the functions provided by the browsers greatly facilitate the use of the internet. For many clients, especially live clients, many links need to jump to a Web end for display, and meanwhile, a user can also directly watch a live room through a browser.
Although the QML-based client provides the kernel engine WebEngineView based on the chrome browser, and the kernel engine can load the WEB page through HTML, the QML-based client cannot directly load the WEB page through HTML, and there is no interface such as jump and collection of a WEB page link between the QML-based client and the HTML, so that how to make the QML-based client realize functions such as jump and collection of the browser is a difficult problem.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a terminal, and a storage medium for implementing a browser function, so that a client implements a function of link jumping or collection.
In a first aspect, an embodiment of the present invention provides a method for implementing a browser function, where the method includes:
establishing communication connection between a client communication module in a client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language;
and transmitting a link between the client communication module and the built-in browser communication module based on the communication connection, so that the client realizes the skipping or collection of the link through a built-in browser.
In a second aspect, an embodiment of the present invention provides a device for implementing a browser function, where the device includes:
the communication connection establishing module is used for establishing communication connection between a client communication module in a client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language;
and the browser function realization module is used for transmitting a link between the client communication module and the built-in browser communication module based on the communication connection so as to enable the client to realize the skipping or collection of the link through the built-in browser.
In a third aspect, an embodiment of the present invention provides a browser function implementing terminal, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the browser function implementing method according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a browser function implementing method according to any embodiment of the present invention.
According to the browser function implementation method, the browser function implementation device, the browser function implementation terminal and the browser function storage medium, communication connection between a client communication module in a client and a built-in browser communication module in the client is established, wherein the client communication module is implemented based on a QML language, and the built-in browser communication module is implemented based on an HTML language; based on the communication connection, the link is transmitted between the client communication module and the built-in browser communication module, so that the client can realize the link skipping or collection through the built-in browser, the problems that the client based on the QML can not directly load a WEB page through HTML (hypertext markup language), and interfaces such as skipping and collection of the WEB page link do not exist between the client based on the QML and the HTML in the prior art are solved, and the client can realize the link skipping or collection through the built-in browser.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for implementing a browser function according to an embodiment of the present invention;
fig. 2 is a flowchart of a browser function implementation method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for implementing a browser function according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a browser function implementing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a browser function implementing terminal according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through embodiments with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a flowchart of a method for implementing a browser function according to an embodiment of the present invention, where the method may be applied to a case of performing link skipping or collection inside a client, and the method may be implemented by a browser function implementing device, and may specifically be implemented by software and/or hardware in the browser function implementing device. Referring to fig. 1, the browser function implementation method includes the following steps:
s110, establishing communication connection between a client communication module in the client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language.
The client can be a client at a PC end or a client at a mobile phone end. The QML language is a declarative scripting language, derived for Qt, that describes a program's user interface: whatever it may be, and how the user interface behaves. The HTML language is an application under the hypertext markup language, i.e., the standard generic markup language. Hypertext refers to pages that may contain pictures, links, and even non-text elements such as music and programs. The structure of the hypertext markup language includes a header part (Head part) providing information about a web page and a Body part (Body part) providing specific contents of the web page.
In this embodiment, a built-in browser may be preferably set in the client, so that the user can use the browser inside the client. In order to implement data interaction between the part of the client except the built-in browser and the built-in browser, a client communication module and a built-in browser communication module may be arranged in the client, and data interaction between the part of the client except the built-in browser and the built-in browser is implemented by establishing communication connection between the client and the built-in browser. Preferably, the client communication module may be implemented based on a QML language, and the built-in browser communication module may be implemented based on an HTML language.
And S120, based on the communication connection, transmitting a link between the client communication module and the built-in browser communication module, so that the client can realize the skipping or collection of the link through the built-in browser.
After the communication connection between the client communication module and the built-in browser communication module is established, the link can be transmitted between the client communication module and the built-in browser communication module based on the communication connection, so that the link skipping and collection functions between the client and the built-in browser are realized.
The method comprises the steps that a link is transmitted between a client communication module and a built-in browser communication module to realize link jumping and collection functions between the client and the built-in browser, and the link can be transmitted to the built-in browser communication module by the client communication module to realize jumping of the link from the client to the built-in browser; the method can comprise the steps that the link of the communication module of the built-in browser is transmitted to the communication module of the client, so that the link in the built-in browser is collected by the client, the link transmission in the communication module of the built-in browser can be further included, the skip of the link in the built-in browser is realized, and the like.
The method for implementing browser functions provided by this embodiment establishes a communication connection between a client communication module in a client and a built-in browser communication module in the client, where the client communication module is implemented based on a QML language and the built-in browser communication module is implemented based on an HTML language; based on the communication connection, the link is transmitted between the client communication module and the built-in browser communication module, so that the client can realize the link skipping or collection through the built-in browser, the problems that the client based on the QML can not directly load a WEB page through HTML (hypertext markup language), and interfaces such as skipping and collection of the WEB page link do not exist between the client based on the QML and the HTML in the prior art are solved, and the client can realize the link skipping or collection through the built-in browser.
On the basis of the foregoing embodiments, further, establishing a communication connection between a client communication module in the client and a built-in browser communication module in the client includes:
and utilizing the Socket component to perform TCP protocol three-way handshake between the client communication module and the built-in browser communication module, and establishing communication connection between the client communication module and the built-in browser communication module.
Because the client communication module realized based on the QML language and the built-in browser communication module realized based on the HTML language cannot be directly connected in communication, the direct communication between the client communication module and the built-in browser communication module can be realized by means of the WebChannel provided by the bottom layer C + + language of the QML. Preferably, a Socket component in the WebChannel can be used for realizing direct communication between the client communication module and the built-in browser communication module.
Specifically, a Socket component is used for carrying out TCP protocol three-way handshake between the client communication module and the built-in browser communication module, and communication connection between the client communication module and the built-in browser communication module is established. The TCP protocol three-way handshake between the client communication module and the built-in browser communication module is as follows: the first handshake may be that the client communication module sends a TCP connection request packet to the built-in browser communication module, the second handshake may be that the built-in browser communication module sends a confirmation packet to the client communication module after receiving the request packet, and the third handshake may be that the client communication module sends a confirmation packet to the built-in browser communication module after receiving the confirmation packet sent by the built-in browser communication module, and if the built-in browser communication module receives the confirmation packet, the handshake is successful, at this time, the client communication module and the built-in browser communication module successfully establish a communication connection, and the two may be in transmission link based on the communication connection.
Further, based on the communication connection, a link is transmitted between the client communication module and the built-in browser communication module, so that the client can realize the jump of the link through the built-in browser, including:
based on the communication connection, transmitting a link needing to be jumped in the client to a built-in browser communication module by using a client communication module;
and identifying the link by using a communication module of the built-in browser, and loading and displaying a jump interface corresponding to the link so as to jump from the client to the built-in browser.
In this embodiment, based on the communication connection between the client communication module and the built-in browser communication module, the link that needs to be skipped and is selected by the user in the client may be transmitted to the built-in browser communication module by using the client communication module, so that the interface corresponding to the link is displayed by the built-in browser. And after receiving the link sent by the client communication module, the built-in browser communication module identifies the head part and the body part of the link, loads a jump interface corresponding to the link according to the head part and the body part, and displays the jump interface in the built-in browser so that the link jumps from the client to the built-in browser.
Further, when the jump interface is loaded by using the built-in browser communication module, the method includes: and setting the value of the environment variable to be NULL by using the client communication module, so that no command line prompt pops up when the built-in browser communication module loads the jump interface.
Generally, in the process of webpage jump, when a browser loads a flash plug-in for the first time, a command line prompt pops up, and when a built-in browser communication module is used for loading a jump interface, the same problem can be avoided. The popup of the command line prompt is related to the fact that the value of the environment variable is not NULL, and therefore the value of the environment variable can be set to NULL by the client communication module, so that the system calls that the environment variable cannot find the command line prompt popup window, and no command line prompt pops when the built-in browser loads the flash plugin for the first time. Specifically, the client communication module may set a value of the environment variable to NULL using an environment variable setting function.
For example, the following description is specifically given by taking environment variables under the Windows operating system as an example:
the system environment variable ComSpec under the Windows operating system stores the path of the command line cmd.exe, and at this time, the system environment variable ComSpec can be set to Null through a qputenv function, so that the Windows operating system cannot find a command line prompt popup window, and a browser cannot jump out of the command line prompt when loading a flash plug-in.
Example two
Fig. 2 is a flowchart of a method for implementing a browser function according to a second embodiment of the present invention. On the basis of the foregoing embodiments, the present embodiment further optimizes, by transmitting a link between the client communication module and the built-in browser communication module based on the communication connection, so that the client realizes a jump of the link through a built-in browser, that: identifying whether a link selected by a user in the built-in browser is a download link or not by utilizing the built-in browser communication module; if the link is not a download link, based on the communication connection, the built-in browser communication module is used for sending the link to the client communication module; loading a jump interface corresponding to the link from a kernel engine WebEngineView by utilizing the client communication module; filtering abnormal interfaces in the skip interfaces by utilizing the client communication module; and based on the communication connection, the client communication module is utilized to send the filtered residual normal jump interface to the built-in browser communication module, and the built-in browser communication module is utilized to display the normal jump interface so as to realize the jump of the link in the built-in browser. As shown in fig. 2, the method specifically includes:
s210, establishing communication connection between a client communication module in the client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language.
And S220, identifying whether the link selected by the user in the built-in browser is a downloading link or not by using the built-in browser communication module.
When it is detected that the user selects a certain link in the built-in browser, it is preferable that whether the link selected by the user is a download link or not is recognized by using the built-in browser communication module. Specifically, a head portion and a body portion may be identified from a link selected by a user using a built-in browser communication module, wherein the head portion contains a file type of a requested resource. The built-in browser communication module can determine whether the link selected by the user in the built-in browser is a download link according to the file type of the requested resource in the head part.
And S230, if the link is not a download link, after the user clicks the link, the link is sent to the client communication module by using the built-in browser communication module based on the communication connection.
In this embodiment, if the built-in browser communication module determines that the link selected by the user is not a download link, it may be determined that the link needs to be skipped inside the built-in browser. Specifically, the link selected by the user may be saved, and after the user clicks the selected link, the identified head portion and body portion, and the like may be sent to the client communication module by using the built-in browser communication module based on the communication connection between the built-in browser communication module and the client communication module.
S240, loading a jump interface corresponding to the link from the kernel engine WebEngineView by utilizing the client communication module.
And S250, filtering abnormal interfaces in the jump interfaces by utilizing the client communication module.
Preferably, after receiving the link, the head part and the body part sent by the built-in browser communication module, the client communication module may load a jump interface corresponding to the link from the kernel engine webengeview according to the received information. When a user clicks a link, if at least one of conditions that network conditions are poor, the user clicking speed is too high, or jamming exists, and the like exists, a client communication module is utilized to load a jump interface corresponding to the link from a kernel WebEngineer view, and the jump interface possibly comprises an abnormal interface, wherein the abnormal interface can comprise an empty jump interface or an error jump interface. At this time, if an empty jump interface or an incorrect jump interface is sent to the built-in browser communication module for display, the user experience may be reduced. At this time, it is preferable that the client communication module is used to filter out abnormal interfaces in the jumping interfaces, and only normal jumping interfaces corresponding to the links remain.
And S260, based on the communication connection, sending the filtered residual normal jump interface to the built-in browser communication module by using the client communication module, and loading and displaying the normal jump interface by using the built-in browser communication module so as to realize the jump of the link in the built-in browser.
In this embodiment, after the client communication module is used to obtain the normal jump interface corresponding to the link, the normal jump interface may be sent to the built-in browser communication module based on the communication connection between the built-in browser communication module and the client communication module, and the built-in browser communication module loads and displays the normal jump interface, thereby realizing the jump of the link in the built-in browser.
On the basis of the above embodiments, the browser function implementation method provided in this embodiment identifies whether a link selected by a user in a built-in browser is a download link by using a built-in browser communication module; if the link is not a download link, based on the communication connection, the link is sent to the client communication module by using the built-in browser communication module; loading a jump interface corresponding to the link from a kernel engine WebEngineView by utilizing a client communication module; filtering abnormal interfaces in the skip interfaces by using a client communication module; based on the communication connection, the client communication module is used for sending the filtered residual normal jump interface to the built-in browser communication module, and the built-in browser communication module is used for displaying the normal jump interface, so that the jump of the link in the built-in browser is realized.
On the basis of the foregoing embodiments, further, based on the communication connection, a link is transmitted between the client communication module and the built-in browser communication module, so that the client realizes a jump of the link through the built-in browser, the method further includes:
and if the link is a download link, popping up a download interface corresponding to the link by using a built-in browser communication module after the user clicks the link.
If the current link is determined to be the download link, after the user clicks the link, a self-defined download interface corresponding to the download link can be popped up by using the built-in browser communication module, when the user selects the download directory and downloads the download directory, the built-in browser communication module can be connected with the Web server, according to the received data size receivedBytes and the total data amount totalBytes transmitted by the Web server, the progress bar is updated and displayed by using the built-in browser communication module, and meanwhile, the received data is stored in the corresponding download directory.
EXAMPLE III
Fig. 3 is a flowchart of a method for implementing a browser function according to a third embodiment of the present invention. In this embodiment, on the basis of the foregoing embodiments, the link is transmitted between the client communication module and the built-in browser communication module based on the communication connection, so that the client collects the link through the built-in browser, and the method is further optimized as follows: when detecting that a user clicks a collection button in the client, based on the communication connection, sending a current link to the client communication module by using the built-in browser communication module; and detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module. As shown in fig. 3, the method specifically includes:
s310, establishing communication connection between a client communication module in the client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language.
And S320, when the user is detected to click the collection button in the client, sending the current link to the client communication module by using the built-in browser communication module based on the communication connection.
When a user browses in a built-in browser of a client, it is detected that the user clicks a collection button in the client, and at this time, it can be determined that the user wants to collect a current interface of the built-in browser and a link corresponding to the current interface into the client. At this time, the current link may be transmitted to the client communication module using the built-in browser communication module based on the communication connection between the built-in browser communication module and the client communication module.
S330, detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module.
Preferably, when the client communication module receives the current link sent by the built-in browser, the client communication module can be used for detecting whether the current link is already collected by the client, so as to prevent the problem that the current link is repeatedly collected. Specifically, it may be determined whether the current link has been collected by detecting whether the current link has been recorded in the local profile of the user's collection website. If the current link is detected not to be collected, a prompt that the current link is not collected (or a prompt that the current link can be collected) can be popped up; if it is detected that the current link has been collected, a prompt may pop up that the current link has been collected. In addition, whether the collection of the user reaches the upper limit of the collection can be determined through the local configuration file, if the collection of the user does not reach the upper limit, a prompt that the current link can be collected can be popped up, and at the moment, the current link and all contents in an interface corresponding to the current link can be written into the local configuration file; if it is determined that the user's collection has reached an upper limit, a prompt may pop up that the current link may not be collected.
On the basis of the above embodiments, when it is detected that a user clicks a collection button in a client, a current link is sent to a client communication module by using a built-in browser communication module based on communication connection; and detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module, thereby realizing the link collection function of the client.
On the basis of the foregoing embodiments, further, when the client communication module is used to store the current link and the content corresponding to the current link, if the content corresponding to the current link is not loaded, then:
registering each event corresponding to the content, wherein each event corresponds to attribute information which is changed or not changed;
when detecting that the attribute information corresponding to at least one event changes, judging whether the LoadStatus in a kernel engine WebEngineView provided by a client communication module is in a finished state;
and if the LoadStatus is in the completion state, updating the content by using each event corresponding to the completion state.
In this embodiment, when the current link and the interface corresponding to the current link are collected, a situation that the content in the interface corresponding to the current link is not completely loaded may occur. At this time, an asynchronous update mode may be adopted, and the client communication module is used to detect whether the loading of the content in the interface corresponding to the collected link is completed, and if the loading of the content in the interface corresponding to the collected link is detected to be completed, the relevant information such as the title, the icon, the content and the like in the loaded interface is updated in the favorite.
Specifically, each event corresponding to the content in the interface corresponding to the link may be registered in advance, where each event may be an event such as an Icon, a title, or a content, where each event corresponds to attribute information, the attribute information is changed or unchanged, and the attribute information of the event such as the Icon, the title, or the content may be represented by IconChanged, titelechanged, or contentChanged. When detecting that at least one attribute information is changed, determining whether the loading of the content in the interface corresponding to the link is completed by judging whether the loading state of the kernel engine WebEngineView provided by the client communication module is completed. And if the loading state LoadStatus is finished, updating corresponding contents in the favorites by using each event corresponding to the finished state.
Example four
Fig. 4 is a schematic structural diagram of a browser function implementing device according to a fourth embodiment of the present invention. Referring to fig. 4, the browser function implementing apparatus in this embodiment includes:
a communication connection establishing module 410, configured to establish a communication connection between a client communication module in the client and a built-in browser communication module in the client, where the client communication module is implemented based on a QML language, and the built-in browser communication module is implemented based on an HTML language;
and the browser function implementation module 420 is configured to transmit a link between the client communication module and the built-in browser communication module based on the communication connection, so that the client can skip or collect the link through the built-in browser.
The browser function implementation apparatus provided in this embodiment establishes a communication connection between a client communication module in a client and a built-in browser communication module in the client, where the client communication module is implemented based on a QML language, and the built-in browser communication module is implemented based on an HTML language; based on the communication connection, the link is transmitted between the client communication module and the built-in browser communication module, so that the client can realize the link skipping or collection through the built-in browser, the problems that the client based on the QML can not directly load a WEB page through HTML (hypertext markup language), and interfaces such as skipping and collection of the WEB page link do not exist between the client based on the QML and the HTML in the prior art are solved, and the client can realize the link skipping or collection through the built-in browser.
On the basis of the foregoing embodiments, further, the communication connection establishing module 410 may specifically be configured to:
and utilizing the Socket component to perform TCP protocol three-way handshake between the client communication module and the built-in browser communication module, and establishing communication connection between the client communication module and the built-in browser communication module.
Further, the browser function implementing module 420 may include a client jump to a built-in browser unit, where the unit may specifically be configured to:
based on the communication connection, transmitting a link needing to be jumped in the client to a built-in browser communication module by using a client communication module;
and identifying the link by using a communication module of the built-in browser, and loading and displaying a jump interface corresponding to the link so as to jump from the client to the built-in browser.
Further, the browser function implementing module 420 may further include a built-in browser internal jumping unit, where the unit may be specifically configured to:
identifying whether a link selected by a user in the built-in browser is a download link or not by utilizing a built-in browser communication module;
if the link is not a download link, based on the communication connection, the link is sent to the client communication module by using the built-in browser communication module;
loading a jump interface corresponding to the link from a kernel engine WebEngineView by utilizing a client communication module;
filtering abnormal interfaces in the skip interfaces by using a client communication module;
based on the communication connection, the client communication module is used for sending the filtered residual normal jump interface to the built-in browser communication module, and the built-in browser communication module is used for loading and displaying the normal jump interface so as to realize the jump of the link in the built-in browser.
Furthermore, the client-side jump to the built-in browser unit and the built-in browser internal jump unit can be specifically used for
And setting the value of the environment variable to be NULL by using the client communication module, so that no command line prompt pops up when the built-in browser communication module loads the jump interface.
Further, the browser function implementing module 420 may further include a link collection unit, where the unit may be specifically configured to:
when detecting that a user clicks a collection button in a client, based on communication connection, sending a current link to a client communication module by using a built-in browser communication module;
and detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module.
Further, the link favorites may be specifically configured to:
when the client communication module is used for storing the current link and the content corresponding to the current link, if the content corresponding to the current link is not loaded, then:
registering each event corresponding to the content, wherein each event corresponds to attribute information which is changed or not changed;
when detecting that the attribute information corresponding to at least one event changes, judging whether the LoadStatus in a kernel engine WebEngineView provided by a client communication module is in a finished state;
and if the LoadStatus is in the completion state, updating the content by using each event corresponding to the completion state.
The browser function implementation device provided by the embodiment of the invention can execute the browser function implementation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a browser function implementing terminal according to the fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary browser feature implementing terminal 512, suitable for use in implementing embodiments of the present invention. The browser function implementing terminal 512 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the browser function implementing terminal 512 is represented in the form of a general purpose computing device. The components of the browser feature implementing terminal 512 may include, but are not limited to: one or more processors 516, a memory 528, and a bus 518 that couples the various system components including the memory 528 and the processors 516.
Bus 518 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Browser feature implementing terminal 512 typically includes a variety of computer system readable media. Such media can be any available media that can be accessed by browser feature implementing terminal 512 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)530 and/or cache memory 532. Browser feature implementing terminal 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage 534 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 540 having a set (at least one) of program modules 542, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in, for example, the memory 528, each of which examples or some combination may include an implementation of a network environment. The program modules 542 generally perform the functions and/or methods of the described embodiments of the invention.
Browser feature implementing terminal 512 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc., where display 524 may be configurable or not as desired), one or more devices that enable a user to interact with browser feature implementing terminal 512, and/or any devices (e.g., network card, modem, etc.) that enable browser feature implementing terminal 512 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 522. Also, the browser function implementing terminal 512 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 520. As shown, the network adapter 520 communicates with the other modules of the browser feature implementing terminal 512 via bus 518. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with the browser functionality implementing terminal 512, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage, among others.
The processor 516 executes various functional applications and data processing, for example, a browser function implementation method provided by an embodiment of the present invention, by executing programs stored in the memory 528.
EXAMPLE six
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a browser function implementation method provided in an embodiment of the present invention, where the computer program includes:
establishing communication connection between a client communication module in a client and a built-in browser communication module in the client, wherein the client communication module is realized based on a QML language, and the built-in browser communication module is realized based on an HTML language;
and transmitting a link between the client communication module and the built-in browser communication module based on the communication connection so as to enable the client to realize the skipping or collection of the link through the built-in browser.
Of course, the computer program stored on the computer readable storage medium provided in the embodiments of the present invention is not limited to execute the method operations described above, and may also execute the relevant operations in the browser function implementation method of the browser function based terminal provided in any embodiment of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (7)

1. A browser function implementation method is characterized by comprising the following steps:
establishing a communication connection between a client communication module in a client and a built-in browser communication module in the client, wherein the client communication module is implemented based on a QML language, the built-in browser communication module is implemented based on an HTML language, and the establishing a communication connection between the client communication module in the client and the built-in browser communication module in the client comprises: utilizing a Socket component to perform TCP protocol three-way handshake between the client communication module and the built-in browser communication module, and establishing communication connection between the client communication module and the built-in browser communication module;
based on the communication connection, transmitting a link between the client communication module and the built-in browser communication module, so that the client realizes the skipping or collection of the link through a built-in browser, comprising: based on the communication connection, transmitting a link which needs to be jumped in the client to the built-in browser communication module by using the client communication module; recognizing the link by using the communication module of the built-in browser, and loading and displaying a jump interface corresponding to the link so as to jump from the client to the built-in browser; when detecting that a user clicks a collection button in the client, based on the communication connection, sending a current link to the client communication module by using the built-in browser communication module; and detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module.
2. The method of claim 1, wherein the transmitting a link between the client communication module and the in-browser communication module based on the communication connection to enable the client to jump the link through an in-browser further comprises:
identifying whether a link selected by a user in the built-in browser is a download link or not by utilizing the built-in browser communication module;
if the link is not a download link, after the user clicks the link, the link is sent to the client communication module by using the built-in browser communication module based on the communication connection;
loading a jump interface corresponding to the link from a kernel engine WebEngineView by utilizing the client communication module;
filtering abnormal interfaces in the skip interfaces by utilizing the client communication module;
and based on the communication connection, the client communication module is utilized to send the filtered residual normal jump interface to the built-in browser communication module, and the built-in browser communication module is utilized to load and display the normal jump interface so as to realize the jump of the link in the built-in browser.
3. The method according to claim 1 or 2, wherein when loading the jump interface by using the built-in browser communication module, the method comprises the following steps:
and setting the value of the environment variable to be NULL by utilizing the client communication module, so that no command line prompt pops up when the built-in browser communication module loads a jump interface.
4. The method of claim 1, further comprising:
when the client communication module is used for storing the current link and the content corresponding to the current link, if the loading of the content corresponding to the current link is not completed, then:
registering each event corresponding to the content, wherein each event corresponds to attribute information which is changed or not changed;
when detecting that the attribute information corresponding to at least one event changes, judging whether the LoadStatus in a kernel engine WebEngineView provided by the client communication module is in a finished state;
and if the LoadStatus is in a completion state, updating the content by using each event corresponding to the completion state.
5. A browser function implementing apparatus, comprising:
a communication connection establishing module, configured to establish a communication connection between a client communication module in a client and a built-in browser communication module in the client, where the client communication module is implemented based on a QML language, the built-in browser communication module is implemented based on an HTML language, and the establishing of the communication connection between the client communication module in the client and the built-in browser communication module in the client includes: utilizing a Socket component to perform TCP protocol three-way handshake between the client communication module and the built-in browser communication module, and establishing communication connection between the client communication module and the built-in browser communication module;
the browser function implementation module is configured to transmit a link between the client communication module and the built-in browser communication module based on the communication connection, so that the client realizes skipping or collection of the link through a built-in browser, and includes: based on the communication connection, transmitting a link which needs to be jumped in the client to the built-in browser communication module by using the client communication module; recognizing the link by using the communication module of the built-in browser, and loading and displaying a jump interface corresponding to the link so as to jump from the client to the built-in browser; when detecting that a user clicks a collection button in the client, based on the communication connection, sending a current link to the client communication module by using the built-in browser communication module; and detecting whether the current link is collected or not by using the client communication module, and if the current link is not collected, storing the current link and the content corresponding to the current link by using the client communication module.
6. A browser function implementing terminal, characterized in that the terminal comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a browser functionality implementation method as recited in any of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a browser feature implementation method according to any one of claims 1 to 4.
CN201810892873.6A 2018-08-07 2018-08-07 Browser function implementation method, device, terminal and storage medium Active CN109189588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810892873.6A CN109189588B (en) 2018-08-07 2018-08-07 Browser function implementation method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810892873.6A CN109189588B (en) 2018-08-07 2018-08-07 Browser function implementation method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109189588A CN109189588A (en) 2019-01-11
CN109189588B true CN109189588B (en) 2020-12-15

Family

ID=64921025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810892873.6A Active CN109189588B (en) 2018-08-07 2018-08-07 Browser function implementation method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109189588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858106A (en) * 2020-09-23 2020-10-30 江苏金晓电子信息股份有限公司 Method for setting attributes of QML (QML framework) extension control

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169486A (en) * 2010-02-25 2011-08-31 腾讯科技(深圳)有限公司 File downloading method and device
CN102915363A (en) * 2012-10-18 2013-02-06 北京奇虎科技有限公司 Website storing method and system
CN103501463A (en) * 2013-10-25 2014-01-08 乐视网信息技术(北京)股份有限公司 Data acquisition method and electronic equipment
CN103530365A (en) * 2013-10-12 2014-01-22 北京搜狗信息服务有限公司 Method and system for acquiring downloading link of resources
CN103777942A (en) * 2013-12-06 2014-05-07 深圳市证通电子股份有限公司 Embedded type software product development framework applied to financial terminal
CN104050962A (en) * 2013-03-16 2014-09-17 李军 Multifunctional reader based on voice synthesis technology
CN107479990A (en) * 2017-08-11 2017-12-15 恒丰银行股份有限公司 Distributed software service system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9529603B2 (en) * 2010-07-02 2016-12-27 Nokia Technologies Oy Method and apparatus for dynamic network device start up

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169486A (en) * 2010-02-25 2011-08-31 腾讯科技(深圳)有限公司 File downloading method and device
CN102915363A (en) * 2012-10-18 2013-02-06 北京奇虎科技有限公司 Website storing method and system
CN104050962A (en) * 2013-03-16 2014-09-17 李军 Multifunctional reader based on voice synthesis technology
CN103530365A (en) * 2013-10-12 2014-01-22 北京搜狗信息服务有限公司 Method and system for acquiring downloading link of resources
CN103501463A (en) * 2013-10-25 2014-01-08 乐视网信息技术(北京)股份有限公司 Data acquisition method and electronic equipment
CN103777942A (en) * 2013-12-06 2014-05-07 深圳市证通电子股份有限公司 Embedded type software product development framework applied to financial terminal
CN107479990A (en) * 2017-08-11 2017-12-15 恒丰银行股份有限公司 Distributed software service system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Interacting with HTML from QML over WebChannel/WebSockets";Declaration of VAR;《https://retifrav.github.io/blog/2018/07/14/html-from-qml-over-webchannel-websockets/?tdsourcetag=s_pctim_aiomsg》;20180714;第1-24页 *
Declaration of VAR."Interacting with HTML from QML over WebChannel/WebSockets".《https://retifrav.github.io/blog/2018/07/14/html-from-qml-over-webchannel-websockets/?tdsourcetag=s_pctim_aiomsg》.2018, *

Also Published As

Publication number Publication date
CN109189588A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US11972198B2 (en) Client-side web site selection according to device capabilities
US10733259B2 (en) Web page access method and apparatus
CN110634049B (en) Page display content processing method and device, electronic equipment and readable medium
US20120272133A1 (en) Handling unexpected responses to script executing in client-side application
CN109743381B (en) Long connection interaction method and device for client and server
CN113590974B (en) Recommendation page configuration method and device, electronic equipment and computer readable medium
EP4198773A1 (en) Image processing method and apparatus, and computer readable storage medium
CN112612546A (en) Page loading method and device, electronic equipment and storage medium
CN110674444B (en) Method and terminal for downloading dynamic webpage
CN109189588B (en) Browser function implementation method, device, terminal and storage medium
US20140157104A1 (en) Dynamic sharing and updating of a web page
CN109165372B (en) Webpage loading method, device, equipment and storage medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN111382387B (en) Webpage access method, device, equipment and storage medium based on applet
CN112307386A (en) Information monitoring method, system, electronic device and computer readable storage medium
CN109446451B (en) Webpage display method, device, medium and computing equipment
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN110737861A (en) webpage data processing method, device, equipment and storage medium
US20140101315A1 (en) Inserting user targeted web resources into browser navigation memory
CN114816637B (en) Application display method, device and system embedded in applet
JP5643449B1 (en) Server and method for displaying display screen on terminal device
CN110717126A (en) Page browsing method and device, electronic equipment and computer readable storage medium
CN112130908A (en) Method and device for setting user guide
CN109857503B (en) Page interaction effect self-adaption method and device and electronic equipment

Legal Events

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