Team ZeeLin 面向 Google Patents BigQuery 的生产级专利证据检索技能。将自然语言研究意图转化为可审计的多路检索查询。
ZeeLin Patent Retriever.是一项面向实际任务的技能,主要用于Team ZeeLin通过大查询检索Google Patents的技巧;这种技巧只进行专利检索和结构化输出生成;
该技能适合需要稳定复用相关能力的场景,可作为自动化工作流的一部分,也便于后续检查、调整和扩展。从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;
若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。
ZeeLin 团队为通过 BigQuery 检索 Google Patents 数据而开发的技能。 该技能仅执行专利检索及结构化结果生成,不提供任何法律结论。
用途:
必需环境变量:
GOOGLE_APPLICATION_CREDENTIALSGOOGLE_CLOUD_PROJECT运行以下命令:
python3 -m pip install -r requirements.txt
RUN_ID="quick_$(date +%Y%m%d_%H%M%S)"; RUN_DIR="results/${RUN_ID}"; mkdir -p "$RUN_DIR"
python3 scripts/patent_search.py --keywords "ai sentiment analysis" --limit 80 --output "$RUN_DIR/seed_raw.json"
python3 scripts/build_query_plan.py --topic "Public Opinion + AI" --keywords "public opinion ai sentiment" --task-id "$RUN_ID" --seed-raw "$RUN_DIR/seed_raw.json" --concept-output "$RUN_DIR/concept_scan.json" --plan-output "$RUN_DIR/query_plan.json"
python3 scripts/patent_search_plan.py --plan "$RUN_DIR/query_plan.json" --output-raw "$RUN_DIR/retriever_raw.json" --output-retriever "$RUN_DIR/retriever_result.json" --min-results 20
预期输出文件:
$RUN_DIR/concept_scan.json$RUN_DIR/query_plan.json$RUN_DIR/retriever_raw.json$RUN_DIR/retriever_result.json若执行失败:
seed -> build_plan -> execute_plan。20,除非用户显式指定其他值。query_plan.json 的 filters 字段中。必需环境变量:
GOOGLE_APPLICATION_CREDENTIALSGOOGLE_CLOUD_PROJECT安装依赖:
python3 -m pip install -r requirements.txt
可选环境变量检查脚本:
python3 - <<'PY'
import os
required = ["GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT"]
missing = [k for k in required if not os.getenv(k)]
print({"ok": not missing, "missing": missing})
PY
keywords_all / keywords_any / keywords_anchor_any / keywords_notipc_prefix_any / cpc_prefix_anyassignee_any / inventor_anycountry_inpub_date_from / pub_date_to / filing_date_from / filing_date_to字段来源:query_plan.json(Schema 定义见:schemas/query_plan.schema.json)。
min_results:默认为 20US,CN,WO,EP,JP,KRyears_back=82021)→ from=20210101,to=202112312021-2023)→ from=20210101,to=20231231--years-back N首先创建运行目录:
RUN_ID="run_$(date +%Y%m%d_%H%M%S)"
RUN_DIR="results/${RUN_ID}"
mkdir -p "$RUN_DIR"
python3 scripts/patent_search.py --keywords "" --limit 80 --output "$RUN_DIR/seed_raw.json"
python3 scripts/build_query_plan.py --topic "" --keywords " " --task-id "$RUN_ID" --years-back 8 --country-in "US,CN,WO,EP,JP,KR" --seed-raw "$RUN_DIR/seed_raw.json" --concept-output "$RUN_DIR/concept_scan.json" --plan-output "$RUN_DIR/query_plan.json"
当用户明确要求国家/年份/受让人等过滤条件时,必须在执行前手动修改 query_plan.json。
python3 - <<'PY'
import json
import os
from pathlib import Path
plan_path = Path(os.environ["RUN_DIR"]) / "query_plan.json"
plan = json.loads(plan_path.read_text(encoding="utf-8"))
# 示例覆盖:限定 2021–2023 年 + 美国 + 关键词约束
for r in plan.get("query_rounds", []):
f = r.setdefault("filters", {})
f["country_in"] = ["US"]
f["pub_date_from"] = 20210101
f["pub_date_to"] = 20231231
f.setdefault("keywords_any", [])
f["keywords_any"] = list(dict.fromkeys(f["keywords_any"] + ["sentiment", "public opinion", "risk"]))
plan_path.write_text(json.dumps(plan, ensure_ascii=False, indent=2), encoding="utf-8")
print({"updated": str(plan_path)})
PY
python3 scripts/patent_search_plan.py --plan "$RUN_DIR/query_plan.json" --output-raw "$RUN_DIR/retriever_raw.json" --output-retriever "$RUN_DIR/retriever_result.json" --min-results 20
python3 scripts/schema_check.py --input "$RUN_DIR/concept_scan.json" --schema schemas/concept_scan.schema.json python3 scripts/schema_check.py --input "$RUN_DIR/query_plan.json" --schema schemas/query_plan.schema.json python3 scripts/schema_check.py --input "$RUN_DIR/retriever_result.json" --schema schemas/retriever_result.schema.json
示例 A:
查找 2021 至 2023 年间关于 AI 公共舆论早期预警的美国专利,至少返回 30 条结果topic="AI public opinion early warning"keywords="ai public opinion early warning sentiment"country_in=["US"],pub_date_from=20210101,pub_date_to=20231231--min-results 30示例 B:
搜索过去 5 年内中国、日本、韩国的多模态情绪识别专利,重点关注腾讯和字节跳动--years-back 5country_in=["CN","JP","KR"]assignee_any=["Tencent","ByteDance"]检索已完成。 生效过滤条件: - 国家:... - 公开日期范围:... - 申请日期范围:... - 关键词(any/all/not):... - 受让人/发明人过滤:... 结果统计: - 专利总数:... - 国家分布:... - 最新公开日期:... 输出文件: - concept_scan:... - query_plan:... - retriever_raw:... - retriever_result:...
必需输出文件:
concept_scan.jsonquery_plan.jsonretriever_raw.jsonretriever_result.jsonretriever_result.json 的最低要求:
patents 数量 ≥ min_results(默认为 20)publication_number 和 titlereferences/methodology.mdexamples/quickstart.md相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.1万人学习
共49课时 | 82.6万人学习
最新文章