知识问答(QuizQuestionAnswer)结构化数据

如果您有抽认卡页面,可以通过向其中添加 Quiz 结构化数据来帮助学生更好地找到教育类问题的答案。添加结构化数据后,您的内容将会显示在 Google 搜索结果、Google 助理和 Google 智能镜头搜索结果的问答轮播界面中。

知识问答富媒体搜索结果示例

以下页面类型符合知识问答轮播界面的条件:

  • 抽认卡页面:这种页面包含抽认卡,该卡的一面通常包含问题,另一面提供答案。如需标记抽认卡页面,请继续阅读本指南,了解如何添加知识问答架构
  • 单个问答页面:这种页面仅包含一个问题,后跟用户提交的答案。如需标记单个问答页面,请改为添加 QAPage 标记

功能可用性

知识问答轮播界面只能以英语提供,并已在所有可以使用 Google 搜索的国家/地区推出。仅当在桌面设备和移动设备上搜索教育相关主题时,才能使用此功能。例如,尝试搜索 "the measure of three angles of a quadrilateral are 80 90 and 103 degrees""the ratio of surface energy to surface area is" 之类的查询。

如何添加结构化数据

结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式

下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab

  1. 添加必要属性。根据您使用的格式,了解在网页上的什么位置插入结构化数据
  2. 遵循指南
  3. 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
  4. 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、noindex 标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址
  5. 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图Search Console Sitemap API 可以帮助您自动执行此操作。

示例

下面是一个包含知识问答结构化数据的抽认卡页面示例。


<html>
  <head>
    <title>Cell Transport</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Quiz",
      "about": {
        "@type": "Thing",
        "name": "Cell Transport"
      },
      "educationalAlignment": [
        {
          "@type": "AlignmentObject",
          "alignmentType": "educationalSubject",
          "targetName": "Biology"
        }
      ],
      "hasPart": [
        {
          "@context": "https://schema.org/",
          "@type": "Question",
          "eduQuestionType": "Flashcard",
          "text": "This is some fact about receptor molecules.",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "receptor molecules"
          }
        },
        {
          "@context": "https://schema.org/",
          "@type": "Question",
          "eduQuestionType": "Flashcard",
          "text": "This is some fact about the cell membrane.",
          "acceptedAnswer": {
            "@type": "Answer",
            "text": "cell membrane"
          }
        }
      ]
    }
    </script>
  </head>
</html>

指南

若想让您的网页可显示为知识问答富媒体搜索结果,您必须遵循以下指南:

技术指南

  • 尽可能将结构化数据放在最详细的叶级页中。请勿将结构化数据添加到没有问题的网页中。
  • 所有问题都必须使用 eduQuestionType 属性的 Flashcard 值。包含其他问题类型的网页没有资格出现在知识问答轮播界面中。对于包含其他问题类型的网页,请考虑使用练习题
  • 确保您的主机负载设置能够承受频繁抓取
  • 相应网页上的用户应该会立即看到您网站上的问题,这意味着这些问题并非仅以数据文件或 PDF 格式提供。
  • 如果您的网页只有一个问题,后跟多个用户提交的答案,请改用 QAPage 标记

内容指南

我们之所以制定这些知识问答内容指南,是为了确保我们的用户能够找到相关的学习资源。如果我们发现违反这些指南的内容,将采取适当措施,这可能包括采取人工处置措施以及不将您的内容显示在 Google 上的知识问答富媒体搜索结果中。

  • 知识问答必须遵循问答页面的内容指南
  • 您的网页必须包含与知识相关的问题和回答。您的网页上必须至少有一对问答,并且解答必须与用户的问题相关。
  • 通过此功能呈现知识问答页面时,您将对其准确性和质量负责。在质量和教学审核流程中,如果我们发现一定数量的不准确内容,您的部分或全部问答网页可能无法使用此功能,直到您解决问题为止。

结构化数据类型定义

要让内容能够显示为富媒体搜索结果,您必须为其添加必要属性。您还可以添加建议属性,以便添加更多与内容相关的信息,进而提供更好的用户体验。

Quiz

Quiz 是一组抽认卡(一张或多张),通常与同一概念或主题相关。

如需了解 Quiz 的完整定义,请访问 schema.org。 Google 支持的属性如下:

必需属性
hasPart

Question

测验中具体抽认卡问题的嵌套信息。使用一个 hasPart 属性可表示单个抽认卡。

如需添加多张抽认卡,请重复添加此属性。

{
  "@type": "Quiz",
  "hasPart": {
    "@type": "Question"
  }
}
建议属性
about

Thing

Quiz 背后的基本概念的嵌套信息。

{
  "@type": "Quiz",
  "about": {
    "@type": "Thing"
  }
}
about.name

Text

Quiz 背后的基本概念的嵌套信息。此属性支持添加多个条目。

{
  "@type": "Quiz",
  "about": {
    "@type": "Thing",
    "name": "Cell transport"
  }
}
educationalAlignment

AlignmentObject

测验与某个现有教育框架的对应关系。您可以重复添加此属性,将测验与某个学习领域、目标年级或教育标准相对应。

{
  "@type": "Quiz",
  "educationalAlignment": []
}
educationalAlignment.alignmentType

Text

学习资源和测验的教育框架节点之间对应关系的类别。Google 搜索采用 LRMI 标准

重复添加 alignmentType 属性可指定学习领域及目标年级或教育标准。

  • 如需指定测验的学习领域,请将 alignmentType 属性设置为 educationalSubject 值。
  • 如需指定测验的目标年级或教育标准,请将 alignmentType 属性设置为 educationalLevel 值。

下面是如何同时指定 educationalSubjecteducationalLevel 属性的示例。

{
  "@type": "Quiz",
  "educationalAlignment": [
     {
       "@type": "AlignmentObject",
       "alignmentType": "educationalSubject",
       "targetName": "Biology"
     },
     {
       "@type": "AlignmentObject",
       "alignmentType": "educationalLevel",
       "targetName": "Fifth grade"
     }

  ]
}
educationalAlignment.targetName

Text

某个现有教育框架的节点名称。例如:“Grade 7: Cell Structure”。

{
  "@type": "Quiz",
  "educationalAlignment": [
     {
       "@type": "AlignmentObject",
       "targetName": "Grade 7: Cell Structure"
     }
  ]
}

Question

每个问题都对应一张抽认卡,该卡嵌套在 QuizhasPart 属性下。请注意,这些 Question 要求与 QAPage 的问题要求不同。

如需了解 Question 的完整定义,请访问 schema.org。Google 支持的属性如下:

必需属性
acceptedAnswer

Answer

抽认卡答案的完整内容。每个 Question 类型只能有一个 acceptedAnswer 属性。

{
  "@type": "Question",
  "acceptedAnswer": {
    "@type": "Answer",
    "text": "cell membranes"
  }
}
eduQuestionType

Text

问题的类型。您必须使用此固定值:Flashcard

{
  "@type": "Question",
  "eduQuestionType": "Flashcard”
}
text

Text

抽认卡问题的完整内容。

{
  "@type": "Question",
  "text": "A protein on the surface of HIV can attach to proteins on the surface of healthy human cells. What are the attachment sites on the surface of the cells known as?"
}

Monitor rich results with Search Console

Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:

  1. After deploying structured data for the first time
  2. After releasing new templates or updating your code
  3. Analyzing traffic periodically

After deploying structured data for the first time

After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:

  1. Fix the invalid items.
  2. Inspect a live URL to check if the issue persists.
  3. Request validation using the status report.

After releasing new templates or updating your code

When you make significant changes to your website, monitor for increases in structured data invalid items.
  • If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
  • If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.

Analyzing traffic periodically

Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.

问题排查

如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。

  • 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
  • Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南
  • 您的结构化数据可能存在错误。请参阅结构化数据错误列表
  • 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告
  • 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
  • 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查
  • 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答
  • Google 搜索中心论坛中发帖提问。