IP Library › Granted Patent US 10,628,527
Granted Patent B2
US 10,628,527 · App. 15/963,871 · Granted Apr 21, 2020

Automatically cross-linking application programming interfaces

Inventors: Kyle Mark Williams (Seattle, WA); Imed Zitouni (Bellevue, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F17/2785G06F16/3329G06F16/9024G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,628,527
App. No.
15/963,871
Granted
Apr 21, 2020
Kind
B2
Abstract

A method for automatically cross-linking a plurality of APIs in an artificial intelligence (AI) graph structure comprises maintaining an AI graph structure defining a plurality of API-agnostic semantic entities, a plurality of function nodes, a plurality of input-adapter edges, and a plurality of output adapter edges. The method further comprises cross-linking a new function from a new API by computer-analyzing documentation of the new API with a natural language processing (NLP) machine in order to recognize the new function, and updating the AI graph data structure to include a new function node based on the new function.

Claims (81)

1. A method for automatically cross-linking a plurality of application programming interfaces (APIs) in an artificial-intelligence graph data structure, the method comprising:

maintaining an artificial intelligence (AI) graph data structure, wherein the AI graph data structure defines:

a plurality of API-agnostic semantic entities, each API-agnostic semantic entity associated with an API-agnostic semantic data type and including a semantic data socket configured to hold a semantic data value having the API-agnostic semantic data type;

a plurality of function nodes, each function node representing a function made available by an API and including an input data socket and an output data socket;

a plurality of input adapter edges, each input adapter edge connecting a semantic data socket of an API-agnostic semantic entity to an input data socket of a function node; and

a plurality of output adapter edges, each output adapter edge connecting an output data socket of a function node to a semantic data socket of an API-agnostic semantic entity; and

for a target API of a plurality of APIs:

computer-analyzing documentation describing the target API with a natural language processing machine previously trained to identify:

a new function made available by the target API,

an upstream API-agnostic semantic entity corresponding to an API-specific input parameter of the function, and

a downstream API-agnostic semantic entity corresponding to an API-specific output parameter of the function; and

updating the AI graph data structure to include:

a new function node representing the new function;

an input adapter edge connecting a semantic data socket of the upstream API-agnostic semantic entity to an input data socket of the new function node, wherein the input data socket corresponds to the API-specific input parameter; and

an output adapter edge connecting an output data socket of the function node to a semantic data socket of the downstream API-agnostic semantic entity, wherein the output data socket corresponds to the API-specific output parameter.

2. The method of claim 1 , wherein the natural language processing machine is previously trained via supervised learning on a plurality of labelled APIs, wherein a labelled API includes documentation describing an API annotated by one or more trainers to include one or more semantic labels, wherein a semantic label indicates an API-specific parameter of the API and an API-agnostic semantic entity corresponding to the API-specific parameter.

3. The method of claim 1 , wherein computer-analyzing the documentation describing the target API with the natural language processing machine includes:

computer-identifying a natural language feature indicating the new function made available by the target API;

computer-identifying a natural language feature indicating an API-specific input parameter of the new function;

computer-identifying the upstream API-agnostic semantic entity based on the natural language feature;

computer-identifying a natural language feature indicating an API-specific output parameter of the new function; and

computer-identifying the downstream API-agnostic semantic entity based on the natural language feature.

4. The method of claim 1 , further comprising:

computer-recognizing an API-agnostic semantic entity including a semantic data socket without an incoming connection via an output adapter edge;

automatically updating the AI graph data structure to include a botlet node, wherein the botlet node includes:

a botlet output data socket configured to transmit a semantic data value having an API-agnostic semantic data type associated with the API-agnostic semantic entity, and

a botlet output edge connecting the botlet output data socket to the semantic data socket of the API-agnostic semantic entity.

5. The method of claim 4 , further comprising:

posing a disambiguation question via a natural language user interface;

receiving a response to the disambiguation question via the natural language user interface; and

operating a natural language response processing machine to output a computer-readable description of the response to the question;

wherein the botlet output data socket is configured to transmit the semantic data value based on the computer-readable description of the response.

6. The method of claim 1 , wherein:

the input data socket of the new function node is configured to receive an input data value for parametrizing the new function, the input data value having an API-specific input data type of an API-specific input parameter of the new function; and

the input adapter edge between the semantic data socket of the upstream API-agnostic semantic entity and the input data socket of the new function node is configured to ensure compatibility between an API-agnostic semantic data type associated with the upstream API-agnostic semantic entity and the API-specific input data type of the API-specific input parameter.

7. The method of claim 1 , wherein:

the output data socket of the new function node is configured to transmit an output data value of the new function, the output data value having an API-specific output data type of an API-specific output parameter of the new function; and

the output adapter edge between the output data socket of the new function node and the semantic data socket of the downstream API-agnostic semantic entity is configured to ensure compatibility between the API-specific output data type of the API-specific output parameter and an API-agnostic semantic data type associated with the downstream API-agnostic semantic entity.

8. The method of claim 1 , wherein documentation describing each different target API of the plurality of APIs is received from an API discovery service configured to track, on a computer network, a plurality of available APIs accessible via the computer network and to provide, for each available API, documentation describing the available API in a computer-readable format.

9. The method of claim 1 , further comprising:

receiving a query;

based on the query, selecting a target function node of the AI graph data structure;

executing a target function represented by the target function node.

10. The method of claim 9 , further comprising:

computer-analyzing the query with a natural language query processing machine to computer-recognize a computer-readable description of an intent associated with the query, and selecting the target function node previously associated with the intent.

11. The method of claim 9 , wherein executing the target function includes:

selecting a path through the AI graph data structure ending at the target function node; and

executing a plurality of other functions represented by other function nodes in the path through the AI graph data structure.

12. The method of claim 11 , wherein the path through the AI graph data structure is a highest ranked candidate path based on a previously learned path selection policy, and wherein the previously learned path selection policy ranks a plurality of candidate paths ending at the target function node with a machine learning system previously trained to output, for each candidate path, a score indicating a quality of the path.

13. The method of claim 11 , further comprising:

receiving feedback indicating a quality of path selection; and

adjusting a previously learned path selection policy based on the received feedback.

14. The method of claim 1 , further comprising pruning a low-quality path from the graph data structure by removing, from the graph data structure, one or more API-agnostic semantic entities, function nodes, input adapter edges, and/or output adapter edges.

15. A method for automatically cross-linking a plurality of application programming interfaces APIs, the method comprising:

for a first API of the plurality of APIs:

computer-analyzing documentation describing the first API with a natural language processing (NLP) machine previously trained to identify natural language features associated with APIs, the NLP identifying a first function made available by the first API, and identifying a first natural language feature associated with an API-specific input parameter of the first function; and

computer-recognizing, with an artificial intelligence (AI) machine previously trained to associate natural language features with API-agnostic semantic entities, an API-agnostic semantic entity associated with the natural language feature;

for a second, different API of the plurality of APIs:

computer-analyzing documentation describing the second API with the NLP machine, the NLP machine identifying a second function made available by the second API, and identifying a second natural language feature associated with an API-specific output parameter of the second function; and

computer-recognizing, with the AI machine, an association between the second natural language feature and the API-agnostic semantic entity identified for the first API.

16. The method of claim 15 , further comprising providing an artificial-intelligence graph data structure representing the first function and the second function as cross-linked by the API-agnostic semantic entity, wherein the artificial-intelligence graph data structure is useable to:

invoke the second API to execute the second function, to determine an output data value of the second function, the output data value having an API-specific output data type;

update a semantic data socket of the API-agnostic semantic entity to hold a semantic data value having an API-agnostic semantic data type, wherein the semantic data value is based on the output data value; and

invoke the first API to execute the first function, wherein the API-specific input parameter of the first function is parameterized with an input data value having an API-specific input data type, and wherein the input data value is based on the semantic data value.

17. The method of claim 15 , wherein the API-specific input data type of the first function is different than the API-specific output data type of the second function.

18. The method of claim 15 , wherein the natural language processing machine is previously trained via supervised learning on a plurality of labelled APIs, wherein a labelled API includes documentation describing an API annotated by one or more trainers to include one or more semantic labels, wherein a semantic label indicates an API-specific parameter of the API and an API-agnostic semantic entity corresponding to the API-specific parameter.

19. A computerized personal assistant, comprising:

a graph machine configured to access an AI graph data structure defining:

a plurality of API-agnostic semantic entities, each API-agnostic semantic entity associated with an API-agnostic semantic data type and including a semantic data socket configured to hold a semantic data value having the API-agnostic semantic data type;

a plurality of function nodes, each function node representing a function made available by an API and including an input data socket and an output data socket;

a plurality of input adapter edges, each input adapter edge connecting a semantic data socket of an API-agnostic semantic entity to an input data socket of a function node; and

a plurality of output adapter edges, each output adapter edge connecting an output data socket of a function node to a semantic data socket of an API-agnostic semantic entity; and

a query machine configured to:

receive a query;

operate a natural language query processing machine to computer-recognize a computer-readable description of an intent associated with the query;

pass the computer-readable description of the intent to the graph machine;

wherein the graph machine is further configured to:

select a target function node of the AI graph data structure based on the computer-readable description of the intent associated with the query;

select a path through the AI graph data structure ending at the target function node; and

invoke one or more APIs to execute a plurality of other functions represented by function nodes in the path to the target function and to execute the target function.

20. The computerized personal assistant of claim 19 , wherein the natural language processing machine is previously trained via supervised learning on a plurality of labelled APIs, wherein a labelled API includes documentation describing an API annotated by one or more trainers to include one or more semantic labels, wherein a semantic label indicates an API-specific parameter of the API and an API-agnostic semantic entity corresponding to the API-specific parameter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2018
From: WILLIAMS, KYLE MARK; ZITOUNI, IMED
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 045649/0780 →
Continuity (1)
Related Publication 20190332667A1 · Oct 31, 2019