Schema.org 常见问题解析:结构化数据标记的权威指南
Schema.org is a collaborative initiative by major search engines to create a unified structured data markup vocabulary, improving web content understanding and enabling richer search results. (Schema.org 是由主要搜索引擎共同发起的协作项目,旨在创建统一的结构化数据标记词汇表,以增强网页内容理解并实现更丰富的搜索结果。)
Note: This blog post is based on the development version of Schema.org. For details on the project's governance and evolution, please refer to the official how we work page.
注意:本文基于 Schema.org 的开发版本。关于该项目的治理和演变详情,请参阅官方的 how we work 页面。
Introduction to Schema.org
Schema.org is a collaborative initiative founded by major search engines to create and maintain a universal vocabulary for structured data markup on the web. By embedding this standardized markup within HTML, webmasters can provide explicit clues about the meaning of their page content. This structured data enables search engines and other applications to understand the information more accurately, leading to richer user experiences, such as enhanced search results (rich snippets), knowledge graphs, and voice assistant answers.
Schema.org 是一个由主流搜索引擎发起并维护的协作项目,旨在为网页上的结构化数据标记使用JSON-LD、Schema.org等标准对网页内容进行语义标注,帮助AI理解内容结构和关系。创建一套通用词汇表。通过在 HTML 中嵌入这种标准化的标记,网站管理员可以为其页面内容的意义提供明确的线索。这种结构化数据使搜索引擎和其他应用程序能够更准确地理解信息,从而带来更丰富的用户体验,例如增强的搜索结果(富摘要)、知识图谱和语音助手答案。
Core Concepts & Frequently Asked Questions
What is the Purpose of Schema.org?
Schema.org is a joint effort to improve the web by creating a structured data markup schema supported by major search engines. On-page markup helps search engines understand the information on web pages and provide richer, more informative search results. A shared markup vocabulary simplifies the decision-making process for webmasters, allowing them to adopt a single, widely-supported standard and maximize the return on their implementation efforts. Ultimately, the goal is to make it easier for users to find relevant information, and the structured data also paves the way for new tools and applications.
Schema.org 是一项旨在通过创建受主流搜索引擎支持的结构化数据标记使用JSON-LD、Schema.org等标准对网页内容进行语义标注,帮助AI理解内容结构和关系。模式来改进网络的协作努力。页面内标记有助于搜索引擎理解网页上的信息,并提供更丰富、信息量更大的搜索结果。共享的标记词汇表简化了网站管理员的决策过程,使他们能够采用单一且广泛支持的标准,并最大化其实现工作的回报。最终,目标是让用户更容易找到相关信息,而结构化数据也为新工具和应用程序的开发铺平了道路。
Why Are Competing Search Engines Collaborating?
While search engines compete in many areas, they share a common interest in making the web more structured and understandable. Prior to Schema.org, numerous competing and overlapping markup standards (like microformats, RDFaA W3C standard for embedding rich metadata within web documents using HTML/XML attributes., and proprietary formats) created fragmentation. This made it difficult and risky for webmasters to choose a format. By collaborating on a common vocabulary, the founding companies (Google, Bing, Yandex, and Yahoo!) reduce complexity for webmasters. This, in turn, increases the adoption of structured data, allowing all search engines to gather more high-quality data to improve their search features for everyone.
尽管搜索引擎在许多领域存在竞争,但它们在使网络更加结构化和可理解方面有着共同的利益。在 Schema.org 出现之前,众多相互竞争和重叠的标记标准(如微格式、RDFaA W3C standard for embedding rich metadata within web documents using HTML/XML attributes. 和专有格式)造成了碎片化。这使得网站管理员难以选择格式,且存在风险。通过在通用词汇表上进行协作,创始公司(Google、Bing、Yandex 和 Yahoo!)降低了网站管理员的复杂性。这反过来又提高了结构化数据的采用率,使所有搜索引擎都能收集更多高质量数据,从而为所有人改进其搜索功能。
Why Create a New Schema?
The creation of a new, unified schema was driven by the need to address specific pain points for all stakeholders in the ecosystem:
- For Webmasters: It provides a single, authoritative source for learning and implementation, eliminating the need to piece together schemas from different sources with varying rules and conventions.
- For Search Engines: It focuses on defining the item types and properties that are most actionable and valuable for improving search relevance and presentation.
- For Users: As adoption increases, users benefit from significantly improved search results with richer context, visual enhancements, and direct answers.
创建新的统一模式是为了解决生态系统中所有利益相关者的特定痛点:
- 对于网站管理员:它提供了一个单一、权威的学习和实施来源,无需从具有不同规则和约定的不同来源拼凑模式。
- 对于搜索引擎:它专注于定义对提高搜索相关性和呈现最有操作性和价值的项目类型和属性。
- 对于用户:随着采用率的提高,用户可以从显著改进的搜索结果中受益,这些结果具有更丰富的上下文、视觉增强和直接答案。
Is Schema.org a Formal Standards Body?
No. Schema.org is not a formal standards organization like the W3C or IETF. It is a practical collaboration between major search engines to define and document the schemas they jointly support. The day-to-day operations and schema evolution are managed by a steering group. While its outputs have become de facto web standards due to widespread adoption, its primary mission is pragmatic: to make it easier for publishers to provide data that search engines can use to direct users more effectively.
不是。Schema.org 并非像 W3C 或 IETF 那样的正式标准组织。它是主流搜索引擎之间的一项务实协作,旨在定义和记录它们共同支持的模式。日常运营和模式演变由一个指导小组管理。虽然由于其广泛采用,其产出已成为事实上的网络标准,但其主要使命是务实的:让发布者更容易提供数据,以便搜索引擎能够更有效地引导用户。
How Does It Relate to Facebook's Open Graph Protocol?
Facebook's Open Graph protocol is designed primarily for optimizing how web pages are represented when shared on social platforms (e.g., determining the title, image, and description in a Facebook post). Schema.org serves a broader and more detailed purpose for search and other applications. While there is some overlap, Schema.org offers a much finer-grained vocabulary to describe the components within a page. For instance, a page about a band marked up with Schema.org can specify individual albums, track lists, event dates, and biographical details—information that goes far beyond the social sharing focus of Open Graph. The two can coexist on the same page.
Facebook 的开放图谱协议主要旨在优化网页在社交平台上共享时的呈现方式(例如,确定 Facebook 帖子中的标题、图片和描述)。Schema.org 为搜索和其他应用程序提供了更广泛、更详细的用途。虽然存在一些重叠,但 Schema.org 提供了更细粒度的词汇来描述页面内部的组件。例如,一个使用 Schema.org 标记的关于乐队的页面可以指定单独的专辑、曲目列表、活动日期和传记细节——这些信息远远超出了开放图谱的社交分享重点。两者可以在同一页面上共存。
How Will Schema.org Evolve?
Schema.org is designed as a living, evolving project. Its growth is expected from two primary sources:
- Top-down: As search engines and partners identify new categories of structured data that can enhance search and user experiences, they will propose extensions to the core vocabulary.
- Bottom-up: The community plays a crucial role. Developers and organizations are encouraged to create and promote new schemas for specific domains. As these community extensions gain traction and demonstrate value, they can be integrated into the official Schema.org vocabulary.
Schema.org 被设计为一个活的、不断发展的项目。其增长预计来自两个主要来源:
- 自上而下:随着搜索引擎和合作伙伴识别出可以增强搜索和用户体验的新类别结构化数据,他们将提出对核心词汇表的扩展。
- 自下而上:社区发挥着关键作用。鼓励开发者和组织为特定领域创建和推广新模式。随着这些社区扩展获得关注并证明其价值,它们可以被整合到官方的 Schema.org 词汇表中。
How Do I Implement Schema.org Markup?
Implementation involves adding specific HTML attributes to your existing content. The recommended steps are:
- Identify the most relevant Type (e.g.,
Product,Article,LocalBusiness) for your content from the schema.org website. - Use the Properties defined for that type (e.g.,
name,image,pricefor aProduct) to describe your item. - Embed this structure into your page using a supported syntax. While the project initially emphasized Microdata, it now equally supports RDFaA W3C standard for embedding rich metadata within web documents using HTML/XML attributes. and JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation., with JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. often being the recommended choice due to its ease of implementation and separation from the visual HTML.
实施涉及向现有内容添加特定的 HTML 属性。推荐的步骤是:
- 从 schema.org 网站 为你的内容确定最相关的类型(例如,
Product、Article、LocalBusiness)。- 使用为该类型定义的属性(例如,对于
Product,使用name、image、price)来描述你的项目。- 使用受支持的语法将此结构嵌入到你的页面中。虽然该项目最初强调 Microdata,但现在它同样支持 RDFaA W3C standard for embedding rich metadata within web documents using HTML/XML attributes. 和 JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation.,其中 JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. 由于其易于实现且与视觉 HTML 分离,通常是推荐的选择。
Why Use JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. Over Other Formats?
While Schema.org supports multiple syntaxes, JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. has become the favored format for many developers and is recommended by Google. Key reasons include:
- Separation of Concerns: JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. is typically placed in a
<script type="application/ld+json">tag in the page's<head>, keeping the structured data separate from the presentation HTML. This makes the code cleaner and easier to maintain. - Ease of Generation: It can be easily generated and injected by content management systems, JavaScript frameworks, or server-side code without altering the core HTML markup.
- Flexibility: It handles complex data relationships and the mixing of multiple vocabularies more elegantly than Microdata.
虽然 Schema.org 支持多种语法,但 JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. 已成为许多开发人员喜爱的格式,并被 Google 推荐。主要原因包括:
- 关注点分离:JSON-LDA lightweight Linked Data format for structuring data in JSON, recommended by Google for Schema.org implementation. 通常放在页面
<head>中的<script type="application/ld+json">标签内,将结构化数据与呈现 HTML 分开。这使得代码更清晰、更易于维护。- 易于生成:它可以由内容管理系统、JavaScript 框架或服务器端代码轻松生成和注入,而无需更改核心 HTML 标记。
- 灵活性:它比 Microdata 更优雅地处理复杂的数据关系和多种词汇表的混合。
(This post provides an overview of the key philosophical and practical aspects of Schema.org. For detailed implementation guides, specific schema references, and advanced topics like extensions, please visit the official Schema.org documentation.)
(本文概述了 Schema.org 的关键理念和实践方面。有关详细的实施指南、特定模式参考以及扩展等高级主题,请访问官方的 Schema.org 文档。)
版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。
文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。
若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。 也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。