关闭

Tryaivo™技术

医疗页只打Article白打,NHS把章节都标了

2026-11-09 02:56:13 浏览:

背景:医疗页面对的是"AI 直接给结论",不是普通收录

医疗内容是典型的 YMYL 场景:AI 助手和答案引擎遇到"糖尿病有哪些症状"这类问题时,倾向于直接给结论并附来源。这时决定你的页面能不能被正确理解和引用的是三件事:页面是什么类型(Article 还是 MedicalWebPage)、内容被切成了哪些可定位的片段、发布者实体能不能和权威库对上号。

2026-11-09 本机直接抓取三个英文权威医疗站的原始 HTML 做了对照:英国 NHS 官网、Cleveland Clinic、Yale Medicine。同时用同样方式试了两个美国大站——Johns Hopkins Medicine 与 Mount Sinai 都返回 403,抓取被直接拒绝,这类站点连"标记质量"都还谈不上,先卡在可达性。

落地清单:选型、写码、插位、验证

1)选型:页面级 + 主题块 + 章节块,三层都要

按 Schema.org 现行版(本机 2026-11-09 多次访问 schema.org/version/latest 均超时,未取到版本号;NHS 页面自声明 schemaVersion: http://schema.org/version/13.0/):

层级@type挂什么
页面MedicalWebPage页面整体;genre 填内容类型(NHS 用 ["Condition"]),dateModified、description、author、copyrightHolder
主题块HealthTopicContent嵌在 hasPart 里,标 hasHealthAspect(NHS 用 http://schema.org/OverviewHealthAspect,共 9 处)
章节块WebPageElement再往下一层 hasPart,用 headline + text 标每个小节,NHS 单页 24 处
发布者实体MedicalOrganization独立一块,sameAs 对齐维基/LinkedIn/YouTube 等外部档案
导航BreadcrumbList + ListItem面包屑

Article 只解决"这是一篇文章、作者是谁",解决不了"这是一页医学主题内容、由谁审校、分成哪几节"。医疗页只打 Article,等于把类型信息全丢了。

2)真实片段:NHS 单页 JSON-LD 节选(本机 2026-11-09 抓取,字段未改)

{
  "@context": "http://schema.org",
  "@type": "MedicalWebPage",
  "about": {"@type": "WebPage", "alternateName": ["Diabetes (type 2)"], "name": "Type 2 diabetes"},
  "author": {"@type": "Organization", "name": "NHS website", "url": "https://www.nhs.uk",
             "logo": "https://assets.nhs.uk/nhsuk-cms/images/nhs-attribution.width-510.png"},
  "breadcrumb": {"@context": "http://schema.org", "@type": "BreadcrumbList", "itemListElement": [
    {"@type": "ListItem", "item": {"@id": "https://www.nhs.uk/conditions/", "genre": [], "name": "Conditions A to Z"}, "position": 0},
    {"@type": "ListItem", "item": {"@id": "https://www.nhs.uk/conditions/type-2-diabetes/", "genre": ["Condition"], "name": "Type 2 diabetes"}, "position": 1}
  ]},
  "copyrightHolder": {"@type": "Organization", "name": "Crown Copyright"},
  "dateModified": "2026-10-23T09:52:13+00:00",
  "genre": ["Condition"],
  "hasPart": [
    {"@type": "HealthTopicContent",
     "hasHealthAspect": "http://schema.org/OverviewHealthAspect",
     "description": "Type 2 diabetes is when your body does not produce enough insulin...",
     "hasPart": [
       {"@type": "WebPageElement", "headline": "Symptoms of type 2 diabetes and how it's diagnosed", "text": "Symptoms"},
       {"@type": "WebPageElement", "headline": "Symptoms of type 2 diabetes and how it's diagnosed", "text": "Causes"},
       {"@type": "WebPageElement", "headline": "Treatment for type 2 diabetes", "text": "Self-care"},
       {"@type": "WebPageElement", "headline": "Treatment for type 2 diabetes", "text": "Medical treatments"},
       {"@type": "WebPageElement", "headline": "Complications of type 2 diabetes", "text": "Complications"}
     ]}
  ],
  "license": "https://developer.api.nhs.uk/terms",
  "schemaVersion": "http://schema.org/version/13.0/",
  "name": "Type 2 diabetes"
}

NHS 的做法值得抄的是"双层 hasPart":HealthTopicContent 负责主题,WebPageElement 负责小节,且章节标题(headline)和内容(text)分开给——代理要定位"并发症"这一节时,靠的是这两个字段而不是整页正文。

3)最小可抄版(本文按 NHS 结构精简,不是官方示例)

{
  "@context": "https://schema.org",
  "@type": "MedicalWebPage",
  "name": "2型糖尿病:症状、诊断与治疗",
  "description": "2型糖尿病是胰岛素分泌不足或作用不良导致血糖升高的一种慢性病。",
  "genre": ["Condition"],
  "inLanguage": "zh-CN",
  "datePublished": "2026-03-01T08:00:00+08:00",
  "dateModified": "2026-11-09T08:00:00+08:00",
  "lastReviewed": "2026-10-15",
  "reviewedBy": {"@type": "Person", "name": "张某某", "jobTitle": "内分泌科主任医师"},
  "medicalAudience": {"@type": "MedicalAudience", "audienceType": "Patient"},
  "author": {"@type": "Organization", "name": "示例健康", "url": "https://health.example.cn"},
  "mainEntity": {
    "@type": "MedicalCondition",
    "@id": "https://health.example.cn/disease/type-2-diabetes#condition",
    "name": "2型糖尿病",
    "sameAs": "https://www.wikidata.org/wiki/Q3025883"
  },
  "hasPart": [
    {"@type": "HealthTopicContent", "hasHealthAspect": "https://schema.org/OverviewHealthAspect",
     "hasPart": [
       {"@type": "WebPageElement", "headline": "常见症状", "text": "多饮、多尿、体重下降、乏力"},
       {"@type": "WebPageElement", "headline": "诊断标准", "text": "空腹血糖、糖化血红蛋白等指标"}
     ]}
  ]
}

三个细节是刻意加的:mainEntity 用对象并给 @id(跨页复用同一主实体),lastReviewed/reviewedBy/medicalAudience 补齐医学审校信号(NHS 这块反而缺,见下),WebPageElement.text 放纯文本不放 HTML。

4)插在哪:服务端输出,别靠客户端挂载

<script type="application/ld+json"> 必须在服务端返回的 HTML 里就存在。放 <head> 末尾或 </body> 之前都可以,但不要用"组件挂载后再注入"的方式——爬虫拿到的是首包 HTML,脚本还没跑。数据来自 CMS 字段就直接在模板层渲染,别让前端二次拼装。

5)验证:三重,缺一不可

# 1) 数原始 HTML 里的字面量(关键:不要只在浏览器 DevTools 里看 DOM)
curl -s https://example.com/disease/type-2-diabetes \
  | grep -c &#x27;application/ld+json&#x27;

# 2) 把每一块抓出来逐个 JSON.parse,语法错比字段错更致命
#    注意管道里不要先做 HTML 解码,先确认原样字符
curl -s https://example.com/disease/type-2-diabetes \
  | python -c "import sys,re,json;h=sys.stdin.read();\
b=re.findall(r&#x27;(?is)<script[^>]*application/ld\+json[^>]*>(.*?)</script>&#x27;,h);\
print(&#x27;blocks&#x27;,len(b));[json.loads(x) for x in b];print(&#x27;parse ok&#x27;)"

第三重是语法校验器(validator.schema.org 或 Google Rich Results Test)。要提前认清一点:MedicalWebPage 在 Google 搜索里没有对应的专用富媒体结果类型,所以 Rich Results Test 只能告诉你"语法与字段类型有没有问题",不会给你一个"通过/不通过"的业务结论。医疗标记的价值在实体理解与内容切片,不在出一个富媒体卡片。

结果:四站实测对照(2026-11-09 本机抓取)

站点HTTPHTML 字节字面 application/ld+json 块@type关键问题
nhs.uk /conditions/type-2-diabetes/20034,1631(15,662 字符)MedicalWebPage、HealthTopicContent、WebPageElement、BreadcrumbList、Organization结构最完整:24 个 WebPageElement、9 个 HealthTopicContent;但审校三件套全缺
my.clevelandclinic.org /health/diseases/7104-...200431,2792MedicalWebPage、MedicalOrganization@id 与 mainEntityOfPage 都写成类型名 MedicalCondition;url 与实际页面不符;headline 里带 &amp;
yalemedicine.org /conditions/diabetes20072,7200Article、WebPageMIME 被 HTML 实体转义成 application/ld&#x2B;json,解码后才 1 块(2,144 字符)
hopkinsmedicine.org / mountsinai.org403———抓取被直接拒绝

沉默失败清单:这些错校验器都不报

  • MIME 被实体转义(Yale)。 原始 HTML 里是 <script data-schema="Article" type="application/ld&#x2B;json">,浏览器解析 DOM 时会把 &#x2B; 还原成 +,所以页面上、DevTools 里一切正常;但任何用正则或字符串匹配 application/ld+json 的抓取器、审计脚本、CI 检查都会数出 0 块。本机实测:字面匹配 0,解码后 1。修法是别让模板引擎/属性序列化层对 + 做转义。

  • @id 写成类型名(Cleveland)。 它写的是 "@id": "MedicalCondition"、"mainEntityOfPage": "MedicalCondition"。@id 是节点身份标识,写成裸类型名等于宣告"我的身份叫 MedicalCondition",同一主实体在多页之间无法复用,实体图谱直接断链。正确写法是给对象 + 绝对 URL 锚点(见上面最小可抄版的 mainEntity)。

  • audience 用裸 URL 字符串(Cleveland)。 "audience": "http://schema.org/Patient" 语法上能过,语义上丢了类型;推荐 {"@type": "Patient"} 或 {"@type": "MedicalAudience", "audienceType": "Patient"}。

  • JSON 值里混进 HTML 实体与错 URL(Cleveland)。 headline 里是 Diabetes: What It Is, Causes, Symptoms, Treatment &amp; Types,url 写的是 /7104-diabetes,实际页面是 /7104-diabetes-mellitus-an-overview。标题被摘出来就是带 &amp; 的错串,URL 则指向不存在的地址。

  • 面包屑 position 从 0 起(NHS)。 实测 position 为 0 和 1,Google 文档示例与通行写法都从 1 起。校验器不报错,但别照抄。

  • YMYL 审校信号全缺(NHS,意外)。 在 15,662 字符的块里检索 reviewedBy、lastReviewed、medicalAudience 均为 0 处。权威机构显然有编辑与医学审校流程,但没写进结构化数据——这是最该补、也最容易补的三项。

复盘:3 条动作 + 2 条红线

动作

  • 病种/症状/治疗类页面统一用 MedicalWebPage,genre 填 Condition 一类;列表页用 CollectionPage,别都堆 Article。

  • 正文按小节切 WebPageElement(每节一个 headline + text),上层包 HealthTopicContent + hasHealthAspect;章节标题用页面上真实可见的小标题。

  • 补齐 lastReviewed / reviewedBy / medicalAudience,并把同一医学实体的 @id 做成固定绝对 URL,全站复用。

红线

  • 别把 @id、mainEntityOfPage 当装饰写成类型名。 写了比不写更糟:它会让抓取端把一个错误的身份长期固化。

  • 别让 JSON-LD 里出现的医学信息在页面上找不到。 审校医生、更新日期、适用人群这些字段,页面上必须可见;标记与可见内容不一致,是 YMYL 内容最容易出事的点。

标注

  • Schema.org 版本:现行版查询于 2026-11-09(本机多次访问 schema.org/version/latest 超时,未取到具体版本号);NHS 页面内自声明 schemaVersion: http://schema.org/version/13.0/。字段以当日实际抓取的线上输出为准。

  • 验证工具与时间:原始 HTML 正则计数 + 逐块 JSON.parse + validator.schema.org 语法校验,抓取与检查时间 2026-11-09。

  • 来源:https://www.nhs.uk/conditions/type-2-diabetes/ ;https://my.clevelandclinic.org/health/diseases/7104-diabetes-mellitus-an-overview ;https://www.yalemedicine.org/conditions/diabetes (均为本机直接抓取的原始 HTML)。

  • 数据口径:字节数、块数、字段出现次数均为本机统计;本文不含任何排名、曝光、CTR 或 AI 引用变化数据,效果部分仅作结构性观察,未宣称收益。