CN113064635A - Page display method and device of smart television - Google Patents

Page display method and device of smart television Download PDF

Info

Publication number
CN113064635A
CN113064635A CN202110296703.3A CN202110296703A CN113064635A CN 113064635 A CN113064635 A CN 113064635A CN 202110296703 A CN202110296703 A CN 202110296703A CN 113064635 A CN113064635 A CN 113064635A
Authority
CN
China
Prior art keywords
target
page
javascript code
javascript
adjusting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110296703.3A
Other languages
Chinese (zh)
Inventor
黄淑倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seerof Information Technology Shanghai Co ltd
Original Assignee
Seerof Information Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seerof Information Technology Shanghai Co ltd filed Critical Seerof Information Technology Shanghai Co ltd
Priority to CN202110296703.3A priority Critical patent/CN113064635A/en
Publication of CN113064635A publication Critical patent/CN113064635A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • H04N21/4355Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving reformatting operations of additional data, e.g. HTML pages on a television screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention relates to a page display method and device of an intelligent television, wherein the method comprises the following steps: after a context environment is created by a V8 script analysis engine of a browser, a javascript script file is obtained, wherein the javascript script file comprises a plurality of sections of javascript codes; acquiring a display request of a target page; determining a target javascript code corresponding to a target application to which the URL of the target page belongs; adjusting the display attribute of the target page by using the target javascript code; and displaying the target page in the intelligent television according to the adjusted display attribute. Through the method and the device, the problems that most of pages are developed and tested on the PC side, are not compatible with the smart television, and the pages are accessed by the smart television are various are solved, the browser is compatible with various pages to display, and the user experience of the smart television is improved.

Description

Page display method and device of smart television
Technical Field
The invention relates to the technical field of smart televisions, in particular to a page display method and device of a smart television, computer equipment and a computer readable storage medium.
Background
In the smart television field, the functions of surfing the internet, such as watching live broadcast, watching video, watching news and the like, can be realized through the built-in browser, and the family entertainment experience of a user is greatly enriched. Like the page display of the computer, the smart television browser loads and analyzes page resources and finally renders the page resources on a television screen. On different browsers or devices, the page display effects may be different, so that one page is difficult to give consideration to multiple devices. At present, most pages are developed and tested on a PC (personal computer) terminal, are incompatible with the smart television, and various problems, such as page typesetting, page key response to a television remote controller and the like, can occur when the pages are actually accessed by the smart television, so that the use experience of a user is seriously influenced.
At present, aiming at the problems that most pages are developed and tested on a PC terminal in the related technology and are incompatible with a smart television, various problems can occur when the pages are accessed by the smart television, and an effective solution is not provided.
Disclosure of Invention
The present application aims to overcome the defects in the prior art, and provide a page display method and apparatus for a smart television, a computer device, and a computer-readable storage medium, so as to solve at least various problems that most of pages in the related art are developed and tested on a PC, are incompatible with the smart television, and are different when the pages are accessed by the smart television.
In order to achieve the purpose, the technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a page display method for a smart television, including:
after a context environment is created by a V8 script analysis engine of a browser, obtaining a javascript script file, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting display attributes of a page in a smart television;
acquiring a display request of a target page;
determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes comprise the target javascript code;
adjusting the display attribute of the target page by using the target javascript code;
and displaying the target page in the intelligent television according to the adjusted display attribute.
In some embodiments, determining the target javascript code corresponding to the target application to which the URL of the target page belongs includes:
determining the target application to which the URL of the target page belongs;
and determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
In some embodiments, adjusting the display attribute of the target page using the target javascript code comprises:
and adding the target javascript code into a javascript code file of the target application, and compiling into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
In some embodiments, adjusting the display attribute of the target page using the target javascript code includes at least one of:
adjusting the typesetting of the target page by using the target javascript code;
adjusting the resolution of the target page by using the target javascript code;
and adjusting the function of the target application by using the target javascript code.
In a second aspect, an embodiment of the present application provides a page display apparatus for a smart television, including:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a javascript script file after a V8 script parsing engine of a browser creates a context environment, the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting the display attribute of a page in the smart television;
the second acquisition unit is used for acquiring a display request of the target page;
a determining unit, configured to determine a target javascript code corresponding to a target application to which a URL of the target page belongs, where 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 adjusting unit is used for adjusting the display attribute of the target page by using the target javascript code;
and the display unit is used for displaying the target page in the intelligent television according to the adjusted display attribute.
In some of these embodiments, the determining unit comprises:
a first determining module, configured to determine the target application to which the URL of the target page belongs;
and the second determining module is used for determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
In some of these embodiments, the adjusting unit includes:
and the adding module is used for adding the target javascript code into the javascript code file of the target application and compiling the target javascript code file into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
In some of these embodiments, the adjustment unit comprises at least one of:
the first adjusting module is used for adjusting the typesetting of the target page by using the target javascript code;
the second adjusting module is used for adjusting the resolution of the target page by using the target javascript code;
and the third adjusting module is used for adjusting the function of the target application by using the target javascript code.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the page display method of the smart television according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the page display method of the smart tv as described in the first aspect above.
By adopting the technical scheme, compared with the prior art, the page display method of the smart television provided by the embodiment of the application obtains the javascript script file after the context environment is created by the V8 script parsing engine of the browser, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting the display attribute of the page in the smart television; acquiring a display request of a target page; determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes comprise the target javascript code; adjusting the display attribute of the target page by using the target javascript code; the target page is displayed in the smart television according to the adjusted display attribute, so that the problems that most of pages are developed and tested on a PC (personal computer) terminal, are incompatible with the smart television, and various pages can be accessed by the smart television are solved, the browser is compatible with various pages to display, and the user experience of the smart television is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a mobile terminal according to an embodiment of the present application;
fig. 2 is a flowchart of a page display method of a smart tv according to an embodiment of the present application;
fig. 3 is a flowchart of a page display method of a smart tv according to a preferred embodiment of the present application;
fig. 4 is a block diagram of a page display apparatus of a smart tv according to an embodiment of the present application;
fig. 5 is a hardware structure diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The embodiment provides a mobile terminal. Fig. 1 is a block diagram of a mobile terminal according to an embodiment of the present application. As shown in fig. 1, 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. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each constituent element of the mobile terminal in detail with reference to fig. 1:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 180; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuits include, but are not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may 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 Message Service (SMS), and the like.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing of the mobile terminal by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 131 (e.g., operations of the user on or near the touch panel 131 using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 131 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch panel 131 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 130 may include other input devices 132 in addition to the touch panel 131. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the mobile terminal. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although the touch panel 131 and the display panel 141 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the mobile terminal.
The mobile terminal may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may 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), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the mobile terminal, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile terminal, further description is omitted here.
A speaker 161 and a microphone 162 in the audio circuit 160 may provide an audio interface between the user and the mobile terminal. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then transmits the audio data to, for example, another mobile terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and the mobile terminal can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 170, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 170, it is understood that it does not belong to the essential components of the mobile terminal, and it can be omitted or replaced with other short-range wireless transmission modules, such as Zigbee module or WAPI module, etc., as required within the scope not changing the essence of the invention.
The processor 180 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile terminal. Alternatively, processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The mobile terminal also includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 180 via a power management system that may be configured to manage charging, discharging, and power consumption.
Although not shown, the mobile terminal may further include a camera, a bluetooth module, and the like, which will not be described herein.
In this embodiment, the processor 180 is configured to: after a context environment is created by a V8 script analysis engine of a browser, obtaining a javascript script file, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting display attributes of a page in a smart television; acquiring a display request of a target page; determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes comprise the target javascript code; adjusting the display attribute of the target page by using the target javascript code; and displaying the target page in the intelligent television according to the adjusted display attribute.
In some of these embodiments, the processor 180 is further configured to: determining the target application of the URL of the target page; and determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
In some of these embodiments, the processor 180 is further configured to: and adding the target javascript code into a javascript code file of the target application, and compiling into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
In some of these embodiments, the processor 180 is further configured to: adjusting the typesetting of the target page by using the target javascript code; adjusting the resolution of the target page by using the target javascript code; and adjusting the function of the target application by using the target javascript code.
The embodiment provides a page display method of an intelligent television. Fig. 2 is a flowchart of a page display method of a smart tv according to an embodiment of the present application, where as shown in fig. 2, the flowchart includes the following steps:
step S201, after a context environment is created by a V8 script parsing engine of a browser, obtaining a javascript script file, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting display attributes of a page in a smart television;
step S202, acquiring a display request of a target page;
step S203, determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes include the target javascript code;
step S204, adjusting the display attribute of the target page by using the target javascript code;
and step S205, displaying the target page in the smart television according to the adjusted display attribute.
Through the steps, after a context environment is created by a V8 script analysis engine of the browser, a javascript script file is obtained, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting the display attribute of a page in the smart television; acquiring a display request of a target page; determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes comprise the target javascript code; adjusting the display attribute of the target page by using the target javascript code; the target page is displayed in the smart television according to the adjusted display attribute, so that the problems that most of pages are developed and tested on a PC (personal computer) terminal, are incompatible with the smart television, and various pages can be accessed by the smart television are solved, the browser is compatible with various pages to display, and the user experience of the smart television is improved.
In some embodiments, after a browser in the smart television is started, a browser process obtains web page resources (including but not limited to html files, css, javascript, and the like), and a render process parses web page contents. The browser process is a main process of the browser and is responsible for ui response, resource acquisition and other functions. The browser only has one browser process. The render process is also a process of the browser, and there may be multiple render processes when the browser runs, depending on the number of pages of new tabs opened and the policy of the browser to create the render process. The Render process is mainly used for functions such as rendering of pages. The V8 script parsing engine is a script parsing engine of javascript and runs in a render process. After the context environment is created by the V8 script parsing engine, a javascript script file is obtained, wherein the javascript script file includes a plurality of sections of javascript codes, the javascript codes are used for adjusting display attributes of a page in a smart television, and the display attributes include, but are not limited to: page layout, page resolution, etc. The javascript script file comprises a plurality of sections of javascript codes which respectively correspond to a plurality of applications in the browser, namely the javascript codes and the applications have corresponding relations. The application can be opened through the browser, the application icon can be displayed in a display page of the browser, a user can open the application by clicking the application icon browser, and the application can further comprise a plurality of URL links.
In some embodiments, the browser may monitor whether a user trigger operation exists, for example, clicking a URL link, and when the user trigger operation triggers a display request of a target page, the browser may acquire the display request of the target page and acquire a URL of the target page.
After the URL of the target page is obtained, a target javascript code corresponding to a target application to which the URL of the target page belongs may be determined, where the target application is opened by the browser, the target application includes a plurality of URLs, the plurality of URLs includes the URL of the target page, and the plurality of sections of javascript codes include the target javascript code.
In some embodiments, determining the target javascript code corresponding to the target application to which the URL of the target page belongs may include:
determining the target application of the URL of the target page;
and determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
According to the method and the device for adjusting the display attribute, 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, the page display attribute can be flexibly modified, and therefore the purpose that the page is adaptive and compatible with the smart television browser is achieved. By pre-writing a javascript script file containing javascript codes corresponding to a plurality of applications, when page display attributes need to be adjusted, only the target javascript code needs to be added into the javascript code file of the target application and compiled into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
After determining a target javascript code corresponding to a target application to which the URL of the target page belongs, adjusting the display attribute of the target page by using the target javascript code; and displaying the target page in the intelligent television according to the adjusted display attribute, so as to achieve the purpose of accurately displaying the target page in a browser of the intelligent television.
In some embodiments, adjusting the display attribute of the target page using the target javascript code may include:
and adding the target javascript code into a javascript code file of the target application, and compiling the javascript code file into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started, thereby achieving the purpose of adjusting the display attribute of the target page.
In some embodiments, adjusting the display attribute of the target page using the target javascript code includes at least one of:
adjusting the typesetting of the target page by using the target javascript code;
adjusting the resolution of the target page by using the target javascript code;
and adjusting the function of the target application by using the target javascript code.
The customized javascript script files are written by the inside of a browser manufacturer, and can be injected into each opened webpage, the specific javascript code to be injected and selected is determined by the application to which the current URL belongs, the functions of customizing functions or typesetting and the like of Web application are realized, for example, some television manufacturers want to open an application by using a browser, the first page has the function of quitting the browser according to Back, at the moment, the page cannot realize the function, the browser is required to inject the compiled javascript code into the javascript code added to the corresponding application and compile the javascript code into sdk of the application, so that the browser can execute the javascript code when the webpage is loaded after the application is started, and the purpose of adjusting the display of the browser page is realized; or the resolution of some pages can be adapted to a PC browser but not an intelligent television browser, and the zooming function of the pages can be realized only by injecting javascript codes into the embedded browser side.
The javascript script file is actually a JS script synthesis applied to a plurality of applications, and only many JS files existing in the source code do not work for a page. The browser can judge (a specific judgment process is that when a certain application in the smart television is clicked, the name of the application can be acquired through methods such as configuration and the like, at this time, the browser process adds application information when a render process is created, namely a label is opened, so that the render process can know the application of the current render process after the context environment of the V8 script parsing engine is successfully established, and therefore the script corresponding to the application is loaded), and what application is currently opened is to load the specific script aiming at the application. Therefore, the script really inserted into the browser page is a specific built-in App script, and the script and the JS of the page act on the page simultaneously.
According to the method and the device for adjusting the page, after the context environment of the V8 script parsing engine is established, the built-in user script is loaded and inserted into the page, and the logic of the page is changed to adjust the problem of partial pages. The method mainly realizes the page adjustment aiming at different websites.
The method and the device for processing the webpage reversely achieve the effect of normally displaying the adaptive webpage on the smart television by analyzing the characteristics of the webpage through the television browser and inserting the customized script. After the script context environment of the engine is established, various events of various pages are monitored by calling a built-in script module of the browser, and related JS is injected into the pages to adjust the problems of key response, layout and the like of the pages.
As shown in fig. 3, a specific implementation process of the embodiment of the present application includes the following steps:
step S301, the browser obtains page script resources.
Step S302, the render process analyzes the script.
Step S303, after the V8 script parsing engine creates the context environment, the customized script module is read. The customized script module is the javascript script file above.
And step S304, matching the current URL with a matched script module, and confirming whether a script needs to be inserted or not. The script inserted here is the javascript code above. If the script needs to be inserted, step S305 is performed, otherwise step S306 is performed.
Step S305, inserting the user customized script to adjust the webpage content.
Step S306, the V8 script parsing engine parses the webpage content, and the intelligent television browser displays the webpage content.
Such as page layout correction
Due to the difference between the environment of the embedded device and the environment of the PC, the layout of a part of pages on the device has some deviations to affect the user experience, and at this time, a user script needs to be inserted to achieve the effect of adjusting the pages.
Firstly, a browser requests a webpage, monitors a browser V8 script parsing engine, reads a customized script module after the browser receives page script resources and a context environment of a V8 script parsing engine is established, monitors webpage loading, judges a current URL after DOMContentLoaded, namely an initial HTML document is completely loaded and parsed, writes a JS code to change page attributes if the URL is a page URL needing to be adjusted, and displays the adjusted page by the browser.
The embodiment of the application can realize the following technical effects:
1. the requirements of different pages are perfectly customized, and different page logic changes can be made for different website pages.
2. The display problem of partial pages on the embedded device is effectively improved, such as page typesetting display, key response and the like.
3. Different scripts can be determined to be executed by different applications, even if the same URL is in different applications, different performances can be realized, and high flexibility is provided for adjustment of pages.
It should be noted that the steps illustrated in the above-described flow diagrams or in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order different than here.
The embodiment provides a page display device of an intelligent television, which is used for implementing the above embodiments and preferred embodiments, and the description of the page display device is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a page display apparatus of a smart tv according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes:
the first obtaining unit 41 is configured to obtain a javascript script file after a context environment is created by a V8 script parsing engine of a browser, where the javascript script file includes multiple segments of javascript codes, and the javascript codes are used to adjust display attributes of a page in a smart television;
a second obtaining unit 42, configured to obtain a display request of a target page;
a determining unit 43, configured to determine a target javascript code corresponding to a target application to which the URL of the target page belongs, where the target application is opened by 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;
an adjusting unit 44, configured to adjust a display attribute of the target page by using the target javascript code;
and the display unit 45 is used for displaying the target page in the smart television according to the adjusted display attribute.
In some of these embodiments, the determining unit 43 includes:
a first determining module, configured to determine the target application of the URL of the target page;
and the second determining module is used for determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
In some of these embodiments, the adjusting unit 44 includes:
and the adding module is used for adding the target javascript code into the javascript code file of the target application and compiling the target javascript code file into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
In some of these embodiments, the adjusting unit 44 comprises at least one of:
the first adjusting module is used for adjusting the typesetting of the target page by using the target javascript code;
the second adjusting module is used for adjusting the resolution of the target page by using the target javascript code;
and the third adjusting module is used for adjusting the function of the target application by using the target javascript code.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
An embodiment provides a computer device. The page display method of the smart television combined with the embodiment of the application can be realized by computer equipment. Fig. 5 is a hardware structure diagram of a computer device according to an embodiment of the present application.
The computer device may comprise a processor 51 and a memory 52 in which computer program instructions are stored.
Specifically, the processor 51 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 52 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 52 may include a Hard disk Drive (Hard disk Drive, abbreviated to HDD), a floppy disk Drive, a Solid State Drive (SSD), flash memory, an optical disk, a magneto-optical disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 52 may include removable or non-removable (or fixed) media, where appropriate. The memory 52 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 52 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, Memory 52 includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may 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), and the like.
The memory 52 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions executed by the processor 51.
The processor 51 reads and executes the computer program instructions stored in the memory 52 to implement the page display method of the smart tv in any one of the above embodiments.
In some of these embodiments, the computer device may also include a communication interface 53 and a bus 50. As shown in fig. 5, the processor 51, the memory 52, and the communication interface 53 are connected via the bus 50 to complete mutual communication.
The communication interface 53 is used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present application. The communication interface 53 may also enable communication with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
Bus 50 comprises hardware, software, or both coupling the components of the computer device to each other. Bus 50 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 50 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus), an FSB (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Association) Bus, abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 50 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
In addition, in combination with the page display method of the smart television in the foregoing embodiment, the embodiment of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; when executed by a processor, the computer program instructions implement any one of the above-mentioned embodiments of the page display method for the smart television.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A page display method of an intelligent television is characterized by comprising the following steps:
after a context environment is created by a V8 script analysis engine of a browser, obtaining a javascript script file, wherein the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting display attributes of a page in a smart television;
acquiring a display request of a target page;
determining a target javascript code corresponding to a target application to which the 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 plurality of sections of javascript codes comprise the target javascript code;
adjusting the display attribute of the target page by using the target javascript code;
and displaying the target page in the intelligent television according to the adjusted display attribute.
2. The method of claim 1, wherein determining the target javascript code corresponding to the target application to which the URL of the target page belongs comprises:
determining the target application to which the URL of the target page belongs;
and determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
3. The method of claim 1, wherein adjusting display attributes of the target page using the target javascript code comprises:
and adding the target javascript code into a javascript code file of the target application, and compiling into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
4. The method of claim 1, wherein adjusting display attributes of the target page using the target javascript code comprises at least one of:
adjusting the typesetting of the target page by using the target javascript code;
adjusting the resolution of the target page by using the target javascript code;
and adjusting the function of the target application by using the target javascript code.
5. A page display device of an intelligent television is characterized by comprising:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a javascript script file after a V8 script parsing engine of a browser creates a context environment, the javascript script file comprises a plurality of sections of javascript codes, and the javascript codes are used for adjusting the display attribute of a page in the smart television;
the second acquisition unit is used for acquiring a display request of the target page;
a determining unit, configured to determine a target javascript code corresponding to a target application to which a URL of the target page belongs, where 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 adjusting unit is used for adjusting the display attribute of the target page by using the target javascript code;
and the display unit is used for displaying the target page in the intelligent television according to the adjusted display attribute.
6. The apparatus of claim 5, wherein the determining unit comprises:
a first determining module, configured to determine the target application to which the URL of the target page belongs;
and the second determining module is used for determining the target javascript code corresponding to the target application according to the preset corresponding relation between the application and the javascript code.
7. The apparatus of claim 5, wherein the adjusting unit comprises:
and the adding module is used for adding the target javascript code into the javascript code file of the target application and compiling the target javascript code file into sdk of the target application, so that the browser executes the target javascript code when the target page is loaded after the target application is started.
8. The apparatus of claim 5, wherein the adjustment unit comprises at least one of:
the first adjusting module is used for adjusting the typesetting of the target page by using the target javascript code;
the second adjusting module is used for adjusting the resolution of the target page by using the target javascript code;
and the third adjusting module is used for adjusting the function of the target application by using the target javascript code.
9. 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 implements the page display method of the smart tv according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the page display method of the smart tv set according to any one of claims 1 to 4.
CN202110296703.3A 2021-03-19 2021-03-19 Page display method and device of smart television Pending CN113064635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110296703.3A CN113064635A (en) 2021-03-19 2021-03-19 Page display method and device of smart television

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110296703.3A CN113064635A (en) 2021-03-19 2021-03-19 Page display method and device of smart television

Publications (1)

Publication Number Publication Date
CN113064635A true CN113064635A (en) 2021-07-02

Family

ID=76562611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110296703.3A Pending CN113064635A (en) 2021-03-19 2021-03-19 Page display method and device of smart television

Country Status (1)

Country Link
CN (1) CN113064635A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542884A (en) * 2021-07-14 2021-10-22 视若飞信息科技(上海)有限公司 Method for synchronizing JS patch files between smart television browser and server
CN114040234A (en) * 2021-11-18 2022-02-11 视若飞信息科技(上海)有限公司 Smart television application starting method and device
CN115905757A (en) * 2023-01-06 2023-04-04 深圳华强电子网集团股份有限公司 Browser digital management system and method based on distributed deployment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542884A (en) * 2021-07-14 2021-10-22 视若飞信息科技(上海)有限公司 Method for synchronizing JS patch files between smart television browser and server
CN114040234A (en) * 2021-11-18 2022-02-11 视若飞信息科技(上海)有限公司 Smart television application starting method and device
CN114040234B (en) * 2021-11-18 2024-03-15 视若飞信息科技(上海)有限公司 Smart television application starting method and device
CN115905757A (en) * 2023-01-06 2023-04-04 深圳华强电子网集团股份有限公司 Browser digital management system and method based on distributed deployment
CN115905757B (en) * 2023-01-06 2023-05-02 深圳华强电子网集团股份有限公司 Distributed deployment-based browser digital management system and method

Similar Documents

Publication Publication Date Title
CN107040609B (en) Network request processing method and device
CN113064635A (en) Page display method and device of smart television
CN109040182B (en) Service access method and device, electronic equipment and storage medium
CN107329985B (en) Page collection method and device and mobile terminal
US10095666B2 (en) Method and terminal for adding quick link
CN107766358B (en) Page sharing method and related device
US20150304336A1 (en) Multi-screen interaction method of multimedia resource and terminal device
CN103617165A (en) Picture loading method, device and terminal
CN109948090B (en) Webpage loading method and device
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
CN110020293B (en) Multimedia data display method, device and storage medium
CN113395337B (en) Method and device for preventing browser webpage from being hijacked, electronic equipment and storage medium
WO2014173167A1 (en) Method, apparatus and system for filtering data of web page
CN104750730B (en) Browser display method and device
EP2869604A1 (en) Method, apparatus and device for processing a mobile terminal resource
CN106095423B (en) Method, terminal and server for providing browsing service
CN104615622A (en) Document opening method and device and mobile terminal
CN104866288A (en) Method, device and terminal for accessing application program
CN108881969B (en) Method and device for drawing bullet screen and mobile terminal
CN112445967A (en) Information push method and device, readable storage medium and information push system
CN107798008B (en) Content pushing system, method and device
CN106331887B (en) Calling method of webpage player, playing method and device of multimedia file
CN103530152A (en) Method, device and terminal device for loading client-side scripts
CN113542884A (en) Method for synchronizing JS patch files between smart television browser and server
CN107346347B (en) Webpage table display method and device

Legal Events

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