# 知识图谱

知识图谱是一种结构化的知识表示方式，将知识呈现为现实世界实体（节点）及其相互关系（边）构成的网络，通常以（主语、谓语、宾语）这样的三元组形式存储，使机器能够对事实进行检索和推理，而不是仅仅匹配字符串。“知识图谱”一词于2012年5月进入公众视野，当时Google为网页搜索推出了其知识图谱（Knowledge Graph），但其基本思想可追溯到[语义网](https://www.edgepedia.org/zh/semantic-web)（Semantic Web）传统，即以带标签的有向图来表示信息。<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup><sup> • </sup><sup>[2](https://www.w3.org/2002/11/08-concepts/Overview.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 实体为节点，关系为边，通常编码为（主语、谓语、宾语）三元组<sup>[2](https://www.w3.org/2002/11/08-concepts/Overview.html)</sup> |
| Google发布 | 2012年5月16日，包含逾5亿个对象、逾35亿条事实和关系<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup> |
| Google数据来源 | Freebase、Wikipedia、CIA World Factbook等公开来源，并在更大规模上以搜索行为和网络数据加以扩充<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup> |
| 构建阶段 | 实体学习、本体学习和知识推理，利用机器学习进行实体抽取、关系抽取、实体链接和链接预测<sup>[3](https://www.techscience.com/CMES/v139n1/55119)</sup> |
| 生物医学规模 | Petagraph这一生物医学知识图谱包含1.18亿个关系<sup>[4](https://www.nature.com/articles/s41597-024-04070-w)</sup> |
| 查询 | Wikidata提供公开的SPARQL端点，自2015年中期起为其官方查询服务<sup>[5](https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/da)</sup> |
| 存储权衡 | 关系型系统在分组、排序和聚合类负载上占优；图系统在多表连接、模式匹配和路径识别类负载上占优<sup>[6](https://link.springer.com/article/10.1007/s41019-019-00110-3)</sup> |

## 数据模型

公认的形式化模型是[资源描述框架](https://www.edgepedia.org/zh/resource-description-framework)（Resource Description Framework，RDF），这是W3C制定的一项标准，其抽象语法为有向标签图。每条陈述都是一个由主语、谓语和宾语构成的三元组；弧线始终指向宾语，而一个图的含义就是其所含全部陈述的合取。节点可以是URI、字面量或空白节点，谓语本身也是以URI标识的关系，这使得不同的发布者能够共享同一套词汇表。<sup>[2](https://www.w3.org/2002/11/08-concepts/Overview.html)</sup>属性图模型为节点和边附加属性，Neo4j等系统采用这一模型；例如，统一生物医学知识图谱（Unified Biomedical Knowledge Graph）便采取属性图的形式。<sup>[4](https://www.nature.com/articles/s41597-024-04070-w)</sup>

## 构建

构建知识图谱通常被描述为三个阶段：实体学习、[本体学习](https://www.edgepedia.org/zh/ontology-learning)和知识推理。<sup>[3](https://www.techscience.com/CMES/v139n1/55119)</sup>对于非结构化文本，处理流水线首先识别命名实体，然后进行实体链接，判定某个提及所指称的是知识库中的哪个节点；莱比锡的调查指出，模态内关系抽取和跨模态实体链接在很大程度上仍是未解决的问题。<sup>[7](https://dbs.uni-leipzig.de/files/research/publications/2024-8/pdf/information-15-00509-with-cover.pdf)</sup>随后，[关系抽取](https://www.edgepedia.org/zh/relation-extraction)确定已识别实体之间的关系，将诸如专辑名称这样的文本片段转换为带类型的三元组。早期技术基于规则，使用Hearst模式等模式来识别“是一个”（is-a）关系，后来又辅以基于统计特征的分类器。<sup>[7](https://dbs.uni-leipzig.de/files/research/publications/2024-8/pdf/information-15-00509-with-cover.pdf)</sup>

如今，机器学习在整个流水线中都有贡献，包括实体抽取、关系抽取、实体链接，以及用于补全缺失事实的链接预测。<sup>[3](https://www.techscience.com/CMES/v139n1/55119)</sup>近期的系统还借助大语言模型进行抽取，这带来了质量风险：命名实体识别、关系抽取和实体链接中的错误会在流水线中传播，使抽取出的子图质量下降。<sup>[8](https://aclanthology.org/2025.emnlp-main.824.pdf)</sup>

## Google知识图谱

Google的发布将这一转变概括为“事物，而非字符串”（things, not strings）：系统不再去匹配诸如[泰姬陵]这类查询中的关键词，而是理解候选实体——那座陵墓、那位格莱美获奖音乐家，或者大西洋城的那家赌场——并能够辨别用户所指的究竟是哪一个。<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup>发布之初，它覆盖地标、名人、城市、运动队、建筑、电影、天体以及艺术作品，并从三个方面增强了搜索：在歧义实体中找到正确的那一个，概括用户常问的关于某实体的关键事实，以及提示更深入或更广泛的发现。<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup>展示哪些事实，是根据用户的总体行为来调整的；搜索[查尔斯·狄更斯](https://www.edgepedia.org/zh/charles-dickens)（Charles Dickens）的人想要的是他的书，而搜索[弗兰克·劳埃德·赖特](https://www.edgepedia.org/zh/frank-lloyd-wright)（Frank Lloyd Wright）的人想要的是他的建筑。<sup>[1](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)</sup>到2012年8月，该功能已扩展到所有英语国家，Google开始生成相互关联的实体列表，例如[著名女天文学家]的搜索结果，其规模达到数十万份列表、涉及数百万个条目。<sup>[9](https://blog.google/products-and-platforms/products/search/building-search-engine-of-future-one/)</sup>

## 应用

凡是需要整合异构数据并以关系方式进行查询的场合，都会用到知识图谱。在生物医学领域，知识图谱整合组学数据、本体和临床资源；应用包括药物发现、药物重定位、药物靶点预测和临床决策支持。<sup>[4](https://www.nature.com/articles/s41597-024-04070-w)</sup><sup> • </sup><sup>[10](https://pubmed.ncbi.nlm.nih.gov/37702941/)</sup>Petagraph体现了其规模：它将数百万个定量基因组学数据点嵌入由180多个本体和标准构成的注释支架之中，在其基础之上增加了逾1200万个节点（增幅近44%），并使关系数量翻倍有余，从5200万增至1.18亿。<sup>[4](https://www.nature.com/articles/s41597-024-04070-w)</sup>在医学影像领域，知识图谱推理支持计算机辅助诊断，其可解释性以及与大语言模型的整合被列为未来的方向。<sup>[11](https://www.sciencedirect.com/science/article/pii/S0010482524011855)</sup>在企业环境中，知识图谱是表示复杂的多领域患者信息的若干候选架构之一，与关系型、面向文档型和向量数据库并列。<sup>[12](https://journals.sagepub.com/doi/10.3233/SHTI260023)</sup>

## 存储与查询

知识图谱是一种数据模型，而不是存储引擎；它可以由专用的图数据库、RDF[三元组存储](https://www.edgepedia.org/zh/triplestore)或关系数据库来提供支持。构建在关系型系统之上的RDF存储，如RDF-3X、Hexastore和SW-store，会将SPARQL查询转换为带有排序合并连接的SQL。<sup>[6](https://link.springer.com/article/10.1007/s41019-019-00110-3)</sup>2019年的一项基准测试在TPC-H和LDBC负载上比较了[PostgreSQL](https://www.edgepedia.org/zh/postgresql)与Neo4j、ArangoDB，发现关系型系统在以分组、排序和聚合操作为主的负载上大幅优于图系统，而图系统则在以多表连接、模式匹配和路径识别为主的负载上更胜一筹。<sup>[6](https://link.springer.com/article/10.1007/s41019-019-00110-3)</sup>图数据库也适合社交网络和推荐系统这类高度互联的数据，在这类场景中遍历连接十分高效，且往往与数据集总规模无关。<sup>[13](https://learn.microsoft.com/en-nz/fabric/graph/graph-relational-databases)</sup>

公开的知识图谱可以直接查询。Wikidata查询服务（Wikidata Query Service）针对Wikidata数据集提供SPARQL端点，对每个IP限制5个并行查询，并对长时间运行的查询设置超时；后端迁移计划于2026至2027年进行。<sup>[5](https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/da)</sup>

## 挑战

各篇综述反复报告的问题包括数据质量、可扩展性和互操作性，<sup>[14](https://ieeexplore.ieee.org/document/10771022/)</sup>不同知识图谱之间的整合以及预测关系的可解释性，<sup>[15](https://www.comsis.org/archive.php?show=ppr16053)</sup>还有本体随时间的演化。由于相继版本的本体之间的关系鲜有描述，概念的历史也未在本体层面予以保留，在不同时间标注的数据集便难以合并；一种应对方案是历史知识图谱（historical knowledge graph），它将一个本体的各个版本重新组合为单一图，以减少存储和分析开销。<sup>[16](https://www.sciencedirect.com/science/article/pii/S0950705120300241)</sup>一份Dagstuhl研讨会报告还提出了一个重大挑战，即构建一个公开的FAIR知识图谱，涵盖某一类中所有实体的信息，并强调构建者必须为所产出的全部资源记录来源信息。<sup>[17](https://drops.dagstuhl.de/storage/04dagstuhl-reports/volume14/issue02/24061/DagRep.14.2.1/DagRep.14.2.1.pdf)</sup>

## References

1. [Introducing the Knowledge Graph: things, not strings, Google Search Blog (May 16, 2012)](https://search.googleblog.com/2012/05/introducing-knowledge-graph-things-not.html)
2. [Resource Description Framework (RDF): Concepts and Abstract Syntax, W3C](https://www.w3.org/2002/11/08-concepts/Overview.html)
3. [Zhao, Z., Luo, X., Chen, M., Ma, L. (2024). A Survey of Knowledge Graph Construction Using Machine Learning. Computer Modeling in Engineering & Sciences, 139(1), 225-257](https://www.techscience.com/CMES/v139n1/55119)
4. [Petagraph: A large-scale unifying knowledge graph framework for integrating biomolecular and biomedical data, Scientific Data 11, 1338 (2024)](https://www.nature.com/articles/s41597-024-04070-w)
5. [Wikidata Query Service/User Manual, MediaWiki](https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/da)
6. [Which Category Is Better: Benchmarking Relational and Graph Database Management Systems, Data Science and Engineering 4, 309-322 (2019)](https://link.springer.com/article/10.1007/s41019-019-00110-3)
7. [Construction of Knowledge Graphs: Current State and Challenges, Information 15, 509 (2024)](https://dbs.uni-leipzig.de/files/research/publications/2024-8/pdf/information-15-00509-with-cover.pdf)
8. [KG-CQR paper, EMNLP 2025](https://aclanthology.org/2025.emnlp-main.824.pdf)
9. [Building the search engine of the future, one baby step at a time, Google Blog (August 8, 2012)](https://blog.google/products-and-platforms/products/search/building-search-engine-of-future-one/)
10. [Knowledge Graphs and Their Applications in Drug Discovery, PubMed](https://pubmed.ncbi.nlm.nih.gov/37702941/)
11. [Knowledge graph based reasoning in medical image analysis: A scoping review, Computers in Biology and Medicine (2024)](https://www.sciencedirect.com/science/article/pii/S0010482524011855)
12. [Architecting Synergy: Knowledge Graphs for Representing Complex, Multi-Domain Patient Information, Studies in Health Technology and Informatics (2026)](https://journals.sagepub.com/doi/10.3233/SHTI260023)
13. [Graph and relational database comparison, Microsoft Learn](https://learn.microsoft.com/en-nz/fabric/graph/graph-relational-databases)
14. [Knowledge Graphs in AI-Driven Biomedical and Chemical Engineering, IEEE AIxSET 2024](https://ieeexplore.ieee.org/document/10771022/)
15. [Biomedical knowledge graph review, Computer Science and Information Systems (2024)](https://www.comsis.org/archive.php?show=ppr16053)
16. [Construction and exploitation of an historical knowledge graph to deal with the evolution of ontologies, Knowledge-Based Systems 194 (2020)](https://www.sciencedirect.com/science/article/pii/S0950705120300241)
17. [Are Knowledge Graphs Ready for the Real World? Challenges and Perspective, Dagstuhl Report 14(2) (2024)](https://drops.dagstuhl.de/storage/04dagstuhl-reports/volume14/issue02/24061/DagRep.14.2.1/DagRep.14.2.1.pdf)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Database theory and data modeling › Schema and data modeling methods

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/knowledge-graph

English original: https://www.edgepedia.org/knowledge-graph
