首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >用 200 行 Python 给三个行业的 FDE 岗位做差异画像

用 200 行 Python 给三个行业的 FDE 岗位做差异画像

原创
作者头像
三合卓学
发布于 2026-11-03 13:46:40
发布于 2026-11-03 13:46:40
850
举报

同一个岗位名称,在律所、电商、制造三个行业几乎是三种职业——服务对象、数据环境、合规约束、考核锚点完全不同。与其靠感觉判断,不如把差异结构化:本文把三个行业的 FDE 岗位拆成 7 个可打分维度写成 JSON 配置,再用一个脚本完成两件事——生成岗位差异画像,以及计算你的背景与三个方向的匹配度。代码只依赖标准库,克隆下来就能跑。

一、维度模型设计

对比维度直接决定画像质量。从岗位职责里抽象出 7 个维度,每个维度 1–5 分:

维度

说明

1 分锚点

5 分锚点

compliance

合规约束强度

几乎无监管要求

出错即重大责任事故

data\_sensitivity

数据敏感度

公开数据为主

核心机密不可出域

realtime

实时性要求

批处理即可

毫秒级响应

iteration\_speed

迭代节奏

以季度计

以天甚至小时计

business\_coupling

业务耦合深度

标准化交付

深度嵌入业务流程

hardware

硬件/现场依赖

纯软件

必须下现场摸设备

fault\_tolerance

试错容忍度

可灰度可回滚

一次错误不可接受

二、岗位画像配置 industries.json

把三个行业的岗位画像写成配置,分值来自对公开招聘 JD 的归纳,你可以按自己收集到的 JD 调整:

代码语言:javascript
复制
{
  "weights": {
    "compliance": 0.18, "data_sensitivity": 0.14, "realtime": 0.12,
    "iteration_speed": 0.12, "business_coupling": 0.18,
    "hardware": 0.10, "fault_tolerance": 0.16
  },
  "industries": {
    "律所": {"compliance": 5, "data_sensitivity": 5, "realtime": 1,
             "iteration_speed": 2, "business_coupling": 4,
             "hardware": 1, "fault_tolerance": 1},
    "电商": {"compliance": 3, "data_sensitivity": 3, "realtime": 4,
             "iteration_speed": 5, "business_coupling": 4,
             "hardware": 1, "fault_tolerance": 4},
    "制造": {"compliance": 4, "data_sensitivity": 3, "realtime": 5,
             "iteration_speed": 2, "business_coupling": 5,
             "hardware": 5, "fault_tolerance": 1}
  },
  "my_profile": {"compliance": 3, "data_sensitivity": 3, "realtime": 4,
                 "iteration_speed": 4, "business_coupling": 4,
                 "hardware": 2, "fault_tolerance": 3}
}

注意 fault_tolerance 这个维度是反向的:分值越高代表行业越容忍试错。my_profile 填你自己的偏好——你在哪个维度上越强或越享受,就打越高分。

三、完整脚本 fde_profiler.py

代码语言:javascript
复制
#!/usr/bin/env python3
"""FDE 岗位差异画像与个人匹配度计算。仅依赖标准库。"""
import json
import math
import sys


def load_config(path: str) -> dict:
    with open(path, encoding="utf-8") as f:
        cfg = json.load(f)
    dims = set(cfg["weights"])
    for name, profile in cfg["industries"].items():
        missing = dims - set(profile)
        if missing:
            raise ValueError(f"行业[{name}]缺少维度: {missing}")
    return cfg


def weighted_distance(a: dict, b: dict, weights: dict) -> float:
    """加权欧氏距离,越小越匹配。"""
    return math.sqrt(sum(weights[d] * (a[d] - b[d]) ** 2 for d in weights))


def match_score(a: dict, b: dict, weights: dict) -> float:
    """把距离折算成 0-100 的匹配分。最大距离为 sqrt(sum(w) * 16)。"""
    max_dist = math.sqrt(sum(weights.values()) * 16)
    return round((1 - weighted_distance(a, b, weights) / max_dist) * 100, 1)


def render_report(cfg: dict) -> str:
    dims = list(cfg["weights"])
    industries = cfg["industries"]
    lines = ["| 维度 | 权重 | " + " | ".join(industries) + " |",
             "| --- | --- | " + " | ".join(["---"] * len(industries)) + " |"]
    for d in dims:
        row = [d, str(cfg["weights"][d])]
        row += [str(industries[name][d]) for name in industries]
        lines.append("| " + " | ".join(row) + " |")
    lines.append("\n## 个人匹配度")
    me = cfg["my_profile"]
    scores = {name: match_score(me, industries[name], cfg["weights"])
              for name in industries}
    for name, s in sorted(scores.items(), key=lambda kv: -kv[1]):
        lines.append(f"- {name}: {s} / 100")
    return "\n".join(lines)


if __name__ == "__main__":
    cfg = load_config(sys.argv[1] if len(sys.argv) > 1 else "industries.json")
    print(render_report(cfg))

运行:

代码语言:javascript
复制
python3 fde_profiler.py industries.json

输出示例(匹配分随你填的 my_profile 变化):

代码语言:javascript
复制
| 维度 | 权重 | 律所 | 电商 | 制造 |
| --- | --- | --- | --- | --- |
| compliance | 0.18 | 5 | 3 | 4 |
...

## 个人匹配度
- 电商: 84.6 / 100
- 制造: 60.5 / 100
- 律所: 52.7 / 100

四、验证方法与扩展方向

验证模型是否有区分度,最简单的办法是做对照:把 my_profile 分别填成"极端合规偏好型"和"极端快节奏偏好型",跑出来的第一名应该分别是律所和电商。如果排序不符合直觉,说明权重或锚点描述需要校准。

两个实用的扩展:一是新增行业时只改 JSON,脚本不用动,这本身就是配置化设计的好处;二是把招聘平台抓下来的 JD 文本过一遍关键词表(如"驻场""合规""大促""产线"),自动给 7 个维度预打分,再人工修正,能把画像的样本量从个位数扩到几十条。

岗位差异这件事,写出来是观点,结构化了才是工具。把判断依据留在配置里,三个月后你的想法变了,改的是数据而不是记忆——这也是工程思维对职业决策的一点实际帮助。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

目录
  • 一、维度模型设计
  • 二、岗位画像配置 industries.json
  • 三、完整脚本 fde_profiler.py
  • 四、验证方法与扩展方向
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档