# US 2025/0165318 A1 · Application programing interface identification method and apparatus, medium, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0165318 A1
- Document ID: US20250165318A1
- Status: Published application
- Kind: A1
- Application number: 18/954,239
- Filed: 2024-11-20
- Published: 2025-05-22
- Earliest claimed: 2023-11-21
- Assignees: Beijing Zitiao Network Technology Co., Ltd.
- Applicants: Beijing Zitiao Network Technology Co., Ltd.
- Inventors: Haitong JIA; Hu LI; Kaiqiang SHAO; Yinfei XU; Yixiao XU; Zilong XU
- Web page: https://patentgrep.com/patent/US20250165318A1

## CPC

- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- H04L 63/1408: {by monitoring network traffic (monitoring network traffic per se H04L43/00)}
- G06F 16/9027: {Trees}
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- H04L 45/02: Topology update or discovery
- H04L 45/48: Routing tree calculation
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

The present disclosure relates to an application programing interface identification method and apparatus, a medium, and an electronic device. The method includes: extracting a current API request path from current network traffic; and in response to a target path matching the current API request path existing in a request path tree and an API list not including the target path, adding the target path to the API list, a node belonging to a dynamic parameter in the request path tree is a wildcard node.

## Claims

### Claim 1

An application programing interface identification method, comprising:
extracting a current application programing interface (API) request path from current network traffic; and
in response to a target path matching the current API request path existing in a request path tree and an API list not including the target path, adding the target path to the API list, wherein the request path tree is a multiway tree that is dynamically updated based on a historical API request path, and a node belonging to a dynamic parameter in the request path tree is a wildcard node.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to the target path not existing in the request path tree, adding the current API request path to the request path tree to obtain a new request path tree, wherein in the new request path tree, any path node on the current API request path is a parent node of an adjacent downstream path node.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the method further comprises:
traversing the request path tree at a first preset period to identify the node belonging to the dynamic parameter in the request path tree; and
replacing the node belonging to the dynamic parameter in the request path tree with a preset character.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the traversing the request path tree at the first preset period comprises:
traversing the request path tree at the first preset period by using a pre-trained deep learning model.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the deep learning model traverses the request path tree in a following manner:
for each node in the request path tree, after all child nodes of the node are spliced, inputting all the child nodes of the node to the deep learning model to determine whether all child nodes of the node include the dynamic parameter; and
in response to the child nodes of the node including the dynamic parameter, determining that all the child nodes of the node belong to the dynamic parameter.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the method further comprises:
updating the deep learning model according to the API list at a second preset period.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the updating the deep learning model according to the API list at the second preset period comprises:
obtaining a current API list at the second preset period;
replacing preset characters in the current API list with original characters before replacement to obtain a reference API list;
for each reference path of at least part of reference paths in the reference API list, determining label information of at least part of path nodes on the reference path, wherein the label information is used for representing whether a corresponding path node belongs to the dynamic parameter; and
training the deep learning model by using each piece of the label information and a path node corresponding to each piece of the label information as training samples.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the request path tree comprises a plurality of request path subtrees respectively corresponding to a plurality of sites, wherein each of the plurality of sites corresponds to at least one domain name; and
the method further comprises:
after a current API request is extracted, determining a target domain name in a uniform resource locator where the current API request path is located; and
in response to a request path subtree corresponding to a target site including a path matching the current API request path, determining that the target path exists in the request path tree, wherein the target site is a site that corresponds to the target domain name in the plurality of sites.

### Claim 9

A computer-readable medium, on which computer programs are stored, wherein the programs, when executed by a processing apparatus, implement:
extracting a current application programing interface (API) request path from current network traffic; and
in response to a target path matching the current API request path existing in a request path tree and an API list not including the target path, adding the target path to the API list, wherein the request path tree is a multiway tree that is dynamically updated based on a historical API request path, and a node belonging to a dynamic parameter in the request path tree is a wildcard node.

### Claim 10 (depends on 9)

The computer-readable medium according to claim 9, the programs, when executed by the processing apparatus, further implement:
in response to the target path not existing in the request path tree, adding the current API request path to the request path tree to obtain a new request path tree, wherein in the new request path tree, any path node on the current API request path is a parent node of an adjacent downstream path node.

### Claim 11 (depends on 10)

The computer-readable medium according to claim 10, the programs, when executed by the processing apparatus, further implement:
traversing the request path tree at a first preset period to identify the node belonging to the dynamic parameter in the request path tree; and
replacing the node belonging to the dynamic parameter in the request path tree with a preset character.

### Claim 12 (depends on 9)

The computer-readable medium according to claim 9, wherein the request path tree comprises a plurality of request path subtrees respectively corresponding to a plurality of sites, wherein each of the plurality of sites corresponds to at least one domain name; and
the programs, when executed by the processing apparatus, further implement:
after a current API request is extracted, determining a target domain name in a uniform resource locator where the current API request path is located; and
in response to a request path subtree corresponding to a target site including a path matching the current API request path, determining that the target path exists in the request path tree, wherein the target site is a site that corresponds to the target domain name in the plurality of sites.

### Claim 13

An electronic device, comprising:
a storage apparatus, on which computer programs are stored; and
a processing apparatus, configured to execute the computer programs in the storage apparatus to implement:
extracting a current application programing interface (API) request path from current network traffic; and
in response to a target path matching the current API request path existing in a request path tree and an API list not including the target path, adding the target path to the API list, wherein the request path tree is a multiway tree that is dynamically updated based on a historical API request path, and a node belonging to a dynamic parameter in the request path tree is a wildcard node.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the processing apparatus is configured to execute the computer programs in the storage apparatus to further implement:
in response to the target path not existing in the request path tree, adding the current API request path to the request path tree to obtain a new request path tree, wherein in the new request path tree, any path node on the current API request path is a parent node of an adjacent downstream path node.

### Claim 15 (depends on 14)

The electronic device according to claim 14, wherein the processing apparatus is configured to execute the computer programs in the storage apparatus to further implement:
traversing the request path tree at a first preset period to identify the node belonging to the dynamic parameter in the request path tree; and
replacing the node belonging to the dynamic parameter in the request path tree with a preset character.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the traversing the request path tree at the first preset period comprises:
traversing the request path tree at the first preset period by using a pre-trained deep learning model.

### Claim 17 (depends on 16)

The electronic device according to claim 16, wherein the deep learning model traverses the request path tree in a following manner:
for each node in the request path tree, after all child nodes of the node are spliced, inputting the all the child nodes of the node to the deep learning model to determine whether the all child nodes of the node include the dynamic parameter; and
in response to the child nodes of the node including the dynamic parameter, determining that all the child nodes of the node belong to the dynamic parameter.

### Claim 18 (depends on 16)

The electronic device according to claim 16, wherein the processing apparatus is configured to execute the computer programs in the storage apparatus to further implement:
updating the deep learning model according to the API list at a second preset period.

### Claim 19 (depends on 18)

The electronic device according to claim 18, wherein the updating the deep learning model according to the API list at the second preset period comprises:
obtaining a current API list at the second preset period;
replacing preset characters in the current API list with original characters before replacement to obtain a reference API list;
for each reference path of at least part of reference paths in the reference API list, determining label information of at least part of path nodes on the reference path, wherein the label information is used for representing whether a corresponding path node belongs to the dynamic parameter; and
training the deep learning model by using each piece of the label information and a path node corresponding to each piece of the label information as training samples.

### Claim 20 (depends on 13)

The electronic device according to claim 13, wherein the request path tree comprises a plurality of request path subtrees respectively corresponding to a plurality of sites, wherein each of the plurality of sites corresponds to at least one domain name; and
the processing apparatus is configured to execute the computer programs in the storage apparatus to further implement:
after a current API request is extracted, determining a target domain name in a uniform resource locator where the current API request path is located; and
in response to a request path subtree corresponding to a target site including a path matching the current API request path, determining that the target path exists in the request path tree, wherein the target site is a site that corresponds to the target domain name in the plurality of sites.
