The present invention generally relates to Universal Plug and Play (UPnP) search criteria and, more particularly, to a method, apparatus and system for parsing a UPnP search criteria to create generic search criteria.
Content can be stored on any number of different devices. Extracting such content from the different devices, however, can involve duplicate work as similar processes can be performed for each device. The most common solution to this problem is for an invoker to reparse and generate the UPnP search criteria based on the device that hosted the content. This solution, however, may not be applicable for all devices.
Embodiments of the present invention address the deficiencies of the prior art by providing a method, apparatus and system for intelligently parsing a UPnP search criteria and creating a structure that is understandable to any content provider. In accordance with the concepts of the present invention, each content provider can deal with a resulting structure of the present invention rather than parsing the UPnP search criteria and generating a respective, unique search statement.
In one embodiment of the present invention a method for parsing a UPnP search criteria to create generic search criteria includes dividing a universal plug and play search criteria into elements, assigning at least one element a designation and providing information regarding the assigned designation and an order of the at least one element within the universal plug and play search criteria, the information to be used for searching content.
In an alternate embodiment of the present invention, an apparatus for parsing a UPnP search criteria to create generic search criteria includes a memory for storing program routines and data and a processor for executing the program routines, the processor, when executing the program routines, configured to perform the steps of dividing a universal plug and play search criteria into elements, assigning at least one element a designation and providing information regarding the assigned designation and an order of the at least one element within the universal plug and play search criteria, the information to be used for searching content.
In an alternate embodiment of the present invention, a system for searching for content includes at least two content storage devices for storing content and a tokenizer including a memory for storing program routines and data and a processor for executing the program routines, the processor, when executing the program routines, configured to perform the steps of dividing a universal plug and play search criteria into elements, assigning at least one element a designation and providing information regarding the assigned designation and an order of the at least one element within the universal plug and play search criteria to the at least two content storage devices, the information to be used for searching content.
The teachings of the present invention can be readily understood by considering the following detailed description in conjunction with the accompanying drawings, in which:
It should be understood that the drawings are for purposes of illustrating the concepts of the invention and are not necessarily the only possible configuration for illustrating the invention. To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures.
The present invention advantageously provides a method, apparatus and system for parsing a UPnP search criteria and creating a search criteria structure that is understandable to a content provider. Although the present invention will be described primarily within the context of a content management system, the specific embodiments of the present invention should not be treated as limiting the scope of the invention. It will be appreciated by those skilled in the art and informed by the teachings of the present invention that the concepts of the present invention can be advantageously applied in any commercial or residential environment for managing content.
That is, in accordance with various embodiments of the present invention, the parsing of the UPnP search criteria is based on preserving the order of operations while identifying each element of the string. This occurs as a parsing method/algorithm maintains proper spacing within any quoted criteria and escape characters. In one embodiment of the present invention, during this process each element is extracted as it is parsed and compared to a list of keywords defined in the Service Template Version 1.01 document that defines correct UPnP search usage. That is, in an embodiment of the present invention, each element is compared to a list of keywords that defines correct universal plug and play search usage to ensure that each element comprises a proper search term.
In an exemplary embodiment of the present invention in which the tokenizer/structure creator 110 of the present invention receives a UPnP search criteria of ‘(upnp:actor=“Harrison Ford)”, the tokenizer/structure creator 110 of the present invention divides the search criteria into five (5) separate elements as follows:
In the embodiment of the invention described above, each element is run through a filter which assigns each element a designation. In one embodiment of the present invention, a designation is assigned by encapsulating the element in quotes, which ensures that the element is identified as a literal element. As such, the element must be identified literally (i.e., exactly) in a search. That is, in such an embodiment a search is performed by searching for the exact element in the searched content and, as described above, an order of the element within the universal plug and play search criteria is also preserved in the search. As also described above, in an alternate embodiment of the present invention prior to performing a search, each element is compared to a list of keywords that defines correct universal plug and play search usage to ensure that each element comprises a proper search term.
In one embodiment of the present invention, the tokenizer/structure creator 110 of the present invention creates a list of structures for performing a search using structures, each structure including at least the designation of the elements and an order of the elements within the UPnP search criteria. For example, in the embodiment of the system 100 of
Again, although the tokenizer/structure creator 110 of
At step 304, each element of the divided search criteria is assigned a designation in accordance with at least one of the embodiments described above. The method 300 then proceeds to step 306.
At step 306, information regarding the assigned designation and an order of the at least one element within the universal plug and play search criteria is provided to, for example an invoker of the search, the information to be used for searching content. The method 300 can then be exited.
Optionally, at step 303 (dotted lines), each element is compared to a list of keywords that defines correct universal plug and play search usage to ensure that each element comprises a proper search term.
In addition, optionally, at step 305 (dotted lines), a list of structures is created, each one containing a key element, its order with the UPnP search criteria, and its designation, which in one described embodiment can include a definition of the element as it pertains to the Service Template Document. Such a list of structures can then be communicated to an invoker of a search for performing a search for content.
Having described various embodiments for a method, apparatus and system for parsing a UPnP search criteria and creating a search criteria structure that is understandable to a content provider (which are intended to be illustrative and not limiting), it is noted that modifications and variations can be made by persons skilled in the art in light of the above teachings. It is therefore to be understood that changes may be made in the particular embodiments of the invention disclosed which are within the scope and spirit of the invention. While the forgoing is directed to various embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof.
This application claims priority from U.S. Provisional Application No. 61/429,578 filed Jan. 4, 2011.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/US11/58521 | 10/31/2011 | WO | 00 | 9/20/2013 |
Number | Date | Country | |
---|---|---|---|
61429578 | Jan 2011 | US |