WO2015018299A1 - 用户界面实现方法及装置 - Google Patents

用户界面实现方法及装置 Download PDF

Info

Publication number
WO2015018299A1
WO2015018299A1 PCT/CN2014/083584 CN2014083584W WO2015018299A1 WO 2015018299 A1 WO2015018299 A1 WO 2015018299A1 CN 2014083584 W CN2014083584 W CN 2014083584W WO 2015018299 A1 WO2015018299 A1 WO 2015018299A1
Authority
WO
WIPO (PCT)
Prior art keywords
behavior
result
description information
information
user interface
Prior art date
Application number
PCT/CN2014/083584
Other languages
English (en)
French (fr)
Inventor
张震
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2015018299A1 publication Critical patent/WO2015018299A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the field of intelligent terminal interaction technologies, and in particular, to a user interface implementation method and apparatus.
  • BACKGROUND With the continuous popularization of smart terminal devices, users have more and more software requirements for smart terminal devices, but various softwares currently provided to users are different, and interfaces are different, and intelligent terminal users are among numerous application software, and finally The user interface (User Interface, UI: UI) will be selected and the application software with good experience will remain on the smart terminal for long-term use. Faced with the diverse needs of users, how to design and implement a UI that meets the needs of users becomes a huge challenge.
  • UI design is the overall design of human-computer interaction, operation logic and aesthetic interface of intelligent terminal software.
  • the UI is a window for human-computer interaction in a smart terminal operating system. It must be reasonably designed based on the physical characteristics of the intelligent terminal and the application characteristics of the software.
  • the existing UI design is based on the extensible markup language (extensible markup language, XML: XML) interface parsing rendering technology, the technology mainly uses XML as the carrier of the data structure, recording the location of the UI elements, layout and other attributes , so that it resolves at runtime to generate the required objects.
  • extensible markup language extensible markup language
  • XML extensible markup language
  • UI elements are defined in each XML element in its XML file, for example, to unlock the UI element (the element is a picture), the picture is defined. Position, rotation, transparency, scaling, etc.
  • the various animation effects applied to this image, as well as the operation properties of this image, such as the "unlocker" attribute, indicate that the unlocked UI element can be dragged linearly, and the drag action will cause unlocking. behavior.
  • the UI mode is relatively simple. It describes the attributes and logic of the UI element in units of a UI element. In this way, the description of the logic is insufficient, and it is difficult to support a game like this.
  • a user interface implementation method comprising: establishing an object-behavior-result model for an interface element on a user interface, wherein the object-behavior-result model includes an object, a behavior, and a result Descriptive information, the object refers to an interface element on the user interface; the behavior refers to an action performed on the object; the result refers to after performing the behavior on the object, a state of the user interface presentation; parsing the object-behavior-result model to obtain a correspondence between an object, a behavior, and a result; according to the description information of the object and the correspondence between the object, the behavior, and the result, Interface elements corresponding to the object are displayed on the user interface and interact with the user's interface.
  • a user interface implementing apparatus comprising: a model builder adapted to establish an object-behavior-result model for an interface element on a user interface, wherein the object-behavior-result model Descriptive information including objects, behaviors, and results, the objects refer to interface elements on the user interface; the behavior refers to actions performed on the objects; the result refers to performing the behavior on the objects a state in which the user interface is presented; a parser adapted to parse the object-behavior-result model to obtain a correspondence between an object, a behavior, and a result; an actuator adapted to describe information according to the object and Corresponding relationship between the object, the behavior and the result, the interface element corresponding to the object is displayed on the user interface, and the interface with the user is realized.
  • a program comprising readable code, when the readable code is run on a terminal device, causing the terminal device to perform according to any one of claims 1-9 The user interface implementation method described.
  • the attributes and logics of the UI elements are not defined in advance, but the information such as the attributes and logic of the plurality of UI elements are respectively divided into description information of objects, behaviors, and results, and then A correspondence between an object, a behavior, and a result is obtained by parsing the object-behavior-result model, and a plurality of UI elements are implemented on the user interface according to the correspondence.
  • the development of the application theme becomes a single one, which also makes the complex logical description become a single.
  • FIG. 1 is a flow chart showing a method of implementing a user interface according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram showing a process of establishing an IBA model according to an embodiment of the present invention
  • FIG. 3 is a view showing an embodiment of the present invention.
  • User interface implementation device block diagram
  • Figure 4 shows a block diagram of a server for performing the method according to the invention
  • Figure 5 shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • the user interface of each application of the smart terminal device contains a large number of UI elements, and if the attributes and logic are defined in units of each UI element according to the prior art, the above problem is bound to be more complicated. Therefore, the present invention provides a user interface implementation method and apparatus, in which an object (Item)-behavior-action (Action) model is established for a plurality of UI elements, and the following is called an IBA model.
  • an object (Item)-behavior-action (Action) model is established for a plurality of UI elements, and the following is called an IBA model.
  • the attributes and logics of the UI elements are not defined in advance, but the information such as the attributes and logic of the plurality of UI elements are divided into descriptions of the objects, behaviors, and results, respectively, and then the IBA is parsed.
  • the model obtains a correspondence between an object, a behavior, and a result, and implements a plurality of UI elements on the user interface according to the correspondence.
  • the lock screen application employed by the embodiment of the present invention is based on an operating system, such as a platform-based lock screen product including, but not limited to, an Android (Android) system.
  • an Android Android
  • the lock screen application provides lock screen capability, various shortcut functions of the terminal system, and server-side service capabilities to the external UI interaction, interface or configuration file, and the abstract becomes a unified lock screen development specification for third-party developers.
  • the lock screen application will form a platform for the lock screen product, and the theme published by the third party developer will be provided to the user through the channel of the server lock screen center.
  • FIG. 1 illustrates a flow diagram of a method 100 of implementing a user interface in accordance with one embodiment of the present invention.
  • the method 100 begins at step S101, where an IBA model is established for UI elements on the user interface.
  • the IBA model includes descriptions of objects, behaviors, and results.
  • the object refers to an interface element on the user interface.
  • the object may include: a picture control for displaying a static image or a dynamic image on the user interface, for A text control that exposes text content on the user interface, a region control that describes a rectangle, a group control that contains multiple controls, or a predefined object control.
  • Behavior refers to the action performed on the object.
  • the behavior can be the user's operation behavior, such as some action that the user can perform on the interface, such as clicking or dragging an object; the behavior can also be the system's own behavior. Such as trigger conditions for triggering events.
  • the result refers to the state that the user interface presents after performing the behavior on the object. The result indicates that the event will be triggered by the behavior, which may be the generation of a certain system behavior (such as unlocking, making a call, etc.), or may be the adjustment of the system's own parameters.
  • FIG. 2 shows a schematic diagram of a process 200 for establishing an IBA model according to an embodiment of the present invention.
  • the process 200 begins at step S201.
  • a new XML file is created in a preset directory to define a lock screen theme. For example, define in an XML file:
  • lock name field is filled in the subject name. All subsequent definitions are filled in the ⁇ lock> tag.
  • step S201 the process 200 proceeds to step S202, in which a layer tag is defined inside the topic tag.
  • a layer tag is defined inside the topic tag. For example, ⁇ lock>#sign internal definition:
  • the layer name field is filled in by the layer name. All subsequent objects in the same layer are defined inside the same layer label.
  • the layer name field of different layer labels is unique and cannot be reused.
  • step S203 in which an object is added inside the layer label, that is, the description information of the object is defined.
  • the description information of the object includes an object name and an object attribute, the object name is used to uniquely identify the object, and the object attribute is used to describe characteristic information of the interface element displayed according to the description information of the object.
  • the object attribute may include one or more of the following attributes: a position attribute, a size attribute, a rotation attribute, a zoom attribute, a visibility attribute, and a color attribute, and the like.
  • the object attribute may further include an animation attribute, and the animation attribute is used to describe an animation effect of the interface element displayed according to the description information of the object.
  • the corresponding object properties will vary depending on the type of object.
  • the theme generally includes a picture control, and the picture control is used to display a static or dynamic picture on the lock screen interface, and the image source can be set as a pre-configured picture in the theme package. It is also possible to customize the selection by the user.
  • the image used by the image control is "ship.png" and the starting center coordinates of the image are "#screen_w/8" , "#screen_h-80" , where #screen_w represents the screen width and #screen_h represents the screen height.
  • "keepy” is the unique identifier of the constraint
  • keepx means that the coordinates of the X axis are unchanged when moving
  • keepy means moving
  • target is the unique identifier of the zone control.
  • the starting center coordinates of the zone are "#screen_w*7/8" , "#screen_h-80” , and the height of the zone is 100 and the width is 100.
  • the predefined object controls are added inside the layer label as follows:
  • clock is the unique identifier of the predefined control
  • the predefined control consists of 11 images in the theme package
  • the start The center coordinates are "#screen_w*0.5” , "#screen_h*0.1” o According to these attributes, the above 11 images will be automatically side by side with the starting center coordinates as the center, without gaps and overlaps, forming a clock.
  • "date” is the unique identifier of the text control
  • the alignment of the text in the text control is center-aligned
  • the color value of the text is "#AAEEEEEE”
  • the text size is 16
  • the starting center coordinate of the text control is " #screen_w*0.5” , "#screen_h*0.1+60”.
  • the content attribute content indicates the text content to be displayed, supports a format string similar to C language, and indicates the parameter to be replaced in %.
  • the content attribute is a configurable string parameter "%s" whose actual parameters are defined in paras, starting with @date, which means that "%s" in content will be replaced with a string of date information.
  • the specific format is yyyy/MM/dd EE, for example, 2012/07/06 Tuesday.
  • the animation effect of the above two picture controls is realized by the position attribute.
  • the basey of the two picture controls are obtained according to the expression, wherein the value of "#time” represents the milliseconds taken from the lock screen to the current frame. Then; "#time%3000/3000” means a period change from 0 to 1 in a three second period. Combined with the trigonometric function, it is easy to create a wave effect.
  • the animation effect of the displayed UI element may also be described by an animation property included in the object property.
  • the animation belongs to '
  • These animations can also be defined as child elements of the control.
  • the playback mode of each animation can be divided into single play and loop play, controlled by its status value.
  • the status value is 0 to stop playback, the status value is 1 for single play, and the status value is 2 for loop play.
  • the animation consists of several key frames. For the key frame time points, the current attribute value is obtained according to the specific value of the animation attribute.
  • the corresponding attribute value V can be pushed out.
  • the attribute value also changes continuously, and can be seen on the interface.
  • the UI element is in: the corresponding animation (for example, the property value is rotate, you can see that the UI element is rotating).
  • step S203 the process 200 proceeds to step S204, in which a behavior is added inside the topic tag, that is, description information defining the behavior.
  • the behavior includes two types, one is the user's operation behavior, and the behavior corresponds to the action mode of the behavior; the other is the behavior of the system itself, and the behavior corresponds to the trigger mode of the behavior.
  • the user's operational behavior is the active behavior corresponding to the user's actions.
  • the description of the behavior includes behavioral receptors, action information, and result information.
  • the behavioral receptor has a corresponding relationship with the object name
  • the result information and the result name have a corresponding relationship
  • the action information is used to describe the action performed on the object.
  • the action information in the present invention supports the following actions:
  • Onclick The finger clicks on the object (immediately after pressing);
  • Doubleclick The finger clicks twice on the object for a certain period of time
  • Dragto Raises the finger after dragging the object into the target area, triggers when raising the hand.
  • the to attribute must be defined in the child node of the behavior.
  • the from attribute can be undefined. The default is the object that performs the action.
  • Dragin The object is dragged from the target area to the area.
  • the to attribute must be defined in the child node of the behavior.
  • the from attribute can be undefined. The default is the object that performs the action.
  • Dragout A finger drags an object from inside the target area to outside the area. Trigger when the object center is out of bounds, the from attribute must be defined in the child node of the behavior, the to attribute can be undefined, the default is the object that performs the action; slide: the finger is pressed in the start (from) area and swiped to the end (to) The area is raised. Both the start area and the end area must be defined in the child nodes of the behavior; Slidejeft: The finger slides to the left in the area corresponding to the behavior receptor and raises the hand, or slides out the area and raises the hand;
  • Slide_right The finger slides to the right in the area corresponding to the behavior receptor and raises the hand, or slides out the area and raises the hand;
  • Slide_up The finger slides up in the area corresponding to the behavior receptor and raises the hand, or slides out the area and raises the hand;
  • slide_down The finger slides down in the area corresponding to the behavior receptor and raises the hand, or slides out the area and raises the hand;
  • Moveout The object moves out of the target area, which can be removed with the animation, and is different from dragout;
  • scroll x, y object scroll (scroll) triggers when the action ends;
  • Slide_over The contact pressed by the finger is used as the starting point, and is triggered when the current position of the finger is connected to the starting point and the area corresponding to the behavior receptor is crossed;
  • On init Triggered when the screen is first locked. Generally, this action is used to perform parameter initialization.
  • the behavior receptor should be the layer name.
  • On refresh Called when the screen is refreshed. Generally, this action is used to perform continuous variable monitoring.
  • the behavior receptor should be the layer name.
  • the behavioral receptor corresponds to the object name
  • the result information corresponds to the result name of the subsequent description.
  • the behavior describes that the user drags the picture control "ship” into the area control "target", which will trigger the "unlock” action.
  • the behavior of the system itself is the passive behavior caused by the change of a parameter to the trigger condition.
  • the description information of the behavior includes the trigger condition and the result information.
  • the trigger condition is the trigger condition of the behavior, and the result information corresponds to the name of the subsequent description result. Examples are as follows:
  • the behavior includes a child element, but there are cases where the behavior includes multiple child elements, that is, multiple behavior_element.
  • multiple behavior_element When the trigger condition of the behavior is satisfied, multiple behavior_element will be triggered one by one, and will try to execute the action of each behavior-element. However, before executing the action, it is also necessary to determine whether the execution condition condition is satisfied. If it is satisfied, the corresponding action is continued; if not, the corresponding action is aborted and the next action_element action is continued. In addition, it can be stipulated that if the action of a behavior element is executed, the subsequent behavior_element will be discarded and will not be executed. In this case, if you want a behavior to execute multiple actions at the same time, you can define multiple action_element in the description language of the corresponding action.
  • a result is added inside the topic tag, that is, description information defining the result.
  • the description information of the result includes a result name, a result status, and a result type; wherein the result status is used to describe the status of the user interface presentation, and the result type is used to describe the system type corresponding to the user interface presentation status.
  • the result type supports three types: system call (standard), self-update (self), and custom call (intent).
  • system call refers to calling the predefined jump event in the lock screen center.
  • the custom call refers to calling the function interface that comes with the Android system.
  • the self-updating refers to adjusting the entire UI interface by adjusting the UI parameters (see the following description). control.
  • the result name contained in the description information of the result corresponds to the result information contained in the description information of the behavior, "unlock” is a standard action, so the type is defined as "standard”.
  • the description information of the global parameters may also be defined.
  • global parameters are parameters that can be called in the entire theme, which enables the theme application to present more complex and diverse functions at the logical level.
  • the description information of the global parameter includes a global parameter name, and correspondingly, the description information of the result related to the global parameter further includes the assignment of the global parameter name and the global parameter; the description information of the object related to the global parameter includes the object attribute and the global parameter Assignment is associated.
  • the assignment of global parameters is done in the results associated with them, while the object properties of objects related to global parameters are affected by the assignment of global parameters.
  • action hidephoto When the behavioral receptor "lock” is pressed (“down"), "action hidephoto” is triggered. By executing “action hidephoto”, the global parameter state is assigned a value of 1.
  • the properties of the object associated with the global parameters are affected by the assignment of global parameters, for example:
  • the function of triggering the picture control "pic_l” is invisible when the behavior receptor "lock” is pressed. Due to the support of the free adjustment of the global parameters, the logic execution capability of the solution of the embodiment of the present invention is further improved, and some more complicated UI logics, such as the theme of the game type, can be supported.
  • the IBA model is a unified abstract description of the user interface. It follows the object-behavior-results causal logic and is described in a manner similar to natural language. The advantage of this is that it is sufficiently scalable.
  • step S102 the IBA model is parsed to obtain a correspondence between objects, behaviors, and results.
  • the object, the behavior and the description information of the result contained in the IBA model For example, the behavioral receptor has a corresponding relationship with the object name, and the result information has a corresponding relationship with the result name.
  • the correspondence between objects, behaviors, and results is obtained. Specifically, the relationship between the behavior and the object is established according to the correspondence between the behavior receptor and the object name; and the correspondence between the behavior and the result is established according to the correspondence between the result information and the result name.
  • step S103 in which the UI element corresponding to the object is displayed on the user interface according to the description information of the object and the correspondence between the object, the behavior and the result, and the UI interaction with the user is realized.
  • the UI element corresponding to the object may be displayed on the user interface according to the description information of the object, and specifically, displayed on the user interface according to the feature information of the UI element described in the description information of each control added inside the layer label. These controls. Further, UI interaction is implemented according to the correspondence between objects, behaviors, and results obtained in step S102.
  • the "ship” control, the "target” control, the “clock” control, the “date” control, the “wavel” control, and the “wave2” control can be displayed on the user interface. If the user raises the finger after dragging the "ship” into the “target”, then the "unlock” is triggered, and the user interface is unlocked, that is, the slide unlock is realized.
  • Dynamic interactive emoticons of live chat tools / greeting cards User A can select the theme package provided by the system / the theme package of the greeting card to send the user B a past. After User B downloads the theme package, User B's client can parse the rendered content according to the IBA model. In this way, a dynamic, interactive, temporary interface can be displayed on User B's client screen. User B can not only see dynamic effects, but also interact with them by clicking, dragging, and sliding.
  • Item is the content of the greeting card to be displayed
  • Behavior is the operation of User B
  • Action is the result of the action, such as opening a gift package, displaying a greeting, starting an animation, or replying to the user A.
  • Lightweight replaceable themed embedded device interface Take the first screen of the wearable device (such as the first screen of a smart watch) as an example, the user's watch dial can be freely replaced with the theme package to display different styles. At the same time, lightweight interaction is possible. In this case, the behavior may be from a user touch operation, or may be a sensor from the system itself, such as a sensor caused by a user raising a hand or shaking.
  • the IBA-based solution is a cross-platform interface deployment method.
  • the same theme package can be applied to multiple screens for a unified interactive experience. For example: For the lock screen of the mobile phone, the standby screen of the TV set-top box, the watch screen and the computer screen saver, the user can select a set of theme packages online and deploy them to different devices through the cloud to display a unified style. Different devices only need to implement and deploy the corresponding parsing engine separately.
  • an IBA model is established for multiple UI elements on a user interface, where the IBA model includes description information of objects, behaviors, and results, and the IBA model is parsed to obtain a correspondence between objects, behaviors, and results.
  • the description information of the object and the correspondence between the object, the behavior and the result Display UI elements on the user interface and interact with the user's UI.
  • the present invention no longer pre-defines its attributes and logic in units of UI elements, but defines information such as attributes and logic of multiple UI elements into objects, behaviors, and results, respectively, and abstracts them in a natural language manner.
  • the content and behavior on the UI makes the development of application themes, and the description of complex logic becomes simple. Even developers who don't have a programming foundation, as long as the logic is clear and can describe their design in natural language, can use this model to design, no need to learn programming language from scratch, no need to consider memory and operating system such as Android system operating mechanism and other technical issues, You can focus on the UI design and implementation itself, which also greatly reduces the threshold for theme production.
  • the openness and extensibility of the IBA model can support more complex and interesting interface design and implementation. Objects, behaviors, and results can be evolved independently, so when developers need to implement functions beyond the current application capabilities, Independent of the main framework, continue to develop new features, which makes it easy to implement extensions.
  • FIG. 3 is a block diagram showing the structure of a user interface implementing apparatus according to an embodiment of the present invention.
  • the apparatus includes: a model builder 31, a parser 32, and an executor 33.
  • the model builder 31 may include: an object model construction unit 31 1. a result model construction unit 312 and a behavior model construction unit 313.
  • Model builder 31 is adapted to build an IBA model for interface elements on the user interface, wherein the IBA model includes description information for objects, behaviors, and results.
  • An object is an interface element on the user interface. Specifically, the object may include: a picture control for displaying a static image or a dynamic image on the user interface, a text control for displaying the text content on the user interface, a region control for describing the rectangle, and for containing the plurality of controls Group controls or predefined object controls.
  • Behavior refers to the action performed on an object.
  • the behavior can be the user's operational behavior, such as a user's action on the interface that can trigger an event, such as clicking or dragging an object; the behavior can also be the system's own behavior, such as the trigger condition that can trigger the event.
  • the result refers to the state that the user interface presents after performing the behavior on the object.
  • the result indicates that the behavior will trigger an event, which may be a system behavior (such as unlocking, making a call, etc.), or it may be an adjustment of the system's own parameters.
  • the object model construction unit 31 1 is adapted to construct descriptive information of the object.
  • the object model construction unit 31 1 adds an object inside the layer label, that is, defines description information of the object.
  • the description information of the object includes an object name and an object attribute; wherein the object name is used to uniquely identify the object, and the object attribute is used to describe feature information of the interface element displayed according to the description information of the object.
  • the object attribute includes one or more of the following attributes: a position attribute, a size attribute, a rotation attribute, a zoom attribute, a visibility attribute, and a color attribute.
  • the object attribute further includes an animation attribute, and the animation attribute is used to describe an animation effect of the interface element displayed according to the description information of the object.
  • the animation properties can be alpha 'gradient animation (alpha_animation), displacement animation (position-animation), scale animation (scale-animation), rotation animation (rotate animation), picture frame animation (frame_animation), skew animation (skew_animation) .
  • These ones Animation properties can also be defined as child elements of the control.
  • Each animation can be divided into single play and loop play, controlled by its status value. The status value is 0 to stop playback, the status value is 1 for single play, and the status value is 2 for loop playback.
  • the animation consists of several key frames. For the key frame time points, the current attribute value is obtained according to the specific value of the animation attribute. For the non-key frame time point, the difference value method can be used to determine the specific attribute value, for example, at the time point t.
  • the behavior model building unit 313 is adapted to construct descriptive information of the behavior.
  • the behavior model building unit 313 adds behavior inside the topic tag, that is, defines description information of the behavior.
  • the behavior includes two types, one is a user's operation behavior, and the behavior corresponds to the action mode of the behavior; the other is the behavior of the system itself, and the behavior corresponds to the trigger mode of the behavior.
  • the user's operational behavior is the active behavior corresponding to the user's actions.
  • the description information of the behavior includes behavioral receptors, action information, and result information.
  • the behavioral receptor has a corresponding relationship with the object name, and the result information and the result name (for the description of the result, which will be described later) have a corresponding relationship, and the action information is used to describe the action performed on the object.
  • the actions supported by the action information in the present invention are described in the description of the method embodiments.
  • the behavior of the system itself is the passive behavior caused by the change of a parameter reaching the trigger condition.
  • the description information of the behavior includes the trigger condition and the result information.
  • the trigger condition is the trigger condition of the behavior, and the result information corresponds to the name of the subsequent description result.
  • the description information of the behavior constructed by the behavior model construction unit 313 further includes an execution condition, which is an execution condition of the result.
  • the resulting model building unit 312 is adapted to construct descriptive information for the results.
  • the result model construction unit 312 adds a result inside the subject tag, that is, a description information defining the result.
  • the description information of the result includes a result name, a result status, and a result type; wherein the result status is used to describe the status of the user interface presentation, and the result type is used to describe the system type corresponding to the user interface presentation status.
  • the result type supports three types: system call (standard), self-update (self), and custom call (intent).
  • the system call refers to calling the predefined jump event in the lock screen center.
  • the custom call refers to calling the function interface that comes with the Android system.
  • the self-updating refers to adjusting the entire UI interface by adjusting the UI parameters (see the following description). control.
  • the model builder 31 may further include: a constraint construction unit 314 adapted to construct description information of the constraint.
  • the constraint builder 314 adds a constraint outside the layer tag, that is, defines the description information of the constraint.
  • the description information of the constraint includes a constraint name and a movement range information, and the movement range information is used to describe a movement range in which the interface element displayed according to the description information of the object is constrained.
  • the description information of the object constructed by the object model construction unit 31 1 further includes constraint information having a correspondence relationship with the constraint name, the object being restricted by the constraint, and moving according to the constrained movement range.
  • the model builder 31 further includes: a global parameter construction unit 315 adapted to construct description information of the global parameters.
  • the description information of the global parameter includes a global parameter name.
  • the description information of the result constructed by the result model construction unit 312 further includes the assignment of the global parameter name and the global parameter; the description information of the object constructed by the object model construction unit 311 includes the object attribute and the assignment of the global parameter.
  • the assignment of global parameters is done in the results associated with them, while the object properties of objects related to global parameters are affected by the assignment of global parameters.
  • the parser 32 is adapted to parse the IBA model to obtain a correspondence between objects, behaviors, and results. According to the above description, there is a great connection between the object, the behavior and the description information of the result contained in the IBA model. For example, the behavioral receptor has a corresponding relationship with the object name, and the result information has a corresponding relationship with the result name. Based on this connection, the correspondence between objects, behaviors, and results is obtained. Specifically, the parser 32 establishes a correspondence between the behavior and the object according to the correspondence between the behavior receptor and the object name; and establishes a correspondence between the behavior and the result according to the correspondence between the result information and the result name.
  • the actuator 33 is adapted to display an interface element corresponding to the object on the user interface according to the description information of the object and the correspondence between the object, the behavior and the result, and implement an interface interaction with the user.
  • the executor 33 can display the UI element corresponding to the object on the user interface according to the description information of the object, specifically, according to the feature information of the UI element described in the description information of each object constructed by the object model construction unit 311. These controls are displayed on the user interface.
  • the executor 33 implements UI interaction based on the correspondence between objects, behaviors, and results obtained by the parser 32.
  • an IBA model is established for a plurality of UI elements on a user interface, the IBA model includes description information of objects, behaviors, and results, and the IBA model is parsed to obtain a correspondence between objects, behaviors, and results.
  • the UI element is displayed on the user interface, and the UI interaction with the user is implemented.
  • the present invention no longer pre-defines its attributes and logic in units of UI elements, but defines information such as attributes and logic of multiple UI elements into objects, behaviors, and results, respectively, and abstracts them in a natural language manner.
  • IBA model can support more complex and interesting interface design and implementation. Objects, behaviors and results can be evolved independently, so when developers need to implement functions beyond the current application capabilities, Independent of the main framework, continue to develop new features, which makes it easy to implement extensions.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in the specification (including the accompanying claims, the abstract and the drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the user interface implementation device in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a program and program product) for performing some or all of the methods described herein.
  • a program implementing the present invention may be stored on a readable medium or may have the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • FIG. 4 illustrates a terminal device that can implement a user interface implementation method in accordance with the present invention.
  • the terminal device conventionally includes a processor 410 and a program product or readable medium in the form of a memory 420.
  • Memory 420 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM or ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 420 in the terminal device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 43 ⁇ , ie code that can be read by a processor, such as 410, which, when executed by the terminal device, causes the terminal device to perform various steps in the methods described above .
  • a processor such as 410
  • the term “one embodiment”, “an embodiment” or “one or more embodiments” is used herein to mean that a particular feature, structure or characteristic described in connection with the embodiments is included in at least one embodiment of the invention.
  • the phrase “in one embodiment” herein does not necessarily refer to the same embodiment.
  • the word "a” or "an” preceding a component does not exclude the presence of a plurality of such elements.
  • the invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed terminal device. In the unit claims enumerating several means, several of these means can be embodied by the same item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种用户界面实现方法及装置。其中方法包括:为用户界面上的界面元素建立物体-行为-结果模型,其中,所述物体-行为-结果模型包括物体、行为和结果的描述信息,所述物体是指所述用户界面上的界面元素;所述行为是指对所述物体进行的动作;所述结果是指对所述物体执行所述行为之后,所述用户界面呈现的状态;解析所述物体-行为-结果模型以得到物体、行为和结果之间的对应关系;根据所述物体的描述信息以及物体、行为和结果之间的对应关系,将与所述物体对应的界面元素显示在用户界面上,并实现与用户的界面交互。基于该物体-行为-结果模型使得开发应用主题变得简单,也使得复杂的逻辑描述变得简单。

Description

用户界面实现方法及装置 技术领域
本发明涉及智能终端交互技术领域, 具体涉及一种用户界面实现方法及装置。 背景技术 随着智能终端设备的不断普及, 用户对智能终端设备的软件需求越来越多, 但 目前提供给用户的各种软件良莠不齐, 界面各异, 智能终端用户在众多的应用软件 中, 最终会选择用户界面 (User Interface, 筒称: UI )视觉效果良好, 且具有良好的 体验的应用软件留在自己的智能终端上长期使用。 面对用户的多样化需求, 如何设 计和实现能够满足用户需求的 UI成为一个巨大的挑战。
UI设计是智能终端软件的人机交互、 操作逻辑、 美观界面的整体设计。 UI是智 能终端操作系统中人机交互的窗口, 它必须基于智能终端的物理特性和软件的应用 特性进行合理的设计。 目前, 已有的 UI 设计基于的是可扩展标记语言 (extensible Markup Language, 筒称: XML ) 的界面解析渲染技术, 该技术主要利用 XML作为 数据结构的载体, 记录 UI元素的位置、 布局等属性, 以便在运行时解析以生成所需 要的对象。 以小米手机的锁屏引擎为例, 在其 XML文件中以每个 UI元素为单位定 义 UI元素的各种属性和逻辑, 例如对于解锁 UI元素 (该元素为一个图片 ) , 定义 了这个图片的位置、 旋转、 透明度、 缩放比例等属性, 这个图片所适用的各种动画 效果, 以及这个图片的操作属性, 如 "unlocker" 属性, 表示该解锁 UI元素可以直 线拖拽,拖拽动作会引发解锁行为。在这类 UI设计和界面实现中, UI模式比较单一, 都是以一个 UI元素为单位, 描述该 UI元素的属性和逻辑, 采用这样的方式对逻辑 的描述不足, 难以支持类似于游戏这样的复杂逻辑; 而且这种 UI设计和界面实现的 扩展性不足, 它仅支持直线拖拽的解锁行为, 如更改解锁模式需要开发单独的逻辑, 有可能已经超出了其最初的设计和实现框架。 发明内容 鉴于上述问题, 提出了本发明以便提供一种克服上述问题或者至少部分地解决 上述问题的用户界面实现方法和相应的用户界面实现装置。 根据本发明的一个方面, 提供了一种用户界面实现方法, 包括: 为用户界面上的界面元素建立物体 -行为 -结果模型, 其中, 所述物体 -行为 -结果 模型包括物体、 行为和结果的描述信息, 所述物体是指所述用户界面上的界面元素; 所述行为是指对所述物体进行的动作; 所述结果是指对所述物体执行所述行为之后, 所述用户界面呈现的状态; 解析所述物体-行为-结果模型以得到物体、 行为和结果之间的对应关系; 根据所述物体的描述信息以及物体、 行为和结果之间的对应关系, 将与所述物 体对应的界面元素显示在用户界面上, 并实现与用户的界面交互。 根据本发明的另一方面, 提供了一种用户界面实现装置, 包括: 模型构建器, 适于为用户界面上的界面元素建立物体 -行为 -结果模型, 其中, 所 述物体-行为-结果模型包括物体、 行为和结果的描述信息, 所述物体是指所述用户界 面上的界面元素; 所述行为是指对所述物体进行的动作; 所述结果是指对所述物体 执行所述行为之后, 所述用户界面呈现的状态; 解析器, 适于解析所述物体-行为-结果模型以得到物体、 行为和结果之间的对应 关系; 执行器, 适于根据所述物体的描述信息以及物体、 行为和结果之间的对应关系, 将与所述物体对应的界面元素显示在用户界面上, 并实现与用户的界面交互。
依据本发明的再一方面, 提供了一种程序, 其包括可读代码, 当所述可读代码 在终端设备上运行时,导致所述终端设备执行根据权利要求 1-9中的任一个所述的用 户界面实现方法。
依据本发明的再一方面, 提供了一种可读介质, 其中存储了如权利要求 19所述 的程序。 在本发明提供的方案中, 不再以 UI元素为单位预先定义其属性和逻辑, 而是将 多个 UI元素的属性和逻辑等信息分为物体、 行为和结果的描述信息分别来定义, 然 后通过解析物体-行为-结果模型得到物体、 行为和结果之间的对应关系, 根据该对应 关系在用户界面上实现多个 UI元素。 基于该物体-行为-结果模型使得开发应用主题 变得筒单, 也使得复杂的逻辑描述变得筒单。 物体-行为-结果模型的开放性和扩展性 可以支持更多复杂、 有趣的界面设计和界面实现, 无论是物体、 行为和结果都可以 独立地进行演进, 因此当开发者需要实现当前应用能力以外的功能时, 可以独立于 主框架继续开发新增加的功能, 从而很方便的实现扩展。 上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明的技术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上述和其它目的、 特征和优 点能够更明显易懂, 以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对于本领域普 通技术人员将变得清楚明了。 附图仅用于示出优选实施方式的目的, 而并不认为是 对本发明的限制。 而且在整个附图中, 用相同的参考符号表示相同的部件。 在附图 中:
图 1示出了根据本发明一个实施例的用户界面实现方法的流程图; 图 2示出了根据本发明一个实施例的建立 IBA模型的过程示意图; 图 3示出了根据本发明一个实施例的用户界面实现装置的结构框图;
图 4示出了用于执行根据本发明的方法的服务器的框图; 以及
图 5示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。 具体实施例
下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中显示了本公 开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不应被这里阐述 的实施例所限制。 相反, 提供这些实施例是为了能够更透彻地理解本公开, 并且能 够将本公开的范围完整的传达给本领域的技术人员。
通常来说, 智能终端设备的每一个应用的用户界面都包含很多个 UI元素, 如果 按照现有技术以每个 UI元素为单位定义其属性和逻辑, 势必会使上述问题更加复杂 化。 因此, 本发明提供了一种用户界面实现方法及装置, 在该方法及装置中, 为多 个 UI元素建立物体 (Item ) -行为 (Behavior ) -结果 (Action )模型, 以下筒称 IBA 模型。 在本发明中, 不再以 UI 元素为单位预先定义其属性和逻辑, 而是将多个 UI 元素的属性和逻辑等信息分为物体、 行为和结果的描述信息分别来定义, 然后通过 解析 IBA模型得到物体、 行为和结果之间的对应关系, 根据该对应关系在用户界面 上实现多个 UI元素。
在本发明以下实施例中, 将以锁屏应用为例介绍本发明的技术方案。 本发明实 施例所采用的锁屏应用是基于某一操作系统, 如, 包括但不限于安卓 ( Android ) 系 统的平台性质锁屏产品。 通过该锁屏应用用户可以根据个人偏好随意下载服务器端 提供的各式各样的锁屏主题样式, 在智能终端自由进行锁屏主题切换。 该锁屏应用 将锁屏能力、 终端系统的各种快捷功能以及服务器端业务能力以统一 UI交互、 接口 或配置文件等方式对外提供, 抽象成为统一的锁屏开发规范提供给第三方开发者。 该锁屏应用将形成一个锁屏产品的平台, 让第三方开发者发布的主题通过服务器端 锁屏中心的渠道提供给用户。
图 1 示出了根据本发明一个实施例的用户界面实现方法 100的流程图。 如图 1 所示, 方法 100始于步骤 S101 , 其中为用户界面上的 UI元素建立 IBA模型。 IBA 模型包括物体、 行为和结果的描述信息。 其中, 物体是指用户界面上的界面元素, 具体地, 物体可以包括: 用于在用户界面上展现静态图或动态图的图片控件、 用于 在用户界面上展现文本内容的文字控件、 用于描述矩形的区域控件、 用于包含多个 控件的组控件或预定义物体控件。 行为是指对物体进行的动作, 行为可以是用户的 操作行为, 如用户在界面上进行的某种可触发事件的动作, 例如点击或拖拽某个物 体; 行为也可以是系统的自身行为, 如可触发事件的触发条件。 结果是指对物体执 行行为之后, 用户界面呈现的状态, 结果表示行为将会触发的事件, 可能是产生某 个系统行为 (如解锁、 打电话等) , 也可能是系统自身参数的调整。
以锁屏应用为例, 本发明将用户界面抽象为物体、 行为和结果, 以近自然的语 言描述 UI,这里采用的是 XML语言。 图 2示出了根据本发明一个实施例的建立 IBA 模型的过程 200示意图, 如图 2所示, 该过程 200始于步骤 S201 , 首先, 在预设目 录下新建 XML文件, 定义锁屏主题。 例如, 在 XML文件中定义:
<lock name="onepiece" >
</lock>
其中, lock name字段填写的是主题名称。后续所有定义的内容都会填写在 <lock> 标签内。
在步骤 S201之后, 过程 200进入步骤 S202 , 其中在主题标签内部定义图层标 签。 例如, <lock>#签内部定义:
<layer name="mainlayer" >
</layer>
其中, layer name字段填写的是图层名称。后续所有位于同一图层的物体都要在 同一图层标签内部定义。 不同图层标签的 layer name字段是唯一的, 不能重复使用。
在步骤 S202之后, 过程 200进入步骤 S203 , 其中在图层标签内部添加物体, 即定义物体的描述信息。 物体的描述信息包括物体名称和物体属性, 物体名称用于 唯一标识该物体, 物体属性用于描述根据物体的描述信息所显示的界面元素的特征 信息。 可选地, 物体属性可以包括以下属性中的一项或多项: 位置属性、 大小属性、 旋转属性、 缩放属性、 可见度属性以及颜色属性等等。 可选地, 物体属性还可以包 括动画属性, 动画属性用于描述根据物体的描述信息所显示的界面元素的动画效果。 根据物体类型的不同, 其对应的物体属性也会有所不同。
以最筒单的滑动解锁为例, 该主题一般包括一个图片控件, 图片控件用于在锁 屏界面上展示静态或动态的图片, 图片来源可以被设置为预先配置好的主题包中的 图片, 也可以由用户自定义选择。
举例来说, 在图层标签内部添加子节点图片控件如下:
<image name="ship" res="ship.png" basey="#screen_h-80" basex="#screen_w/8" restraint="keepy"/>
上述图片控件的描述信息包括物体名称 name= "ship"和物体属性, 物体属性包 括 : 图 片 来 源 属 性 res="ship.png" 和 位 置 属 性 basey="#screen_h-80" basex="#screen_w/8" 0 其中, "ship" 是图片控件的唯一标识符, 该图片控件使用的 图片是" ship.png" , 图片的起始中心坐标为 "#screen_w/8" , "#screen_h-80" , 其中 #screen_w表示屏幕宽度, #screen_h表示屏幕高度。
为了让上述图片只能横向运动, 即实现横向滑动解锁, 还需在图层标签外部添 加约束器, 即定义约束器的描述信息。 例如, 添加约束器如下:
<restraint name="keepy">
<restraint_element type="shortcut" shortcut="keepy"/>
</restraint>
上述约束器的描述信息包括约束器名称 name="keepy"和移动范围信息 type="shortcut" shortcut="keepy"。 其中, "keepy"是该约束器的唯一标识符, type="shortcut"表示约束器的类型为 shortcut, 当约束器的类型为 shortcut时, keepx 表示移动时 X轴的坐标不变, keepy表示移动时 y轴的坐标保持不变。 因此上述约束 器的移动范围信息具体为保持 y轴的坐标不变。 对应地, 图片控件的描述信息还包 括约束器信息 restraint="keepy" , "keepy"与上述添加的约束器的名称是相对应的, 表 示图片控件受到上述约束器的限制, 移动时需保持 y轴的坐标不变, 即在水平方向 上移动。
另外, 为了定义解锁的目标区域, 还需在图层标签内部添加子节点区域控件如 下:
<region name="target" basey="#screen_h-80" basex="#screen_w*7/8" h=" 100" w=" 100"/>
上述区域控件的描述信息包括物体名称 name="target"以及位置属性 basey="#screen_h-80" basex="#screen_w*7/8"、 大小属性 h=" 100" w=" 100"。 其中, "target"是区域控件的唯一标识符, 区域的起始中心坐标为 "#screen_w*7/8" , "#screen_h-80" , 区域的高为 100 , 宽为 100。
由于绝大部分用户点亮手机查看锁屏界面的主要目的是查看时间, 那么显示一 个漂亮的时钟和当前的日期能够大大方便用户的使用。 为了显示时钟, 可以利用预 定义物体控件来实现。 预定义物体控件集成了一些特殊功能的组件, 实际上是一个 组, 但不需要分别定义子节点。 以时钟组件为例, 在预先配置好的主题包内提供有 clock_0.png~clock9.png 以及冒号 clock_dot.png 共 1 1 张图片, 预定义的时钟组件 class="clock"由这些图片组成, 在图层标签内部添加预定义物体控件如下:
<superitem name="clock" basey="#screen_h*0.1 " basex="#screen_w*0.5" class="clock"/>
上述预定义物体控件的描述信息包括物体名称 name="clock"和位置属性 basey="#screen_h*0.1 " basex="#screen_w*0.5"、类型属性 class="clock"。其中, "clock" 是该预定义控件的唯一标识符, 该预定义控件由主题包内的 1 1张图片组成, 其起始 中心坐标为" #screen_w*0.5" , "#screen_h*0.1" o 依据这些属性, 上述 11 张图片将会 以起始中心坐标为中心自动并排排版, 中间无间隔、 无重叠, 形成时钟。
为了显示日期, 可以利用文字控件来实现。 例如, 在图层标签内部添加文字控 件如下:
<text name="date" align="center" color="#AAEEEEEE" basey="#screen_h*0.1+60" basex="#screen_w*0.5" paras="@date_yyyy/MM/dd EE" content="%s" size=" 16"/>
上述文字控件的描述信息包括文字名称 name="date"和物体属性,该物体属性包 括: 对齐属性 align="center"、 颜 色属性 color="#AAEEEEEE"、 位置属性 basey="#screen_h*0.1+60" basex="#screen_w*0.5" 、 参 数 属 性 paras="@date_yyyy/MM/dd EE"、 内容属性 content="%s"、 文字大小属性 size=" 16"。 其中, "date"是该文字控件的唯一标识符, 该文字控件中文本的对齐方式为以中心对 齐, 文字的颜色值为" #AAEEEEEE" , 文字大小为 16 , 文字控件起始中心坐标为 "#screen_w*0.5" , "#screen_h*0.1+60"。 内容属性 content表示需要显示的文字内容, 支持类似于 C 语言的格式化字符串, 用%表示需要替换的参数。 在该例子中, 内容 属性是可配置的字符串参数"%s" , 它的实际参数定义在 paras内, @date开头, 这 表示 content内的"%s "将被替换为一串日期信息, 具体格式为 yyyy/MM/dd EE, 例如 2012/07/06 周二。
为了能够使锁屏界面更富有生气, 还可以添加一些具有动画效果的图片控件。 例如, 为上述图片控件 "ship"添加背景海浪(由另一图片控件 "wave Γ来实现)和前景海 浪(由另一图片控件 "wave2"来实现), 让图片控件" ship"显示在两层海浪之间。 而海浪 不应该是固定的, 它们可以上下波动。 海浪依然需要定义在图层标签内部, 由于先 定义的控件将被置于底层, 而后定义的控件将被置于顶层, 因此将 wavel 的描述信 息放在 "ship"的描述信息之前, 将 wave2 的描述信息放在" ship"的描述信息之后。 在 图层标签内部添加两个图片控件" wavel"和" wave2":
<image name="wavel" res="wavel .png" basey="#screen_h-50+6Hs$sin(6.28Hs(#time%3000/3000))" basex="#screen_w/2"/>
<image name="wave2" res="wave2.png" basey="#screen_h-30+6*$sin(-6.28*(#time%3000/3000))" basex="#screen_w/2"/>
上述两个图片控件的动画效果是通过位置属性来实现的, 这两个图片控件的 basey都是根据表达式得到的, 其中 "#time"的值表示从锁屏启动到当前帧所花费的毫 秒数; 那么" #time%3000/3000"则表示一个以三秒为周期, 从 0到 1 的周期变化。 结 合三角函数, 可以很方便地制造出波动效果。
可选地,也可以通过物体属性所包含的动画属性来描述所显示 UI元素的动画效 果 。 该动 画 属 ' |·生可以 为 alpha -渐 变动 画 (alpha—animation) , 位移 动 画 (position—animation) , 缩放动画 (scale_animation) , 旋转动画 (rotate_animation) , 图片 巾贞动画 (frame animation) , 斜切动画 (skew_animation)0 这些动画属' f生也可以作为控件 的子元素来定义。 每种动画的播放方式都可以分为单次播放和循环播放, 由其状态 值来控制, 状态值为 0表示停止播放, 状态值为 1表示单次播放, 状态值为 2表示 循环播放。 动画由若干关键帧组成, 对于关键帧时间点, 按照动画属性的具体取值 获得当前的属性值; 对于非关键帧时间点, 可以使用差值的方法确定具体的属性值, 例如在时间点 t ( t0<t<tl , 其中 t0和 tl是两个相邻的关键帧时间点 ) , 其属性值为 v=(t-t0)*(vl -v0)/(tl-t0)+v0 ,其中 νθ是时间点 t0的属性值, vl是时间点 tl的属性值。 这样, 当动画线程运行时,根据线程运行的任意时间 t, 可以推出对应的属性值 V, 随 着线程的运行 (t 不断增加, 单位毫秒) , 属性值也不断变化, 在界面上即可看到 UI元素在 :相应的动画 (例如属性值是 rotate, 即可看到 UI元素在旋转) 。
通过添加上述多个物体, 在解析之后可以在用户界面上显示一张漂亮的壁纸, 但仅显示壁纸是不够的, 还要实现为用户提供进一步的 UI交互功能。 因此, 在步骤 S203之后, 过程 200进入步骤 S204 , 其中在主题标签内部添加行为, 即定义行为的 描述信息。 在本发明中, 行为包括两种, 一种是用户的操作行为, 这种行为对应于 行为的动作模式; 另一种是系统自身的行为, 这种行为对应于行为的触发模式。
用户的操作行为是用户的动作所对应的主动行为, 这种行为的描述信息包括行 为受体、 动作信息以及结果信息。 其中, 行为受体与物体名称具有对应关系, 结果 信息与结果名称 (为结果的描述信息, 将在后续描述) 具有对应关系, 动作信息用 于描述对物体所进行的动作。 本发明中动作信息支持以下动作:
down: 手指在物体上按下;
move: 物体被移动;
up: 手指抬起离开物体;
onclick: 手指在物体上点击 (按下后立即抬起) ;
longclick: 手指在物体上的固定位置停留超过一段时间;
doubleclick: 在一定时间内手指在物体上连续点击两次;
dragto: 手指拖拽物体到目标区域内后抬起手指, 抬手时触发, 在行为的子节点 中必须定义 to属性, from属性可以不定义, 默认是执行该动作的物体;
dragin: 手指拖拽物体从目标区域外到区域内, 物体中心越界时触发, 在行为的 子节点中必须定义 to属性, from属性可以不定义, 默认是执行该动作的物体;
dragout: 手指拖拽物体从目标区域内到区域外。 物体中心越界时触发, 在行为 的子节点中必须定义 from属性, to属性可以不定义, 默认是执行该动作的物体; slide: 手指在开始 (from ) 区域内按下并滑动到结束( to ) 区域抬起。 开始区域 和结束区域都必须在行为的子节点中定义; slidejeft: 手指在行为受体对应的区域内向左滑动后抬手, 或者滑出区域后抬 手;
slide_right: 手指在行为受体对应的区域内向右滑动后抬手, 或者滑出区域后抬 手;
slide_up:手指在行为受体对应的区域内向上滑动后抬手,或者滑出区域后抬手; slide_down: 手指在行为受体对应的区域内向下滑动后抬手, 或者滑出区域后抬 手;
movein: 物体移入目标区域, 可以是随动画移入, 与 dragin有区别;
moveout: 物体移出目标区域, 可以是随动画移出, 与 dragout有区别; scroll x、 y: 物体滚动 (scroll ) 动作结束时触发;
slide_over: 手指按下的触点作为起点, 当手指当前位置与起点连线越过行为受 体对应的区域时触发;
on init: 屏幕第一次锁上时触发, 一般利用此动作执行参数初始化操作, 行为 受体应为图层名称;
on refresh: 屏幕刷新时调用, 一般利用此动作执行持续的变量监听, 行为受体 应为图层名称。
继续以滑动解锁为例, 在添加了上述物体之后, 在图层标签外部添加行为如下: <behavior name="drag_to_unlock" verb="dragto" object="ship">
<behavior_element action="unlock" to="target"/>
</behavior>
上述行为的描述信息包括行为名称 name="drag_to_unlock" , 动作信息 verb="dragto" , 行为受体 object="ship" , 还包括在行为的子节点 behavior—element中 定义的结果信息 action="unlock"。 另外, 在行为的子节点中还定义了 to 属性 to="target"。 行为受体与物体名称相对应, 结果信息与后续描述的结果名称相对应, 该行为所描述的是用户将图片控件" ship"拖动到区域控件" target"中, 将触发 "unlock" 动作。
系统自身的行为是由于某参数变化达到了触发条件而产生的被动行为, 这种行 为的描述信息包括触发条件和结果信息。 其中, 触发条件是行为的触发条件, 结果 信息与后续描述结果名称相对应。 举例如下:
<behavior name="behavior_name" trigger="expression">
<behavior_element condition="expression" action="action_name" />
</behavior>
其中, 上述行为的描述信息包括行为名称 name="behavior_name" , 触发条件 trigger="expression"和结果信息 action="action_name" , 除此之夕卜, 该行为的描述信息 还包括执行条件 condition=" expression' 其中 trigger 可以理解为一个触发器, 它用 于被动地监听" expression"参数变化事件, 例如, 当" expression"由 0变成 1时, trigger 监听到这个变化, 该行为的触发条件得到满足, 行为就被触发执行。 condition是结 果的执行条件, 如果执行条件得到满足, 对应的结果" action_name"就被触发执行。
在上述示例中, 行为包括一个子元素, 但还存在行为包括多个子元素的情况, 即包含多个 behavior_element。 当行为的触发条件得到满足时, 多个 behavior_element 将被逐个触发执行, 会尝试执行每个 behavior—element的 action。 但在执行 action之 前,还需要判断执行条件 condition是否得到满足,如满足,则继续执行对应的 action; 如不满足,则放弃执行对应的 action,继续尝试执行下一个 behavior_element的 action。 另夕卜, 还可以规定, 如果一个 behavior element 的 action 被执行, 那么后续的 behavior_element将被丟弃, 不再执行。 在这种情况下, 如果希望一个 behavior同时 执行多个 action, 可以在对应的 action的描述语言中定义多个 action_element。
在添加了行为之后, 过程 200进入步骤 S205 , 其中在主题标签内部添加结果, 即定义结果的描述信息。 结果的描述信息包括结果名称、 结果状态和结果类型; 其 中, 结果状态用于描述用户界面呈现的状态, 结果类型用于描述用户界面呈现状态 对应的系统类型。 在本发明中, 结果类型支持三种: 系统调用 (standard ) 、 自更新 ( self )和自定义调用 (intent ) 。 系统调用是指调用锁屏中心预定义的跳转事件, 自 定义调用是指调用安卓系统自带的功能界面, 自更新是指通过调整 UI参数(参见后 续的描述) 来对整个 UI界面进行调整控制。
以上述滑动解锁为例, 在添加了上述物体和行为之后, 在图层标签外部添加结 果如下:
<action name="unlock">
<action_element intent="unlock" type="standard"/>
</action>
上述结果的描述信息包括结果名称 name="unlock" , 结果状态 intent="unlock"以 及结果类型 type=" standard"。结果的描述信息中所包含的结果名称对应于行为的描述 信息中所包含的结果信息, "unlock"是一个标准动作, 所以定义其类型为" standard"。 进一步地, 在建立 IBA模型的过程中, 除了定义上述物体、 行为和结果的描述 信息, 还可以定义全局参数的描述信息。 顾名思义, 全局参数是整个主题中都可调 用的参数, 其能使主题应用在逻辑层面呈现更加复杂多样的功能。 全局参数的描述 信息包括全局参数名称, 对应地, 与全局参数有关的结果的描述信息还包括全局参 数名称及全局参数的赋值; 与全局参数有关的物体的描述信息所包括物体属性与全 局参数的赋值相关联。 全局参数的赋值是在与其有关的结果中完成的, 而与全局参 数有关的物体的物体属性则受到全局参数的赋值的影响。 举例如下, 在主题标签内 部定义如下全局参数: <parameter name="state" type="int" value="0" min="0" max=" 1 "></parameter> 上述全局参数的描述信息包括全局参数名称 name="state" ,还包括全局参数类型 type="int" , 全局参数的当前值 value="0" , 全局参数的最小值 min="0" , 最大值 max=" l"。
该全局参数的赋值是在某个与之有关的结果中完成的, 例如:
<behavior name="hidephoto" object="lock" verb="down">
<behavior_element action="action_hidephoto"></behavior_element>
</behavior>
<action name="action_hidephoto">
<action_element type="self intent=" state= 1; wave . fra_anim_state=0 " ></ action_element>
</action>
行为受体 "lock"被按下 ( "down" ) 时触发 "action hidephoto" , 通过执行 "action hidephoto" , 将全局参数 state赋值为 1。
与此同时, 与全局参数有关的物体的属性受到全局参数的赋值的影响, 例如:
<image name="pic 1" res="default_l .png" basex="80" basey="#screen_h*0.60" rotate="-3" customize: " visible="$eq(state,0)"></image>
在全局参数 state 被赋值为 1 后 , 图 片控件 " pic_l "的可见度属性 visible="$eq(state,0)"变为 0 , 即不可见, 其中 $eq是一个逻辑函数, 若其两个参数相 等则返回 1 , 否则返回 0。
通过定义上述全局参数, 实现了行为受体" lock"被按下时, 触发图片控件 "pic_l" 不可见的功能。 由于支持全局参数的自由调整, 使得本发明实施例方案的逻辑执行 能力进一步提升, 能够支持一些更为复杂的 UI逻辑, 例如游戏类型的主题等。
经过上述步骤 S201-步骤 S205 ,在 XML文件中分别定义了物体、行为和结果的 描述信息, 由此建立了 IBA模型。 IBA模型是用户界面的统一抽象描述, 它遵循物 体 -行为 -结果的因果逻辑, 是以近似自然语言的方式来描述的, 这样做的好处是具有 足够强的可扩展性。
在建立了 IBA模型之后, 方法 100进入步骤 S102 , 其中解析 IBA模型以得到 物体、 行为和结果之间的对应关系。 通过以上描述可知, IBA 模型所包含的物体、 行为和结果的描述信息之间存在千丝万缕的联系, 如行为受体与物体名称具有对应 关系, 结果信息与结果名称具有对应关系。 基于这种联系得到物体、 行为和结果之 间的对应关系。 具体包括: 根据行为受体与物体名称的对应关系, 建立行为与物体 的对应关系; 根据结果信息与结果名称的对应关系, 建立行为与结果的对应关系。
在上述滑动解锁的例子中, 解析 IBA模型可得到如表 1所示的对应关系: 表 1
Figure imgf000013_0001
即, 名称为 "ship"和" target"的物体与名称为 "drag_to_unlock"的行为具有对应关 系, 名称为" drag_to_unlock"的行为与名称为" unlock"的结果具有对应关系。
随后, 方法 100进入步骤 S103 , 其中根据物体的描述信息以及物体、 行为和结 果之间的对应关系, 将与物体对应的 UI 元素显示在用户界面上, 并实现与用户的 UI交互。 根据物体的描述信息可将物体对应的 UI元素显示在用户界面上, 具体地, 根据上述在图层标签内部添加的各个控件的描述信息中所描述的 UI 元素的特征信 息, 在用户界面上显示这些控件。 进一步地, 根据步骤 S102得到的物体、 行为和结 果之间的对应关系, 实现 UI交互。 在上述滑动解锁的例子中, 可在用户界面上显示 "ship"控件、 "target"控件、 "clock"控件、 "date"控件、 "wavel "控件和 "wave2"控件。 如果用户手指拖拽" ship"到 "target"内后抬起手指, 那么触发执行" unlock" , 则用户界 面呈现解锁状态, 即实现了滑动解锁。
虽然上述实施例是以锁屏应用为例进行的描述说明, 但本发明不仅限于锁屏应 用, 其它基于 UI设计的用户界面实现也可以采用本发明提供的这种方案。 例如: (a). 即时聊天工具的动态交互表情 /贺卡: 用户 A可以选择系统提供的某一个表 情 /贺卡的主题包给用户 B发送过去。 用户 B下载该主题包后, 用户 B的客户端即可 按照 IBA模型来解析渲染内容。 这样, 一个动态的、 可交互的临时性界面即可显示 在用户 B的客户端屏幕上。 用户 B不仅可以看到动态效果, 还可以通过点击、 拖拽、 滑动等方式与之交互。 在这种例子中, Item是要显示的贺卡内容, Behavior是用户 B的操作, Action是行为结果, 如打开礼物包、 显示祝贺语、 开始一段动画或者回复 给用户 A某种信息等等。
(b) . 轻量级可替换主题的嵌入式设备界面: 以可佩带设备的首屏 (如智能手表 的首屏) 为例, 用户的手表表盘可以随意更换主题包, 以显示为不同的风格, 同时 可以进行轻量级交互。 在这种情况下 Behavior可以是来自于用户触摸操作, 也可以 是来自于系统自身的感应器, 如用户抬手、 晃动等动作所引发的感应。
(c) . 由于 IBA模型并不限定于具体平台实现, 所以是基于 IBA模型的方案是一 种跨平台的界面部署方式。 同一个主题包可以应用于多处的屏幕, 以获得统一的交 互体验。 例如: 对于手机的锁屏、 电视机顶盒的待机屏幕、 手表屏幕和电脑屏保, 用户可以在线挑选一套主题包, 通过云端分别部署到不同的设备上, 显示出统一的 风格。 不同设备只需要分别实现并部署对应的解析引擎即可。
根据本发明实施例提供的技术方案, 为用户界面上多个 UI元素建立 IBA模型, 该 IBA模型包括物体、 行为和结果的描述信息, 解析 IBA模型可得到物体、 行为和 结果之间的对应关系, 根据物体的描述信息以及物体、 行为和结果之间的对应关系, 将 UI元素显示在用户界面上, 并实现与用户的 UI交互。 本发明不再以 UI元素为单 位预先定义其属性和逻辑, 而是将多个 UI元素的属性和逻辑等信息分为物体、 行为 和结果的描述信息分别来定义, 以自然语言的方式抽象了 UI上的内容和行为, 基于 这种 IBA模型使得开发应用主题变得筒单, 也使得复杂逻辑的描述变得筒单。 即使 没有编程基础的开发者, 只要逻辑清晰, 能够采用自然语言描述其设计, 都可以利 用本模型来进行设计, 无需从头学习编程语言、 无需考虑内存以及操作系统如安卓 系统运行机制等技术问题, 可以专注于 UI设计和实现本身, 从而也大大降低了主题 制作的门槛。 IBA 模型的开放性和扩展性可以支持更多复杂、 有趣的界面设计和实 现, 无论是物体、 行为和结果都可以独立地进行演进, 因此当开发者需要实现当前 应用能力以外的功能时, 可以独立于主框架继续开发新增加的功能, 从而很方便的 实现扩展。 举个筒单的例子, 如果在某个用户界面上想要增加通过按住某按钮摇一 摇手机发微博的功能, 无需像传统应用那样重新编写代码, 只要把物体 (按钮) 、 行为 (按下与重力传感器触发)和结果(调用标准 intent启动微博应用 )这三个元素 定义到 IBA模型中即可实现上述功能。
图 3示出了根据本发明一个实施例的用户界面实现装置的结构框图。 如图 3所 示, 该装置包括: 模型构建器 31、 解析器 32以及执行器 33。 其中, 模型构建器 31 可以包括: 物体模型构建单元 31 1、结果模型构建单元 312和行为模型构建单元 313。
模型构建器 31适于为用户界面上的界面元素建立 IBA模型,其中, IBA模型包 括物体、 行为和结果的描述信息。 物体是指用户界面上的界面元素。 具体地, 物体 可以包括: 用于在用户界面上展现静态图或动态图的图片控件、 用于在用户界面上 展现文本内容的文字控件、 用于描述矩形的区域控件、 用于包含多个控件的组控件 或预定义物体控件。 行为是指对物体进行的动作。 行为可以是用户的操作行为, 如 用户在界面上进行的某种可触发事件的动作, 例如点击或拖拽某个物体; 行为也可 以是系统的自身行为, 如可触发事件的触发条件。 结果是指对物体执行行为之后, 用户界面呈现的状态, 结果表示行为将会触发的事件, 可能是产生某个系统行为(如 解锁、 打电话等) , 也可能是系统自身参数的调整。
具体地说, 物体模型构建单元 31 1适于构建物体的描述信息。 物体模型构建单 元 31 1 在图层标签内部添加物体, 即定义物体的描述信息。 物体的描述信息包括物 体名称和物体属性; 其中, 物体名称用于唯一标识该物体, 物体属性用于描述根据 物体的描述信息所显示的界面元素的特征信息。 可选地, 物体属性包括以下属性中 的一项或多项: 位置属性、 大小属性、 旋转属性、 缩放属性、 可见度属性以及颜色 属性。 可选地, 物体属性还包括动画属性, 动画属性用于描述根据物体的描述信息 所显示的界面元素的动画效果。 该动画属性可以为 alpha '渐变动画(alpha_animation) , 位 移 动 画 (position—animation) , 缩 放 动 画 (scale—animation) , 旋 转 动 画 (rotate animation) , 图片巾贞动画 (frame_animation) , 斜切动画 (skew_animation)。 这些 动画属性也可以作为控件的子元素来定义。 每种动画的播放方式都可以分为单次播 放和循环播放, 由其状态值来控制, 状态值为 0表示停止播放, 状态值为 1表示单 次播放, 状态值为 2 表示循环播放。 动画由若干关键帧组成, 对于关键帧时间点, 按照动画属性的具体取值获得当前的属性值; 对于非关键帧时间点, 可以使用差值 的方法确定具体的属性值, 例如在时间点 t ( t0<t<tl , 其中 t0和 tl是两个相邻的关 键帧时间点 ) , 其属性值为 v=(t-t0) * (v 1 -v0)/(t 1 -W)+v0 , 其中 νθ是时间点 t0的属性 值, V 1是时间点 11的属性值。 这样, 当动画线程运行时, 根据线程运行的任意时间 t , 可以推出对应的属性值 V, 随着线程的运行(t不断增加, 单位毫秒) , 属性值也 不断变化, 在界面上即可看到 UI元素在做相应的动画 (例如属性值是 rotate , 即可 看到 UI元素在旋转) 。
行为模型构建单元 313适于构建行为的描述信息。 行为模型构建单元 313在主 题标签内部添加行为, 即定义行为的描述信息。 在本发明中, 行为包括两种, 一种 是用户的操作行为, 这种行为对应于行为的动作模式; 另一种是系统自身的行为, 这种行为对应于行为的触发模式。 用户的操作行为是用户的动作所对应的主动行为, 这种行为的描述信息包括行为受体、 动作信息以及结果信息。 其中, 行为受体与物 体名称具有对应关系, 结果信息与结果名称 (为结果的描述信息, 将在后续描述) 具有对应关系, 动作信息用于描述对物体所进行的动作。 本发明中动作信息所支持 的动作参见方法实施例的描述。 系统自身的行为是由于某参数变化达到了触发条件 而产生的被动行为, 这种行为的描述信息包括触发条件和结果信息。 其中, 触发条 件是行为的触发条件, 结果信息与后续描述结果名称相对应。 可选地, 行为模型构 建单元 313 所构建的行为的描述信息还包括执行条件, 该执行条件是结果的执行条 件。
结果模型构建单元 312适于构建结果的描述信息。 结果模型构建单元 312在主 题标签内部添加结果, 即定义结果的描述信息。 结果的描述信息包括结果名称、 结 果状态和结果类型; 其中, 结果状态用于描述用户界面呈现的状态, 结果类型用于 描述用户界面呈现状态对应的系统类型。 在本发明中, 结果类型支持三种: 系统调 用 (standard ) 、 自更新 (self ) 和自定义调用 (intent ) 。 系统调用是指调用锁屏中 心预定义的跳转事件, 自定义调用是指调用安卓系统自带的功能界面, 自更新是指 通过调整 UI参数(参见后续的描述) 来对整个 UI界面进行调整控制。
进一步地, 上述模型构建器 31还可以包括: 约束器构建单元 314 , 适于构建约 束器的描述信息。 约束器构建单元 314 在图层标签外部添加约束器, 即定义约束器 的描述信息。 约束器的描述信息包括约束器名称和移动范围信息, 移动范围信息用 于描述根据物体的描述信息所显示的界面元素被约束的移动范围。 物体模型构建单 元 31 1 所构建的物体的描述信息还包括约束器信息, 约束器信息与约束器名称具有 对应关系, 该物体受到约束器的限制, 按照被约束的移动范围进行移动。 进一步地, 模型构建器 31还包括: 全局参数构建单元 315 , 适于构建全局参数 的描述信息。 其中, 全局参数的描述信息包括全局参数名称。 结果模型构建单元 312 所构建的结果的描述信息还包括全局参数名称及全局参数的赋值; 物体模型构建单 元 311 所构建的物体的描述信息所包括物体属性与全局参数的赋值相关联。 全局参 数的赋值是在与其有关的结果中完成的, 而与全局参数有关的物体的物体属性则受 到全局参数的赋值的影响。
解析器 32适于解析 IBA模型以得到物体、 行为和结果之间的对应关系。 通过 以上描述可知, IBA 模型所包含的物体、 行为和结果的描述信息之间存在千丝万缕 的联系, 如行为受体与物体名称具有对应关系, 结果信息与结果名称具有对应关系。 基于这种联系得到物体、 行为和结果之间的对应关系。 具体地, 解析器 32根据行为 受体与物体名称的对应关系, 建立行为与物体的对应关系; 根据结果信息与结果名 称的对应关系, 建立行为与结果的对应关系。
执行器 33适于根据物体的描述信息以及物体、 行为和结果之间的对应关系, 将 与物体对应的界面元素显示在用户界面上, 并实现与用户的界面交互。 执行器 33根 据物体的描述信息可将物体对应的 UI元素显示在用户界面上, 具体地, 根据上述物 体模型构建单元 311所构建的各个物体的描述信息中所描述的 UI元素的特征信息, 在用户界面上显示这些控件。 执行器 33根据解析器 32得到的物体、 行为和结果之 间的对应关系, 实现 UI交互。
根据本发明提供的用户界面实现装置, 为用户界面上多个 UI元素建立 IBA模 型, 该 IBA模型包括物体、 行为和结果的描述信息, 解析 IBA模型可得到物体、 行 为和结果之间的对应关系, 根据物体的描述信息以及物体、 行为和结果之间的对应 关系, 将 UI元素显示在用户界面上, 并实现与用户的 UI交互。 本发明不再以 UI元 素为单位预先定义其属性和逻辑,而是将多个 U I元素的属性和逻辑等信息分为物体、 行为和结果的描述信息分别来定义, 以自然语言的方式抽象了 UI上的内容和行为, 基于这种 IBA模型使得开发应用主题变得筒单, 也使得复杂逻辑的描述变得筒单。 即使没有编程基础的开发者, 只要逻辑清晰, 能够采用自然语言描述其设计, 都可 以利用本模型来进行设计, 无需从头学习变成语言、 无需考虑内存以及安卓运行机 制等技术问题,可以专注于 UI设计和实现本身,从而也大大降低了主题制作的门槛。
IBA模型的开放性和扩展性可以支持更多复杂、 有趣的界面设计和实现, 无论是物 体、 行为和结果都可以独立地进行演进, 因此当开发者需要实现当前应用能力以外 的功能时, 可以独立于主框架继续开发新增加的功能, 从而很方便的实现扩展。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。 各种通用系统也可以与基于在此的示教一起使用。 根据上面的描述, 构造这类系统 所要求的结构是显而易见的。 此外, 本发明也不针对任何特定编程语言。 应当明白, 可以利用各种编程语言实现在此描述的本发明的内容, 并且上面对特定语言所做的 描述是为了披露本发明的最佳实施方式。
本领域那些技术人员可以理解, 可以对实施例中的设备中的模块进行自适应性 地改变并且把它们设置在与该实施例不同的一个或多个设备中。 可以把实施例中的 模块或单元或组件组合成一个模块或单元或组件, 以及此外可以把它们分成多个子 模块或子单元或子组件。 除了这样的特征和 /或过程或者单元中的至少一些是相互排 斥之外, 可以采用任何组合对本说明书 (包括伴随的权利要求、 摘要和附图) 中公 开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。 除非 另外明确陈述, 本说明书 (包括伴随的权利要求、 摘要和附图) 中公开的每个特征 可以由提供相同、 等同或相似目的的替代特征来代替。
此外, 本领域的技术人员能够理解, 尽管在此所述的一些实施例包括其它实施 例中所包括的某些特征而不是其它特征, 但是不同实施例的特征的组合意味着处于 本发明的范围之内并且形成不同的实施例。 例如, 在下面的权利要求书中, 所要求 保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现, 或者以在一个或者多个处理器上运 行的软件模块实现, 或者以它们的组合实现。 本领域的技术人员应当理解, 可以在 实践中使用微处理器或者数字信号处理器(DSP )来实现根据本发明实施例的用户界 面实现装置中的一些或者全部部件的一些或者全部功能。 本发明还可以实现为用于 执行这里所描述的方法的一部分或者全部的设备或者装置程序 (例如, 程序和程序 产品) 。 这样的实现本发明的程序可以存储在可读介质上, 或者可以具有一个或者 多个信号的形式。 这样的信号可以从因特网网站上下载得到, 或者在载体信号上提 供, 或者以任何其他形式提供。
例如, 图 4示出了可以实现根据本发明的用户界面实现方法的终端设备。 该终 端设备传统上包括处理器 410和以存储器 420形式的程序产品或者可读介质。 存储 器 420 可以是诸如闪存、 EEPROM (电可擦除可编程只读存储器) 、 EPROM 或者 ROM之类的电子存储器。 存储器 420具有用于执行上述方法中的任何方法步骤的程 序代码 431的存储空间 430。 例如, 用于程序代码的存储空间 430可以包括分别用于 实现上面的方法中的各种步骤的各个程序代码 431。这些程序代码可以从一个或者多 个程序产品中读出或者写入到这一个或者多个程序产品中。 这些程序产品包括诸如 存储卡之类的程序代码载体。 这样的程序产品通常为如参考图 5 所述的便携式或者 固定存储单元。 该存储单元可以具有与图 4的终端设备中的存储器 420类似布置的 存储段、 存储空间等。 程序代码可以例如以适当形式进行压缩。 通常, 存储单元包 括可读代码 43 Γ , 即可以由例如诸如 410之类的处理器读取的代码, 这些代码当由 终端设备运行时, 导致该终端设备执行上面所描述的方法中的各个步骤。 本文中所称的 "一个实施例"、 "实施例"或者"一个或者多个实施例 "意味着, 结合 实施例描述的特定特征、 结构或者特性包括在本发明的至少一个实施例中。 此外, 请注意, 这里"在一个实施例中"的词语例子不一定全指同一个实施例。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发明的 实施例可以在没有这些具体细节的情况下被实践。 在一些实例中, 并未详细示出公 知的方法、 结构和技术, 以便不模糊对本说明书的理解。 应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制, 并且本 领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。 在权利 要求中, 不应将位于括号之间的任何参考符号构造成对权利要求的限制。 单词 "包 含" 不排除存在未列在权利要求中的元件或步骤。 位于元件之前的单词 "一" 或 "一 个" 不排除存在多个这样的元件。 本发明可以借助于包括有若干不同元件的硬件以 及借助于适当编程的终端设备来实现。 在列举了若干装置的单元权利要求中, 这些 装置中的若干个可以是通过同一个硬件项来具体体现。 单词第一、 第二、 以及第三 等的使用不表示任何顺序。 可将这些单词解释为名称。
此外, 还应当注意, 本说明书中使用的语言主要是为了可读性和教导的目的而 选择的, 而不是为了解释或者限定本发明的主题而选择的。 因此, 在不偏离所附权 利要求书的范围和精神的情况下, 对于本技术领域的普通技术人员来说许多修改和 变更都是显而易见的。 对于本发明的范围, 对本发明所做的公开是说明性的, 而非 限制性的, 本发明的范围由所附权利要求书限定。

Claims

权 利 要 求
1、 一种用户界面实现方法, 包括:
为用户界面上的界面元素建立物体 -行为 -结果模型, 其中, 所述物体 -行为 -结果 模型包括物体、 行为和结果的描述信息, 所述物体是指所述用户界面上的界面元素; 所述行为是指对所述物体进行的动作; 所述结果是指对所述物体执行所述行为之后, 所述用户界面呈现的状态;
解析所述物体 -行为-结果模型以得到物体、 行为和结果之间的对应关系; 根据所述物体的描述信息以及物体、 行为和结果之间的对应关系, 将与所述物 体对应的界面元素显示在用户界面上, 并实现与用户的界面交互。
2、 根据权利要求 1所述的方法, 其中:
所述物体的描述信息包括物体名称和物体属性; 其中, 所述物体属性用于描述 根据所述物体的描述信息所显示的界面元素的特征信息;
所述结果的描述信息包括结果名称、 结果状态和结果类型; 其中, 所述结果状 态用于描述所述用户界面呈现的状态, 所述结果类型用于描述所述用户界面呈现所 述状态对应的系统类型;
所述行为的描述信息包括行为受体、 动作信息以及结果信息; 或者, 所述行为 的描述信息包括触发条件和结果信息; 其中, 所述行为受体与所述物体名称具有对 应关系, 所述结果信息与所述结果名称具有对应关系, 所述动作信息用于描述对所 述物体所进行的动作, 所述触发条件是所述行为的触发条件。
3、 根据权利要求 2所述的方法, 其中, 所述解析所述物体-行为-结果模型以得 到物体、 行为和结果之间的对应关系包括:
根据所述行为受体与所述物体名称的对应关系, 建立所述行为与所述物体的对 应关系;
根据所述结果信息与所述结果名称的对应关系, 建立所述行为与所述结果的对 应关系。
4、 根据权利要求 2所述的方法, 其中, 所述物体属性包括以下属性中的一项或 多项: 位置属性、 大小属性、 旋转属性、 缩放属性、 可见度属性以及颜色属性。
5、 根据权利要求 4所述的方法, 其中, 所述物体属性还包括动画属性, 所述动 画属性用于描述根据所述物体的描述信息所显示的界面元素的动画效果。
6、 根据权利要求 1所述的方法, 其中, 所述物体包括: 用于在用户界面上展现 静态图或动态图的图片控件、 用于在用户界面上展现文本内容的文字控件、 用于描 述矩形的区域控件、 用于包含多个控件的组控件或预定义物体控件。
7、 根据权利要求 2所述的方法, 所述物体-行为-结果模型还包括约束器的描述 信息, 所述约束器的描述信息包括约束器名称和移动范围信息, 所述移动范围信息 用于描述根据所述物体的描述信息所显示的界面元素被约束的移动范围;
所述物体的描述信息还包括约束器信息, 所述约束器信息与所述约束器名称具 有对应关系。
8、 根据权利要求 2所述的方法, 所述行为的描述信息还包括执行条件, 所述执 行条件是所述结果的执行条件。
9、 根据权利要求 2所述的方法, 所述物体-行为-结果模型还包括全局参数的描 述信息; 其中, 所述全局参数的描述信息包括全局参数名称; 所述结果的描述信息 还包括全局参数名称及所述全局参数的赋值; 所述物体的描述信息所包括的物体属 性与所述全局参数的赋值相关联。
10、 一种用户界面实现装置, 包括:
模型构建器, 适于为用户界面上的界面元素建立物体 -行为 -结果模型, 其中, 所 述物体-行为-结果模型包括物体、 行为和结果的描述信息, 所述物体是指所述用户界 面上的界面元素; 所述行为是指对所述物体进行的动作; 所述结果是指对所述物体 执行所述行为之后, 所述用户界面呈现的状态;
解析器,适于解析所述物体-行为-结果模型以得到物体、行为和结果之间的对应 关系;
执行器, 适于根据所述物体的描述信息以及物体、 行为和结果之间的对应关系, 将与所述物体对应的界面元素显示在用户界面上, 并实现与用户的界面交互。
1 1、 根据权利要求 10所述的装置, 其中, 所述模型构建器包括:
物体模型构建单元, 适于构建所述物体的描述信息, 所述物体的描述信息包括 物体名称和物体属性; 其中, 所述物体属性用于描述根据所述物体的描述信息所显 示的界面元素的特征信息;
结果模型构建单元, 适于构建所述结果的描述信息, 所述结果的描述信息包括 结果名称、 结果状态和结果类型; 其中, 所述结果状态用于描述所述用户界面呈现 的状态, 所述结果类型用于描述所述用户界面呈现所述状态对应的系统类型;
行为模型构建单元, 适于构建所述行为的描述信息, 所述行为的描述信息包括 行为受体、 动作信息以及结果信息; 或者, 所述行为的描述信息包括触发条件和结 果信息; 其中, 所述行为受体与所述物体名称具有对应关系, 所述结果信息与所述 结果名称具有对应关系, 所述动作信息用于描述对所述物体所进行的动作, 所述触 发条件是所述行为的触发条件。
12、 根据权利要求 1 1所述的装置, 其中, 所述解析器适于: 根据所述行为受体 与所述物体名称的对应关系, 建立所述行为与所述物体的对应关系; 根据所述结果 信息与所述结果名称的对应关系, 建立所述行为与所述结果的对应关系。
13、 根据权利要求 1 1所述的装置, 其中, 所述物体模型构建单元所构建的物体 属性包括以下属性中的一项或多项: 位置属性、 大小属性、 旋转属性、 缩放属性、 可见度属性以及颜色属性。
14、 根据权利要求 13所述的装置, 其中, 所述物体模型构建单元所构建的物体 属性还包括动画属性, 所述动画属性用于描述根据所述物体的描述信息所显示的界 面元素的动画效果。
15、 根据权利要求 10所述的装置, 其中, 所述物体包括: 用于在用户界面上展 现静态图或动态图的图片控件、 用于在用户界面上展现文本内容的文字控件、 用于 描述矩形的区域控件、 用于包含多个控件的组控件或预定义物体控件。
16、 根据权利要求 1 1所述的装置, 其中, 所述模型构建器还包括: 约束器构建 单元, 适于构建约束器的描述信息; 所述约束器的描述信息包括约束器名称和移动 范围信息, 所述移动范围信息用于描述根据所述物体的描述信息所显示的界面元素 被约束的移动范围;
所述物体模型构建单元所构建的所述物体的描述信息还包括约束器信息, 所述 约束器信息与所述约束器名称具有对应关系。
17、 根据权利要求 1 1所述的装置, 其中, 所述行为模型构建单元所构建的所述 行为的描述信息还包括执行条件, 所述执行条件是所述结果的执行条件。
18、 根据权利要求 1 1所述的装置, 其中, 所述模型构建器还包括: 全局参数构 建单元, 适于构建所述全局参数的描述信息; 其中, 所述全局参数的描述信息包括 全局参数名称;
所述结果模型构建单元所构建的所述结果的描述信息还包括全局参数名称及所 述全局参数的赋值; 所述物体模型构建单元所构建的所述物体的描述信息所包括的 物体属性与所述全局参数的赋值相关联。 、
19、 一种程序, 包括可读代码, 当所述可读代码在终端设备上运行时, 导致所 述终端设备执行根据权利要求 1-9中的任一个所述的用户界面实现方法。
20、 一种可读介质, 其中存储了如权利要求 19所述的程序。
PCT/CN2014/083584 2013-08-07 2014-08-01 用户界面实现方法及装置 WO2015018299A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310341685.1 2013-08-07
CN201310341685.1A CN103399750B (zh) 2013-08-07 2013-08-07 用户界面实现方法及装置

Publications (1)

Publication Number Publication Date
WO2015018299A1 true WO2015018299A1 (zh) 2015-02-12

Family

ID=49563384

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083584 WO2015018299A1 (zh) 2013-08-07 2014-08-01 用户界面实现方法及装置

Country Status (2)

Country Link
CN (1) CN103399750B (zh)
WO (1) WO2015018299A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399750B (zh) * 2013-08-07 2017-05-24 北京奇虎科技有限公司 用户界面实现方法及装置
CN104392474B (zh) * 2014-06-30 2018-04-24 贵阳朗玛信息技术股份有限公司 一种生成、展示动画的方法及装置
CN104320546A (zh) * 2014-11-14 2015-01-28 刘长红 一种智能手机随机动态图锁屏界面实现方法及其移动终端
CN106162342A (zh) * 2015-03-25 2016-11-23 中兴通讯股份有限公司 界面处理方法、装置及系统
CN106162302B (zh) * 2015-04-22 2020-08-18 Tcl科技集团股份有限公司 一种Launcher主界面的编排方法、装置及智能电视
CN107203389B (zh) * 2016-03-18 2021-01-22 百度在线网络技术(北京)有限公司 控件展现方法及装置
CN107203372B (zh) * 2016-03-18 2021-03-19 百度在线网络技术(北京)有限公司 控件展现方法及装置
CN110569096B (zh) * 2019-08-20 2022-10-18 上海沣沅星科技有限公司 去代码化制作人机交互界面的系统、方法、介质及设备
CN111667562B (zh) * 2020-05-07 2023-07-28 深圳思为科技有限公司 基于图片素材的动效界面生成方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340598A (zh) * 2008-08-07 2009-01-07 北京衡准科技有限公司 一种实现媒体三维播放的方法及装置
CN102402364A (zh) * 2010-09-10 2012-04-04 北京创新方舟科技有限公司 一种根据用户的触摸屏操作进行应用调用的方法与设备
CN103399750A (zh) * 2013-08-07 2013-11-20 北京奇虎科技有限公司 用户界面实现方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6717593B1 (en) * 2000-09-12 2004-04-06 Avaya Technology Corp. Mark-up language implementation of graphical or non-graphical user interfaces
US20070055932A1 (en) * 2005-09-02 2007-03-08 Microsoft Corporation Application programming interfaces for graphical user interfaces
CN101859245A (zh) * 2009-04-09 2010-10-13 北大方正集团有限公司 一种生成用户界面的方法和装置
CN101887370B (zh) * 2010-07-23 2013-08-21 北京数码大方科技股份有限公司 创建系统用户界面的方法及装置
CN101980155A (zh) * 2010-11-04 2011-02-23 青岛海信电器股份有限公司 电视机用户界面的实现方法和系统、电视机
CN102750101B (zh) * 2012-06-26 2016-05-04 宇龙计算机通信科技(深圳)有限公司 触发启动应用的指令的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340598A (zh) * 2008-08-07 2009-01-07 北京衡准科技有限公司 一种实现媒体三维播放的方法及装置
CN102402364A (zh) * 2010-09-10 2012-04-04 北京创新方舟科技有限公司 一种根据用户的触摸屏操作进行应用调用的方法与设备
CN103399750A (zh) * 2013-08-07 2013-11-20 北京奇虎科技有限公司 用户界面实现方法及装置

Also Published As

Publication number Publication date
CN103399750B (zh) 2017-05-24
CN103399750A (zh) 2013-11-20

Similar Documents

Publication Publication Date Title
WO2015018299A1 (zh) 用户界面实现方法及装置
CN105378637B (zh) 用于提供动画效果的用户终端装置及其显示方法
US11520455B2 (en) Dioramic user interface having a user customized experience
WO2020038167A1 (zh) 视频识图方法、装置、终端及存储介质
US8843838B2 (en) Live wallpaper
JP2020035469A (ja) ユーザ・インターフェース内のコンポーネントの位置調整
US20140184471A1 (en) Device with displays
US10628121B2 (en) Electronic device and method for controlling the same
CN107272994A (zh) 视窗切换界面
JP2015502606A (ja) クロス・ウィンドウ・アニメーション
US11935208B2 (en) Virtual object structures and interrelationships
US11748944B2 (en) Virtual object structures and interrelationships
WO2017034684A1 (en) Mobile-first authoring tool for the authoring of wrap packages
US10579220B2 (en) Method and system for story development with a dynamic grid
CN113411664B (zh) 基于子应用的视频处理方法、装置和计算机设备
CN101266693A (zh) 一种动态控制动画运行过程的方法
WO2017219967A1 (zh) 一种虚拟键盘的生成方法及装置
CN113268212A (zh) 投屏方法、装置、存储介质及电子设备
US20180246871A1 (en) Multiplane animation system
US10698744B2 (en) Enabling third parties to add effects to an application
US10417327B2 (en) Interactive and dynamically animated 3D fonts
JP7450112B2 (ja) 文字モードでビデオを生成する方法、装置、機器、および媒体
Brockschmidt Programming Windows 8 Apps with HTML, CSS and Javascript
WO2022088981A1 (zh) 一种广告显示方法及电子设备
KR101572928B1 (ko) 스마트 디바이스 화면에서 가시적으로 변화하는 위젯에 대응하여 상이한 콘텐트를 제공하는 방법

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14834103

Country of ref document: EP

Kind code of ref document: A1