WO2016107263A1 - Method and apparatus for controlling response to input event - Google Patents

Method and apparatus for controlling response to input event Download PDF

Info

Publication number
WO2016107263A1
WO2016107263A1 PCT/CN2015/093145 CN2015093145W WO2016107263A1 WO 2016107263 A1 WO2016107263 A1 WO 2016107263A1 CN 2015093145 W CN2015093145 W CN 2015093145W WO 2016107263 A1 WO2016107263 A1 WO 2016107263A1
Authority
WO
WIPO (PCT)
Prior art keywords
input event
browser
page application
page
key value
Prior art date
Application number
PCT/CN2015/093145
Other languages
French (fr)
Chinese (zh)
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 WO2016107263A1 publication Critical patent/WO2016107263A1/en

Links

Classifications

    • 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

Definitions

  • the present invention relates to the field of browser control technologies, and in particular, to a response control method and apparatus for input events.
  • the main object of the present invention is to provide a response control method and apparatus for an input event that improves the accuracy and efficiency of page response.
  • the present invention provides a response control method for an input event, including the steps of:
  • the browser determines whether the input event is an input event processed by the page application;
  • the browser determines a page application corresponding to the input event
  • the browser sends the input event to the page application for the page application to complete a response operation corresponding to the input event.
  • the step of the browser determining whether the input event is an input event processed by the page application comprises:
  • the browser determines whether the input event is a key input event
  • the browser determines whether the input event is an input event processed by a page application.
  • the method further includes:
  • the browser receives the page key value information sent by the page application, and saves the page key value information.
  • the step of the browser determining whether the input event is an input event processed by the page application comprises:
  • the browser acquires key value information of the input event
  • the browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the step of determining, by the browser, whether the input event is an input event processed by a page application according to the determined key value information comprises:
  • the browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, determining that the input event is an input event processed by the page application; When the saved key value information does not coincide with the determined key value information, it is determined that the input event is not an input event processed by the page application.
  • the step of the browser sending the input event to the page application comprises:
  • the browser determines that the page application where the current focus is located as the current page application, and the browser sends the input event to the current page application;
  • the browser After the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
  • the method for controlling the response of the input event further includes:
  • the browser After obtaining the input event, the browser converts the physical key value of the bottom layer of the browser into a logical key value, puts it into the input event queue, and waits for each application to obtain the input parameter corresponding to the input event that the user needs, the browser.
  • the input event information in the input event queue is obtained periodically or in real time.
  • the present invention further provides a response control device for inputting an event, including:
  • a determining module configured to determine, when receiving a browser-based input event, whether the input event is an input event processed by a page application;
  • a processing module configured to determine a page application corresponding to the input event when the input event is an input event processed by the page application;
  • a sending module configured to send the input event to the page application, for the page application to complete a response operation corresponding to the input event.
  • the determining module is further configured to determine whether the input event is a key input event, and is further configured to determine, when the input event is a key input event, whether the input event is an input event processed by a page application.
  • the response control device of the input event further includes a storage module
  • the sending and receiving module is further configured to receive page key value information sent by the page application;
  • the storage module is configured to save the page key value information.
  • the determining module includes an obtaining unit and a determining unit,
  • the obtaining unit is configured to acquire key value information of the input event
  • the determining unit is configured to determine, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the determining unit is further configured to compare the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, determine that the input event is An input event processed by the page application; when the saved key value information is inconsistent with the determined key value information, it is determined that the input event is not an input event processed by the page application.
  • the determining module is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is located as a current page application;
  • the sending and receiving module is further configured to send the input event to the current page application; and further configured to send the input event to the next one after the current page application completes the response operation of the input event Page application.
  • the processing module is further configured to: after obtaining the input event, convert the physical key value of the bottom layer of the browser into a logical key value, put it into the input event queue, and wait for each application to obtain an input event corresponding to the application. Input parameters, the browser will get input event information in the input event queue periodically or in real time.
  • the invention determines whether the input event required by the page application is received by the browser when the input event is received, and if yes, sends it to the page application.
  • the analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for controlling response to an input event according to the present invention
  • FIG. 2 is a schematic diagram showing the refinement process of an embodiment of step S10 in FIG. 1;
  • step S10 of FIG. 1 is a schematic flow chart of another embodiment of step S10 of FIG. 1;
  • FIG. 4 is a schematic flowchart diagram of a second embodiment of a method for controlling response to an input event according to the present invention
  • FIG. 5 is a schematic diagram of functional modules of a preferred embodiment of a response control device for input events according to the present invention.
  • FIG. 6 is a schematic diagram of a refinement function module of an embodiment of the judging module of FIG. 5.
  • FIG. 6 is a schematic diagram of a refinement function module of an embodiment of the judging module of FIG. 5.
  • the present invention provides a response control method for an input event.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for controlling response to an input event according to the present invention.
  • the response control method of the input event includes:
  • Step S10 when receiving the browser-based input event, the browser determines whether the input event is an input event processed by the page application;
  • the user can open the browser loaded by the smart TV through a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device), and click the browser application to complete the browser.
  • a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device)
  • the browser reloads the application, that is, enters the interactive interface of the application. If the user accesses the application for the first time, the loading process of the application needs to be completed, that is, the installation of the application is completed, and information is configured, so that the user can enter the interactive interface of the application through the browser, and complete The corresponding operation.
  • the user sends a browser open command through the input device, the smart TV receives the open command, and opens a browser.
  • the smart TV opens the page application corresponding to the page application open command.
  • a javascript (script language) method is loaded, which can send the key value information required by the current application to the browser through the javascript, using the browser's jscore (a parsing method) parsing engine.
  • the browser receives the message from the jscore parsing engine, it also reads and parses the information, saves it in the browser, and uses the saved information as the benchmark for the browser input event filtering operation.
  • the filtering operation is completed by the browser, which input events need to be sent to the page application processing, which need the browser to process itself, complete the filtering operation of the input event, and not all input events are sent to the page application.
  • the browser receives an input event input through the input device and acquires the input event, the input event including but limited to an operation event, a shutdown event, and the like for the opened application.
  • the browser determines whether the input event is an input event processed by the page application, that is, whether the input event is an input event required by the page application.
  • the process of determining, by the browser, whether the input event is an input event processed by a page application may include:
  • Step S11 the browser determines whether the input event is a key input event
  • Step S12 When the input event is a key input event, the browser determines whether the input event is an input event processed by a page application.
  • the browser After receiving the input event based on the browser, the browser determines whether the input event is a key input event, and after the input event is a key input event, the browser determines whether the input event is The input event of the page application.
  • the determination process based on the input event under the key operation may be:
  • Step S13 the browser acquires key value information of the input event
  • Step S14 The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the browser receives the page key value information sent by the page application, and saves the page key value information, where the page key value information is key value information required by the page application.
  • the page key value information is key value information required by the page application.
  • the key value information required by the page is sent to the browser, and the browser parses the data information of the page, and obtains the specific information of the button filtering to facilitate the completion of the button (input event). Filter operation.
  • the javascript interface definition of the key value required by the page application is defined as follows:
  • the interface setKeySet is called by the page developer to notify the browser which key values need to be processed by the page;
  • Bubble Whether to bubble to other multi-window processing.
  • the browser After receiving the browser-based input event, the browser determines the key value information corresponding to the input event, where the input event takes the key input event of the remote controller as an example, and the user sends an input event by using a button operation of the remote controller. After the browser obtains the input event, the browser directly under the browser The physical key value of fb is converted into a logical key value, placed in the input event queue, waiting for each application to obtain the input parameters corresponding to the input event that it needs, and the browser will be timed (every interval of 20s, 30s or new input event) When generated, or in real time, get input event information in the input event queue.
  • the browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the process of determining according to the key value information may be: the browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, Determining that the input event is an input event processed by the page application; and when the saved key value information is inconsistent with the determined key value information, determining that the input event is not an input event processed by the page application.
  • the browser constructs a button response group, and the response group includes a button and a button value.
  • the response group refers to Table 1 to Table 5.
  • the browser determines whether the button value corresponding to the input event is a button value specified in the response group, and the button value corresponding to the input event is not a button specified in the response group. In the case of a value, the browser discards the button value, that is, refuses to respond to the input event; and when the button value corresponding to the input event is a button value specified in the response group, performing determination to determine whether the input event is The step of applying an input event for the page application.
  • the browser of the smart TV compares the key value 41 with all the supported key values one by one, and all the supported keys are After the key value 41 is found in the key value, the key value 41 is compared with the supported key response group.
  • the button response group navigation group the corresponding value of the navigation group is 0x10, and the key value 41 is converted to 0x10 and saved. For filtering of input events.
  • the input event upon receiving the input event, determining whether the input event is an input event of a browser, for example, determining whether it is an input event sent to a browser kernel, where the input event is an input sent to a browser kernel
  • the input parameters corresponding to the input event are determined, and the input parameters include, but are not limited to, a button key value, a repeated button, a button delay, a button type (key down keydown, key up keyup, key release key release, etc.).
  • the browser refuses to respond to the input event after the input event is not an input event sent to the browser kernel, and continues to detect an input event from the input device.
  • the process of determining, by the browser, whether it is an input event sent to the browser kernel includes: when a button of the browser application of the smart TV has a key interface keyset calling javascript, sending an input event received by the keyset to the The browser kernel, that is, the input event is an input event sent to the browser kernel; when the application's page does not call the keyset interface, the browser automatically sets the keyset value to 0, which means that the page application receives and processes all The button does not need to perform the response control operation of the input event, and directly sends the input event to the page to complete the response.
  • Step S20 when the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event;
  • the browser determines the page information corresponding to the input event, that is, determines the page information that the input event needs to control, and needs to control which page the browser currently opens, and obtain the input parameter corresponding to the determined page, that is, obtain the
  • the keyset value set on the page of the page filtering information page determines whether the key value of the determined input parameter is in the keyset Within the value of the mask (keyboard mask), if the key value of the determined input parameter is in the keyset Within the value of the mask, the input event is valid. If the key value of the determined input parameter is not within the value of the keyset mask, the input event is invalid.
  • page javascript code is as follows:
  • Step S30 the browser sends the input event to the page application, so that the page application completes the response operation corresponding to the input event.
  • the browser After the input event is an input event processed by the page application, and the page application corresponding to the input event is determined, the browser sends the input event to the page application for the page application to complete the Enter the response action corresponding to the event.
  • the browser when the browser receives the input event, it determines whether it is an input event required by the page application, and if so, sends it to the page application.
  • the analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
  • the step S30 may include:
  • Step S31 when the input event is an input event of a plurality of page applications, the browser determines that the page application where the current focus is located as the current page application, and sends the input event to the current page application;
  • Step S32 after the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
  • the browser determines a page application corresponding to the input event, and when the determined page is applied to multiple applications, determines a page application where the current focus is located, that is, obtains Go to the page application currently in the top window, send the input event to the page application currently in the top window, and receive response information of the page application, and the response information is response information for completing the input event corresponding response operation
  • the browser receives the response message, the browser sends the input event to the next page application, so that the next page application completes the response operation corresponding to the input event.
  • the browser determines, according to the bubble value of the keyset, whether the button of the input event needs to be sent to another window, and if necessary, acquires other window information, and obtains a focus page corresponding to other windows.
  • the response control of the input event is completed. If there are multiple other windows, the other window information is sequentially acquired, and the focus page corresponding to the other window is obtained, and it is determined whether it is a valid input event. Until the traversing of all other windows, the response operation of the input event is completed, and the response control process of the input event is ended.
  • the input event response process of each other window is the same as the above, and will not be described herein.
  • the browser when the input event corresponds to multiple page applications, the browser first sends the input event to one of the page applications, and after the page application completes the corresponding operation, it is sent to the next page application, effectively ensuring that each A page application completes the operation of the input event, and controls the response operation of the page application to complete the input event, so that the input event completion is more reasonable.
  • the present invention further provides a response control device for inputting an event.
  • FIG. 5 is a schematic diagram of functional modules of a preferred embodiment of a response control device for an input event according to the present invention.
  • the response control device of the input event includes: a determining module 10, a sending and receiving module 20, a storage module 30, and a processing module 40.
  • the determining module 10 is configured to: when receiving a browser-based input event, the browser determines whether the input event is an input event processed by a page application;
  • the user can open the browser loaded by the smart TV through a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device), and click the browser application to complete the browser.
  • a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device)
  • the browser reloads the application, that is, enters the interactive interface of the application. If the user accesses the application for the first time, the loading process of the application needs to be completed, that is, the installation of the application is completed, and information is configured, so that the user can enter the interactive interface of the application through the browser, and complete The corresponding operation.
  • the user sends a browser open command through the input device, the smart TV receives the open command, and opens a browser.
  • the smart TV opens the page application corresponding to the page application open command.
  • a javascript method is loaded, which can send the key value information required by the current application to the browser through the javascript of the browser, and the browser receives the message of the jscore parsing engine.
  • the information is also read and parsed, stored in the browser, and the saved information is used as a reference for the browser to input the event filtering operation.
  • the filtering operation is completed by the browser, which input events need to be sent to the page application processing, which need the browser to process itself, complete the filtering operation of the input event, and not all input events are sent to the page application.
  • the browser receives an input event input through the input device and acquires the input event, the input event including but limited to an operation event, a shutdown event, and the like for the opened application.
  • the browser determines whether the input event is an input event processed by the page application, that is, whether the input event is an input event required by the page application.
  • the determining module 10 is further configured to determine whether the input event is a key input event, and is further configured to determine, when the input event is a key input event, whether the input event is an input event processed by a page application. .
  • the browser After receiving the input event based on the browser, the browser determines whether the input event is a key input event, and after the input event is a key input event, the browser determines whether the input event is The input event of the page application.
  • the determining module 10 includes an obtaining unit 11 and a determining unit 12,
  • the obtaining unit 11 is configured to acquire key value information of the input event
  • the determining unit 12 is configured to determine, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the sending and receiving module 20 is configured to receive page key value information sent by the page application
  • the storage module 30 is configured to save the page key value information.
  • the page key value information is key value information required by the page application. Specifically, when the javascript page calls the relevant interface, the key value information required by the page is sent to the browser, and the browser parses the data information of the page, and obtains the specific information of the button filtering to facilitate the completion of the button (input event). Filter operation.
  • the javascript interface definition of the key value required by the page application is defined as follows:
  • the interface setKeySet is called by the page developer to notify the browser which key values need to be processed by the page;
  • Bubble Whether to bubble to other multi-window processing.
  • the browser After receiving the browser-based input event, the browser determines the key value information corresponding to the input event, where the input event takes the key input event of the remote controller as an example, and the user sends an input event by using a button operation of the remote controller. After the browser obtains the input event, the browser directly under the browser The physical key value of fb is converted into a logical key value, placed in the input event queue, waiting for each application to obtain the input parameters corresponding to the input event that it needs, and the browser will be timed (every interval of 20s, 30s or new input event) When generated, or in real time, get input event information in the input event queue.
  • the browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
  • the process of determining according to the key value information may be: the browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, Determining that the input event is an input event processed by the page application; and when the saved key value information is inconsistent with the determined key value information, determining that the input event is not an input event processed by the page application.
  • the browser constructs a button response group, and the response group includes a button and a button value.
  • the response group refers to Table 1 to Table 5.
  • the browser determines whether the button value corresponding to the input event is a button value specified in the response group, and the button value corresponding to the input event is not a button specified in the response group. In the case of a value, the browser discards the button value, that is, refuses to respond to the input event; and when the button value corresponding to the input event is a button value specified in the response group, performing determination to determine whether the input event is The step of applying an input event for the page application.
  • the browser of the smart TV compares the key value 41 with all the supported key values one by one, and all the supported keys are After the key value 41 is found in the key value, the key value 41 is compared with the supported key response group.
  • the button response group navigation group the corresponding value of the navigation group is 0x10, and the key value 41 is converted to 0x10 for input event. For filtering.
  • determining whether the input event is an input event of a browser for example, determining whether it is an input event sent to a browser kernel, where the input event is an input sent to a browser kernel
  • the input parameters corresponding to the input event are determined, and the input parameters include, but are not limited to, a button key value, a repeat button, a button delay, and a button type (keydown, keyup, key release, etc.).
  • the browser refuses to respond to the input event after the input event is not an input event sent to the browser kernel, and continues to detect an input event from the input device.
  • the process of determining, by the browser, whether it is an input event sent to the browser kernel includes: when a button of the browser application of the smart TV has a key interface keyset calling javascript, sending an input event received by the keyset to the The browser kernel, that is, the input event is an input event sent to the browser kernel; when the application's page does not call the keyset interface, the browser automatically sets the keyset value to 0, which means that the page application receives and processes all The button does not need to perform the response control operation of the input event, and directly sends the input event to the page to complete the response.
  • the processing module 40 is configured to determine, when the input event is an input event processed by the page application, a page application corresponding to the input event;
  • the browser determines the page information corresponding to the input event, that is, determines the page information that the input event needs to control, and needs to control which page the browser currently opens, and obtain the input parameter corresponding to the determined page, that is, obtain the
  • the keyset value set on the page of the page filtering information page determines whether the key value of the determined input parameter is in the keyset Within the value of the mask, if the key value of the determined input parameter is within the value of the keyset mask, it indicates that the input event is valid, if the key value of the determined input parameter is not in the keyset Within the value of mask, the input event is invalid.
  • page javascript code is as follows:
  • the sending and receiving module 20 is configured to send the input event to the page application, so that the page application completes a response operation corresponding to the input event.
  • the browser After the input event is an input event processed by the page application, and the page application corresponding to the input event is determined, the browser sends the input event to the page application for the page application to complete the Enter the response action corresponding to the event.
  • the browser when the browser receives the input event, it determines whether it is an input event required by the page application, and if so, sends it to the page application.
  • the analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
  • processing module 40 is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is located as a current page application;
  • the sending and receiving module 20 is further configured to send the input event to the current page application; and further configured to send the input event to the next after the current page application completes the response operation of the input event A page application.
  • the browser determines a page application corresponding to the input event, and when the determined page is applied to multiple applications, determines a page application where the current focus is located, that is, obtains Go to the page application currently in the top window, send the input event to the page application currently in the top window, and receive response information of the page application, and the response information is response information for completing the input event corresponding response operation
  • the browser receives the response message, the browser sends the input event to the next page application, so that the next page application completes the response operation corresponding to the input event.
  • the browser determines, according to the bubble value of the keyset, whether the button of the input event needs to be sent to another window, and if necessary, acquires other window information, and obtains a focus page corresponding to other windows, according to the above determination.
  • the process of effectively inputting an event completes the response control of the input event. If there are multiple other windows, the other window information is sequentially acquired, and the focus page corresponding to the other window is obtained, and it is determined whether it is a valid input event until all the traversal is completed.
  • the other window completes the response operation of the input event, and ends the response control process of the input event.
  • the input event response process of each other window is the same as the above, and will not be described herein.
  • the browser when the input event corresponds to multiple page applications, the browser first sends the input event to one of the page applications, and after the page application completes the corresponding operation, it is sent to the next page application, effectively ensuring that each A page application completes the operation of the input event, and controls the response operation of the page application to complete the input event, so that the input event completion is more reasonable.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed is a method for controlling a response to an input event, comprising the following steps: when a browser-based input event is received, a browser judging whether the input event is an input event processed by a page application; when the input event is an input event processed by a page application, the browser determining a page application that corresponds to the input event; and the browser sending the input event to the page application for the page application to complete a response operation corresponding to the input event. Further disclosed is an apparatus for controlling a response to an input event. The present invention realizes that a problem of failing to respond to an input event is effectively prevented, improves the accuracy of a page response and improves the efficiency of the page response so as to improve the use experience of a smart terminal.

Description

输入事件的响应控制方法及装置  Input event response control method and device
技术领域Technical field
本发明涉及浏览器控制技术领域,尤其涉及输入事件的响应控制方法及装置。The present invention relates to the field of browser control technologies, and in particular, to a response control method and apparatus for input events.
背景技术Background technique
近年来,随着数字电视的快速发展,数字广播技术也有了很大的提高,数字电视也越来越普及。同时,为了扩展传统电视的功能,各种新的技术被发明,各种新的应用被开发出来应用到电视领域,使得网页浏览已经成为了智能电视的基本配置。In recent years, with the rapid development of digital TV, digital broadcasting technology has also been greatly improved, and digital TV has become more and more popular. At the same time, in order to expand the functions of traditional TV, various new technologies have been invented, and various new applications have been developed and applied to the television field, making web browsing a basic configuration of smart television.
上网就离不开浏览器,所以很多智能电视自带了浏览器功能,甚至为了界面的丰富多彩和易于开发,很多厂家开始采用网页的形式来呈现用户操作界面。这时,用户对于遥控器按键的快速反应就成为了人机交互的重中之重。用户按键的及时响应会大大的提供智能电视的用户体验,并且一些页面应用对于按键的处理需要额外增加浏览器对于页面脚本的开发要求,另外对于每个页面应用都有自己需要的按键以及按键逻辑,对于不需要的按键原理上说浏览器不应该处理按键。然而,目前的浏览器对于按键操作没有任何处理,用户对任何按键的操作都会发送给页面。如果用户连续不断的按键,页面就可以无法正常的响应用户的需求,导致死循环或者不响应任何按键的问题,大大的阻碍了用户体验,这样就导致了页面响应的准确性和效率降低。Internet access is inseparable from the browser, so many smart TVs come with browser functions, and even for the richness and ease of development of the interface, many manufacturers began to use the form of web pages to present the user interface. At this time, the user's quick response to the remote control buttons has become the top priority of human-computer interaction. The timely response of the user's button will greatly provide the user experience of the smart TV, and some page applications need to additionally increase the browser's development requirements for the page script for the processing of the button, and also have the buttons and key logic required for each page application. In principle, the browser should not handle buttons for unwanted buttons. However, current browsers do not have any processing for key operations, and any user action on any keystrokes is sent to the page. If the user continuously presses the button, the page can not respond to the user's needs normally, resulting in an infinite loop or no response to any button, which greatly hinders the user experience, which leads to reduced page response accuracy and efficiency.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solutions of the present invention, and does not constitute an admission that the above is prior art.
发明内容Summary of the invention
本发明的主要目的在于提供一种提高页面响应的准确性和效率降的输入事件的响应控制方法及装置。The main object of the present invention is to provide a response control method and apparatus for an input event that improves the accuracy and efficiency of page response.
为实现上述目的,本发明提供的一种输入事件的响应控制方法,包括步骤:To achieve the above objective, the present invention provides a response control method for an input event, including the steps of:
在接收到基于浏览器的输入事件时,浏览器判断所述输入事件是否为页面应用处理的输入事件;Upon receiving the browser-based input event, the browser determines whether the input event is an input event processed by the page application;
在所述输入事件为页面应用处理的输入事件时,所述浏览器确定所述输入事件对应的页面应用;When the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event;
所述浏览器将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。The browser sends the input event to the page application for the page application to complete a response operation corresponding to the input event.
优选地,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤包括:Preferably, the step of the browser determining whether the input event is an input event processed by the page application comprises:
所述浏览器判断所述输入事件是否为按键输入事件;The browser determines whether the input event is a key input event;
在所述输入事件为按键输入事件时,所述浏览器判断所述输入事件是否为页面应用处理的输入事件。When the input event is a key input event, the browser determines whether the input event is an input event processed by a page application.
优选地,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤之前,还包括:Preferably, before the step of determining, by the browser, whether the input event is an input event processed by the page application, the method further includes:
所述浏览器接收页面应用发送来的页面键值信息,并将所述页面键值信息保存。The browser receives the page key value information sent by the page application, and saves the page key value information.
优选地,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤包括:Preferably, the step of the browser determining whether the input event is an input event processed by the page application comprises:
所述浏览器获取所述输入事件的键值信息;The browser acquires key value information of the input event;
所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
优选地,所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件的步骤包括:Preferably, the step of determining, by the browser, whether the input event is an input event processed by a page application according to the determined key value information comprises:
所述浏览器将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。The browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, determining that the input event is an input event processed by the page application; When the saved key value information does not coincide with the determined key value information, it is determined that the input event is not an input event processed by the page application.
优选地,所述浏览器将所述输入事件发送至所述页面应用的步骤包括:Preferably, the step of the browser sending the input event to the page application comprises:
在所述输入事件为多个页面应用的输入事件时,所述浏览器确定当前焦点所在的页面应用作为当前页面应用,所述浏览器将所述输入事件发送至所述当前页面应用;When the input event is an input event of a plurality of page applications, the browser determines that the page application where the current focus is located as the current page application, and the browser sends the input event to the current page application;
在所述当前页面应用完成所述输入事件的响应操作后,所述浏览器将所述输入事件发送至下一个页面应用。After the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
优选地,所述输入事件的响应控制方法,还包括:Preferably, the method for controlling the response of the input event further includes:
所述浏览器在获取到所述输入事件后,将浏览器底层的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时或者实时获取输入事件队列中的输入事件信息。After obtaining the input event, the browser converts the physical key value of the bottom layer of the browser into a logical key value, puts it into the input event queue, and waits for each application to obtain the input parameter corresponding to the input event that the user needs, the browser. The input event information in the input event queue is obtained periodically or in real time.
此外,为实现上述目的,本发明还提供一种输入事件的响应控制装置,包括:In addition, in order to achieve the above object, the present invention further provides a response control device for inputting an event, including:
判断模块,用于在接收到基于浏览器的输入事件时,判断所述输入事件是否为页面应用处理的输入事件;a determining module, configured to determine, when receiving a browser-based input event, whether the input event is an input event processed by a page application;
处理模块,用于在所述输入事件为页面应用处理的输入事件时,确定所述输入事件对应的页面应用;a processing module, configured to determine a page application corresponding to the input event when the input event is an input event processed by the page application;
接发模块,用于将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。And a sending module, configured to send the input event to the page application, for the page application to complete a response operation corresponding to the input event.
优选地,所述判断模块,还用于判断所述输入事件是否为按键输入事件;还用于在所述输入事件为按键输入事件时,判断所述输入事件是否为页面应用处理的输入事件。Preferably, the determining module is further configured to determine whether the input event is a key input event, and is further configured to determine, when the input event is a key input event, whether the input event is an input event processed by a page application.
优选地,所述输入事件的响应控制装置还包括存储模块,Preferably, the response control device of the input event further includes a storage module,
所述接发模块,还用于接收页面应用发送来的页面键值信息;The sending and receiving module is further configured to receive page key value information sent by the page application;
所述存储模块,用于将所述页面键值信息保存。The storage module is configured to save the page key value information.
优选地,所述判断模块包括获取单元和判断单元,Preferably, the determining module includes an obtaining unit and a determining unit,
所述获取单元,用于获取所述输入事件的键值信息;The obtaining unit is configured to acquire key value information of the input event;
所述判断单元,用于根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。The determining unit is configured to determine, according to the determined key value information, whether the input event is an input event processed by a page application.
优选地,所述判断单元,还用于将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。Preferably, the determining unit is further configured to compare the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, determine that the input event is An input event processed by the page application; when the saved key value information is inconsistent with the determined key value information, it is determined that the input event is not an input event processed by the page application.
优选地,所述确定模块,还用于在所述输入事件为多个页面应用的输入事件时,确定当前焦点所在的页面应用作为当前页面应用;Preferably, the determining module is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is located as a current page application;
所述接发模块,还用于将所述输入事件发送至所述当前页面应用;还用于在所述当前页面应用完成所述输入事件的响应操作后,将所述输入事件发送至下一个页面应用。The sending and receiving module is further configured to send the input event to the current page application; and further configured to send the input event to the next one after the current page application completes the response operation of the input event Page application.
优选地,所述处理模块,还用于获取到所述输入事件后,将浏览器底层的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时或者实时获取输入事件队列中的输入事件信息。Preferably, the processing module is further configured to: after obtaining the input event, convert the physical key value of the bottom layer of the browser into a logical key value, put it into the input event queue, and wait for each application to obtain an input event corresponding to the application. Input parameters, the browser will get input event information in the input event queue periodically or in real time.
本发明通过浏览器在接收到输入事件时,判断是否为页面应用需要的输入事件,若是,则发送至页面应用。将输入事件的分析、处理过程放在浏览器中,而不在页面应用中处理。有效防止无法响应输入事件的问题,提高页面响应的准确性并提高了页面响应的效率,进而提高了智能终端的使用体验。The invention determines whether the input event required by the page application is received by the browser when the input event is received, and if yes, sends it to the page application. The analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
附图说明DRAWINGS
图1为本发明输入事件的响应控制方法的第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a method for controlling response to an input event according to the present invention;
图2为图1中步骤S10一实施例的细化流程示意图;2 is a schematic diagram showing the refinement process of an embodiment of step S10 in FIG. 1;
图3为图1中步骤S10另一实施例的细化流程示意图;3 is a schematic flow chart of another embodiment of step S10 of FIG. 1;
图4为本发明输入事件的响应控制方法的第二实施例的流程示意图;4 is a schematic flowchart diagram of a second embodiment of a method for controlling response to an input event according to the present invention;
图5为本发明输入事件的响应控制装置的较佳实施例的功能模块示意图;5 is a schematic diagram of functional modules of a preferred embodiment of a response control device for input events according to the present invention;
图6为图5中判断模块一实施例的细化功能模块示意图。FIG. 6 is a schematic diagram of a refinement function module of an embodiment of the judging module of FIG. 5. FIG.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种输入事件的响应控制方法。The present invention provides a response control method for an input event.
参照图1,图1为本发明输入事件的响应控制方法的第一实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for controlling response to an input event according to the present invention.
在一实施例中,所述输入事件的响应控制方法包括:In an embodiment, the response control method of the input event includes:
步骤S10,在接收到基于浏览器的输入事件时,浏览器判断所述输入事件是否为页面应用处理的输入事件;Step S10, when receiving the browser-based input event, the browser determines whether the input event is an input event processed by the page application;
用户在需要访问智能电视机的浏览器时,通过智能电视机的遥控器或者鼠标等输入设备(也可以称为控制设备)打开智能电视所加载的浏览器,并通过点击浏览器的应用来完成对应应用的访问,当浏览器在访问一个应用时,浏览器会重新加载所述应用,即进入所述应用的交互界面。如果用户是首次访问所述应用时,需要完成所述应用的加载过程,即完成所述应用的安装,进行信息配置,以供用户能通过所述浏览器进入所述应用的交互界面,并完成相应的操作。When the user needs to access the browser of the smart TV, the user can open the browser loaded by the smart TV through a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device), and click the browser application to complete the browser. Corresponding to the access of the application, when the browser accesses an application, the browser reloads the application, that is, enters the interactive interface of the application. If the user accesses the application for the first time, the loading process of the application needs to be completed, that is, the installation of the application is completed, and information is configured, so that the user can enter the interactive interface of the application through the browser, and complete The corresponding operation.
用户通过输入设备发送浏览器打开指令,智能电视机接收所述打开指令,并打开浏览器,所述智能电视机在接收到页面应用打开指令后,打开页面应用打开指令对应的页面应用。在打开页面应用时,加载一个javascript(脚本语言)方法,该方法可以将当前的应用所需要的键值信息通过javascript,利用浏览器的jscore(一种解析方法)解析引擎发送给浏览器,此时浏览器收到jscore解析引擎的消息时,也对该信息进行读取解析,保存在浏览器中,将保存的信息作为浏览器输入事件过滤操作的基准。所述过滤操作即由浏览器来完成,哪些输入事件需要发送至页面应用处理,哪些需要浏览器自身处理,完成输入事件的过滤操作,而不是所有输入事件都发送至页面应用。The user sends a browser open command through the input device, the smart TV receives the open command, and opens a browser. After receiving the page application open command, the smart TV opens the page application corresponding to the page application open command. When the page application is opened, a javascript (script language) method is loaded, which can send the key value information required by the current application to the browser through the javascript, using the browser's jscore (a parsing method) parsing engine. When the browser receives the message from the jscore parsing engine, it also reads and parses the information, saves it in the browser, and uses the saved information as the benchmark for the browser input event filtering operation. The filtering operation is completed by the browser, which input events need to be sent to the page application processing, which need the browser to process itself, complete the filtering operation of the input event, and not all input events are sent to the page application.
所述浏览器接收通过所述输入设备输入的输入事件,并获取所述输入事件,所述输入事件包括但限于对所打开应用的操作事件、关闭事件等。The browser receives an input event input through the input device and acquires the input event, the input event including but limited to an operation event, a shutdown event, and the like for the opened application.
所述浏览器在接收到基于浏览器的输入事件时,判断所述输入事件是否为页面应用处理的输入事件,即判断所述输入事件是否为页面应用需要的输入事件。When the browser receives the browser-based input event, the browser determines whether the input event is an input event processed by the page application, that is, whether the input event is an input event required by the page application.
具体的,参考图2,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的过程可以包括:Specifically, referring to FIG. 2, the process of determining, by the browser, whether the input event is an input event processed by a page application may include:
步骤S11,所述浏览器判断所述输入事件是否为按键输入事件;Step S11, the browser determines whether the input event is a key input event;
步骤S12,在所述输入事件为按键输入事件时,所述浏览器判断所述输入事件是否为页面应用处理的输入事件。Step S12: When the input event is a key input event, the browser determines whether the input event is an input event processed by a page application.
所述浏览器在接收到基于所述浏览器的输入事件后,判断所述输入事件是否为按键输入事件,在所述输入事件为按键输入事件后,所述浏览器判断所述输入事件是否为页面应用的输入事件。After receiving the input event based on the browser, the browser determines whether the input event is a key input event, and after the input event is a key input event, the browser determines whether the input event is The input event of the page application.
参考图3,基于按键操作下的输入事件的判断过程可以是:Referring to FIG. 3, the determination process based on the input event under the key operation may be:
步骤S13,所述浏览器获取所述输入事件的键值信息;Step S13, the browser acquires key value information of the input event;
步骤S14,所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。Step S14: The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
所述浏览器接收页面应用发送来的页面键值信息,并将所述页面键值信息保存,所述页面键值信息为所述页面应用需要的键值信息。具体的,当javascript页面调用相关的接口时,将页面需要的键值信息发送给浏览器,浏览器对页面的数据信息进行解析,获取到按键过滤的具体信息方便以后完成按键(输入事件)的过滤操作。The browser receives the page key value information sent by the page application, and saves the page key value information, where the page key value information is key value information required by the page application. Specifically, when the javascript page calls the relevant interface, the key value information required by the page is sent to the browser, and the browser parses the data information of the page, and obtains the specific information of the button filtering to facilitate the completion of the button (input event). Filter operation.
在本实施例中,页面应用需要的键值定义的javascript接口定义如下:In this embodiment, the javascript interface definition of the key value required by the page application is defined as follows:
window.setKeySet(var data);window.setKeySet(var data);
说明:该接口setKeySet是页面开发者调用,通知浏览器该页面需要处理哪些键值;Description: The interface setKeySet is called by the page developer to notify the browser which key values need to be processed by the page;
参数data格式:Parameter data format:
{'mask':%d,'bubble':%d}{'mask':%d,'bubble':%d}
Mask:该页面需要处理的按键响应组;Mask: The key response group that the page needs to process;
Bubble:是否冒泡给其他的多窗口处理。Bubble: Whether to bubble to other multi-window processing.
所述浏览器在接收到基于浏览器的输入事件后,确定所述输入事件对应的键值信息,这里的输入事件以遥控器的按键输入事件为例,用户通过遥控器的按键操作发出输入事件,所述浏览器在获取到所述输入事件后,将浏览器底层的direct fb的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时(每间隔20s、30s或者是在有新的输入事件产生时)或者实时获取输入事件队列中的输入事件信息。After receiving the browser-based input event, the browser determines the key value information corresponding to the input event, where the input event takes the key input event of the remote controller as an example, and the user sends an input event by using a button operation of the remote controller. After the browser obtains the input event, the browser directly under the browser The physical key value of fb is converted into a logical key value, placed in the input event queue, waiting for each application to obtain the input parameters corresponding to the input event that it needs, and the browser will be timed (every interval of 20s, 30s or new input event) When generated, or in real time, get input event information in the input event queue.
所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。具体的,根据键值信息判断的过程可以是:所述浏览器将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application. Specifically, the process of determining according to the key value information may be: the browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, Determining that the input event is an input event processed by the page application; and when the saved key value information is inconsistent with the determined key value information, determining that the input event is not an input event processed by the page application.
进一步地,所述浏览器构建按键响应组,所述响应组包括按键及按键值,具体的,响应组参考表1至表5。Further, the browser constructs a button response group, and the response group includes a button and a button value. Specifically, the response group refers to Table 1 to Table 5.
按键响应组--特殊键Button response group--special button 数值Numerical value
红色键Red key 0x010x01
绿色键Green button 0x020x02
黄色键Yellow button 0x040x04
蓝色键Blue button 0x080x08
按键响应组—navigationKey response group—navigation 数值Numerical value
回车键Enter key 0x100x10
上下左右键Up, down, left and right buttons
返回键return key
退出键Exit button
按键响应组—播放组Button response group - play group 数值Numerical value
播放键Play button 0x200x20
暂停键Pause button
快进、快退键Fast forward, fast reverse button
上一个、下一个键Previous and next keys
停止键Stop button
按键响应组—滚屏键Button response group - scroll button 数值Numerical value
向上和向下滚屏翻页键Scroll up and down 0x400x40
按键响应组—数字字母组Key Response Group - alphanumeric 数值Numerical value
所有数字和字母All numbers and letters 0x800x80
所述浏览器在接收到按键输入事件时,判断所述输入事件对应的按键值是否为所述响应组内规定的按键值,在所述输入事件对应的按键值不为响应组内规定的按键值时,所述浏览器丢弃所述按键值,即拒绝响应所述输入事件;在所述输入事件对应的按键值为所述响应组内规定的按键值时,再执行判断所述输入事件是否为页面应用处理的输入事件的步骤。When receiving the button input event, the browser determines whether the button value corresponding to the input event is a button value specified in the response group, and the button value corresponding to the input event is not a button specified in the response group. In the case of a value, the browser discards the button value, that is, refuses to respond to the input event; and when the button value corresponding to the input event is a button value specified in the response group, performing determination to determine whether the input event is The step of applying an input event for the page application.
例如,若所述输入事件的按键是方向键左键,键值为41,所述智能电视机的浏览器将所述键值41与支持的所有按键键值逐一比对,在支持的所有按键键值中找到键值41后,将键值41与支持的按键响应组比对,在按键响应组navigation(浏览)组,navigation组对应的值为0x10,则将键值41转换为0x10保存,以供输入事件的过滤用。For example, if the button of the input event is the left button of the direction key and the key value is 41, the browser of the smart TV compares the key value 41 with all the supported key values one by one, and all the supported keys are After the key value 41 is found in the key value, the key value 41 is compared with the supported key response group. In the button response group navigation group, the corresponding value of the navigation group is 0x10, and the key value 41 is converted to 0x10 and saved. For filtering of input events.
优选地,在接收到输入事件时,判断所述输入事件是否为浏览器的输入事件,例如,判断是否为发送至浏览器内核的输入事件,在所述输入事件为发送至浏览器内核的输入事件后,确定所述输入事件对应的输入参数,所述输入参数包括但不限于按键键值、重复按键、按键时延、按键类型(键向下keydown、键向上keyup、keyrelease键释放等)。所述浏览器在所述输入事件不为发送至浏览器内核的输入事件后,拒绝响应所述输入事件,继续侦测来自输入设备的输入事件。所述浏览器判断判断是否为发送至浏览器内核的输入事件的过程包括:在所述智能电视机的浏览器应用的页面有调用javascript的按键接口keyset,则将keyset接收到的输入事件发送至浏览器内核,即所述输入事件为发送至浏览器内核的输入事件;在应用的页面未调用keyset接口时,则所述浏览器自动设置keyset值为0,代表所述页面应用接收并处理所有的按键,无需进行输入事件的响应控制操作,直接将输入事件发送给页面完成响应。Preferably, upon receiving the input event, determining whether the input event is an input event of a browser, for example, determining whether it is an input event sent to a browser kernel, where the input event is an input sent to a browser kernel After the event, the input parameters corresponding to the input event are determined, and the input parameters include, but are not limited to, a button key value, a repeated button, a button delay, a button type (key down keydown, key up keyup, key release key release, etc.). The browser refuses to respond to the input event after the input event is not an input event sent to the browser kernel, and continues to detect an input event from the input device. The process of determining, by the browser, whether it is an input event sent to the browser kernel includes: when a button of the browser application of the smart TV has a key interface keyset calling javascript, sending an input event received by the keyset to the The browser kernel, that is, the input event is an input event sent to the browser kernel; when the application's page does not call the keyset interface, the browser automatically sets the keyset value to 0, which means that the page application receives and processes all The button does not need to perform the response control operation of the input event, and directly sends the input event to the page to complete the response.
步骤S20,在所述输入事件为页面应用处理的输入事件时,所述浏览器确定所述输入事件对应的页面应用;Step S20, when the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event;
所述浏览器确定所述输入事件对应的页面信息,即确定所述输入事件需要控制的页面信息,需要控制浏览器当前打开的哪个页面,并获取所确定的页面对应的输入参数,即获取到该页面的按键过滤信息页面设置的keyset值,判断所确定的输入参数的按键键值是否在keyset mask(键盘掩码)的值内,如果所确定的输入参数的按键键值在keyset mask的值内,则表明所述输入事件有效,如果所确定的输入参数的按键键值不在keyset mask的值内,则表明所述输入事件无效。The browser determines the page information corresponding to the input event, that is, determines the page information that the input event needs to control, and needs to control which page the browser currently opens, and obtain the input parameter corresponding to the determined page, that is, obtain the The keyset value set on the page of the page filtering information page determines whether the key value of the determined input parameter is in the keyset Within the value of the mask (keyboard mask), if the key value of the determined input parameter is in the keyset Within the value of the mask, the input event is valid. If the key value of the determined input parameter is not within the value of the keyset mask, the input event is invalid.
例如,页面javascript代码如下:For example, the page javascript code is as follows:
window.setKeySet(“ 'mask':0x1f , 'bubble':1 ”);window.setKeySet(" 'mask':0x1f , 'bubble':1 ”);
则浏览器内部获取到的keyset mask值为0x1f;左键对应的按键响应组的值为0x10,0x1f & 0x10 = 1,所以keyset mask是包含左键的,所以该按键就是有效的,如果为0就是无效的。The keyset mask value obtained by the browser is 0x1f; the value of the key response group corresponding to the left key is 0x10, 0x1f & 0x10 = 1, so the keyset mask contains the left button, so the button is valid, if it is 0, it is invalid.
步骤S30,所述浏览器将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。Step S30, the browser sends the input event to the page application, so that the page application completes the response operation corresponding to the input event.
所述浏览器在所述输入事件为页面应用处理的输入事件,并确定所述输入事件对应的页面应用后,将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。After the input event is an input event processed by the page application, and the page application corresponding to the input event is determined, the browser sends the input event to the page application for the page application to complete the Enter the response action corresponding to the event.
本实施例通过浏览器在接收到输入事件时,判断是否为页面应用需要的输入事件,若是,则发送至页面应用。将输入事件的分析、处理过程放在浏览器中,而不在页面应用中处理。有效防止无法响应输入事件的问题,提高页面响应的准确性并提高了页面响应的效率,进而提高了智能终端的使用体验。In this embodiment, when the browser receives the input event, it determines whether it is an input event required by the page application, and if so, sends it to the page application. The analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
参考图4,为本发明输入事件的响应控制方法的第二实施例的流程示意图。基于上述输入事件的响应控制方法的第一实施例,所述步骤S30可以包括:Referring to FIG. 4, it is a schematic flowchart of a second embodiment of a method for controlling response to an input event according to the present invention. Based on the first embodiment of the response control method of the input event, the step S30 may include:
步骤S31,在所述输入事件为多个页面应用的输入事件时,所述浏览器确定当前焦点所在的页面应用作为当前页面应用,将所述输入事件发送至所述当前页面应用;Step S31, when the input event is an input event of a plurality of page applications, the browser determines that the page application where the current focus is located as the current page application, and sends the input event to the current page application;
步骤S32,在所述当前页面应用完成所述输入事件的响应操作后,所述浏览器将所述输入事件发送至下一个页面应用。Step S32, after the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
所述浏览器在所述输入事件为页面应用处理的输入事件时,确定所述输入事件对应的页面应用,在所确定的页面应用为多个时,确定当前焦点所处的页面应用,即获取到当前在置顶窗口的页面应用,将所述输入事件发送至所述当前在置顶窗口的页面应用,并接收所述页面应用的响应信息,所述响应信息为完成输入事件对应响应操作的响应信息,所述浏览器在接收到所述响应消息时,将所述输入事件发送至下一页面应用,以供下一页面应用完成所述输入事件对应的响应操作。When the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event, and when the determined page is applied to multiple applications, determines a page application where the current focus is located, that is, obtains Go to the page application currently in the top window, send the input event to the page application currently in the top window, and receive response information of the page application, and the response information is response information for completing the input event corresponding response operation When the browser receives the response message, the browser sends the input event to the next page application, so that the next page application completes the response operation corresponding to the input event.
具体的,所述浏览器根据keyset的bubble(冒泡)值判断所述输入事件的按键是否需要发送给其他的窗口,若需要,则获取其他的窗口信息,并获取到对应其他窗口的焦点页面,按照上述确定有效输入事件的过程完成输入事件的响应控制,若存在多个其他的窗口,则依次获取其他的窗口信息,并获取到对应其他窗口的焦点页面,并确定是否为有效输入事件,直至遍历完所有其他的窗口,完成输入事件的响应操作,结束所述输入事件的响应控制过程,每一个其他窗口的输入事件响应过程与上述相同,在此不再赘述。Specifically, the browser determines, according to the bubble value of the keyset, whether the button of the input event needs to be sent to another window, and if necessary, acquires other window information, and obtains a focus page corresponding to other windows. According to the above process of determining the valid input event, the response control of the input event is completed. If there are multiple other windows, the other window information is sequentially acquired, and the focus page corresponding to the other window is obtained, and it is determined whether it is a valid input event. Until the traversing of all other windows, the response operation of the input event is completed, and the response control process of the input event is ended. The input event response process of each other window is the same as the above, and will not be described herein.
本实施例通过浏览器在输入事件对应为多个页面应用时,先将输入事件发送至其中一个页面应用,并在所述页面应用完成相应操作后,再发送至下一页面应用,有效确保每一个页面应用完成所述输入事件的操作,且对页面应用完成输入事件的响应操作进行控制,使得输入事件完成更加合理。In this embodiment, when the input event corresponds to multiple page applications, the browser first sends the input event to one of the page applications, and after the page application completes the corresponding operation, it is sent to the next page application, effectively ensuring that each A page application completes the operation of the input event, and controls the response operation of the page application to complete the input event, so that the input event completion is more reasonable.
本发明进一步提供一种输入事件的响应控制装置。The present invention further provides a response control device for inputting an event.
参照图5,图5为本发明输入事件的响应控制装置的较佳实施例的功能模块示意图。Referring to FIG. 5, FIG. 5 is a schematic diagram of functional modules of a preferred embodiment of a response control device for an input event according to the present invention.
在一实施例中,所述输入事件的响应控制装置包括:判断模块10、接发模块20、存储模块30及处理模块40。In an embodiment, the response control device of the input event includes: a determining module 10, a sending and receiving module 20, a storage module 30, and a processing module 40.
所述判断模块10,用于在接收到基于浏览器的输入事件时,浏览器判断所述输入事件是否为页面应用处理的输入事件;The determining module 10 is configured to: when receiving a browser-based input event, the browser determines whether the input event is an input event processed by a page application;
用户在需要访问智能电视机的浏览器时,通过智能电视机的遥控器或者鼠标等输入设备(也可以称为控制设备)打开智能电视所加载的浏览器,并通过点击浏览器的应用来完成对应应用的访问,当浏览器在访问一个应用时,浏览器会重新加载所述应用,即进入所述应用的交互界面。如果用户是首次访问所述应用时,需要完成所述应用的加载过程,即完成所述应用的安装,进行信息配置,以供用户能通过所述浏览器进入所述应用的交互界面,并完成相应的操作。When the user needs to access the browser of the smart TV, the user can open the browser loaded by the smart TV through a remote control device such as a remote control of the smart TV or a mouse (also referred to as a control device), and click the browser application to complete the browser. Corresponding to the access of the application, when the browser accesses an application, the browser reloads the application, that is, enters the interactive interface of the application. If the user accesses the application for the first time, the loading process of the application needs to be completed, that is, the installation of the application is completed, and information is configured, so that the user can enter the interactive interface of the application through the browser, and complete The corresponding operation.
用户通过输入设备发送浏览器打开指令,智能电视机接收所述打开指令,并打开浏览器,所述智能电视机在接收到页面应用打开指令后,打开页面应用打开指令对应的页面应用。在打开页面应用时,加载一个javascript方法,该方法可以将当前的应用所需要的键值信息通过javascript,利用浏览器的jscore解析引擎发送给浏览器,此时浏览器收到jscore解析引擎的消息时,也对该信息进行读取解析,保存在浏览器中,将保存的信息作为浏览器输入事件过滤操作的基准。所述过滤操作即由浏览器来完成,哪些输入事件需要发送至页面应用处理,哪些需要浏览器自身处理,完成输入事件的过滤操作,而不是所有输入事件都发送至页面应用。The user sends a browser open command through the input device, the smart TV receives the open command, and opens a browser. After receiving the page application open command, the smart TV opens the page application corresponding to the page application open command. When the page application is opened, a javascript method is loaded, which can send the key value information required by the current application to the browser through the javascript of the browser, and the browser receives the message of the jscore parsing engine. At the same time, the information is also read and parsed, stored in the browser, and the saved information is used as a reference for the browser to input the event filtering operation. The filtering operation is completed by the browser, which input events need to be sent to the page application processing, which need the browser to process itself, complete the filtering operation of the input event, and not all input events are sent to the page application.
所述浏览器接收通过所述输入设备输入的输入事件,并获取所述输入事件,所述输入事件包括但限于对所打开应用的操作事件、关闭事件等。The browser receives an input event input through the input device and acquires the input event, the input event including but limited to an operation event, a shutdown event, and the like for the opened application.
所述浏览器在接收到基于浏览器的输入事件时,判断所述输入事件是否为页面应用处理的输入事件,即判断所述输入事件是否为页面应用需要的输入事件。When the browser receives the browser-based input event, the browser determines whether the input event is an input event processed by the page application, that is, whether the input event is an input event required by the page application.
进一步地,所述判断模块10,还用于判断所述输入事件是否为按键输入事件;还用于在所述输入事件为按键输入事件时,判断所述输入事件是否为页面应用处理的输入事件。Further, the determining module 10 is further configured to determine whether the input event is a key input event, and is further configured to determine, when the input event is a key input event, whether the input event is an input event processed by a page application. .
所述浏览器在接收到基于所述浏览器的输入事件后,判断所述输入事件是否为按键输入事件,在所述输入事件为按键输入事件后,所述浏览器判断所述输入事件是否为页面应用的输入事件。After receiving the input event based on the browser, the browser determines whether the input event is a key input event, and after the input event is a key input event, the browser determines whether the input event is The input event of the page application.
参考图6,所述判断模块10包括获取单元11和判断单元12,Referring to FIG. 6, the determining module 10 includes an obtaining unit 11 and a determining unit 12,
所述获取单元11,用于获取所述输入事件的键值信息;The obtaining unit 11 is configured to acquire key value information of the input event;
所述判断单元12,用于根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。The determining unit 12 is configured to determine, according to the determined key value information, whether the input event is an input event processed by a page application.
所述接发模块20,用于接收页面应用发送来的页面键值信息;The sending and receiving module 20 is configured to receive page key value information sent by the page application;
所述存储模块30,用于将所述页面键值信息保存。所述页面键值信息为所述页面应用需要的键值信息。具体的,当javascript页面调用相关的接口时,将页面需要的键值信息发送给浏览器,浏览器对页面的数据信息进行解析,获取到按键过滤的具体信息方便以后完成按键(输入事件)的过滤操作。The storage module 30 is configured to save the page key value information. The page key value information is key value information required by the page application. Specifically, when the javascript page calls the relevant interface, the key value information required by the page is sent to the browser, and the browser parses the data information of the page, and obtains the specific information of the button filtering to facilitate the completion of the button (input event). Filter operation.
在本实施例中,页面应用需要的键值定义的javascript接口定义如下:In this embodiment, the javascript interface definition of the key value required by the page application is defined as follows:
window.setKeySet(var data);window.setKeySet(var data);
说明:该接口setKeySet是页面开发者调用,通知浏览器该页面需要处理哪些键值;Description: The interface setKeySet is called by the page developer to notify the browser which key values need to be processed by the page;
参数data格式:Parameter data format:
{'mask':%d,'bubble':%d}{'mask':%d,'bubble':%d}
Mask:该页面需要处理的按键响应组;Mask: The key response group that the page needs to process;
Bubble:是否冒泡给其他的多窗口处理。Bubble: Whether to bubble to other multi-window processing.
所述浏览器在接收到基于浏览器的输入事件后,确定所述输入事件对应的键值信息,这里的输入事件以遥控器的按键输入事件为例,用户通过遥控器的按键操作发出输入事件,所述浏览器在获取到所述输入事件后,将浏览器底层的direct fb的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时(每间隔20s、30s或者是在有新的输入事件产生时)或者实时获取输入事件队列中的输入事件信息。After receiving the browser-based input event, the browser determines the key value information corresponding to the input event, where the input event takes the key input event of the remote controller as an example, and the user sends an input event by using a button operation of the remote controller. After the browser obtains the input event, the browser directly under the browser The physical key value of fb is converted into a logical key value, placed in the input event queue, waiting for each application to obtain the input parameters corresponding to the input event that it needs, and the browser will be timed (every interval of 20s, 30s or new input event) When generated, or in real time, get input event information in the input event queue.
所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。具体的,根据键值信息判断的过程可以是:所述浏览器将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application. Specifically, the process of determining according to the key value information may be: the browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, Determining that the input event is an input event processed by the page application; and when the saved key value information is inconsistent with the determined key value information, determining that the input event is not an input event processed by the page application.
进一步地,所述浏览器构建按键响应组,所述响应组包括按键及按键值,具体的,响应组参考表1至表5。Further, the browser constructs a button response group, and the response group includes a button and a button value. Specifically, the response group refers to Table 1 to Table 5.
所述浏览器在接收到按键输入事件时,判断所述输入事件对应的按键值是否为所述响应组内规定的按键值,在所述输入事件对应的按键值不为响应组内规定的按键值时,所述浏览器丢弃所述按键值,即拒绝响应所述输入事件;在所述输入事件对应的按键值为所述响应组内规定的按键值时,再执行判断所述输入事件是否为页面应用处理的输入事件的步骤。When receiving the button input event, the browser determines whether the button value corresponding to the input event is a button value specified in the response group, and the button value corresponding to the input event is not a button specified in the response group. In the case of a value, the browser discards the button value, that is, refuses to respond to the input event; and when the button value corresponding to the input event is a button value specified in the response group, performing determination to determine whether the input event is The step of applying an input event for the page application.
例如,若所述输入事件的按键是方向键左键,键值为41,所述智能电视机的浏览器将所述键值41与支持的所有按键键值逐一比对,在支持的所有按键键值中找到键值41后,将键值41与支持的按键响应组比对,在按键响应组navigation组,navigation组对应的值为0x10,则将键值41转换为0x10保存以供输入事件的过滤用。For example, if the button of the input event is the left button of the direction key and the key value is 41, the browser of the smart TV compares the key value 41 with all the supported key values one by one, and all the supported keys are After the key value 41 is found in the key value, the key value 41 is compared with the supported key response group. In the button response group navigation group, the corresponding value of the navigation group is 0x10, and the key value 41 is converted to 0x10 for input event. For filtering.
优选地,在接收到输入事件时,判断所述输入事件是否为浏览器的输入事件,例如,判断是否为发送至浏览器内核的输入事件,在所述输入事件为发送至浏览器内核的输入事件后,确定所述输入事件对应的输入参数,所述输入参数包括但不限于按键键值、重复按键、按键时延、按键类型(keydown、keyup、keyrelease等)。所述浏览器在所述输入事件不为发送至浏览器内核的输入事件后,拒绝响应所述输入事件,继续侦测来自输入设备的输入事件。所述浏览器判断判断是否为发送至浏览器内核的输入事件的过程包括:在所述智能电视机的浏览器应用的页面有调用javascript的按键接口keyset,则将keyset接收到的输入事件发送至浏览器内核,即所述输入事件为发送至浏览器内核的输入事件;在应用的页面未调用keyset接口时,则所述浏览器自动设置keyset值为0,代表所述页面应用接收并处理所有的按键,无需进行输入事件的响应控制操作,直接将输入事件发送给页面完成响应。Preferably, upon receiving the input event, determining whether the input event is an input event of a browser, for example, determining whether it is an input event sent to a browser kernel, where the input event is an input sent to a browser kernel After the event, the input parameters corresponding to the input event are determined, and the input parameters include, but are not limited to, a button key value, a repeat button, a button delay, and a button type (keydown, keyup, key release, etc.). The browser refuses to respond to the input event after the input event is not an input event sent to the browser kernel, and continues to detect an input event from the input device. The process of determining, by the browser, whether it is an input event sent to the browser kernel includes: when a button of the browser application of the smart TV has a key interface keyset calling javascript, sending an input event received by the keyset to the The browser kernel, that is, the input event is an input event sent to the browser kernel; when the application's page does not call the keyset interface, the browser automatically sets the keyset value to 0, which means that the page application receives and processes all The button does not need to perform the response control operation of the input event, and directly sends the input event to the page to complete the response.
所述处理模块40,用于在所述输入事件为页面应用处理的输入事件时,确定所述输入事件对应的页面应用;The processing module 40 is configured to determine, when the input event is an input event processed by the page application, a page application corresponding to the input event;
所述浏览器确定所述输入事件对应的页面信息,即确定所述输入事件需要控制的页面信息,需要控制浏览器当前打开的哪个页面,并获取所确定的页面对应的输入参数,即获取到该页面的按键过滤信息页面设置的keyset值,判断所确定的输入参数的按键键值是否在keyset mask的值内,如果所确定的输入参数的按键键值在keyset mask的值内,则表明所述输入事件有效,如果所确定的输入参数的按键键值不在keyset mask的值内,则表明所述输入事件无效。The browser determines the page information corresponding to the input event, that is, determines the page information that the input event needs to control, and needs to control which page the browser currently opens, and obtain the input parameter corresponding to the determined page, that is, obtain the The keyset value set on the page of the page filtering information page determines whether the key value of the determined input parameter is in the keyset Within the value of the mask, if the key value of the determined input parameter is within the value of the keyset mask, it indicates that the input event is valid, if the key value of the determined input parameter is not in the keyset Within the value of mask, the input event is invalid.
例如,页面javascript代码如下:For example, the page javascript code is as follows:
window.setKeySet(“ 'mask':0x1f , 'bubble':1 ”);window.setKeySet(" 'mask':0x1f , 'bubble':1 ”);
则浏览器内部获取到的keyset mask值为0x1f;左键对应的按键响应组的值为0x10,0x1f & 0x10 = 1,所以keyset mask是包含左键的,所以该按键就是有效的,如果为0就是无效的。The keyset mask value obtained by the browser is 0x1f; the value of the key response group corresponding to the left key is 0x10, 0x1f & 0x10 = 1, so the keyset mask contains the left button, so the button is valid, if it is 0, it is invalid.
所述接发模块20,用于将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。The sending and receiving module 20 is configured to send the input event to the page application, so that the page application completes a response operation corresponding to the input event.
所述浏览器在所述输入事件为页面应用处理的输入事件,并确定所述输入事件对应的页面应用后,将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。After the input event is an input event processed by the page application, and the page application corresponding to the input event is determined, the browser sends the input event to the page application for the page application to complete the Enter the response action corresponding to the event.
本实施例通过浏览器在接收到输入事件时,判断是否为页面应用需要的输入事件,若是,则发送至页面应用。将输入事件的分析、处理过程放在浏览器中,而不在页面应用中处理。有效防止无法响应输入事件的问题,提高页面响应的准确性并提高了页面响应的效率,进而提高了智能终端的使用体验。In this embodiment, when the browser receives the input event, it determines whether it is an input event required by the page application, and if so, sends it to the page application. The analysis and processing of input events are placed in the browser without being processed in the page application. Effectively prevent the problem of unable to respond to input events, improve the accuracy of page response and improve the efficiency of page response, thereby improving the experience of the smart terminal.
进一步地,所述处理模块40,还用于在所述输入事件为多个页面应用的输入事件时,确定当前焦点所在的页面应用作为当前页面应用;Further, the processing module 40 is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is located as a current page application;
所述接发模块20,还用于将所述输入事件发送至所述当前页面应用;还用于在所述当前页面应用完成所述输入事件的响应操作后,将所述输入事件发送至下一个页面应用。The sending and receiving module 20 is further configured to send the input event to the current page application; and further configured to send the input event to the next after the current page application completes the response operation of the input event A page application.
所述浏览器在所述输入事件为页面应用处理的输入事件时,确定所述输入事件对应的页面应用,在所确定的页面应用为多个时,确定当前焦点所处的页面应用,即获取到当前在置顶窗口的页面应用,将所述输入事件发送至所述当前在置顶窗口的页面应用,并接收所述页面应用的响应信息,所述响应信息为完成输入事件对应响应操作的响应信息,所述浏览器在接收到所述响应消息时,将所述输入事件发送至下一页面应用,以供下一页面应用完成所述输入事件对应的响应操作。When the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event, and when the determined page is applied to multiple applications, determines a page application where the current focus is located, that is, obtains Go to the page application currently in the top window, send the input event to the page application currently in the top window, and receive response information of the page application, and the response information is response information for completing the input event corresponding response operation When the browser receives the response message, the browser sends the input event to the next page application, so that the next page application completes the response operation corresponding to the input event.
具体的,所述浏览器根据keyset的bubble值判断所述输入事件的按键是否需要发送给其他的窗口,若需要,则获取其他的窗口信息,并获取到对应其他窗口的焦点页面,按照上述确定有效输入事件的过程完成输入事件的响应控制,若存在多个其他的窗口,则依次获取其他的窗口信息,并获取到对应其他窗口的焦点页面,并确定是否为有效输入事件,直至遍历完所有其他的窗口,完成输入事件的响应操作,结束所述输入事件的响应控制过程,每一个其他窗口的输入事件响应过程与上述相同,在此不再赘述。Specifically, the browser determines, according to the bubble value of the keyset, whether the button of the input event needs to be sent to another window, and if necessary, acquires other window information, and obtains a focus page corresponding to other windows, according to the above determination. The process of effectively inputting an event completes the response control of the input event. If there are multiple other windows, the other window information is sequentially acquired, and the focus page corresponding to the other window is obtained, and it is determined whether it is a valid input event until all the traversal is completed. The other window completes the response operation of the input event, and ends the response control process of the input event. The input event response process of each other window is the same as the above, and will not be described herein.
本实施例通过浏览器在输入事件对应为多个页面应用时,先将输入事件发送至其中一个页面应用,并在所述页面应用完成相应操作后,再发送至下一页面应用,有效确保每一个页面应用完成所述输入事件的操作,且对页面应用完成输入事件的响应操作进行控制,使得输入事件完成更加合理。In this embodiment, when the input event corresponds to multiple page applications, the browser first sends the input event to one of the page applications, and after the page application completes the corresponding operation, it is sent to the next page application, effectively ensuring that each A page application completes the operation of the input event, and controls the response operation of the page application to complete the input event, so that the input event completion is more reasonable.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (18)

  1. 一种输入事件的响应控制方法,其特征在于,包括步骤: A response control method for an input event, comprising the steps of:
    在接收到基于浏览器的输入事件时,浏览器判断所述输入事件是否为页面应用处理的输入事件;Upon receiving the browser-based input event, the browser determines whether the input event is an input event processed by the page application;
    在所述输入事件为页面应用处理的输入事件时,所述浏览器确定所述输入事件对应的页面应用;When the input event is an input event processed by the page application, the browser determines a page application corresponding to the input event;
    所述浏览器将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。The browser sends the input event to the page application for the page application to complete a response operation corresponding to the input event.
  2. 如权利要求1所述的输入事件的响应控制方法,其特征在于,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤包括:The method for controlling the response of an input event according to claim 1, wherein the step of the browser determining whether the input event is an input event processed by a page application comprises:
    所述浏览器判断所述输入事件是否为按键输入事件;The browser determines whether the input event is a key input event;
    在所述输入事件为按键输入事件时,所述浏览器判断所述输入事件是否为页面应用处理的输入事件。When the input event is a key input event, the browser determines whether the input event is an input event processed by a page application.
  3. 如权利要求2所述的输入事件的响应控制方法,其特征在于,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤之前,还包括:The method for controlling the response of an input event according to claim 2, wherein before the step of determining whether the input event is an input event processed by the page application, the browser further comprises:
    所述浏览器接收页面应用发送来的页面键值信息,并将所述页面键值信息保存。The browser receives the page key value information sent by the page application, and saves the page key value information.
  4. 如权利要求3所述的输入事件的响应控制方法,其特征在于,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤包括:The method for controlling the response of an input event according to claim 3, wherein the step of the browser determining whether the input event is an input event processed by the page application comprises:
    所述浏览器获取所述输入事件的键值信息;The browser acquires key value information of the input event;
    所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。The browser determines, according to the determined key value information, whether the input event is an input event processed by a page application.
  5. 如权利要求4所述的输入事件的响应控制方法,其特征在于,所述浏览器根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件的步骤包括:The method for controlling the response of an input event according to claim 4, wherein the step of determining, by the browser, whether the input event is an input event of a page application process according to the determined key value information comprises:
    所述浏览器将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。The browser compares the determined key value information with the saved key value information, and when the saved key value information is consistent with the determined key value information, determining that the input event is an input event processed by the page application; When the saved key value information does not coincide with the determined key value information, it is determined that the input event is not an input event processed by the page application.
  6. 如权利要求2所述的输入事件的响应控制方法,其特征在于,所述浏览器将所述输入事件发送至所述页面应用的步骤包括:The method for controlling the response of an input event according to claim 2, wherein the step of the browser transmitting the input event to the page application comprises:
    在所述输入事件为多个页面应用的输入事件时,所述浏览器确定当前焦点所在的页面应用作为当前页面应用,所述浏览器将所述输入事件发送至所述当前页面应用;When the input event is an input event of a plurality of page applications, the browser determines that the page application where the current focus is located as the current page application, and the browser sends the input event to the current page application;
    在所述当前页面应用完成所述输入事件的响应操作后,所述浏览器将所述输入事件发送至下一个页面应用。After the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
  7. 如权利要求1所述的输入事件的响应控制方法,其特征在于,所述浏览器判断所述输入事件是否为页面应用处理的输入事件的步骤之前,还包括:The method for controlling the response of an input event according to claim 1, wherein before the step of determining whether the input event is an input event processed by the page application, the browser further comprises:
    所述浏览器接收页面应用发送来的页面键值信息,并将所述页面键值信息保存。The browser receives the page key value information sent by the page application, and saves the page key value information.
  8. 如权利要求1所述的输入事件的响应控制方法,其特征在于,所述浏览器将所述输入事件发送至所述页面应用的步骤包括:The method for controlling the response of an input event according to claim 1, wherein the step of the browser transmitting the input event to the page application comprises:
    在所述输入事件为多个页面应用的输入事件时,所述浏览器确定当前焦点所在的页面应用作为当前页面应用,所述浏览器将所述输入事件发送至所述当前页面应用;When the input event is an input event of a plurality of page applications, the browser determines that the page application where the current focus is located as the current page application, and the browser sends the input event to the current page application;
    在所述当前页面应用完成所述输入事件的响应操作后,所述浏览器将所述输入事件发送至下一个页面应用。After the current page application completes the response operation of the input event, the browser sends the input event to the next page application.
  9. 如权利要求1所述的输入事件的响应控制方法,其特征在于,所述输入事件的响应控制方法,还包括:The method for controlling the response of an input event according to claim 1, wherein the method for controlling the response of the input event further comprises:
    所述浏览器在获取到所述输入事件后,将浏览器底层的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时或者实时获取输入事件队列中的输入事件信息。After obtaining the input event, the browser converts the physical key value of the bottom layer of the browser into a logical key value, puts it into the input event queue, and waits for each application to obtain the input parameter corresponding to the input event that the user needs, the browser. The input event information in the input event queue is obtained periodically or in real time.
  10. 一种输入事件的响应控制装置,其特征在于,包括:A response control device for inputting an event, comprising:
    判断模块,用于在接收到基于浏览器的输入事件时,判断所述输入事件是否为页面应用处理的输入事件;a determining module, configured to determine, when receiving a browser-based input event, whether the input event is an input event processed by a page application;
    处理模块,用于在所述输入事件为页面应用处理的输入事件时,确定所述输入事件对应的页面应用;a processing module, configured to determine a page application corresponding to the input event when the input event is an input event processed by the page application;
    接发模块,用于将所述输入事件发送至所述页面应用,以供所述页面应用完成所述输入事件对应的响应操作。And a sending module, configured to send the input event to the page application, for the page application to complete a response operation corresponding to the input event.
  11. 如权利要求10所述的输入事件的响应控制装置,其特征在于,所述判断模块,还用于判断所述输入事件是否为按键输入事件;还用于在所述输入事件为按键输入事件时,判断所述输入事件是否为页面应用处理的输入事件。 The response control device for inputting an event according to claim 10, wherein the determining module is further configured to determine whether the input event is a key input event, and is further configured to: when the input event is a key input event And determining whether the input event is an input event processed by the page application.
  12. 如权利要求11所述的输入事件的响应控制装置,其特征在于,所述输入事件的响应控制装置还包括存储模块,The response control device for inputting an event according to claim 11, wherein said response control means for inputting an event further comprises a storage module,
    所述接发模块,还用于接收页面应用发送来的页面键值信息;The sending and receiving module is further configured to receive page key value information sent by the page application;
    所述存储模块,用于将所述页面键值信息保存。The storage module is configured to save the page key value information.
  13. 如权利要求12所述的输入事件的响应控制装置,其特征在于,所述判断模块包括获取单元和判断单元,The response control device for inputting an event according to claim 12, wherein said determining module comprises an obtaining unit and a determining unit,
    所述获取单元,用于获取所述输入事件的键值信息;The obtaining unit is configured to acquire key value information of the input event;
    所述判断单元,用于根据所确定的键值信息判断所述输入事件是否为页面应用处理的输入事件。The determining unit is configured to determine, according to the determined key value information, whether the input event is an input event processed by a page application.
  14. 如权利要求13所述的输入事件的响应控制装置,其特征在于,所述判断单元,还用于将所确定的键值信息与保存的键值信息比对,在所保存的键值信息与所确定的键值信息一致时,判断所述输入事件为页面应用处理的输入事件;在所保存的键值信息与所确定的键值信息不一致时,判断所述输入事件不为页面应用处理的输入事件。The response control device for inputting an event according to claim 13, wherein the determining unit is further configured to compare the determined key value information with the saved key value information, and the saved key value information and When the determined key value information is consistent, determining that the input event is an input event processed by the page application; and when the saved key value information is inconsistent with the determined key value information, determining that the input event is not processed by the page application Enter the event.
  15. 如权利要求12所述的输入事件的响应控制装置,其特征在于,所述接发模块,还用于接收页面应用发送来的页面键值信息;The response control device for inputting an event according to claim 12, wherein the sending and receiving module is further configured to receive page key value information sent by the page application;
    所述存储模块,用于将所述页面键值信息保存。The storage module is configured to save the page key value information.
  16. 如权利要求11所述的输入事件的响应控制装置,其特征在于,所述处理模块,还用于在所述输入事件为多个页面应用的输入事件时,确定当前焦点所在的页面应用作为当前页面应用;The response control device for inputting an event according to claim 11, wherein the processing module is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is present as the current Page application
    所述接发模块,还用于将所述输入事件发送至所述当前页面应用;还用于在所述当前页面应用完成所述输入事件的响应操作后,将所述输入事件发送至下一个页面应用。The sending and receiving module is further configured to send the input event to the current page application; and further configured to send the input event to the next one after the current page application completes the response operation of the input event Page application.
  17. 如权利要求10所述的输入事件的响应控制装置,其特征在于,所述处理模块,还用于在所述输入事件为多个页面应用的输入事件时,确定当前焦点所在的页面应用作为当前页面应用;The response control device of the input event according to claim 10, wherein the processing module is further configured to: when the input event is an input event of a plurality of page applications, determine a page application where the current focus is present as the current Page application
    所述接发模块,还用于将所述输入事件发送至所述当前页面应用;还用于在所述当前页面应用完成所述输入事件的响应操作后,将所述输入事件发送至下一个页面应用。The sending and receiving module is further configured to send the input event to the current page application; and further configured to send the input event to the next one after the current page application completes the response operation of the input event Page application.
  18. 如权利要求10所述的输入事件的响应控制装置,其特征在于,所述处理模块,还用于获取到所述输入事件后,将浏览器底层的物理键值转换为逻辑键值,放入输入事件队列中,等待各个应用获取自己需要的输入事件对应的输入参数,浏览器会定时或者实时获取输入事件队列中的输入事件信息。The response control device for inputting an event according to claim 10, wherein the processing module is further configured to: after obtaining the input event, convert the physical key value of the bottom layer of the browser into a logical key value, and put Enter the event queue, wait for each application to obtain the input parameters corresponding to the input events that you need, and the browser will obtain the input event information in the input event queue periodically or in real time.
PCT/CN2015/093145 2014-12-30 2015-10-29 Method and apparatus for controlling response to input event WO2016107263A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410849176.4 2014-12-30
CN201410849176.4A CN105812948B (en) 2014-12-30 2014-12-30 The response control mehtod and device of incoming event

Publications (1)

Publication Number Publication Date
WO2016107263A1 true WO2016107263A1 (en) 2016-07-07

Family

ID=56284160

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093145 WO2016107263A1 (en) 2014-12-30 2015-10-29 Method and apparatus for controlling response to input event

Country Status (2)

Country Link
CN (1) CN105812948B (en)
WO (1) WO2016107263A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073778A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and fault-tolerant method for key transmission
CN112312179A (en) * 2019-07-23 2021-02-02 青岛海信宽带多媒体技术有限公司 Key response method, equipment and play control terminal
CN114554290A (en) * 2020-11-27 2022-05-27 青岛海信宽带多媒体技术有限公司 IPTV browser fault tolerance processing method, device and terminal
CN114554290B (en) * 2020-11-27 2024-05-24 青岛海信宽带多媒体技术有限公司 IPTV browser fault tolerance processing method, device and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008288822A (en) * 2007-05-17 2008-11-27 Panasonic Corp Internet connection tv system
CN101668179A (en) * 2009-09-11 2010-03-10 深圳市同洲电子股份有限公司 Video on demand method based on bidirectional digital transmission network and set top box
CN101788997A (en) * 2009-12-31 2010-07-28 康佳集团股份有限公司 Website access method for network television browser
CN102541549A (en) * 2011-12-23 2012-07-04 深圳Tcl新技术有限公司 Method and device for integrating television application modules

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008288822A (en) * 2007-05-17 2008-11-27 Panasonic Corp Internet connection tv system
CN101668179A (en) * 2009-09-11 2010-03-10 深圳市同洲电子股份有限公司 Video on demand method based on bidirectional digital transmission network and set top box
CN101788997A (en) * 2009-12-31 2010-07-28 康佳集团股份有限公司 Website access method for network television browser
CN102541549A (en) * 2011-12-23 2012-07-04 深圳Tcl新技术有限公司 Method and device for integrating television application modules

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073778A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and fault-tolerant method for key transmission
CN112312179A (en) * 2019-07-23 2021-02-02 青岛海信宽带多媒体技术有限公司 Key response method, equipment and play control terminal
CN112312179B (en) * 2019-07-23 2024-03-01 青岛海信宽带多媒体技术有限公司 Key response method, equipment and play control terminal
CN114554290A (en) * 2020-11-27 2022-05-27 青岛海信宽带多媒体技术有限公司 IPTV browser fault tolerance processing method, device and terminal
CN114554290B (en) * 2020-11-27 2024-05-24 青岛海信宽带多媒体技术有限公司 IPTV browser fault tolerance processing method, device and terminal

Also Published As

Publication number Publication date
CN105812948B (en) 2019-04-02
CN105812948A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
WO2017028601A1 (en) Voice control method and device for intelligent terminal, and television system
WO2019119771A1 (en) Voice interaction method, device and computer readable storage medium
WO2018161604A1 (en) Playback control method and device for mobile terminal, storage medium and electronic device
WO2017041538A1 (en) Terminal user interface controlled display method and device
WO2019051902A1 (en) Terminal control method, air conditioner and computer-readable storage medium
WO2018018681A1 (en) Video programme previewing method and device
WO2016058258A1 (en) Terminal remote control method and system
WO2015144089A1 (en) Application recommending method and apparatus
WO2018161572A1 (en) Method and apparatus for controlling frame rate of mobile terminal, storage medium, and electronic device
WO2018126888A1 (en) Method and apparatus for configuring a shortcut for a television function
WO2013143341A1 (en) Method and device for updating application information of mobile terminal
WO2018023926A1 (en) Interaction method and system for television and mobile terminal
WO2017152603A1 (en) Display method and apparatus
WO2019051898A1 (en) Device control method and apparatus, and computer readable storage medium
WO2018076811A1 (en) Data sharing method, device, system, storage medium and electronic device
WO2015018185A1 (en) Method and device for realizing distributed remote control, and television terminal and mobile terminal thereof
WO2017016310A1 (en) Method and apparatus for dynamically configuring remote control function data
WO2017084305A1 (en) Terminal control method and system
WO2019051897A1 (en) Terminal operating parameter adjustment method and device, and computer readable storage medium
WO2016107263A1 (en) Method and apparatus for controlling response to input event
WO2016206223A1 (en) Screenshooting method and system
WO2019080401A1 (en) Method and apparatus for converting script statement, and computer-readable storage medium
WO2019051901A1 (en) Terminal control method and device, and computer readable storage medium
WO2017059686A1 (en) Desktop displaying method and device
WO2017032060A1 (en) Interface operation method and apparatus, and smart watch

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: 15874948

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 1205 DATED 08/11/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15874948

Country of ref document: EP

Kind code of ref document: A1