Information delivery system and method5802518Abstract The secure electronic distribution of research documents over the world wide web to investors who are authorized to receive said research documents. A repository server receives research documents from contributors. Also received are corresponding document profiles with information relating to each research document including authorization information specifying who is permitted to access each research document. The repository server includes a first database for structured query searches and a second database for full text searches. A web server is coupled to the repository server and coupled to the world wide web. The web server receives requests from investors for research documents that satisfy a query. The web server determines whether the first database or the second database should be searched based upon the type of query. The repository server transmits to the web server a list of research documents that satisfy the query and which the investor is authorized to access according to the authorization information. The web server formats the list of documents according to a template form. Optionally, queries can be optimized. The system has a control mechanism to prevent concurrent unauthorized access by two people using the same ID/password combination. Claims What is claimed is: Description FIELD OF INVENTION
______________________________________
for (all the groups in the investor's allowed group list) do
begin
if (group is in the query contributor restriction)
and group is in database)
then add group to the allowed list
end
for (all the groups in the database) do
begin
if (group is in the query's contributor restriction)
and group is not in the investor's allowed list)
then add group to the disallowed list
end
if (allowed groups list is empty)
then deny request
else if (disallowed groups list is empty)
then no restriction
else if (decisionFunction (allowed list, disallowed list))
then restrict to groups in allowed list
else restrict to groups not in disallowed list
______________________________________
The "decisionFunction" selects the shorter of the two lists, namely, allowed list and disallowed list. This optimization is more efficient when the database's content is close from the investor authorization, since it works by trimming the unnecessary restrictions for groups without reports in the database. To improve the efficiency of this optimization when the number of groups in the database grows, the records could be dispatched to different tables based on groups and the same optimization algorithm could be used to select the appropriate table and generate a different restriction clause for every table targeted. 2. Optimization of sorted queries The purpose of the sorted queries optimizer is to provide the investor with a fast answer even when the number of elements to sort is substantial. Unlike other applications used in memory sorting, database sorting can rely on a buffer being swapped in and out to disk from the main memory. When the number of items to sort becomes significant, these I/O operation can consume a lot of time. When an investor submits a query via the Internet, the repository server 2 via the web server 4 returns the first hundred rows by default, the most recent reports being displayed first. The actual query result may contain thousand of reports. Thus, to display the hundred most recent reports, the database has to sort the whole result set before returning any answer. In order to provide the investor with a quick answer, the sorted queries optimizer will try to run multiple queries, each for a smaller subset of the query. If the query has to be sorted by the report's date, the sorted queries optimizer divides the requested time period of the query definition into multiple chunks and executes the same query restricted to every chunk. Accordingly, the sorted queries optimizer does not disturb the sorting order. Based upon tests of real data sets, it was found that it was more efficient to perform only two queries, rather than a lot of them. The first query is performed on the first 10th of the time period, the second one on the remainder period. For some typical queries, the second subquery execution is unnecessary since the first query had already returned the number of rows requested by the investor. For database 13, the retrieving of a count is orders of magnitude faster than retrieving the full result set. The present invention takes advantage of this characteristic to give an immediate feedback to the investor. As soon as a query is submitted, the present invention performs a count and sends this information to the web server 4. The web server 4 can take advantage of this feature to return that information to the Internet browser by flushing it's internal buffers. That way, even when the retrieval of the result set takes tens of seconds, the investor gets some feedback in seconds. Ideally, the sorted queries optimizer is used only for sorted queries and when the number of rows is above a given threshold. The present invention uses the result of the count to trigger the sorted query optimization. The following pseudo code describes the code used to implement the sorted queries optimizer:
______________________________________
Retrieve the count
if (Query is sorted by a time) and (count >= threshold) then
begin
if (query definition contains a time range)
then get the time range from the query definition
else use an appropriate default value
add the restriction for 1/10.sup.th of the time range
retrieve the first rows
rows.sub.-- still.sub.-- to.sub.-- fetch = rows.sub.-- requested -
rows.sub.-- already.sub.-- fetched
if (rows.sub.-- still.sub.-- to.sub.-- fetch > 0)
begin
add the restriction for remainder of the time range
retrieve rows.sub.-- still.sub.-- to.sub.-- fetch rows
end
end
______________________________________
This optimization significantly improves the response time when the time to perform the additional query is negligible compared to the time necessary to sort the full set. The communication delay inherent in the connection between the Internet browser and the web server 4 may also introduce additional delays hiding some of the optimization benefits. Templates: According to the present invention, the web server 4 executes a research access program. The research access program provides a mechanism that enables an investor to access the information in the databases 11, 13. The research access program also implements an Internet CGI, which accepts input parameters from HTML forms, and then using templates forms, generates HTML pages comprising information retrieved from the databases 11, 13. The template forms are written in a novel computer language, called herein a "research access language" (or RAL) that describes how to integrate the information retrieved from the databases 11, 13 into this form. The template forms include RAL elements, as discussed in detail below. The present invention allows investors to submit queries and receive in response thereto a list of reports that satisfy the queries. The queries are constructed from one or more search parameters, including: which contributing company published the report; which stock symbols figure prominently in the report; when the report was published; what industries are featured in the report; and keyword search parameters. An investor may enter search parameters at a user computer 6, 8 via a web page provided by the web server 4. When the investor selects the "submit" button on the web page, the search parameters are forwarded by the Internet browser to the web server 4. The search parameters are used to form a query. The query is submitted to the appropriate database 11, 13 and a list of matching documents is generated. This list is formatted on the web server 4 into HTML form, and sent to the investor at the user computer 6, 8, where the investor's Internet browser displays the list to the investor. The input to the research access program of the present invention comes from HTML forms completed by investors. The fields that can be searched on for document queries (and the expected values of such fields) include: date: A date range from "today" backwards, matching a document's official release date. Possible values include:
______________________________________
0 Today
1 Last 2 Days
2 ThisWeek
3 Last 7 Days
5 Last 14 Days
7 This Month
8 Last 30 Days
10 All Dates
12 Last 60 Days
13 Last 90 Days
______________________________________
ticker: A field for ticker symbols. query: A field for "free text" for searches of the document text. Logical expressions can be used, including the ampersand (`&`) for a logical `and`, and the pipe character (`.vertline.`) for a logical `or`. Parenthesis can be used for grouping expressions, and double quotes can be used to group words into phrases. All free text searches are not case sensitive. For example:
______________________________________
microsoft Find documents with `microsoft`
in their text.
ibm & microsoft
Find documents with `ibm` and
`microsoft` in their text.
ibm .vertline. microsoft
Find documents with either `ibm`
or `microsoft` in their text.
ibm & Find documents with `ibm`,
( microsoft and either `microsoft` or
.vertline. apple )
`apple` in their text.
"earnings report"
Find documents with the phrase
`earnings report` in their text.
______________________________________
contributors: A field for a comma separated list of contributor ID's. industries: A field for a comma separated list of industry ID's. There are a number of options for displaying information to an investor. Some of these options are based on technical limitations (such as line speed), while others are based on the preferences of the investor (e.g., tabular output, prose, etc.). In order to react quickly to changes in display requirements, the research access program of the present invention utilizes template forms to format HTML pages comprising search results. According to the present invention, information retrieved from the databases 11, 13 is placed in HTML page format according to changeable template forms for said HTML pages. Thus, input (included in the HTML forms completed by investor) to the research access program of the present invention from an investor can include view mode parameters relating to the format in which the investor wishes to receive the search results and other information. By supplying view mode parameters, the investor can indicate to the web server 4 the desired format of information, including how many records of information are displayed. View mode parameters (and expected values) include: FT: Form Type. Expected values are `L` for `list format`, `T` for `table format`, and `D` for double line format. viewmode: This field indicates whether all records that are returned by a query should be displayed (within reason--in the representative embodiment, there is a display limit of 1000 records), or whether the number of records display should be limited to a predetermined number. If the `viewmode` value is set to `all`, then all records will be displayed. Otherwise, the number of records displayed will be limited to the predetermined number. To submit a query, the user completes the fields discussed above and then selects a "submit" button. When an investor submits a query, the name and value of the HTML form `submit` button selected are treated as input. In the representative embodiment, if the following strings appear in the `name` of the submit button, they are treated in the following manner: submit: Make a query according to the parameters listed above. bboard: Same as submit, except that the query formulated includes the requirement that only documents recently received at the repository server 2, e.g. since midnight, be returned. long: Change the view mode to a double line format. short: Change the view mode to a list format. table: Change the view mode to a table format. summary: Same as submit, but also requests generation of a summary list, breaking down the number of documents that match the query by submitting contributor, and the document type (research document, or morning call note). In addition, generates stored HTML files for each contributor in the summary, with one listing of the individual research documents, and another for the individual morning call notes. In the summary list, generates links to the stored HTML files. notes: Same as summary. all: Change the view mode to view all documents. last: Change the view mode to view the 100 most recent documents. query: Generate a query form for the user. count only: Display the number of documents that match the query that matches the current parameters. company search: Generate a list of companies (named symbols), and place the list in a form from which the user can choose a company to perform a search upon. choose symbol: Generate a query form for the user, pre-setting the ticker input item to the value selected from a symbol list. The program output, of course, depends upon the input including which `submit` button was selected by the user. The user's choice of a submit button determines which template will be chosen for output. Additionally, templates may be preset for a user or a group of users. Thus, all users from a particular company or geographic area may be assigned one group of templates and all users from another company or geographic area may be assigned another group of templates. Once a template file is opened, the characters in it are passed directly through to standard output (the normal CGI output channel), until an RAL element is encountered. In that case, the RAL element is processed according to the rules set forth below, and the output from the RAL element is also sent to standard output, inserted into the stream of characters in the template. The following are examples of templates that may be used: resultrl.tpl: List form output for a query. resultrd.tpl: Double line output for a query. resultrt.tpl: Table form output for a query. resultcl.tpl List form output for a query, broken down by contributor and document type during a summary. resultcd.tpl Double line output for a query, broken down by contributor and document type during a summary. resultct.tpl Table form output for a query, broken down by contributor and document type during a summary. resultq.tpl Query form. resultx.tpl Query count. resulti.tpl Symbol Guide form. resultt.tpl Standard HTTP header prepended to each of these templates. bboardrl.tpl: List form output for a bulletin board. bboardrd.tpl: Double line output for a bulletin board. bboardrt.tpl: Table form output for a bulletin board. bboardcl.tpl List form output for a bulletin board, broken down by contributor and document type during a summary. bboardcd.tpl Double line output for a bulletin board, broken down by contributor and document type during a summary. bboardct.tpl Table form output for a bulletin board, broken down by contributor and document type during a summary. If a query is submitted with no parameters filled in, the query is termed a bulletin board query and requests the most recently available documents on all subjects. Research Access Language The following is a description of the RAL of the present invention. RAL elements begin with a start token, finish with an end token, and contain attributes in between. The start token is followed by a "white space" character. Attributes are indicated by the name of the attribute, followed by an equals sign ("="), followed by the value of the attribute. An attribute name consists of consecutive alphabetic characters. An attribute value consists of consecutive non-white space characters, unless it is enclosed by double quotes, in which case it consists of all characters enclosed in a pair of double quotes. An end token contained within a non-quoted attribute value will truncate the attribute value, and the language element. The following is a syntax description of an RAL element:
__________________________________________________________________________
start-token
:= "{mx" <white-space>
white-space
:= (any ASCII character value between 1 and 32, inclusive)
end-token
:= "}"
attribute := <attribute-name> "=" <attribute-value>
attribute-name
:= "end" .vertline. "name" .vertline. "true" .vertline. "width"
.vertline. "align" .vertline. "start" .vertline. "false" .vertline.
"empty"
.vertline. "match" .vertline. "format" .vertline. "select"
.vertline. "quotes"
attribute-value
:= <double-quotes> <any-characters> <double-quotes> .vertline.
<any-non-
white-characters (except end-token)>
Examples:
{mx name=headline align=left width=50}
{mx start = documents}
{mx name=synopsis match=1 true=Yes false=""}
__________________________________________________________________________
Attribute Names align The `align` attribute specifies the alignment of the output from the current element, within the width indicated by the `width` attribute in the element. Possible values: left (default) center right See also: width empty The `empty` attribute specifies what should be displayed as output for the current element, if the evaluated output for the element (before padding or alignment) is an empty string. This attribute is different from others, in that it remains in effect for all following language elements, until its value is changed. Possible values: (Any string. Use " " to indicate an empty string.) end The `end` attribute marks the end of a loop. The attribute value indicates which type of loop the current element marks the end of. Possible values: document contributorlist industrylist symbollist See also: start false The `false` attribute specifies a string value to be displayed as output for the current element if the evaluated value for the `name` attribute does NOT match the value of the `match` attribute. This string may also use the `%s` feature described under `format`. Possible values: (Any string. Use " " to indicate an empty string.) See also: match, true, format format The `format` attribute specifies simple output formatting for output of the current element. Its format is the same as a C language printf() format string, but allows only string formatting (%s), and only one occurrence of that within the format string. The evaluated value of the element, as a string, is used as the value to fill the `%s` in the formatting string. Some examples are:
______________________________________
Format string
Element Value
Output Result
______________________________________
"%s" "ABC Corp." "ABC Corp."
"%15s" "ABC Corp." "ABC Corp."
"%-15s" "ABC Corp." "ABC Corp."
"%5.5s" "ABC Corp." "ABC C"
"%s Documents"
"ABC Corp." "ABC Corp. Documents"
______________________________________
Possible values: (Any valid C printf() formatting string.) See also: align, width match The `match` attribute specifies a value which the RAL processor will compare to the evaluated result from the `name` attribute. If the two values match exactly, then the output from the current element will be the string specified by the `true` attribute, otherwise the output will be the string specified by the `false` attribute. Some examples are:
______________________________________
Match True False Element Value
Output
______________________________________
"1" "Synopsis"
"" "0" ""
"1" "Synopsis"
"" "1" "Synopsis"
______________________________________
Possible values: (Any valid string. Use " " for an empty string.) See Also: true, false, name name The `name` attribute specifies a data field to be used as the output for the current element. The data field name given as the value for this attribute is the name of a field in a research document description, a contributor description, an industry description, or a stock symbol description. A list of data fields supported is given in the "Data Fields" sections below. The field name can also specify any CGI input field (for CGI programs using RAL) by prepending an underscore character to the input field name, or it can specify any .INI file entry or environment variable by prepending a dollar sign to the entry/variable name. Possible values: (Any valid data field name, or .sub.-- cgi-input-name, or $ini-entry-name, or $environment-variable-name.) See also: match, Data Fields quotes The `quotes` attribute indicates whether output from the current element should be surrounded by double quotes. If this attribute is set to "1", the `width` and `align` attributes are ignored. Possible values: "1" to surround output by quotes "0" to not surround output by quotes (default) start The `start` attribute indicates the beginning point of a loop, with each iteration of the loop enumerating the data items specified by the value of this attribute. See the section "Data Enumeration" below for details. Possible values: documents contributorlist industrylist symbollist See also: end, Data Enumeration true The `true` attribute specifies a string value to be displayed as output for the current element if the evaluated value for the `name` attribute matches the value of the `match` attribute. This string may also use the `%s` feature described under `format`. Possible values: (Any string. Use " " to indicate an empty string.) See also: match, false, format width The `width` attribute specifies a number which gives the desired width, in characters, of the output for the current element. If the currently evaluated output is shorter than the `width` value, then the output is padded with spaces on the left, right, or both, according to the value of the `align` attribute. If the output is longer than the `width` attribute, the output is truncated on the right, and the last three characters are replaced with periods (`. . .`) to indicate a truncated value. Possible values: (Any valid integer.) See also: align Data Enumeration The RAL attributes `start` and `end` are used to mark elements that are to be repeated during the enumeration of data objects. For example, {mx start=documents} {mx name=headline} {mx end=documents} would cause RAL to enumerate all documents that match the current query, outputting the headline of each one. (By placing the `end` element on the next line, it also causes the headlines to be separated by an end-of-line character). The available enumerations are listed below. All enumerations are filtered so as only to include documents the user that is making the enumeration is authorized to access. That is, not all users see the same results when making enumerations, according to their level of authorization. documents The `documents` enumeration loops through the result set of a query on the database of research documents. In the current implementation, the input parameters to the query are taken from CGI input items from an HTML page. They are: daterange: An integer from 0 to 12 specifying a date range for the release date of a document. The possible values are:
______________________________________
0 Today
1 Last 2 Days
2 ThisWeek
3 Last 7 Days
5 Last 14 Days
7 This Month
8 Last 30 Days
10 All Dates
12 Last 60 Days
13 Last 90 Days
______________________________________
ticker: A field for ticker symbols. query: A field for "free text" for searches of the document text. Logical expressions can be used. contributors: A list of contributor ID numbers which identify the contributors. industries: A list of industry ID numbers relating to the document. The following fields are available within a `documents` enumeration, listed with the data they output: Analysts Names of the analysts that compiled the document. AnalystIDs Numeric ID's of the analysts that compiled the document. ByteCount Size of the document (in PDF form) in kilobytes or megabytes. Contributor Name of the company that compiled the document. ContributorID Numeric ID of the company that compiled the document. DocID The internal system document ID number. DocType `R` for a research document; `M` for a morning call note; `N` for a news document. Headline The headline of the document. The system of the representative embodiment also surrounds the output from a element that displays this field with an HTML "anchor" to a CGI that downloads the PDF file for the document, or generates an HTML page for documents with no PDF form. PageCount The number of pages in the document. ReleaseDate The official release date of the document. Relevance A number from 0 to 1000 that indicates the relevance of the document to the free text that was used in the query. The higher the number, the more matches on the free text. SubmitDate The date the document was submitted by the contributing company to the repository server 2. Symbols A list of ticker symbols that the contributor listed as relevant in the document. Synopsis A "1"/"0" flag that indicates whether a synopsis is available for the document. By default, the value "Yes" is output if the synopsis is available, and " " is output otherwise. The representative embodiment also surrounds the output from a element that displays this field with an HTML "anchor" to a CGI that creates an HTML page with the actual synopsis text. The following fields are available outside a `documents` enumeration, since they are summary information or status information. Their values depend on the same query used within a `documents` enumeration: ChangeViewMode Generates text that can be used within a button to change the mode used to display documents. When the current view mode is set to show all documents, this data field generates "View Last ###", where ### is equivalent to the "Maximum" data field. When the current view mode is not set to show all documents, this data field generates "View All ###", where ### is equivalent to the "Total" data field. This text can be used as the value of a `submit` button in HTML, and a CGI can perform the appropriate action to change display modes. ContributorFilter Displays the name of the current contributor being used to filter documents. ContributorsText Displays the names of all contributors whose codes appear in the .sub.-- contributors field. Count Displays the total number of documents actually retrieved by a query, as opposed the number of documents that actually match the query. When the view mode is set to show all documents, this field is equivalent to the "Total" data field. Otherwise, it is equivalent to the "Maximum" data field. CountFilter Displays the number of documents that match the current document type and contributor filter. DocsShown Generates variable text, depending on the view mode (all documents, or the limited (100) set). If the view mode is set to return all documents, this data field generates the text "### Entries", where ### is equivalent to the "Count" data field. If the view mode is not set to view all entries, the data field generates the text "Last ### of *** Entries", where ### is again equivalent to the "Count" data field, and *** is equivalent to the "Total" data field. DocTypeFilter Generates the text "Research", "Morning Call Notes", or "News", depending on the current value of the document type filter. IndustriesText Displays the names of all industries whose codes appear in the .sub.-- industries field. Maximum This data field is the limit on the number of documents to be retrieved when the view mode is not set to show all documents. In the representative embodiment, this value is 100 by default, or the value specified in the "MaxRows" entry in WEBPUBL.INI. MaxRows If the view mode is set to show all documents, this data field is equivalent to the "Total" field. Otherwise, it is equivalent to the "Maximum" field. MorningNotes This data field is the number of morning call notes attributed to the current contributor specified in the contributor filter. News This data field is the number of news stories attributed to the current contributor specified in the contributor filter. Research This data field is the number of research documents attributed to the current contributor specified in the contributor filter. Total This data field is the total number of documents that match the current query parameters, regardless of view mode, contributor filter, or document type filter. ViewMode This data field generates "all" if the current view mode is set to view all documents that match a query. This field generates "last" if the current view mode is set to view only the last N documents that match a query, where N is equivalent to the "Maximum" data field. contributors The `contributors` enumerations is the same as a `documents` enumeration, except that the documents are grouped by their contributors. The only fields that can be displayed are the contributor names, and the number of documents in the research and morning notes categories. This enumeration is used primarily for presenting document summaries by contributor to the users. The following fields are available within a `documents` enumeration, listed with the data they output: Contributor Names of the contributor in a group. MorningNotes The number of morning notes submitted by the contributor. Research The number of research documents submitted by the contributor. contributorlist The `contributorlist` enumeration loops through the list of contributors from whom documents are available. This list is not based upon any query parameters--if a user is entitled to see the documents of a particular contributor, the contributor's name is returned in the result set. The following data fields are available within a `contributorlist` enumeration: ContributorID An integer that identifies a contributor uniquely. ContributorName, or Contributor The name of the contributor. The following data fields are available after a `contributorlist` enumeration. ContributorCount The total number of contributors in the `contributorlist` enumeration. industrylist The `industrylist` enumeration loops through the list of industries about which documents may be compiled. There are no query parameters for the industry list. The following data fields are available within a `industrylist` enumeration. IndustryID An integer that identifies an industry uniquely. IndustryName The name of the industry. symbollist The `symbol list` enumeration loops through all ticker symbols/company names that match a given input string. In the representative embodiment, the input string is taken from the CGI input item named `company`. If a company name contains the input string, the ticker symbol/company name is included in the result set for enumeration. The following data fields are available within a `symbollist` enumeration. SymbolID The stock ticker symbol recognized for a company on the stock market exchange where it trades. SymbolName The name of the company. Program Control RAL allows logical control over its output. The -if, -endif, and -defer allow a template to make decisions about output based on run time values of CGI input variables, environment or .INI variables, and the values of data fields from enumerations. If a -if element evaluates to FALSE, then all text and elements between the starting -if element and its terminating -endif element will not be passed through to output. If a -defer element is used inside a regular RAL element, then the rest of the element is not evaluated, and is simply passed through to output, without the -defer element. This allows a template to evaluate some RAL elements, and leave others to be evaluated later, if the output is used as a template itself.
______________________________________
if and -endif Usage
{mx -if <expression> }
. . .
{mx -endif}
where
expression
:= <value> <operator> <value>
value := <string> .vertline. <number> .vertline. <variable>
operator
:= == .vertline. < .vertline. > .vertline. |= .vertline. <=
.vertline. >=
string := <double-quote> ›<any-characters>!+ <double-quote>
number := <digit>*
variable
:= ›.sub.-- .vertline. $!<alphabetic character> ›<alphanumeric
characters>!+
______________________________________
Only one expression is allowed. A variable that does not evaluate to a known value will be treated as if it were a string. If a variable is preceded by an underscore (".sub.-- "), its value is taken from a CGI input variable with that name, minus the underscore. If a variable is preceded by a dollar sign ("$"), its value is taken from the environment variable or from the program's .INI entry which matches the variable name, minus the dollar sign. The following example shows how the -if element can be used to display some text and values only if there are actually some morning notes in the result of the query.
______________________________________
{mx -if morningnotes |= 0}
- ere are {mx name=morningnotes}
Click the "AM Notes" button to access
them.<BR>
{mx -endif}
______________________________________
The following example shows how a CGI input variable can influence the output. In this example, if the "contributors" CGI form variable is not empty, then some text will be output, along with a built-in field that displays the names of all the contributors whose ID codes are in the "contributors" CGI form variable.
______________________________________
{mx if.sub.-- contributors |= ""}
Query on contributors {mx name=contributorstext}
{mx -endif}
______________________________________
-defer Usage The -defer element is simply a modifier for other elements. It keeps the RAL from evaluating an element immediately, and outputs the element as if it were plain text, except it leaves the -defer out. For example: <option value=100 {mx -defer name=.sub.-- contributors match=100 true=selected}>Selection Item 100 will output <option value=100 {mx name=.sub.-- contributors match=100 true=selected}>Selection Item 100 the first time it is processed, and will this if that output is processed: <option value=100 selected>Selection Item 100 (This may leave the "selected" out, depending on the value of .sub.-- contributors.) One can have as many -defers as desired in an element--they do accumulate. That is, having three -defers in an element will cause it to defer evaluation until the fourth processing. An Example Use of RAL The following is an example of RAL used within an HTML file. A web CGI program that processes RAL can use this example file as a template, and fill in the RAL elements with the derived values of a query. This HTML has been simplified for the purpose of explanation, with comments in italics.
__________________________________________________________________________
<HTML>
<HEAD>
<TITLE>
Bulletin Board
</TITLE>
</HEAD>
<BODY>
<h2><i>BulletinBoard</h2> </i>
<form method="POST" action="/CGIBINIresult.exe">
<input type="submit" name="subaction" value="Refresh">
<input type="submit" name="subaction" value="Query">
<input type="submit" name="subaction" value="Summary">
<input type="submit" name="subaction" value="AM Notes">
Compare the total matching records to the maximum allowed in the display.
If there are
more, show the "change viewing mode" button.
{mx -if total > maximum}
<input type="submit" name="subaction" value="{mx name=changeviewmode}">
{mx -endif}
<input type="submit" name="subaction" value="Long Form">
<input type="hidden" name="current" value="bboard"> <br>
Display the total number of documents that matched, and how many will be
displayed in this
list.
<b>{mx name=docsshown}</b> <br>
</form>
<PRE>
<B> Submit Company Pgs Size Symbol Syn Headline
</B>
<HR>
This part is a document enumeration. The enumeration shows the fields
named
`updatedate`, `contributor`, `pagecount`, `bytecount`, `symbols`,
`synopsis`, and `headline`.
Around the `synopsis` field, there is a use of the -if element, which
decides whether to
output a hypertext links to the synopsis. There is no -if element for the
</A>, because an
extra one doesn't hurt most browsers.
(The following lines are split up with newlines to make it easier to read
-- running this
HTML, it will not give the desired results.)
{mx start=documents}
{mx name=updatedate width=7}
{mx name=contributor width=20}
{mx name=pagecount width=3 align=right}
{mx name=bytecount width=4 align=right}
{mx name=symbols width=10}
{mx -if synopsis = = 1}
<A HREF="result.exe?subaction={mx name=synfile}">
{mx -endif}
{mx name=synopsis width=3}</A>
<A HREF="result.exe?subaction={mx name=docfile}">{mx name=headline}</A>
{mx end=documents}</PRE>
<b>
Display the final counts.
{mx name=research} Research Documents <br>
{mx name=morningnotes} Morning Notes
{mx -if morningnotes > 0}
Click the "AM Notes" button to access them.
{mx -endif}
<br>
</b>
If there were more than a screenful of headlines displayed, create
another form and display the
control buttons again, just for the user's convenience.
{mx -if research > 17}
<hr>
<form method="POST" action="/CGIBIN/result.exe">
<input type="submit" name="subaction" value="Refresh">
<input type="submit" name="subaction" value="Query">
<input type="submit" name="subaction" value="Summary">
<input type="submit" name="subaction" value="AM Notes">
{mx -if total > maximum}
<input type="submit" name="subaction" value="{mx name=changeviewmode}">
{mx -endif}
<input type="submit" name="subaction" value="Long Form">
<input type="hidden" name="current" value="bboard">
</form>
{mx -endif}
</BODY>
</HTML>
__________________________________________________________________________
It will be appreciated that the templates and research access program described above are of general application, and can easily be modified to be used in many applications and fields. Accordingly, the templates and research access language should be understood as applicable to applications and fields other than for the distribution of research reports. Step-by-Step Examples The following are three step-by-step examples illustrating some of the principles discussed above. The first example describes what happens when the user first "logs in" from a non-secure "home pages" on the WWW, and receives a Bulletin Board display. The second example shows what happens when the user selects the "Query" button that is on the Bulletin Board display from the previous example. The third example illustrates what happens when the user makes a query. According to the representative embodiment of the present invention, there are a number of predetermined types of information displays available. A bulletin board display outputs a list of the headlines of reports that have recently been received by the repository server 2. (In these examples, "recently received" is defined to mean reports that have been received that day, e.g., since midnight on today's date.). The bulletin board display can include the time of submission of the report by the contributor, the identity of the contributor, the number of pages and size of the report, ticket symbols related to the report, whether a synopsis is available and the headline, all displayed one line per report. A query results display comprises the same fields of information, but for reports that satisfy a user's query. Each of the above two types of output can be displayed in other formats, e.g., in long form which includes a two or more line output for each report listing the headline, the time of submission of the report by the contributor, the identity of the contributor (company), the name(s) of the authors of the report, the number of pages and size of the report, ticket symbols related to the report, whether a synopsis is available. A summary display outputs a three column table, each row listing a contributor, the number of research documents at the repository server 2 available for that user from that contributor and the number of morning notes at the repository server 2 available for that user from that contributor. EXAMPLE 1 Logging In, and Getting a Bulletin Board If a user has accessed an initial non-secure home page of the present invention, the user can select a link to "Log In". The actual link is to an address "/SCGIBIN/result.exe", where "result.exe" is the name of the CGI program that generates response pages to user actions. The directory /SCGIBIN is actually mapped on the non-secure web server to the directory /CGIBIN on the secure web server 4. This means that home pages are handled by the non-secure server, but actual access to reports is handled by the secure web server 4. When the secure web server 4 receives the request to run "result.exe", the web server 4 first checks the request to ensure that the Internet browser making the request is authorized to access the web server 4. If the Internet browser is not authorized, the web server 4 prompts the Internet browser to ask the user, via a dialog box, for a valid user ID and password. In this example, the user enters the name "george@1984", and the password "wombat" and then selects OK. The web server 4 now verifies that the user is authorized. This is done by passing control to a subroutine named "mxp.sub.-- auth()" which consults the relational database's 11 list of valid users and their passwords. (In this example, the relational database 11 is an SQL server.) If the given user ID and password matches a database entry, the subroutine sets up the environment variables HTTP.sub.-- CID as "1984" to represent the company ID of the user (taken from the "@1984" part of his ID), HTTP.sub.-- UID as "2096" to represent the user's internal ID (taken from the SQL sever's records), and HTTP.sub.-- MXP as "wombat" to represent the user's password. The subroutine then returns a REQ.sub.-- PROCEED value, and the web server 4 knows it may then proceed handling the user's request to run "result.exe". The web server 4 next executes the program "result.exe", with no additional arguments, because none were specified in the hypertext link to it, and because the page that the request was made from was not an HTML form, which would have named data fields the user could fill in to modify the request. First, "result.exe" verifies that the user is not attempting access with the same ID that another user is using. So "result.exe" retrieves the value of the environment variable "HTTP.sub.-- COOKIE" which is provided by the web server 4 (from the HTTP "Cookie" value in the request from the Internet browser). "result.exe" attempts to find a value in the cookie named "mxauth". Since, in this example, this is the first time this user/browser has "logged in", the "mxauth" value in the cookie has not been set, so "result.exe" grants this user access, generates an authorization string for this user, stores the string where it can find it later, and outputs a cookie value to the web server 4 that the server will send back to the Internet browser. The next thing "result.exe" does is to determine what type of request the user made when calling "result.exe". Since there are no arguments to "result.exe", and there are no HTML form values, "result.exe" defaults to generating a Bulletin Board, which is a list of all headlines that have newly arrived at the repository server 2 today. The program has a choice of which type of database server to query for the list--the SQL server 11, and the full-text search server 13. Since this request does not require any full-text searching for values in documents, the "results.exe" program chooses to contact an SQL server 11. If the connection fails for some reason, the program will attempt to contact each backup SQL server until there are no more to connect to. The program will then fall back to attempting to contacting the full-text search servers 13 until it finds one that is up. Failure to find any available servers will result in generation of an error message, and termination of the program. For the sake of this example, we will assume that "result.exe" successfully connected to the SQL server 11. This particular request would have no parameters, except for specifying that only documents that have arrived on the SQL server 11 since midnight are desired. The request for the document headlines is immediately submitted to the SQL server 11, which returns its results asynchronously. This allows the SQL server 11 to begin processing the request, while "result.exe" moves on to its next step. This next step is to open an HTML template that is appropriate to the output requested by the user. In this case, "result.exe" is generating a simple Bulletin Board, so it is programmed to select a template named "BBOARDR?.tpl". The question mark in the name is filled in by the format that the user prefers his headlines to be displayed in. Possible formats are double line output (?=`D`), list output (?=`L`), and table output (?=`T`). The formats that each user prefers are stored in the same place that the user's authorization code for the cookie is stored. The "result.exe" program goes to that storage area, looks up the preferred format for "george@1984", discovers it is "L", and finishes its template selection by opening the file "BBOARDRL.TPL". (Of course, other possible formats could be specified and used.) The template file is mostly HTML, with some RAL elements mixed into it. The "result.exe" program will read through this template, and will immediately output any straight HTML to standard output, which the web server 4 will then send on to the Internet browser for the Internet browser to display as a page on the screen of the user's user computer 6, 8. However, the RAL elements will cause "result.exe" to insert various pieces of information into this stream of output at appropriate places, formatted according to the contents of the element. Show below is an annotated "BBOARDRL.TPL", indicating in italics what happens at certain RAL elements. (Note that, as above, elements begin with the characters "(mx".)
__________________________________________________________________________
<HTML>
<HEAD>
<TITLE>
Bulletin Board
</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">
<nobr>
The next line, though has an RAL element that gets its value from the
initialization file
that "result.xe", named "webpubl.ini". The dollar sign before "webserver"
indicates
that "result.exe" should look up the JNI entry named "webserver", and
substitute its
name here in the HTML.
<h2> <A HREF="{mx name=$webserver} /home/imagemap/mxnetlog.map">
<IMG SRC="/home/gif/mxnetlog.gif" BORDER=O ALT="Service Name" ISMAP>
</A> <i>
Bulletin Board
</h2> </i>
</nobr>
<form method="POST" action="/CGIBIN/result.exe">
<nobr>
<input type="submit" name="subaction" value="Refresh">
<input type="submit" name="subaction" value="Query">
<input type="submit" name="subaction" value="Summary">
<input type="submit" name="subaction" value="AM Notes">
The next lines are conditional, depending on whether the "total" number
of headlines
returned from a headline list query is greater than the "maximum" number
that
"result.exe" has been configured to display. When "result.exe" is
confronted with
resolving the value for "total", it first checks to see if it has that
value yet. If not, it
then goes into a waiting mode, while it waits for that value to arrive
asynchronously
from the database server 11, 13. Once the total arrives (which it does
independently
of the actual headline records), "result.exe" proceeds with evaluating
this "if"
condition. If the evaluation is false, then all text until the next
"endif" is ignored.
{mx -if total > maximum}
In this example one, the total number of headlines returned is 143, while
the value set
for "maximum" is 100. So this condition is true, meaning the next line
gets evaluated
and sent out. The element named "changeviewmode" is intended to generate
text for a
button that the user can press to change from viewing only 100 headlines,
to view all of
them. So this element's value will become
"View All 143".
<input type="submit" name="subaction" value="{mx name=changeviewmode}">
{mx -endif}
<input type="submit" name="subaction" value="Long Form">
<input type="hidden" name="current" value="bboard">
The next line has the element "docsshown". This evaluates to a phrase
that tells the
user what he is being shown. In this case, the element's value is "Latest
100 of 143
documents". These values depend on the total number of records, the
maximum, and
whether the user presses the "changeviewmode" button later, in which case
it would
show "143 documents".
<br> <font > <b>{mx name=docsshown)</font> </b> <br>
</nobr>
</form>
<PRE>
<B>Submit Company Pgs Size Symbol Syn Headline
</B>
The next line actually does not contain any line breaks until the </PRE>,
but it is
wrapped it here for clarity. The first element "{mx start=documents}"
marks the
beginning of a loop, causing "result.exe" to repeat this section through
the "{mx
end=documents)" as long as there are headline records in the result from
the query.
All the elements in between are involved in displaying fields of the
headline records,
and in two cases, they are used to establish hypertext links to
"result.exe" with
arguments that display document synopsis and document contents. Of
particular
interest here, is that "result.exe" will access the headline records as
they arrive
asynchronously from the database server 11, 13, displaying them as soon
as they
arrive. The entire result set of the query does not have to be present
for display to
start, thus making the display to the user appear faster. In fact, the
server is
programmed to break the query to it up into pieces if sorting the results
will be a
lengthy process, as discussed above in the section titled
"Optimizations". When a
query is broken up, the most recent headlines are accessed first, which
is the order
that they are shown in this list. In addition, "result.exe" makes certain
that the data is
being sent to the server (and therefore to the user) by flushing its
output queue every 5
headlines.
<HR>{mx start=documents}{mx name=updatedate width=7} {mx
name=contributor width=20} {mx name=pagecount width=3 align=right} {mx
name=bytecount width=4 align=right} {mx name=symbols width=10} {mx -if
synopsis
== 1}<A HREF="result.exe?subaction={mx name=synfile)">(mx
endif)(mx name=synopsis width=3) </A> <A HREF="result.exe?subaction={mx
name=docfile)">{mx name=headline}</A>
{mx end=documents}</PRE>
<b>
The next lines display counts of the documents, broken down by report
type (e.g.,
here, research documents and morning notes.) Some of the output is
conditional,
depending on a zero value.
{mx name=research} Research Documents <br>
{mx name=morningnotes} Morning Notes
{mx -if morningnotes > 0}
Click the "AM Notes" button to access them.
{mx -endif}
</br>
</b>
It is convenient to have the action buttons also at the end of a long
list of documents,
but it looks unprofessional to have two sets of buttons with a short list
of documents.
So the next section that displays buttons is identical to the button
display section above,
except that it is conditional on how many research documents were
actually displayed.
(mx -if research > 17}
<hr>
<form method="POST" action="/CG1B1N/result.exe">
<nobr>
<input type="submit" name="subaction"
<input type="submit" name="subaction"
<input type="submit" name="subaction"
<input type="submit" name="subaction"
{mx -if total > maximum}
<input type="submit" name="subaction"
{mx -endif}
<input type="submit" name="subaction" value="Refresh">
value="Query">
value="Summary">
value="AM Notes">
value="{nm name=changevieWmode}">
value="Long Form">
<input type="hidden" name="current" value="bboard">
</nobr>
</form>
{mx -endif}
</BODY>
</HTML>
__________________________________________________________________________
The preceding example generates a page 100 for display on the user's Internet browser at the user's user computer 6, 8 as shown in FIG. 2. (The graphic listing the service name is not shown.) The page 100, displayed in bulletin board format, includes a number of action buttons 120-130, and a list of reports. The action buttons 120-130 are all used as commands to "result.exe". Each report is listed on a single line, with information about the report including the time of submission of the report by the contributor (102), the identity of the contributor (104), the number of pages (106) and size of the report (108), ticket symbols related to the report (110), whether a synopsis is available (111) and the report's headline (112). The user can select (e.g., click on) a headline and have the complete report transferred from the repository server 2 to the user computer 6, 8. The user can select an entry in the synopsis column and have the synopsis displayed. A refresh button 120, if selected, cause this same report to be regenerated, e.g., to include any new reports received since the this page 100 was generated. A query button 122, if selected, causes a query form to be generated, as explained in example 2 below. A summary button, if selected, causes a summary report to be generated. The summary report comprises a three column table, each row listing a contributor, the total number of research documents at the repository server 2 available for that user from that contributor and the total number of morning notes at the repository server 2 available for that user from that contributor. An AM Notes button 126, if selected, causes only morning notes to be displayed. A View All button 128, if selected, causes all headlines to be displayed, regardless of how many. A long form button 130, if selected, causes a page to be generated that includes a two lines for each report, listing the headline, the time of submission of the report by the contributor, the identity of the contributor (company), the name(s) of the authors of the report, the number of pages and size of the report, ticket symbols related to the report, whether a synopsis is available. A summary line 132 shows the total number of documents that satisfy the query (in this case, all documents that arrived at the repository server 2 since midnight) and the total number displayed. EXAMPLE 2 Requesting a Query Form In the preceding example, the user "logged in" and was presented with a Bulletin Board. If the user wishes to make a query for documents that match certain criteria, he may then click the query button 122 on the Bulletin Board. This causes the Internet browser to form a request to the web server 4 to run "result.exe" again, but since the button is inside an HTML form, additional information is included in the request. First, when the request arrives at the web server 4, the ID is verified in the same manner described in the prior example, except that the dialog box for user name and password is not displayed, since the Internet browser provides that information as part of the request. Once the user is verified, the web server 4 start running "result.exe", but with input that indicates the "Query" button was selected on the previous form. The first thing "result.exe"does is to try to verify that the user is not attempting access with the same ID that another user is using. The "result.exe" program retrieves the value of the environment variable "HTTP.sub.-- COOKIE" which is provided by the web server 2 (as received from the HTTP "Cookie" value in the request from the Internet browser). The "result.exe" program attempts to find a value in the cookie named "mxauth". Since this is NOT the first time this user/browser has logged in, the "mxauth" value in the cookie is set to the value "result.exe" gave this user last time he was authorized. The "result.exe" program compares this value to the current authorization code it has stored for this user, and if the two do not match, it generates output that tells the user that access has been denied. If the values do match, then "result.exe" proceeds. By looking at the value for the CGI form variable "subaction", the "result.exe" program can determine that the user selected the query button 122 on his last request. At this point, the program selects an HTML template appropriate to this request, which is named "RESULTQ.TPL". To service a query form, "result.exe" connects to the appropriate database server 10, 13 as described in example one. Once connected, it then opens the HTML template, and starts generating output. An annotated version of the "RESULTQ.TPL" template is shown below.
__________________________________________________________________________
<html>
<head>
<title >Document Query</title>
</head>
<body BGCOLOR="#ffffff">
<nobr>
<h2> <A HREF="{mx
name=$webserver}/hcyme/imagemap/mxnetlog.map"> <IMG
SRC=91/home/gif/mxnetlog.gif" BORDER=O ALT="Service Name" 1SMAP> </A>
<i>
Document Query
</h2> </i>
</nobr>
<nobr>
<form method="POST" action="/CG1B1N/result.exe">
Generate the buttons for commands to be executed from this form.
<input
type="submit"
name="subaction"
value="Submit">
<input
type="submit"
name="subaction"
value="Count Only">
<input
type="submit"
name="subaction"
value="Summary">
<input
type="submit"
name="subaction"
value="AM Notes">
<input
type="submit"
name="subaction"
value="Reset">
<input
type="submit"
name="subaction"
value="BBoard">
<input type="hidden" name="current" value="query">
</nobr>
<table>
<tr valign="top">
<td width=90> <b>Symbol:</b> </td>
The element here is evaluating the value for "-ticker". Any element name
that begins
with an underscore is taken from values that are given to "result.exe" as
input from the
last form that started "result.exe". If the last form had a field (text,
list box, hidden, or
otherwise) named "ticker" (no underscore), then the web server 4 would
start this
instance of "result.exe" with an input field named "ticker" whose value
would be the
value in the "ticker" field in the last form. If the last form had a
field named "ticker"
with a value of "IBM", then this element will generate a default value
for this input
field of "IBM". This allows "result.exe" to come back to the previous
state of this
query form, if other forms remember the value for "ticker" in hidden
fields.
<td> <input type="text" name="ticker" value={mx name=-ticker quotes=1}
> </td>
<td width=86>
<td> <input type="submit" name="subaction" value="Symbol Guide"> </td>
</tr>
</table>
<table>
<tr valign="top">
<td width=90> <b>For Period Of:</b> </td>
The following list box has one value preselected, due to the "match" and
"true" parts
in the elements within it. These elements evaluate the value for the
field "date" from
the last form, and if the value matches the value given for the "match"
part, then the
displayed value for the element will be contents of the "true" part of
the element, in
this case, the word "selected". In other words, for each one of these
lines, you could
read "If the last form's date field matches X, then display the word
`selected"`. The
special case for "Last 7 Days", where the match value is ",3", simply
means that if the
date value is either empty, or the number three, it is a match.
<td> <select name="date">
<option value="0" {mx name=.sub.-- date match=O true=selected} >Today
<option value="1" {mx name=.sub.-- date match=1 true=selected} >Last 2
days
<option value="2" {mx name=.sub.-- date match=2 true=selected} >This
Week
<option value="3" {mx name=.sub.-- date match=,3 true=selected} >Last 7
days
<option value="5" {mx name=.sub.-- date match=5 true=selected} >Last 14
days
<option value="7" {mx name=.sub.-- date match=7 true=selected} >This
Month
<option value="8" {mx name=.sub.-- date match=8 true=selected} >Last 30
days
<option value="12" {mx name=.sub.-- date match=12 true=selected} >Last 60
Days
<option value="13" {mx name=.sub.-- date match=13 true=selected} >Last 90
Days
<option value="10" {mx name=.sub.-- date match=10 true=selected} >All
Dates
<option value="-1">= = = = = = = = = = = = = = = = =
</select> </td>
</tr>
</table>
<table>
<tr>
</tr>
</table>
<table> <tr valign="top"> <td width=90> <b>Keywords: </b> </td>
Here, a default value for this field is based on the "query" field in the
last form.
<td> <input type="text" name="query" size=49 value={mx name=.sub.--
query
quotes=1} > </td> </tr>
</table>
<table>
<tr valign="top"> <td width=90> <b>Contributors: </b> </td>
<td> <SELECT NAME=contributors SIZE=6 MULTIPLE>
This is a possible default selection, the same as described above for
"date."
<OPTION VALUE="-1" {mx name=-contributors match=,-1 true=selected}>› All
Contributors!
This element marks the beginning of a loop on contributors. When this
element is
evaluated, "result.exe" forms a query to the server that will return a
list of all
document contributors (companies) that this particular user is entitled
to read
documents from. The request is asynchronous, so as each contributor
record is
returned from the server, "request.exe" can fill in the inside of this
loop. Inside the
loop is an element that displays the ID number of the contributor,
optionally followed
by the word "selected" if it should be the default selection on this
form, based on prior
values of the form fields "contributors".
{mx start=contributorlist}
<OPTION VALUE={m name=contributorid match=.sub.-- contributors true="%s
selected" false="%s"}>{mx name=contributorname}
{mx end=contributorlist}
<OPTION
VALUE="2">= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = = = = = = =
</SELECT>
</td> </tr>
<tr valign="top"> <td> <b>Industries:</b> </td>
<td> <SELECT NAMEmindustries SIZE=6 MULTIPLE>
<OPTION VALUE="-1" {mx name=.sub.-- industries match=,-1 true=selected}>›
All
Industries!
This element and the following loop is the same as the contributor loop
above, except it
lists the industries that the user may choose as selection criteria for
documents, instead
of contributors.
{mx start=industrylist}
<OPTION VALUE={mx name=industryid match=.sub.-- industries true="%s
selected"
false="%s"}>{mx name=industryname}
{mx end=industrylist}
<OPTION
VALUE="2">= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= =
</SELECT>
</td> </tr>
</table>
<hr>
These buttons are duplicates of the ones above -- we found it was
convenient to have
them here too.
<input
type="submit"
name="subaction"
value="Submit">
<input
type="submit"
name="subaction"
value="Count Only">
<input
type="submit"
name="subaction"
value="Summary">
<input
type="submit"
name="subaction"
value="AM Notes">
<input
type="submit"
name="subaction"
value="Reset">
<input
type="submit"
name="subaction"
value="BBoard">
<input
type="hidden"
name="current"
value="query">
</form>
</body>
&l | ||||||
