`(12) Patent Application Publication (10) Pub. No.: US 2001/0047262 A1
`Kurganov et al.
`(43) Pub. Date:
`Nov. 29, 2001
`
`US 20010047262A1
`
`(54) ROBUST VOICE BROWSER SYSTEMAND
`VOICE ACTIVATED DEVICE CONTROLLER
`
`provisional application No. 60/233,068, filed on Sep.
`15, 2000.
`
`(76)
`
`(21)
`(22)
`
`(63)
`
`Inventors: Alexander Kurganov, Buffalo Grove,
`IL (US); Valery Zhukoff, Deerfield, IL
`(US)
`Correspondence Address:
`JENKENS & GILCHRIST
`3200 Fountain Place
`1445 ROSS Avenue
`Dallas, TX 75202-2799 (US)
`Appl. No.:
`09/776,996
`
`Filed:
`
`Feb. 5, 2001
`Related U.S. Application Data
`Non-provisional of provisional application No.
`60/180,344, filed on Feb. 4, 2000. Non-provisional of
`
`Publication Classification
`
`(51) Int. Cl. ................................................. G10L 21/00
`(52) U.S. Cl. .......................................................... 704/270.1
`
`(57)
`
`ABSTRACT
`
`The present invention relates to a System for acquiring
`information from Sources on a network, Such as the Internet.
`A Voice browsing System maintains a database containing a
`list of information Sources, Such as web sites, connected to
`a network. Each of the information Sources is assigned a
`rank number which is listed in the database along with the
`record for the information Source. In response to a speech
`command received from a user, a network interface System
`accesses the information Source with the highest rank num
`ber in order to retrieve information requested by the user.
`
`114
`
`
`
`
`
`WEBSITE 2
`
`WEBSITEN
`
`
`
`WEBBROWSING
`SERVER
`
`
`
`WEB BROWSING
`SERVER
`
`
`
`Patent Application Publication Nov. 29, 2001 Sheet 1 of 4
`
`US 2001/0047262 A1
`
`114
`
`<>
`
`WEBSITE 1
`
`WEBSITE 2
`
`WEBSITE N
`
`
`
`--
`
`108
`
`72.
`FIREWAL
`
`--
`
`102 2 WEB BROWSNG
`SERVER
`
`WEBBROWSING | 2-102
`SERVER
`
`104
`
`TCP/IP
`r
`FIREWAL
`
`C D
`| DATABASE
`
`|
`
`100
`
`106
`
`MEDIA
`SERVER
`
`
`
`MEDIA
`SERVER
`
`T1 INE
`
`
`
`Patent Application Publication Nov. 29, 2001 Sheet 2 of 4
`
`US 2001/00472.62 A1
`
`200
`
`RANK
`NUMBER
`
`EXTRACTIONAGENT
`COMMAND
`
`TIMESTAMP
`
`202
`
`204
`
`206
`
`208
`
`6
`
`
`
`SPEECHRECOGNITION
`ENGINE
`
`SPEECH SYNTHESIS
`ENGINE
`
`IVRAPPLICATION
`
`CAL PROCESSING SYSTEM
`
`TELEPHONY AND VOICE
`HARDWARE
`
`MEDIASERVER
`
`300
`
`302
`
`304
`
`306
`
`308
`
`FIG. 3
`
`
`
`Patent Application Publication Nov. 29, 2001 Sheet 3 of 4
`
`US 2001/0047262 A1
`
`
`
`102
`
`CONTENTEXTRACTION
`AGENT
`
`CONTENT FETCHER
`
`POLLING AND RANKINGAGENT
`
`400
`
`402
`
`404
`
`CONTENT DESCRIPTOR FILES
`
`406
`
`WEB BROWSNG SERVER
`
`FIG. 4
`
`
`
`Patent Application Publication Nov. 29, 2001 Sheet 4 of 4
`
`US 2001/0047262 A1
`
`500
`
`SECURITY
`SYSTEM
`
`INDOOR
`LIGHTING
`
`OUTDOOR
`LIGHTING
`
`TV
`
`-
`
`VCR
`
`O. d O
`
`DEVICEN
`
`DATABASE
`
`506
`
`DEVICE
`BROWSING
`SERVER
`
`TCP/IP
`
`DEVICE
`BROWSNG
`SERVER
`
`
`
`506
`
`MEDIA
`SERVER
`
`MEDIA
`SERVER
`
`510
`
`T1LINE
`
`510
`
`512
`
`
`
`US 2001/0047262 A1
`
`Nov. 29, 2001
`
`ROBUST VOICE BROWSER SYSTEMAND VOICE
`ACTIVATED DEVICE CONTROLLER
`
`CROSS-REFERENCE TO RELATED
`APPLICATIONS
`0001. This application claims the benefit of priority from
`U.S. Provisional Application Ser. No. 60/180,344, filed Feb.
`4, 2000 entitled “Voice-Activated Information Retrieval
`System” and U.S. Provisional Application Ser. No. 60/233,
`068, filed Sep. 15, 2000 entitled “Robust Voice Browser
`System and Voice Activated Device Controller”.
`
`FIELD OF THE INVENTION
`0002 The present invention relates to a robust and highly
`reliable system that allows users to browse web sites and
`retrieve information by using conversational Voice com
`mands. Additionally, the present invention allows users to
`control and monitor other Systems and devices that are
`connected the Internet or any other network by using voice
`commands.
`
`BACKGROUND OF THE INVENTION
`Currently, three options exist for a user who wishes
`0.003
`to gather information from a web site accessible over the
`Internet. The first option is to use a desktop or a laptop
`computer connected to a telephone line via a modem or
`connected to a network with Internet acceSS. The Second
`option is to use a Personal Digital Assistant (PDA) that has
`the capability of connecting to the Internet either through a
`modem or a wireleSS connection. The third option is to use
`one of the newly designed web-phones or web-pagers that
`are now being offered on the market. Although each of these
`options provide a user with access to the Internet to browse
`web sites, each of them have their own drawbacks.
`0004. Desktop computers are very large and bulky and
`are difficult to transport. Laptop computerS Solve this incon
`Venience, but many are still quite heavy and are inconve
`nient to carry. Further, laptop computers cannot be carried
`and used everywhere a user travels. For instance, if a user
`wishes to obtain information from a remote location where
`no electricity or communication lines are installed, it would
`be nearly impossible to use a laptop computer Oftentimes,
`information is needed on an immediate basis where a
`computer is not accessible. Furthermore, the use of laptop or
`desktop computers to access the Internet requires either a
`direct or a dial-up connection tan an Internet Service Pro
`vider (ISP). Oftentimes, such connections are not available
`when a user desires to connect to the Internet to acquire
`information.
`0005 The second option for remotely accessing web sites
`is the use of PDAS These devices also have their own set of
`drawbacks. First, PDAs with the ability to connect to the
`Internet and access Web Sites are not readily available. As a
`result, these PDAs tend to be very expensive. Furthermore,
`users are usually required to pay a special Service fee to
`enable the web browsing feature of the PDA. A further
`disadvantage of these PDAS is that web sites must be
`Specifically designed to allow these devices to acceSS infor
`mation on the web site. Therefore, a limited number of web
`sites are available that are accessible by these web-enabled
`PDAS. Finally, it is very common today for users to carry
`cell phones, however, users must also carry a separate PDA
`
`if they require the ability to gather information from various
`Web Sites Users are therefore Subjected to added expenses
`Since they must pay for both cellular telephone Service and
`also for the web-enabling service for the PDA. This results
`in a very expensive alternative for the consumer.
`0006 The third alternative mentioned above is the use of
`web-phones or web-pagers. These devices Suffer many of
`the same drawbacks as PDAS. First, these devices are
`expensive to purchase. Further, the number of Web Sites
`accessible to these devices is limited Since web sites must be
`Specifically designed to allow access by these devices.
`Furthermore, users are often required to pay an additional
`fee in order to gain wireleSS web access Again, this Service
`is expensive. Another drawback of these web-phones or
`web-pagers is that as technology develops, the methods used
`by the various web sites to allow access by these devices
`may change. These changes may require users to purchase
`new web-phones or web-pagers or have the current device
`Serviced in order to upgrade the firmware or operating
`system stored within the device. At the least, this would be
`inconvenient to users and may actually be quite expensive.
`0007. Therefore, a need exists for a system that allows
`users to easily acceSS and browse the Internet from any
`location. Such a System would only require users to have
`access to any type of telephone and would not require users
`to Subscribe to multiple Services.
`0008. In the rapidly changing area of Internet applica
`tions, web sites change frequently. The design of the web
`site may change, the information required by the web site in
`order to perform Searches may change, and the method of
`reporting Search results may change. Web browsing appli
`cations that Submit Search requests and interpret responses
`from these web sites based upon expected formats will
`produce errors and useleSS responses when Such changes
`occur. Therefore, a need exists for a System that can detect
`modifications to Web Sites and adapt to Such changes in order
`to quickly and accurately provide the information requested
`by a user through a voice enabled device, Such as a tele
`phone.
`0009. When users access web sites using devices such as
`personal computers, delays in receiving responses are tol
`erated and are even expected, however, Such delays are not
`expected when a user communicates with a telephone. Users
`expect communications over a telephone to occur immedi
`ately with a minimal amount of delay time Auser attempting
`to find information using a telephone expects immediate
`responses to his Search requests. A System that introduces
`too much delay between the time a user makes a request and
`the time of response will not be tolerated by users and will
`lose its usefulness. Therefore, it is important that a voice
`browsing System that uses telephonic communications
`Selects web sites that provide rapid responses Since Speed is
`an important factor for maintaining the System's desirability
`and usability. Therefore, a need exists for a System that
`accesses web sites based upon their speed of operation.
`
`SUMMARY OF THE INVENTION
`0010. It is an object of an embodiment of the present
`invention to allow users to gather information from web
`Sites by using voice enabled devices, Such as wireline or
`wireleSS telephones.
`
`
`
`US 2001/0047262 A1
`
`Nov. 29, 2001
`
`0.011) An additional object of an embodiment of the
`present invention is to provide a System and method that
`allows the Searching and retrieving of publicly available
`information by controlling a web browsing Server using
`naturally spoken Voice commands.
`0012. It is an object of another embodiment of the present
`invention to provide a robust voice browsing System that can
`obtain the same information from several web sites based
`upon a ranking order. The ranking order is automatically
`adjusted if the System detects that a given web site is not
`functioning, is too slow, or has been modified in Such a way
`that the requested information cannot be retrieved any
`longer.
`0013 A still further object of an embodiment of the
`present invention is to allow users to gather information
`from web sites from any location where a telephonic con
`nection can be made.
`0.014) Another object of an embodiment of the present
`invention is to allows users to browse web sites on the
`Internet using conversational voice commands spoken into
`wireleSS or wireline telephones or other voice enabled
`devices.
`0.015. An additional object an embodiment of the present
`invention is to provide a System and method for using voice
`commands to control and monitor devices connected to a
`network.
`0016. It is an object of an embodiment of the present
`invention to provide a system and method which allows
`devices connected to a network to be controlled by conver
`sational voice commands Spoken into any voice enabled
`device interconnected with the same network.
`0.017. The present invention relates to a system for
`acquiring information from Sources on a network, Such as
`the Internet. A Voice browsing System maintains a database
`containing a list of information Sources, Such as web sites,
`connected to a network. Each of the information Sources is
`assigned a rank number which is listed in the database along
`with the record for the information Source. In response to a
`Speech command received from a user, a network interface
`System accesses the information Source with the highest rank
`number in order to retrieve information requested by the
`USC.
`0.018. The a preferred embodiment of the present inven
`tion allows users to acceSS and browse web sites when they
`do not have access to computers with Internet access. This
`is accomplished by providing a voice browsing System and
`method that allows users to browse web sites using conver
`sational voice commands Spoken into any type of Voice
`enabled device (i.e., any type of wireline or wireless tele
`phone, IP phone, wireless PDA, or other wireless device).
`These spoken commands are then converted into data mes
`Sages by a speech recognition Software engine running on a
`user interface System. These data messages are then Sent to
`and processed by a network interface System. This network
`interface System then generates the proper requests that are
`transmitted to the desired web site over the Internet.
`Responses Sent from the Web Site are received and processed
`by the network interface System and then converted into an
`audio message via a speech Synthesis engine or a pre
`recorded audio concatenation application and finally trans
`mitted to the user's voice enabled device.
`
`0019. A preferred embodiment of the voice browser
`System and method uses a web site polling and ranking
`methodology that allows the System to detect changes in
`web sites and adapt to those changes in real-time. This
`enables the voice browser system of a preferred embodiment
`to deliver highly reliable information to users over any voice
`enabled device. This ranking System also enables the present
`invention to provide rapid responses to user requests. Long
`delays before receiving responses to requests are not toler
`ated by users of Voice-based Systems, Such as telephones
`When a user Speaks into a telephone, an almost immediate
`response is expected This expectation does not exist for
`non-voice communications, Such as email transmissions or
`accessing a web site using a personal computer. In Such
`Situations, a reasonable amount of transmission delay is
`acceptable. The ranking System of implemented by a pre
`ferred embodiment of the present invention ensures users
`will always receive the fastest possible response to their
`request.
`0020. An alternative embodiment of the present inven
`tion allows users to control and monitor the operation of a
`variety of household devices connected to a network using
`Speech commands spoken into a voice enabled device.
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`0021
`FIG. 1 is a depiction of the voice browsing system
`of the first embodiment of the present invention;
`0022 FIG. 2 is a block diagram of a database record used
`by the first preferred embodiment of the present invention;
`0023 FIG. 3 is a block diagram of a media server used
`by the preferred embodiment;
`0024 FIG. 4 is a block diagram of a web browsing server
`used by the preferred embodiment; and
`0025 FIG. 5 is a depiction of the device browsing system
`of the Second embodiment of the present invention.
`
`DETAILED DESCRIPTION OF THE
`PREFERRED EMBODIMENT
`0026. A first embodiment of the present invention is a
`System and method for allowing users to browse information
`Sources, Such as web sites, by using naturally spoken,
`conversational Voice commands spoken into a voice enabled
`device. Users are not required to learn a special language or
`command Set in order to communicate with the Voice
`browsing System of the present invention. Common and
`ordinary commands and phrases are all that is required for
`a user to operate the Voice browsing System The Voice
`browsing System recognizes naturally spoken Voice com
`mands and is speaker- independent, it does not have to be
`trained to recognize the Voice patterns of each individual
`user. Such speech recognition Systems use phonemes to
`recognize spoken words and not predefined Voice patterns.
`0027. The first embodiment allows users to select from
`various categories of information and to Search those cat
`egories for desired data by using conversational voice com
`mands. The voice browsing system of the first preferred
`embodiment includes a user interface System referred to as
`a media Server. The media Server contains a speech recog
`nition Software engine. This Speech recognition engine is
`used to recognize natural, conversational-voice commands
`
`
`
`US 2001/0047262 A1
`
`Nov. 29, 2001
`
`spoken by the user and converts them into data messages
`based on the available recognition grammar. These data
`messages are then Sent to a network interface System. In the
`first preferred embodiment, the network interface System is
`referred to as a web browsing server. The web browsing
`Server then accesses the appropriate information Source,
`Such as a web site, to gather information requested by the
`USC.
`0028 Responses received from the information sources
`are then transferred to the media Server where speech
`Synthesis engine converts the responses into audio messages
`that are transmitted to the user. A more detailed description
`of this embodiment will now be provided.
`0029) Referring to FIG. 1, a database 100 designed by
`Webley Systems Incorporated is connected to one or more
`web browsing servers 102 as well as to one or more media
`servers 106. The database may store information on mag
`netic media, Such as a hard disk drive, or it may store
`information via other widely acceptable methods for Storing
`data, such as optical disks. The database 100 contains a
`Separate Set of records for each web site accessible by the
`system. An example of a web site record is shown in FIG.
`2. Each web site record 200 contains the rank number of the
`web site 202, the associated Uniform Resource Locator
`(URL) 204, and a command that enables the appropriate
`“extraction agent'206 that is required in order to generate
`proper requests Sent to and to format data received from the
`web site. The database record 200 also contains the times
`tamp 208 indicating the last time the web site was accessed.
`The extraction agent is described in more detail below. The
`database 100 categorizes each database record 200 accord
`ing to the type of information provided by each web site. For
`instance, a first category of database records 200 may
`correspond to web sites that provide “weather' information.
`The database 100 may also contain a second category of
`records 200 for web sites that provide “stock' information.
`These categories may be further divided into Subcategories.
`For instance, the “weather category may contain Subcat
`egories depending upon type of weather information avail
`able to a user, Such as “current weather' or “extended
`forecast'. Within the “extended forecast” subcategory, a list
`of web site records may be stored that provide weather
`information for multiple days. The use of Subcategories may
`allow the web browsing feature to provide more accurate,
`relevant, and up-to-date information to the user by accessing
`the most relevant web site. The number of records contained
`in each category or Subcategory is not limited. In the
`preferred embodiment, three web site records are provided
`for each category.
`0030 Table 1 below depicts two database records 200
`that are used with the preferred embodiment. These records
`also contain a field indicating the “category of the record,
`which is “weather” in each of these examples.
`
`TABLE 1.
`
`category: weather
`URL: URL=http://cgi.cnn.com/cgi
`bin/weather/redirect?zip= zip
`rank: 1
`command: web dispatch.p1 weather cnn.
`browsingServer: wportall
`browsingServerBackup: wporta12
`
`TABLE 1-continued
`
`dateTime: Dec 21 2000 2:15PM
`category: weather
`URL: URL=http://weatherlycos.com/wcfiveday.asp?city=zip
`rank: 2
`command: web dispatch.p1 weather lycos
`browsingServer: wportal1
`browsingServerBackup: wportal2
`dateTime: Dec 21 2000 1:45PM
`
`0031. The database also contains a listing of pre-recorded
`audio files used to create concatenated phrases and Sentences
`Further, database 100 may contain customer profile infor
`mation, System activity reports, and any other data or
`Software servers necessary for the testing or administration
`of the Voice browsing System.
`0032) The operation of the media servers 106 will now be
`discussed in relation to FIG. 3. The media servers 106
`function as user interface Systems. In the preferred embodi
`ment, the media ServerS 106 contain a speech recognition
`engine 300, a speech synthesis engine 302, an Interactive
`Voice Response (IVR) application 304, a call processing
`system 306, and telephony and voice hardware 308 required
`to communicate with the Public Switched Telephone Net
`work (PSTN) 116. In the preferred embodiment, each media
`server is based upon Intel's Dual Pentium III 730 MHz
`microprocessor System.
`0033. The speech recognition function is performed by a
`Speech recognition engine 300 that converts Voice com
`mands received from the user's voice enabled device 112
`(i.e., any type of wireline or wireless telephone, Internet
`Protocol (IP) phones, or other special wireless units) into
`data messages. In the preferred embodiment, Voice com
`mands and audio messages are transmitted using the PSTN
`116 and data is transmitted using the TCP/IP communica
`tions protocol. However, one skilled in the art would rec
`ognize that other transmission protocols may be used for
`either voice or data. Other possible transmission protocols
`would include SIP/VoIP (Session Initiation Protocol/Voice
`over IP), Asynchronous Transfer Mode (ATM) and Frame
`Relay. A preferred Speech recognition engine is developed
`by Nuance Communications of 1380 Willow Road, Menlo
`Park, Calif. 94025 (www.nuance.com). The Nuance engine
`capacity is measured in recognition units based on CPU type
`as defined in the vendor Specification The natural Speech
`recognition grammars (i.e., what a user can say that will be
`recognized by the speech recognition engine) were devel
`oped by Webley Systems.
`0034) Table 2 below provides a partial source code listing
`of the recognition grammars used by the Speech recognition
`engine of the preferred embodiment for obtaining weather
`information
`
`TABLE 2
`
`WHAT IS the weather info information report conditions
`( (like in )
`
`UScities:n
`{<param1 $n.zip> <param2 $n.city> <param3
`$n. states
`( (area code) AREA CODE:n) {<param1 $ns}
`
`
`
`US 2001/0047262 A1
`
`Nov. 29, 2001
`
`TABLE 2-continued
`(AREA CODE:n (area code)) {<param1 $ns
`( (zip code) ZIP CODE:n) {<param1 $ns}
`(ZIP CODE:n (zip code)) {<param1 $ns}
`
`)
`
`“city' name or ZIP code in order to retrieve Chicago weather
`information. Additionally, the content description file for
`each Supported URL indicates the location on the web page
`where the response information is provided. The extraction
`agent 400 uses this information to properly extract from the
`web page the information requested by the user.
`0039 Table 3 below contains source code for a content
`extraction agent 400 used by the preferred embodiment.
`
`0035. The media server 106 uses recognition results
`generated by the Speech recognition engine 300 to retrieve
`a web site record 200 stored in the database 100 that can
`provide the information requested by the user. The media
`Server 106 processes the recognition result data identifying
`keywords that are used to search the web site records 200
`contained in the database 100 For instance, if the user's
`request was “What is the weather in Chicago'?”, the key
`words “weather” and “Chicago' would be recognized. A
`web site record 200 with the highest rank number from the
`“weather” category within the database 100 would then be
`selected and transmitted to the web browsing server 102
`along with an identifier indicating that Chicago weather is
`being requested.
`0.036 The media servers 106 also contain a speech syn
`thesis engine 302 that converts the data retrieved by the web
`browsing Servers 102 into audio messags that are transmitted
`to the user's voice enabled device 112 A preferred speech
`Synthesis engine is developed by Lernout and Hauspie
`Speech Products, 52. Third Avenue, Burlington, Mass. 01803
`(www.lhsl.com).
`0037. A further description of the web browsing server
`102 will be provided in relation to FIG. 4. The web
`browsing Servers 102 provide access to any computer net
`work such as the Internet 110 These servers are also capable
`of accessing databases Stored on Local Area Networks
`(LANs) or Wide Area Networks (WANs). The web browsing
`Servers receive responses from web sites and extract the data
`requested by the user. This task is also known as “content
`extraction.” The web browsing servers 102 also perform the
`task of periodically polling or “pinging various Web Sites
`and modifying the ranking numbers of these web sites
`depending upon their response and Speed. This polling
`feature is further discussed below. The web browsing server
`102 is comprised of a content extraction agent 400, a content
`fetcher 402, a polling and ranking agent 404, and the content
`descriptor files 406. Each of these are software applications
`and will be discussed below.
`0038. Upon receiving a web site record 200 from the
`database 100 in response to a user request, the web browsing
`server 102 invokes the “content extraction agent” command
`206 contained in the record 200. The content extraction
`agent 400 allows the web browsing server 102 to properly
`format requests and read responses provided by the web site
`114 identified in the URL field 204 of the web site record
`200. Each content extraction agent command 206 invokes
`the content extraction agent and identifies a content descrip
`tion file associated with the web page identified by the URL
`204. This content description the directs the extraction agent
`where to extract data from the accessed web page and how
`to format a response to the user utilizing that data. For
`example, the content description for a web page providing
`weather information would indicate where to insert the
`
`TABLE 3
`#!/usr/local/www/bin/sybper15
`#SHeader:
`fusr/local/cvsroot/webley/agents/service? web dispatch.p1.V
`1.6
`#Dispatches all web requests
`#http://wcorp.itn.net/cgi/flstat?carrier=ua&flight no=155&mo
`in abbr=jul&date=
`6&stamp=OhLN-PdbuuE*itnford, itn/cbfsprint hd
`#http://cgi.cnnfn.com/flightview/rlm?airline=amt&number300
`require "config timp.p1';
`#check parameters
`die “Usage: $0 service paramsun' if $#ARGV < 1:
`#print STDERR (a)ARGV:
`#get parameters
`my ($service, Gparam) (QARGV:
`#check service
`my %Services = (
`
`weather cnn =>'webget-p1 weather cnn.,
`weather lycos =>' webget-p1
`
`weather weather => webqet-p1
`weather snap => webget-p1
`
`weather infospace => webget-p1
`
`stockQuote yahoo => webget-p1 stock,
`fliqhtStatus itn => webget-p1
`
`weather lycos,
`
`weather weather,
`weather snap
`weather infospace,
`
`flight delay,
`
`yellowPages yahoo => yp data p1,
`yellowPages yahoo => yp data p1,
`newsHeaders newsreal => news.p1,
`newsArticle newsreal => news-p1,
`
`# test param
`my Sdate = date;
`chop ($date);
`my (Sshort date ) = $date =~ As+(\w{3}\s+\d{1,2})\s+/;
`my '7%Test = {
`weather cnn => 6.0053,
`weather lycos => 6.0053,
`weather weather => 6.0053,
`weather snap > 6.0053,
`weather infospace => 6.0053,
`stockQuote yahoo => msft,
`flightStatus itn => “ua 155 .
`
`$short date,
`
`yellowPages yahoo => tires 60015,
`newsHeaders newsreal => 1,
`newsArticle newsreal a 1 1,
`die “Sdate: $0: error: no such service: $service (check this
`script) \n'
`unless $Services Sservice ;
`#prepare absolute path to run other scripts
`my (Spath, Sscript ) = SO =~ mO(..*/) (O);
`#store the service to compare against datatable
`my $service stored = $service;
`#run service
`while( ( Sresponse Spath$Services Sservice (Gparam) )
`{
`# response failed
`# check with test parameters
`$response = Spath$Services {Sservice STest Sservice
`};
`print “test: Spath$Services {Sservice STest Sservice
`
`
`
`US 2001/0047262 A1
`
`Nov. 29, 2001
`
`TABLE 3-continued
`
`if (Sresponse ) }
`$service =&switch service($service );
`print “Wrong parameter values were supplied:
`
`#
`Sservice -
`(Gparam\n';
`# Odie “Sdate: $0: error: wrong parameters: $service
`(Gparam\n';
`
`else {
`#change priority and notify
`$service = &increase attempt.($service);
`
`TABLE 3-continued
`
`priority)
`
`-> 0 route };
`die “Sdate: $0: error: there is the only service:
`$route (add
`more) \n'
`if (Sroute eq“Sscript $service'
`or Sroute eq“Sscript $service stored );
`$service name, $service ) = split (NS+/, Sroute );
`die “Sdate: SO: error: no route for the service:
`$service (add
`more)\n'
`unless $service;
`return $service;
`
`# output the response
`print Sresponse;
`Sub increase attempt {
`my ($service ) =G) ;
`/, $service);
`my ($service name ) = split ( /
`print STDERR “Sdate: $0: attin: changing priority for
`service:
`Sservicewn:
`# update priority
`&db query( "update mcServiceRoute
`"set priority = (select max(priority)
`
`from
`mcServiceRoute
`
`.”where service = $service name) + 1,
`"date = getdate().
`.“attempt = attempt + 1
`.“where route = $script $service');
`# print "---Sroute===\n';
`O# find new route
`Omy Sroute = G{&db query("select route from
`mcServiceRoute
`
`.."where service =
`
`Sservice name
`
`priority)
`
`.“and attempt < 5’
`."order by
`-> 0 route };
`&db query( "update mcServiceRoute
`.“set attempt = 0
`.“where route = $script $service” )
`if (Sroute eq“Sscript $service'
`or Sroute eq“Sscript $service stored );
`($service name, Sservice ) =split (NS+/, Sroute );
`die “Sdate: SO: error: no route for the service:
`$service (add
`more) \n'
`Ounless $service;
`return $service;
`sub switch service {
`my ($service ) =
`/, $service);
`my ($service name ) = split ( /
`print STDERR “Sdate: $0: attin: changing priority for
`service:
`Sservicewn:
`# update priority
`&db query( "update mcServiceRoute
`"set priority = (select max(priority)
`
`from
`mcServiceRoute
`
`.“where service = $service name) + 1,
`"date = getdate()
`.“where route = $script $service');
`# print "---Sroute===\n';
`# find new route
`my Sroute = G{&db query("select route from
`mcServiceRoute
`
`Sservice name
`
`.."where service =
`
`.“and attempt < 5’
`."order by
`
`0040 Table 4 below contains source code of the content
`fetcher 402 used with the content extraction agent 400 to
`retrieve information from a web site.
`
`TABLE 4
`
`#SHeader:
`fusr/local/cvsroot/webley/agents/service/Webget-p1v 1.4
`# Agent to get info from the web.
`# Parameters: service name service parameters, i.e. stock
`msft or weather
`60645
`# Configuration stored in files service name.ini
`# if this file is absent the configuration is received from
`mcServices table
`# This script provides autoupdate to datatable if the .ini
`file is newer.
`
`use URI:URL:
`use LWP:User Agent;
`use HTTP:Request::Common;
`use Vail::Varlist:
`use Sybase::CTlib;
`use HTTP:Cookies:
`#print “Sybase:CTlib SDB USR, SDB PWD, SDB SRV:”:
`open (STDERR, '>>$0.log) if Sdebug:
`# open(STDERR, ">&STDOUT”);
`Slog date;
`# Sresponse furlp1
`http://cgi.cnn.com/cgi-bin/weather/redirect?zip= 60605;
`#Sresponse = pwd:
`#print STDERR “pwd=Sresponsen';
`#Sresponse 1s:
`print STDERR “1s=Sresponsen':
`chop(Slog):
`hop(Slog):
`
`my $service = shift:
`Slog. = “Sservice:”. join( : , (GARGV). “\n';
`print STDERR Siog if Sdebug:
`#Sresponse = .?ur1p1
`“http://cgi.cnn.com/cgi-bin/weather/redirect?zip=60605”;
`my (Gini = &read ini( Sservice);
`chop(Gini);
`my $section = “ ”;
`do Ssection &process section ($section ) while $section;
`#Sresponse = .?ur1p1
`“http://cgi.cnn.com/cgi-bin/weather/redirect?zip=60605”;
`exit;
`##############################
`Sub read ini {
`my ($service ) = (G) ;
`my (Gini = ();
`# first, try to read file
`
`
`
`US 2001/0047262 A1
`
`NOV. 29, 2001
`
`TABLE 4-c0ntinued
`
`TABLE 4-continued
`
`die “webget.p1: DB select from mcServices failed\n” if
`$dbh—>{RC }
`== CS,FAIL;
`die “webget.p1: Unable to find service $service\n”
`unless ( defined
`@rowirefs );
`$row,refs[ 0 ]—>{‘config’}=~ [] s/\n /\n\r/g;
`@ini = split( /\r/, $rowirefs[ 0 ]—>{‘config’ });
`return @ini;
`}############################
`sub processisection {
`my ( $previsection ) = @7;
`my ( $section, $output, $content );
`my %Param;
`my %Content;
`# print"################################\n";
`foreach ( @ini) {
`# print;
`chop;
`s/\s+$//;
`s/O\s+//;
`# get section name
`if ( /\O[(.*)\]/) {
`# print “$7: $section:$prev,section\n”;
`last if $section;
`neXt if $1 eq “print”;
`# neXt if $previsection ne
`ne $1;
`if ( $previsection eq $1 ) {
`$previsection = “ ”;
`neXt;
`
`and $previsection
`
`“ w
`
`}$
`
`section = $1;
`
`}#
`
`get parameters
`push( @{$Param{$1 }}, $2 ) if $section and
`/([O +)=(-*)/;
`0}
`# print“++++++++++++++++++++++++++++++++++\n";
`Oreturn 0 unless $section;
`# print “section $section\n”;
`O#substitute parameters with values
`Omap {$Param{URL }—>[ 0 ] =~ s/$Param{Input }—>[ S,
`]/$ARGV[ $7
`]/g
`
`. $#{$Param{Input }};
`.
`}0 .
`#get page content
`( $Content{‘TIME’ }, $content ) = &get,ur1,content(
`${$Param{URL
`Hi 0 ] );# filter it
`map {
`if (/\“([O\”]+)\“([O\”]*)\”/ or
`/\/([O\/]+)V([O\/]*)V/)
`my $out = $2; $content s/$1/$out/g;
`
`}
`}@{$Param{“Pre-filter” }};
`#print STDERR $content;
`#do main regular expression
`unless( @values = $content =~
`/${