A page display method and device of a smart television

By using JavaScript in the browser of a smart TV to adjust page display properties, page compatibility issues on smart TVs were resolved, ensuring accurate display of the target page and improving the user experience.

CN113064635BActive Publication Date: 2025-11-21SERAPHIC INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110296703.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-19
Publication Date
2025-11-21
Estimated Expiration
2041-03-19

AI Technical Summary

Technical Problem

In existing technologies, most web pages are developed and tested on PCs and are incompatible with smart TVs, leading to various problems when accessing these pages on smart TVs and affecting the user experience.

Method used

After creating a context environment using the browser's V8 script parsing engine, the JavaScript file is obtained. The target JavaScript code is then used to adjust the page's display properties, including layout and resolution, to ensure that the target page is accurately displayed on a smart TV.

Benefits of technology

This technology enables browsers to display various pages on smart TVs, improving the user experience and resolving compatibility issues that arise when pages are displayed on smart TVs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113064635B_ABST
    Figure CN113064635B_ABST
Patent Text Reader

Abstract

The application relates to a page display method and device of an intelligent television, wherein the method comprises the following steps: after a V8 script analysis engine of a browser creates a context environment, a javascript script file is acquired, the javascript script file comprises multiple javascript codes; a display request of a target page is acquired; target javascript codes corresponding to a target application to which a URL of the target page belongs are determined; the display attribute of the target page is adjusted by using the target javascript codes; and the target page is displayed in the intelligent television according to the adjusted display attribute. By the application, most pages are developed and tested on a PC end, are incompatible with the intelligent television, various problems occur when the intelligent television accesses the page, the browser is compatible with various pages for display, and the user experience of the intelligent television is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent television, and in particular to a page display method and device of an intelligent television, a computer device and a computer readable storage medium. BACKGROUND

[0002] In the field of intelligent television, the function of surfing the Internet can be realized through a built-in browser, such as the functions of watching live broadcast, watching video, watching news and the like, which greatly enriches the user's home entertainment experience. Like the page display of a computer terminal, the intelligent television browser also realizes page display by loading page resources and parsing, and finally rendering to the television screen. However, the page display effect may be different on different browsers or devices, so it is difficult for a page to take into account multiple devices. At present, most pages are developed and tested on a PC terminal, and are not compatible with intelligent television. When the page is accessed by using an intelligent television, various problems may occur, such as page layout, response of the page to the keys of the television remote controller and the like, which seriously affects the user's use experience.

[0003] At present, for the related art, most pages are developed and tested on a PC terminal, and are not compatible with intelligent television. When the page is accessed by using an intelligent television, various problems may occur, and an effective solution has not been proposed. SUMMARY

[0004] The present application aims at the deficiencies in the prior art, and provides a page display method and device of an intelligent television, a computer device and a computer readable storage medium, so as to at least solve the problem that most pages in the related art are developed and tested on a PC terminal, and are not compatible with intelligent television, and various problems may occur when the page is accessed by using an intelligent television.

[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows:

[0006] In a first aspect, the present application provides a page display method of an intelligent television, comprising:

[0007] After a context environment is created by a V8 script parsing engine of a browser, a javascript script file is obtained, wherein the javascript script file includes multiple pieces of javascript code, and the javascript code is used to adjust the display attribute of a page in an intelligent television;

[0008] A display request of a target page is obtained;

[0009] determine target JavaScript code corresponding to a target application to which the URL of the target page belongs, wherein the target application is opened by the browser, the target application comprises a plurality of URLs, the plurality of URLs comprise the URL of the target page, and the target JavaScript code is included in the plurality of pieces of JavaScript code;

[0010] adjust display properties of the target page by using the target JavaScript code;

[0011] display the target page in the smart television according to the adjusted display properties.

[0012] In some embodiments, determining the target JavaScript code corresponding to the target application to which the URL of the target page belongs comprises:

[0013] determining the target application to which the URL of the target page belongs;

[0014] determining the target JavaScript code corresponding to the target application according to a preset correspondence between applications and JavaScript codes.

[0015] In some embodiments, adjusting the display properties of the target page by using the target JavaScript code comprises:

[0016] adding the target JavaScript code to a JavaScript code file of the target application and compiling the target JavaScript code into an SDK of the target application, so that the browser executes the target JavaScript code when the target application loads the target page after starting.

[0017] In some embodiments, adjusting the display properties of the target page by using the target JavaScript code comprises at least one of:

[0018] adjusting a layout of the target page by using the target JavaScript code;

[0019] adjusting a resolution of the target page by using the target JavaScript code;

[0020] adjusting a function of the target application by using the target JavaScript code.

[0021] In a second aspect, embodiments of the present application provide a page display device of a smart television, comprising:

[0022] The first obtaining unit is configured to obtain a javascript script file after a V8 script parsing engine of the browser creates a context environment, wherein the javascript script file comprises a plurality of javascript codes, and the javascript codes are used to adjust display properties of a page in a smart television.

[0023] The second obtaining unit is configured to obtain a display request of a target page.

[0024] The determining unit is configured to determine target javascript codes corresponding to a target application to which a URL of the target page belongs, wherein the target application is opened by the browser, the target application comprises a plurality of URLs, the plurality of URLs comprise the URL of the target page, and the target javascript codes are included in the plurality of javascript codes.

[0025] The adjusting unit is configured to adjust display properties of the target page by using the target javascript codes.

[0026] The display unit is configured to display the target page in the smart television according to the adjusted display properties.

[0027] In some embodiments, the determining unit comprises:

[0028] The first determining module is configured to determine the target application to which the URL of the target page belongs.

[0029] The second determining module is configured to determine the target javascript codes corresponding to the target application according to a preset correspondence between applications and javascript codes.

[0030] In some embodiments, the adjusting unit comprises:

[0031] The adding module is configured to add the target javascript codes to a javascript code file of the target application and compile the target javascript codes into an sdk of the target application, so that the browser executes the target javascript codes when the target application loads the target page after being started.

[0032] In some embodiments, the adjusting unit comprises at least one of the following:

[0033] The first adjusting module is configured to adjust a layout of the target page by using the target javascript codes.

[0034] The second adjusting module is configured to adjust the resolution of the target page by using the target javascript code.

[0035] The third adjusting module is configured to adjust the function of the target application by using the target javascript code.

[0036] In a third aspect, an embodiment of the present application provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the page display method of the smart television according to the first aspect.

[0037] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executable on a processor to implement the page display method of the smart television according to the first aspect.

[0038] Compared with the prior art, the page display method of the smart television provided by the embodiment of the present application creates a context environment in the V8 script analysis engine of the browser, obtains a javascript script file, wherein the javascript script file comprises a plurality of javascript codes, and the javascript codes are used to adjust the display properties of a page in the smart television, obtains a display request of a target page, determines target javascript codes corresponding to a target application to which a URL of the target page belongs, wherein the target application is opened by the browser, the target application comprises a plurality of URLs, the plurality of URLs comprise the URL of the target page, and the target javascript codes are included in the plurality of javascript codes, adjusts the display properties of the target page by using the target javascript codes, and displays the target page in the smart television according to the adjusted display properties, so that the problem that most pages are developed and tested on a PC terminal and are incompatible with the smart television, and various problems occur when the smart television accesses the page, is solved, the browser is compatible with various pages for display, and the user experience of the smart television is improved.

[0039] Details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate embodiments of the present application and its description, which serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:

[0041] Figure 1 is a structural block diagram of a mobile terminal according to an embodiment of the present application;

[0042] Figure 2 is a flow chart of a page display method of a smart television according to an embodiment of the present application;

[0043] Figure 3 is a flow chart of a page display method of a smart television according to a preferred embodiment of the present application;

[0044] Figure 4 is a structural block diagram of a page display apparatus of a smart television according to an embodiment of the present application;

[0045] Figure 5 is a hardware structural schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is described and explained below in connection with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0047] Obviously, the drawings in the following description are only some examples or embodiments of the present application, and for those of ordinary skill in the art, the present application can be applied to other similar scenarios without creative efforts based on these drawings. In addition, it can be understood that although the efforts made in this development process can be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some designs, manufacturing or production changes based on the technical content disclosed in the present application are only routine technical means and should not be understood as insufficient disclosure of the present application.

[0048] In the present application, "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it independent or alternative to other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in the present application can be combined with other embodiments without conflict.

[0049] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0050] This embodiment provides a mobile terminal. Figure 1 This is a structural block diagram of a mobile terminal according to an embodiment of this application. For example... Figure 1 As shown, the mobile terminal includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, a processor 180, and a power supply 190, among other components. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0051] The following is combined with Figure 1 A detailed introduction to each component of a mobile terminal:

[0052] The RF circuit 110 can be used for receiving and sending signals in the process of information or communication, in particular, receiving the downlink information from the base station and processing by the processor 180; in addition, sending the uplink data to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 110 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to global system for mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.

[0053] The memory 120 can be used to store software programs and modules, and the processor 180 executes various function applications and data processing of the mobile terminal by running the software programs and modules stored in the memory 120. The memory 120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the mobile terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 120 can include a high-speed random access memory, and can also include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0054] The input unit 130 can be used to receive input digital or character information and generate key signal corresponding to user’s setting and function control of the mobile terminal. Specifically, the input unit 130 can include a touch panel 131 and other input devices 132. The touch panel 131, also called a touch screen, can collect a user’s touch operation (such as the user’s operation on or near the touch panel 131 using a finger, a stylus or any suitable object or accessory) and drive a corresponding connection device according to a pre-set program. Optionally, the touch panel 131 can include two parts, a touch detection device and a touch controller. The touch detection device detects the user’s touch position and detects the signal caused by the touch operation and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch coordinates and sends it to the processor 180, and can also receive the command from the processor 180 and execute it. In addition, the touch panel 131 can be implemented in various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 131, the input unit 130 can also include other input devices 132. Specifically, the other input devices 132 can include one or more of a physical keyboard, function keys (such as volume control keys, on / off keys, etc.), trackballs, mice, joysticks, etc.

[0055] The display unit 140 can be used to display information input by the user or information provided to the user and various menus of the mobile terminal. The display unit 140 can include a display panel 141, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near it, it transmits to the processor 180 to determine the type of touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in the above description, the touch panel 131 and the display panel 141 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the mobile terminal. Figure 1

[0056] ​The mobile terminal can further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, can detect the magnitude and direction of gravity, and can be used for applications of identifying the posture of the mobile terminal (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like. As for other sensors that can also be configured in the mobile terminal, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here.

[0057] The speaker 161 and the microphone 162 in the audio circuit 160 can provide an audio interface between the user and the mobile terminal. The audio circuit 160 can convert the received audio data into an electrical signal, transmit it to the speaker 161, and convert it into a sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, which is then processed by the processor 180 and transmitted to another mobile terminal via the RF circuit 110, or output to the storage 120 for further processing.

[0058] WiFi belongs to a short-range wireless transmission technology, and the mobile terminal can help the user to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides the user with wireless broadband Internet access. Although Figure 1 The WiFi module 170 is shown, but it can be understood that it does not belong to the essential components of the mobile terminal, and can be omitted or replaced by other short-range wireless transmission modules, such as Zigbee modules or WAPI modules, without changing the essence of the application.

[0059] The processor 180 is the control center of the mobile terminal, which connects all parts of the mobile terminal through various interfaces and lines, executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the storage 120 and calling data stored in the storage 120, and thus monitors the mobile terminal as a whole. Optionally, the processor 180 can include one or more processing units; preferably, the processor 180 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also be integrated into the processor 180.

[0060] The mobile terminal further includes a power supply 190 (e.g., a battery) for supplying power to each component, and preferably, the power supply is logically connected to the processor 180 through a power management system, so that the power management system can perform functions such as management of charging, discharging, and power consumption management.

[0061] Although not shown, the mobile terminal can further include a camera, a Bluetooth module, etc., which will not be described here.

[0062] In the embodiment, the processor 180 is configured to: after a V8 script parsing engine of a browser creates a context environment, acquire a javascript script file, wherein the javascript script file includes a plurality of pieces of javascript code, and the javascript code is used to adjust display properties of a page in a smart television; acquire a display request of a target page; determine target javascript code corresponding to a target application to which a URL of the target page belongs, wherein the target application is opened through the browser, the target application includes a plurality of URLs, the plurality of URLs include the URL of the target page, and the target javascript code is included in the plurality of pieces of javascript code; adjust display properties of the target page by using the target javascript code; and display the target page in the smart television according to the adjusted display properties.

[0063] In some embodiments, the processor 180 is further configured to: determine the target application to which the URL of the target page belongs; and determine the target javascript code corresponding to the target application according to a preset corresponding relationship between applications and javascript codes.

[0064] In some embodiments, the processor 180 is further configured to: add the target javascript code to a javascript code file of the target application, and compile the target javascript code into an sdk of the target application, so that the browser executes the target javascript code when the target application loads the target page after being started.

[0065] In some embodiments, the processor 180 is further configured to: adjust a layout of the target page by using the target javascript code; adjust a resolution of the target page by using the target javascript code; and adjust a function of the target application by using the target javascript code.

[0066] The embodiment provides a page display method of a smart television. Figure 2is a flowchart of a page display method of a smart TV according to an embodiment of the present application, as shown in the figure, the flow includes the following steps: Figure 2

[0067] In step S201, after a context environment is created by a V8 script analysis engine of a browser, a javascript script file is acquired, wherein the javascript script file includes multiple pieces of javascript code, and the javascript code is used to adjust display properties of a page in a smart TV.

[0068] In step S202, a display request of a target page is acquired.

[0069] In step S203, target javascript code corresponding to a target application to which a URL of the target page belongs is determined, wherein the target application is opened through the browser, the target application includes multiple URLs, the multiple URLs include the URL of the target page, and the multiple pieces of javascript code include the target javascript code.

[0070] In step S204, the target javascript code is used to adjust display properties of the target page.

[0071] In step S205, the target page is displayed in the smart TV according to the adjusted display properties.

[0072] Through the above steps, after a context environment is created by a V8 script analysis engine of a browser, a javascript script file is acquired, wherein the javascript script file includes multiple pieces of javascript code, and the javascript code is used to adjust display properties of a page in a smart TV. A display request of a target page is acquired. Target javascript code corresponding to a target application to which a URL of the target page belongs is determined, wherein the target application is opened through the browser, the target application includes multiple URLs, the multiple URLs include the URL of the target page, and the multiple pieces of javascript code include the target javascript code. The target javascript code is used to adjust display properties of the target page. The target page is displayed in the smart TV according to the adjusted display properties. It is solved that most pages are developed and tested on a PC end, are not compatible with a smart TV, and various problems occur when the smart TV accesses the page. Browser compatibility of various pages for display is achieved, and user experience of the smart TV is improved.

[0073] ​In some embodiments, after the browser in the smart TV is started, a browser process acquires web page resources (including but not limited to html files, css, javascript, etc.), and a render process parses web page content. The browser process is the main process of the browser, responsible for ui response, resource acquisition, etc. The browser has only one browser process. The render process is also a process of the browser, and the browser runtime may have multiple render processes, depending on the number of new tabs opened and the strategy of the browser to create render processes. The render process is mainly used for page rendering and other functions. The V8 script parsing engine is a script parsing engine for javascript, running in the render process. After the V8 script parsing engine creates a context environment, a javascript script file is acquired, wherein the javascript script file includes multiple pieces of javascript code, and the javascript code is used to adjust the display properties of the page in the smart TV, including but not limited to page layout, page resolution, etc. The javascript script file includes multiple pieces of javascript code corresponding to multiple applications in the browser, that is, the javascript code has a corresponding relationship with the application. The application can be opened through the browser, and the application icon can be displayed in the display page of the browser. The user clicks the application icon to open the application, and multiple URL links can be included in the application.

[0074] In some embodiments, the browser can monitor whether there is a user trigger operation, such as clicking a URL link. When the user trigger operation triggers a display request of a target page, the browser can acquire the display request of the target page and acquire the URL of the target page.

[0075] After acquiring the URL of the target page, the target javascript code corresponding to the target application to which the URL of the target page belongs can be determined, wherein the target application is opened through the browser, the target application includes multiple URLs, the multiple URLs include the URL of the target page, and the multiple pieces of javascript code include the target javascript code.

[0076] In some embodiments, determining the target javascript code corresponding to the target application to which the URL of the target page belongs can include:

[0077] determining the target application to which the URL of the target page belongs;

[0078] According to a preset correspondence between an application and a JavaScript code, the target JavaScript code corresponding to the target application is determined.

[0079] According to the application, the target JavaScript code for adjusting the display attribute is determined according to the target application to which the URL of the target page belongs, so that the display attribute of the page can be flexibly modified, and the purpose of adapting the page to the smart TV browser is achieved. By prewriting the JavaScript script file containing the JavaScript codes corresponding to multiple applications, when the display attribute of the page needs to be adjusted, the target JavaScript code is added to the JavaScript code file of the target application and is compiled into the SDK of the target application, so that when the target application loads the target page, the browser executes the target JavaScript code.

[0080] After the target JavaScript code corresponding to the target application to which the URL of the target page belongs is determined, the display attribute of the target page is adjusted by using the target JavaScript code, and the target page is displayed in the smart TV according to the adjusted display attribute, so that the purpose of accurately displaying the target page in the browser of the smart TV is achieved.

[0081] In some embodiments, adjusting the display attribute of the target page by using the target JavaScript code can include:

[0082] The target JavaScript code is added to the JavaScript code file of the target application and is compiled into the SDK of the target application, so that when the target application loads the target page, the browser executes the target JavaScript code, so as to achieve the purpose of adjusting the display attribute of the target page.

[0083] In some embodiments, adjusting the display attribute of the target page by using the target JavaScript code includes at least one of the following:

[0084] Adjusting the layout of the target page by using the target JavaScript code;

[0085] Adjusting the resolution of the target page by using the target JavaScript code;

[0086] Adjusting the function of the target application by using the target JavaScript code.

[0087] The customized JavaScript script file is written by the browser manufacturer, and the JavaScript script file is injected into each opened web page. The injection of specific JavaScript code is determined by the application to which the current URL belongs, and the function is to customize the function or layout of the web application. For example, some TV manufacturers want to open an application with a browser, and the homepage has a Back button to exit the browser. At this time, the page itself cannot implement this function, so the browser needs to inject the prepared JavaScript code into the corresponding application JavaScript code and compile it into the SDK of the application. In this way, when the application loads the web page after starting, the browser can execute the JavaScript code to adjust the display of the browser page. Or in the case that the resolution of some pages can adapt to PC browsers but not to smart TV browsers, the embedded browser side can only inject JavaScript code to realize the scaling function of the page.

[0088] The JavaScript script file is actually a JS script synthesis applied to multiple applications, but it is not active in the source code. The browser can determine (the specific determination process is that when a certain application in the smart TV is clicked, the application name can be obtained through configuration or other methods. At this time, the browser process adds the application information when creating the render process, that is, opening a tab. Therefore, the render process can know the application of the current render process after the V8 script parsing engine context environment is successfully established, so as to load the script corresponding to the application. Therefore, the script actually inserted into the browser page is a specific built-in App script, which acts on the page together with the JS of the page itself.

[0089] The embodiment of the present application loads the built-in user script and inserts it into the page after the context environment of the V8 script parsing engine is created, changes the logic of the page, and adjusts some problems of the page. The embodiment of the present application mainly realizes a method for adjusting different websites.

[0090] The embodiment of the present application reversely processes the characteristics of the web page through the TV browser, inserts the customized script, and achieves the effect of adapting the web page to normally display on the smart TV. After the script context environment of the engine is created, the built-in script module of the browser is called to listen to various events of various pages, inject related JS into the page, and adjust the key response, layout, and other problems of the page.

[0091] As shown in Figure 3 the specific implementation process of the embodiment of the present application includes the following steps:

[0092] In step S301, the browser acquires a page script resource.

[0093] In step S302, the render process parses the script.

[0094] In step S303, the V8 script parsing engine creates a context environment and reads a customized script module. The customized script module is the javascript script file in the above description.

[0095] In step S304, the current URL and the matched script module are matched to determine whether the script needs to be inserted. The inserted script is the javascript code in the above description. If the script needs to be inserted, step S305 is executed, otherwise step S306 is executed.

[0096] In step S305, the user customized script is inserted to adjust the web page content.

[0097] In step S306, the V8 script parsing engine parses the web page content, and the smart TV browser displays the web page content.

[0098] For example, page layout correction

[0099] Due to the difference between the embedded device and the PC environment, the layout of some pages on the device will have some deviations affecting the user experience. At this time, the user script needs to be inserted to achieve the effect of adjusting the page.

[0100] First, the browser requests a web page, and listens to the V8 script parsing engine of the browser. After the browser receives the page script resource and the V8 script parsing engine context environment is created, the customized script module is read, and the web page loading is listened to. When the DOMContentLoaded, that is, the initial HTML document is completely loaded and parsed, the current URL is judged. If it is a page URL that needs to be adjusted, the JS code is written to change the page attribute, and thus the page is adjusted, and the browser displays the adjusted page.

[0101] The embodiments of the application can achieve the following technical effects:

[0102] 1. Perfect customization of different page requirements, different page logic changes can be made for different website pages.

[0103] 2. Effectively improves the display problem of some pages on the embedded device, such as page layout display, key response, etc.

[0104] 3、Can be divided by application to determine the execution of different scripts, even if the same URL, if in different applications, will have different performance, for the adjustment of the page has high flexibility.

[0105] It should be noted that the steps shown in the above flow or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.

[0106] The embodiment provides a page display device of a smart television, which is used for realizing the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the terms "module", "unit", "sub-unit" and the like can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, hardware, or a combination of software and hardware is also possible and is conceived.

[0107] Figure 4 The structure block diagram of the page display device of the smart television according to the embodiment of the application is shown in FIG. 1, which comprises: Figure 4

[0108] The first acquisition unit 41 is configured to acquire a javascript script file after a V8 script analysis engine of a browser creates a context environment, wherein the javascript script file comprises a plurality of javascript codes, and the javascript codes are used to adjust display properties of a page in a smart television.

[0109] The second acquisition unit 42 is configured to acquire a display request of a target page.

[0110] The determination unit 43 is configured to determine target javascript codes corresponding to a target application to which a URL of the target page belongs, wherein the target application is opened through the browser, the target application comprises a plurality of URLs, the plurality of URLs comprise the URL of the target page, and the target javascript codes are included in the plurality of javascript codes.

[0111] The adjustment unit 44 is configured to adjust display properties of the target page by using the target javascript codes.

[0112] The display unit 45 is configured to display the target page in the smart television according to the adjusted display properties.

[0113] In some embodiments, the determination unit 43 comprises: ​

[0114] The first determining module is configured to determine the target application corresponding to the URL of the target page.

[0115] The second determining module is configured to determine the target JavaScript code corresponding to the target application according to a preset correspondence between applications and JavaScript codes.

[0116] In some embodiments, the adjusting unit 44 includes:

[0117] The adding module is configured to add the target JavaScript code into a JavaScript code file of the target application and compile the target JavaScript code into an SDK of the target application, so that the browser executes the target JavaScript code when the target application loads the target page after being started.

[0118] In some embodiments, the adjusting unit 44 includes at least one of the following:

[0119] The first adjusting module is configured to adjust the layout of the target page by using the target JavaScript code.

[0120] The second adjusting module is configured to adjust the resolution of the target page by using the target JavaScript code.

[0121] The third adjusting module is configured to adjust the function of the target application by using the target JavaScript code.

[0122] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combination.

[0123] Embodiments provide a computer device. The page display method of the smart television according to the embodiments of the present application can be implemented by the computer device. Figure 5 The hardware structure of the computer device according to the embodiments of the present application is shown in the figure.

[0124] The computer device can include a processor 51 and a memory 52 storing computer program instructions.

[0125] In particular, the processor 51 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to perform the functions of the embodiments of the present application.

[0126] The memory 52 can include a mass storage for data or instructions. By way of example and not limitation, the memory 52 can include a Hard Disk Drive (HDD), a floppy disk drive, a Solid State Drive (SSD), a flash drive, a Compact Disc (CD) ROM, a DVD ROM, a tape drive, a Universal Serial Bus (USB) drive, or a combination of two or more of these. The memory 52 can be removable and / or non-removable (or fixed) as appropriate. The memory 52 can be internal or external as appropriate. In certain embodiments, the memory 52 is a non-volatile memory. In certain embodiments, the memory 52 includes a Read-Only Memory (ROM) and a Random Access Memory (RAM). The ROM can be a mask-programmed ROM, a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Electrically Alterable Read-Only Memory (EAROM), or a FLASH, or a combination of two or more of these, as appropriate. The RAM can be a Static Random-Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM), which can be a Fast Page Mode Dynamic Random Access Memory (FPMDRAM), an Extended Data Output Dynamic Random Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), or the like, as appropriate.

[0127] The memory 52 can be used to store or buffer various data files needed for processing and / or communication, and possible computer program instructions executed by the processor 51.

[0128] The processor 51 realizes the page display method of the intelligent television in any of the above embodiments by reading and executing the computer program instructions stored in the memory 52.

[0129] In some embodiments, the computer device can further include a communication interface 53 and a bus 50. In which, as shown in the figure, the processor 51, the memory 52, the communication interface 53 are connected through the bus 50 and complete the communication among each other. Figure 5

[0130] The communication interface 53 is used to realize the communication among the modules, devices, units and / or equipment in the embodiments of the present application. The communication interface 53 can also realize the data communication between other components, such as: external devices, image / data acquisition devices, databases, external storage and image / data processing workstations, etc.

[0131] ​Bus 50 includes hardware, software, or both, to couple components of the computer device to each other and to couple components to other components in the environment. Bus 50 includes, but is not limited to, at least one of the following: a data bus, an address bus, a control bus, an expansion bus, a local bus, and the like. By way of example, and not limitation, bus 50 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 50 can include one or more buses. Although the present embodiments describe and show a particular bus, the present embodiments contemplate any suitable bus or interconnect.

[0132] In addition, in combination with the page display method of the smart television in the above-mentioned embodiments, the present embodiments can provide a computer readable storage medium for implementation. The computer readable storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any one of the page display methods of the smart television in the above-mentioned embodiments.

[0133] The technical features of the above-mentioned embodiments can be combined arbitrarily, and in order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, it should be considered that they are within the scope of the present disclosure.

[0134] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are all within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.

Claims

1. A method for displaying a page of a smart TV, characterized in that, The application comprises the following steps: After a V8 script parsing engine of a browser creates a context environment, a javascript script file is obtained, wherein the javascript script file comprises multiple pieces of javascript code, and the javascript code is used to adjust display properties of a page in a smart TV; the V8 script parsing engine is a script parsing engine of javascript and runs in a render process; the display properties comprise page layout and page resolution; the multiple pieces of javascript code correspond to multiple applications in the browser respectively; A display request of a target page is obtained; Target javascript code corresponding to a target application to which a URL of the target page belongs is determined, wherein the target application is opened by the browser, the target application comprises multiple URLs, the multiple URLs comprise the URL of the target page, and the multiple pieces of javascript code comprise the target javascript code; Display properties of the target page are adjusted by using the target javascript code; The target page is displayed in the smart TV according to the adjusted display properties; The method comprises the following steps:

2. The method of claim 1, wherein, The target javascript code is added to a javascript code file of the target application and is compiled into an sdk of the target application, so that the browser executes the target javascript code when the target application loads the target page after starting; or, in the case that the resolution of some pages can be adapted to a PC browser but cannot be adapted to a smart TV browser, a scaling function of the page is realized by injecting javascript code from the embedded browser side. The method comprises the following steps: The target application to which the URL of the target page belongs is determined; 3. The method of claim 1, wherein, The target javascript code corresponding to the target application is determined according to a preset corresponding relationship between applications and javascript codes. The method for adjusting the display properties of the target page by using the target javascript code comprises at least one of the following: The layout of the target page is adjusted by using the target javascript code; The resolution of the target page is adjusted by using the target javascript code; 4. A page display apparatus of a smart TV, characterized by, The function of the target application is adjusted by using the target javascript code. The application comprises the following steps: The first obtaining unit is configured to obtain a javascript script file after a V8 script parsing engine of a browser creates a context environment, wherein the javascript script file includes a plurality of pieces of javascript code, and the javascript code is used to adjust display properties of a page in a smart television; the V8 script parsing engine is a script parsing engine of javascript and runs in a render process; the display properties include page layout and page resolution; and the plurality of pieces of javascript code correspond to a plurality of applications in the browser respectively. The second obtaining unit is configured to obtain a display request of a target page. The determining unit is configured to determine target javascript code corresponding to a target application to which a URL of the target page belongs, wherein the target application is opened by the browser, the target application includes a plurality of URLs, the plurality of URLs include the URL of the target page, and the target javascript code is included in the plurality of pieces of javascript code. The adjusting unit is configured to adjust display properties of the target page by using the target javascript code. The display unit is configured to display the target page in the smart television according to the adjusted display properties. The adjusting unit includes an adding module configured to add the target javascript code to a javascript code file of the target application and compile the target javascript code into an sdk of the target application, so that the browser executes the target javascript code when the target application loads the target page after being started; or, in a case where resolutions of some pages can be adapted to a PC browser but cannot be adapted to a smart television browser, a scaling function of the pages is implemented by injecting javascript code from an embedded browser side.

5. The apparatus of claim 4, wherein, The determining unit includes: A first determining module configured to determine the target application to which the URL of the target page belongs. A second determining module configured to determine the target javascript code corresponding to the target application according to a preset correspondence between applications and javascript codes.

6. The apparatus of claim 4, wherein, The adjusting unit includes at least one of the following: A first adjusting module configured to adjust layout of the target page by using the target javascript code. A second adjusting module configured to adjust resolution of the target page by using the target javascript code. A third adjusting module configured to adjust a function of the target application by using the target javascript code.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the page display method of the smart television according to any one of claims 1 to 3.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the page display method of the smart television according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method and device for regulating video playing interface

    CN103546821A

  • Page rendering method and device, server and readable storage medium

    CN111352682A