WO2011088759A1 - Method and device for realizing embedded browser, and digital television receiving terminal - Google Patents

Method and device for realizing embedded browser, and digital television receiving terminal Download PDF

Info

Publication number
WO2011088759A1
WO2011088759A1 PCT/CN2011/070117 CN2011070117W WO2011088759A1 WO 2011088759 A1 WO2011088759 A1 WO 2011088759A1 CN 2011070117 W CN2011070117 W CN 2011070117W WO 2011088759 A1 WO2011088759 A1 WO 2011088759A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
browser
page
module
receiving
Prior art date
Application number
PCT/CN2011/070117
Other languages
French (fr)
Chinese (zh)
Inventor
易睿
Original Assignee
深圳市同洲电子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市同洲电子股份有限公司 filed Critical 深圳市同洲电子股份有限公司
Publication of WO2011088759A1 publication Critical patent/WO2011088759A1/en

Links

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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the field of communications, and in particular, to an implementation method and apparatus for an embedded browser, and a digital television receiving terminal. Background technique
  • the browser has become a must-have software for personal computers (PCs), and is one of the most important ways for users to obtain information.
  • PCs personal computers
  • PDAs personal digital assistants
  • the operating environment of the embedded device is often very different from the operating environment of the PC.
  • the PC running environment when you need to change the size and position of the page, you can open multiple windows (that is, open multiple tasks), and then change the size and position of the page by dragging the window; however, the current embedding Browsers are often single-tasking, not suitable for multi-tasking to manage window information, how to improve embedded browsers to better manage and interact with multiple windows, how to improve user experience is a hot issue that people have been studying . Summary of the invention
  • An embodiment of the present invention provides a method and an apparatus for implementing an embedded browser, and a digital television receiving terminal, which creates and loads a page of a second window when the browser is started, so that the user can manage and interact with the second window. , to bring a better experience to users.
  • an embodiment of the present invention provides an implementation method of an embedded browser, including:
  • the method before the step of creating the at least one second window by using the extended script interface to invoke the external interface preset by the browser, the method further includes:
  • the method further includes:
  • the related information of the second window is recorded, and the related information includes address information and data structure information.
  • the method further includes:
  • the second window After receiving the event message in the message queue for operating the second window, the second window is activated, and the second window is performed according to the operation request and the related information of the recorded second window. Operation
  • the first window After receiving the event message in the message queue for operating the first window, the first window is operated according to the operation request.
  • the second window is activated, and according to the operation request and the related information of the recorded second window,
  • the steps of the second window to operate include:
  • the second window is activated, and the second window is operated according to the operation request and the related information of the recorded second window.
  • the operation request for the second window or the first window comprises a script function for operating the second window or the first window;
  • the step of operating the second window according to the operation request and the related information of the recorded second window comprises: executing a script function for operating the second window by using an extended script interface;
  • the step of operating the first window according to the operation request includes: extending an extended foot
  • the interface executes a script function that operates on the first window.
  • the embodiment of the invention discloses an implementation device of an embedded browser, comprising: a startup receiving module, configured to receive an instruction to start a browser;
  • the first window opens a module for opening a page of the first window
  • a second window creating module configured to create at least one second window by using an extended script interface to invoke an external interface preset by the browser according to the page of the first window;
  • the implementation device of the embedded browser further includes:
  • an external interface setting module configured to set an external interface of the browser for creating the second window.
  • the implementation device of the embedded browser further includes:
  • a recording module configured to record related information of the second window, where the related information includes address information and data structure information.
  • the implementation device of the embedded browser further comprises a window manager for managing a window, the window manager comprising:
  • a request receiving module configured to receive an operation request for the second window or the first window
  • a second operation module configured to activate after receiving an event message that operates the second window in the message queue The second window, and operating the second window according to the operation request and the related information of the recorded second window
  • the first operation module is configured to: when receiving an event message that operates the first window in the message queue, operate the first window according to the operation request.
  • the implementation device of the embedded browser further comprises an event manager, configured to read the message queue, and send the event message in the read message queue to the window manager.
  • an event manager configured to read the message queue, and send the event message in the read message queue to the window manager.
  • the second operation module includes:
  • An event message receiving unit configured to receive an event message sent by the event manager to operate the window
  • a determining unit configured to determine, according to the related information of the second window that is recorded by the recording module, whether the window in the event message is the second window;
  • An operation unit configured to activate the second window when the determination result of the determining unit is YES, And operating the second window according to the operation request and related information of the recorded second window.
  • the operation request for the second window or the first window comprises a script function for operating the second window or the first window;
  • the operation unit is configured to activate the second window when the determination result of the determining unit is YES, and execute a script function for operating the second window by using an extended script interface;
  • the first operation module is configured to execute a script function for operating the first window by using an extended script interface after receiving an event message that is read by the message queue and operating on the first window.
  • an embodiment of the present invention further discloses a digital television receiving terminal, including the implementation device of the embedded browser described above.
  • At least one second window is created by using an extended script interface to invoke an external interface preset by the browser, and a page of the second window is loaded when the browser is started, thereby improving the speed of switching between pages, and the user is Bring a better experience; expand the script interface to more easily manage multiple windows, realize the interaction of multiple windows, facilitate the carrying of more services, and improve the application maintainability of embedded devices, reducing the work of application developers Quantity, improve application development efficiency.
  • FIG. 1 is a schematic flowchart of a method for implementing an embedded browser according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a method for window interaction in an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for implementing an embedded browser according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of another embodiment of an apparatus for implementing an embedded browser according to the present invention. Schematic diagram of the operation module;
  • FIG. 6 is a schematic structural diagram of a digital television receiving terminal according to an embodiment of the present invention. detailed description
  • FIG. 1 a schematic flowchart of an implementation method of an embedded browser according to an embodiment of the present invention, including:
  • Step S101 receiving an instruction to start a browser, and opening a page of the first window
  • the embedded device After the embedded device is started, it will receive an instruction to start the browser, start a browser task, and initialize the browser, such as initializing memory, cache (Cache), resolution, and the like occupied by the browser.
  • the browser will create a first window object, then create a first window page, and open the specified page.
  • the first window in the embodiment of the present invention is the main window, and the page of the first window opened is often Main menu of the main window or portal (entry interface).
  • Step S102 Create, according to the page of the first window, at least one second window by using an extended script interface to invoke an external interface preset by the browser;
  • an external interface (such as a C++ external interface) for creating a second window of the browser is preset, and at least one external interface preset by the browser is created by using an extended script interface according to the page of the first window.
  • the second window that is, according to the application in the page of the first window that is opened, the C++ external interface of the browser is invoked by the extended script interface to create at least one second window, that is, at least one second window is created in the background.
  • the second window in the middle is a floating window, that is, a window that can be superimposed on the first window (the main window); taking the digital television receiving terminal as an example, an electronic can be created according to the needs of the application in the page of the opened first window
  • a second window such as an EPG (Electronic Program Guide) window, a channel management window, a program reservation window, a conditional access CA prompt information window, and a network disconnection information window.
  • the extended script interface includes an extended javascript interface.
  • Step S103 Load a page of the second window.
  • the page of the second window is loaded, such as a more complicated
  • the present invention may further include the step of recording related information of the second window. Specifically, after the second window is successfully created, the second window is registered, and the second window is recorded.
  • the related information includes the address information of the second window (such as memory address information) and the data structure information (such as the name of the window, the window ID, the size of the window, the display state of the window, etc.).
  • the execution function of the T-display javascript interface can control whether the page of the window is displayed or hidden.
  • the display state of the advertisement window is displayed, then by extending the javascript.
  • the interface executes a function for displaying the advertisement window, that is, the page of the advertisement window can be controlled to be displayed, and if the display state of the EPG window is hidden, then the function of hiding the advertisement window is performed by extending the javascript interface, that is, the EPG page can be hidden in the background. .
  • first window and the second window can interact, communicate with each other, and control each other.
  • the process of interacting between the first window and the second window in the present invention is described in detail below with reference to FIG. 2:
  • Step S201 Receive an operation request for the second window or the first window.
  • the user can operate the second window or the first window as needed, such as opening a second window, or closing a second window, or controlling the position of a second window. , size, etc., then the browser will receive an operation request for the second window or the first window, further, the browser can create a window manager for managing the window, mainly responsible for the first window and An interaction of the second window, and a call between the plurality of second windows, the window manager receiving an operation request for the second window or the first window, the operation request including a script function requesting to perform an operation, And some related information of the window requesting the operation, such as the window ID or the memory address information of the window.
  • Step S202 Receive an event message that operates on the window in the message queue.
  • the user can operate the second window or the first window as needed, and the browser sends an event message to the message queue to operate the window.
  • the browser can be created for unified reading.
  • the event manager that takes the event message in the message queue, the event manager continuously reads the message queue, and then sends the event message in the read message queue to the window manager for management operation, that is, the browser sends the message queue to the message queue.
  • the event manager reads the event message in the message queue that operates on the window and sends the event message Sended to the window manager, the browser can receive event messages in the message queue that operate on the window through the window manager.
  • Step S203 determining a window in the event message
  • the browser determines whether the window in the event message that needs to be operated is the first window, and determines whether the window in the event message that needs to be operated is the second window according to the related information of the second window that is recorded.
  • Step S204 When it is determined that the window in the event message is the second window, activate the second window, and view the second window according to the operation request and the related information of the recorded second window. The operation is performed. When it is determined that the window in the event message is the first window, the first window is operated according to the operation request.
  • the second window is activated, and according to Searching for part of the related information of the second window in the operation request to search all the related information of the second window that is pre-recorded (for example, according to the window ID of the second window, correspondingly finding the window name, memory address, window size, etc. of the second window).
  • the information for example, according to the memory address of the second window, correspondingly finds the window name, the window ID, the window size and the like of the second window, and then executes the script function for operating the second window in the operation request through the extended script interface.
  • the script function that operates the first window in the operation request such as controlling the operation of hiding or destroying a second window by the first window. It should be noted that when it is determined that the window in the event message is neither the second window nor the first window, it indicates that the event message sends an error message, does not operate the window, and ends the process.
  • the first window in the digital television receiving terminal interacts with the hidden EPG window, and the hidden EPG window is invoked as an example, which is described in conjunction with the flow steps in FIG. 2 above: when the user needs to display the first from the current
  • the browser main window first sends the EPG window's memory address (or EPG window ID, etc.) and information about which javascript functions need to be executed to the window manager. send The javascript activates the event message to the message queue.
  • the event manager After receiving the javascript activation event message sent by the main window during the process of continuously reading the message queue, the event manager sends the javascript activation event message to the window manager, the window manager.
  • EPG window Immediately finds whether there is currently an EPG window (ie, determines whether it is a second window;), if it exists, activates the EPG window, and executes the main window to send to the EPG window page javiscript function through the extended javascript interface.
  • the extended javascript interface format can be the following format, but is not limited to the following formats: such as floatFrame.frameName.function() , floatFrame. frameName is the second window (floating window) interface that is widely displayed, which refers to the specific Which floating window is called, functionO is the specific javascript function of which floating window such as EPG page. This allows you to control the program content refresh, window size, display position, etc. of the floating window EPG. At this time, the EPG is the active window, and it can respond to any operation of the user, such as switching channels, scheduling programs, and the like. When the user needs to exit the EPG floating window page, it is also necessary to send a message to the first window (the main window).
  • mainFrame.function() mainFrame is the extended interface, which refers to the main window page
  • function() is the javascript function of the main window page, you can perform hidden or It is to destroy the EPG floating window and other actions.
  • the interaction process between the second window and the second window is consistent with the interaction process between the first window and the second window, and the mechanism for performing message delivery is the same, and details are not described herein again.
  • the first window differs from the second window in that the first window is always present and cannot be destroyed unless it exits the browser, and the second window can be created and destroyed anytime, anywhere through the extended script interface.
  • the application maintainability of the embedded browser can also be improved, such as creating a page for the CA various prompts, network status prompts, scheduled program prompts, etc. in the digital television receiving terminal through the extended script interface, when needed
  • the implementation method of the embedded browser of the present invention is described in detail above.
  • the implementation device of the embedded browser of the present invention is described in detail.
  • the implementation device 3 of the embedded browser is shown in FIG.
  • the method includes: a startup receiving module 31, a first window opening module 32, an external interface setting module 33, a second window creating module 34, and a loading page module 35.
  • the startup receiving module 31 is configured to receive an instruction to start a browser.
  • the first window opening module 32 is configured to open a page of the first window
  • the startup receiving module 31 receives an instruction to start the browser, starts a browser task, and initializes the browser, such as initializing the memory occupied by the browser, a cache, and a resolution.
  • the browser will create a first window object, and then create a first window page
  • the first window opening module 32 will open the specified page, the first window in the present invention is the main window (main window), opened
  • the pages of the first window are often the main menu of the main window or the portal (entry interface).
  • the external interface setting module 33 is configured to set an external interface for creating the second window;
  • the second window creating module 34 is configured to invoke, according to the page of the first window, the external preset preset by the browser by using an extended script interface.
  • the interface creates at least one second window;
  • the external interface setting module 33 is configured to create an external interface of the second window (such as a C++ external interface), and then the second window creating module 34 will invoke the external interface setting module by using the extended script interface according to the page of the first window.
  • 33 sets the external interface to create at least one second window, that is, according to the application in the first window of the open window, the at least one second window is created by calling the browser C++ external interface by extending the javascript interface, that is, the browser is created in the background
  • the second window in the present invention is a floating window, that is, a window that can be superimposed on the first window (main window); taking the digital television receiving terminal as an example, the second window creating module 34 is opened according to
  • the application of the first window page can create an electronic program menu (EPG, Electronic Program Guide) window, a channel management window, a program reservation window, a digital certificate authority (CA, Certificate Authority) prompt information window, a network disconnection information window. Wait for the second window.
  • EPG Electronic Program Guide
  • CA digital
  • the load page module 35 is for loading a page of the second window.
  • the loading page module 35 loads the page of the second window, such as a more complicated EPG page, a channel management page, a program reservation page, a CA prompt information page, a network disconnection information page, and the like. And notifying the browser that the second window is created and loaded successfully, that is, while the embedded device is started, the first window page is opened, and the browser has created and loaded the second window in the background.
  • FIG. 4 is a schematic structural diagram of another embodiment of an implementation apparatus of the embedded browser of the present invention, and further details the structure of the implementation apparatus of the embedded browser of the present invention.
  • the implementation device of the embedded browser 3 In addition to the startup receiving module 31, the first window opening module 32, the external interface setting module 33, the second window creating module 34, and the loading page module 35, the recording module 36, the window manager 37, and the event manager 38 are further included.
  • the recording module 36 is configured to record related information of the second window, where the related information includes address information and data structure information;
  • the recording module 36 registers the second window, and records related information of the second window, including address information (such as memory address information) and data structure information of the second window. (such as the name of the window, the window ID, the size of the window, the display status of the window, etc.).
  • address information such as memory address information
  • data structure information of the second window such as the name of the window, the window ID, the size of the window, the display status of the window, etc.
  • the display state information of the window when the page of the window can be controlled to be displayed or hidden by extending the javascript interface, generally, if the display state of the advertisement window is displayed, then by extending the control of the javascript interface, the advertisement The page of the window can be displayed, and if the display state of the EPG window is hidden, then by extending the control of the javascript interface, the EPG page is hidden in the background.
  • the window manager 37 is configured to manage the window, mainly responsible for the interaction between the first window and the second window, and the call between the plurality of second windows.
  • the window manager 37 includes a request receiving module 371 and a second operation module. 372 and a first operation module 373.
  • the request receiving module 371 is configured to receive an operation request for the second window or the first window
  • the user can operate the second window or the first window as needed, such as opening a second window, or closing a second window, or controlling the position of a second window. , size, etc., then the request receiving module 37 will receive an operation request for the second window or the first window, the operation request including a script function requesting to perform the operation, and part of the related information of the window requesting the operation (eg Window ID or window memory address information, etc.).
  • the request receiving module 37 will receive an operation request for the second window or the first window, the operation request including a script function requesting to perform the operation, and part of the related information of the window requesting the operation (eg Window ID or window memory address information, etc.).
  • the second operation module 372 is configured to activate the second window after receiving the event message that operates the second window in the message queue, and according to the operation request and related information of the recorded second window Operating the second window;
  • FIG. 5 is a schematic structural diagram of a second operation module according to an embodiment of the present invention
  • the operation module 372 includes an event message receiving unit 3721, a determining unit 3722, and an operating unit 3723.
  • the event message receiving unit 3721 is configured to receive an event message that operates on the window in the message queue;
  • the user can operate the second window or the first window as needed, and the browser sends an event message to the message queue to operate the window.
  • the browser can be created for unified reading.
  • the event manager that takes the event message in the message queue, the event manager continuously reads the message queue, and then sends the event message in the read message queue to the window manager for management operation, that is, the browser sends the message queue to the message queue.
  • the event manager reads the event message in the message queue that operates on the window, and sends the event message to the window manager, then the event message receiving unit 3721 receives the message queue. An event message that operates on the window.
  • the determining unit 3722 is configured to determine whether the window in the event message is the second window according to related information of the second window recorded by the recording module;
  • the operation unit 3723 is configured to activate the second window when the determination result of the determining unit 3722 is YES, and operate the second window according to the operation request and the related information of the recorded second window;
  • the operating unit 3723 activates the second window. And searching for all the related information of the second window that is pre-recorded according to the partial related information of the second window in the operation request (for example, according to the window ID of the second window, correspondingly finding the window name, the memory address, and the memory address of the second window, The size of the window and the like, and according to the memory address of the second window, correspondingly find the window name, the window ID, the window size and the like of the second window, and then operate the second window by executing the operation request through the extended script interface.
  • Script functions such as updating the contents of the second window, adjusting the position and size of the second window, displaying, hiding, or closing (destroying) the second window.
  • the first operation module 373 is configured to: when receiving an event message that operates the first window in the message queue, operate the first window according to the operation request.
  • the extended script interface is used.
  • a script function that operates the first window in the operation request such as controlling the first window to perform an operation of hiding or destroying a second window.
  • the event manager 38 is operative to continuously read the message queue and send the event message in the read message queue to the window manager 37 for management operations. Specifically, the second operation module 372 and the first operation module 373 in the window manager 37 operate in accordance with the event message sent by the received event manager 38.
  • the present invention also discloses a digital television receiving terminal.
  • the digital television receiving terminal 6 includes the implementing device 3 of the embedded browser of the present invention. Further, the following is first in the digital television receiving terminal 6.
  • the window interacts with the hidden EPG window, and the hidden EPG window is called as an example:
  • the browser main window When the user needs to switch from the currently displayed first window (main window) to the EPG page of the hidden EPG window, the browser main window first sets the memory address (or EPG window ID, etc.) of the EPG window, and which functions need to be executed.
  • the information is sent to the window manager 37, and an activation event message is sent to the message queue.
  • the event manager 38 sends the activation event message after receiving the activation event message sent by the main window during the process of continuously reading the message queue.
  • the window manager 37 To the window manager 37, the window manager 37 immediately finds whether there is currently an EPG window (ie, determines whether it is a second window), activates the EPG window if it exists, and executes the main window to be sent to the EPG window surface javascript function through the extended javascript interface. .
  • the extended javascript interface format can be the following format, but is not limited to the following formats: such as floatFrame.frameName.function(), floatFrame. frameName is the second window (floating window) interface that is widely displayed, which refers to the specific Which floating window is called, functionO is the specific javascript function of which floating window such as EPG page. This allows you to control the program content refresh, window size, display position, etc. of the floating window EPG. At this time, the EPG is the active window, and it can respond to any operation of the user, such as switching channels, scheduling programs, and the like. When the user needs to exit the EPG floating window page, it is also necessary to send a message to the first window (the main window).
  • the first window is different from the second window in that the first window is always present and cannot be destroyed unless exiting the browser, and the second window can be created and destroyed anytime and anywhere through the extended script interface; in addition to the digital television receiving terminal of the present invention
  • other embedded devices such as mobile phones and PDAs, etc., may include the implementation device 3 of the embedded browser of the above embodiment.
  • the digital television receiving terminal of the present invention includes, but is not limited to, a set top box, an Internet Protocol Television (IPTV), a digital television integrated machine, a television mobile phone, and the like having a function of receiving a digital television.
  • IPTV Internet Protocol Television
  • the at least one second window is created by using the extended script interface to call the external interface preset by the browser, and the page of the second window is loaded when the browser is started, thereby improving the speed of switching between pages, and bringing the user a For a better experience; expand the script interface to more easily manage multiple windows, realize the interaction of multiple windows, facilitate the carrying of more services, and improve the application maintainability of embedded devices, reducing the workload of application developers
  • the application can also freely develop many second windows with beautiful effects to enhance the user experience.
  • it can carry more services, such as widgets, advertisements, etc., and is more convenient to control. , solves the problem that the existing single window browser can only browse a single page.

Abstract

A method for realizing an embedded browser is disclosed. The method includes: receiving an instruction for starting the browser and opening a page of the first window; according to the page of the first window, calling an external interface preset by the browser through an expanded script interface to establish at least one second window; and loading a page of the second window. A device for realizing the embedded browser and a digital television receiving terminal are also disclosed. The external interface preset by the browser is called through expanded script interface to establish at least one second window, and the page of the second window is loaded when the browser is started, thereby improving the switching speed between the pages; and by expanding the script interface, a plurality of windows can be managed more conveniently, so as to implement the interaction of the plurality of windows, facilitate the bearing of more services, improve the application maintenance of embedded devices, reduce the workload of application developers and improve the efficiency of application development.

Description

嵌入式浏览器的实现方法、 装置和数字电视接收终端 本申请要求于 2010 年 1 月 21 日提交中国专利局、 申请号为 201010044461.0、 发明名称为"嵌入式浏览器的实现方法、 装置和数字电视接 收终端 "的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  Implementation method, device and digital television receiving terminal of embedded browser This application claims to be submitted to the Chinese Patent Office on January 21, 2010, the application number is 201010044461.0, and the invention name is "implemented browser implementation method, device and digital television" Priority of the Chinese Patent Application for Receiving Terminals, the entire contents of which are incorporated herein by reference. Technical field
本发明涉及通信领域, 尤其涉及一种嵌入式浏览器的实现方法、 装置和一 种数字电视接收终端。 背景技术  The present invention relates to the field of communications, and in particular, to an implementation method and apparatus for an embedded browser, and a digital television receiving terminal. Background technique
浏览器已经成为了个人计算机( PC, Personal Computer )的必备软件, 是 用户获取信息的最主要方式之一。 随着科学技术的发展, 浏览器也逐渐地被配 置到嵌入式设备上, 成为这些设备获取信息的主要渠道, 如机项盒、 手机和个 人数码助理(PDA, Personal Digital Assistant ) 等。  The browser has become a must-have software for personal computers (PCs), and is one of the most important ways for users to obtain information. With the development of science and technology, browsers are gradually being deployed on embedded devices, becoming the main channel for these devices to obtain information, such as machine boxes, mobile phones and personal digital assistants (PDAs).
但是嵌入式设备的运行环境与 PC的运行环境往往存在很大区别。 在 PC 运行环境中, 当需要改变页面的大小、 位置等信息时, 可以打开多个窗口 (即 打开多个任务), 然后通过拖动窗口来改变页面的大小、 位置等信息; 然而当 前的嵌入式浏览器往往是单任务运行, 不适合启动多任务来管理窗口的信息, 如何改进嵌入式浏览器以更好地实现多窗口的管理和交互,如何提高用户的体 验是人们一直研究的热点问题。 发明内容  However, the operating environment of the embedded device is often very different from the operating environment of the PC. In the PC running environment, when you need to change the size and position of the page, you can open multiple windows (that is, open multiple tasks), and then change the size and position of the page by dragging the window; however, the current embedding Browsers are often single-tasking, not suitable for multi-tasking to manage window information, how to improve embedded browsers to better manage and interact with multiple windows, how to improve user experience is a hot issue that people have been studying . Summary of the invention
本发明实施例在于提供一种嵌入式浏览器的实现方法、装置和一种数字电 视接收终端, 在启动浏览器时即创建并加载第二窗口的页面,便于用户对第二 窗口的管理和交互, 给用户带来更好的体验。  An embodiment of the present invention provides a method and an apparatus for implementing an embedded browser, and a digital television receiving terminal, which creates and loads a page of a second window when the browser is started, so that the user can manage and interact with the second window. , to bring a better experience to users.
为了达到上述技术效果,本发明实施例提出了一种嵌入式浏览器的实现方 法, 包括:  In order to achieve the above technical effects, an embodiment of the present invention provides an implementation method of an embedded browser, including:
接收启动浏览器的指令, 打开第一窗口的页面;  Receiving an instruction to start a browser, opening a page of the first window;
根据所述第一窗口的页面,通过扩展脚本接口调用所述浏览器预先设置的 对外接口创建至少一个第二窗口; 加载所述第二窗口的页面。 Deleting at least one second window by using an extended script interface to invoke an external interface preset by the browser according to the page of the first window; Loading the page of the second window.
优选地,所述通过扩展脚本接口调用所述浏览器预先设置的对外接口创建 至少一个第二窗口的步 之前, 还包括:  Preferably, before the step of creating the at least one second window by using the extended script interface to invoke the external interface preset by the browser, the method further includes:
设置浏览器的用于创建所述第二窗口的对外接口。  Setting an external interface of the browser for creating the second window.
优选地,所述通过扩展脚本接口调用所述浏览器预先设置的对外接口创建 至少一个第二窗口的步驟之后, 还包括:  Preferably, after the step of calling the external interface preset by the browser to create at least one second window by using the extended script interface, the method further includes:
记录所述第二窗口的相关信息,所述相关信息包括地址信息和数据结构信 息。  The related information of the second window is recorded, and the related information includes address information and data structure information.
优选地, 所述加载所述第二窗口的页面的步骤之后, 还包括:  Preferably, after the step of loading the page of the second window, the method further includes:
接收对所述第二窗口或所述第一窗口的操作请求;  Receiving an operation request for the second window or the first window;
当接收到消息队列中对所述第二窗口进行操作的事件消息后,激活所述第 二窗口,并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二 窗口进行操作;  After receiving the event message in the message queue for operating the second window, the second window is activated, and the second window is performed according to the operation request and the related information of the recorded second window. Operation
当接收到消息队列中对所述第一窗口进行操作的事件消息后,根据所述操 作请求对所述第一窗口进行操作。  After receiving the event message in the message queue for operating the first window, the first window is operated according to the operation request.
优选地所述当接收到消息队列中对所述第二窗口进行操作的事件消息后, 激活所述第二窗口,并根据所述操作请求以及记录的所述第二窗口的相关信息 对所述第二窗口进行操作的步骤包括:  Preferably, after receiving the event message in the message queue for operating the second window, the second window is activated, and according to the operation request and the related information of the recorded second window, The steps of the second window to operate include:
接收消息队列中对窗口进行操作的事件消息;  Receiving an event message in the message queue that operates on the window;
根据记录的所述第二窗口的相关信息,判断所述事件消息中的窗口是否为 所述第二窗口;  Determining, according to the related information of the second window that is recorded, whether the window in the event message is the second window;
当判断结杲为是时, 则激活所述第二窗口, 并根据所述操作请求以及记录 的所述第二窗口的相关信息对所述第二窗口进行操作。  When it is judged that the flag is YES, the second window is activated, and the second window is operated according to the operation request and the related information of the recorded second window.
优选地,对所述第二窗口或所述第一窗口的操作请求包括对所述第二窗口 或所述第一窗口进行操作的脚本函数;  Preferably, the operation request for the second window or the first window comprises a script function for operating the second window or the first window;
所述根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二 窗口进行操作的步骤包括:通过扩展脚本接口执行对所述第二窗口进行操作的 脚本函数;  The step of operating the second window according to the operation request and the related information of the recorded second window comprises: executing a script function for operating the second window by using an extended script interface;
所述根据所述操作请求对所述第一窗口进行操作的步骤包括:通过扩展脚 本接口执行对所述第一窗口进行操作的脚本函数。 The step of operating the first window according to the operation request includes: extending an extended foot The interface executes a script function that operates on the first window.
相应地, 本发明实施例公开了一种嵌入式浏览器的实现装置, 包括: 启动接收模块, 用于接收启动浏览器的指令;  Correspondingly, the embodiment of the invention discloses an implementation device of an embedded browser, comprising: a startup receiving module, configured to receive an instruction to start a browser;
第一窗口打开模块, 用于打开第一窗口的页面;  The first window opens a module for opening a page of the first window;
第二窗口创建模块, 用于根据所述第一窗口的页面, 通过扩展脚本接口调 用所述浏览器预先设置的对外接口创建至少一个第二窗口;  a second window creating module, configured to create at least one second window by using an extended script interface to invoke an external interface preset by the browser according to the page of the first window;
加载页面模块, 用于加载所述第二窗口的页面。  Loading a page module for loading a page of the second window.
优选地, 所述嵌入式浏览器的实现装置还包括:  Preferably, the implementation device of the embedded browser further includes:
对外接口设置模块, 用于设置浏览器的用于创建所述第二窗口的对外接 口。  And an external interface setting module, configured to set an external interface of the browser for creating the second window.
优选地, 所述嵌入式浏览器的实现装置还包括:  Preferably, the implementation device of the embedded browser further includes:
记录模块, 用于记录所述第二窗口的相关信息, 所述相关信息包括地址信 息和数据结构信息。  And a recording module, configured to record related information of the second window, where the related information includes address information and data structure information.
优选地, 所述嵌入式浏览器的实现装置还包括用于管理窗口的窗口管理 器, 所述窗口管理器包括:  Preferably, the implementation device of the embedded browser further comprises a window manager for managing a window, the window manager comprising:
请求接收模块, 用于接收对所述第二窗口或所述第一窗口的操作请求; 第二操作模块,用于当接收到消息队列中对所述第二窗口进行操作的事件 消息后, 激活所述第二窗口, 并根据所述操作请求以及记录的所述第二窗口的 相关信息对所述第二窗口进行操作;  a request receiving module, configured to receive an operation request for the second window or the first window; and a second operation module, configured to activate after receiving an event message that operates the second window in the message queue The second window, and operating the second window according to the operation request and the related information of the recorded second window;
第一操作模块,用于当接收到消息队列中对所述第一窗口进行操作的事件 消息后, 根据所述操作请求对所述第一窗口进行操作。  The first operation module is configured to: when receiving an event message that operates the first window in the message queue, operate the first window according to the operation request.
优选地, 所述嵌入式浏览器的实现装置还包括事件管理器, 用于读取消息 队列, 并将读取的消息队列中事件消息发送给所述窗口管理器。  Preferably, the implementation device of the embedded browser further comprises an event manager, configured to read the message queue, and send the event message in the read message queue to the window manager.
优选地, 所述第二操作模块包括:  Preferably, the second operation module includes:
事件消息接收单元,用于接收所述事件管理器发送的对窗口进行操作的事 件消息;  An event message receiving unit, configured to receive an event message sent by the event manager to operate the window;
判断单元, 用于根据所述记录模块记录的所述第二窗口的相关信息, 判断 所述事件消息中的窗口是否为所述第二窗口;  a determining unit, configured to determine, according to the related information of the second window that is recorded by the recording module, whether the window in the event message is the second window;
操作单元,用于当所述判断单元的判断结果为是时,则激活所述第二窗口, 并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二窗口进 行操作。 An operation unit, configured to activate the second window when the determination result of the determining unit is YES, And operating the second window according to the operation request and related information of the recorded second window.
优选地,对所述第二窗口或所述第一窗口的操作请求包括对所述第二窗口 或所述第一窗口进行操作的脚本函数;  Preferably, the operation request for the second window or the first window comprises a script function for operating the second window or the first window;
所述操作单元用于当所述判断单元的判断结果为是时,则激活所述第二窗 口, 并通过扩展脚本接口执行对所述第二窗口进行操作的脚本函数;  The operation unit is configured to activate the second window when the determination result of the determining unit is YES, and execute a script function for operating the second window by using an extended script interface;
所述第一操作模块用于当接收到消息队列读取的对所述第一窗口进行操 作的事件消息后, 通过扩展脚本接口执行对所述第一窗口进行操作的脚本函 数。  The first operation module is configured to execute a script function for operating the first window by using an extended script interface after receiving an event message that is read by the message queue and operating on the first window.
相应地, 本发明实施例还公开了一种数字电视接收终端, 包括上述的嵌入 式浏览器的实现装置。  Correspondingly, an embodiment of the present invention further discloses a digital television receiving terminal, including the implementation device of the embedded browser described above.
实施本发明实施例,通过扩展脚本接口调用所述浏览器预先设置的对外接 口创建至少一个第二窗口, 在启动浏览器时即加载第二窗口的页面,提高了页 面间切换的速度, 给用户带来更好的体验; 通过扩展脚本接口可以更加方便地 管理多个窗口, 实现多个窗口的交互, 便于承载更多的业务, 并提高嵌入式设 备的应用维护性, 减少应用开发人员的工作量, 提高应用开发效率。 附图说明  In the embodiment of the present invention, at least one second window is created by using an extended script interface to invoke an external interface preset by the browser, and a page of the second window is loaded when the browser is started, thereby improving the speed of switching between pages, and the user is Bring a better experience; expand the script interface to more easily manage multiple windows, realize the interaction of multiple windows, facilitate the carrying of more services, and improve the application maintainability of embedded devices, reducing the work of application developers Quantity, improve application development efficiency. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1是本发明实施例嵌入式浏览器的实现方法的流程示意图;  1 is a schematic flowchart of a method for implementing an embedded browser according to an embodiment of the present invention;
图 2是本发明实施例中窗口交互的方法流程示意图;  2 is a schematic flow chart of a method for window interaction in an embodiment of the present invention;
图 3是本发明实施例的嵌入式浏览器的实现装置的结构示意图; 图 4是本发明嵌入式浏览器的实现装置的另一实施例的结构示意图; 图 5是本发明实施例的第二操作模块的结构示意图;  3 is a schematic structural diagram of an apparatus for implementing an embedded browser according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of another embodiment of an apparatus for implementing an embedded browser according to the present invention; Schematic diagram of the operation module;
图 6是本发明实施例的数字电视接收终端的结构示意图。 具体实施方式 FIG. 6 is a schematic structural diagram of a digital television receiving terminal according to an embodiment of the present invention. detailed description
为了使本发明所要解决的技术问题、 技术方案及有益效果更加清楚明白, 以下结合附图及实施例, 对本发明进行进一步详细说明。  In order to make the technical problems, the technical solutions and the beneficial effects of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
请参阅图 1示出的本发明实施例嵌入式浏览器的实现方法的流程示意图, 包括:  Referring to FIG. 1 , a schematic flowchart of an implementation method of an embedded browser according to an embodiment of the present invention, including:
步骤 S101 : 接收启动浏览器的指令, 打开第一窗口的页面;  Step S101: receiving an instruction to start a browser, and opening a page of the first window;
具体地, 嵌入式设备启动以后, 将接收到启动浏览器的指令, 启动浏览器 任务,并进行浏览器的初始化,如初始化洌览器占用的内存、高速緩存( Cache ), 分辨率等参数,然后浏览器将创建一个第一窗口对象,接着创建第一窗口页面, 并打开指定的页面, 本发明实施例中的第一窗口即主窗口 (main window ), 打 开的第一窗口的页面往往为主窗口的主菜单或 portal (入口界面 )。  Specifically, after the embedded device is started, it will receive an instruction to start the browser, start a browser task, and initialize the browser, such as initializing memory, cache (Cache), resolution, and the like occupied by the browser. The browser will create a first window object, then create a first window page, and open the specified page. The first window in the embodiment of the present invention is the main window, and the page of the first window opened is often Main menu of the main window or portal (entry interface).
步骤 S102: 根据所述第一窗口的页面, 通过扩展脚本接口调用所述浏览 器预先设置的对外接口创建至少一个第二窗口;  Step S102: Create, according to the page of the first window, at least one second window by using an extended script interface to invoke an external interface preset by the browser;
具体地,预先设置浏览器的用于创建第二窗口的对外接口(如 C++对外接 口), 根据所述第一窗口的页面, 通过扩展脚本接口调用所述浏览器预先设置 的对外接口创建至少一个第二窗口, 即可以根据打开的第一窗口的页面中应 用,通过扩展脚本接口调用浏览器的 C++对外接口创建至少一个第二窗口,即, 在后台创建至少一个第二窗口, 本发明实施例中的第二窗口为浮动窗口, 即, 可以叠加在第一窗口 (主窗口)之上的窗口; 以数字电视接收终端为例, 根据 打开的第一窗口的页面中应用的需要,可以创建电子节目菜单( EPG , Electronic Program Guide )窗口、 频道管理窗口、 节目预定窗口、 条件接收 C A提示信息 窗口、 网络断开信息窗口等第二窗口。 其中扩展脚本接口包括扩展 javascript 接口。  Specifically, an external interface (such as a C++ external interface) for creating a second window of the browser is preset, and at least one external interface preset by the browser is created by using an extended script interface according to the page of the first window. The second window, that is, according to the application in the page of the first window that is opened, the C++ external interface of the browser is invoked by the extended script interface to create at least one second window, that is, at least one second window is created in the background. The second window in the middle is a floating window, that is, a window that can be superimposed on the first window (the main window); taking the digital television receiving terminal as an example, an electronic can be created according to the needs of the application in the page of the opened first window A second window such as an EPG (Electronic Program Guide) window, a channel management window, a program reservation window, a conditional access CA prompt information window, and a network disconnection information window. The extended script interface includes an extended javascript interface.
步骤 S103: 加载所述第二窗口的页面。  Step S103: Load a page of the second window.
具体地, 第二窗口创建完毕后, 加载所述第二窗口的页面, 如较复杂的 Specifically, after the second window is created, the page of the second window is loaded, such as a more complicated
EPG页面、 频道管理页面、 节目预定页面、 CA提示信息页面、 网络断开信息 页面等等, 并通知浏览器任务第二窗口的创建与加载成功, 即, 在启动嵌入式 设备, 打开第一窗口页面的同时, 浏览器已经在后台创建和加载完毕第二窗口 的页面。 进一步地, 步骤 S102之后, 本发明还可以包括记录所述第二窗口的相关 信息的步骤, 具体地, 所述第二窗口创建成功后, 将注册所述第二窗口, 记录 所述第二窗口的相关信息, 包括第二窗口的地址信息(如内存地址信息)和数 据结构信息(如窗口的名称、 窗口 ID、 窗口的大小、 窗口的显示状态等信息) 等。 需要说明的是, 根据所述窗口的显示状态信息, 通过: T展 javascript接口 执行相关函数可以控制该窗口的页面是显示还是隐藏,一般地, 如广告窗口的 显示状态为显示, 那么通过扩展 javascript接口执行显示该广告窗口的函数, 即可以控制广告窗口的页面为显示状态, 又如 EPG窗口显示状态为隐藏, 那 么通过扩展 javascript接口执行隐藏该广告窗口的函数, 即可以控制 EPG页面 隐藏在后台。 EPG page, channel management page, program reservation page, CA prompt information page, network disconnection information page, etc., and notify the browser that the second window is created and loaded successfully, that is, when the embedded device is started, the first window is opened. At the same time as the page, the browser has created and loaded the page of the second window in the background. Further, after step S102, the present invention may further include the step of recording related information of the second window. Specifically, after the second window is successfully created, the second window is registered, and the second window is recorded. The related information includes the address information of the second window (such as memory address information) and the data structure information (such as the name of the window, the window ID, the size of the window, the display state of the window, etc.). It should be noted that, according to the display state information of the window, the execution function of the T-display javascript interface can control whether the page of the window is displayed or hidden. Generally, if the display state of the advertisement window is displayed, then by extending the javascript. The interface executes a function for displaying the advertisement window, that is, the page of the advertisement window can be controlled to be displayed, and if the display state of the EPG window is hidden, then the function of hiding the advertisement window is performed by extending the javascript interface, that is, the EPG page can be hidden in the background. .
再进一步地, 本发明中第一窗口与第二窗口可以进行交互, 互相通信, 互 相控制, 下面结合图 2, 详细说明本发明中第一窗口与第二窗口进行交互的过 程:  Further, in the present invention, the first window and the second window can interact, communicate with each other, and control each other. The process of interacting between the first window and the second window in the present invention is described in detail below with reference to FIG. 2:
步骤 S201: 接收对所述第二窗口或所述第一窗口的操作请求;  Step S201: Receive an operation request for the second window or the first window.
具体地, 用户可以根据需要对所述第二窗口或者所述第一窗口进行操作, 如需要打开显示某个第二窗口, 或者关闭隐藏某个第二窗口, 或者控制某个第 二窗口的位置、 大小等, 那么浏览器将接收到对所述第二窗口或所述第一窗口 的操作请求, 进一步地, 浏览器可以通过创建用于管理窗口的窗口管理器, 主 要是负责第一窗口与第二窗口的交互, 以及多个第二窗口之间的调用, 由该窗 口管理器接收对所述第二窗口或所述第一窗口的操作请求,该操作请求包括请 求执行操作的脚本函数, 以及请求操作的窗口的部分相关信息, 如窗口 ID或 窗口的内存地址信息等。  Specifically, the user can operate the second window or the first window as needed, such as opening a second window, or closing a second window, or controlling the position of a second window. , size, etc., then the browser will receive an operation request for the second window or the first window, further, the browser can create a window manager for managing the window, mainly responsible for the first window and An interaction of the second window, and a call between the plurality of second windows, the window manager receiving an operation request for the second window or the first window, the operation request including a script function requesting to perform an operation, And some related information of the window requesting the operation, such as the window ID or the memory address information of the window.
步骤 S202: 接收消息队列中对窗口进行操作的事件消息;  Step S202: Receive an event message that operates on the window in the message queue.
具体地,用户可以根据需要对所述第二窗口或者所述第一窗口进行操作的 同时, 浏览器向消息队列发送对窗口进行操作的事件消息, 进一步地, 浏览器 可以通过创建用于统一读取消息队列中的事件消息的事件管理器,由事件管理 器不断地读取消息队列,然后将读取的消息队列中事件消息发送给窗口管理器 进行管理操作, 即, 浏览器向消息队列发送对窗口进行操作的事件消息后, 事 件管理器读取到消息队列中的对窗口进行操作的事件消息,并将该事件消息发 送给窗口管理器,那么浏览器通过窗口管理器就可以接收到消息队列中对窗口 进行操作的事件消息。 Specifically, the user can operate the second window or the first window as needed, and the browser sends an event message to the message queue to operate the window. Further, the browser can be created for unified reading. The event manager that takes the event message in the message queue, the event manager continuously reads the message queue, and then sends the event message in the read message queue to the window manager for management operation, that is, the browser sends the message queue to the message queue. After the event message that operates on the window, the event manager reads the event message in the message queue that operates on the window and sends the event message Sended to the window manager, the browser can receive event messages in the message queue that operate on the window through the window manager.
步骤 S203: 判断所述事件消息中的窗口;  Step S203: determining a window in the event message;
具体地, 浏览器将判断事件消息中需要进行操作的窗口是否为第一窗口, 以及根据记录的所述第二窗口的相关信息判断事件消息中需要进行操作的窗 口是否为第二窗口。  Specifically, the browser determines whether the window in the event message that needs to be operated is the first window, and determines whether the window in the event message that needs to be operated is the second window according to the related information of the second window that is recorded.
步骤 S204: 当判断出所述事件消息中的窗口为第二窗口时, 则激活所述 第二窗口,并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第 二窗口进行操作; 当判断出所述事件消息中的窗口为第一窗口时, 则根据所述 操作请求对所述第一窗口进行操作。  Step S204: When it is determined that the window in the event message is the second window, activate the second window, and view the second window according to the operation request and the related information of the recorded second window. The operation is performed. When it is determined that the window in the event message is the first window, the first window is operated according to the operation request.
具体地, 当判断出所述事件消息中的窗口为第二窗口时, 表明用户需要从 当前第一窗口或者另外某个第二窗口中调用该第二窗口, 则激活该第二窗口, 并根据操作请求中该第二窗口的部分相关信息查找预先记录的该第二窗口的 全部相关信息 (如根据第二窗口的窗口 ID, 对应查找出该第二窗口的窗口名 称、 内存地址、 窗口大小等信息, 又如根据第二窗口的内存地址, 对应查找出 该第二窗口的窗口名称、 窗口 ID、 窗口大小等信息), 然后通过扩展脚本接口 执行操作请求中对第二窗口进行操作的脚本函数, 如更新该第二窗口的内容、 调整第二窗口的位置和大小、 对该第二窗口进行显示、 隐藏或关闭 (销毁)等 操作; 当判断出所述事件消息中的窗口为第一窗口时, 表明用户需要从当前某 个第二窗口中调用第一窗口,那么将通过扩展脚本接口执行操作请求中对第一 窗口进行操作的脚本函数,如控制第一窗口执行隐藏或销毁某个第二窗口的操 作等。 需要说明的是, 当判断出接收到所述事件消息中的窗口既不为第二窗口 也不为第一窗口时, 则表明事件消息发送了错误消息, 不对窗口进行操作, 结 束流程。  Specifically, when it is determined that the window in the event message is the second window, indicating that the user needs to call the second window from the current first window or another second window, the second window is activated, and according to Searching for part of the related information of the second window in the operation request to search all the related information of the second window that is pre-recorded (for example, according to the window ID of the second window, correspondingly finding the window name, memory address, window size, etc. of the second window The information, for example, according to the memory address of the second window, correspondingly finds the window name, the window ID, the window size and the like of the second window, and then executes the script function for operating the second window in the operation request through the extended script interface. And updating the content of the second window, adjusting the position and size of the second window, displaying, hiding, or closing (destroying) the second window; and determining that the window in the event message is the first window When it indicates that the user needs to call the first window from a current second window, it will be connected through the extended script. The script function that operates the first window in the operation request, such as controlling the operation of hiding or destroying a second window by the first window. It should be noted that when it is determined that the window in the event message is neither the second window nor the first window, it indicates that the event message sends an error message, does not operate the window, and ends the process.
进一步地, 下面以在数字电视接收终端中第一窗口与隐藏的 EPG窗口进 行交互, 调用隐藏的 EPG窗口为例子, 结合上述图 2中的流程步骤进行说明: 当用户需要从当前显示的第一窗口 (主窗口 )切换到隐藏的 EPG窗口的 EPG页面时,浏览器主窗口首先将 EPG窗口的内存地址(或 EPG窗口 ID等), 以及需要执行哪些 javascript 函数等信息发送到窗口管理器, 同时发送 javascript 激活事件消息给消息队列, 事件管理器在不断地读取消息队列的过 程中接收到主窗口发来的 javascript激活事件消息后, 就将该 javascript激活事 件消息发送给窗口管理器, 窗口管理器立即查找当前是否存在 EPG窗口 (即 判断是否为第二窗口;), 若存在则激活 EPG 窗口, 并且通过扩展的 javascript 接口执行主窗口发送给 EPG窗口页面 j avascript函数。 Further, in the following, the first window in the digital television receiving terminal interacts with the hidden EPG window, and the hidden EPG window is invoked as an example, which is described in conjunction with the flow steps in FIG. 2 above: when the user needs to display the first from the current When the window (main window) is switched to the EPG page of the hidden EPG window, the browser main window first sends the EPG window's memory address (or EPG window ID, etc.) and information about which javascript functions need to be executed to the window manager. send The javascript activates the event message to the message queue. After receiving the javascript activation event message sent by the main window during the process of continuously reading the message queue, the event manager sends the javascript activation event message to the window manager, the window manager. Immediately finds whether there is currently an EPG window (ie, determines whether it is a second window;), if it exists, activates the EPG window, and executes the main window to send to the EPG window page javiscript function through the extended javascript interface.
需要说明的是, 扩展 javascript接口格式可以为以下格式, 但不限于以下 格式: 如 floatFrame.frameName.function() , floatFrame. frameName是才广展的第 二窗口 (浮动窗口)接口, 指的就是具体调用哪个浮动窗口, functionO就是具 体哪个浮动窗口如 EPG页面的 javascript函数。这样就可以控制浮动窗口 EPG 的节目内容刷新, 窗口大小, 显示位置等。 此时 EPG即为活动窗口, 也就可 以响应用户的任何操作, 如上下切换频道, 预定节目等。 当用户需要退出 EPG 浮动窗口页面时, 同样需要也是发送消息给第一窗口 (主窗口), 此过程与主 窗口发送给浮动窗口过程是一致的,当浮动窗口需要调用主窗口页面的某个函 数时, 也需要通过扩展的 javascript 接口调用, 如: mainFrame.function() , mainFrame是扩展的接口, 指的就是主窗口页面, function()就是主窗口页面的 javascript函数, 此时就可以执行隐藏或是销毁 EPG浮动窗口等动作。  It should be noted that the extended javascript interface format can be the following format, but is not limited to the following formats: such as floatFrame.frameName.function() , floatFrame. frameName is the second window (floating window) interface that is widely displayed, which refers to the specific Which floating window is called, functionO is the specific javascript function of which floating window such as EPG page. This allows you to control the program content refresh, window size, display position, etc. of the floating window EPG. At this time, the EPG is the active window, and it can respond to any operation of the user, such as switching channels, scheduling programs, and the like. When the user needs to exit the EPG floating window page, it is also necessary to send a message to the first window (the main window). This process is consistent with the process of sending the main window to the floating window. When the floating window needs to call a function of the main window page. When you need to call through the extended javascript interface, such as: mainFrame.function() , mainFrame is the extended interface, which refers to the main window page, function() is the javascript function of the main window page, you can perform hidden or It is to destroy the EPG floating window and other actions.
还需要说明的是,第二窗口与第二窗口之间的交互流程与第一窗口与第二 窗口的交互流程一致, 进行消息传递的机制相同, 这里不再赘述。 第一窗口与 第二窗口不同的是, 第一窗口永远存在, 不能被销毁, 除非退出浏览器, 而第 二窗口可以通过扩展脚本接口随时随地被创建和销毁。  It should be noted that the interaction process between the second window and the second window is consistent with the interaction process between the first window and the second window, and the mechanism for performing message delivery is the same, and details are not described herein again. The first window differs from the second window in that the first window is always present and cannot be destroyed unless it exits the browser, and the second window can be created and destroyed anytime, anywhere through the extended script interface.
通过实施本发明, 还可以提高嵌入式浏览器的应用维护性, 如在数字电视 接收终端中通过扩展脚本接口创建一个页面用于 CA的各种提示, 网络状态提 示, 预定节目提示等, 当需要修改提示的表现时, 只需通过扩展脚本接口如 floatFrame. location. href= "tishi.htm" , [多改该页面即可, 避免了 4'爹改所有页面代 码; 应用人员还可以随意开发许多效果炫丽的第二窗口, 提高用户体验; 通过 创建第二窗口, 可以承载更多业务, 如 widget (微巨)、 广告等, 且更便于控 制, 解决了现有技术中单窗口浏览器只能浏览单一页面的问题。  By implementing the invention, the application maintainability of the embedded browser can also be improved, such as creating a page for the CA various prompts, network status prompts, scheduled program prompts, etc. in the digital television receiving terminal through the extended script interface, when needed When modifying the performance of the prompt, just extend the script interface such as floatFrame. location. href= "tishi.htm" , [change the page, avoid 4' tampering with all page code; the application can also develop many A dazzling second window enhances the user experience; by creating a second window, it can carry more services, such as widgets, advertisements, etc., and is easier to control, solving the single-window browser in the prior art. The problem of browsing a single page.
上面详细说明了本发明嵌入式浏览器的实现方法, 下面相应地, 详细说明 本发明的嵌入式浏览器的实现装置, 如图 3所示, 嵌入式浏览器的实现装置 3 包括: 启动接收模块 31、 第一窗口打开模块 32、 对外接口设置模块 33、 第二 窗口创建模块 34和加载页面模块 35。 The implementation method of the embedded browser of the present invention is described in detail above. Correspondingly, the implementation device of the embedded browser of the present invention is described in detail. As shown in FIG. 3, the implementation device 3 of the embedded browser is shown in FIG. The method includes: a startup receiving module 31, a first window opening module 32, an external interface setting module 33, a second window creating module 34, and a loading page module 35.
其中, 启动接收模块 31用于接收启动浏览器的指令;  The startup receiving module 31 is configured to receive an instruction to start a browser.
第一窗口打开模块 32用于打开第一窗口的页面;  The first window opening module 32 is configured to open a page of the first window;
具体地, 嵌入式设备启动以后, 启动接收模块 31将接收到启动浏览器的 指令,启动浏览器任务,并进行浏览器的初始化,如初始化浏览器占用的内存、 高速緩存(Cache )、 分辨率等参数, 然后浏览器将创建一个第一窗口对象, 接 着创建第一窗口页面, 第一窗口打开模块 32将打开指定的页面, 本发明中的 第一窗口即主窗口(main window ), 打开的第一窗口的页面往往为主窗口的主 菜单或 portal (入口界面)。  Specifically, after the embedded device is started, the startup receiving module 31 receives an instruction to start the browser, starts a browser task, and initializes the browser, such as initializing the memory occupied by the browser, a cache, and a resolution. After the parameter, the browser will create a first window object, and then create a first window page, the first window opening module 32 will open the specified page, the first window in the present invention is the main window (main window), opened The pages of the first window are often the main menu of the main window or the portal (entry interface).
对外接口设置模块 33用于设置用于创建所述第二窗口的对外接口; 第二窗口创建模块 34用于根据所述第一窗口的页面, 通过扩展脚本接口 调用所述浏览器预先设置的对外接口创建至少一个第二窗口;  The external interface setting module 33 is configured to set an external interface for creating the second window; the second window creating module 34 is configured to invoke, according to the page of the first window, the external preset preset by the browser by using an extended script interface. The interface creates at least one second window;
具体地, 对外接口设置模块 33用于创建第二窗口的对外接口 (如 C++对 外接口 ), 那么第二窗口创建模块 34将根据所述第一窗口的页面, 通过扩展脚 本接口调用对外接口设置模块 33设置的对外接口创建至少一个第二窗口, 即 可以根据打开的第一窗口的页面中应用, 通过扩展 javascript接口调用浏览器 的 C++对外接口创建至少一个第二窗口, 即, 浏览器在后台创建至少一个第二 窗口, 本发明中的第二窗口为浮动窗口, 即, 可以叠加在第一窗口 (主窗口) 上的窗口; 以数字电视接收终端为例, 第二窗口创建模块 34根据打开的第一 窗口的页面中应用的需要, 可以创建电子节目菜单( EPG , Electronic Program Guide )窗口、频道管理窗口、节目预定窗口、数字证书认证中心( CA, Certificate Authority )提示信息窗口网络断开信息窗口等第二窗口。  Specifically, the external interface setting module 33 is configured to create an external interface of the second window (such as a C++ external interface), and then the second window creating module 34 will invoke the external interface setting module by using the extended script interface according to the page of the first window. 33 sets the external interface to create at least one second window, that is, according to the application in the first window of the open window, the at least one second window is created by calling the browser C++ external interface by extending the javascript interface, that is, the browser is created in the background At least one second window, the second window in the present invention is a floating window, that is, a window that can be superimposed on the first window (main window); taking the digital television receiving terminal as an example, the second window creating module 34 is opened according to The application of the first window page can create an electronic program menu (EPG, Electronic Program Guide) window, a channel management window, a program reservation window, a digital certificate authority (CA, Certificate Authority) prompt information window, a network disconnection information window. Wait for the second window.
加载页面模块 35用于加载所述第二窗口的页面。  The load page module 35 is for loading a page of the second window.
具体地, 第二窗口创建完毕后, 加载页面模块 35加载所述第二窗口的页 面,如较复杂的 EPG页面、频道管理页面、节目预定页面、 CA提示信息页面、 网络断开信息页面等等, 并通知浏览器任务第二窗口的创建与加载成功, 即, 在启动嵌入式设备, 打开第一窗口页面的同时, 浏览器已经在后台创建和加载 完毕第二窗口的页面。 请参阅图 4 示出的本发明的嵌入式浏览器的实现装置的另一实施例的结 构示意图, 进一步详细说明本发明的嵌入式浏览器的实现装置的结构, 嵌入式 浏览器的实现装置 3包括启动接收模块 31、 第一窗口打开模块 32、 对外接口 设置模块 33、 第二窗口创建模块 34和加载页面模块 35外, 还包括记录模块 36、 窗口管理器 37以及事件管理器 38。 Specifically, after the second window is created, the loading page module 35 loads the page of the second window, such as a more complicated EPG page, a channel management page, a program reservation page, a CA prompt information page, a network disconnection information page, and the like. And notifying the browser that the second window is created and loaded successfully, that is, while the embedded device is started, the first window page is opened, and the browser has created and loaded the second window in the background. Please refer to FIG. 4, which is a schematic structural diagram of another embodiment of an implementation apparatus of the embedded browser of the present invention, and further details the structure of the implementation apparatus of the embedded browser of the present invention. The implementation device of the embedded browser 3 In addition to the startup receiving module 31, the first window opening module 32, the external interface setting module 33, the second window creating module 34, and the loading page module 35, the recording module 36, the window manager 37, and the event manager 38 are further included.
其中, 记录模块 36用于记录所述第二窗口的相关信息, 所述相关信息包 括地址信息和数据结构信息;  The recording module 36 is configured to record related information of the second window, where the related information includes address information and data structure information;
具体地, 所述第二窗口创建成功后, 记录模块 36将注册所述第二窗口, 记录所述第二窗口的相关信息, 包括第二窗口的地址信息 (如内存地址信息) 和数据结构信息 (如窗口的名称、 窗口 ID、 窗口的大小、 窗口的显示状态等 信息)等。 需要说明的是, 根据所述窗口的显示状态信息, 通过扩展 javascript 接口可以控制该窗口的页面时显示还是隐藏, 一般地, 如广告窗口的显示状态 为显示, 那么通过扩展 javascript接口的控制, 广告窗口的页面可以显示, 又 如 EPG窗口显示状态为隐藏, 那么通过扩展 javascript接口的控制, EPG页面 为隐藏在后台。  Specifically, after the second window is successfully created, the recording module 36 registers the second window, and records related information of the second window, including address information (such as memory address information) and data structure information of the second window. (such as the name of the window, the window ID, the size of the window, the display status of the window, etc.). It should be noted that, according to the display state information of the window, when the page of the window can be controlled to be displayed or hidden by extending the javascript interface, generally, if the display state of the advertisement window is displayed, then by extending the control of the javascript interface, the advertisement The page of the window can be displayed, and if the display state of the EPG window is hidden, then by extending the control of the javascript interface, the EPG page is hidden in the background.
窗口管理器 37用于管理窗口, 主要是负责第一窗口与第二窗口的交互, 以及多个第二窗口之间的调用,具体地,窗口管理器 37包括请求接收模块 371、 第二操作模块 372和第一操作模块 373。  The window manager 37 is configured to manage the window, mainly responsible for the interaction between the first window and the second window, and the call between the plurality of second windows. Specifically, the window manager 37 includes a request receiving module 371 and a second operation module. 372 and a first operation module 373.
其中,请求接收模块 371用于接收对所述第二窗口或所述第一窗口的操作 倚求;  The request receiving module 371 is configured to receive an operation request for the second window or the first window;
具体地, 用户可以根据需要对所述第二窗口或者所述笫一窗口进行操作, 如需要打开显示某个第二窗口, 或者关闭隐藏某个第二窗口, 或者控制某个第 二窗口的位置、 大小等, 那么请求接收模块 37将接收到对所述第二窗口或所 述第一窗口的操作请求, 该操作请求包括请求执行操作的脚本函数, 以及请求 操作的窗口的部分相关信息 (如窗口 ID或窗口的内存地址信息等)。  Specifically, the user can operate the second window or the first window as needed, such as opening a second window, or closing a second window, or controlling the position of a second window. , size, etc., then the request receiving module 37 will receive an operation request for the second window or the first window, the operation request including a script function requesting to perform the operation, and part of the related information of the window requesting the operation (eg Window ID or window memory address information, etc.).
第二操作模块 372 用于当接收到消息队列中对所述第二窗口进行操作的 事件消息后, 激活所述第二窗口, 并根据所述操作请求以及记录的所述第二窗 口的相关信息对所述第二窗口进行操作;  The second operation module 372 is configured to activate the second window after receiving the event message that operates the second window in the message queue, and according to the operation request and related information of the recorded second window Operating the second window;
具体地, 如图 5示出的本发明实施例的第二操作模块的结构示意图, 第二 操作模块 372包括事件消息接收单元 3721、 判断单元 3722和操作单元 3723。 其中, 事件消息接收单元 3721用于接收消息队列中对窗口进行操作的事 件消息; Specifically, FIG. 5 is a schematic structural diagram of a second operation module according to an embodiment of the present invention, The operation module 372 includes an event message receiving unit 3721, a determining unit 3722, and an operating unit 3723. The event message receiving unit 3721 is configured to receive an event message that operates on the window in the message queue;
具体地,用户可以根据需要对所述第二窗口或者所述第一窗口进行操作的 同时, 浏览器向消息队列发送对窗口进行操作的事件消息, 进一步地, 浏览器 可以通过创建用于统一读取消息队列中的事件消息的事件管理器,由事件管理 器不断地读取消息队列,然后将读取的消息队列中事件消息发送给窗口管理器 进行管理操作, 即, 浏览器向消息队列发送对窗口进行操作的事件消息后, 事 件管理器读取到消息队列中的对窗口进行操作的事件消息,并将该事件消息发 送给窗口管理器, 那么事件消息接收单元 3721就接收到消息队列中对窗口进 行操作的事件消息。  Specifically, the user can operate the second window or the first window as needed, and the browser sends an event message to the message queue to operate the window. Further, the browser can be created for unified reading. The event manager that takes the event message in the message queue, the event manager continuously reads the message queue, and then sends the event message in the read message queue to the window manager for management operation, that is, the browser sends the message queue to the message queue. After the event message that operates on the window, the event manager reads the event message in the message queue that operates on the window, and sends the event message to the window manager, then the event message receiving unit 3721 receives the message queue. An event message that operates on the window.
判断单元 3722用于才艮据所述记录模块记录的所述第二窗口的相关信息, 判断所述事件消息中的窗口是否为所述第二窗口;  The determining unit 3722 is configured to determine whether the window in the event message is the second window according to related information of the second window recorded by the recording module;
操作单元 3723用于当判断单元 3722的判断结果为是时,则激活所述第二 窗口,并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二窗 口进行操作;  The operation unit 3723 is configured to activate the second window when the determination result of the determining unit 3722 is YES, and operate the second window according to the operation request and the related information of the recorded second window;
具体地, 当判断出所述事件消息中的窗口为第二窗口时, 表明用户需要从 当前第一窗口或者另外某个第二窗口中调用该第二窗口, 操作单元 3723将激 活该第二窗口,并根据操作请求中该第二窗口的部分相关信息查找预先记录的 该第二窗口的全部相关信息 (如根据第二窗口的窗口 ID, 对应查找出该第二 窗口的窗口名称、 内存地址、窗口大小等信息,又如根据笫二窗口的内存地址, 对应查找出该第二窗口的窗口名称、 窗口 ID、 窗口大小等信息), 然后通过扩 展脚本接口执行操作请求中对第二窗口进行操作的脚本函数,如更新该第二窗 口的内容、 调整第二窗口的位置和大小、 对该第二窗口进行显示、 隐藏或关闭 (销毁) 等操作。  Specifically, when it is determined that the window in the event message is the second window, indicating that the user needs to call the second window from the current first window or another second window, the operating unit 3723 activates the second window. And searching for all the related information of the second window that is pre-recorded according to the partial related information of the second window in the operation request (for example, according to the window ID of the second window, correspondingly finding the window name, the memory address, and the memory address of the second window, The size of the window and the like, and according to the memory address of the second window, correspondingly find the window name, the window ID, the window size and the like of the second window, and then operate the second window by executing the operation request through the extended script interface. Script functions, such as updating the contents of the second window, adjusting the position and size of the second window, displaying, hiding, or closing (destroying) the second window.
第一操作模块 373 用于当接收到消息队列中对所述第一窗口进行操作的 事件消息后, 根据所述操作请求对所述第一窗口进行操作。  The first operation module 373 is configured to: when receiving an event message that operates the first window in the message queue, operate the first window according to the operation request.
具体地, 第一操作模块 373判断出所述事件消息中的窗口为第一窗口时, 表明用户需要从当前某个第二窗口中调用第一窗口,那么将通过扩展脚本接口 执行操作请求中对第一窗口进行操作的脚本函数,如控制第一窗口执行隐藏或 销毁某个第二窗口的操作等。 Specifically, when the first operation module 373 determines that the window in the event message is the first window, indicating that the user needs to invoke the first window from a current second window, the extended script interface is used. A script function that operates the first window in the operation request, such as controlling the first window to perform an operation of hiding or destroying a second window.
事件管理器 38用于不断地读取消息队列, 并将读取的消息队列中事件消 息发送给窗口管理器 37进行管理操作。 具体地, 窗口管理器 37中的第二操作 模块 372和第一操作模块 373根据接收到的事件管理器 38发送的事件消息进 行操作。  The event manager 38 is operative to continuously read the message queue and send the event message in the read message queue to the window manager 37 for management operations. Specifically, the second operation module 372 and the first operation module 373 in the window manager 37 operate in accordance with the event message sent by the received event manager 38.
本发明还公开了一种数字电视接收终端, 如图 6所示, 数字电视接收终端 6包括本发明的嵌入式浏览器的实现装置 3, 进一步地, 下面以在数字电视接 收终端 6中第一窗口与隐藏的 EPG窗口进行交互, 调用隐藏的 EPG窗口为例 进行说明:  The present invention also discloses a digital television receiving terminal. As shown in FIG. 6, the digital television receiving terminal 6 includes the implementing device 3 of the embedded browser of the present invention. Further, the following is first in the digital television receiving terminal 6. The window interacts with the hidden EPG window, and the hidden EPG window is called as an example:
当用户需要从当前显示的第一窗口 (主窗口 )切换到隐藏的 EPG窗口的 EPG页面时,浏览器主窗口首先将 EPG窗口的内存地址(或 EPG窗口 ID等), 以及需要执行哪些函数等信息发送到窗口管理器 37, 同时发送激活事件消息 给消息队列, 事件管理器 38在不断地读取消息队列的过程中接收到主窗口发 来的激活事件消息后, 就将该激活事件消息发送给窗口管理器 37 , 窗口管理 器 37立即查找当前是否存在 EPG窗口 (即判断是否为第二窗口), 若存在则 激活 EPG窗口, 并且通过扩展的 javascript接口执行主窗口发送给 EPG窗口 面 javascript函数。  When the user needs to switch from the currently displayed first window (main window) to the EPG page of the hidden EPG window, the browser main window first sets the memory address (or EPG window ID, etc.) of the EPG window, and which functions need to be executed. The information is sent to the window manager 37, and an activation event message is sent to the message queue. The event manager 38 sends the activation event message after receiving the activation event message sent by the main window during the process of continuously reading the message queue. To the window manager 37, the window manager 37 immediately finds whether there is currently an EPG window (ie, determines whether it is a second window), activates the EPG window if it exists, and executes the main window to be sent to the EPG window surface javascript function through the extended javascript interface. .
需要说明的是, 扩展 javascript接口格式可以为以下格式, 但不限于以下 格式: 如 floatFrame.frameName.function(), floatFrame. frameName是才广展的第 二窗口 (浮动窗口)接口, 指的就是具体调用哪个浮动窗口, functionO就是具 体哪个浮动窗口如 EPG页面的 javascript函数。这样就可以控制浮动窗口 EPG 的节目内容刷新, 窗口大小, 显示位置等。 此时 EPG即为活动窗口, 也就可 以响应用户的任何操作, 如上下切换频道, 预定节目等。 当用户需要退出 EPG 浮动窗口页面时, 同样需要也是发送消息给第一窗口 (主窗口), 此过程与主 窗口发送给浮动窗口过程是一致的,当浮动窗口需要调用主窗口页面的某个函 数时, 也需要通过扩展的 javascript 接口调用, 如: mainFrame.function() , mainFrame是扩展的接口, 指的就是主窗口页面, function()就是主窗口页面的 javascript函数, 此时就可以执行隐藏或是销毁 EPG浮动窗口等动作。 还需要说明的是,第二窗口与第二窗口之间的交互流程与第一窗口与第二 窗口的交互流程一致, 进行消息传递的机制相同, 这里不再赘述。 第一窗口与 第二窗口不同的是, 第一窗口永远存在, 不能被销毁, 除非退出浏览器, 而第 二窗口可以通过扩展脚本接口随时随地被创建和销毁;除了本发明的数字电视 接收终端 6外, 其他嵌入式设备如手机和 PDA等都可以包括上述实施例的嵌 入式浏览器的实现装置 3。 It should be noted that the extended javascript interface format can be the following format, but is not limited to the following formats: such as floatFrame.frameName.function(), floatFrame. frameName is the second window (floating window) interface that is widely displayed, which refers to the specific Which floating window is called, functionO is the specific javascript function of which floating window such as EPG page. This allows you to control the program content refresh, window size, display position, etc. of the floating window EPG. At this time, the EPG is the active window, and it can respond to any operation of the user, such as switching channels, scheduling programs, and the like. When the user needs to exit the EPG floating window page, it is also necessary to send a message to the first window (the main window). This process is consistent with the process of sending the main window to the floating window. When the floating window needs to call a function of the main window page. When you need to call through the extended javascript interface, such as: mainFrame.function() , mainFrame is the extended interface, which refers to the main window page, function() is the javascript function of the main window page, you can perform hidden or It is to destroy the EPG floating window and other actions. It should be noted that the interaction process between the second window and the second window is consistent with the interaction process of the first window and the second window, and the mechanism for performing message delivery is the same, and details are not described herein again. The first window is different from the second window in that the first window is always present and cannot be destroyed unless exiting the browser, and the second window can be created and destroyed anytime and anywhere through the extended script interface; in addition to the digital television receiving terminal of the present invention In addition, other embedded devices such as mobile phones and PDAs, etc., may include the implementation device 3 of the embedded browser of the above embodiment.
本发明的数字电视接收终端包括但不限于:机顶盒、网络协议电视 ( Internet Protocol Television, IPTV )、 数字电视一体机、 电视手机等具有接收数字电视 功能的终端。  The digital television receiving terminal of the present invention includes, but is not limited to, a set top box, an Internet Protocol Television (IPTV), a digital television integrated machine, a television mobile phone, and the like having a function of receiving a digital television.
综上所述,通过扩展脚本接口调用所述浏览器预先设置的对外接口创建至 少一个第二窗口, 在启动浏览器时即加载第二窗口的页面, 提高了页面间切换 的速度, 给用户带来更好的体验; 通过扩展脚本接口可以更加方便地管理多个 窗口, 实现多个窗口的交互, 便于承载更多的业务, 并提高嵌入式设备的应用 维护性, 减少应用开发人员的工作量, 提高应用开发效率, 应用人员还可以随 意开发许多效果炫丽的第二窗口, 提高用户体验; 通过创建第二窗口, 可以承 载更多业务, 如 widget (微巨)、 广告等, 且更便于控制, 解决了现有中单窗 口浏览器只能浏览单一页面的问题。  In summary, the at least one second window is created by using the extended script interface to call the external interface preset by the browser, and the page of the second window is loaded when the browser is started, thereby improving the speed of switching between pages, and bringing the user a For a better experience; expand the script interface to more easily manage multiple windows, realize the interaction of multiple windows, facilitate the carrying of more services, and improve the application maintainability of embedded devices, reducing the workload of application developers To improve application development efficiency, the application can also freely develop many second windows with beautiful effects to enhance the user experience. By creating a second window, it can carry more services, such as widgets, advertisements, etc., and is more convenient to control. , solves the problem that the existing single window browser can only browse a single page.
需要说明的是, 通过以上的实施方式的描述, 本领域的技术人员可以清楚 地了解到本发明可借助软件加必需的硬件平台的方式来实现,当然也可以全部 通过硬件来实施。基于这样的理解, 本发明的技术方案对背景技术做出贡献的 全部或者部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在 存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令用以使得一台计算 机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施 例或者实施例的某些部分所述的方法。  It should be noted that, through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course, can also be implemented entirely by hardware. Based on such understanding, all or part of the technical solution of the present invention contributing to the background art may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM, a magnetic disk, an optical disk, or the like. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
以上所揭露的仅为本发明实施例中的较佳实施例而已,当然不能以此来限定本 发明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖 的范围。 The above are only the preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, and the equivalent changes made by the claims of the present invention are still within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种嵌入式浏览器的实现方法, 其特征在于, 包括:  An implementation method of an embedded browser, comprising:
接收启动浏览器的指令, 打开第一窗口的页面;  Receiving an instruction to start a browser, opening a page of the first window;
根据所述第一窗口的页面,通过扩展脚本接口调用所述浏览器预先设置的 对外接口创建至少一个第二窗口;  And at least one second window is created by using an extended script interface to invoke an external interface preset by the browser according to the page of the first window;
加载所述第二窗口的页面。  Loading the page of the second window.
2、 如权利要求 1所述的方法, 其特征在于, 所述通过扩展脚本接口调用 所述浏览器预先设置的对外接口创建至少一个第二窗口的步骤之前, 还包括: 设置浏览器的用于创建所述第二窗口的对外接口。 2. The method according to claim 1, wherein before the step of invoking the external interface preset by the browser to create at least one second window by using the extended script interface, the method further includes: setting a browser for Create an external interface of the second window.
3、 如权利要求 2所述的方法, 其特征在于, 所述通过扩展脚本接口调用 所述浏览器预先设置的对外接口创建至少一个第二窗口的步骤之后, 还包括: 记录所述第二窗口的相关信息,所述相关信息包括地址信息和数据结构信 息。 The method of claim 2, wherein after the step of invoking the external interface preset by the browser to create the at least one second window, the method further includes: recording the second window Related information including address information and data structure information.
4、 如权利要求 3所述的方法, 其特征在于, 所述加载所述第二窗口的页 面的步骤之后, 还包括: The method of claim 3, wherein the step of loading the page of the second window further comprises:
接收对所述第二窗口或所述第一窗口的操作请求;  Receiving an operation request for the second window or the first window;
当接收到消息队列中对所述第二窗口进行操作的事件消息后,激活所述第 二窗口,并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二 窗口进行操作;  After receiving the event message in the message queue for operating the second window, the second window is activated, and the second window is performed according to the operation request and the related information of the recorded second window. Operation
当接收到消息队列中对所述第一窗口进行操作的事件消息后,根据所述操 作请求对所述第一窗口进行操作。  After receiving the event message in the message queue for operating the first window, the first window is operated according to the operation request.
5、 如权利要求 4所述的方法, 其特征在于, 所述当接收到消息队列中对 所述第二窗口进行操作的事件消息后, 激活所述第二窗口, 并根据所述操作请 求以及记录的所述第二窗口的相关信息对所述第二窗口进行操作的步骤包括: 接收消息队列中对窗口进行操作的事件消息; 根据记录的所述第二窗口的相关信息,判断所述事件消息中的窗口是否为 所述第二窗口; 5. The method according to claim 4, wherein, after receiving an event message in the message queue that operates the second window, the second window is activated, and according to the operation request and The step of recording the related information of the second window to operate on the second window comprises: receiving an event message in the message queue for operating the window; Determining, according to the recorded related information of the second window, whether the window in the event message is the second window;
当判断结果为是时, 则激活所述第二窗口, 并根据所述操作请求以及记录 的所述第二窗口的相关信息对所述第二窗口进行操作。  When the judgment result is YES, the second window is activated, and the second window is operated according to the operation request and the related information of the recorded second window.
6、 如权利要求 4或 5所述的方法, 其特征在于, 对所述第二窗口或所述 第一窗口的操作请求包括对所述第二窗口或所述第一窗口进行操作的脚本函 数; 6. The method according to claim 4 or 5, wherein the operation request for the second window or the first window comprises a script function for operating the second window or the first window ;
所述根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二 窗口进行操作的步骤包括:通过扩展脚本接口执行对所述第二窗口进行操作的 脚本函数;  The step of operating the second window according to the operation request and the related information of the recorded second window comprises: executing a script function for operating the second window by using an extended script interface;
所述根据所述操作请求对所述第一窗口进行操作的步骤包括:通过扩展脚 本接口执行对所述第一窗口进行操作的脚本函数。  The step of operating the first window according to the operation request includes: executing a script function that operates the first window through an extended script interface.
7、 一种嵌入式浏览器的实现装置, 其特征在于, 包括: 7. An apparatus for implementing an embedded browser, comprising:
启动接收模块, 用于接收启动浏览器的指令;  Initiating a receiving module, configured to receive an instruction to start a browser;
第一窗口打开模块, 用于打开第一窗口的页面;  The first window opens a module for opening a page of the first window;
第二窗口创建模块, 用于根据所述第一窗口的页面, 通过扩展脚本接口调 用所述洌览器预先设置的对外接口创建至少一个第二窗口;  a second window creating module, configured to create at least one second window by using an extended script interface to call an external interface preset by the browser according to the page of the first window;
加载页面模块, 用于加载所述第二窗口的页面。  Loading a page module for loading a page of the second window.
8、 如权利要求 7所述的嵌入式浏览器的实现装置, 其特征在于, 还包括: 对外接口设置模块, 用于设置浏览器的用于创建所述第二窗口的对外接 口。 The device for implementing an embedded browser according to claim 7, further comprising: an external interface setting module, configured to set an external interface of the browser for creating the second window.
9、 如权利要求 8所述的嵌入式浏览器的实现装置, 其特征在于, 还包括: 记录模块, 用于记录所述第二窗口的相关信息, 所述相关信息包括地址信 息和数据结构信息。 The apparatus for implementing an embedded browser according to claim 8, further comprising: a recording module, configured to record related information of the second window, where the related information includes address information and data structure information .
10、 如权利要求 9所述的嵌入式浏览器的实现装置, 其特征在于, 还包括 用于管理窗口的窗口管理器, 所述窗口管理器包括: The apparatus for implementing an embedded browser according to claim 9, further comprising: a window manager for managing a window, the window manager comprising:
请求接收模块, 用于接收对所述第二窗口或所述第一窗口的操作请求; 第二操作模块,用于当接收到消息队列中对所述第二窗口进行操作的事件 消息后, 激活所述第二窗口, 并根据所述操作请求以及记录的所述第二窗口的 相关信息对所述第二窗口进行操作;  a request receiving module, configured to receive an operation request for the second window or the first window; and a second operation module, configured to activate after receiving an event message that operates the second window in the message queue The second window, and operating the second window according to the operation request and the related information of the recorded second window;
第一操作模块,用于当接收到消息队列中对所述第一窗口进行操作的事件 消息后, 根据所述操作请求对所述第一窗口进行操作。  The first operation module is configured to: when receiving an event message that operates the first window in the message queue, operate the first window according to the operation request.
11、 如权利要求 10所述的嵌入式浏览器的实现装置, 其特征在于, 还包 括事件管理器, 用于读取消息队列, 并将读取的消息队列中事件消息发送给所 述窗口管理器。 The apparatus for implementing an embedded browser according to claim 10, further comprising an event manager, configured to read a message queue, and send an event message in the read message queue to the window management. Device.
12、 如权利要求 11所述的嵌入式浏览器的实现装置, 其特征在于, 所述 第二操作模块包括: 12. The apparatus for implementing an embedded browser according to claim 11, wherein the second operation module comprises:
事件消息接收单元,用于接收所述事件管理器发送的对窗口进行操作的事 件消息;  An event message receiving unit, configured to receive an event message sent by the event manager to operate the window;
判断单元, 用于根据所述记录模块记录的所述第二窗口的相关信息, 判断 所述事件消息中的窗口是否为所述第二窗口;  a determining unit, configured to determine, according to the related information of the second window that is recorded by the recording module, whether the window in the event message is the second window;
操作单元,用于当所述判断单元的判断结果为是时,则激活所述第二窗口, 并根据所述操作请求以及记录的所述第二窗口的相关信息对所述第二窗口进 行操作。  An operation unit, configured to activate the second window when the determination result of the determining unit is YES, and operate the second window according to the operation request and the related information of the recorded second window .
13、 如权利要求 10、 11或 12所述的嵌入式浏览器的实现装置, 其特征在 于,对所述第二窗口或所述第一窗口的操作请求包括对所述第二窗口或所述第 一窗口进行操作的脚本函数; 13. The apparatus for implementing an embedded browser according to claim 10, 11 or 12, wherein the operation request for the second window or the first window comprises the second window or the a script function that operates in the first window;
所述操作单元用于当所述判断单元的判断结果为是时,则激活所述第二窗 口, 并通过扩展脚本接口执行对所述第二窗口进行操作的脚本函数;  The operation unit is configured to activate the second window when the determination result of the determining unit is YES, and execute a script function for operating the second window by using an extended script interface;
所述第一操作模块用于当接收到消息队列读取的对所述第一窗口进行操 作的事件消息后, 通过扩展脚本接口执行对所述第一窗口进行操作的脚本函 数。 The first operation module is configured to perform operations on the first window when receiving a message queue read After the event message is made, a script function that operates on the first window is executed through the extended script interface.
14、 一种数字电视接收终端, 其特征在于, 包括如权利要求 7至 13任一 项所述的嵌入式浏览器的实现装置。 A digital television receiving terminal, comprising: an apparatus for implementing an embedded browser according to any one of claims 7 to 13.
PCT/CN2011/070117 2010-01-21 2011-01-10 Method and device for realizing embedded browser, and digital television receiving terminal WO2011088759A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010044461.0 2010-01-21
CN201010044461A CN101763267A (en) 2010-01-21 2010-01-21 Method for realizing embedded browser, device therefor and digital television receiving terminal

Publications (1)

Publication Number Publication Date
WO2011088759A1 true WO2011088759A1 (en) 2011-07-28

Family

ID=42494439

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070117 WO2011088759A1 (en) 2010-01-21 2011-01-10 Method and device for realizing embedded browser, and digital television receiving terminal

Country Status (2)

Country Link
CN (1) CN101763267A (en)
WO (1) WO2011088759A1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591704A (en) * 2011-01-07 2012-07-18 北京国微集成技术有限公司 Multitask management method, device and system of Widget platform
CN102307319A (en) * 2011-09-02 2012-01-04 广东中大讯通软件科技有限公司 Embedded browser realization method based on IPTV set top box and apparatus thereof
CN102982132A (en) * 2012-11-16 2013-03-20 深圳市同洲电子股份有限公司 Control method and control device of browser multiple pages
CN103376974A (en) * 2013-06-28 2013-10-30 广州市动景计算机科技有限公司 Window switching method and device
CN103544059B (en) * 2013-07-16 2017-08-08 Tcl集团股份有限公司 The realization method and system of pending buffer effect during a kind of application switching
CN103425390B (en) * 2013-07-26 2016-06-22 华为软件技术有限公司 Information interacting method and device
CN103440340A (en) * 2013-09-09 2013-12-11 黄卓勋 Method and device for navigation webpage content display
CN103561326B (en) * 2013-11-01 2017-04-05 深圳国微技术有限公司 A kind of player method based on digital television browser
CN104581394B (en) * 2015-01-08 2017-12-22 浪潮软件集团有限公司 Method for realizing background PVR (personal video record) of set top box based on browser architecture
CN106126268A (en) * 2016-08-18 2016-11-16 福建天泉教育科技有限公司 A kind of window creation method and system
CN107423143B (en) * 2017-06-29 2019-12-03 武汉斗鱼网络科技有限公司 Communication management method and system between a kind of floating layer
CN107454456B (en) * 2017-09-06 2020-09-08 武汉斗鱼网络科技有限公司 Management control method and system for floating layer elements
CN109325190A (en) * 2018-08-21 2019-02-12 郑州云海信息技术有限公司 A kind of method and relevant apparatus of page management
CN111741347B (en) * 2019-03-25 2024-02-13 深圳市茁壮网络股份有限公司 Television page display method and related equipment
CN112351340B (en) * 2019-08-08 2023-08-18 中兴通讯股份有限公司 Method and device for processing public key message through key distribution and set top box
CN111061976B (en) * 2019-12-31 2023-08-08 哈尔滨海能达科技有限公司 Object display method and device of browser

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119476A (en) * 2007-09-04 2008-02-06 中兴通讯股份有限公司 Method for implementing page dynamic effect in built-in browser of network television
CN100469135C (en) * 2005-10-25 2009-03-11 中央电视台 Method of enhancing TV. identify information based on embeeded browsing apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100469135C (en) * 2005-10-25 2009-03-11 中央电视台 Method of enhancing TV. identify information based on embeeded browsing apparatus
CN101119476A (en) * 2007-09-04 2008-02-06 中兴通讯股份有限公司 Method for implementing page dynamic effect in built-in browser of network television

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BEIJING FEYNMAN SOFTWARE TECHNOLOGY CO. LTD, <MINIGUI PROGRAMMING GUIDE(V3.0)>, 22 May 2009 (2009-05-22) *
BEIJING FEYNMAN SOFTWARE TECHNOLOGY CO. LTD, <OMDOLPHIN TECHNICAL WHITE PAPER>, 10 October 2008 (2008-10-10) *

Also Published As

Publication number Publication date
CN101763267A (en) 2010-06-30

Similar Documents

Publication Publication Date Title
WO2011088759A1 (en) Method and device for realizing embedded browser, and digital television receiving terminal
US9384101B2 (en) Web application architecture
US9542245B2 (en) Processing user input events in a web browser
US8448090B2 (en) Selective plug-in activation for resource-limited platforms
US8407584B1 (en) Stable and secure use of content scripts in browser extensions
US9176757B2 (en) Method, system and an executable piece of code for the virtualization of a hardware resource associated with a computer system
US9658747B2 (en) Virtual tabs supporting web content suspension
US9842091B2 (en) Switching to and from native web applications
TW581968B (en) Method and apparatus for producing user interfaces and device functionality for processor-based devices having embedded operating system and programming framework
WO2013086988A1 (en) Software installation method and device
US20120185798A1 (en) Application view region
WO2018130085A1 (en) Method and apparatus for page presentation
US20150095758A1 (en) Web content suspension compatibility and suspended web content lifetime
CN107580039B (en) Transmission progress display method and device and terminal
US10908948B2 (en) Multiple application instances in operating systems that utilize a single process for application execution
CN110780930A (en) Method and device for starting Android system, electronic equipment and storage medium
WO2013139268A1 (en) Method, terminal, and system for generating and invoking offline application
WO2018129269A1 (en) Execution of multiple applications on a device
US11301345B2 (en) Desktop sound source discovery
CN103514924A (en) Method and device for playing videos in mobile terminal Widget, and player
US20020154124A1 (en) System and method of enhanced computer user interaction
KR20110122996A (en) Apparatus for executing application, method thereof and computer recordable medium storing the method
KR20080027293A (en) Managing multiple languages in a data language
WO2013185664A1 (en) Operating method and device
WO2022052961A1 (en) Method for performing biometric authentication when multiple application interfaces are simultaneously displayed

Legal Events

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

Ref document number: 11734341

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11734341

Country of ref document: EP

Kind code of ref document: A1