OpenHuFu

OpenHuFu

开源数据联邦系统实现安全高效查询处理

OpenHuFu是一个开源数据联邦系统,旨在解决数据孤岛问题,实现跨数据所有者的安全高效查询处理。系统采用安全多方计算技术,包括秘密共享、混淆电路和不经意传输,为研究人员提供灵活平台,用于快速实现和评估联邦查询处理算法。OpenHuFu支持关系查询和空间查询等多种类型,并提供通信成本和运行时间等评估指标。该系统为数据联邦和联邦学习研究提供了重要工具。

OpenHuFu数据联邦系统安全查询多方安全计算空间数据Github开源项目

OpenHuFu: An Open-Sourced Data Federation System

codecov License Total Lines

OpenHuFu is the open-sourced version of the spatial data federation system, Hu-Fu, in our VLDB'22 paper.

The appendix of the full paper can be referred to this PDF.

Project Description

Data isolation has become an obstacle to scale up query processing over big data, since sharing raw data among data owners is often prohibitive due to security concerns. A promising solution is to perform secure queries and analytics over a federation of multiple data owners leveraging techiniques like secure multi-party computation (SMC) and differential privacy, as evidenced by recent work on data federation and federated learning.

OpenHuFu is an open-sourced system for efficient and secure query processing on a data federation. It provides flexibility for researchers to quickly implement their algorithms for processing federated queries with SMC techniques, such as secret sharing, garbled circuit and oblivious transfer. With its help, we can quickly conduct the experimental evaluation and obtain the performance of the designed algorithms over benchmark datasets.

Compile OpenHuFu from Source Code

Prerequisites:

  • Linux or MacOS
  • Java 11
  • Maven (version at least 3.5.2)
  • C++ (generate TPC-H data)
  • Python3 (generate spatial data)
  • Git & Git LFS (Git Large File Storage)

Build OpenHuFu

Run the following commands:

  1. Clone OpenHuFu repository:
git clone https://github.com/BUAA-BDA/OpenHuFu.git
  1. Download big files from Git LFS(Large File Storage)
cd OpenHuFu git lfs install --skip-smudge git lfs pull
  1. Build:
cd OpenHuFu bash scripts/build/package.sh

OpenHuFu is now installed in release

Notes

If you use MacsOS, you need to add this to settings.xml(maven settings file):

<profiles> <profile> <id>macos</id> <properties> <os.detected.classifier>osx-x86_64</os.detected.classifier> </properties> </profile> </profiles> <activeProfiles> <activeProfile>macos</activeProfile> </activeProfiles>

Data Generation

Relational data: TCP-H

How to use it:

bash scripts/test/extract_tpc_h.sh cd dataset/TPC-H\ V3.0.1/dbgen cp makefile.suite makefile # If you use MacOS, you need to replace '#include <malloc.h>' with #include <sys/malloc.h> in dbgen make # Go to the root folder cd ../../.. # x is the number of database,y is the volume of each database(MB) bash scripts/test/generateData.sh x y

Spatial data

Spatial sample data: dataset/newyork-taxi-sample.data:

How to use it

Generate spatial data:

pip3 install numpy python3 scripts/test/genSyntheticData.py databaseNum dataSize [distribution name] [params]

The distributions we support and their params are as follow:

Distributionparam1param2
unilow (default = -1e7)high (default = 1e7)
normu (default = 0)sigma (default = 1e5)
expmu (default = 5e6)

(If needed, you can modify scripts/test/genSyntheticData.py)

Notes

Each table is defined by two files in CSV and SCM format, and the names of the files serve as the actual names of the tables. <br/> The CSV file contains the column names and the data of the table, while the SCM file contains the column names and column types. The delimiter is used to separate different column fields, and it can be specified in the owner's configuration file.

Configuration File

OwnerSide

UserSide

Development procedure

  1. Develop your algorithms
  • Aggregate:
class extends com.hufudb.openhufu.owner.implementor.aggregate.OwnerAggregateFunction /** * The class must contains a constructor function with parameters: * (OpenHuFuPlan.Expression agg, Rpc rpc, ExecutorService threadPool, OpenHuFuPlan.TaskInfo taskInfo) */
  • Join:
class implements com.hufudb.openhufu.owner.implementor.join.OwnerJoin
  1. Set the algorithm for the query(example in owner.yaml):
openhufu: implementor: aggregate: sum: com.hufudb.openhufu.owner.implementor.aggregate.sum.SecretSharingSum max: null min: null join: com.hufudb.openhufu.owner.implementor.join.HashJoin
  1. Build OpenHuFu

    Follow the instructions in Section Build OpenHuFu to build the project.

  2. Run OpenHuFu

    We provide sample configurations for 3 owners in release/config folder. <br/> You can use the configuration to run our demo on a single machine, or modify the configuration files to deploy OpenHuFu on multiple machines. <br/>

    Please note that since the configuration files use relative paths, we need to cd release before running the command.

    Run demo on a single machine:

    bash owner_all.sh

    Run OpenHuFu on multiple machines:

    bash owner.sh start ./config/owner{i}.json

    Stop OpeHuFu:

    bash owner.sh stop
  3. Run benchmarks

bash benchmark.sh
  1. Evaluating communication cost

Before running benchmarks on OpenHuFu, you can follow the instructions to evaluate communication cost of the query:

  • Monitoring the port
# run the shell script as root # 8888 is the port number sudo bash scripts/test/network_mmonitor/start.sh 8888
  • Calculating the communication cost
# run the shell script as root sudo bash scripts/test/network_mmonitor/monitor.sh

Data Query Language

  1. Plan
  2. Function Call

Supported Query Types

  • Filter
  • Projection
  • Join
    • equi join
    • theta join
  • Cross products
  • Aggregate(inc. group-by)
  • Limited window aggs
  • Distinct
  • Sort
  • Limit
  • Common table expressions
  • Spatial Queries:
    • range query
    • range counting
    • knn query
    • distance join
    • knn join

Evaluation Metrics

  • Communication Cost
  • Running Time
    • Total Query Time
    • Local Query Time
    • Encryption Time
    • Decryption Time

Related Work

If you find OpenHuFu helpful in your research, please consider citing our papers and the bibtex are listed below:

  1. Hu-Fu: Efficient and Secure Spatial Queries over Data Federation. Yongxin Tong, Xuchen Pan, Yuxiang Zeng, Yexuan Shi, Chunbo Xue, Zimu Zhou, Xiaofei Zhang, Lei Chen, Yi Xu, Ke Xu, Weifeng Lv. Proc. VLDB Endow. 15(6): 1159-1172 (2022). [paper] [slides] [bibtex]

Other helpful related work from our group is listed below:

  1. DM-PFL: Hitchhiking Generic Federated Learning for Efficient Shift-Robust Personalization. Wenhao Zhang, Zimu Zhou, Yansheng Wang, Yongxin Tong. KDD 2023. [paper] [bibtex]

  2. Efficient Approximate Range Aggregation Over Large-Scale Spatial Data Federation. Yexuan Shi, Yongxin Tong, Yuxiang Zeng, Zimu Zhou, Bolin Ding, Lei Chen. IEEE Trans. Knowl. Data Eng. 35(1): 418-430 (2023). [paper] [bibtex]

  3. Hu-Fu: A Data Federation System for Secure Spatial Queries. Xuchen Pan, Yongxin Tong, Chunbo Xue, Zimu Zhou, Junping Du, Yuxiang Zeng, Yexuan Shi, Xiaofei Zhang, Lei Chen, Yi Xu, Ke Xu, Weifeng Lv. Proc. VLDB Endow. 15(12): 3582-3585 (2022). [paper] [bibtex]

  4. Data Source Selection in Federated Learning: A Submodular Optimization Approach. Ruisheng Zhang, Yansheng Wang, Zimu Zhou, Ziyao Ren, Yongxin Tong, Ke Xu. DASFAA 2022. [paper] [bibtex]

  5. Fed-LTD: Towards Cross-Platform Ride Hailing via Federated Learning to Dispatch. Yansheng Wang, Yongxin Tong, Zimu Zhou, Ziyao Ren, Yi Xu, Guobin Wu, Weifeng Lv. KDD 2022. [paper] [bibtex]

  6. Efficient and Secure Skyline Queries over Vertical Data Federation. Yuanyuan Zhang, Yexuan Shi, Zimu Zhou, Chunbo Xue, Yi Xu, Ke Xu, Junping Du. IEEE Trans. Knowl. Data Eng. (2022). [paper] [bibtex]

  7. Federated Topic Discovery: A Semantic Consistent Approach. Yexuan Shi, Yongxin Tong, Zhiyang Su, Di Jiang, Zimu Zhou, Wenbin Zhang. IEEE Intell. Syst. 36(5): 96-103 (2021). [paper] [bibtex]

  8. Industrial Federated Topic Modeling. Di Jiang, Yongxin Tong, Yuanfeng Song, Xueyang Wu, Weiwei Zhao, Jinhua Peng, Rongzhong Lian, Qian Xu, Qiang Yang. ACM Trans. Intell. Syst. Technol. 12(1): 2:1-2:22 (2021). [paper] [bibtex]

  9. A GDPR-compliant Ecosystem for Speech Recognition with Transfer, Federated, and Evolutionary Learning. Di Jiang, Conghui Tan, Jinhua Peng, Chaotao Chen, Xueyang Wu, Weiwei Zhao, Yuanfeng Song, Yongxin Tong, Chang Liu, Qian Xu, Qiang Yang, Li Deng. ACM Trans. Intell. Syst. Technol. 12(3): 30:1-30:19 (2021). [paper] [bibtex]

  10. An Efficient Approach for Cross-Silo Federated Learning to Rank. Yansheng Wang, Yongxin Tong, Dingyuan Shi, Ke Xu. ICDE 2021. [paper] [slides] [bibtex]

  11. Federated Learning in the Lens of Crowdsourcing. Yongxin Tong, Yansheng Wang, Dingyuan Shi. IEEE Data Eng. Bull. 43(3): 26-36 (2020). [paper] [bibtex]

  12. Federated Latent Dirichlet Allocation: A Local Differential Privacy Based Framework. Yansheng Wang, Yongxin Tong, Dingyuan Shi. AAAI 2020. [paper] [bibtex]

  13. Federated Acoustic Model Optimization for Automatic Speech Recognition. Conghui Tan, Di Jiang, Huaxiao Mo, Jinhua Peng, Yongxin Tong, Weiwei Zhao, Chaotao Chen, Rongzhong Lian, Yuanfeng Song, Qian Xu. DASFAA 2020. [paper] [bibtex]

  14. Efficient and Fair Data Valuation for Horizontal Federated Learning. Shuyue Wei, Yongxin Tong, Zimu Zhou, Tianshu Song. Federated Learning 2020. [paper] [bibtex]

  15. Profit Allocation for Federated Learning. Tianshu Song, Yongxin Tong, Shuyue Wei. IEEE BigData 2019. [paper] [slides] [bibtex]

  16. Federated Machine Learning: Concept and Applications. Qiang Yang, Yang Liu, Tianjian Chen, Yongxin Tong. ACM Trans. Intell. Syst. Technol. 10(2): 12:1-12:19 (2019). [paper]

编辑推荐精选

Manus

Manus

全面超越基准的 AI Agent助手

Manus 是一款通用人工智能代理平台,能够将您的创意和想法迅速转化为实际成果。无论是定制旅行规划、深入的数据分析,还是教育支持与商业决策,Manus 都能高效整合信息,提供精准解决方案。它以直观的交互体验和领先的技术,为用户开启了一个智慧驱动、轻松高效的新时代,让每个灵感都能得到完美落地。

飞书知识问答

飞书知识问答

飞书官方推出的AI知识库 上传word pdf即可部署AI私有知识库

基于DeepSeek R1大模型构建的知识管理系统,支持PDF、Word、PPT等常见文档格式解析,实现云端与本地数据的双向同步。系统具备实时网络检索能力,可自动关联外部信息源,通过语义理解技术处理结构化与非结构化数据。免费版本提供基础知识库搭建功能,适用于企业文档管理和个人学习资料整理场景。

Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

TraeAI IDE协作生产力转型热门AI工具
酷表ChatExcel

酷表ChatExcel

大模型驱动的Excel数据处理工具

基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。

使用教程AI工具酷表ChatExcelAI智能客服AI营销产品
DeepEP

DeepEP

DeepSeek开源的专家并行通信优化框架

DeepEP是一个专为大规模分布式计算设计的通信库,重点解决专家并行模式中的通信瓶颈问题。其核心架构采用分层拓扑感知技术,能够自动识别节点间物理连接关系,优化数据传输路径。通过实现动态路由选择与负载均衡机制,系统在千卡级计算集群中维持稳定的低延迟特性,同时兼容主流深度学习框架的通信接口。

DeepSeek

DeepSeek

全球领先开源大模型,高效智能助手

DeepSeek是一家幻方量化创办的专注于通用人工智能的中国科技公司,主攻大模型研发与应用。DeepSeek-R1是开源的推理模型,擅长处理复杂任务且可免费商用。

KnowS

KnowS

AI医学搜索引擎 整合4000万+实时更新的全球医学文献

医学领域专用搜索引擎整合4000万+实时更新的全球医学文献,通过自主研发AI模型实现精准知识检索。系统每日更新指南、中英文文献及会议资料,搜索准确率较传统工具提升80%,同时将大模型幻觉率控制在8%以下。支持临床建议生成、文献深度解析、学术报告制作等全流程科研辅助,典型用户反馈显示每周可节省医疗工作者70%时间。

Windsurf Wave 3

Windsurf Wave 3

Windsurf Editor推出第三次重大更新Wave 3

新增模型上下文协议支持与智能编辑功能。本次更新包含五项核心改进:支持接入MCP协议扩展工具生态,Tab键智能跳转提升编码效率,Turbo模式实现自动化终端操作,图片拖拽功能优化多模态交互,以及面向付费用户的个性化图标定制。系统同步集成DeepSeek、Gemini等新模型,并通过信用点数机制实现差异化的资源调配。

AI IDE
腾讯元宝

腾讯元宝

腾讯自研的混元大模型AI助手

腾讯元宝是腾讯基于自研的混元大模型推出的一款多功能AI应用,旨在通过人工智能技术提升用户在写作、绘画、翻译、编程、搜索、阅读总结等多个领域的工作与生活效率。

AI 办公助手AI对话AI助手AI工具腾讯元宝智能体热门
Grok3

Grok3

埃隆·马斯克旗下的人工智能公司 xAI 推出的第三代大规模语言模型

Grok3 是由埃隆·马斯克旗下的人工智能公司 xAI 推出的第三代大规模语言模型,常被马斯克称为“地球上最聪明的 AI”。它不仅是在前代产品 Grok 1 和 Grok 2 基础上的一次飞跃,还在多个关键技术上实现了创新突破。

下拉加载更多