Abstract:
Channel lineup information in a television system is efficiently managed with an internal electronic program guide manager (IEM). The IEM creates and maintains an internal electronic program guide (EPG) information database for a user program preference determination engine (PDE), which is resident in a STB, DTV or PVR. The internal EPG data are for use by software agents of the PDE only. The external EPG is used for a graphical user interface display. First, external channel lineup information is received from an external program guide; from that, internal channel lineup information is generated that contains less information than the external channel lineup information, yet sufficient information to render the internal channel lineup information useful in the internal database management system; and the internal channel lineup information is updated upon receiving notification of a change to the external channel lineup information.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application claims the benefit under 35 U.S.C. §119(e) of provisional application No. 60/293,763, filed May 25, 2001. 
     This application is also a continuation-in-part under 35 U.S.C. §120 of copending application Ser. No. 09/893,192, filed Jun. 27, 2001, entitled “Method and Apparatus for Delivery of Television Programs and Targeted De-Coupled Advertising,” which is herewith incorporated by reference, and which claimed the benefit under 35 U.S.C. §119(e) from provisional application Nos. 60/215,450 filed Jun. 30, 2000 and 60/226,437 filed Aug. 18, 2000. Further reference is had to the commonly assigned, copending application Ser. No. 09/096,592, filed Jun. 12, 1998, entitled “Television Program Recording with User Preference Determination”, and to our copending application Ser. No. 10/156,153, for “System And Method For Generating And Managing User Preference Information For Scheduled And Recorded Television Programs” being filed herewith and which is also herewith incorporated by reference. 
    
    
     BACKGROUND OF THE INVENTION 
     Field of the Invention 
     The invention lies in the field of interactive television programming. Specifically, the invention pertains to a database management system for automatic television program determination, viewer preference information gathering and generation, and management of service-to-channel allocation changes. 
     Determination of a television user&#39;s program viewing preferences is an important function in the context of digital TV (DTV) and digital set top boxes (STB, DSTB)—especially those with program storage capability—for a variety of applications. Specifically, viewing preferences are required to support applications that select for the user, for example:
         data for a personalized electronic program guide (EPG);   audio/visual (AV) programs or content for viewing later at a convenient time;   segments and ads for compilation into a sequence of programs or a separate channel, such as a virtual channel.       

     Ease of database management is becoming increasingly more important as the size of available useful data and data record entries grows. Sophisticated modern program preference determination engines (MetaByte Networks, Inc.) utilize ever more sophisticated demographical data records. Also, the number of channels available for a channel lineup increase steadily and internally available channel lineup lists vary continually with the quickly fluctuating fields of available programming. 
     Program guide information is available from external electronic program guide (EPG) structures. That information is provided primarily for graphical user interface (GUI) presentation at the user end. Such data structures are carried in voluminous data packages and their use for internal processing is extremely slow, requires a considerable amount of memory and processing time. Further, those data structures hinder system operation in their use, or their adaptation and copying, to manage service-to-channel changes. 
     SUMMARY OF THE INVENTION 
     It is accordingly an object of the invention to provide a system and method for database management for internal electronic program guide and channel lineup management, which overcomes the above-mentioned disadvantages of the heretofore-known devices and methods of this general type and which provides for easily manageable data structures and manageable algorithms for channel lineup changes. 
     With the foregoing and other objects in view there is provided, in accordance with the invention, a method of managing channel lineup information in a television system, which comprises: 
     obtaining external channel lineup information from an external program guide offered by a television program provider; 
     generating internal channel lineup information from the external channel lineup information, the internal channel lineup information containing less information than the external channel lineup information, yet sufficient information to render the internal channel lineup information useful in an internal database management system; and
 
updating the internal channel lineup information upon receiving notification of a change to the external channel lineup information, by repeating the obtaining and generating steps.
 
     In accordance with an added feature of the invention, the external channel lineup information is downloaded from an external electronic program guide in standard EPG data structure format. The external channel lineup is then formatted and indexed for use in the internal channel lineup information and for use in an internal preference determination engine (PDE). In accordance with an additional feature of the invention, the internal channel lineup information is structured by indexing individual available channels to a channel identifier (chID) and a channel name index (chName-index). In a preferred embodiment, the internal channel lineup information further comprises a time field and a flag field indicating a time until which or after which the respective channel is valid. 
     In accordance with another feature of the invention, the internal channel lineup information comprises a first list indexing the external channel lineup received from the external program guide, a second, hierarchically lower list indexing a subscription channel lineup, and a third, hierarchically lowest list indexing a list of most-watched channels and subscription channels. 
     In accordance with a further feature of the invention, the updating step comprises processing a channel lineup change algorithm in which each channel available in an updated external channel lineup is searched in the internal channel lineup and, if a given channel identifier is not found, the respective channel is added to the internal channel lineup. 
     In accordance with again an added feature of the invention, the method further comprises removing channel identifiers of those channels from the internal channel lineup which no longer appear in the updated external channel lineup. 
     In accordance with again an additional feature of the invention, the channel lineup change algorithm is configured to add new service items of an updated external channel lineup, to close and remove closed service items from the internal channel lineup, and to reallocate a given service to a different channel in the internal channel lineup. 
     Preferably, the channel lineup change algorithm is programmed to avoid duplicate entries in the internal channel lineup and to avoid removing given entries from the internal channel lineup, by indexing the entries with a reference counter indicating multiple entry of a given service. 
     With the above and other objects in view there is also provided, in accordance with the invention, a system for managing channel lineup information in a digital television system, comprising: 
     an input for receiving television program content and related external channel lineup information with channel names and data items suitable for a graphical user interface; 
     an internal electronic program guide processor programmed to generate from the external channel lineup information internal channel lineup information with indexed data items listing the channel lineup information with reduced data structure as compared to the external channel lineup information; and
 
an update agent programmed to update the internal channel lineup information upon learning of a change to the external channel lineup information.
 
     In accordance with again a further feature of the invention, the update agent is programmed to process a service-to-channel change management algorithm. 
     The management system outlined above is particularly suitable in the context of a preference determination engine in a television broadcast system. In that case, the management system includes a database containing program information and viewing history of at least one user of the television system. 
     In further summary, a internal electronic program guide (EPG) manager (IEM), creates and maintains an internal EPG (IE) information database for the user program preference determination engine (PDE), which is resident in a STB, DTV or PVR. The term internal, as used herein, refers to the fact that the EPG data are for use by software agents of the PDE and are not used to make the main system graphical user interface EPG. The external EPG is used for that purpose. The IEM provides other software agents with various control interfaces to enable extraction of the program information from the IE database, for maintenance and to update changes, e.g. channel-line-up changes, that arise from changes to the external EPG. 
     Other features which are considered as characteristic for the invention are set forth in the appended claims. 
     Although the invention is illustrated and described herein as embodied in a system and method for database management for internal electronic program guide and channel lineup management, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims. 
     The construction of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of the specific embodiment when read in connection with the accompanying drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWING 
         FIG. 1  is a block diagram providing an overview over the architecture of a novel preference determination engine; 
         FIG. 2  is a detailed schematic block diagram illustrating a preference determination engine including the database management system according to the invention; 
         FIG. 3  is an illustrative block diagram showing a database subsystem with a channel lineup; and 
         FIG. 4  is a flowchart illustrating the channel lineup algorithm according to the invention. 
     
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring now to the figures of the drawing in detail and first, particularly, to  FIGS. 1 and 2  thereof, there is illustrated a complete preference determination engine (PDE) software architecture in which the method and system according to the invention is integrated.  FIG. 1  is a simplified block diagram of the more detailed architecture of  FIG. 2 . The input block  10  represents the various input sources from which the system draws. These sources include, for instance, a cable hookup, a broadcast antenna, a satellite decoder, a video source (including optical disks and similar storage devices), a user click stream, generalized demographic information, and so on. The display block  11  refers to a screen and a graphics control output for a user interface GUI. Various software agents and data that are native in all PDR or set top box (STB) systems are combined in a top level block  12 . An electronic program guide EPG  13  forms the internal interface between the top level block  12  and the lower level, i.e., the internal system level. The latter, which forms the program and data system of the preference determination engine PDE is explained in two blocks, namely, a preference determination module PDM  14  and the PDE software agents and data  15 . 
     The software agents comprising the preference determination module PDM  14  perform operations on data in the software and data block  15 . The core system of the PDM  14  is the category database module CDM  16  which defines a user program preference database or category database CDB  17 . The latter is also referred to as a program information and viewing history database  17 . One of the primary inputs into the CDB  17  originates from the viewing record database VRDB  18 . An internal EPG manager (IEM) agent of the PDM manages the Channel Line-Up lists. The Category Database Module (CDM) of the PDM specifically manages CDB creation and maintenance. 
     Since the invention pertains primarily to the generation and maintenance of a channel lineup list to be utilized in the PDM  14 , the following description deals mainly with the system for the formation and for changing channel lineup lists. 
     A channel lineup is a cross-reference list of two main items:
         Named programming stream services such as, for example, BBC, NBC, CNN-Headline-News, etc.   Tunable channel, e.g. tunable broadcast channel, using analog and/or digital tuning.       

     Typically, video programming services are carried on more than one broadcast system and they are assigned different channel numbers on different systems. 
     The term “channel lineup change” as used herein encompasses a re-allocation of a service from one numbered channel to another, or the addition or removal of a service from the total number of available numbered channels. 
     According to the invention, any number of channel lineup lists may be maintained in a hierarchical order. In a preferred embodiment, we utilize three such lists:
         Internal ChannelLineUp is a complete list of all channels (e.g. &gt;500) and related information provided by an external EPG. This list stores the channel information for all the channels provided by the external EPG. This channel list depends on the number of channels available in the external EPG and may vary from, say, 100 to 1000, depending on whether it is a cable or satellite system. The list is used for program guide graphics display in the display  11 . Since using and processing the complete ChannelLineUp list, is very tedious and time-consuming, it is necessary to generate and maintain a lower level list that is more suitable for internal processing. The list will be referred to as the MbTV ChannelLineUp.   MbTV ChannelLineUp list consists of a limited and fixed number of channels, typically 100. It is determined by the MbTV preference determination system, developed by MetaByte Networks, Inc. The MbTV ChannelLineUp is a subset of the external ChannelLineUp list and consists of both premium and non-premium channels. The PDM internally updates this list with the most watched channels and subscription channels subscribed by the user. This list is mainly for use by the program history agent or category database module CDM  16  to generate user preferences and for calculating MbTV program picks for each profile.   SubscriptionChannelLineUp list is also a subset of the external ChannelLineUp list, which stores exclusively the information pertaining to subscription channels. This list maintains a list of premium channels subscribed by the user.       

     Repeated changes in the program availability and channel lineups of the various content providers render frequent channel lineup changes necessary. The invention provides an algorithm that outlines a method for dealing with channel lineup changes. 
     First, it is paramount that the data structures of the system be properly defined. For example, the following structural data definitions in the context of the channel lineup (ChannelLineUp) in the internal electronic program guide (IEPG) may be provided: 
     
       
         
               
             
               
               
               
               
             
               
               
             
               
             
           
               
                   
               
             
             
               
                 typedef struct 
               
               
                 { 
               
             
          
           
               
                   
                 void 
                 *chID; 
                 /* channel ID */ 
               
               
                   
                 time_t 
                 time; 
                 /* time that the channel is updated. */ 
               
               
                   
                 ushort 
                 chNameIndex; 
                 /* channel name index in string 
               
               
                   
                   
                   
                   table. */ 
               
               
                   
                 ushort 
                 flag; 
                 /* 15   :process bit. it toggles.  * 
               
             
          
           
               
                   
                 /* 7-0:specify, when channel is 
               
               
                   
                   available. */ 
               
             
          
           
               
                 } iemChnl_t; 
               
               
                   
               
             
          
         
       
     
     With reference to  FIG. 3 , the ChannelLineUp list stores channel information in the above data structure. The following names data items are defined:
         chID is the ChannelId number of the channel   time is the time at which the channel information was last updated and after which the specific entry is valid or invalid as marked by the flag field.   chNameIndex is the index of the channelName in the String Table where channelName is the name of the programming service eg BBC, NBC, CNN-Headline-News, using the channel numbered by channelID.   flag field denotes the availability of this channel. States flagged are TILL-TIME and AFTER-TIME, which specifies that the channel information is valid unTIL or AFTER the specified value in the time field.       

     All the channel names (channelName) are stored in another structure called the String Table. 
     All strings useful to internal processing, including the channelNames, are stored in this String Table. The String Table provides an index to each string, chNameIndex, and a reference count. The database has the following structure. The file header of the table on disk or flash memory appears in first five fields: 
     
       
         
               
             
               
               
               
               
             
               
             
           
               
                   
               
             
             
               
                 typedef struct 
               
               
                 { 
               
             
          
           
               
                   
                 ulong 
                 delList; 
                 /* index of the first deleted string in the 
               
               
                   
                   
                   
                   list of deleted strings */ 
               
               
                   
                 ulong 
                 size; 
                 /* offset of free space */ 
               
               
                   
                 ulong 
                 maxSize; 
                 /* maximum table size */ 
               
               
                   
                 ulong 
                 strNum; 
                 /* number of strings in the table */ 
               
               
                   
                 ulong 
                 maxStrNum; 
                 /* maximum string number */ 
               
               
                   
                 char 
                 *data; 
                 /* pointer to table data */ 
               
               
                   
                 mbtv_t 
                 *dataPtrs; 
                 /* pointer to the array of sorted pointers to 
               
               
                   
                   
                   
                   the table data */ 
               
             
          
           
               
                 } table_t; 
               
               
                   
               
             
          
         
       
     
     The pointer (*data) is the address of memory structured as elem_t ARRAY[maxStrNum], where
         MaxStrNum is a maximium size of the string table.       

     
       
         
               
               
             
               
               
             
           
               
                   
               
             
             
               
                   
                 elem_t is the following structure: 
               
             
          
           
               
                   
                 typedef struct 
               
               
                   
                 { 
               
               
                   
                 short refCount; 
               
               
                   
                 char string []; 
               
               
                   
                 } 
               
               
                   
               
             
          
         
       
     
     The String Table stores all strings used by the IEM and other agents and enables their speedy access. It actually consists of N separate string tables for the storage of strings of different lengths and all entries are numbered where the number represents the offset or start position of the string in the table. 
     Each data element of the string table consists of the reference count of the string and the string itself (null-terminated). Reference count is the count of the number of attempts made to put the identical string into the string table subsystem (instead of actually making duplicate entries). That is, it is impossible for the string table xubsystem to have duplicate entries. 
     An attempt to delete a string causes its reference count to be decremented by one. If reference count becomes zero, the entry is considered as empty or deleted. Each string table keeps track of all deleted entries by having a linked list of them. The most recently deleted entry is pointed to by the delList variable of the string table structure the value of which is it&#39;s offset. Each deleted entry consists of the offset of the next deleted entry followed by zero. 
     To speed up string retrieval each string table has an array of sorted pointers to the strings of the table where sorting is in the sense of the alphabetic order of the data. Access to the data is indirect i.e. pointers to the sorted pointers first and then to the data. The address of this array is stored in the dataPtrs variable of the string table structure. Elements (pointers) are inserted into dataPtrs array using binary insert algorithm. They are retrieved by using binary search algorithm. It allows maximum speed for insert/retrieve operations. 
     After initialization, all new strings are stored at offset stored in the sizevariable of the string table structure. 
     After some use when the string table is full and there is a list of deleted entries the first deleted entry from the list is reused. 
     If the number of strings in the string table stored in the
 
strNum variable=value of maxStrNum variable
 
     The system will attempt to place new strings into the next available string table. This must be done if there is a channel lineup change. Upon such a change, the system receives a channel lineup change notification. In other words, the controlling application, external EPG system, provides a notification of a channelLineUp change event to the underlying PDM. The PDM initiates the IEM agent to update the ChannelLineUp lists: Internal channelLineUp, MbtvChannelLineUp and SubscriptionChannelLineUp with the new information. The channel lineup is modified with the channel lineup change algorithm, which is outlined in the flowchart of  FIG. 4 . 
     The system first receives an event notification from the external EPG system of a change or imminent change (at specified TIME) in the channel lineup. The event notification does not include the details of the items change. Therefore, the algorithm must search and compare the changed external EPG and the internal channel lineup to see what modifications are required. The procedure is as follows. 
     After the procedure has been initiated at start  100 , the system obtains the count of available channels from the external EPG at step  101 . 
     All channel IDs and names (index) in the ChannelLineUp structure are then searched and checked against the new external EPG channelLineUp as follows: ChannelIds and corresponding channelNames are fetched from the new external EPG at  102 . 
     As indexes are used instead of name text strings, in the following processing, the index, chName-index, of each channel name is fetched from the string table. If chName is not found in the old list at  104 , it is added at  105  to the string table and an index obtained. 
     The routine cycles through steps  103 ,  104  and  105  until the string table is found to be complete at  106 . 
     Then the internal ChannelLineUp list is searched at  107  for the channelId and chName-index. There are four possible cases, as follows: 
     If the channelId (chId) is found and the corresponding chName-index matches with the index obtained above then there is no change in this channel data. 
     If the channelId (chId) is found, but the corresponding chName-index differs from the index obtained above, the name of the service with this chID entry is thus deemed changed and the entry must be prepared for deletion. 
     The channel information is first moved to the end of channelLineUp list and the flag field, TILL TIME, is set to signify that the chID is valid only until the time field. This move is made to make it easier for the search mechanism to find the item and delete it. 
     Next, the original chID position is filled with the channelName index obtained above, and the time is updated. The flag field is set to AFTER TIME to signify this channelID becomes valid i.e. after the time field. 
     If the ChName-index is found, but the corresponding chId differs, this is deemed to be a new chId and it is thus added to the channelLineUp list and a new index is obtained for it. 
     The channelLineUp list, chID entry, is updated with Time, chName-index, and the flag field is set to AFTER TIME. 
     If the chId is not found and the chName-index is not found, a new chName-index is created in the channelLineUp list with time, chName-index, and the flag is set to AFTER TIME. 
     The same process sequence holds true for all channel lineups. That is, once the ChannelLineUp list is updated, the Subscription ChannelLineUp and MbTV ChannelLineUp lists are then verified and updated as required using the same method. 
     In summary, the “channelLineUp” is a set of customized information structures that includes only the minimum necessary information and in a minimal format for efficient internal processing. It can be easily seen that the internal processing with the channel data channelLineUp provides a substantial simplification of the processing and adds efficiency with a limited amount of required processing power. 
     As noted in the introduction, an alternative would be to use the external EPG structure, which is designed primarily for GUI information presentation. Such processing would be much slower, use more memory and processing time. Copying, adapting, and processing for service-to-channel change management would be by far too complicated. 
     Management of any changes to the channel lineup is efficiently effected with the above-described service-to-channel change management algorithm. The algorithm handles all the possible changes that can arise in the channel lineup, such as, the addition of a new service, preparation for the removal and closing or the removal of closed service, re-allocation of services to different or multiple channels. Time and flag fields employed to accurately define the change occurrence. 
     The use of the indexed string table to store the channel names and related information provides for simplified localization of all the information at one point and the index provides easy access to the strings. 
     Text processing, e.g. checking existence of the name string using compare functions, can be done with the index (usually in simplified, i.e., brief form) instead of the text. This improves the speed and efficiency of the compare operation and memory space used. Both advantages are important for embedded systems. 
     The counter Reference_Count allows tracking of the usage, by multiple different agents, of a text string entry in the string table to avoid retention of redundant strings and avoid duplicating strings, one per use or agent, as a way of keeping track of the current ones. This helps minimize total memory allocation by allowing the use of a singular text-index table for all agents and allowing it to be managed efficiently. 
     Additional information concerning some internal EPG and string table software routines may be found in the copending application Ser. No. 09/893,192, specifically on pages 150 to 162. The copending application also describes a channel lineup update process on page 155 thereof.