修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

v5.0
搜索
    v5.0

      驱动数据结构

      嬴图Python驱动提供一系列数据结构,用于应用与图数据库的交互。

      所有数据结构均支持getter方法获取属性,以及setter方法设定属性值。

      Node

      Node对象包含以下属性:

      属性
      类型
      默认
      描述
      uuid int / _uuid
      id str / _id
      schema str / 点所属的Schema名称
      values Dict[str,any] / 点属性键值对

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.gql("MATCH (n) RETURN n LIMIT 5", requestConfig)
      nodes = response.alias("n").asNodes()
      
      print("ID of the first node:", nodes[0].getID())
      print("Name of the first node:", nodes[0].get("name"))
      

      ID of the first node: ULTIPA800000000000004B
      Name of the first node: Claire89
      

      Edge

      Edge对象包含以下属性:

      属性
      类型
      默认
      描述
      uuid int / _uuid
      fromUuid int / 边起点的_uuid
      toUuid int / 边终点的_uuid
      fromId str / 边起点的_id
      toId str / 边终点的_id
      schema str / 边所属的Schema名称
      values Dict[str,any] / 边属性键值对

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.gql("MATCH ()-[e]->() RETURN e LIMIT 3", requestConfig)
      edges = response.alias("e").asEdges()
      
      for edge in edges:
          print(edge.getValues())
      

      {'toUuid': 13, 'uuid': 110, 'fromUuid': 7}
      {'toUuid': 1032, 'uuid': 1391, 'fromUuid': 7, 'timestamp': 1537331913, 'datetime': '2018-09-19 12:38:33'}
      {'toUuid': 1005, 'uuid': 1390, 'fromUuid': 7, 'timestamp': 1544118960, 'datetime': '2018-12-07 01:56:00'}
      

      Path

      Path对象包含以下属性:

      属性
      类型
      默认
      描述
      nodeUUids List[int] / 路径中点的_uuid列表
      edgeUuids List[int] / 路径中边的_uuid列表
      nodes Dict[int, Node] {} 路径中点的字典,其中键是点的_uuid,值是相应的点
      edges Dict[int, Edge] {} 路径中边的字典,其中键是边的_uuid,值是相应的边

      Path对象支持的方法:

      方法
      返回值
      描述
      length() int 获取路径长度,即路径中的边数量

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.gql("MATCH p = ()-[]-()-[]-() RETURN p LIMIT 3", requestConfig)
      graph = response.alias("p").asGraph()
      
      print("Nodes in each returned path:")
      paths = graph.paths
      for path in paths:
        print(path.nodeUuids)
      

      Nodes in each returned path:
      [6196955286285058052, 7998395137233256457, 8214567919347040275]
      [6196955286285058052, 7998395137233256457, 8214567919347040275]
      [6196955286285058052, 7998395137233256457, 5764609722057490441]
      

      Graph

      Graph对象包含以下属性:

      属性
      类型
      默认
      描述
      paths List[Path] / 返回的路径列表
      nodes Dict[int, Node] {} 图中点的字典,其中键是点的_uuid,值是相应的点
      edges Dict[int, Edge] {} 图中边的字典,其中键是边的_uuid,值是相应的边

      Graph对象支持的方法:

      方法
      参数
      返回值
      描述
      addNode() node: Node / nodes中新增一个点
      addEdge() edge: Edge / edges中新增一条边

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.gql("MATCH p = ()-[]-()-[]-() RETURN p LIMIT 3", requestConfig)
      graph = response.alias("p").asGraph()
      
      print("Nodes in each returned path:")
      paths = graph.paths
      for path in paths:
        print(path.nodeUuids)
      
      print("----------")
      print("Nodes in the graph formed by all returned paths:")
      print(graph.nodes.keys())
      

      Nodes in each returned path:
      [6196955286285058052, 7998395137233256457, 8214567919347040275]
      [6196955286285058052, 7998395137233256457, 8214567919347040275]
      [6196955286285058052, 7998395137233256457, 5764609722057490441]
      ----------
      Nodes in the graph formed by all returned paths:
      dict_keys([6196955286285058052, 7998395137233256457, 8214567919347040275, 5764609722057490441])
      

      GraphSet

      GraphSet对象包含以下属性:

      属性
      类型
      默认
      描述
      id str / 图ID
      name str / 必填,图名称
      totalNodes int / 图中点的总数
      totalEdges int / 图中边的总数
      shards List[str] [] 用来存储图的Shard服务器的ID列表
      partitionBy str Crc32 用于图分片的哈希函数,包括Crc32Crc64WECrc64XZCityHash64
      status str / 图状态,包括NORMALLOADING_SNAPSHOTCREATINGDROPPINGSCALING
      description str / 图描述
      slotNum int 0 图分片使用的槽数量

      response = Conn.uql("show().graph()")
      graphs = response.alias("_graph").asGraphSets()
      for graph in graphs:
          print(graph.name)
      

      DFS_EG
      cyber
      netflow
      

      Schema

      Schema对象包含以下属性:

      属性
      类型
      默认
      描述
      name str / 必填,Schema名称
      dbType DBType / 必填,Schema类型,包括DBNODEDBEDGE
      properties List[Property] / 与Schema关联的属性列表
      description str / Schema描述
      total int 0 属于该Schema的点或边总数
      id int / Schema ID
      stats list<Map{from, to, count}> [] 按起点、终点和边的Schema分组的边数量

      response = Conn.uql("show().node_schema()")
      schemas = response.alias("_nodeSchema").asSchemas()
      for schema in schemas:
          print(schema.name, "has", schema.total, "nodes")
      

      default has 0 nodes
      member has 7 nodes
      organization has 19 nodes
      

      Property

      Property对象包含以下属性:

      属性
      类型
      默认
      描述
      name str / 必填,属性名
      type UltipaPropertyType / 必填,属性值类型,包括INT32UINT32INT64UINT64FLOATDOUBLEDECIMALSTRINGTEXTDATETIMETIMESTAMPBLOBBOOLPOINTLISTSETMAPUUIDIDFROMFROM_UUIDTOTO_UUIDIGNOREUNSET
      subType List[UltipaPropertyType] / 如果typeLISTSET,设定其元素类型;列表内只能包括一个UltipaPropertyType,且只能为INT32UINT32INT64UINT64FLOATDOUBLEDECIMALSTRINGTEXTDATETIMETIMESTAMP
      schema str / 属性关联的Schema名称
      description str / 属性描述
      lte bool / 属性是否加载到引擎(LTE)
      read bool / 属性是否可读
      write bool / 属性是否可写
      encrypt str / 属性加密方法,包括AES128AES256RSAECC
      extra str / 额外的属性信息

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.uql("show().node_property(@account)", requestConfig)
      properties = response.alias("_nodeProperty").asProperties()
      for property in properties:
          print(property.name)
      

      title
      profile
      age
      name
      logo
      

      Table

      Table对象包含以下属性:

      属性
      类型
      默认
      描述
      name str / 表名称
      headers List[Dict] / 表头
      rows List[any] / 表中的行

      Table对象支持的方法:

      方法
      返回值
      描述
      toKV() List[Dict] 将表中的所有行转换成字典列表

      requestConfig = RequestConfig(graph="miniCircle")
      response = Conn.gql("MATCH (n:account) RETURN table(n._id, n.name) LIMIT 3")
      table = response.get(0).asTable()
      print("Header:")
      print(table.headers)
      print("First Row:")
      print(table.toKV()[0])
      

      Header:
      [{'property_name': 'n._id', 'property_type': 'string'}, {'property_name': 'n.name', 'property_type': 'string'}]
      First Row:
      {'n._id': 'ULTIPA800000000000003B', 'n.name': 'Velox'}
      

      Algo

      Algo对象包含以下属性:

      属性
      类型
      描述
      name str 算法名称
      description str 算法描述
      version str 算法版本
      parameters dict 算法参数
      write_to_file_parameters dict 算法文件回写参数
      write_to_db_parameters dict 算法属性回写参数
      result_opt str 用来定义算法支持的执行方法

      response = Conn.uql("show().algo()")
      algos = response.alias("_algoList").asAlgos()
      print(algos[0])
      

      {'name': 'celf', 'description': 'celf', 'version': '1.0.0', 'result_opt': '25', 'parameters': {'seedSetSize': 'size_t,optional,1 as default', 'monteCarloSimulations': 'size_t,optional, 1000 as default', 'propagationProbability': 'float,optional, 0.1 as default'}, 'write_to_db_parameters': {}, 'write_to_file_parameters': {'filename': 'set file name'}}
      

      Exta

      Exta是由用户开发的自定义算法。

      Exta对象包含以下属性:

      属性
      类型
      描述
      name str Exta名称
      author str Exta作者
      version str Exta版本
      detail str Exta的YML配置文件内容

      response = Conn.uql("show().exta()")
      extas = response.alias("_extaList").asExtas()
      print(extas[0].name)
      

      page_rank
      

      Index

      Index对象包含以下属性:

      属性
      类型
      描述
      name str 索引名称
      properties str 索引属性名称
      schema str 索引的schema名称
      status str 索引状态,包括done和creating
      size str 索引大小,单位为字节
      DBType DBType 索引类型,包括DBNODE和DBEDGE

      response = Conn.uql("show().index()")
      indexList = response.alias("_nodeIndex").asIndexes()
      
      for index in indexList:
          print(index.schema, index.properties, index.size)
      

      account name 0
      movie name 2526
      

      response = Conn.uql("show().fulltext()")
      indexList = response.alias("_edgeFulltext").asIndexes()
      
      for index in indexList:
          print(index.schema, index.properties, index.schema)
      

      contentFull content review
      

      Privilege

      Privilege对象包含以下属性:

      属性
      类型
      描述
      systemPrivileges List[str] 系统权限
      graphPrivileges List[str] 图权限

      response = Conn.uql("show().privilege()")
      privilege = response.alias("_privilege").asPrivilege()
      print(privilege.systemPrivileges)
      

      ["TRUNCATE","COMPACT","CREATE_GRAPH","SHOW_GRAPH","DROP_GRAPH","ALTER_GRAPH","MOUNT_GRAPH","UNMOUNT_GRAPH","TOP","KILL","STAT","SHOW_POLICY","CREATE_POLICY","DROP_POLICY","ALTER_POLICY","SHOW_USER","CREATE_USER","DROP_USER","ALTER_USER","GRANT","REVOKE","SHOW_PRIVILEGE"]
      

      Policy

      Policy对象包含以下属性:

      属性
      类型
      描述
      name str 策略名称
      systemPrivileges List[str] 策略中的系统权限
      graphPrivileges dict 策略中的图权限和对应图集
      propertyPrivileges dict 策略中的属性权限
      policies List[str] 策略中的策略

      response = Conn.uql("show().policy()")
      policyList = response.alias("_policy").asPolicies()
      
      for policy in policyList:
          print(policy.name)
      

      manager
      operator
      

      User

      User对象包含以下属性:

      属性
      类型
      描述
      username str 用户名
      create str 用户创建时间
      systemPrivileges List[str] 授予用户的系统权限
      graphPrivileges dict 授予用户的图权限和对应图集
      propertyPrivileges dict 授予用户的属性权限
      policies List[str] 授予用户的策略

      response = Conn.uql("show().user('Tester')")
      user = response.alias("_user").asUsers()
      
      print(user.toJSON())
      

      {"create": 1721974206, "graphPrivileges": "{}", "policies": "[]", "propertyPrivileges": "{\"node\":{\"read\":[],\"write\":[[\"miniCircle\",\"account\",\"name\"]],\"deny\":[]},\"edge\":{\"read\":[],\"write\":[],\"deny\":[]}}", "systemPrivileges": "[]", "username": "Tester"}
      

      Stats

      Stats对象包含以下属性:

      属性
      类型
      描述
      cpuUsage str CPU使用百分比
      memUsage str 内存使用,单位为兆字节
      expiredDate str 许可证过期时间
      cpuCores str CPU核数
      company str 公司名称
      serverType str 服务器类型
      version str 服务器版本

      response = Conn.uql("stats()")
      stats = response.get(0).asStats()
      print("CPU usage (%):", stats.cpuUsage)
      print("Memory usage:", stats.memUsage)
      

      CPU usage (%): 5.415697
      Memory usage: 9292.265625
      

      Process

      Process对象包含以下属性:

      属性
      类型
      描述
      processId String 进程ID
      processUql String 与进程一起运行的UQL
      status String 进程状态
      duration String 任务已运行时长,单位为秒

      requestConfig = RequestConfig(graphName="amz")
      
      response = Conn.uql("top()", requestConfig)
      processList = response.alias("_top").asProcesses()
      for process in processList:
          print(process.processId)
      

      a_2_569_2
      a_3_367_1
      

      Task

      Task对象包含以下属性:

      属性
      类型
      描述
      Task_info Task_info 任务信息包括task_idalgo_namestart_timewriting_start_timeend_time
      param dict 算法参数和对应值
      result dict 算法结果和统计数据及对应值

      requestConfig = RequestConfig(graphName="miniCircle")
      
      response = Conn.uql("show().task()", requestConfig)
      tasks = response.alias("_task").asTasks()
      print(tasks[0].task_info)
      print(tasks[0].param)
      print(tasks[0].result)
      

      {'task_id': 77954, 'server_id': 2, 'algo_name': 'louvain', 'start_time': 1728543848, 'writing_start_time': 1728543848, 'end_time': 1728543848, 'time_cost': 0, 'TASK_STATUS': 3, 'return_type': <ultipa.types.types_response.Return_Type object at 0x0000025E53C0F940>}
      {"phase1_loop_num":"20","min_modularity_increase":"0.001"}
      {'community_count': '10', 'modularity': '0.535017', 'result_files': 'communityID,ids,num'}
      

      Attr

      Attr对象包含以下属性:

      属性
      类型
      描述
      name str Attr名称
      values 任意 Attr行
      type ResultType Attr类型

      response = Conn.uql("find().nodes({@ad}) as n return n.brand limit 5")
      attr = response.alias("n.brand").asAttr()
      print(attr.values)
      

      [14655, 14655, 14655, 14655, 434760]
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写