[go: up one dir, main page]

CN105404517A - Browser and browser implementation method - Google Patents

Browser and browser implementation method Download PDF

Info

Publication number
CN105404517A
CN105404517A CN201510894437.9A CN201510894437A CN105404517A CN 105404517 A CN105404517 A CN 105404517A CN 201510894437 A CN201510894437 A CN 201510894437A CN 105404517 A CN105404517 A CN 105404517A
Authority
CN
China
Prior art keywords
browser
specified
designated
kernel
takeover
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.)
Granted
Application number
CN201510894437.9A
Other languages
Chinese (zh)
Other versions
CN105404517B (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510894437.9A priority Critical patent/CN105404517B/en
Publication of CN105404517A publication Critical patent/CN105404517A/en
Application granted granted Critical
Publication of CN105404517B publication Critical patent/CN105404517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种浏览器及浏览器实现方法,其中,利用浏览器内核实现浏览器的方法还包括:预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑;当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。该技术方案可以有效地解决现有浏览器内核的操作接口在某些特定情况下无法正确执行指定操作的问题。

The invention discloses a browser and a method for implementing the browser, wherein, the method for implementing the browser by using the browser kernel further includes: pre-setting a takeover condition corresponding to a designated operation interface of the browser kernel, and setting the connection with the browser kernel The takeover execution logic corresponding to the specified operation interface; when the takeover condition corresponding to the specified operation interface of the browser kernel is not met, when an instruction to allow the browser to perform a specified operation is received, the specified operation of the browser kernel is called The interface executes the specified operation; when the takeover condition corresponding to the specified operation interface of the browser kernel is met and an instruction for the browser to perform the specified operation is received, the corresponding takeover execution logic is executed to execute the specified operation. Specifies the action. The technical solution can effectively solve the problem that the operation interface of the existing browser kernel cannot correctly execute the specified operation in some specific cases.

Description

一种浏览器和浏览器实现方法A browser and browser implementation method

技术领域technical field

本发明涉及计算机技术领域,具体涉及一种浏览器和浏览器实现方法。The invention relates to the field of computer technology, in particular to a browser and a method for implementing the browser.

背景技术Background technique

随着科学技术的发展,人们浏览网页的方式也越来越多,不再局限于在PC(PersonalComputer,个人电脑)上通过浏览器访问网站,在各种移动设备,如智能手机上,也可以通过浏览器对网站发起访问。With the development of science and technology, there are more and more ways for people to browse the web. They are no longer limited to visiting websites through browsers on PCs (Personal Computers). They can also be accessed on various mobile devices, such as smart phones Initiate access to the website through a browser.

在浏览器中,浏览器内核会提供相应的操作接口来执行用户的指定操作。例如,现有的浏览器一般都提供前进/后退的操作按钮,在用户点选时对应调用浏览器内核的前进/后退接口,使当前页面跳转到用户曾访问的上一个/下一个页面。但随着网页设计技术的发展,现有浏览器在访问某些网页时,通过调用原有的操作接口不能有效地执行用户的指定操作。In a browser, the browser kernel will provide a corresponding operation interface to perform user-specified operations. For example, existing browsers generally provide forward/backward operation buttons, which correspondingly call the forward/backward interface of the browser kernel when the user clicks, so that the current page jumps to the previous/next page visited by the user. However, with the development of web design technology, existing browsers cannot effectively perform user-specified operations by calling the original operation interface when accessing certain web pages.

例如,许多网站默认提供的是在PC端进行显示的网页,但如果检测到用户使用移动设备访问该网站,则会提供一个静态页面,该静态页面包含可供浏览器内核进行计算的数据,浏览器内核计算这些数据后跳转到该网站提供的与移动端相适配的网页。图1示出了现有技术中使用移动设备访问一个网站时,该网站提供的使得浏览器自动跳转到与移动端相适配的网页的静态页面效果图。但这会产生如下的问题:在用户跳转到移动端网页后,如果想返回上一个浏览的页面(如搜索引擎搜索页),点击浏览器的后退按钮后,不会正确地返回上一个浏览的页面,而是会返回图1所示的静态页面,而该页面又将跳转回与移动端适配的网页,从而陷入死循环。For example, many websites provide a webpage displayed on the PC side by default, but if it is detected that the user visits the website using a mobile device, a static page will be provided, which contains data that can be calculated by the browser kernel. After the server kernel calculates these data, it jumps to the webpage provided by the website that is suitable for the mobile terminal. FIG. 1 shows an effect diagram of a static page provided by the website to make the browser automatically jump to a webpage adapted to the mobile terminal when a mobile device is used to access a website in the prior art. But this will cause the following problem: After the user jumps to the mobile webpage, if he wants to return to the previous page (such as the search engine search page), after clicking the back button of the browser, he will not return to the previous page correctly. , but will return to the static page shown in Figure 1, and this page will jump back to the webpage adapted to the mobile terminal, thus falling into an endless loop.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的浏览器和相应的浏览器实现方法。In view of the above problems, the present invention is proposed to provide a browser and a corresponding browser implementation method that overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,提供了一种浏览器实现方法,其中,利用浏览器内核实现浏览器,该方法还包括:预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑;当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。According to one aspect of the present invention, a method for implementing a browser is provided, wherein the browser is implemented using the browser kernel, and the method further includes: pre-setting a takeover condition corresponding to a designated operation interface of the browser kernel, and setting and browsing The takeover execution logic corresponding to the specified operation interface of the browser kernel; when the takeover condition corresponding to the specified operation interface of the browser kernel is not met, when receiving an instruction to allow the browser to perform a specified operation, call the browser kernel The specified operation interface of the browser executes the specified operation; when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, when an instruction for the browser to perform the specified operation is received, the execution logic is executed by executing the corresponding takeover to perform the specified operation.

可选地,该方法进一步包括:记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。Optionally, the method further includes: recording and saving the browser operation data related to the designated operation interface of the browser kernel; when the takeover condition corresponding to the designated operation interface of the browser kernel is satisfied, receiving the request When the browser executes the instruction of the specified operation, it executes the corresponding takeover execution logic according to the stored browser operation data related to the specified operation of the browser kernel.

可选地,所述记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据包括:每当接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。Optionally, the recording and saving the browser operation data related to the specified operation interface of the browser kernel includes: whenever an instruction for the browser to perform a specified operation is received, regardless of calling the specified operation interface of the browser kernel to perform the operation Whether the specified operation is performed or the specified operation is performed by executing the corresponding takeover execution logic, record and save the operation data.

可选地,所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。Optionally, the designated operation interface of the browser kernel includes: a forward/backward operation interface of the browser kernel; the browser operation data related to the designated operation interface of the browser kernel includes: the address of the webpage accessed by the browser data.

可选地,所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;所述让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;所述对应的接管执行逻辑为:跳过所述指定静态网页,后退到在访问所述指定静态网页之前访问的网页。Optionally, the takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited a designated static web page and jumped to a target web page corresponding to the designated static web page; the instruction to allow the browser to perform a designated operation is Instructing the browser to execute a back operation; the corresponding takeover execution logic is: skip the designated static web page, and return to the web page visited before visiting the designated static web page.

可选地,所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问所述指定静态网页之前访问的网页;所述让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;所述对应的接管执行逻辑为:跳过所述指定静态网页,直接前进到该指定静态网页对应的目标网页Optionally, the takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before accessing the designated static web page; The instruction is an instruction for the browser to perform a forward operation; the corresponding takeover execution logic is: skip the specified static webpage, and directly advance to the target webpage corresponding to the specified static webpage

依据本发明的另一方面,提供了一种浏览器,其中,该浏览器包括浏览器内核,该浏览器还包括:设置单元,适于预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑;操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。According to another aspect of the present invention, a browser is provided, wherein the browser includes a browser kernel, and the browser further includes: a setting unit, adapted to preset a takeover condition corresponding to a designated operation interface of the browser kernel , and set the takeover execution logic corresponding to the specified operation interface of the browser kernel; the operation processing unit is adapted to allow the browser to receive the takeover condition corresponding to the specified operation interface of the browser kernel When executing the instructions of the specified operation, call the specified operation interface of the browser kernel to perform the specified operation; when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, the instruction to allow the browser to perform the specified operation is received , the designated operation is executed by executing the corresponding takeover execution logic.

可选地,该浏览器进一步包括:记录单元,适于记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据;所述操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。Optionally, the browser further includes: a recording unit, adapted to record and save browser operation data related to the specified operation interface of the browser kernel; When the takeover condition corresponding to the operation interface is satisfied and an instruction for the browser to perform a specified operation is received, the corresponding takeover execution logic is executed according to the saved browser operation data related to the specified operation of the browser kernel .

可选地,所述记录单元,适于每当所述操作处理单元接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。Optionally, the recording unit is adapted to perform the specified operation by calling the specified operation interface of the browser kernel, or by executing the corresponding Takeover execution logic to execute the specified operation, record and save the operation data.

可选地,所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。Optionally, the designated operation interface of the browser kernel includes: a forward/backward operation interface of the browser kernel; the browser operation data related to the designated operation interface of the browser kernel includes: the address of the webpage accessed by the browser data.

可选地,所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;所述让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;所述对应的接管执行逻辑为:跳过所述指定静态网页,后退到在访问所述指定静态网页之前访问的网页。Optionally, the takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited a designated static web page and jumped to a target web page corresponding to the designated static web page; the instruction to allow the browser to perform a designated operation is Instructing the browser to execute a back operation; the corresponding takeover execution logic is: skip the designated static web page, and return to the web page visited before visiting the designated static web page.

可选地,所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问所述指定静态网页之前访问的网页;所述让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;所述对应的接管执行逻辑为:跳过所述指定静态网页,直接前进到该指定静态网页对应的目标网页。Optionally, the takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before accessing the designated static web page; The instruction is an instruction for the browser to perform a forward operation; the corresponding takeover execution logic is: skip the specified static webpage, and directly advance to the target webpage corresponding to the specified static webpage.

由上述可知,本发明的技术方案,通过在利用浏览器内核实现的浏览器中添加设置与浏览器内核的指定操作接口对应的接管条件和接管执行逻辑,当未满足接管条件时接收到指定的操作指令,调用浏览器内核的指定操作接口执行该操作;当满足接管条件时接收到指定的操作指令时,调用相应的接管执行逻辑来执行该操作。该技术方案可以有效地解决现有浏览器内核的操作接口在某些特定情况下无法正确执行指定操作,如在访问页面的过程中出现起到跳转功能的静态页面时,点击前进/后退按钮时,调用浏览器的前进/后退接口无法正确地返回到用户希望返回的页面,陷入死循环的问题。As can be seen from the above, the technical solution of the present invention, by adding and setting the takeover condition and takeover execution logic corresponding to the designated operation interface of the browser kernel in the browser realized by utilizing the browser kernel, when the takeover condition is not met, the specified The operation instruction calls the specified operation interface of the browser kernel to execute the operation; when the specified operation instruction is received when the takeover condition is met, the corresponding takeover execution logic is called to execute the operation. This technical solution can effectively solve the problem that the operation interface of the existing browser kernel cannot correctly perform the specified operation in some specific cases, such as clicking the forward/back button when a static page with a jump function appears during the process of accessing the page When calling the forward/back interface of the browser, the page that the user wants to return cannot be returned correctly, and the problem of falling into an infinite loop.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了现有技术中使用移动设备访问一个网站时,该网站提供的使得浏览器自动跳转到与移动端相适配的网页的静态页面效果图;Fig. 1 shows that when using a mobile device to access a website in the prior art, the website provides a static page rendering that makes the browser automatically jump to a webpage that is compatible with the mobile terminal;

图2示出了根据本发明一个实施例的一种浏览器实现方法的流程图;Fig. 2 shows a flow chart of a method for implementing a browser according to an embodiment of the present invention;

图3示出了根据本发明一个实施例的一种浏览器的结构示意图。Fig. 3 shows a schematic structural diagram of a browser according to an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

图2示出了根据本发明一个实施例的一种浏览器实现方法的流程图,如图2所示,利用浏览器内核实现浏览器的该方法还包括:Fig. 2 shows a flowchart of a method for implementing a browser according to an embodiment of the present invention. As shown in Fig. 2, the method for implementing a browser by using the browser kernel further includes:

步骤S210,预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑。Step S210, presetting the takeover condition corresponding to the designated operation interface of the browser kernel, and setting the takeover execution logic corresponding to the designated operation interface of the browser kernel.

例如,通过分析现有技术中存在的问题,对调用浏览器内核的操作接口无法正确执行的操作,对应设置接管条件和接管执行逻辑。For example, by analyzing the problems existing in the prior art, for operations that cannot be performed correctly by calling the operation interface of the browser kernel, the takeover condition and takeover execution logic are set correspondingly.

步骤S220,当与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作。这就是说,如果未满足上述接管条件,则说明调用浏览器内核的指定操作接口可以正确地执行该指定操作,因此不需要调用接管执行逻辑。Step S220, when receiving an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is not satisfied, call the specified operation interface of the browser kernel to perform the specified operation. That is to say, if the above takeover condition is not satisfied, it means that calling the specified operation interface of the browser kernel can correctly execute the specified operation, so there is no need to call the takeover execution logic.

步骤S230,当与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行相应的接管执行逻辑来执行该指定操作。Step S230, when receiving an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, execute the specified operation by executing corresponding takeover execution logic.

设想如下场景:用户在网上进行支付时,商家并不会直接接受钱款,而是需要利用支付宝、网上银行等第三方来完成实际支付,此时需要跳转到这类第三方网站,用户在点选支付方式进行确定后,通常可以看到页面跳转到一个显示诸如如下字样“正在为您跳转到支付页面,请稍后……”的静态页面,之后才会跳转到实际的支付页面。网页开发人员设计该页面是由于考虑到用户使用的网络可能存在延迟,在点选支付方式的页面点击确定后,由于需要访问第三方网站,可能无法立即跳转到第三方网站提供的支付页面,因此提供了该静态页面提示用户点选支付方式的操作已经成功,避免用户重复操作。但这样也依然存在背景技术部分提出的问题,即用户在第三方网站希望返回修改支付方式时,点击浏览器的后退按钮,此时浏览器内核会调用后退接口来执行该操作,将页面跳转到前述的静态页面,而该页面又跳转至第三方网站提供的支付页面,陷入死循环。那么采用图1所示的方法,只需要将这种情况设置为接管条件并设置对应的接管执行逻辑,在用户点击后退按钮后就可以不调用浏览器内核的后退接口,而是调用相应的执行逻辑执行该后退操作。Imagine the following scenario: when a user pays online, the merchant does not accept the money directly, but needs to use Alipay, online banking and other third parties to complete the actual payment. At this time, it is necessary to jump to such a third-party website. After clicking the payment method to confirm, you can usually see that the page jumps to a static page that displays words such as "jumping to the payment page for you, please wait..." before jumping to the actual payment page. The web developer designed this page in consideration of possible delays in the network used by the user. After clicking OK on the page where the payment method is selected, it may not be possible to immediately jump to the payment page provided by the third-party website due to the need to visit the third-party website. Therefore, this static page is provided to remind the user that the operation of selecting the payment method has been successful, so as to avoid repeated operations by the user. But this still has the problem raised in the background technology section, that is, when the user clicks the back button of the browser when the third-party website wants to go back and modify the payment method, the browser kernel will call the back interface to perform this operation and redirect the page Go to the aforementioned static page, and the page jumps to the payment page provided by the third-party website, falling into an endless loop. Then using the method shown in Figure 1, you only need to set this situation as the takeover condition and set the corresponding takeover execution logic. After the user clicks the back button, you can call the corresponding execution instead of calling the back interface of the browser kernel. The logic performs this fallback operation.

可见,图2所示的方法,通过在利用浏览器内核实现的浏览器中添加设置与浏览器内核的指定操作接口对应的接管条件和接管执行逻辑,当未满足接管条件时接收到指定的操作指令,调用浏览器内核的指定操作接口执行该操作;当满足接管条件时接收到指定的操作指令时,调用相应的接管执行逻辑来执行该操作。该技术方案可以有效地解决现有浏览器内核的操作接口在某些特定情况下无法正确执行指定操作,如在访问页面的过程中出现起到跳转功能的静态页面时,点击前进/后退按钮时,调用浏览器的前进/后退接口无法正确地返回到用户希望返回的页面,陷入死循环的问题。It can be seen that in the method shown in Figure 2, by adding and setting the takeover condition and takeover execution logic corresponding to the specified operation interface of the browser kernel in the browser implemented by using the browser kernel, when the takeover condition is not met, the specified operation is received Instruction, call the specified operation interface of the browser kernel to execute the operation; when the specified operation instruction is received when the takeover condition is met, the corresponding takeover execution logic is called to execute the operation. This technical solution can effectively solve the problem that the operation interface of the existing browser kernel cannot correctly perform the specified operation in some specific cases, such as clicking the forward/back button when a static page with a jump function appears during the process of accessing the page When calling the forward/back interface of the browser, the page that the user wants to return cannot be returned correctly, and the problem of falling into an infinite loop.

在本发明的一个实施例中,图2所示的方法进一步包括:记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据;当与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的与浏览器内核的指定操作相关的浏览器操作数据,执行相应的接管执行逻辑。In one embodiment of the present invention, the method shown in FIG. 2 further includes: recording and saving browser operation data related to the designated operation interface of the browser kernel; when the takeover condition corresponding to the designated operation interface of the browser kernel is If it is satisfied, when receiving an instruction for the browser to perform a specified operation, execute the corresponding takeover execution logic according to the saved browser operation data related to the specified operation of the browser kernel.

浏览器内核在调用指定接口执行指定操作时,需要根据浏览器内核记录的浏览器操作数据来完成,而由于在与浏览器内核的指定操作接口对应的接管条件被满足的情况下,不再需要调用浏览器内核的指定接口,会出现无法获取到浏览器操作数据的情况。因此,可以实时记录并保存浏览器内核的指定操作接口相关的浏览器操作数据。When the browser kernel calls the specified interface to perform the specified operation, it needs to be completed according to the browser operation data recorded by the browser kernel, and because the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, it is no longer necessary Calling the specified interface of the browser kernel may fail to obtain the browser operation data. Therefore, the browser operation data related to the designated operation interface of the browser kernel can be recorded and saved in real time.

在本发明的一个实施例中,上述方法中,每当接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。In one embodiment of the present invention, in the above method, whenever an instruction for the browser to perform a specified operation is received, no matter whether the specified operation interface of the browser kernel is invoked to perform the specified operation, or the specified operation is executed by executing the corresponding takeover execution logic Execute the specified operation, record and save the operation data.

需要注意的是,即使是执行相应的接管执行逻辑来执行的指定操作,也可能需要用到在调用浏览器内核的指定操作接口执行指定操作的操作数据,因此,如果不将所有的操作数据完整记录,很可能出现无法正确执行接管执行逻辑的情况。It should be noted that even if the specified operation is performed by executing the corresponding takeover execution logic, the operation data that is used to perform the specified operation when calling the specified operation interface of the browser kernel may be required. Therefore, if all the operation data is not complete For the record, it is very likely that there will be cases where the takeover execution logic will not be executed correctly.

在本发明的一个实施例中,上述方法中,浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。In one embodiment of the present invention, in the above method, the designated operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel; the browser operation data related to the designated operation interface of the browser kernel includes: Address data of the web page visited.

现有技术中,浏览器内核会记录浏览器访问的地址数据,按照访问时间形成一个有先后次序的访问地址数据列表,在调用前进/后退操作接口时,就可以根据该列表跳转到当前页面的前一个/后一个页面的地址。正是因为这样,由于图1所示的静态页面也包含特定的地址数据,因此浏览器内核也会将其记录为一个URL(UniformResourceLocator,统一资源定位符)地址保存在地址数据列表中。为解决该问题,由于在满足前进/后退接口的接管条件时不调用浏览器的对应接口,因此就需要记录浏览器访问的网页的地址数据。In the prior art, the browser kernel will record the address data accessed by the browser, and form a sequential access address data list according to the access time. When calling the forward/backward operation interface, you can jump to the current page according to the list The address of the previous/next page. Just because of this, since the static page shown in Figure 1 also includes specific address data, the browser kernel also records it as a URL (UniformResourceLocator, Uniform Resource Locator) address and saves it in the address data list. To solve this problem, since the corresponding interface of the browser is not invoked when the takeover condition of the forward/backward interface is met, it is necessary to record the address data of the webpage accessed by the browser.

在本发明的一个实施例中,上述方法中,与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;对应的接管执行逻辑为:跳过指定静态网页,后退到在访问指定静态网页之前访问的网页。In one embodiment of the present invention, in the above method, the takeover condition corresponding to the specified operation interface of the browser kernel is that the browser has visited the specified static webpage and jumped to the target webpage corresponding to the specified static webpage; let the browser execute The instruction for the specified operation is an instruction for the browser to execute the back operation; the corresponding takeover execution logic is: skip the specified static webpage, and return to the webpage visited before visiting the specified static webpage.

再考虑一个现实场景:虽然移动设备对网站的访问量与日俱增,但许多网站的页面设计还是为PC端专门设计的,因此采用手机等屏幕远小于PC的移动设备很难方便地对这种针对PC端设计的网页进行正常的浏览,例如会出现字体过小、图片看不清等缺点。为解决这些问题,在手机浏览器开发了缩放功能的同时,许多网站也为移动设备设计了易于浏览的移动端网页,在用户利用移动设备对网站发起访问时,可以有效识别移动设备,自动跳转到适配的移动端网页,例如,用户通过搜索引擎搜索到某网站,点击搜索结果进行访问,该网站识别到用户使用了移动设备,因此跳转到类似图1所示的跳转页面,最终向用户呈现适配的移动端网页的页面。用户在对该网页页面浏览结束后,点击浏览器的返回按钮,返回的却是类似图1所示的跳转页面,而该页面又将页面跳转回到移动端页面,陷入死循环。而在本实施例中,由于满足了接管条件,即浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页,那么在接收到使让浏览器执行后退操作的指令时,就可以根据设置的接管执行逻辑跳过该指定静态网页,后退到搜索引擎页。Consider another realistic scenario: Although the number of visits to websites from mobile devices is increasing day by day, the page design of many websites is still specially designed for the PC side. For normal browsing of web pages designed on the client side, for example, there may be shortcomings such as too small fonts and unclear pictures. In order to solve these problems, while mobile browsers have developed the zoom function, many websites have also designed easy-to-browse mobile webpages for mobile devices. When users use mobile devices to visit the website, they can effectively identify mobile devices and automatically jump to Go to the adapted mobile webpage. For example, the user searches for a website through a search engine and clicks on the search result to visit. The website recognizes that the user uses a mobile device, so it jumps to a jump page similar to that shown in Figure 1. Finally, the page of the adapted mobile webpage is presented to the user. After the user browses the web page, he clicks the browser's return button, but returns a jump page similar to that shown in Figure 1, and the page jumps back to the mobile terminal page, falling into an endless loop. However, in this embodiment, since the takeover condition is satisfied, that is, the browser has accessed the specified static web page and jumped to the target web page corresponding to the specified static web page, then when receiving an instruction to allow the browser to perform a back operation, it will The specified static web page can be skipped according to the set takeover execution logic, and the search engine page can be returned.

在本发明的又一个实施例中,上述方法中,与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问指定静态网页之前访问的网页;让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;对应的接管执行逻辑为:跳过指定静态网页,直接前进到该指定静态网页对应的目标网页。In yet another embodiment of the present invention, in the above method, the takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before the designated static web page; The instruction for the browser to execute the specified operation is an instruction for the browser to perform the forward operation; the corresponding takeover execution logic is: skip the specified static webpage, and directly advance to the target webpage corresponding to the specified static webpage.

依然考虑前一个实施例中的场景:用户跳转回搜索引擎页后,如果还想访问该访问过的网站,此时点击前进按钮,如果调用浏览器内核的前进接口,会跳转到静态网页,经过再一次计算该网页中的数据才能跳转到访问过的网站,而这完全是没有必要的资源浪费。因此在本实施例中,由于设置了前进接口的接管条件和接管执行逻辑,就可以直接跳转到访问过的网站。Still consider the scenario in the previous embodiment: after the user jumps back to the search engine page, if he still wants to visit the visited website, click the forward button at this time, and if the forward interface of the browser kernel is called, it will jump to the static web page , after calculating the data in the web page again, you can jump to the visited website, and this is completely unnecessary waste of resources. Therefore, in this embodiment, since the takeover condition and takeover execution logic of the forward interface are set, it is possible to directly jump to the visited website.

图3示出了根据本发明一个实施例的一种浏览器的结构示意图,如图3所示,该浏览器300包括浏览器内核310,该浏览器300还包括:FIG. 3 shows a schematic structural view of a browser according to an embodiment of the present invention. As shown in FIG. 3 , the browser 300 includes a browser kernel 310, and the browser 300 also includes:

设置单元320,适于预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑。The setting unit 320 is adapted to preset a takeover condition corresponding to a specified operation interface of the browser kernel, and set a takeover execution logic corresponding to the specified operation interface of the browser kernel.

例如,通过分析现有技术中存在的问题,对调用浏览器内核的操作接口无法正确执行的操作,对应设置接管条件和接管执行逻辑。For example, by analyzing the problems existing in the prior art, for operations that cannot be performed correctly by calling the operation interface of the browser kernel, the takeover condition and takeover execution logic are set correspondingly.

操作处理单元330,适于当与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行相应的接管执行逻辑来执行该指定操作。The operation processing unit 330 is adapted to call the specified operation interface of the browser kernel to perform the specified operation when receiving an instruction for the browser to perform the specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is not satisfied ; When receiving an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, execute the specified operation by executing the corresponding takeover execution logic.

可见,图3所示的浏览器,通过在利用浏览器内核实现的浏览器中添加设置与浏览器内核的指定操作接口对应的接管条件和接管执行逻辑,当未满足接管条件时接收到指定的操作指令,调用浏览器内核的指定操作接口执行该操作;当满足接管条件时接收到指定的操作指令时,调用相应的接管执行逻辑来执行该操作。该技术方案可以有效地解决现有浏览器内核的操作接口在某些特定情况下无法正确执行指定操作,如在访问页面的过程中出现起到跳转功能的静态页面时,点击前进/后退按钮时,调用浏览器的前进/后退接口无法正确地返回到用户希望返回的页面,陷入死循环的问题。It can be seen that the browser shown in Figure 3, by adding and setting the takeover condition and takeover execution logic corresponding to the specified operation interface of the browser kernel in the browser implemented by using the browser kernel, when the takeover condition is not met, the specified The operation instruction calls the specified operation interface of the browser kernel to execute the operation; when the specified operation instruction is received when the takeover condition is met, the corresponding takeover execution logic is called to execute the operation. This technical solution can effectively solve the problem that the operation interface of the existing browser kernel cannot correctly perform the specified operation in some specific cases, such as clicking the forward/back button when a static page with a jump function appears during the process of accessing the page When calling the forward/back interface of the browser, the page that the user wants to return cannot be returned correctly, and the problem of falling into an infinite loop.

在本发明的一个实施例中,图3所示的浏览器进一步包括:记录单元340,适于记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据。In one embodiment of the present invention, the browser shown in FIG. 3 further includes: a recording unit 340 adapted to record and save browser operation data related to a specified operation interface of the browser kernel.

操作处理单元330,适于当与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的与浏览器内核的指定操作相关的浏览器操作数据,执行相应的接管执行逻辑。The operation processing unit 330 is adapted to receive an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, according to the stored browsing information related to the specified operation of the browser kernel The controller operates the data and executes the corresponding takeover execution logic.

在本发明的一个实施例中,上述浏览器中,记录单元340,适于每当操作处理单元接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。In one embodiment of the present invention, in the above-mentioned browser, the recording unit 340 is adapted to execute the specified operation regardless of calling the specified operation interface of the browser kernel whenever the operation processing unit receives an instruction for the browser to perform the specified operation. , or execute the specified operation by executing the corresponding takeover execution logic, record and save the operation data.

在本发明的一个实施例中,上述浏览器中,浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器的访问的网页的地址数据。In one embodiment of the present invention, in the above-mentioned browser, the specified operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel; the browser operation data related to the specified operation interface of the browser kernel includes: Address data of web pages accessed by the server.

在本发明的一个实施例中,上述浏览器中,与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;对应的接管执行逻辑为:跳过指定静态网页,后退到在访问指定静态网页之前访问的网页。In one embodiment of the present invention, in the above-mentioned browser, the takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited the designated static web page and jumped to the target web page corresponding to the designated static web page; let the browser The instruction to execute the specified operation is an instruction to make the browser execute the back operation; the corresponding takeover execution logic is: skip the specified static webpage, and return to the webpage visited before visiting the specified static webpage.

在本发明的一个实施例中,上述浏览器中,与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问指定静态网页之前访问的网页;让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;对应的接管执行逻辑为:跳过指定静态网页,直接前进到该指定静态网页对应的目标网页。In one embodiment of the present invention, in the above-mentioned browser, the takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before the designated static web page; The instruction for the browser to execute the specified operation is an instruction for the browser to perform the forward operation; the corresponding takeover execution logic is: skip the specified static webpage, and directly advance to the target webpage corresponding to the specified static webpage.

需要说明的是,上述各浏览器的具体实施方式与前述对应浏览器实现方法的实施例的具体实施方式相同,在此不再赘述。It should be noted that, the specific implementation manners of the above-mentioned browsers are the same as the specific implementation manners of the above-mentioned embodiments corresponding to the implementation method of the browsers, and will not be repeated here.

综上所述,本发明的技术方案,通过在利用浏览器内核实现的浏览器中添加设置与浏览器内核的指定操作接口对应的接管条件和接管执行逻辑,当未满足接管条件时接收到指定的操作指令,调用浏览器内核的指定操作接口执行该操作;当满足接管条件时接收到指定的操作指令时,调用相应的接管执行逻辑来执行该操作。该技术方案可以有效地解决现有浏览器内核的操作接口在某些特定情况下无法正确执行指定操作,如在访问页面的过程中出现起到跳转功能的静态页面时,点击前进/后退按钮时,调用浏览器的前进/后退接口无法正确地返回到用户希望返回的页面,陷入死循环的问题。In summary, the technical solution of the present invention, by adding and setting the takeover condition and takeover execution logic corresponding to the designated operation interface of the browser kernel in the browser implemented by using the browser kernel, when the takeover condition is not met, the specified Call the specified operation interface of the browser kernel to execute the operation; when the specified operation instruction is received when the takeover condition is met, call the corresponding takeover execution logic to execute the operation. This technical solution can effectively solve the problem that the operation interface of the existing browser kernel cannot correctly perform the specified operation in some specific cases, such as clicking the forward/back button when a static page with a jump function appears during the process of accessing the page When calling the forward/back interface of the browser, the page that the user wants to return cannot be returned correctly, and the problem of falling into an infinite loop.

需要说明的是:It should be noted:

在此提供的算法和显示不与任何特定计算机、虚拟装置或者其它设备固有相关。各种通用装置也可以与基于在此的示教一起使用。根据上面的描述,构造这类装置所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual appliance, or other device. Various general purpose devices can also be used with the teachings based on this. The structure required to construct such an apparatus will be apparent from the foregoing description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的浏览器中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the browser according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明公开了A1、一种浏览器实现方法,其中,利用浏览器内核实现浏览器,该方法还包括:The present invention discloses A1, a method for implementing a browser, wherein the browser is implemented using the browser kernel, and the method also includes:

预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑;Pre-setting the takeover condition corresponding to the designated operation interface of the browser kernel, and setting the takeover execution logic corresponding to the designated operation interface of the browser kernel;

当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;When the takeover condition corresponding to the designated operation interface of the browser kernel is not met, when an instruction to allow the browser to perform a designated operation is received, the designated operation interface of the browser kernel is called to perform the designated operation;

当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。When the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform a specified operation is received, the specified operation is executed by executing the corresponding takeover execution logic.

A2、如A1所述的方法,其中,该方法进一步包括:A2. The method as described in A1, wherein the method further comprises:

记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据;Record and save the browser operation data related to the specified operation interface of the browser kernel;

当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。When the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform the specified operation is received, according to the stored browser operation data related to the specified operation of the browser kernel , execute the corresponding takeover execution logic.

A3、如A2所述的方法,其中,所述记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据包括:A3, the method as described in A2, wherein, described recording and saving the browser operating data relevant to the specified operating interface of the browser kernel include:

每当接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。Whenever an instruction for the browser to perform a specified operation is received, no matter whether the specified operation interface of the browser kernel is called to perform the specified operation, or the specified operation is performed by executing the corresponding takeover execution logic, record and save the operation data.

A4、如A2所述的方法,其中,A4. The method as described in A2, wherein,

所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;The designated operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel;

所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。The browser operation data related to the specified operation interface of the browser kernel includes: address data of webpages accessed by the browser.

A5、如A4所述的方法,其中,A5. The method as described in A4, wherein,

所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;所述让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;The takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited the designated static web page and jumped to the target web page corresponding to the designated static web page; the instruction for the browser to perform the designated operation is to allow the browser to execute Instructions for back operation;

所述对应的接管执行逻辑为:跳过所述指定静态网页,后退到在访问所述指定静态网页之前访问的网页。The corresponding takeover execution logic is: skip the specified static webpage, and return to the webpage accessed before accessing the specified static webpage.

A6、如A4所述的方法,其中,A6. The method as described in A4, wherein,

所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问所述指定静态网页之前访问的网页;所述让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;The takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before accessing the designated static web page; Instructions for the browser to perform forward operations;

所述对应的接管执行逻辑为:跳过所述指定静态网页,直接前进到该指定静态网页对应的目标网页The corresponding takeover execution logic is: skip the specified static webpage, and directly advance to the target webpage corresponding to the specified static webpage

本发明还公开了B7、一种浏览器,其中,该浏览器包括浏览器内核,该浏览器还包括:The present invention also discloses B7, a browser, wherein the browser includes a browser kernel, and the browser also includes:

设置单元,适于预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑;The setting unit is suitable for setting in advance the takeover condition corresponding to the designated operation interface of the browser kernel, and setting the takeover execution logic corresponding to the designated operation interface of the browser kernel;

操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。The operation processing unit is adapted to call the designated operation interface of the browser kernel to execute the designated operation when receiving an instruction for the browser to perform a designated operation when the takeover condition corresponding to the designated operation interface of the browser kernel is not met Operation: when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform a specified operation is received, the specified operation is executed by executing the corresponding takeover execution logic.

B8、如B7所述的浏览器,其中,该浏览器进一步包括:B8. The browser as described in B7, wherein the browser further includes:

记录单元,适于记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据;A recording unit, adapted to record and save browser operation data related to a specified operation interface of the browser kernel;

所述操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。The operation processing unit is adapted to receive an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, according to the saved interface with the browser kernel The browser operation data related to the specified operation is specified, and the corresponding takeover execution logic is executed.

B9、如B8所述的浏览器,其中,B9, the browser as described in B8, wherein,

所述记录单元,适于每当所述操作处理单元接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。The recording unit is adapted to execute the specified operation by calling the specified operation interface of the browser kernel or by executing the corresponding takeover execution logic whenever the operation processing unit receives an instruction for the browser to perform a specified operation. To perform the specified operation, record and save the operation data.

B10、如B8所述的浏览器,其中,B10, the browser as described in B8, wherein,

所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口;The designated operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel;

所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。The browser operation data related to the specified operation interface of the browser kernel includes: address data of webpages accessed by the browser.

B11、如B10所述的浏览器,其中,B11, the browser as described in B10, wherein,

所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;所述让浏览器执行指定操作的指令为让浏览器执行后退操作的指令;The takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited the designated static web page and jumped to the target web page corresponding to the designated static web page; the instruction for the browser to perform the designated operation is to allow the browser to execute Instructions for back operation;

所述对应的接管执行逻辑为:跳过所述指定静态网页,后退到在访问所述指定静态网页之前访问的网页。The corresponding takeover execution logic is: skip the specified static webpage, and return to the webpage accessed before accessing the specified static webpage.

B12、如B10所述的浏览器,其中,B12, the browser as described in B10, wherein,

所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问所述指定静态网页之前访问的网页;所述让浏览器执行指定操作的指令为让浏览器执行前进操作的指令;The takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser visits the designated static web page, it falls back to the web page visited before accessing the designated static web page; Instructions for the browser to perform forward operations;

所述对应的接管执行逻辑为:跳过所述指定静态网页,直接前进到该指定静态网页对应的目标网页。The corresponding takeover execution logic is: skip the specified static webpage, and directly proceed to the target webpage corresponding to the specified static webpage.

Claims (10)

1.一种浏览器实现方法,其中,利用浏览器内核实现浏览器,该方法还包括: 1. A browser implementation method, wherein, utilizing the browser kernel to implement the browser, the method also includes: 预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑; Pre-setting the takeover condition corresponding to the designated operation interface of the browser kernel, and setting the takeover execution logic corresponding to the designated operation interface of the browser kernel; 当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作; When the takeover condition corresponding to the designated operation interface of the browser kernel is not met, when an instruction to allow the browser to perform a designated operation is received, the designated operation interface of the browser kernel is called to perform the designated operation; 当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。 When the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform a specified operation is received, the specified operation is executed by executing the corresponding takeover execution logic. 2.如权利要求1所述的方法,其中,该方法进一步包括: 2. The method of claim 1, wherein the method further comprises: 记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据; Record and save the browser operation data related to the specified operation interface of the browser kernel; 当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。 When the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform the specified operation is received, according to the stored browser operation data related to the specified operation of the browser kernel , execute the corresponding takeover execution logic. 3.如权利要求2所述的方法,其中,所述记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据包括: 3. The method according to claim 2, wherein said recording and saving browser operation data related to the designated operation interface of the browser kernel comprises: 每当接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。 Whenever an instruction for the browser to perform a specified operation is received, no matter whether the specified operation interface of the browser kernel is called to perform the specified operation, or the specified operation is performed by executing the corresponding takeover execution logic, record and save the operation data. 4.如权利要求2所述的方法,其中, 4. The method of claim 2, wherein, 所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口; The designated operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel; 所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。 The browser operation data related to the specified operation interface of the browser kernel includes: address data of webpages accessed by the browser. 5.如权利要求4所述的方法,其中, 5. The method of claim 4, wherein, 所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页并跳转到了该指定静态网页对应的目标网页;所述让浏览器执行指定操作的指令为让浏览器执行后退操作的指令; The takeover condition corresponding to the designated operation interface of the browser kernel is that the browser has visited the designated static web page and jumped to the target web page corresponding to the designated static web page; the instruction for the browser to perform the designated operation is to allow the browser to execute Instructions for back operation; 所述对应的接管执行逻辑为:跳过所述指定静态网页,后退到在访问所述指定静态网页之前访问的网页。 The corresponding takeover execution logic is: skip the specified static webpage, and return to the webpage accessed before accessing the specified static webpage. 6.如权利要求4所述的方法,其中, 6. The method of claim 4, wherein, 所述与浏览器内核的指定操作接口对应的接管条件为浏览器访问了指定静态网页后,后退到了在访问所述指定静态网页之前访问的网页;所述让浏览器执行指定操作的指令为让浏览器执行前进操作的指令; The takeover condition corresponding to the designated operation interface of the browser kernel is that after the browser has visited the designated static web page, it returns to the web page accessed before accessing the designated static web page; the instruction to allow the browser to perform the designated operation is to allow Instructions for the browser to perform forward operations; 所述对应的接管执行逻辑为:跳过所述指定静态网页,直接前进到该指定静态网页对应的目标网页。 The corresponding takeover execution logic is: skip the specified static webpage, and directly proceed to the target webpage corresponding to the specified static webpage. 7.一种浏览器,其中,该浏览器包括浏览器内核,该浏览器还包括: 7. A browser, wherein the browser includes a browser kernel, and the browser also includes: 设置单元,适于预先设置与浏览器内核的指定操作接口对应的接管条件,以及设置与浏览器内核的该指定操作接口对应的接管执行逻辑; The setting unit is suitable for setting in advance the takeover condition corresponding to the designated operation interface of the browser kernel, and setting the takeover execution logic corresponding to the designated operation interface of the browser kernel; 操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件未被满足的情况下接收到让浏览器执行指定操作的指令时,调用浏览器内核的指定操作接口执行该指定操作;当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,通过执行所述相应的接管执行逻辑来执行该指定操作。 The operation processing unit is adapted to call the designated operation interface of the browser kernel to execute the designated operation when receiving an instruction for the browser to perform a designated operation when the takeover condition corresponding to the designated operation interface of the browser kernel is not met Operation: when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied and an instruction for the browser to perform a specified operation is received, the specified operation is executed by executing the corresponding takeover execution logic. 8.如权利要求7所述的浏览器,其中,该浏览器进一步包括: 8. The browser of claim 7, wherein the browser further comprises: 记录单元,适于记录并保存与浏览器内核的指定操作接口相关的浏览器操作数据; A recording unit, adapted to record and save browser operation data related to a specified operation interface of the browser kernel; 所述操作处理单元,适于当所述与浏览器内核的指定操作接口对应的接管条件被满足的情况下接收到让浏览器执行指定操作的指令时,根据保存的所述与浏览器内核的指定操作相关的浏览器操作数据,执行所述相应的接管执行逻辑。 The operation processing unit is adapted to receive an instruction for the browser to perform a specified operation when the takeover condition corresponding to the specified operation interface of the browser kernel is satisfied, according to the stored interface with the browser kernel The browser operation data related to the specified operation is specified, and the corresponding takeover execution logic is executed. 9.如权利要求8所述的浏览器,其中, 9. The browser of claim 8, wherein: 所述记录单元,适于每当所述操作处理单元接收到让浏览器执行指定操作的指令时,无论调用浏览器内核的指定操作接口执行该指定操作,还是通过执行所述相应的接管执行逻辑来执行该指定操作,都进行记录并保存操作数据。 The recording unit is adapted to perform the specified operation by calling the specified operation interface of the browser kernel or by executing the corresponding takeover execution logic whenever the operation processing unit receives an instruction for the browser to perform a specified operation. To perform the specified operation, record and save the operation data. 10.如权利要求8所述的浏览器,其中, 10. The browser of claim 8, wherein: 所述浏览器内核的指定操作接口包括:浏览器内核的前进/后退操作接口; The designated operation interface of the browser kernel includes: the forward/backward operation interface of the browser kernel; 所述与浏览器内核的指定操作接口相关的浏览器操作数据包括:浏览器访问的网页的地址数据。 The browser operation data related to the specified operation interface of the browser kernel includes: address data of webpages accessed by the browser.
CN201510894437.9A 2015-11-27 2015-11-27 A kind of browser and browser implementation method Active CN105404517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510894437.9A CN105404517B (en) 2015-11-27 2015-11-27 A kind of browser and browser implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510894437.9A CN105404517B (en) 2015-11-27 2015-11-27 A kind of browser and browser implementation method

Publications (2)

Publication Number Publication Date
CN105404517A true CN105404517A (en) 2016-03-16
CN105404517B CN105404517B (en) 2018-09-28

Family

ID=55470020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510894437.9A Active CN105404517B (en) 2015-11-27 2015-11-27 A kind of browser and browser implementation method

Country Status (1)

Country Link
CN (1) CN105404517B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678814A (en) * 2017-09-11 2018-02-09 深圳天珑无线科技有限公司 One kind returns to event-handling method, device, mobile terminal and storage medium
WO2021254378A1 (en) * 2020-06-19 2021-12-23 维沃移动通信有限公司 Interface display method and apparatus, and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010047404A1 (en) * 2000-05-24 2001-11-29 Takashi Suda Apparatus for managing web site addresses
US20020073211A1 (en) * 2000-12-12 2002-06-13 Raymond Lin System and method for securely communicating between application servers and webservers
US7200677B1 (en) * 2000-04-27 2007-04-03 Microsoft Corporation Web address converter for dynamic web pages
CN101589375A (en) * 2006-12-21 2009-11-25 微软公司 Managed execution environment for software application interfacing
CN102368213A (en) * 2011-09-26 2012-03-07 奇智软件(北京)有限公司 Page downloading control method and system for IE (Internet Explorer) core browser
CN103678536A (en) * 2013-12-02 2014-03-26 乐视网信息技术(北京)股份有限公司 Method and device for implementing page returning
CN104679747A (en) * 2013-11-26 2015-06-03 腾讯科技(深圳)有限公司 Detection device and method for website redirection
CN104765802A (en) * 2015-03-30 2015-07-08 上海大唐移动通信设备有限公司 Web page display method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200677B1 (en) * 2000-04-27 2007-04-03 Microsoft Corporation Web address converter for dynamic web pages
US20010047404A1 (en) * 2000-05-24 2001-11-29 Takashi Suda Apparatus for managing web site addresses
US20020073211A1 (en) * 2000-12-12 2002-06-13 Raymond Lin System and method for securely communicating between application servers and webservers
CN101589375A (en) * 2006-12-21 2009-11-25 微软公司 Managed execution environment for software application interfacing
CN102368213A (en) * 2011-09-26 2012-03-07 奇智软件(北京)有限公司 Page downloading control method and system for IE (Internet Explorer) core browser
CN104679747A (en) * 2013-11-26 2015-06-03 腾讯科技(深圳)有限公司 Detection device and method for website redirection
CN103678536A (en) * 2013-12-02 2014-03-26 乐视网信息技术(北京)股份有限公司 Method and device for implementing page returning
CN104765802A (en) * 2015-03-30 2015-07-08 上海大唐移动通信设备有限公司 Web page display method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678814A (en) * 2017-09-11 2018-02-09 深圳天珑无线科技有限公司 One kind returns to event-handling method, device, mobile terminal and storage medium
WO2021254378A1 (en) * 2020-06-19 2021-12-23 维沃移动通信有限公司 Interface display method and apparatus, and electronic device

Also Published As

Publication number Publication date
CN105404517B (en) 2018-09-28

Similar Documents

Publication Publication Date Title
JP6129402B2 (en) Creating a page snapshot
CN103746782B (en) Method and apparatus for obtaining feedback information of application
JP6686165B2 (en) Service execution method and device
WO2016107325A1 (en) Page resource loading method and device based on mobile terminal
TW201723897A (en) Method, device, and system for displaying information associated with a web page
CN104111847B (en) A kind of method and device for improving game running speed
CN107832052B (en) Method, apparatus and storage medium and electronic device for displaying preview page
US11455365B2 (en) Data processing method and apparatus
CN105095378A (en) Method and device for loading web page pop-up comments
CN105260421A (en) Webpage loading method and apparatus
CN105260424A (en) Processing method and apparatus for webpage browsing historical records and most common accesses of user
CN104462571A (en) Webpage loading method and device and browser client-side
US10365798B1 (en) Feedback manager for integration with an application
CN103440107A (en) Method and device for processing touch operation of electronic device
CN107807934A (en) Page display method and device and computing device
CN105183890A (en) Webpage loading method based on browser and browser device
CN111143739A (en) Page jump method, computing device and computer storage medium
CN105630310A (en) Method and device for displaying titles during graph group switching
US8860735B2 (en) Aligning script animations with display refresh
CN109343908B (en) A method and device for delay loading JS script
CN111898053A (en) Page browsing method, apparatus, device, and computer-readable storage medium
CN105404517B (en) A kind of browser and browser implementation method
CN106598617A (en) Method for setting webpage shortcut, and electronic equipment
CN103544271A (en) Picture processing window loading method and device for browsers
CN106599257A (en) Page shortcut realization method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right