Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Filtered n-Paths (2.2.22)

Updated on 2022-12-08 GMT+08:00

Introduction

The filtered n-Paths algorithm is used to find no more than n k-hop loop-free paths between the source and target vertices. The start vertex (source), end vertex (target), number of hops (k), number of paths (n), and filter criteria (filters) are the parameters for the algorithm.

  • Algorithm name: filtered_n_paths
  • filtered_n_paths

Applicable Scope

Any network

Request Parameters

Table 1 Body format

Field

Mandatory

Type

Description

algorithmName

Yes

String

The value is filtered_n_paths.

parameters

Yes

JSON format

For details about the format, see Table 2.

filters

Yes

JSon Array

Filter criteria. Each element in the array corresponds to a filter. For details about the format, see Table 3.

Table 2 Parameter description

Parameter

Mandatory

Description

Type

Value Range

Default Value

source

Yes

Source vertex

String

Internal vertices

None

target

Yes

Target vertex

String

Internal vertices

None

k

Yes

Number of hops

Int

[2,6]

2

n

Yes

Number of paths

Int

[1,1000]

1

Table 3 filters element format

Parameter

Mandatory

Type

Value Range

Default Value

Description

edge_filter

No

json

N/A

N/A

Filter criteria for full-graph edge query

vertex_filter

No

json

None

None

Filter criteria for full-graph vertex query

Table 4 response_data parameter description

Field

Mandatory

Type

Description

path_length

Yes

int

Path length

paths_number

Yes

int

Number of paths

paths

Yes

JsonArray

Path set. Example value: ["111","119","58","96","82","57","56"].

source

Yes

String

Source vertex

target

Yes

String

Target vertex

Example Request

POST http://IP:PORT/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=execute-algorithm
{
    "algorithmName": "filtered_n_paths",
    "filters": [
    {
        "edge_filter":
        {
            "property_filter":
            {
                "leftvalue":
                {
                    "label_name": "labelName"
                },
                "predicate": "=",
                "rightvalue":
                {
                    "value": "default"
                }
            }
        }
    }],
    "parameters":
    {
        "k": 6,
        "n": 100,
        "source": "111",
        "target": "56"
    }
}

Response

{
    "jobId": "b14f6380-f115-46ab-990e-9a76a984ebd2154236181",
    "jobType": 2
}

Example for Querying a Job

GET http://IP:PORT/ges/v1.0/{project_id}/graphs/{graph_name}/jobs/{jobId}/status

Query Result

{
    "data": {
        "outputs": {
            "data_return_size": 3,
            "paths": [
                [
                    "111",
                    "119",
                    "58",
                    "96",
                    "82",
                    "57",
                    "56"
                ],
                [
                    "111",
                    "119",
                    "58",
                    "61",
                    "76",
                    "57",
                    "56"
                ],
                [
                    "111",
                    "119",
                    "58",
                    "79",
                    "76",
                    "57",
                    "56"
                ]
            ],
            "runtime": 0.000308,
            "source": "111",
            "path_length": 6,
            "data_offset": 0,
            "paths_number": 3,
            "data_total_size": 3,
            "target": "56"
        }
    },
    "status": "success"
}

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback