WO2017041538A1 - 终端用户界面的受控显示方法及装置 - Google Patents

终端用户界面的受控显示方法及装置 Download PDF

Info

Publication number
WO2017041538A1
WO2017041538A1 PCT/CN2016/084250 CN2016084250W WO2017041538A1 WO 2017041538 A1 WO2017041538 A1 WO 2017041538A1 CN 2016084250 W CN2016084250 W CN 2016084250W WO 2017041538 A1 WO2017041538 A1 WO 2017041538A1
Authority
WO
WIPO (PCT)
Prior art keywords
user interface
terminal user
information
rendering
parsing
Prior art date
Application number
PCT/CN2016/084250
Other languages
English (en)
French (fr)
Inventor
徐坤鹏
刘锋
Original Assignee
深圳Tcl数字技术有限公司
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 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2017041538A1 publication Critical patent/WO2017041538A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of television technologies, and in particular, to a controlled display method and apparatus for an end user interface.
  • the front-end web page developer may not be able to take into account all the problems of different devices in the page display, which may cause the terminal device to display. Display ratios, styles, logic errors, etc. may occur during the user interface.
  • the front-end page is developed by the front-end operator.
  • the front-end operator can only rely on the front-end operator to modify the overall design of the front-end page for various problems in the front-end page, but not the front-end page on the terminal displaying the front-end page. Make any modifications to accommodate the display of the terminal.
  • the front-end operator's processing process is lengthy. Any modification or regular upgrade of the terminal user interface can only be completed through the lengthy processing flow of the front-end operator. The device developer cannot modify the terminal user interface quickly and easily.
  • the main object of the present invention is to provide a controlled display method and apparatus for an end user interface, which aims to quickly and conveniently modify the display of the terminal user interface.
  • the present invention provides a controlled display method for an end user interface, the method comprising the following steps:
  • the step of acquiring the page modification information pre-stored to the terminal includes: acquiring the page modification information injected by the user through the preset information injection interface API;
  • the page modification information is a JS logic code for adding or modifying page processing logic of the terminal user interface, the parsing the page modification information, and the end user according to the page modification information
  • the steps for the interface to render and render include:
  • the JS parser is called to parse and execute the JS logic code to render and draw the terminal user interface
  • the page modification information is a JS button processing logic code added for the terminal user interface when the terminal user interface is unable to respond to the button instruction, the parsing the page modification information, and modifying the information according to the page
  • the steps of rendering and rendering the terminal user interface include:
  • the JS parser is called to parse and execute the JS button processing logic code, and JS button processing logic is added to the terminal user interface for the terminal user interface to respond to the button command.
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information further includes:
  • the step of acquiring pre-injected page modification information includes:
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information includes:
  • Parsing the CSS information injected in the style parsing pool and rendering and rendering the terminal user interface according to the parsed CSS information and the self-contained CSS information injected into the style parsing pool when loading the terminal user interface.
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information further includes:
  • the CSS information with the highest preset weight value in the CSS information is selected for parsing, and the terminal user interface is rendered according to the parsed CSS information. draw.
  • the present invention also provides a controlled display method of an end user interface, the method comprising the following steps:
  • the page modification information is a JS logic code for adding or modifying page processing logic of the terminal user interface
  • the parsing the page modification information, and modifying the information according to the page modification information include:
  • the JS parser is called to parse and execute the JS logic code to render and render the terminal user interface.
  • the parsing the page modification information, and according to the The step of rendering the page user to render and render the terminal user interface includes:
  • the JS parser is called to parse and execute the JS button processing logic code, and JS button processing logic is added to the terminal user interface for the terminal user interface to respond to the button command.
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information further includes:
  • the step of acquiring pre-injected page modification information includes:
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information includes:
  • Parsing the CSS information injected in the style parsing pool and rendering and rendering the terminal user interface according to the parsed CSS information and the self-contained CSS information injected into the style parsing pool when loading the terminal user interface.
  • the step of parsing the page modification information and rendering and rendering the terminal user interface according to the page modification information further includes:
  • the CSS information with the highest preset weight value in the CSS information is selected for parsing, and the terminal user interface is rendered according to the parsed CSS information. draw.
  • the present invention further provides a controlled display device of an end user interface, where the controlled display device of the terminal user interface includes:
  • An acquiring module configured to acquire page modification information pre-stored to the terminal when receiving an instruction to display the terminal user interface
  • An analysis rendering module configured to parse the page modification information, and perform rendering rendering on the terminal user interface according to the page modification information, where the page modification information includes page processing logic for the terminal user interface Adding or modifying JS logic code, and/or CSS information for modifying the style of the terminal user interface;
  • a display module for displaying the terminal user interface after rendering rendering.
  • the parsing rendering module is further configured to:
  • the JS parser is called to parse and execute the JS logic code to render and render the terminal user interface.
  • the parsing rendering module is further configured to:
  • the JS parser is called to parse and execute the JS button processing logic code, and JS button processing logic is added to the terminal user interface for the terminal user interface to respond to the button command.
  • the parsing and rendering module is further configured to:
  • the obtaining module is further configured to:
  • the parsing and rendering module is further configured to:
  • Parsing the CSS information injected in the style parsing pool and rendering and rendering the terminal user interface according to the parsed CSS information and the self-contained CSS information injected into the style parsing pool when loading the terminal user interface.
  • the parsing and rendering module is further configured to:
  • the CSS information with the highest preset weight value in the CSS information is selected for parsing, and the terminal user interface is rendered according to the parsed CSS information. draw.
  • the method and device for controlling the display of the terminal user interface provided by the present invention, when receiving the instruction of displaying the user interface of the terminal, parsing the page modification information stored in advance to the terminal, and modifying the information according to the page to the terminal device
  • the user interface to be displayed is rendered and rendered to display the terminal user interface after the rendering is rendered. Since the terminal user interface can be directly rendered and rendered by using the page modification information pre-stored to the terminal before the user interface is displayed on the terminal device, without waiting for the front-end operator to modify the front-end page, the user can be It is necessary to quickly and easily modify the user interface displayed on the terminal device.
  • FIG. 1 is a schematic flowchart of an embodiment of a controlled display method of a terminal user interface according to the present invention
  • FIG. 2 is a schematic diagram of functional modules of an embodiment of a controlled display device of a terminal user interface according to the present invention.
  • the present invention provides a controlled display method of an end user interface.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a controlled display method of a terminal user interface according to the present invention.
  • the controlled display method of the terminal user interface includes:
  • Step S10 when receiving an instruction to display the user interface of the terminal, acquiring page modification information stored in advance to the terminal;
  • the loaded page is not directly displayed, but the page modification information previously stored by the user to the terminal device is first acquired, and the page modification information is injected as The page information of the user interface.
  • the page modification information may be pre-stored in a setting directory of the terminal device development board.
  • the page modification information is obtained from the setting directory.
  • the modification information of the page is information that is modified by the user according to the display ratio of the terminal device, and needs to be modified on the final displayed terminal user interface.
  • the user can obtain the user through the preset information injection interface API. Injected page modification information.
  • the page modification information may be various processing logic information and style information related to the display of the terminal user interface, such as Javascript.
  • the script code, the cascading style sheet CSS, etc. does not limit the page modification information to other modification information related to the terminal user interface.
  • step S20 the page modification information is parsed, and the terminal user interface is rendered and rendered according to the page modification information and the loaded own page information, where the page modification information includes Page processing logic for adding or modifying JS logic code, and/or CSS information for modifying the style of the terminal user interface;
  • the page modification information injected by the user is obtained through the preset information injection interface API, and the page modification information injected by the user may be parsed, and the Javascript in the modification information of the page may be parsed and obtained.
  • Valid information such as script code, cascading style sheet CSS. The default page information and the parsed Javascript that are included when loading the terminal user interface.
  • Valid information such as script code and cascading style sheet CSS is used to render and draw the terminal user interface, and the final modified terminal user interface is obtained.
  • Step S30 displaying the terminal user interface after the rendering is rendered.
  • the obtained terminal user interface after rendering is a terminal user interface that meets the requirements of the user for the final display page, and the rendered terminal is displayed on the terminal device.
  • User Interface In this way, when the user needs to modify the terminal user interface displayed on the terminal device, the preset information injection interface API is used to obtain the pre-injected page modification information, and the terminal user interface can be rendered and rendered according to the injected page modification information, and The modified end user interface is finally displayed.
  • the page modification information stored in the terminal is parsed, and the user interface to be displayed on the terminal device is rendered and rendered according to the page modification information, thereby displaying the rendering and rendering.
  • the terminal user interface can be directly rendered and rendered by using the page modification information pre-stored to the terminal before the user interface is displayed on the terminal device, without waiting for the front-end operator to modify the front-end page, the user can be It is necessary to quickly and easily modify the user interface displayed on the terminal device.
  • the foregoing step S20 may include:
  • the user may inject JS logic code by using a preset information injection interface API to display a user interface on the terminal device, where the JS logic code is used to add or modify page processing logic of the terminal user interface.
  • the JS logic code is a Javascript Script code
  • Javascript is an object- and event-driven and relatively secure client-side scripting language
  • a scripting language widely used for client-side web development, commonly used for HTML Web pages add dynamic features, such as responding to user actions.
  • the JS logic code is injected through the preset information injection interface API. And injecting a page URL corresponding to the JS logic code to modify the page processing logic, that is, a preset URL.
  • the JS logic code is identified as page modification information injected by the user to perform page processing logic modification on the terminal user interface. Then, the JS parser is called to parse and execute the JS logic code to render and render the terminal user interface, and obtain the final modified terminal user interface.
  • the operator may lack relevant processing logic when designing the front-end page of the terminal user interface.
  • the user interface cannot be displayed when the user interface is displayed on the terminal device.
  • the button event responds and the user cannot return or exit the current user interface.
  • the page modification information is a JS button processing logic code added for the terminal user interface when the terminal user interface is unable to respond to the button instruction, and is obtained when the user interface is displayed on the terminal device. After pre-storing the JS button processing logic code to the terminal, it is first determined whether the URL of the terminal user interface is consistent with the preset URL corresponding to the JS button processing logic code.
  • the JS button processing logic code is identified as page modification information injected by the user to add JS button processing logic to the terminal user interface. Then, the JS parser is called to parse and execute the JS button processing logic code, and add JS button processing logic to the terminal user interface for the terminal user interface to respond to the button command. In this way, the front end page that does not have the key response processing logic is executed by executing the JS button processing logic code to obtain the terminal user interface with the JS button processing logic added, and the user can be finally modified by the terminal user interface. The button events in the response respond to improve the user experience.
  • the end user interface processing logic may be normal, without modification, maintaining the default page processing logic of the end user interface for the user to operate in the normal end user interface.
  • the foregoing step S10 may include:
  • the above step S20 may include:
  • Parsing the CSS information injected in the style parsing pool and rendering and rendering the terminal user interface according to the parsed CSS information and the self-contained CSS information injected into the style parsing pool when loading the terminal user interface.
  • the user can optimize the default style of the terminal user interface to generate CSS information according to the display ratio and resolution of the terminal device, and inject the preset information by displaying the user interface on the terminal device.
  • the interface API injects the CSS information, and the CSS information is used to modify the style of the terminal user interface to optimize the display effect of the terminal user interface on the terminal device.
  • CSS ascading Style Sheets
  • HTML an application of the standard universal markup language
  • XML a subset of the standard universal markup language
  • the user may store the CSS information for modifying the style of the terminal user interface on the preset address of the terminal device, for example, to the preset directory of the development board, so that the user is displayed on the terminal device.
  • the preset CSS information can be read on the preset address of the terminal device, and then the read CSS information is temporarily stored in the preset character string.
  • the CSS information in the temporary string can be injected into the preset style parsing pool through the preset information injection interface API, and the self-contained style information of different pages is loaded when the terminal user interface is loaded on the terminal device. CSS information is also fully injected into the style parsing pool.
  • the same node of the terminal user interface may have some style information in the style parsing pool, and the same node of the terminal user interface only Can choose a style information for rendering. Therefore, in order to facilitate the differentiation and selection, the preset weights of the style information in the style parsing pool may be parsed. If the user needs to render the terminal user interface with the best display effect on the terminal device according to the CSS information, the CSS information may be stored on the preset address of the terminal device, and the highest right corresponding to the CSS information may be stored. Value identifier.
  • the corresponding CSS information may be identified according to the highest weight identifier to distinguish from the CSS information of the node, and The CSS information in the style parsing pool is parsed, and the end user interface can be rendered and drawn according to the parsed CSS information, and finally the end user interface with the best display effect on the terminal device is obtained according to the CSS information.
  • the highest weight identifier may be implemented by adding a “!important” suffix to the end of the style information.
  • it may also be implemented by other grammar rules or label information. Not limited.
  • the present invention further provides a controlled display device for an end user interface.
  • FIG. 2 is a schematic diagram of functional modules of an embodiment of a controlled display device for a terminal user interface according to the present invention.
  • the controlled display device of the terminal user interface comprises:
  • the obtaining module 01 is configured to acquire page modification information pre-stored to the terminal when receiving an instruction to display the terminal user interface;
  • the loaded page is not directly displayed, but the page modification information previously stored by the user to the terminal device is first acquired, and the page modification information is injected as The page information of the user interface.
  • the page modification information may be pre-stored in a setting directory of the terminal device development board.
  • the page modification information is obtained from the setting directory.
  • the modification information of the page is information that is modified by the user according to the display ratio of the terminal device, and needs to be modified on the final displayed terminal user interface.
  • the user can obtain the user through the preset information injection interface API. Injected page modification information.
  • the page modification information may be various processing logic information and style information related to the display of the terminal user interface, such as Javascript.
  • the script code, the cascading style sheet CSS, etc. does not limit the page modification information to other modification information related to the terminal user interface.
  • the parsing and rendering module 02 is configured to parse the page modification information, and render and render the terminal user interface according to the page modification information and the loaded self-contained page information, where the page modification information includes The JS logic code for adding or modifying the page processing logic of the terminal user interface, and/or CSS information for modifying the style of the terminal user interface;
  • the page modification information injected by the user is obtained through the preset information injection interface API, and the page modification information injected by the user may be parsed, and the Javascript in the modification information of the page may be parsed and obtained.
  • Valid information such as script code, cascading style sheet CSS. The default page information and the parsed Javascript that are included when loading the terminal user interface.
  • Valid information such as script code and cascading style sheet CSS is used to render and draw the terminal user interface, and the final modified terminal user interface is obtained.
  • the display module 03 is configured to display the terminal user interface after rendering and rendering.
  • the obtained terminal user interface after rendering is a terminal user interface that meets the requirements of the user for the final display page, and the rendered terminal is displayed on the terminal device.
  • User Interface In this way, when the user needs to modify the terminal user interface displayed on the terminal device, the preset information injection interface API is used to obtain the pre-injected page modification information, and the terminal user interface can be rendered and rendered according to the injected page modification information, and The modified end user interface is finally displayed.
  • the page modification information stored in the terminal is parsed, and the user interface to be displayed on the terminal device is rendered and rendered according to the page modification information, thereby displaying the rendering and rendering.
  • the terminal user interface Since the terminal user interface can be directly rendered and rendered by using the page modification information pre-stored to the terminal before displaying the user interface on the terminal device, without waiting for the front-end operator to modify the front-end page, the device developer can be at the terminal. The user interface displayed on the terminal device is quickly and conveniently modified according to user needs.
  • the parsing and rendering module 02 may further be used to:
  • the user may inject JS logic code by using a preset information injection interface API to display a user interface on the terminal device, where the JS logic code is used to add or modify page processing logic of the terminal user interface.
  • the JS logic code is a Javascript Script code
  • Javascript is an object- and event-driven and relatively secure client-side scripting language
  • a scripting language widely used for client-side web development, commonly used for HTML Web pages add dynamic features, such as responding to user actions.
  • the JS logic code is injected through the preset information injection interface API. And injecting a page URL corresponding to the JS logic code to modify the page processing logic, that is, a preset URL.
  • the JS logic code is identified as page modification information injected by the user to perform page processing logic modification on the terminal user interface. Then, the JS parser is called to parse and execute the JS logic code to render and render the terminal user interface, and obtain the final modified terminal user interface.
  • the operator may lack relevant processing logic when designing the front-end page of the terminal user interface.
  • the user interface cannot be displayed when the user interface is displayed on the terminal device.
  • the button event responds and the user cannot return or exit the current user interface.
  • the page modification information is a JS button processing logic code added for the terminal user interface when the terminal user interface is unable to respond to the button instruction, and is obtained when the user interface is displayed on the terminal device. After pre-storing the JS button processing logic code to the terminal, it is first determined whether the URL of the terminal user interface is consistent with the preset URL corresponding to the JS button processing logic code.
  • the JS button processing logic code is identified as page modification information injected by the user to add JS button processing logic to the terminal user interface. Then, the JS parser is called to parse and execute the JS button processing logic code, and add JS button processing logic to the terminal user interface for the terminal user interface to respond to the button command. In this way, the front end page that does not have the key response processing logic is executed by executing the JS button processing logic code to obtain the terminal user interface with the JS button processing logic added, and the user can be finally modified by the terminal user interface. The button events in the response respond to improve the user experience.
  • the end user interface processing logic may be normal, without modification, maintaining the default page processing logic of the end user interface for the user to operate in the normal end user interface.
  • the obtaining module 01 may further be used to:
  • the above parsing and rendering module 02 can also be used to:
  • Parsing the CSS information injected in the style parsing pool and rendering and rendering the terminal user interface according to the parsed CSS information and the self-contained CSS information injected into the style parsing pool when loading the terminal user interface.
  • the user can optimize the default style of the terminal user interface to generate CSS information according to the display ratio and resolution of the terminal device, and inject the preset information by displaying the user interface on the terminal device.
  • the interface API injects the CSS information, and the CSS information is used to modify the style of the terminal user interface to optimize the display effect of the terminal user interface on the terminal device.
  • CSS ascading Style Sheets
  • HTML an application of the standard universal markup language
  • XML a subset of the standard universal markup language
  • the user may store the CSS information for modifying the style of the terminal user interface on the preset address of the terminal device, for example, to the preset directory of the development board, so that the user is displayed on the terminal device.
  • the preset CSS information can be read on the preset address of the terminal device, and then the read CSS information is temporarily stored in the preset character string.
  • the CSS information in the temporary string can be injected into the preset style parsing pool through the preset information injection interface API, and the self-contained style information of different pages is loaded when the terminal user interface is loaded on the terminal device. CSS information is also fully injected into the style parsing pool.
  • the same node of the terminal user interface may have some style information in the style parsing pool, and the same node of the terminal user interface only Can choose a style information for rendering. Therefore, in order to facilitate the differentiation and selection, the preset weights of the style information in the style parsing pool may be parsed. If the user needs to render the terminal user interface with the best display effect on the terminal device according to the CSS information, the CSS information may be stored on the preset address of the terminal device, and the highest right corresponding to the CSS information may be stored. Value identifier.
  • the corresponding CSS information may be identified according to the highest weight identifier to distinguish from the CSS information of the node, and The CSS information in the style parsing pool is parsed, and the end user interface can be rendered and drawn according to the parsed CSS information, and finally the end user interface with the best display effect on the terminal device is obtained according to the CSS information.
  • the highest weight identifier may be implemented by adding a “!important” suffix to the end of the style information.
  • it may also be implemented by other grammar rules or label information. Not limited.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • a storage medium such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种终端用户界面的受控显示方法,包括:当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息(S10);解析页面修改信息,并根据页面修改信息对终端用户界面进行渲染绘制,其中,页面修改信息包括用于对终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对终端用户界面的样式进行修改的CSS信息(S20);显示渲染绘制后的终端用户界面(S30)。还公开了一种终端用户界面的受控显示装置。由于在终端设备上显示用户界面前直接利用存储至终端的页面修改信息即可对终端用户界面进行相应的渲染绘制,而无需等待运营商来对前端页面进行修改,能根据用户需要实现快速方便地修改终端设备上显示的用户界面。

Description

终端用户界面的受控显示方法及装置
技术领域
本发明涉及电视技术领域,尤其涉及一种终端用户界面的受控显示方法及装置。
背景技术
现有的终端设备在显示用户界面如在终端设备上利用浏览器来显示网页等前端页面时,由于前端网页开发人员不可能顾及到不同设备在页面显示中的所有问题,可能导致终端设备在显示用户界面时可能会出现显示比例、样式、逻辑出错等问题。
前端页面由前端运营商开发,现有技术中只能完全依靠前端运营商来针对前端页面中出现的各种问题对前端页面的整体设计进行修改,而无法在显示前端页面的终端上对前端页面进行任何修改以适应终端的显示。前端运营商的处理流程冗长,无论是对终端用户界面的任何修改或常规升级,均只能通过前端运营商冗长的处理流程来完成,设备开发商无法快速方便地修改终端用户界面。
发明内容
本发明的主要目的在于提供一种终端用户界面的受控显示方法及装置,旨在快速方便地修改终端用户界面的显示。
为实现上述目的,本发明提供的一种终端用户界面的受控显示方法,所述方法包括以下步骤:
当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
显示渲染绘制后的终端用户界面;
其中,所述获取预先存储至终端的页面修改信息的步骤包括:通过预设的信息注入接口API获取到用户注入的页面修改信息;
当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制;
若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
优选地,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
优选地,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取预先注入的页面修改信息的步骤包括:
读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
优选地,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
本发明还提供一种终端用户界面的受控显示方法,所述方法包括以下步骤:
当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
显示渲染绘制后的终端用户界面。
优选地,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制。
优选地,若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
优选地,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
优选地,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取预先注入的页面修改信息的步骤包括:
读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
优选地,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
此外,为实现上述目的,本发明还提供一种终端用户界面的受控显示装置,所述终端用户界面的受控显示装置包括:
获取模块,用于当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
解析渲染模块,用于解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
显示模块,用于显示渲染绘制后的终端用户界面。
优选地,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析渲染模块还用于:
判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制。
优选地,若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析渲染模块还用于:
判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
优选地,所述解析渲染模块还用于:
若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
优选地,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取模块还用于:
读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
所述解析渲染模块还用于:
解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
优选地,所述解析渲染模块还用于:
当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
本发明提出的一种终端用户界面的受控显示方法及装置,当接收到显示终端用户界面的指令时,对预先存储至终端的页面修改信息进行解析,并根据该页面修改信息对终端设备上待显示的用户界面进行渲染绘制,从而显示渲染绘制后的终端用户界面。由于在终端设备上显示用户界面前直接利用预先存储至终端的页面修改信息即可对终端用户界面进行相应的渲染绘制,而无需等待前端运营商来对前端页面进行修改,能在终端上根据用户需要实现快速方便地修改终端设备上显示的用户界面。
附图说明
图1为本发明终端用户界面的受控显示方法一实施例的流程示意图;
图2为本发明终端用户界面的受控显示装置一实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种终端用户界面的受控显示方法。
参照图1,图1为本发明终端用户界面的受控显示方法一实施例的流程示意图。
在一实施例中,该终端用户界面的受控显示方法包括:
步骤S10,当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
本实施例中,当终端设备接收到显示用户界面的指令时,并不直接显示加载的页面,而是首先获取用户预先存储至该终端设备中的页面修改信息,将该页面修改信息作为注入至用户界面的页面信息。如该页面修改信息可预先存储至终端设备开发板的一设定目录下,待需要在终端设备上显示用户界面时,从设定目录中获取该页面修改信息。该页面修改信息是用户根据终端设备的显示比例等特性设定的需对最终显示的终端用户界面效果进行修改的信息,在终端设备上显示用户界面时可通过预设的信息注入接口API获取用户注入的页面修改信息。
该页面修改信息可以是与终端用户界面显示相关的各种处理逻辑信息、样式信息,如Javascript 脚本代码、层叠样式表CSS等,当然,也不限定该页面修改信息为其他与终端用户界面相关的修改信息。
步骤S20,解析所述页面修改信息,并根据所述页面修改信息及加载的自带页面信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
当在终端设备上显示用户界面时通过预设的信息注入接口API获取到用户注入的页面修改信息后,即可对用户注入的页面修改信息进行解析,可解析获取该页面修改信息中的Javascript 脚本代码、层叠样式表CSS等有效信息。再由加载所述终端用户界面时自带的默认页面信息及解析出的Javascript 脚本代码、层叠样式表CSS等有效信息对终端用户界面进行布局渲染、绘制,得到最终修改后的终端用户界面。
步骤S30,显示渲染绘制后的终端用户界面。
根据解析的页面修改信息对终端用户界面进行渲染绘制后,获取的渲染绘制后的终端用户界面即为符合用户对最终显示页面效果要求的终端用户界面,在终端设备上显示该渲染绘制后的终端用户界面。这样,用户需要修改终端设备上显示的终端用户界面时,只需通过预设的信息注入接口API获取预先注入的页面修改信息,即可根据注入的页面修改信息对终端用户界面进行渲染绘制,并最终显示修改后的终端用户界面。
本实施例中当接收到显示终端用户界面的指令时,对预先存储至终端的页面修改信息进行解析,并根据该页面修改信息对终端设备上待显示的用户界面进行渲染绘制,从而显示渲染绘制后的终端用户界面。由于在终端设备上显示用户界面前直接利用预先存储至终端的页面修改信息即可对终端用户界面进行相应的渲染绘制,而无需等待前端运营商来对前端页面进行修改,能在终端上根据用户需要实现快速方便地修改终端设备上显示的用户界面。
进一步地,在其他实施例中,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,上述步骤S20可以包括:
判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制;若否,则保持所述终端用户界面的默认页面处理逻辑。
本实施例中,用户可通过预设的信息注入接口API在终端设备上显示用户界面时注入JS逻辑代码,该JS逻辑代码用于对所述终端用户界面的页面处理逻辑进行添加或修改。其中,JS逻辑代码是一种Javascript 脚本代码,Javascript 是一种基于对象和事件驱动并具有相对安全性的客户端脚本语言,同时也是一种广泛用于客户端Web 开发的脚本语言,常用来给HTML 网页添加动态功能,比如响应用户的各种操作。
终端设备上显示用户界面时在接收到用户注入的JS逻辑代码后,首先判断所述终端用户界面的统一资源定位符URL与所述JS逻辑代码相对应的预设URL是否一致。由于用户针对不同终端用户界面需要添加或修改的页面处理逻辑可能会各不相同,因此,为了进行区分,在终端设备上显示用户界面的过程中通过预设的信息注入接口API注入JS逻辑代码时,同时注入与该JS逻辑代码相对应的需修改页面处理逻辑的页面URL即预设URL。若判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL一致,则识别所述JS逻辑代码为用户注入的需对该终端用户界面进行页面处理逻辑修改的页面修改信息。则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制,获取最终修改后的终端用户界面。
例如由于运营商在设计所述终端用户界面这种前端页面时可能会缺少相关的处理逻辑,如有的前端页面没有做按键响应的处理逻辑,导致在终端设备上显示用户界面时无法对用户的按键事件进行响应,用户也无法返回或退出当前用户界面。在一种实施方式中,所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,终端设备上显示用户界面时在获取到预先存储至终端的JS按键处理逻辑代码后,先判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致。若一致,则识别所述JS按键处理逻辑代码为用户注入的需对该终端用户界面添加JS按键处理逻辑的页面修改信息。则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。这样,将原本没有做按键响应处理逻辑的前端页面通过执行所述JS按键处理逻辑代码进行渲染绘制后获取添加了JS按键处理逻辑的终端用户界面,即可对用户在最终修改后的终端用户界面中的按键事件进行响应,提高用户体验。
进一步地,若判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则识别所述JS逻辑代码不是对该终端用户界面进行页面处理逻辑修改的页面修改信息,当前的终端用户界面处理逻辑可能是正常的,无需修改,则保持所述终端用户界面的默认页面处理逻辑,以供用户在正常的所述终端用户界面中进行操作。
进一步地,在其他实施例中,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,上述步骤S10可以包括:
读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
上述步骤S20可以包括:
解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
由于运营商在设计前端页面时不可能顾及到所有可能显示该前端页面的终端设备的特性,可能会导致有的终端设备上由于显示比例、分辨率等原因造成该前端页面显示效果不佳。因此,本实施例中,用户可根据终端设备的显示比例、分辨率等特性对所述终端用户界面的默认样式进行优化生成CSS信息,并在终端设备上显示用户界面时通过预设的信息注入接口API注入该CSS信息,该CSS信息用于对所述终端用户界面的样式进行修改,以使所述终端用户界面在终端设备上的显示效果最佳。其中,CSS(Cascading Style Sheets)是层叠样式表,也称级联样式表,是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言,是用于控制网页样式并允许将样式信息与网页内容分离的一种样式设计语言。
具体地,用户可将用于对所述终端用户界面的样式进行修改的CSS信息存储在终端设备的预设地址上,如存储至开发板的预设目录下,这样,在终端设备上显示用户界面时可在终端设备的预设地址上读取预设的CSS信息,然后将读取的CSS信息暂存至预设的字符串。即可通过预设的信息注入接口API将暂存在字符串中的CSS信息注入预设的样式解析池,同时,在终端设备上加载所述终端用户界面时不同页面的自带样式信息即自带CSS信息也会全部注入至该样式解析池。当接收到显示终端用户界面的指令时,解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息对所述终端用户界面进行布局渲染、绘制,最终根据所述CSS信息得到在终端设备上显示效果最佳的终端用户界面。
进一步地,在解析所述样式解析池中注入的样式信息时,可能会出现所述终端用户界面的同一节点在样式解析池中具有若干样式信息的情况,而所述终端用户界面的同一节点只能选取一种样式信息进行渲染。因此,为了便于区分及选择,可根据样式解析池中若干样式信息的预设权值进行解析。如用户需要根据所述CSS信息来渲染得到在终端设备上显示效果最佳的终端用户界面时,可在终端设备的预设地址上存储CSS信息的同时,存储与所述CSS信息对应的最高权值标识。这样, 当所述终端用户界面的同一节点在样式解析池中具有若干样式信息时,可根据所述最高权值标识识别出对应的所述CSS信息,以与该节点的自带CSS信息区分,并对样式解析池中的所述CSS信息进行解析,即可根据解析的CSS信息对终端用户界面进行布局渲染、绘制,最终根据所述CSS信息得到在终端设备上显示效果最佳的终端用户界面。
需要说明的是,本实施例中,该最高权值标识可通过在样式信息的末尾添加“!important”后缀的形式来实现,当然,也可通过其他的语法规则或标示信息来实现,在此不作限定。
本发明进一步提供一种终端用户界面的受控显示装置。
参照图2,图2为本发明终端用户界面的受控显示装置一实施例的功能模块示意图。
在一实施例中,该终端用户界面的受控显示装置包括:
获取模块01,用于当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
本实施例中,当终端设备接收到显示用户界面的指令时,并不直接显示加载的页面,而是首先获取用户预先存储至该终端设备中的页面修改信息,将该页面修改信息作为注入至用户界面的页面信息。如该页面修改信息可预先存储至终端设备开发板的一设定目录下,待需要在终端设备上显示用户界面时,从设定目录中获取该页面修改信息。该页面修改信息是用户根据终端设备的显示比例等特性设定的需对最终显示的终端用户界面效果进行修改的信息,在终端设备上显示用户界面时可通过预设的信息注入接口API获取用户注入的页面修改信息。
该页面修改信息可以是与终端用户界面显示相关的各种处理逻辑信息、样式信息,如Javascript 脚本代码、层叠样式表CSS等,当然,也不限定该页面修改信息为其他与终端用户界面相关的修改信息。
解析渲染模块02,用于解析所述页面修改信息,并根据所述页面修改信息及加载的自带页面信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
当在终端设备上显示用户界面时通过预设的信息注入接口API获取到用户注入的页面修改信息后,即可对用户注入的页面修改信息进行解析,可解析获取该页面修改信息中的Javascript 脚本代码、层叠样式表CSS等有效信息。再由加载所述终端用户界面时自带的默认页面信息及解析出的Javascript 脚本代码、层叠样式表CSS等有效信息对终端用户界面进行布局渲染、绘制,得到最终修改后的终端用户界面。
显示模块03,用于显示渲染绘制后的终端用户界面。
根据解析的页面修改信息对终端用户界面进行渲染绘制后,获取的渲染绘制后的终端用户界面即为符合用户对最终显示页面效果要求的终端用户界面,在终端设备上显示该渲染绘制后的终端用户界面。这样,用户需要修改终端设备上显示的终端用户界面时,只需通过预设的信息注入接口API获取预先注入的页面修改信息,即可根据注入的页面修改信息对终端用户界面进行渲染绘制,并最终显示修改后的终端用户界面。
本实施例中当接收到显示终端用户界面的指令时,对预先存储至终端的页面修改信息进行解析,并根据该页面修改信息对终端设备上待显示的用户界面进行渲染绘制,从而显示渲染绘制后的终端用户界面。由于在终端设备上显示用户界面前直接利用预先存储至终端的页面修改信息即可对终端用户界面进行相应的渲染绘制,而无需等待前端运营商来对前端页面进行修改,设备开发商能在终端上根据用户需要实现快速方便地修改终端设备上显示的用户界面。
进一步地,在其他实施例中,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,上述解析渲染模块02还可以用于:
判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制;若否,则保持所述终端用户界面的默认页面处理逻辑。
本实施例中,用户可通过预设的信息注入接口API在终端设备上显示用户界面时注入JS逻辑代码,该JS逻辑代码用于对所述终端用户界面的页面处理逻辑进行添加或修改。其中,JS逻辑代码是一种Javascript 脚本代码,Javascript 是一种基于对象和事件驱动并具有相对安全性的客户端脚本语言,同时也是一种广泛用于客户端Web 开发的脚本语言,常用来给HTML 网页添加动态功能,比如响应用户的各种操作。
终端设备上显示用户界面时在接收到用户注入的JS逻辑代码后,首先判断所述终端用户界面的统一资源定位符URL与所述JS逻辑代码相对应的预设URL是否一致。由于用户针对不同终端用户界面需要添加或修改的页面处理逻辑可能会各不相同,因此,为了进行区分,在终端设备上显示用户界面的过程中通过预设的信息注入接口API注入JS逻辑代码时,同时注入与该JS逻辑代码相对应的需修改页面处理逻辑的页面URL即预设URL。若判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL一致,则识别所述JS逻辑代码为用户注入的需对该终端用户界面进行页面处理逻辑修改的页面修改信息。则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制,获取最终修改后的终端用户界面。
例如由于运营商在设计所述终端用户界面这种前端页面时可能会缺少相关的处理逻辑,如有的前端页面没有做按键响应的处理逻辑,导致在终端设备上显示用户界面时无法对用户的按键事件进行响应,用户也无法返回或退出当前用户界面。在一种实施方式中,所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,终端设备上显示用户界面时在获取到预先存储至终端的JS按键处理逻辑代码后,先判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致。若一致,则识别所述JS按键处理逻辑代码为用户注入的需对该终端用户界面添加JS按键处理逻辑的页面修改信息。则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。这样,将原本没有做按键响应处理逻辑的前端页面通过执行所述JS按键处理逻辑代码进行渲染绘制后获取添加了JS按键处理逻辑的终端用户界面,即可对用户在最终修改后的终端用户界面中的按键事件进行响应,提高用户体验。
进一步地,若判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则识别所述JS逻辑代码不是对该终端用户界面进行页面处理逻辑修改的页面修改信息,当前的终端用户界面处理逻辑可能是正常的,无需修改,则保持所述终端用户界面的默认页面处理逻辑,以供用户在正常的所述终端用户界面中进行操作。
进一步地,在其他实施例中,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,上述获取模块01还可以用于:
读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
上述解析渲染模块02还可以用于:
解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
由于运营商在设计前端页面时不可能顾及到所有可能显示该前端页面的终端设备的特性,可能会导致有的终端设备上由于显示比例、分辨率等原因造成该前端页面显示效果不佳。因此,本实施例中,用户可根据终端设备的显示比例、分辨率等特性对所述终端用户界面的默认样式进行优化生成CSS信息,并在终端设备上显示用户界面时通过预设的信息注入接口API注入该CSS信息,该CSS信息用于对所述终端用户界面的样式进行修改,以使所述终端用户界面在终端设备上的显示效果最佳。其中,CSS(Cascading Style Sheets)是层叠样式表,也称级联样式表,是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言,是用于控制网页样式并允许将样式信息与网页内容分离的一种样式设计语言。
具体地,用户可将用于对所述终端用户界面的样式进行修改的CSS信息存储在终端设备的预设地址上,如存储至开发板的预设目录下,这样,在终端设备上显示用户界面时可在终端设备的预设地址上读取预设的CSS信息,然后将读取的CSS信息暂存至预设的字符串。即可通过预设的信息注入接口API将暂存在字符串中的CSS信息注入预设的样式解析池,同时,在终端设备上加载所述终端用户界面时不同页面的自带样式信息即自带CSS信息也会全部注入至该样式解析池。当接收到显示终端用户界面的指令时,解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息对所述终端用户界面进行布局渲染、绘制,最终根据所述CSS信息得到在终端设备上显示效果最佳的终端用户界面。
进一步地,在解析所述样式解析池中注入的样式信息时,可能会出现所述终端用户界面的同一节点在样式解析池中具有若干样式信息的情况,而所述终端用户界面的同一节点只能选取一种样式信息进行渲染。因此,为了便于区分及选择,可根据样式解析池中若干样式信息的预设权值进行解析。如用户需要根据所述CSS信息来渲染得到在终端设备上显示效果最佳的终端用户界面时,可在终端设备的预设地址上存储CSS信息的同时,存储与所述CSS信息对应的最高权值标识。这样, 当所述终端用户界面的同一节点在样式解析池中具有若干样式信息时,可根据所述最高权值标识识别出对应的所述CSS信息,以与该节点的自带CSS信息区分,并对样式解析池中的所述CSS信息进行解析,即可根据解析的CSS信息对终端用户界面进行布局渲染、绘制,最终根据所述CSS信息得到在终端设备上显示效果最佳的终端用户界面。
需要说明的是,本实施例中,该最高权值标识可通过在样式信息的末尾添加“!important”后缀的形式来实现,当然,也可通过其他的语法规则或标示信息来实现,在此不作限定。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (16)

  1. 一种终端用户界面的受控显示方法,其特征在于,所述方法包括以下步骤:
    当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
    解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
    显示渲染绘制后的终端用户界面;
    其中,所述获取预先存储至终端的页面修改信息的步骤包括:通过预设的信息注入接口API获取到用户注入的页面修改信息;
    当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制;
    若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
  2. 如权利要求1所述的终端用户界面的受控显示方法,其特征在于,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
    若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
  3. 如权利要求1所述的终端用户界面的受控显示方法,其特征在于,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取预先注入的页面修改信息的步骤包括:
    读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
    所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
  4. 如权利要求3所述的终端用户界面的受控显示方法,其特征在于,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
    当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
  5. 一种终端用户界面的受控显示方法,其特征在于,所述方法包括以下步骤:
    当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
    解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
    显示渲染绘制后的终端用户界面。
  6. 如权利要求5所述的终端用户界面的受控显示方法,其特征在于,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制。
  7. 如权利要求5所述的终端用户界面的受控显示方法,其特征在于,若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
  8. 如权利要求6所述的终端用户界面的受控显示方法,其特征在于,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
    若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
  9. 如权利要求5所述的终端用户界面的受控显示方法,其特征在于,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取预先注入的页面修改信息的步骤包括:
    读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
    所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤包括:
    解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
  10. 如权利要求9所述的终端用户界面的受控显示方法,其特征在于,所述解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制的步骤还包括:
    当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
  11. 一种终端用户界面的受控显示装置,其特征在于,所述终端用户界面的受控显示装置包括:
    获取模块,用于当接收到显示终端用户界面的指令时,获取预先存储至终端的页面修改信息;
    解析渲染模块,用于解析所述页面修改信息,并根据所述页面修改信息对所述终端用户界面进行渲染绘制,其中,所述页面修改信息包括用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码,和/或,用于对所述终端用户界面的样式进行修改的CSS信息;
    显示模块,用于显示渲染绘制后的终端用户界面。
  12. 如权利要求11所述的终端用户界面的受控显示装置,其特征在于,当所述页面修改信息为用于对所述终端用户界面的页面处理逻辑进行添加或修改的JS逻辑代码时,所述解析渲染模块还用于:
    判断所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS逻辑代码,以对所述终端用户界面进行渲染绘制。
  13. 如权利要求11所述的终端用户界面的受控显示装置,其特征在于,若所述页面修改信息为用于在所述终端用户界面无法响应按键指令时为所述终端用户界面添加的JS按键处理逻辑代码,所述解析渲染模块还用于:
    判断所述终端用户界面的URL与所述JS按键处理逻辑代码相对应的预设URL是否一致;
    若是,则调用JS解析器解析并执行所述JS按键处理逻辑代码,为所述终端用户界面添加JS按键处理逻辑,以供所述终端用户界面响应按键指令。
  14. 如权利要求12所述的终端用户界面的受控显示装置,其特征在于,所述解析渲染模块还用于:
    若所述终端用户界面的URL与所述JS逻辑代码相对应的预设URL不一致,则保持所述终端用户界面的默认页面处理逻辑。
  15. 如权利要求11所述的终端用户界面的受控显示装置,其特征在于,当所述页面修改信息为用于对所述终端用户界面的样式进行修改的CSS信息时,所述获取模块还用于:
    读取预设的CSS信息,并将所述CSS信息注入预设的样式解析池;
    所述解析渲染模块还用于:
    解析所述样式解析池中注入的所述CSS信息,并根据解析的CSS信息及加载所述终端用户界面时注入所述样式解析池中的自带CSS信息对所述终端用户界面进行渲染绘制。
  16. 如权利要求15所述的终端用户界面的受控显示装置,其特征在于,所述解析渲染模块还用于:
    当所述终端用户界面的同一节点在样式解析池中具有若干CSS信息时,选择若干CSS信息中预设权值最高的CSS信息进行解析,并根据解析的CSS信息对所述终端用户界面进行渲染绘制。
PCT/CN2016/084250 2015-09-09 2016-06-01 终端用户界面的受控显示方法及装置 WO2017041538A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510572316.2A CN105159677A (zh) 2015-09-09 2015-09-09 终端用户界面的受控显示方法及装置
CN201510572316.2 2015-09-09

Publications (1)

Publication Number Publication Date
WO2017041538A1 true WO2017041538A1 (zh) 2017-03-16

Family

ID=54800544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084250 WO2017041538A1 (zh) 2015-09-09 2016-06-01 终端用户界面的受控显示方法及装置

Country Status (2)

Country Link
CN (1) CN105159677A (zh)
WO (1) WO2017041538A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275727A (zh) * 2019-06-27 2019-09-24 江苏满运软件科技有限公司 移动端应用程序动态更新方法、***、设备及存储介质
CN112416339A (zh) * 2020-02-17 2021-02-26 上海哔哩哔哩科技有限公司 页面开发方法、装置、计算机设备
CN113760274A (zh) * 2020-09-04 2021-12-07 北京京东振世信息技术有限公司 一种前端组件逻辑注入方法和装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159677A (zh) * 2015-09-09 2015-12-16 深圳Tcl数字技术有限公司 终端用户界面的受控显示方法及装置
CN110020287A (zh) * 2017-09-29 2019-07-16 北京国双科技有限公司 网页热力图的加载方法及装置
US11482037B2 (en) 2018-06-25 2022-10-25 Huawei Technologies Co., Ltd. User interface display method of terminal, and terminal
CN110727482B (zh) * 2018-07-16 2023-05-12 阿里巴巴集团控股有限公司 一种界面的更新方法和装置
CN111104107A (zh) * 2018-10-26 2020-05-05 北京国双科技有限公司 一种用户界面生成方法、测试方法及装置
CN111339458B (zh) * 2018-12-18 2024-05-31 阿里巴巴集团控股有限公司 页面呈现方法和装置
CN109933385B (zh) * 2019-03-22 2022-10-25 深圳市网心科技有限公司 一种页面加载方法、装置、***及介质
CN110221848A (zh) * 2019-04-23 2019-09-10 五八有限公司 App页面更新方法、装置、电子设备及存储介质
CN110188296B (zh) * 2019-05-13 2021-07-13 北京百度网讯科技有限公司 应用程序内嵌页面处理方法、浏览器、设备和存储介质
CN110569082B (zh) * 2019-08-06 2023-03-14 创新先进技术有限公司 对页面内容进行控制的方法及装置
CN116541120B (zh) * 2023-07-05 2023-11-14 北京华顺信安信息技术有限公司 一种网页渲染方式的识别方法、***及计算机设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124661A1 (en) * 2005-11-29 2007-05-31 Keith Hackworth Generic application processing of specific dynamic database web site content
CN101676910A (zh) * 2008-09-19 2010-03-24 北京大学 一种面向Web应用***的页面生成方法
CN102663126A (zh) * 2012-04-23 2012-09-12 奇智软件(北京)有限公司 一种在移动终端中显示网页的方法及装置
CN102955803A (zh) * 2011-08-26 2013-03-06 腾讯科技(深圳)有限公司 一种网站展示方法及浏览器
CN103139298A (zh) * 2013-02-01 2013-06-05 北京京东世纪贸易有限公司 一种传输网络数据的方法和装置
CN103593414A (zh) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 一种浏览器中网页的展现方法和装置
CN105159677A (zh) * 2015-09-09 2015-12-16 深圳Tcl数字技术有限公司 终端用户界面的受控显示方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100394428C (zh) * 2005-12-20 2008-06-11 北京亿中邮信息技术有限公司 一种个性化替换网页主题的方法
CN104063415B (zh) * 2014-02-27 2018-07-10 优视科技有限公司 显示网页自定义内容的方法及***
CN104462312A (zh) * 2014-11-28 2015-03-25 北京奇虎科技有限公司 网页显示方法和浏览器客户端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070124661A1 (en) * 2005-11-29 2007-05-31 Keith Hackworth Generic application processing of specific dynamic database web site content
CN101676910A (zh) * 2008-09-19 2010-03-24 北京大学 一种面向Web应用***的页面生成方法
CN102955803A (zh) * 2011-08-26 2013-03-06 腾讯科技(深圳)有限公司 一种网站展示方法及浏览器
CN102663126A (zh) * 2012-04-23 2012-09-12 奇智软件(北京)有限公司 一种在移动终端中显示网页的方法及装置
CN103139298A (zh) * 2013-02-01 2013-06-05 北京京东世纪贸易有限公司 一种传输网络数据的方法和装置
CN103593414A (zh) * 2013-10-29 2014-02-19 北京奇虎科技有限公司 一种浏览器中网页的展现方法和装置
CN105159677A (zh) * 2015-09-09 2015-12-16 深圳Tcl数字技术有限公司 终端用户界面的受控显示方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275727A (zh) * 2019-06-27 2019-09-24 江苏满运软件科技有限公司 移动端应用程序动态更新方法、***、设备及存储介质
CN112416339A (zh) * 2020-02-17 2021-02-26 上海哔哩哔哩科技有限公司 页面开发方法、装置、计算机设备
CN113760274A (zh) * 2020-09-04 2021-12-07 北京京东振世信息技术有限公司 一种前端组件逻辑注入方法和装置
CN113760274B (zh) * 2020-09-04 2023-11-03 北京京东振世信息技术有限公司 一种前端组件逻辑注入方法和装置

Also Published As

Publication number Publication date
CN105159677A (zh) 2015-12-16

Similar Documents

Publication Publication Date Title
WO2017041538A1 (zh) 终端用户界面的受控显示方法及装置
WO2019165691A1 (zh) 自动生成测试案例的方法、装置、设备及可读存储介质
WO2019174375A1 (zh) 接口测试方法、装置、设备及计算机可读存储介质
WO2018205545A1 (zh) 数据生成方法、装置、终端及计算机可读存储介质
WO2019119771A1 (zh) 语音交互方法、装置及计算机可读存储介质
WO2018018681A1 (zh) 视频节目预览方法及装置
WO2017036208A1 (zh) 显示界面中的信息提取方法及***
WO2015196960A1 (en) Method and system for checking security of url for mobile terminal
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2015131803A1 (en) Application recommending method and system
WO2019169814A1 (zh) 自动生成中文注释的方法、装置、设备及存储介质
WO2017063366A1 (zh) 应用启动方法和***
WO2018126888A1 (zh) 电视功能的快捷启动设置方法及装置
WO2018023926A1 (zh) 电视与移动终端的互动方法及***
WO2016000560A1 (en) File transmission method, file transmission apparatus, and file transmission system
WO2012028079A1 (zh) 一种移动终端备份数据的导入方法及装置
WO2017190451A1 (zh) 图片推送方法和装置
WO2017005062A1 (zh) 图片帧播放方法和装置
WO2017059686A1 (zh) 桌面显示方法及装置
WO2017071223A1 (zh) 电视应用的控制方法及装置
WO2015169177A1 (en) Web page display method and apparatus
WO2018006581A1 (zh) 智能电视的播放方法及装置
WO2019024472A1 (zh) 数据操作方法、装置及计算机可读存储介质
WO2019127869A1 (zh) 漏洞信息收集方法、装置、设备及可读存储介质
WO2019051901A1 (zh) 终端控制方法、装置及计算机可读存储介质

Legal Events

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

Ref document number: 16843476

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.07.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16843476

Country of ref document: EP

Kind code of ref document: A1