Patent Publication Number: US-9418367-B2

Title: Context-aware code provisioning for mobile devices

Description:
FIELD OF THE INVENTION 
     The present invention relates to mobile devices and their interface or interaction with standing services or environmental devices. 
     BACKGROUND OF THE INVENTION 
     Over the past several years, mobile device technologies have improved dramatically. Existing cell phones, PDAs, combinations of these, and other mobile devices have come to exhibit significant computing, storage, and connectivity capabilities. 
     Currently, new services are being deployed that mobile users can access using the devices just mentioned. Some of these services, such as web browsing on mobile devices, are independent of the user location while the client software and protocols used to access the services are standardized. Other services, such as accessing local vending machines and making payments using personal devices, could require custom software to be installed on the mobile device. Such custom software could for example convey the user&#39;s dietary restrictions, user&#39;s health conditions such as glucose and salt levels, snacking preferences, membership status in a frequent snacker&#39;s club, discount coupons, pricing information, etc. Another example in the latter category is an environmental display service, which allows mobile users to display information on large, public screens, and use their mobile devices to control these presentations. 
     Clearly, it is impossible to provision mobile devices with the client software needed for accessing all of types of services in the genres just discussed since the services may become available after the device is manufactured and also because there may be limited room to hold software for all services that the user may encounter. Mobile devices may have to use different versions of the same client software for accessing the same service from different servers, for a variety of reasons related to the server hardware, maintenance costs, etc. Even more importantly, when new services are rolled out, it becomes prohibitively expensive to automatically fully re-provision mobile devices that are already out in the field with the software necessary to use these new services. Finally, asking users to download and install the client software manually is inconvenient and error-prone. 
     Currently, mobile devices tend to be provisioned with the software necessary for accessing a limited number of services, while client software is usually made available for installation when mobile users subscribe to a new service or when they first access a new service. In this context, given that mobile device cannot store all the software they will potentially ever need to use due to their limited resources, a need has been recognized in connection with optimizing the usage of mobile device resources for storing or on-demand loading of the client software required for accessing public services available locally. 
     SUMMARY OF THE INVENTION 
     In accordance with at least one presently preferred embodiment of the present invention, the process of deploying public services for mobile users that require specialized client software is greatly simplified. Particular refinements in this vein involve the dynamic configuration of client software using available context information and the optimization of software provisioning based on historical usage information, which includes services accessed together with the location and time of access. 
     In summary, one aspect of the present invention provides a method of managing resources of a mobile device, said method comprising the steps of: ascertaining at least one condition under which the mobile device is to operate; ascertaining software-related resources related to operation of the mobile device under the at least one condition; establishing software-related resources for use at the mobile device; and determining whether to retain pre-existing software-related resources for use at the mobile device. 
     Another aspect of the invention provides an apparatus for managing resources of a mobile device, said apparatus comprising the steps of: an arrangement which ascertains at least one condition under which the mobile device is to operate; an arrangement which ascertains software-related resources related to operation of the mobile device under the at least one condition; an arrangement which establishes software-related resources for use at the mobile device; and an arrangement which determines whether to retain pre-existing software-related resources for use at the mobile device. 
     Furthermore, an additional aspect of the invention provides a program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for managing resources of a mobile device, said method comprising the steps of: ascertaining at least one condition under which the mobile device is to operate; ascertaining software-related resources related to operation of the mobile device under the at least one condition; establishing software-related resources for use at the mobile device; and determining whether to retain pre-existing software-related resources for use at the mobile device. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The above and other objects, features, and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings, in which: 
         FIG. 1  schematically illustrates a wireless mobile device and its interaction with an environmental device. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Although illustrative embodiments of the present invention have been described herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various other changes and modifications may be affected therein by one skilled in the art without departing from the scope or spirit of the invention. 
     Many of the functional units described in this specification have been labeled as modules. Modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions, which may, for instance, be organized as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different locations which, when joined logically together, comprise the module and achieve the stated purpose for the module. 
     Indeed, a module of executable code could be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Similarly, operational data may be identified and illustrated herein within modules, and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices, and may exist, at least partially, merely as electronic signals on a system or network. 
     There are broadly contemplated herein, in accordance with at least one presently preferred embodiment of the present invention, methods and apparatus for optimization of the dynamic provisioning of mobile (wireless) devices with the client software modules necessary for accessing public services that are available locally. The client software modules implement the custom user interface and protocol for accessing the public service. Rather than trying to preinstall on the mobile device all the software modules that will fit on the device and may be used to access a service at a possibly small subset of locations, we assume that it is possible to install a client software module on-demand and remove it when it is not being used, to facilitate use of services at larger set of locations. There is proposed herein a collection of optimization techniques for the management of client software modules such that the number of installation of client software modules on-demand, immediately before the user attempts to use the service, either directly from the device implementing the public service or from a publicly accessible second device providing support to the device offering the service, is minimized. In the following, to simplify the description, without loss of generality we assume that the device offering the service and the second publicly accessible device are always the same. Public devices have much higher storage capacities and very good connectivity. As a result, they are capable of delivering software modules customized to the service type and location, and to the device type (manufacturer, model, software version, etc.) and device state (battery level, network connectivity, such as BT or 802.11, user preferences, such as preferred profile/language at the given location, etc), user status such as Gold, Silver, user activity (sitting in a train, working from a taxi), whether user is indoors, outdoors, other status reported by sensors on the user&#39;s device such as light conditions, noise level, image of the user&#39;s surroundings, etc. However, optimizing the resources of the mobile device is needed because on-demand download of a client software module, depending on its size, is both time and battery consuming. 
     More importantly, since the public device is the one that is offering the service, the public device or another device to which the public device in turn has access to is an appropriate place to store the corresponding client software module necessary for interacting with the service. The service provider creates this client code along with the service and deploys it. A primary advantage enjoyed is that the requirements for the mobile devices software are reduced to one, or just a few, protocols necessary for downloading the locally-available client software, and supporting a runtime environment that can host and run the downloaded code in a secure manner. 
     One aspect of the preferred embodiment addresses the optimization of software cached on the mobile device based on the characteristics of the modules needed for the service. These characteristics include the size of the module, the time and energy it takes to download the module, the time necessary to configure, initialize and start the module, and the usage pattern and frequency of the module. For instance, large and frequently used client modules, which are expected to require a large amount of energy to download, will be more likely to be cached in the mobile device than small and rarely used modules. In another example, a module for a service that pays tolls for the user while crossing a bridge at highway speeds is also more likely to be kept in the device&#39;s cache with high priority since there would not be enough time to download it on demand while at the toll bridge. Similarly, services that take a long time to initialize and start running will be initialized and kept in memory so that execution can be fast when requested and user satisfaction can be high. 
     Another aspect of the preferred embodiment pertains to optimization knowing server characteristics. For example, if servers providing modules for services are expected to be unavailable due to maintenance, modules for such services will be preferentially retained in the cache. Modules for services available from servers that mandate strongly encrypted transport channels are also likely to be jettisoned from the device only after modules that can be obtained more easily are jettisoned due to the high energy costs associated with establishing secure transport channels and with transferring data across these channels. Finally, while the device is placed in a docking station, say to recharge its battery, at least some of the currently cached modules could be checked against the most recent versions if the docking station is connected to the Internet. 
     Another aspect according to at least one preferred embodiment of the present invention is found in collecting historical information about the usage of the specialized client software together with the usage context (location and time of day), and using the collected information to further optimize resource usage on the mobile device. Another example would be prefetching modules that are expected to be needed in the near future. Such a need can be also inferred from the user&#39;s schedule that may be stored on the mobile device as well. The amount of time spent by the user at the service station is also taken into account. As an example, modules implementing services that are highly likely to be invoked when the user has short, transient contact with the server will be given higher priority to be retained in the cache than other modules. Finally, while the device is placed in a docking station, say to recharge its battery, at least some of the modules expected to be used in the near future are prefetched at no battery or air-time costs, if the docking station is connected to the Internet. 
     Modules could also be customized for low battery operation to avoid consuming an already discharged battery for the download operation. Such modules may be small in size and offer a reduced set of features. 
     Another aspect according to at least one preferred embodiment of the present invention is found in addressing the dynamic configuration of the specialized client software using available context information. For instance, the user interface of the client device can dynamically reconfigure itself using environment-related information such as current location and the list of services available at the current location. Furthermore, access rights of the specialized client software can be modified based on the location, or more general context, of the mobile client. In this vein, certain sensitive applications may be disabled in some locations or some times of the day (e.g., looking at quarterly sales estimates while on a public train, disabling the device-resident components used for remote monitoring while outside of the service provider premises, etc.). Voice based input modules may be turned off if noise levels are very high and voice recognition accuracy will be too low. Similarly, handwriting input modules could be disabled based on excessive vibration. 
     Techniques from caching algorithms used in computers to manage pages in memory can be utilized in combination with the sets of guidelines described earlier to determine modules whose code is deleted from the mobile device. For example the system while satisfying earlier constraints may choose to delete the most recently used module if it is not likely to be used say for the remainder of the day. In other situations the module that was invoked a long time ago and has not been used for a while is deleted. The least frequently used module could also be removed. Another possibility is to delete the module that occupies the most space in the device. In practice, a combination of the above techniques will be applied. 
     Techniques from caching algorithms used in client devices to manage a local cache of web objects can be utilized in combination with the sets of guidelines described earlier to determine modules whose code is deleted from the mobile device. Similarly to web objects which represent related web pages, such as pages that are typically viewed in the same session, or related web page fragments, such as fragments that belong to the same page, mobile device modules that are related, such as those which provide functionality to another one, can be prefetched, or jettisoned from the cache together. 
     Techniques from caching algorithms used in web proxy caches to manage a network-accessible cache of web objects for a large population of mobile devices can also be used to manage the caches of mobile devices or of environmental devices in support of devices providing public services. Furthermore, these prefetching and caching algorithms on mobile and environmental devices are self-improving as they learn the benefits of using any of the possible caching and prefetching policies. Lessons learned by one device, either mobile or environmental, can be transferred to another device of the same type if their most relevant characteristics match; for instance, when two mobile devices have very similar characteristics and their users have very similar profiles. 
     A specific implementation of features such as those discussed above, and with relation to the schematic illustration shown in  FIG. 1 , will most preferably involve the availability of certain capabilities on the mobile device as well as on the environmental devices providing the services to the mobile device. First, the mobile device ( 100 ) should preferably be capable of discovering the services and the environmental devices or infrastructure hosting them ( 150 ); sometimes, co-located services share locally-available infrastructure, which includes support services and the devices used to run them. More specifically, the mobile device  100  should preferably feature a wireless interface  102  for one of the standard technologies (e.g., 802.11, Bluetooth) and the software stack(s) of one or more zero-configuration protocols ( 104 ), such as UPNP or Bonjour. (Whether mobile devices specifically employ the inventive features discussed herein or are statically provisioned with all the client software modules required for accessing the services, the devices should preferably feature both the wireless interface and the zero-configuration protocol stack[s]. Similar considerations can apply the environmental devices or infrastructure.) 
     Next, mobile device  100  should preferably be able to download and securely run code fragments (or modules)  152  from the environmental device  150 ; in this vein, the environmental device or infrastructure  150  should preferably be able to provide the appropriate fragments to the mobile device  100 , upon request from the latter. For instance, after mobile device  100  discovers a locally-available service hosted on an environmental device  150 , it should be able to automatically download the code fragments ( 152 ) necessary for accessing these services and the information necessary for dynamically configuring the execution of these fragments. Such a configuration may include changing the device&#39;s user interface to make the functionality implemented by these fragments available to the mobile user or establishing new execution sandboxes, which are runtime environments with customized, service-specific access rights, and porting underlying APIs to run these fragments. 
     For these actions to be possible, the mobile device should preferably:
         implement protocols for describing themselves, possibly using Composite Capabilities/Preference Profile (CC/PP) profiles, thereby sending some form of self-description  106  to environmental device  150  as warranted;   support a framework for securely downloading and executing code fragments, possibly one of the available implementations of the Open Services Gateway Initiative (OSGi) specification, such as IBM&#39;s SMF;   allow for the establishment and configuration execution sandboxes with precisely defined protection domains, such as those implemented by Java 2 runtimes; and   feature an extensible user interface  107 , such as Eclipse&#39;s workbench.       

     In addition, the environmental devices and infrastructure should preferably provide support for securely providing the appropriate client modules as they are requested. In addition, the mobile device  100  should preferably include a cache  108  and provide support for caching downloaded client modules and mechanisms that can verify if a needed code module is already in the cache, therefore avoiding the download of code that is already in the cache  108 . All these are new features that the mobile and environmental devices should preferably be able to support. 
     Finally, after modules are downloaded or found in the local device cache  108 , the user of mobile device  100  can use the device&#39;s user interface  107 , which has been dynamically configured for the usage context, to access ( 110 ) the locally available environmental device  150  to benefit from any information/data/tasks that would be available from environmental device  150 . The most important steps are preferably recorded to help identify repeating usage patterns and decide which modules should be prefetched before they are expected to be required or kept in the local memory of the mobile device  100 , for further usage, when additional storage space is needed on the mobile device for reasons including the on-demand or prefetched loading of a module. 
     As discussed heretofore, a disable protocol  154  can preferably be provided to selectively disable the provision of information/tasks/services away from environmental device  150  in response to given conditions (e.g., location, time of day, sensitivity of information, etc.) 
     It should be appreciated that while known examples do exist of interfaces for desktop client software that reconfigure themselves based on usage history, such techniques would only be able to provide limited benefits when applied to mobile applications with location-dependent usage. The embodiments of the present invention, as broadly contemplated herein, do address and overcome such limitations. 
     It is to be understood that the present invention, in accordance with at least one presently preferred embodiment, includes elements that may be implemented on at least one general-purpose computer running suitable software programs. These may also be implemented on at least one Integrated Circuit or part of at least one Integrated Circuit. Thus, it is to be understood that the invention may be implemented in hardware, software, or a combination of both. 
     If not otherwise stated herein, it is to be assumed that all patents, patent applications, patent publications and other publications (including web-based publications) mentioned and cited herein are hereby fully incorporated by reference herein as if set forth in their entirety herein.