Method and browser for being compatible with IPTV page and public network pageTechnical Field
The invention relates to the technical field of browsers, in particular to a method for realizing compatibility of an IPTV page and a public network page and a browser.
Background
The IPTV technology can provide a variety of interactive services to users, such as live tv, video on demand, and game and entertainment. At present, the configuration of a set top box and a television becomes a terminal mode of a common family, the set top box serves as a terminal, a customized browser is carried to initiate an Http request to a server, the server is sent to the set top box in a webpage form as a response, the browser analyzes the webpage and outputs a display signal to the television for display, and meanwhile, a user operates an EPG (electronic program guide) page to send a new page request to the server. At present, a set-top box terminal can only interact with an IPTV server in a communication manner, and a user can only passively browse programs pushed by the IPTV server, and if the user wants to browse more contents besides an EPG page, the user has to access a public network resource, however, the current set-top box-mounted browser does not support the function, mainly because the following reasons are: firstly, all domestic IPTV terminals carry a single kernel browser, the kernel is modified in a customized manner aiming at IPTV specifications, and the browser loses the compatibility of a public network resource page due to the modification of the functions, cannot analyze and render the public network resource page normally, and cannot normally operate the page through input equipment; secondly, the browser adapts the IPTV service page to be full-screen display, the user can only operate in the page, and the page does not provide an entrance icon or a label for accessing the public network resource. If a user wants to acquire more network information through the set-top box, the user can only access the set-top box through other intelligent terminals, or the user can realize the function after automatically downloading a browser application adapted to the set-top box and installing the browser application, so that the operation is complex and the compatibility problem exists.
Disclosure of Invention
The invention aims to provide a method and a browser for being compatible with an IPTV page and a public network page, which are used for solving the problem that a customized browser in a set top box + television mode in the prior art cannot be compatible with the IPTV page and the public network page.
The invention solves the problems through the following technical scheme:
a method for compatible IPTV page and public network page comprises,
step S1: initializing a browser, wherein the browser is provided with an IPTV kernel and a public network kernel, respectively works in an IPTV kernel mode and a public network kernel mode, sets the IPTV kernel mode as a main mode, and sets the public network kernel mode as a standby mode;
step S2: the browser main process creates an external event monitoring sub-process;
step S3: the external event monitoring subprocess monitors the external event information of the user in real time, if the external event information of the user is in a public network mode, the step S4 is executed, otherwise, the step S5 is skipped;
step S4: switching control is carried out on the kernel loaded by the application, the browser enters a public network kernel mode, and meanwhile, a step S3 is triggered by waiting for an external event;
step S5: the IPTV kernel is loaded, and the browser enters the IPTV kernel mode, and waits for an external event to trigger step S3.
The main mode is operated, namely when the browser is started and initialized, if no user specific setting exists, an IPTV kernel is loaded, and at the moment, the browser has the characteristic of normally accessing and controlling an IPTV page; and the browser has the characteristics of normally accessing and operating the public network page when the browser is switched to the public network mode. And monitoring external events in real time in the whole life cycle of the browser operation, wherein the external event information is used as a basis for switching the IPTV kernel and the public network kernel. And creating a sub-process through the browser main process to monitor the external event, monitoring the external event in real time, and communicating with the main process through IPC messages. Similarly, the switching control of the dual-core browser kernel responds to external events in real time in the whole life cycle of the browser operation. And analyzing and rendering an IPTV resource page by using a default kernel of the browser, adding a kernel for processing a public network web page, and providing an external event monitoring and kernel switching control mechanism for switching between the two kernels. The browser is carried on a terminal device, normally accesses public network resources on the premise of normally browsing IPTV resource pages and not restarting other applications, meets the requirement of users on acquiring rich resource information, improves user experience, simplifies the number of software applications used by the users, and simplifies operation flow.
Further, the step S4 specifically includes:
step S41: entering a public network kernel mode;
step S42: providing a UI display toolbar and a preset home page of a local page for a user to operate;
step S43: switching browser kernels;
step S44: and entering a normal browser mode of the public network resources until the next external event is triggered, and returning to the step S3.
Further, the switching control of the kernel in step S43 adopts a dynamic link library replacement mode, and the specific steps are as follows: and removing the program call loading directory from the currently running kernel dynamic link library, backing up the program call loading directory, and copying the kernel dynamic link library to be switched to the program call loading directory.
Further, the step S5 specifically includes:
step S51: loading an IPTV kernel, and enabling a browser to enter an IPTV kernel mode;
step S52: the UI display mode is a full screen mode, and only an IPTV service page is displayed;
step S53: the browser application program carries out IPTV service authentication, an IPTV kernel shields the navigation function of the browser application program, the navigation is completely finished by an IPTV page, syntax errors in the IPTV service page are processed, and page codes are ensured to be normally executed;
step S54: entering the EPG home page, entering the IPTV service normal browsing mode until the next external event trigger, and returning to the step S3.
Further, the step S2 further includes providing a UI interface for the user to select the browser mode.
And inquiring the browser mode selected by the user on the UI interface, and if the user does not operate, operating the main mode, namely the IPTV kernel mode.
Further, the IPTV kernel and the public network kernel both adopt Blink kernels.
In order to solve the compatibility problem of the IPTV page and the public network page, and simultaneously considering the open source of the Blink kernel source code, the safety and stability, the strong expandability and other factors, the Blink kernel is selected as the browser kernel engine.
A browser compatible with an IPTV page and a public network page comprises an IPTV kernel module, a public network kernel module, a switching control module, an event monitoring module and a UI display module, wherein:
an IPTV kernel module: the IPTV service authentication comprises JavaScript object expansion aiming at IPTV specifications, 3DES encryption of terminal equipment information and ITMS authentication; the customized kernel is based on a Blink kernel, customized modification is carried out on the adaptive IPTV service, and the customized modification mainly comprises specific remote controller key support, EPG page special focus navigation adaptation, special EPG page code syntax error correction and analysis and rendering of an IPTV service page;
public network kernel module: the public network kernel module is connected with the switching kernel control module, is based on a Blink kernel and is used for analyzing and rendering public network resource pages, developing page navigation functions and providing a realization interface for a UI display module;
a switching control module: the event monitoring module is connected with the browser and is used for responding to an external event and controlling the switching between the two kernels of the browser;
an event monitoring module: the system comprises a UI display module, a control device, a user mode selection behavior receiving module, a user mode selection behavior transmitting module and a browser, wherein the UI display module is connected with the UI display module and used as a control device of the UI display mode, records the running mode of the browser, receives the user mode selection behavior by monitoring an external event, and notifies the UI display module of the latest mode selection condition;
a UI display module: two UI display modes are provided, in the IPTV kernel mode, the UI display is in a full screen mode, in the public network kernel mode, besides a public network resource page, a navigation toolbar is added, and a virtual mouse is displayed for a user to operate by using a remote controller.
The browser comprises the following functional modules: the system comprises a UI display module, an event monitoring module, a switching control module, an IPTV kernel module and a public network kernel module. The UI display module is used as a display module of the dual-core browser and provides two UI display modes: in the IPTV kernel mode, the UI is displayed in a full screen mode, namely an IPTV service page occupies the full screen, no redundant function icons exist, and the same effect as that of the current user accessing the IPTV service is achieved; in the public network kernel mode, except for displaying public network resource pages, a navigation toolbar integrated with an address input bar, an input determining button, a forward and backward button and a refreshing button is added, and a virtual mouse is displayed for a user to use a remote controller for operation; the UI display mode selection is controlled by the event monitoring module; the event monitoring module is used as a control device of the UI display mode and is used for recording the running mode of the current browser, receiving user mode selection behaviors in a mode of monitoring external events and informing the UI display module of the latest mode selection condition; the switching control module is used as an actual switching control part of the double kernels of the browser and controls the switching between the two kernels of the browser; the IPTV kernel module mainly comprises an IPTV service authentication part and a customized kernel part. IPTV service authentication mainly aims at IPTV specifications to perform JavaScript object expansion, perform 3DES encryption on terminal equipment information and pass ITMS authentication; the customized kernel part is based on a Blink kernel, customized modification is carried out on the adaptive IPTV service, and the customized modification mainly comprises functions of key support of a specific remote controller, EPG page special focus navigation adaptation, special EPG page Html/Css/JavaScript code syntax error correction and the like, and is used for analyzing and rendering the IPTV service page; the public network kernel module is based on a Blink kernel and is used for analyzing and rendering public network resource pages, developing page navigation (including page forward and backward, input confirmation and refreshing) functions and providing a realization interface for the UI display module.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) a user normally accesses public network resources by installing a browser application on the premise of normally browsing an IPTV resource page and not restarting other applications, so that the requirement of the user for acquiring rich resource information is met, and the user experience is improved.
(2) The method comprises the following steps that a currently running kernel dynamic link library removing program calls a loading directory and backups the loading directory, and the loading directory is used when the kernel is switched next time; and copying the kernel dynamic link library to be switched to a program call loading directory. The purpose of not backing up the double-kernel dynamic link library in advance and then copying and replacing the current kernel operation is to avoid the problem of browser operation breakdown in the kernel switching process.
Drawings
FIG. 1 is a framework diagram of a browser architecture of the present invention;
fig. 2 is a flow chart of browser operation.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
referring to fig. 2, a method for making IPTV pages compatible with public network pages includes,
step S1: initializing a browser, wherein the browser is provided with an IPTV kernel and a public network kernel, respectively works in an IPTV kernel mode and a public network kernel mode, sets the IPTV kernel mode as a main mode, and sets the public network kernel mode as a standby mode;
step S2: the browser main process creates an external event monitoring sub-process;
step S3: the external event monitoring subprocess monitors the external event information of the user in real time, if the external event information of the user is in a public network mode, the step S4 is executed, otherwise, the step S5 is skipped;
step S4: specifically, the method comprises the following steps of,
step S41: entering a public network kernel mode;
step S42: providing a UI display toolbar and a preset home page of a local page for a user to operate;
step S43: switching browser kernels:
removing a program call loading directory from the currently running kernel dynamic link library, backing up the program call loading directory, and copying the kernel dynamic link library to be switched to the program call loading directory;
step S44: entering a normal browser mode of public network resources until the next external event is triggered, and returning to the step S3;
step S5: specifically, the method comprises the following steps of,
step S51: loading an IPTV kernel, and enabling a browser to enter an IPTV kernel mode;
step S52: the UI display mode is a full screen mode, and only an IPTV service page is displayed;
step S53: the browser application program carries out IPTV service authentication, an IPTV kernel shields the navigation function of the browser application program, the navigation is completely finished by an IPTV page, syntax errors in the IPTV service page are processed, and page codes are ensured to be normally executed;
step S54: entering the EPG home page, entering the IPTV service normal browsing mode until the next external event trigger, and returning to the step S3.
The main mode operation, namely when the browser is started and initialized, starting external event monitoring, if no user specific setting exists or the external event monitoring result is the IPTV mode, loading an IPTV kernel, wherein the browser has the characteristics of normally accessing and controlling an IPTV page, can display the IPTV kernel in a full screen mode, and performs IPTV service authentication and IPTV service browsing; when the external event monitoring result is in a non-IPTV kernel mode, namely a public network kernel mode, the standby mode is operated, namely the public network kernel is used as a kernel alternative under the normal condition and is not loaded into a program for operation, when a user has special requirements, the kernel switching is controlled by the kernel switching to switch the kernels through monitoring and responding of an external event monitor sub-process, and when the external event monitoring result is in the public network mode, the browser has the characteristics of normally accessing and operating a public network page, displays a navigation toolbar, loads the public network kernel, and can browse public network resources. And monitoring external events in real time in the whole life cycle of the browser operation, wherein the external event information is used as a basis for switching the IPTV kernel and the public network kernel. And creating a sub-process through the browser main process to monitor the external event, monitoring the external event in real time, and communicating with the main process through IPC messages. Similarly, the switching control of the dual-core browser kernel responds to external events in real time in the whole life cycle of the browser operation. And analyzing and rendering an IPTV resource page by using a default kernel of the browser, adding a kernel for processing a public network web page, and providing an external event monitoring and kernel switching control mechanism for switching between the two kernels. The browser is carried on a terminal device, normally accesses public network resources on the premise of normally browsing IPTV resource pages and not restarting other applications, meets the requirement of users on acquiring rich resource information, improves user experience, simplifies the number of software applications used by the users, and simplifies operation flow.
Example 2:
referring to fig. 1, a browser compatible with an IPTV page and a public network page includes an IPTV kernel module, a public network kernel module, a switching control module, an event monitoring module, and a UI display module, where:
an IPTV kernel module: the IPTV service authentication comprises JavaScript object expansion aiming at IPTV specifications, 3DES encryption of terminal equipment information and ITMS authentication; the customized kernel is based on a Blink kernel, customized modification is carried out on the adaptive IPTV service, and the customized modification mainly comprises specific remote controller key support, EPG page special focus navigation adaptation, special EPG page code syntax error correction and analysis and rendering of an IPTV service page;
public network kernel module: the public network kernel module is connected with the switching kernel control module, is based on a Blink kernel and is used for analyzing and rendering public network resource pages, developing page navigation functions and providing a realization interface for a UI display module;
a switching control module: the event monitoring module is connected with the browser and is used for responding to an external event and controlling the switching between the two kernels of the browser;
an event monitoring module: the system comprises a UI display module, a control device, a user mode selection behavior receiving module, a user mode selection behavior transmitting module and a browser, wherein the UI display module is connected with the UI display module and used as a control device of the UI display mode, records the running mode of the browser, receives the user mode selection behavior by monitoring an external event, and notifies the UI display module of the latest mode selection condition;
a UI display module: two UI display modes are provided, in the IPTV kernel mode, the UI display is in a full screen mode, in the public network kernel mode, besides a public network resource page, a navigation toolbar is added, and a virtual mouse is displayed for a user to operate by using a remote controller.
The browser comprises the following functional modules: the system comprises a UI display module, an event monitoring module, a switching control module, an IPTV kernel module and a public network kernel module. The UI display module is used as a display module of the dual-core browser and provides two UI display modes: in the IPTV kernel mode, the UI is displayed in a full screen mode, namely an IPTV service page occupies the full screen, no redundant function icons exist, and the same effect as that of the current user accessing the IPTV service is achieved; in the public network kernel mode, except for displaying public network resource pages, a navigation toolbar integrated with an address input bar, an input determining button, a forward and backward button and a refreshing button is added, and a virtual mouse is displayed for a user to use a remote controller for operation; the UI display mode selection is controlled by the event monitoring module; the event monitoring module is used as a control device of the UI display mode and is used for recording the running mode of the current browser, receiving user mode selection behaviors in a mode of monitoring external events and informing the UI display module of the latest mode selection condition; the switching control module is used as an actual switching control part of the double kernels of the browser and controls the switching between the two kernels of the browser; the IPTV kernel module mainly comprises an IPTV service authentication part and a customized kernel part. IPTV service authentication mainly aims at IPTV specifications to perform JavaScript object expansion, perform 3DES encryption on terminal equipment information and pass ITMS authentication; the customized kernel part is based on a Blink kernel, customized modification is carried out on the adaptive IPTV service, and the customized modification mainly comprises functions of key support of a specific remote controller, EPG page special focus navigation adaptation, special EPG page Html/Css/JavaScript code syntax error correction and the like, and is used for analyzing and rendering the IPTV service page; the public network kernel module is based on a Blink kernel and is used for analyzing and rendering public network resource pages, developing page navigation (including page forward and backward, input confirmation and refreshing) functions and providing a realization interface for the UI display module.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.