The interface of set-top box multimedia interface and the Dynamic Configuration of behavior and device
Technical field
The present invention relates to the Dynamic Configuration and the device of a kind of connection interface and behavior, relate in particular to the interface of a kind of set-top box multimedia interface (Multi-Media Interface, the below unified MMI that abbreviates as) and the Dynamic Configuration and the device of behavior.
Background technology
According to the requirement of digital-TV operator, set-top box interface and behavior often change, and different operators is also nearly all inequality to the requirement at interface.Existing set-top box MMI median surface logic and behavior logic mostly are built in the set-top box with C or the hard code of C++.Interface logic and behavior logic can not in time change as required, even require very little variation takes place, set-top box software can not adapt to.If change a lot, the work of MMI will be done basically again, and workload is very big.
Summary of the invention
The objective of the invention is to address the above problem, a kind of interface of set-top box multimedia interface and the Dynamic Configuration of behavior are provided, satisfy the demand that the Digital Television publisher constantly changes, the work at new interface is write in a large amount of minimizings.
Another object of the present invention is to provide a kind of interface of set-top box multimedia interface and the dynamic-configuration device of behavior, corresponding to above-mentioned method, satisfied the demand that the Digital Television publisher constantly changes, the work at new interface is write in a large amount of minimizings.
Technical scheme of the present invention is: the present invention has disclosed a kind of interface of set-top box multimedia interface and the Dynamic Configuration of behavior, comprising:
(1) after multimedia interface engine is received message, loads the XML file, in this XML file, find the information of the script function of this message of response that corresponding current page describes;
(2) this multimedia interface engine sends to script engine with the information of this script function and the parameter of this message;
(3) script function of the correspondence that defines in the information invoke script file of this script engine according to this script function is carried out;
(4) atomic operation that provides of this multimedia interface engine of this script engine invokes;
(5) this multimedia interface engine loads this XML file once more, finds the expression of the demonstration of the window of appointment in the script function of this XML file, according to the multimedia interface resource of this expression load store in resource file, finishes final demonstration.
The interface of above-mentioned set-top box multimedia interface and the Dynamic Configuration of behavior, wherein, this atomic operation is a function of finishing single digital television business or display unit.
The interface of above-mentioned set-top box multimedia interface and the Dynamic Configuration of behavior, wherein, step (1)~(5) are that circulation repeats.
The interface of above-mentioned set-top box multimedia interface and the Dynamic Configuration of behavior, wherein, this XML file, this script file and this resource file are sent by digital storage media control and command server.
The present invention has also disclosed a kind of interface of set-top box multimedia interface and the dynamic-configuration device of behavior, comprising:
Multimedia interface engine is carried out Message Processing, window management and control and is realized;
The XML file, the version information of display logic, the call relation between the script and the file at description interface;
Script engine and script file are described the realization of the behavior logic at interface;
Resource file, storage multimedia interface resource;
After wherein this multimedia interface engine is received message, load this XML file, in this XML file, find the information of the script function of this message of response that corresponding current page describes; This multimedia interface engine sends to this script engine with the information of this script function and the parameter of this message; This script engine calls the script function that defines in this script file according to the information of this script function and carries out; The atomic operation that this multimedia interface engine of this script engine invokes provides; This multimedia interface engine loads this XML file once more, finds the expression of the demonstration of the window of appointment in the script function of this XML file, according to the multimedia interface resource of this expression load store in resource file, finishes final demonstration.
The dynamic-configuration device of the interface of above-mentioned set-top box multimedia interface and behavior, wherein, the atomic operation that this multimedia interface engine provided is a function of finishing single digital television business or display unit.
The dynamic-configuration device of the interface of above-mentioned set-top box multimedia interface and behavior, wherein, this device also comprises digital storage media control and command server, is used to send this XML file, this script file and this resource file.
The present invention contrasts prior art following beneficial effect: the present invention passes through the executive mode of MMI engine in conjunction with XML and script, determined the interface of MMI to represent and other parts of interface logic and set-top box software have realized separating, rather than the interface represented and the interface logic hard coded, mix together closely.If digital-TV operator need be revised interface or behavior logic, needn't write hard code again as prior art brushes in the set-top box, and only need revise XML file or script (Script) file or resource file, again by digital storage media control and command server (Digital Storage Media Command and Control, hereinafter to be referred as the DSM-CC server) send to set-top box, set-top box just can be upgraded interface or behavior logic dynamically.
Description of drawings
Fig. 1 is the process flow diagram of preferred embodiment of the Dynamic Configuration of the interface of set-top box multimedia interface of the present invention and behavior.
Fig. 2 is the schematic diagram of preferred embodiment of the dynamic-configuration device of the interface of set-top box multimedia interface of the present invention and behavior.
Embodiment
The invention will be further described below in conjunction with drawings and Examples.
The embodiment of Dynamic Configuration
Fig. 1 shows the preferred embodiment of the Dynamic Configuration of the interface of set-top box multimedia interface of the present invention and behavior.See also Fig. 1, the step to the Dynamic Configuration of the interface of the set-top box multimedia interface of present embodiment and behavior is described in detail below.
Step S10:DSM-CC server sends to set-top box to upgrade interface and/or behavior logic dynamically with amended XML file or script file or resource file.
After step S11:MMI engine receives message, load the XML file, in the XML file, find the information of the script function of this message of response that corresponding current page describes.
Step S12:MMI engine sends to script engine with the information of script function and the parameter of message.
Step S13: the script function of the correspondence that defines in the information invoke script file of script engine according to script function is carried out.
Step S14: the atomic operation that script engine invokes MMI engine provides, atomic operation are the functions of finishing single digital television business or display unit.
Step S15:MMI engine loads the XML file once more, finds the expression of the demonstration of the window of appointment in the script function of XML file, according to the MMI resource of this expression load store in resource file, finishes final demonstration.
As long as there is operator need revise interface or behavior logic, based on this demand, these above-mentioned steps are that circulation repeats.
The embodiment of dynamic-configuration device
Fig. 2 shows the preferred embodiment of the dynamic-configuration device of the interface of set-top box multimedia interface of the present invention and behavior.See also Fig. 1, the principle to the dynamic-configuration device of the interface of the set-top box multimedia interface of present embodiment and behavior is described in detail below.
The device of present embodiment comprises multimedia interface engine (MMI Engine) 60, XML file (XML File) 61, script engine (Script Engine) 62, script file (Script File) 63, resource file (ResourcesFile) 64.
Multimedia interface engine 60 carries out Message Processing, window management and control is realized, and atomic operation, atomic operation are provided is the function of finishing single digital television business or display unit.XML file 61 is described the version information of display logic, the call relation between the script and the file at interface.And script engine 62 and script file 63 are described the realization of the behavior logic at interface.Resource file 64 storage multimedia interface resources.Device can also comprise DSM-CC server (not shown), is used to send XML file, script file and resource file.
The operation logic of device is as follows: after multimedia interface engine 60 is received message, load XML file 61, find information (the illustrated step 1) of the script function of this message of response that corresponding current page describes in XML file 61.Multimedia interface engine 60 sends to script engine 62 (illustrated step 2) with the information of script function and the parameter of message.Script engine 62 is carried out (illustrated step 3) according to the script function of definition in the information invoke script file 63 of script function.Script engine 62 calls atomic operation (the illustrated step 4) that multimedia interface engine 60 provides.Multimedia interface engine 60 loads XML file 61 once more, find the expression of the demonstration of the window of appointment in the script function of XML file 61, according to the multimedia interface resource of this expression load store in resource file 64, finish final demonstration (illustrated step 5).
An actual example of the present invention
Set-top box is received the volume plus-minus button of telepilot, and press key message sends to the MMI engine, below is the important process process of device, in order to make statement more clear, in the description process for the describing mode of pith service routine code.The MMI engine finds corresponding response script function DesktopPage_onVolUp in the XML file, the description fragment of XML file is as follows:
<desktop?x=″0″y=″0″w=″720″h=″576″>
<action?name=″onPplus″script=″DesktopPage_onPplus()″/>
<action?name=″onPminus″script=″DesktopPage_onPminus()″/>
<action?name=″onVolUp″script=″DesktopPage_onVolUp()″/>
<action?name=″onVolDown″script=″DesktopPage_onVolDown()″/>
/>
Then start script engine and come invoke script function DesktopPage_onVolUp ().
The function example of DesktopPage_onVolUp is as follows in script file:
function?DesktopPage_onVolUp()
local?IsMute=LuaGui.c_AV_IsMute()
if?IsMute==true?then
LuaGui.c_AV_ToggleMute()
LuaGui.c_RemovePage(’DesktopPage’,’MutePage’)
end
LuaGui.c_GUI_Volume_Up()
DisplayVolumePage()
End
In DesktopPage_onVolUp, called the atomic operation that defines in the MMI engine, finished the operation that actual volume increases such as c_GUI_Volume_Up ().Show the volume bar page such as calling DisplayVolume ().
The MMI engine shows the volume bar page according to the representation of the volume bar page that defines in the XML file.Volume bar page-describing fragment is as follows:
<pagename=″VolumePage″?id=″30″?style=″FF_NONE|AF_TRANSPARENT″surface=″true″?focus=″FALSE″?status=″PSF_ALWAYS_ON_TOP″rmstatus=″PSF_ACCEPTS_FOCUS″?x=″66″?y=″506″?w=″504″?h=″25″cur_ctrl_id=″2″?PciNormal=″TRANSPARENCY″?PciSelected=″0x016299″PciNtext=″0x0″PciStext=″0x0″>
<action?name=″onCtrlReshow″?script=″VolumePage_SetContent()″/>
<bar?name=″scroll1″?id=″1″?style=″FF_NONE″?x=″130″?y=″508″?w=″400″h=″21″?style2=″FF2_ROUND|FF2_HSCROLL″?min=″0″?max=″32″?cur=″11″PciNormal=″0xC5C7C6″PciSelected=″0x53C438″/>
</page>
The foregoing description provides to those of ordinary skills and realizes or use of the present invention; those of ordinary skills can be under the situation that does not break away from invention thought of the present invention; the foregoing description is made various modifications or variation; thereby protection scope of the present invention do not limit by the foregoing description, and should be the maximum magnitude that meets the inventive features that claims mention.