1. Field of Invention
The invention generally relates to application programming interfaces (APIs). More particularly, the invention relates to an API set for use with data contained in an interlocking trees datastore.
2. Description of Related Art
Practically, an API (application programming interface) is any interface that enables one program to use facilities provided by another, whether by calling that program, or by being called by it. At a higher level still, an API is a set of functionality delivered by a programming system, and as such the mix of APIs in a particular system tells you what that system can do. APIs are known in the art. For example, U.S. Pat. No. 6,760,911B1, entitled “Messaging API Framework,” teaches methods for allowing C++ applications to communicate through an MQ Series gateway with CORBA-based applications. While producing satisfactory results, the methods used are not useful for KStore technology.
The KStore technology addresses. the problems associated with traditional relational databases. As described in U.S. patent application Ser. Nos. 10/385,421, entitled “System and method for storing and accessing data in an interlocking trees datastore” and 10/666,382, entitled “System and method for storing and accessing data in an interlocking treees datastore” the KStore data structure can eliminate the distinction between transactional data and stored (relational) data.
With the development of the KStore technology, there is a need for application programming interfaces to connect applications, data sources, and GUIs with the interlocking trees datastore.
All references cited herein are incorporated herein by reference in their entireties.
A method for transmitting information in a KStore system having a KStore with at least one K path, an application programming interface and an application layer wherein the information is transmitted between the KStore and the application layer includes transmitting the information between the KStore and the application layer by way of the application programming interface. The KStore includes a plurality of K paths and may be constrained by way of the application programming interface with at least one constraint to provide at least one selected K path of the plurality of K paths. The constraining provides a set of selected K paths and the KStore is focused to provide a further set of selected K paths in accordance with the set of selected K paths. At least one KStore parameter is determined in accordance with the selected K path to provide at least one determined K parameter. The constraining of the KStore includes traversing the at least one selected K path.
This invention extends the flexibility and ease of use of interlocking trees datastore, particularly of the type described in U.S. patent application Ser. Nos. 20040181547, 20050076011, 20050165749 and 20050165772 entitled “System and method for storing and accessing data in an interlocking trees datastore” and has particular applicability to the use of systems incorporating such KStore data structures as is found in U.S. patent application Ser. No. 10/879,329 entitled “Functional operations for accessing and/or building interlocking trees datastores to enable their use with applications software.” These patent documents are incorporated in their respective entireties by this reference thereto.
While the prior patent documents describe both a KStore structure and a system for enabling use of a KStore with various applications for learning and querying, the system still requires an API to allow for the development and execution of multiple application programs without the possibility of any of the different applications corrupting the interlocking trees datastore and without the need for the application developers to have detailed understanding of the processes required to traverse and return address locations within the interlocking trees datastore.
This API will service calls to the interlocking trees datastore engine from applications, to construct, query and maintain the interlocking trees datastore, without ever returning addresses that would allow direct access to the interlocking trees datastore.
The invention can also provide security functions such as validating the KStore identity and that the calling routine has access. The inventors herein have determined that a number of processes ought to be created to facilitate use of KStore and queries of them. These functional objects that make queries of particular kinds can be called individually out of a set of such objects as needed, if they are put together into a system. We call them “functional categories.” We have previously described a system for supporting a KStore and suggest using it or something like it to support this set of functional categories.
Accordingly, a set of such functional categories appropriate to specific kinds of queries have been created and new sets of them can be created using the ones described in detail herein. Because these functional categories can be defined in various ways for particular needs, we also describe with some particularity preferred embodiment routines, and subcomponents of such routines in some detail.
As those of ordinary skill in these arts will appreciate, these functional categories in current technology paradigms are best implemented as software routines, but as those of skill in these arts will also appreciate such objects can easily be translated into hardware implementations without experimentation as to how to build them once such objects are described as set forth within.
The invention will be described in conjunction with the following drawings in which like reference numerals designate like elements and wherein:
The organization of this patent is divided into sections as follows. The first section details a preferred embodiment KStore system for which the inventive functional objects will be operable, as sets or groups or individually, depending on the particulars of any given instance of such a system. Nearly all of this first section description is already found in U.S. patent application Ser. No. 10/879,329, entitled “Functional operations for accessing and/or building interlocking trees datastores to enable their use with applications software.” This section also defines how we use the term “Functional Categories,” as well as some other terms of interest for describing the invention.
The second section is broken into parts. There are four parts, each describing a functional category and in each there are specific exemplary routines described that implement this functional category. Particular preferred embodiments may use just one of these types or even only one of the ones of these one types, although it will likely be found that combinations of functions needed to produce smoothly functioning efficient query response systems will have many of these and perhaps other yet to be defined ones of some or all of these types.
Part 1 —Description of KStore System for Use with This Invention
It should be understood that there are other possible system configurations for use of this invention, however, in preferred embodiments it can be used with the system described herein.
Refer first to
The outside world, in our preferred arrangements has access to the K structure only through these API Utilities and Learn Engines. The API Utilities and Learn Engines therefore can validate whether a person using an application should have access to the K 14a or to a specific portion of the K 14a in order to prevent unauthorized querying, updating, or management of the K 14a. Additionally, the API Utilities can validate data sources 8.
The API Utilities and Learn Engines are accessed by the outside world through an applications layer. In order to maintain the integrity of the information in the K14a, the API 4 does not pass any internal K information to the application layer that would permit the applications to traverse or alter the K14a. For example, no pointers or node locations are passed to the applications layer. In addition, no information about the structure of the nodes or how the connecting structures are organized are passed to the applications layer. Note that the U.S. patent application Ser. No. 10/879,329 describes how the API Utilities and the Learn Engine operate and are accessed, while this patent covers the APIs in more detail.
Applications such as GUls, databases, and any other type of program or interface which could provide data or request information can be hosted in this applications layer.
Specifically, in
Any time data is provided to K or any time a search is done of K, we often say we are calling or sending a message to the K Engine. It should be noted that some of the features of the API utilities may be encompassed by the K Engine, depending on how the system is built. In its most easy to understand form the K Engine is kept in as simple a condition as possible. For example, the K Engine may pass only particles into a K and return pointer addresses to whence the particle went. It is important to note that K pointer addresses are never passed through APIs to layer 15. In given implementations, the K Engine can assume some of the functions of the API Utilities if desired and/or efficient.
In
The utility procedures of the API utility can produce calls to the K Engine or internal utility procedures. Calls themselves, that is, the requests from the API Utility objects can be very simple statements or even instruction words. The quickest way to see this is to illustrate it as an instruction word or message 34 of
Thus, the basic components of a functioning system for supporting uses of a KStore are described, and from these, numerous things can be accomplished.
API
Refer first to
If the query Q is not understood or otherwise erroneous, a feedback mechanism may be provided to ask the application or the user to reformulate the query.
Thus, the next step in this preferred embodiment is to have the applications layer interpret 352 of
This comprises the breaking down of the query into component positioning and retrieval calls 353. At the base level the query is broken down into calls to 356 the K Store Engine, which finds its way into the K via the current location pointers. This information is returned to the API utility, which organizes the information and makes additional queries until the query Q is satisfied. The API Utility may go directly to addresses in the computer system memory to retrieve information consisting of other addresses or root node data in process 355. The API Utility applies the result to a table structure 357 that it creates 354 to handle the information retrieved. When the response is completed, it is formatted 358 to send as a reply which can be in the query language used. However, until it is complete, the API Utility can continue to make calls to the K Store Engine. When the query is completed, the formatted, response can be sent 359 back to the application 351.
In some preferred embodiments, we have two types of API Utility components to the KStore system. One, an administrative API Utility component, is for maintenance, initiation, and change function support, which enables the user or a program to modify the various system components such as, by setting switches, state variables, designating data sources, modifying metadata or doing other things of an administrative nature. The other API Utility type, of interest here, is used for queries.
The query can be broken down into its component parts, perhaps by a query part formulator. These query parts can call the relevant API Utility component routines in 372a, which can call the K Engine 368a via the send/receive subcomponent 367a to locate a position in the K structure, access the K structure directly or update appropriate memory within the API Utility space. The K Engine can look to its own associated memory 376a to determine if what is sent is on the sensor list, how to respond to it, and the like.
Other routines can operate to coordinate memory in area 366 of the API Utility 372a and to stand ready to analyze location information returned responsive to each query part. These other routines are designated subcomponent memory coordinator/analyst 366, and operate to store and retrieve associated data in a memory for handling a query thread in thread memory 369. The API Utility 372a may keep records of previous positional information generated by earlier calls (i.e., current location counters returned by the K Engine in 368a in response to calls), it can go back with a new call using previous positional information to process current calls it needs to make to find higher levels of information such as the count of a subject variable within a context. The memory coordinator/analyst 366 can also coordinate information previously retrieved from the previous calls that it may have stored in its thread memory 369 and may produce the final result needed by the Response Configurator 377 to generate the answer to the query.
Part 2—Functional Groups
The API set of the present embodiment of the invention can be divided into at least four functional categories of APIs:
1. Support Functions
2. Analytic Calculation Functions
3. Monitoring Functions
4. Administration Functions
The following is an example of API procedures within each functional category that can be used to access a KStore interlocking trees data store. Following this list is an explanation of representative API procedures.
Functional Category 1—Support Functions
The following procedures are ways to access a KStore such as the KStores 14, 14a.
Maintaining the client interface
Retrieving values and information from the K
Setting Constraints
Setting a Focus
Returning Data Format
Functional Group 2—Analytic Calculation Functions
The following procedures are different ways to retrieve analytics from the KStore interlocking trees data store.
DecisionTree
DecisionTree_XML
Rules
Rules_XML
PredictSingleVariable
PredictSingleVariable_XML
Classify
Classify_XML
BayesClassify
BayesClassify_XML
RecordExplorer—3
RecordExplorer_XML
RecordExplorer_XML—2
RecordExplorer_XML—3
ResultListCount
ResultListCount 2
SumColumnLong
SumColumn_XML
QuestionK
QuestionK_XML
DistinctRecordCount
RecordCount
KCmd_XML
Functional Group 3—Monitoring Functions
The following procedures are ways to monitor the KStore data store.
Event
GetEvent
SaveEvent
DeleteEvent
ListEvents
StartEvent
StopEvent
SuspendEvent
ResumeEvent
Initialize
Stop
Status
Register
Unregister
IsRegistered
Trigger
XML
GetAdviseCookie
GetMemory
SetMemory
RunQuery
QueryStats
GetQuery
SaveQuery
DeleteQuery
ListQueries
Broadcast
Probability
Functional Group 4—Administration Functions
The following procedures are listed within functional categories and are different administration functions.
Miscellaneous APIs for Initializing and managing the structure and determining the specific features for the K.
APIs for reading and processing new information to be added to the structure:
Maintaining MetaData
To illustrate the present invention, two figures are used to show a method to administer and to use a KStore structure. As the figures are explained, one representative API procedure within each functional group is explained in detail.
Refer to
To illustrate the present invention,
HRESULT StartEngine ( BSTR name);
Parameters
Name [in] BSTR specifying the name of the K instance to initialize. Example: “Unisys Marketing Model”.
Return Values
After the KEngine is started as shown in
The next step is to setup data sources and initiate learning by the KStore as shown in 103. To setup data sources the user uses “AddDataSource” procedure. To initiate learning, the user can use the “Learn” procedure. Again, since these procedures are in Administration Functions, no procedures will be discussed in detail.
Then queries and events used to monitor the K structure are set up 104. “StartEvent” procedure from Monitoring Functions functional category can be used.
To illustrate the present invention,
The StartEvent method starts monitoring the specified event.
HRESULT StartEvent(
BSTR name
);
Parameters
name [in] Specifies the name of event to start monitoring.
Return Values
Requirements: A KStore Engine has been started.
The final step in the administrative process shown in
Refer to
To illustrate the present invention,
Connect
The Connect method establishes a communication path with the KStore Engine.
HRESULT Connect(
BSTR engineName;
);
Parameters
engineName [in] This is the name of the engine to connect to.
Return Values
Requirements: The Engine object has been created and started up.
Next in the client flow shown in
Next in the client flow shown in
To illustrate the present invention,
PredictSingleVariable
The PredictSingleVariable method calculates the probability for the specified focus and retrieves the result in a KCollection.
HRESULT PredictSingleVariable(
IKCollection **ppVars
);
Parameters
ppVars
[out, retVal] KCollection used to return results.
Return Values
Requirements: The focus field is set, and constraints, if any, have been previously processed.
In this example as shown in
While the invention has been described in detail and with reference to specific examples thereof, it will be apparent to one skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope thereof.
Number | Date | Country | |
---|---|---|---|
60625922 | Nov 2004 | US |