Files
obsidian-wiki/scripts/ingest_email_project_signals_to_bjd_wiki.py
nac 777607dc29 chore(repo): establish project baseline
Track the source-of-truth code, skills, bootstrap rules, docs, and packaging files before adding new features.

Exclude local vault config, generated skill mirrors, temporary exports, virtual environments, and business data files from version control.

Validation: inspected staged file list and git ignored status before commit.
2026-07-05 11:03:40 +00:00

237 lines
12 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
import json
import subprocess
from datetime import datetime, timezone
from pathlib import Path
ROOT = Path("/home/nac/repo/obsidian-wiki-linux/kb/obsidian-wiki")
VAULT = Path("/home/nac/repo/obsidian-wiki-linux/kb/bjd-vault")
SOURCE = Path("/home/nac/repo/emails_export/parsed/llm_input.jsonl")
NOW = datetime.now(timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")
def run_signal_extract():
raw = subprocess.check_output(
[
"python3",
str(ROOT / "scripts/extract_email_project_signals.py"),
str(SOURCE),
],
text=True,
)
data = json.loads(raw)
data["source"] = str(SOURCE)
data["generated_at"] = NOW
data["interpretation_note"] = (
"Signals are derived from email subjects, bodies, domains and extracted keywords. "
"They indicate opportunities, discussions, RFQs, sample/development or order-related activity; "
"they do not prove BJD won the project unless separately confirmed by order/project records."
)
return data
def write(path, text):
p = VAULT / path
p.parent.mkdir(parents=True, exist_ok=True)
p.write_text(text, encoding="utf-8")
def replace_or_append(path, marker, block):
p = VAULT / path
text = p.read_text(encoding="utf-8")
if marker in text:
return
p.write_text(text.rstrip() + "\n\n" + block.strip() + "\n", encoding="utf-8")
def update_index():
p = VAULT / "index.md"
text = p.read_text(encoding="utf-8")
text = text.replace(
text.split("*本索引由 wiki 自动维护。最后更新:", 1)[1].split("*", 1)[0],
NOW,
1,
)
line = "- [[projects/bjd/references/bjd-email-project-application-signals-2025-2026]] - 从跟单邮件中整理的项目/应用/OEM线索矩阵,区分机会线索、RFQ、样品开发、订单/履约和未知是否拿到。 ( #bjd #emails #projects #applications )\n"
marker = "## 参考\n"
if line not in text:
text = text.replace(marker, marker + line, 1)
p.write_text(text, encoding="utf-8")
def update_hot():
p = VAULT / "hot.md"
text = p.read_text(encoding="utf-8")
lines = text.splitlines()
for i, line in enumerate(lines):
if line.startswith("updated: "):
lines[i] = f"updated: {NOW}"
break
text = "\n".join(lines) + "\n"
item = (
f"- [{NOW}] DATA_INGEST - 新增 [[projects/bjd/references/bjd-email-project-application-signals-2025-2026]];"
"从跟单邮件中整理项目/应用/OEM线索,明确这些信息代表机会、RFQ、样品开发或订单履约活动,不等同于已拿到项目。"
"后续机器人回答必须保留阶段和置信度。\n"
)
text = text.replace("## 近期活动\n\n", "## 近期活动\n\n" + item, 1)
p.write_text(text, encoding="utf-8")
def append_log():
p = VAULT / "log.md"
with p.open("a", encoding="utf-8") as fh:
fh.write(
f'- [{NOW}] DATA_INGEST source="{SOURCE}" format=jsonl '
'page="projects/bjd/references/bjd-email-project-application-signals-2025-2026.md" '
'mode=project_application_signal_mining confidence_mixed=true\n'
)
def update_manifest():
p = VAULT / ".manifest.json"
data = json.loads(p.read_text(encoding="utf-8"))
key = "derived:/home/nac/repo/emails_export/parsed/llm_input.jsonl::project-application-signals-20260605"
data.setdefault("sources", {})[key] = {
"ingested_at": NOW,
"source_type": "derived_email_signal_index",
"project": "bjd",
"source_id": key,
"original_path": str(SOURCE),
"doc_type": "project_application_signal_index",
"business_categories": [
"sales/projects",
"customers/applications",
"products/rfq",
"market/oem-signals",
],
"note": "Derived project/application/OEM signals from the follow-up email JSONL. Signals do not imply project win unless separately confirmed.",
"source_inventory_path": "_meta/bjd-email-project-application-signals-20260605.json",
"pages_created": [
"projects/bjd/references/bjd-email-project-application-signals-2025-2026.md"
],
"pages_updated": [
"projects/bjd/references/bjd-follow-up-email-corpus-2025-2026.md",
"index.md",
"hot.md",
"log.md",
],
}
data["updated"] = NOW
data.setdefault("stats", {})["total_sources_ingested"] = len(data.get("sources", {}))
p.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
def main():
data = run_signal_extract()
meta_path = VAULT / "_meta/bjd-email-project-application-signals-20260605.json"
meta_path.parent.mkdir(parents=True, exist_ok=True)
meta_path.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
page = f"""---
title: BJD 邮件项目应用线索 2025-2026
category: references
project: bjd
tags: [bjd, emails, projects, applications, oem, rfq, visibility/internal]
visibility: internal
business_domains: [sales, customers, products, market]
data_classification: commercial-confidential
allowed_bots: [bjd-general-bot]
sources:
- _meta/bjd-email-project-application-signals-20260605.json
- _meta/bjd-follow-up-email-corpus-20260605.json
summary: 从 2025-2026 跟单邮件中整理项目、应用、终端车厂和产品机会线索;这些线索代表邮件讨论或商务机会,不自动等同于已中标或已量产。
relationships:
- target: "[[projects/bjd/references/bjd-follow-up-email-corpus-2025-2026]]"
type: derived_from
- target: "[[projects/bjd/skills/bjd-customer-email-playbook]]"
type: informs
- target: "[[projects/bjd/concepts/bjd-product-portfolio]]"
type: related_to
provenance:
extracted: 0.55
inferred: 0.35
ambiguous: 0.10
base_confidence: 0.60
lifecycle: draft
lifecycle_changed: 2026-06-05
tier: supporting
created: {NOW}
updated: {NOW}
---
# BJD 邮件项目应用线索 2025-2026
该页从跟单邮件 JSONL 中提取“客户/渠道 - 终端车厂 - 项目/应用 - BJD 产品方向”的线索。它的价值在于发现真实客户场景和产品机会,但必须注意:邮件出现不等于 BJD 已经拿到项目;可能只是 RFQ、样品、技术交流、报价、交期沟通、PPAP 或质量闭环。^[inferred]
## 使用规则
- 回答“我们产品用在哪些应用/车厂”时,必须带阶段和置信度:`已供货/订单线索`、`RFQ/报价`、`样品/开发`、`质量/履约`、`仅机会线索`、`未知是否拿到`。^[inferred]
- 不输出邮件正文、个人联系方式、客户具体价格、客户具体数量、订单编号、附件内容或索赔细节。^[extracted]
- 若要判断是否真实量产或已供货,应回查订单聚合、项目台账、图纸/承认书、客户定点或出货记录。邮件线索本身只能作为入口。^[inferred]
## 应用和产品方向
- FFC/FPC 是最高频应用方向,覆盖显示、吸顶屏、仪表/Cluster、CID/FID、排线、样品打样和竞品替代。^[extracted]
- WTB、Wafer、BTB、Pin Header 在 BYD、Visteon、Marelli、VW/Skoda 等线索中反复出现。^[extracted]
- FAKRA/SMB/高频连接器出现于车载显示、摄像头、VAVE 或高频方案讨论中,需要与 [[projects/bjd/concepts/high-frequency-automotive-connectors]] 交叉确认。^[inferred]
## 重点项目/应用线索
| 客户/渠道 | 终端/OEM | 项目或应用 | BJD 产品方向 | 阶段判断 | 置信度 | 说明 |
|---|---|---|---|---|---|---|
| BICV/北斗智联 | 零跑/Leapmotor | 吸顶屏、霍尔小板连接 | FFC 排线 + BJD FPC 座 | RFQ/开发线索 | 高 | 邮件明确提到零跑项目、普通 FFC、异面、插接到位丝印线、图纸输出和报价流程。 |
| Visteon | Mercedes-Benz MB.EA-L Front Display | Front Display / CID | FFC、Pin Header、WTB、FH75 相关候选 | RFQ/技术讨论 | 中 | 邮件主题和线索指向前显示项目;是否定点或量产需另查订单/项目记录。 |
| Visteon | Scout B-RUV / C-PICKUP | CID / FID | 显示类连接器、候选替代 | RFQ/报价线索 | 中 | 邮件主题含 RFQ、CID/FID、Chihuahua Plant;属于机会线索。 |
| Visteon | Toyota X-Carline | Full Digital Cluster | FPC/FFC、WTB、FH63 相关线索 | RFQ/样品或开发线索 | 中 | 与仪表/Cluster 相关,需图纸和订单记录确认具体产品。 |
| Marelli | BMW projects | CID/FID/lighting | Pin Header | 新开发机会 | 中 | 邮件主题指向 BMW 项目 pin header new development。 |
| BYD/比亚迪 | BYD | WTB、FPC/FFC、BTB、车灯、储能 | WTB、BTB、FPC/FFC、端子 | 混合:订单/RFQ/质量/商务 | 中 | BYD 高频出现,但类型混合,需按单个线程区分订单确认、招标、QMS、对账或质量。 |
| BYD/比亚迪 | BYD E 项目 | 20Pin 浮动 BTB | BTB floating connector | 寻源/技术交流 | 高 | 邮件主题明确为“E项目 20pin浮动btb连接器寻源”。 |
| BYD/比亚迪 | 第十一事业部 | 0.63/1.2 规格免焊端子 | 端子开发 | 招标/技术交流 | 高 | 邮件主题明确指向端子开发招标/供应商意愿确认。 |
| VW/Skoda | Skoda/VW | AP SVM Camera / PPAP | WTB/Wafer | PPAP/项目资料 | 中 | 邮件主题为 PPAP pending,说明可能进入资料提交或项目支持阶段。 |
| Valeo | Valeo BLADE | ZIF connectors | FPC ZIF | 询价/技术咨询 | 中 | 邮件主题指向 ZIF connectors,具体 BJD 料号需二次确认。 |
| MZD 项目 | MZD | FPC/FFC 软排线 | 101049 系列方向/排线 | 打样/开发 | 中 | 邮件中有 MZD 项目软排线打样和样品报价线索。 |
| GF/高发或广安相关 | 储能 | 储能备货 | WTB/端子类 | 备货/交期 | 中 | 邮件中出现储能备货和 WTB/端子类物料,需订单记录确认客户和项目。 |
## 高频 OEM/终端线索
- BYD/比亚迪、零跑、Visteon、Marelli、VW/SVW/Skoda、Valeo、Toyota、Yazaki、Kia、Stellantis/STLA 都在邮件线索中出现。^[extracted]
- BYD/比亚迪线索最多,但混合了订单确认、寻源、QMS、对账和质量流程,不应直接归为全部已供货项目。^[inferred]
- Visteon 线索集中在 CID/FID、Cluster、WTB、Pin Header、FPC/FFC 和部分高频连接器/VAVE。^[extracted]
- 零跑线索较集中,尤其是 BICV/北斗智联吸顶屏 FFC 开发。^[extracted]
## 后续挖掘方向
- 对每个高价值项目建立二级页:`客户/OEM + 项目 + 应用 + 产品族 + 竞品 + 阶段 + 证据来源`。^[inferred]
- 用订单聚合表交叉验证邮件项目线索,将“RFQ/机会”升级或降级为“已报价、已送样、已供货、无结果”。^[inferred]
- 对海外 VAVE 线索单独建立 `Hirose/Molex/IRISO/Kyocera 替代机会池`,避免散落在邮件线程里。^[inferred]
## Related
- [[projects/bjd/references/bjd-follow-up-email-corpus-2025-2026]]
- [[projects/bjd/skills/bjd-customer-email-playbook]]
- [[projects/bjd/references/bjd-fast-product-lookup]]
- [[projects/bjd/references/competitor-cross-reference-map]]
"""
write("projects/bjd/references/bjd-email-project-application-signals-2025-2026.md", page)
replace_or_append(
"projects/bjd/references/bjd-follow-up-email-corpus-2025-2026.md",
"[[projects/bjd/references/bjd-email-project-application-signals-2025-2026]]",
"""
## Project/Application Signal Index
- [[projects/bjd/references/bjd-email-project-application-signals-2025-2026]] extracts project, application, OEM and product opportunity signals from the same email corpus. These are opportunity/RFQ/development/order-support signals and do not automatically mean BJD won the project. ^[inferred]
""",
)
update_index()
update_hot()
append_log()
update_manifest()
print(json.dumps({"page": "projects/bjd/references/bjd-email-project-application-signals-2025-2026.md", "meta": str(meta_path), "now": NOW}, ensure_ascii=False))
if __name__ == "__main__":
main()