{"id":205,"date":"2026-03-07T15:09:31","date_gmt":"2026-03-07T07:09:31","guid":{"rendered":"https:\/\/win7er.com\/?p=205"},"modified":"2026-03-07T15:09:31","modified_gmt":"2026-03-07T07:09:31","slug":"%e4%bc%81%e4%b8%9a%e5%8d%8f%e4%bd%9c%e5%b9%b3%e5%8f%b0%e6%8e%a5%e5%85%a5%e8%af%a6%e7%bb%86%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/win7er.com\/?p=205","title":{"rendered":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b"},"content":{"rendered":"<h1 class=\"wp-block-heading\">\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b<\/h1>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u76ee\u5f55<\/h2>\n<ol>\n<li><a href=\"#\u6982\u8ff0\">\u6982\u8ff0<\/a><\/li>\n<li><a href=\"#\u9489\u9489\u63a5\u5165\">\u9489\u9489\u63a5\u5165<\/a><\/li>\n<li><a href=\"#\u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165\">\u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165<\/a><\/li>\n<li><a href=\"#\u98de\u4e66\u63a5\u5165\">\u98de\u4e66\u63a5\u5165<\/a><\/li>\n<li><a href=\"#\u901a\u7528-webhook-\u65b9\u6848\">\u901a\u7528 webhook \u65b9\u6848<\/a><\/li>\n<li><a href=\"#\u6700\u4f73\u5b9e\u8df5\">\u6700\u4f73\u5b9e\u8df5<\/a><\/li>\n<\/ol>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u6982\u8ff0<\/h2>\n<p>\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u901a\u5e38\u6307\u9700\u8981\u96c6\u6210\u5230\u4f01\u4e1aIM\u5de5\u5177\uff08\u9489\u9489\u3001\u4f01\u4e1a\u5fae\u4fe1\u3001\u98de\u4e66\uff09\u7684AI\u534f\u4f5c\u52a9\u624b\uff0c\u5e38\u89c1\u573a\u666f\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u667a\u80fd\u534f\u4f5c<\/strong>\uff1a\u6839\u636e\u63d0\u793a\u751f\u6210\u6587\u6848\u3001\u90ae\u4ef6\u3001\u62a5\u544a<\/li>\n<li><strong>\u6587\u6863\u6da6\u8272<\/strong>\uff1a\u4f18\u5316\u5df2\u6709\u6587\u672c\u7684\u8bed\u6cd5\u3001\u98ce\u683c<\/li>\n<li><strong>\u5185\u5bb9\u7eed\u5199<\/strong>\uff1a\u57fa\u4e8e\u524d\u6587\u81ea\u52a8\u8865\u5168<\/li>\n<li><strong>\u591a\u8f6e\u5bf9\u8bdd<\/strong>\uff1a\u652f\u6301\u4e0a\u4e0b\u6587\u7406\u89e3\u7684\u534f\u4f5c\u8f85\u52a9<\/li>\n<\/ul>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u9489\u9489\u63a5\u5165<\/h2>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e00\uff1a\u9489\u9489\u7fa4\u673a\u5668\u4eba\uff08\u6700\u7b80\u5355\uff0c\u63a8\u8350\u5165\u95e8\uff09<\/h3>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u673a\u5668\u4eba<\/h4>\n<ol>\n<li>\u6253\u5f00\u9489\u9489\u7fa4 \u2192 \u7fa4\u8bbe\u7f6e \u2192 \u667a\u80fd\u7fa4\u52a9\u624b<\/li>\n<li>\u70b9\u51fb\u300c\u6dfb\u52a0\u673a\u5668\u4eba\u300d\u2192\u300c\u81ea\u5b9a\u4e49\uff08\u901a\u8fc7Webhook\u63a5\u5165\u81ea\u5b9a\u4e49\u670d\u52a1\uff09\u300d<\/li>\n<li>\u8bbe\u7f6e\u673a\u5668\u4eba\u540d\u79f0\u3001\u5934\u50cf\uff0c\u9009\u62e9\u5b89\u5168\u8bbe\u7f6e\uff08\u5efa\u8bae\u52a0\u7b7e\u6216IP\u767d\u540d\u5355\uff09<\/li>\n<li>\u590d\u5236 <strong>Webhook \u5730\u5740<\/strong> \u548c <strong>\u52a0\u7b7e\u5bc6\u94a5<\/strong>\uff08\u5982\u6709\u8bbe\u7f6e\uff09<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u52a0\u7b7e\u7b97\u6cd5\uff08Python\u793a\u4f8b\uff09<\/h4>\n<pre><code class=\"lang-python language-python python\">import time\nimport hmac\nimport hashlib\nimport base64\nimport urllib.parse\n\ndef generate_sign(secret):\n    &quot;&quot;&quot;\u9489\u9489\u673a\u5668\u4eba\u52a0\u7b7e\u7b97\u6cd5&quot;&quot;&quot;\n    timestamp = str(round(time.time() * 1000))\n    string_to_sign = f&#039;{timestamp}\\n{secret}&#039;\n    hmac_code = hmac.new(\n        secret.encode(&#039;utf-8&#039;),\n        string_to_sign.encode(&#039;utf-8&#039;),\n        digestmod=hashlib.sha256\n    ).digest()\n    sign = urllib.parse.quote_plus(base64.b64encode(hmac_code))\n    return timestamp, sign\n\n# \u4f7f\u7528\u793a\u4f8b\nsecret = &#039;SECxxxxxxxxxxxxxxxxxxxxx&#039;\ntimestamp, sign = generate_sign(secret)\nprint(f&quot;timestamp={timestamp}&amp;sign={sign}&quot;)<\/code><\/pre>\n<h4 class=\"wp-block-heading\">3. \u53d1\u9001\u6d88\u606f<\/h4>\n<pre><code class=\"lang-python language-python python\">import requests\nimport json\n\nwebhook = &#039;https:\/\/oapi.dingtalk.com\/robot\/send?access_token=xxxxx&#039;\nsecret = &#039;SECxxxxxxxxxx&#039;\n\ntimestamp, sign = generate_sign(secret)\nurl = f&quot;{webhook}&amp;timestamp={timestamp}&amp;sign={sign}&quot;\n\n# \u53d1\u9001\u6587\u672c\u6d88\u606f\npayload = {\n    &quot;msgtype&quot;: &quot;text&quot;,\n    &quot;text&quot;: {\n        &quot;content&quot;: &quot;\u4f60\u597d\uff0c\u6211\u662fAI\u534f\u4f5c\u52a9\u624b\uff01&quot;\n    },\n    &quot;at&quot;: {\n        &quot;isAtAll&quot;: False\n    }\n}\n\n# \u53d1\u9001Markdown\npayload_md = {\n    &quot;msgtype&quot;: &quot;markdown&quot;,\n    &quot;markdown&quot;: {\n        &quot;title&quot;: &quot;\u534f\u4f5c\u7ed3\u679c&quot;,\n        &quot;text&quot;: &quot;## \u751f\u6210\u7684\u6587\u6848\\n\\n\u8fd9\u662fAI\u751f\u6210\u7684\u5185\u5bb9...&quot;\n    }\n}\n\nresponse = requests.post(url, json=payload)\nprint(response.json())<\/code><\/pre>\n<h4 class=\"wp-block-heading\">4. \u63a5\u6536\u7528\u6237\u6d88\u606f\uff08\u56de\u8c03\uff09<\/h4>\n<p>\u673a\u5668\u4eba\u9700\u8981\u90e8\u7f72\u4e00\u4e2a HTTP \u670d\u52a1\u63a5\u6536\u9489\u9489\u63a8\u9001\u7684\u6d88\u606f\uff1a<\/p>\n<pre><code class=\"lang-python language-python python\">from flask import Flask, request, jsonify\n\napp = Flask(__name__)\n\n@app.route(&#039;\/dingtalk\/callback&#039;, methods=[&#039;POST&#039;])\ndef dingtalk_callback():\n    data = request.get_json()\n\n    # \u5904\u7406\u4e0d\u540c\u7684\u4e8b\u4ef6\u7c7b\u578b\n    msg_type = data.get(&#039;msgtype&#039;)\n\n    if msg_type == &#039;text&#039;:\n        user_content = data.get(&#039;text&#039;, {}).get(&#039;content&#039;)\n        sender_staff_id = data.get(&#039;senderStaffId&#039;)\n\n        # \u8c03\u7528\u4f60\u7684\u534f\u4f5cAI\u5904\u7406\n        ai_response = process_writing_request(user_content)\n\n        # \u56de\u590d\u6d88\u606f\n        send_reply(data.get(&#039;sessionWebhook&#039;), ai_response)\n\n    return jsonify({&quot;status&quot;: &quot;ok&quot;})\n\ndef process_writing_request(content):\n    &quot;&quot;&quot;\u8c03\u7528\u4f60\u7684\u534f\u4f5cAI\u903b\u8f91&quot;&quot;&quot;\n    # \u8fd9\u91cc\u63a5\u5165\u4f60\u7684AI\u670d\u52a1\n    return f&quot;\u6536\u5230\u8bf7\u6c42\uff1a{content}\\n\\nAI\u751f\u6210\u7ed3\u679c\uff1a...&quot;\n\ndef send_reply(webhook, message):\n    &quot;&quot;&quot;\u901a\u8fc7sessionWebhook\u56de\u590d&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;markdown&quot;,\n        &quot;markdown&quot;: {\n            &quot;title&quot;: &quot;AI\u534f\u4f5c\u52a9\u624b&quot;,\n            &quot;text&quot;: message\n        }\n    }\n    requests.post(webhook, json=payload)\n\nif __name__ == &#039;__main__&#039;:\n    app.run(port=8080)<\/code><\/pre>\n<hr \/>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e8c\uff1a\u9489\u9489\u4f01\u4e1a\u5185\u90e8\u5e94\u7528\uff08\u529f\u80fd\u6700\u5168\uff09<\/h3>\n<p>\u9002\u5408\u9700\u8981\u83b7\u53d6\u7ec4\u7ec7\u67b6\u6784\u3001\u53d1\u9001\u5de5\u4f5c\u901a\u77e5\u7b49\u9ad8\u7ea7\u573a\u666f\u3002<\/p>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u5e94\u7528<\/h4>\n<ol>\n<li>\u767b\u5f55 <a href=\"https:\/\/open.dingtalk.com\/\">\u9489\u9489\u5f00\u653e\u5e73\u53f0<\/a><\/li>\n<li>\u521b\u5efa\u300c\u4f01\u4e1a\u5185\u90e8\u5e94\u7528\u300d<\/li>\n<li>\u83b7\u53d6 <strong>AppKey<\/strong> \u548c <strong>AppSecret<\/strong><\/li>\n<li>\u914d\u7f6e\u6743\u9650\uff1a\u5982\u300c\u901a\u8baf\u5f55\u7ba1\u7406\u300d\u3001\u300c\u6d88\u606f\u901a\u77e5\u300d\u7b49<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u83b7\u53d6 AccessToken<\/h4>\n<pre><code class=\"lang-python language-python python\">import requests\n\nAPP_KEY = &#039;dingxxxxxxxxxx&#039;\nAPP_SECRET = &#039;xxxxxxxxxxxxxx&#039;\n\ndef get_access_token():\n    url = f&quot;https:\/\/oapi.dingtalk.com\/gettoken?appkey={APP_KEY}&amp;appsecret={APP_SECRET}&quot;\n    response = requests.get(url)\n    return response.json().get(&#039;access_token&#039;)\n\ntoken = get_access_token()<\/code><\/pre>\n<h4 class=\"wp-block-heading\">3. \u53d1\u9001\u5de5\u4f5c\u901a\u77e5\uff08\u5f02\u6b65\u6d88\u606f\uff09<\/h4>\n<pre><code class=\"lang-python language-python python\">def send_work_notification(token, user_id_list, message):\n    &quot;&quot;&quot;\u53d1\u9001\u5de5\u4f5c\u901a\u77e5\u5230\u6307\u5b9a\u7528\u6237&quot;&quot;&quot;\n    url = f&quot;https:\/\/oapi.dingtalk.com\/topapi\/message\/corpconversation\/asyncsend_v2?access_token={token}&quot;\n\n    payload = {\n        &quot;agent_id&quot;: &quot;\u4f60\u7684AgentID&quot;,\n        &quot;userid_list&quot;: user_id_list,  # \u9017\u53f7\u5206\u9694\u7684\u7528\u6237ID\n        &quot;msg&quot;: {\n            &quot;msgtype&quot;: &quot;markdown&quot;,\n            &quot;markdown&quot;: {\n                &quot;title&quot;: &quot;AI\u534f\u4f5c\u52a9\u624b&quot;,\n                &quot;text&quot;: message\n            }\n        }\n    }\n\n    response = requests.post(url, json=payload)\n    return response.json()<\/code><\/pre>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165<\/h2>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e00\uff1a\u7fa4\u673a\u5668\u4eba<\/h3>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u673a\u5668\u4eba<\/h4>\n<ol>\n<li>\u6253\u5f00\u4f01\u4e1a\u5fae\u4fe1\u7fa4 \u2192 \u53f3\u4e0a\u89d2\u300c&#8230;\u300d\u2192\u300c\u6dfb\u52a0\u7fa4\u673a\u5668\u4eba\u300d<\/li>\n<li>\u8bbe\u7f6e\u673a\u5668\u4eba\u540d\u79f0\u548c\u5934\u50cf<\/li>\n<li>\u590d\u5236 <strong>Webhook \u5730\u5740<\/strong><\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u53d1\u9001\u6d88\u606f<\/h4>\n<pre><code class=\"lang-python language-python python\">import requests\n\nWEBHOOK_URL = &#039;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/webhook\/send?key=xxxxxxxx&#039;\n\ndef send_text_message(content, mentioned_list=None):\n    &quot;&quot;&quot;\u53d1\u9001\u6587\u672c\u6d88\u606f&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;text&quot;,\n        &quot;text&quot;: {\n            &quot;content&quot;: content,\n            &quot;mentioned_list&quot;: mentioned_list or []\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()\n\ndef send_markdown(content):\n    &quot;&quot;&quot;\u53d1\u9001Markdown\u6d88\u606f&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;markdown&quot;,\n        &quot;markdown&quot;: {\n            &quot;content&quot;: content\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()\n\ndef send_news_card(title, description, url, picurl=None):\n    &quot;&quot;&quot;\u53d1\u9001\u56fe\u6587\u5361\u7247&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;news&quot;,\n        &quot;news&quot;: {\n            &quot;articles&quot;: [\n                {\n                    &quot;title&quot;: title,\n                    &quot;description&quot;: description,\n                    &quot;url&quot;: url,\n                    &quot;picurl&quot;: picurl or &quot;&quot;\n                }\n            ]\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()\n\n# \u4f7f\u7528\u793a\u4f8b\nsend_text_message(&quot;AI\u534f\u4f5c\u52a9\u624b\u5df2\u5c31\u7eea\uff01&quot;)\nsend_markdown(&quot;**\u534f\u4f5c\u7ed3\u679c**\\n&gt; \u751f\u6210\u7684\u6587\u6848\u5185\u5bb9...&quot;)<\/code><\/pre>\n<h4 class=\"wp-block-heading\">3. \u4e0a\u4f20\u6587\u4ef6\/\u56fe\u7247<\/h4>\n<pre><code class=\"lang-python language-python python\">def upload_media(media_type, file_path):\n    &quot;&quot;&quot;\u4e0a\u4f20\u4e34\u65f6\u7d20\u6750\uff0c\u8fd4\u56demedia_id&quot;&quot;&quot;\n    url = f&quot;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/webhook\/upload_media?key=YOUR_KEY&amp;type={media_type}&quot;\n\n    with open(file_path, &#039;rb&#039;) as f:\n        files = {&#039;media&#039;: f}\n        response = requests.post(url, files=files)\n\n    return response.json().get(&#039;media_id&#039;)\n\ndef send_file(media_id):\n    &quot;&quot;&quot;\u53d1\u9001\u6587\u4ef6&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;file&quot;,\n        &quot;file&quot;: {\n            &quot;media_id&quot;: media_id\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()<\/code><\/pre>\n<hr \/>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e8c\uff1a\u81ea\u5efa\u5e94\u7528\uff08\u63a5\u6536\u7528\u6237\u6d88\u606f\uff09<\/h3>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u5e94\u7528<\/h4>\n<ol>\n<li>\u767b\u5f55 <a href=\"https:\/\/work.weixin.qq.com\/wework_admin\">\u4f01\u4e1a\u5fae\u4fe1\u7ba1\u7406\u540e\u53f0<\/a><\/li>\n<li>\u5e94\u7528\u7ba1\u7406 \u2192 \u521b\u5efa\u5e94\u7528<\/li>\n<li>\u83b7\u53d6 <strong>AgentId<\/strong> \u548c <strong>Secret<\/strong><\/li>\n<li>\u8bbe\u7f6e\u63a5\u6536\u6d88\u606f\uff1a\n<ul>\n<li>URL\uff1a\u4f60\u7684\u670d\u52a1\u5668\u5730\u5740<\/li>\n<li>Token\uff1a\u968f\u673a\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u9a8c\u8bc1<\/li>\n<li>EncodingAESKey\uff1a\u6d88\u606f\u52a0\u5bc6\u5bc6\u94a5<\/li>\n<\/ul><\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u9a8c\u8bc1URL\uff08\u670d\u52a1\u5668\u914d\u7f6e\uff09<\/h4>\n<pre><code class=\"lang-python language-python python\">from flask import Flask, request\nimport hashlib\nimport xml.etree.ElementTree as ET\nimport base64\nfrom Crypto.Cipher import AES\nimport random\nimport string\n\napp = Flask(__name__)\n\nTOKEN = &#039;your_token&#039;\nENCODING_AES_KEY = &#039;your_encoding_aes_key&#039;\nCORP_ID = &#039;your_corp_id&#039;\n\ndef verify_url(msg_signature, timestamp, nonce, echostr):\n    &quot;&quot;&quot;\u9a8c\u8bc1URL\u5e76\u89e3\u5bc6echostr&quot;&quot;&quot;\n    # \u6392\u5e8f\u62fc\u63a5\n    tmp_list = [TOKEN, timestamp, nonce, echostr]\n    tmp_list.sort()\n    tmp_str = &#039;&#039;.join(tmp_list)\n\n    # SHA1\u7b7e\u540d\n    signature = hashlib.sha1(tmp_str.encode()).hexdigest()\n\n    if signature != msg_signature:\n        return None\n\n    # \u89e3\u5bc6echostr\n    aes_key = base64.b64decode(ENCODING_AES_KEY + &#039;=&#039;)\n    cipher = AES.new(aes_key, AES.MODE_CBC, aes_key[:16])\n    decrypted = cipher.decrypt(base64.b64decode(echostr))\n\n    # \u53bb\u6389\u586b\u5145\n    pad_len = decrypted[-1]\n    content = decrypted[16:-pad_len]\n\n    # \u53bb\u6389CorpID\n    if content[-len(CORP_ID):] == CORP_ID.encode():\n        content = content[:-len(CORP_ID)]\n\n    return content\n\n@app.route(&#039;\/wechat\/callback&#039;, methods=[&#039;GET&#039;, &#039;POST&#039;])\ndef wechat_callback():\n    if request.method == &#039;GET&#039;:\n        # \u9a8c\u8bc1URL\n        signature = request.args.get(&#039;msg_signature&#039;)\n        timestamp = request.args.get(&#039;timestamp&#039;)\n        nonce = request.args.get(&#039;nonce&#039;)\n        echostr = request.args.get(&#039;echostr&#039;)\n\n        result = verify_url(signature, timestamp, nonce, echostr)\n        return result if result else &#039;fail&#039;\n\n    else:\n        # \u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\n        # TODO: \u89e3\u5bc6XML\u6d88\u606f\uff0c\u8c03\u7528AI\u5904\u7406\uff0c\u56de\u590d\u7ed3\u679c\n        pass<\/code><\/pre>\n<h4 class=\"wp-block-heading\">3. \u53d1\u9001\u5e94\u7528\u6d88\u606f<\/h4>\n<pre><code class=\"lang-python language-python python\">import requests\n\nCORP_ID = &#039;wwxxxxxxxxxxxxxxxx&#039;\nSECRET = &#039;xxxxxxxxxxxxxxxxxx&#039;\nAGENT_ID = 1000002\n\ndef get_access_token():\n    url = f&quot;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/gettoken?corpid={CORP_ID}&amp;corpsecret={SECRET}&quot;\n    response = requests.get(url)\n    return response.json().get(&#039;access_token&#039;)\n\ndef send_message(token, user_id, message):\n    &quot;&quot;&quot;\u53d1\u9001\u5e94\u7528\u6d88\u606f&quot;&quot;&quot;\n    url = f&quot;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/message\/send?access_token={token}&quot;\n\n    payload = {\n        &quot;touser&quot;: user_id,\n        &quot;msgtype&quot;: &quot;text&quot;,\n        &quot;agentid&quot;: AGENT_ID,\n        &quot;text&quot;: {\n            &quot;content&quot;: message\n        },\n        &quot;safe&quot;: 0\n    }\n\n    response = requests.post(url, json=payload)\n    return response.json()\n\n# Markdown\u6d88\u606f\npayload_md = {\n    &quot;touser&quot;: user_id,\n    &quot;msgtype&quot;: &quot;markdown&quot;,\n    &quot;agentid&quot;: AGENT_ID,\n    &quot;markdown&quot;: {\n        &quot;content&quot;: &quot;**AI\u534f\u4f5c\u52a9\u624b**\\n&gt; \u751f\u6210\u5185\u5bb9\uff1a...&quot;\n    }\n}<\/code><\/pre>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u98de\u4e66\u63a5\u5165<\/h2>\n<p>\u98de\u4e66\uff08Lark\uff09API \u8bbe\u8ba1\u8f83\u4e3a\u73b0\u4ee3\u5316\uff0c\u63a8\u8350\u4f7f\u7528\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e00\uff1a\u7fa4\u673a\u5668\u4eba<\/h3>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u673a\u5668\u4eba<\/h4>\n<ol>\n<li>\u6253\u5f00\u98de\u4e66\u7fa4 \u2192 \u8bbe\u7f6e \u2192 \u7fa4\u673a\u5668\u4eba \u2192 \u6dfb\u52a0\u673a\u5668\u4eba<\/li>\n<li>\u9009\u62e9\u300c\u81ea\u5b9a\u4e49\u673a\u5668\u4eba\u300d<\/li>\n<li>\u590d\u5236 <strong>Webhook \u5730\u5740<\/strong> \u548c <strong>\u7b7e\u540d\u6821\u9a8c\u5bc6\u94a5<\/strong><\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u53d1\u9001\u6d88\u606f<\/h4>\n<pre><code class=\"lang-python language-python python\">import requests\nimport json\n\nWEBHOOK_URL = &#039;https:\/\/open.feishu.cn\/open-apis\/bot\/v2\/hook\/xxxxxx&#039;\n\ndef send_text(content):\n    &quot;&quot;&quot;\u53d1\u9001\u6587\u672c\u6d88\u606f&quot;&quot;&quot;\n    payload = {\n        &quot;msg_type&quot;: &quot;text&quot;,\n        &quot;content&quot;: {\n            &quot;text&quot;: content\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()\n\ndef send_rich_text(title, content):\n    &quot;&quot;&quot;\u53d1\u9001\u5bcc\u6587\u672c\u6d88\u606f&quot;&quot;&quot;\n    payload = {\n        &quot;msg_type&quot;: &quot;post&quot;,\n        &quot;content&quot;: {\n            &quot;post&quot;: {\n                &quot;zh_cn&quot;: {\n                    &quot;title&quot;: title,\n                    &quot;content&quot;: [\n                        [{\n                            &quot;tag&quot;: &quot;text&quot;,\n                            &quot;text&quot;: content\n                        }]\n                    ]\n                }\n            }\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()\n\ndef send_card(title, content):\n    &quot;&quot;&quot;\u53d1\u9001\u5361\u7247\u6d88\u606f&quot;&quot;&quot;\n    payload = {\n        &quot;msg_type&quot;: &quot;interactive&quot;,\n        &quot;card&quot;: {\n            &quot;config&quot;: {&quot;wide_screen_mode&quot;: True},\n            &quot;header&quot;: {\n                &quot;title&quot;: {\n                    &quot;tag&quot;: &quot;plain_text&quot;,\n                    &quot;content&quot;: title\n                }\n            },\n            &quot;elements&quot;: [\n                {\n                    &quot;tag&quot;: &quot;div&quot;,\n                    &quot;text&quot;: {\n                        &quot;tag&quot;: &quot;lark_md&quot;,\n                        &quot;content&quot;: content\n                    }\n                }\n            ]\n        }\n    }\n    response = requests.post(WEBHOOK_URL, json=payload)\n    return response.json()<\/code><\/pre>\n<hr \/>\n<h3 class=\"wp-block-heading\">\u65b9\u5f0f\u4e8c\uff1a\u81ea\u5efa\u5e94\u7528\uff08\u63a8\u8350\u751f\u4ea7\u73af\u5883\uff09<\/h3>\n<h4 class=\"wp-block-heading\">1. \u521b\u5efa\u5e94\u7528<\/h4>\n<ol>\n<li>\u767b\u5f55 <a href=\"https:\/\/open.feishu.cn\/\">\u98de\u4e66\u5f00\u653e\u5e73\u53f0<\/a><\/li>\n<li>\u521b\u5efa\u4f01\u4e1a\u81ea\u5efa\u5e94\u7528<\/li>\n<li>\u83b7\u53d6 <strong>App ID<\/strong> \u548c <strong>App Secret<\/strong><\/li>\n<li>\u8ba2\u9605\u300c\u63a5\u6536\u6d88\u606f\u300d\u4e8b\u4ef6<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\">2. \u83b7\u53d6 Tenant Access Token<\/h4>\n<pre><code class=\"lang-python language-python python\">def get_tenant_access_token(app_id, app_secret):\n    &quot;&quot;&quot;\u83b7\u53d6\u79df\u6237\u7ea7Token\uff08\u4f01\u4e1a\u5185\u4f7f\u7528\uff09&quot;&quot;&quot;\n    url = &quot;https:\/\/open.feishu.cn\/open-apis\/auth\/v3\/tenant_access_token\/internal&quot;\n    payload = {\n        &quot;app_id&quot;: app_id,\n        &quot;app_secret&quot;: app_secret\n    }\n    response = requests.post(url, json=payload)\n    return response.json().get(&#039;tenant_access_token&#039;)\n\nAPP_ID = &#039;cli_xxxxxx&#039;\nAPP_SECRET = &#039;xxxxxxxx&#039;\ntoken = get_tenant_access_token(APP_ID, APP_SECRET)<\/code><\/pre>\n<h4 class=\"wp-block-heading\">3. \u63a5\u6536\u6d88\u606f\u4e8b\u4ef6<\/h4>\n<pre><code class=\"lang-python language-python python\">from flask import Flask, request, jsonify\nimport hashlib\nimport json\n\napp = Flask(__name__)\nVERIFICATION_TOKEN = &#039;your_verification_token&#039;\nENCRYPT_KEY = &#039;your_encrypt_key&#039;\n\n@app.route(&#039;\/feishu\/callback&#039;, methods=[&#039;POST&#039;])\ndef feishu_callback():\n    data = request.get_json()\n\n    # \u9a8c\u8bc1\u8bf7\u6c42\n    token = data.get(&#039;token&#039;)\n    if token != VERIFICATION_TOKEN:\n        return jsonify({&quot;code&quot;: 403})\n\n    # \u5904\u7406URL\u9a8c\u8bc1\n    if data.get(&#039;type&#039;) == &#039;url_verification&#039;:\n        return jsonify({&quot;challenge&quot;: data.get(&#039;challenge&#039;)})\n\n    # \u5904\u7406\u4e8b\u4ef6\u56de\u8c03\n    event = data.get(&#039;event&#039;, {})\n    event_type = event.get(&#039;type&#039;)\n\n    if event_type == &#039;im.message.receive_v1&#039;:\n        message = event.get(&#039;message&#039;, {})\n        content = json.loads(message.get(&#039;content&#039;, &#039;{}&#039;))\n        text = content.get(&#039;text&#039;, &#039;&#039;)\n        chat_id = message.get(&#039;chat_id&#039;)\n\n        # \u8c03\u7528AI\u5904\u7406\n        ai_response = process_writing(text)\n\n        # \u56de\u590d\u6d88\u606f\n        send_message_reply(token, chat_id, ai_response)\n\n    return jsonify({&quot;code&quot;: 0})\n\ndef send_message_reply(token, chat_id, content):\n    &quot;&quot;&quot;\u56de\u590d\u6d88\u606f&quot;&quot;&quot;\n    url = &quot;https:\/\/open.feishu.cn\/open-apis\/message\/v4\/send&quot;\n    headers = {&quot;Authorization&quot;: f&quot;Bearer {token}&quot;}\n    payload = {\n        &quot;chat_id&quot;: chat_id,\n        &quot;msg_type&quot;: &quot;text&quot;,\n        &quot;content&quot;: {\n            &quot;text&quot;: content\n        }\n    }\n    requests.post(url, headers=headers, json=payload)<\/code><\/pre>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u901a\u7528 Webhook \u65b9\u6848<\/h2>\n<p>\u5982\u679c\u4e0d\u60f3\u6df1\u5165\u5404\u5e73\u53f0\u7684SDK\uff0c\u53ef\u4ee5\u4f7f\u7528\u7edf\u4e00\u7684 Webhook \u8f6c\u53d1\u670d\u52a1\uff1a<\/p>\n<pre><code class=\"lang-python language-python python\"># webhook_gateway.py - \u7edf\u4e00\u7684Webhook\u7f51\u5173\n\nfrom flask import Flask, request, jsonify\nimport requests\n\napp = Flask(__name__)\n\n@app.route(&#039;\/gateway\/\n&lt;platform&gt;&#039;, methods=[&#039;POST&#039;])\ndef gateway(platform):\n    &quot;&quot;&quot;\u7edf\u4e00\u7684Webhook\u5165\u53e3&quot;&quot;&quot;\n    data = request.get_json()\n    user_message = data.get(&#039;message&#039;)\n\n    # \u8c03\u7528\u4f60\u7684\u534f\u4f5cAI\n    ai_result = call_writing_ai(user_message)\n\n    # \u6839\u636e\u5e73\u53f0\u8def\u7531\n    if platform == &#039;dingtalk&#039;:\n        return dingtalk_reply(data, ai_result)\n    elif platform == &#039;wechat&#039;:\n        return wechat_reply(data, ai_result)\n    elif platform == &#039;feishu&#039;:\n        return feishu_reply(data, ai_result)\n\n    return jsonify({&quot;error&quot;: &quot;unknown platform&quot;}), 400\n\ndef call_writing_ai(prompt):\n    &quot;&quot;&quot;\u8c03\u7528\u4f60\u7684\u534f\u4f5cAI\u670d\u52a1&quot;&quot;&quot;\n    # \u63a5\u5165OpenAI\/Claude\/\u56fd\u4ea7\u5927\u6a21\u578b\u7b49\n    # \u8fd4\u56deAI\u751f\u6210\u7ed3\u679c\n    return &quot;\u8fd9\u662fAI\u751f\u6210\u7684\u5185\u5bb9...&quot;<\/code><\/pre>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u6700\u4f73\u5b9e\u8df5<\/h2>\n<h3 class=\"wp-block-heading\">1. \u6d88\u606f\u957f\u5ea6\u9650\u5236<\/h3>\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>\u5e73\u53f0<\/th>\n<th>\u6587\u672c\u6d88\u606f\u9650\u5236<\/th>\n<th>Markdown\u9650\u5236<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u9489\u9489<\/td>\n<td>4096\u5b57\u7b26<\/td>\n<td>\u540c\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td>\u4f01\u4e1a\u5fae\u4fe1<\/td>\n<td>2048\u5b57\u8282<\/td>\n<td>4096\u5b57\u8282<\/td>\n<\/tr>\n<tr>\n<td>\u98de\u4e66<\/td>\n<td>\u65e0\u660e\u786e\u9650\u5236<\/td>\n<td>\u65e0\u660e\u786e\u9650\u5236<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n<p><strong>\u5efa\u8bae<\/strong>\uff1a\u8d85\u8fc7\u9650\u5236\u65f6\u62c6\u5206\u6d88\u606f\u6216\u4f7f\u7528\u6587\u4ef6\u53d1\u9001\u3002<\/p>\n<h3 class=\"wp-block-heading\">2. \u5b89\u5168\u5efa\u8bae<\/h3>\n<pre><code class=\"lang-python language-python python\"># \u4f7f\u7528\u73af\u5883\u53d8\u91cf\u5b58\u50a8\u654f\u611f\u4fe1\u606f\nimport os\n\nDINGTALK_SECRET = os.getenv(&#039;DINGTALK_SECRET&#039;)\nWECHAT_KEY = os.getenv(&#039;WECHAT_KEY&#039;)\nFEISHU_TOKEN = os.getenv(&#039;FEISHU_TOKEN&#039;)<\/code><\/pre>\n<h3 class=\"wp-block-heading\">3. \u6d88\u606f\u6a21\u677f\u8bbe\u8ba1<\/h3>\n<pre><code class=\"lang-python language-python python\">WRITING_RESULT_TEMPLATE = &quot;&quot;&quot;\n\ud83d\udcdd **\u534f\u4f5c\u7ed3\u679c**\n\n{content}\n\n---\n\ud83d\udca1 \u63d0\u793a\uff1a\u56de\u590d\u300c\u91cd\u5199\u300d\u53ef\u91cd\u65b0\u751f\u6210\n&quot;&quot;&quot;\n\nERROR_TEMPLATE = &quot;&quot;&quot;\n\u274c **\u5904\u7406\u5931\u8d25**\n\n{error_message}\n\n\u8bf7\u7a0d\u540e\u91cd\u8bd5\u6216\u8054\u7cfb\u7ba1\u7406\u5458\n&quot;&quot;&quot;<\/code><\/pre>\n<h3 class=\"wp-block-heading\">4. \u901f\u7387\u9650\u5236<\/h3>\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>\u5e73\u53f0<\/th>\n<th>\u9891\u7387\u9650\u5236<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u9489\u9489<\/td>\n<td>20\u6b21\/\u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u4f01\u4e1a\u5fae\u4fe1<\/td>\n<td>20\u6b21\/\u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u98de\u4e66<\/td>\n<td>100\u6b21\/\u79d2<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/figure>\n<h3 class=\"wp-block-heading\">5. \u5b8c\u6574\u7684\u5feb\u901f\u542f\u52a8\u793a\u4f8b<\/h3>\n<pre><code class=\"lang-python language-python python\"># writing_bot.py - \u4e00\u4e2a\u6781\u7b80\u7684\u534f\u4f5c\u673a\u5668\u4eba\n\nimport os\nimport requests\nfrom flask import Flask, request\n\napp = Flask(__name__)\n\n# \u914d\u7f6e\nDINGTALK_WEBHOOK = os.getenv(&#039;DINGTALK_WEBHOOK&#039;)\nDINGTALK_SECRET = os.getenv(&#039;DINGTALK_SECRET&#039;)\n\n# \u6a21\u62dfAI\u534f\u4f5c\uff08\u66ff\u6362\u4e3a\u4f60\u7684\u771f\u5b9eAI\u8c03\u7528\uff09\ndef ai_write(prompt):\n    return f&quot;\ud83e\udd16 \u6839\u636e\u300c{prompt}\u300d\u751f\u6210\u7684\u5185\u5bb9\uff1a\\n\\n\u8fd9\u91cc\u662fAI\u751f\u6210\u7684\u6587\u6848...&quot;\n\n@app.route(&#039;\/write&#039;, methods=[&#039;POST&#039;])\ndef write():\n    &quot;&quot;&quot;\u63a5\u6536\u534f\u4f5c\u8bf7\u6c42&quot;&quot;&quot;\n    data = request.get_json()\n    prompt = data.get(&#039;prompt&#039;, &#039;&#039;)\n    webhook = data.get(&#039;webhook&#039;, DINGTALK_WEBHOOK)\n\n    # \u751f\u6210\u5185\u5bb9\n    result = ai_write(prompt)\n\n    # \u53d1\u9001\u7ed3\u679c\n    send_to_dingtalk(webhook, result)\n\n    return {&quot;status&quot;: &quot;ok&quot;}\n\ndef send_to_dingtalk(webhook, message):\n    &quot;&quot;&quot;\u53d1\u9001\u5230\u9489\u9489&quot;&quot;&quot;\n    payload = {\n        &quot;msgtype&quot;: &quot;markdown&quot;,\n        &quot;markdown&quot;: {\n            &quot;title&quot;: &quot;AI\u534f\u4f5c\u7ed3\u679c&quot;,\n            &quot;text&quot;: message\n        }\n    }\n    requests.post(webhook, json=payload)\n\nif __name__ == &#039;__main__&#039;:\n    app.run(port=5000)<\/code><\/pre>\n<hr \/>\n<h2 class=\"wp-block-heading\">\u53c2\u8003\u6587\u6863<\/h2>\n<ul>\n<li><a href=\"https:\/\/open.dingtalk.com\/\">\u9489\u9489\u5f00\u653e\u5e73\u53f0<\/a><\/li>\n<li><a href=\"https:\/\/developer.work.weixin.qq.com\/\">\u4f01\u4e1a\u5fae\u4fe1\u5f00\u53d1\u8005\u4e2d\u5fc3<\/a><\/li>\n<li><a href=\"https:\/\/open.feishu.cn\/\">\u98de\u4e66\u5f00\u653e\u5e73\u53f0<\/a><\/li>\n<\/ul>\n<hr \/>\n<blockquote>\n<p>\ud83d\udca1 <strong>\u63d0\u793a<\/strong>\uff1a\u6839\u636e\u4f60\u7684\u5b9e\u9645\u573a\u666f\u9009\u62e9\u63a5\u5165\u65b9\u5f0f\uff1a<\/p>\n<ul>\n<li>\u5feb\u901f\u9a8c\u8bc1\/\u5c0f\u56e2\u961f \u2192 \u7fa4\u673a\u5668\u4eba<\/li>\n<li>\u751f\u4ea7\u73af\u5883\/\u9700\u8981\u7528\u6237\u4ea4\u4e92 \u2192 \u81ea\u5efa\u5e94\u7528<\/li>\n<li>\u591a\u5e73\u53f0\u7edf\u4e00 \u2192 Webhook\u7f51\u5173\u65b9\u6848<\/li>\n<\/ul>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b \u76ee\u5f55 \u6982\u8ff0 \u9489\u9489\u63a5\u5165 \u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165 \u98de\u4e66\u63a5\u5165 \u901a\u7528 webhook \u65b9\u6848 \u6700\u4f73\u5b9e\u8df5  [&hellip;]<\/p>","protected":false},"author":1,"featured_media":117,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAow767EDA:productID":"","footnotes":""},"categories":[61],"tags":[54,20,62,65,67,68,66,63,64],"class_list":["post-205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-61","tag-ai","tag-python","tag-62","tag-65","tag-67","tag-68","tag-66","tag-63","tag-64"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/win7er.com\/?p=205\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life\" \/>\n<meta property=\"og:description\" content=\"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b \u76ee\u5f55 \u6982\u8ff0 \u9489\u9489\u63a5\u5165 \u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165 \u98de\u4e66\u63a5\u5165 \u901a\u7528 webhook \u65b9\u6848 \u6700\u4f73\u5b9e\u8df5 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/win7er.com\/?p=205\" \/>\n<meta property=\"og:site_name\" content=\"Winter&#039;s Life\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/knowwinter\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/knowwinter\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-07T07:09:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1920\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"winter.yu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/x.com\/winter_know\" \/>\n<meta name=\"twitter:site\" content=\"@winter_know\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"winter.yu\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205\"},\"author\":{\"name\":\"winter.yu\",\"@id\":\"https:\\\/\\\/win7er.com\\\/#\\\/schema\\\/person\\\/40b2ae9640523bebb22a847803dbf22a\"},\"headline\":\"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b\",\"datePublished\":\"2026-03-07T07:09:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205\"},\"wordCount\":1410,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/win7er.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg\",\"keywords\":[\"Ai\",\"Python\",\"\u4f01\u4e1a\u534f\u4f5c\",\"\u4f01\u4e1a\u5fae\u4fe1\",\"\u6559\u7a0b\",\"\u673a\u5668\u4eba\",\"\u81ea\u52a8\u5316\",\"\u9489\u9489\",\"\u98de\u4e66\"],\"articleSection\":[\"\u4f01\u4e1a\u534f\u4f5c\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/win7er.com\\\/?p=205#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205\",\"url\":\"https:\\\/\\\/win7er.com\\\/?p=205\",\"name\":\"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/win7er.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg\",\"datePublished\":\"2026-03-07T07:09:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/#\\\/schema\\\/person\\\/40b2ae9640523bebb22a847803dbf22a\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/win7er.com\\\/?p=205\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#primaryimage\",\"url\":\"https:\\\/\\\/win7er.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg\",\"contentUrl\":\"https:\\\/\\\/win7er.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg\",\"width\":2560,\"height\":1920},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/win7er.com\\\/?p=205#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/win7er.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/win7er.com\\\/#website\",\"url\":\"https:\\\/\\\/win7er.com\\\/\",\"name\":\"Winter's Life\",\"description\":\"\u6280\u672f\u5206\u4eab | \u7a0b\u5e8f\u5f00\u53d1 | \u4ea7\u54c1\u6d4b\u8bc4 | \u6280\u672f\u54a8\u8be2 | \u8fdc\u7a0b\u534f\u52a9 | \u751f\u6d3b\u611f\u609f | \u884c\u4e1a\u65b0\u95fb\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/win7er.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/win7er.com\\\/#\\\/schema\\\/person\\\/40b2ae9640523bebb22a847803dbf22a\",\"name\":\"winter.yu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g\",\"caption\":\"winter.yu\"},\"sameAs\":[\"https:\\\/\\\/win7er.com\",\"https:\\\/\\\/www.facebook.com\\\/knowwinter\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/x.com\\\/winter_know\"],\"url\":\"https:\\\/\\\/win7er.com\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/win7er.com\/?p=205","og_locale":"zh_CN","og_type":"article","og_title":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life","og_description":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b \u76ee\u5f55 \u6982\u8ff0 \u9489\u9489\u63a5\u5165 \u4f01\u4e1a\u5fae\u4fe1\u63a5\u5165 \u98de\u4e66\u63a5\u5165 \u901a\u7528 webhook \u65b9\u6848 \u6700\u4f73\u5b9e\u8df5 [&hellip;]","og_url":"https:\/\/win7er.com\/?p=205","og_site_name":"Winter&#039;s Life","article_publisher":"https:\/\/www.facebook.com\/knowwinter\/","article_author":"https:\/\/www.facebook.com\/knowwinter\/","article_published_time":"2026-03-07T07:09:31+00:00","og_image":[{"width":2560,"height":1920,"url":"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg","type":"image\/jpeg"}],"author":"winter.yu","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/x.com\/winter_know","twitter_site":"@winter_know","twitter_misc":{"\u4f5c\u8005":"winter.yu","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/win7er.com\/?p=205#article","isPartOf":{"@id":"https:\/\/win7er.com\/?p=205"},"author":{"name":"winter.yu","@id":"https:\/\/win7er.com\/#\/schema\/person\/40b2ae9640523bebb22a847803dbf22a"},"headline":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b","datePublished":"2026-03-07T07:09:31+00:00","mainEntityOfPage":{"@id":"https:\/\/win7er.com\/?p=205"},"wordCount":1410,"commentCount":0,"image":{"@id":"https:\/\/win7er.com\/?p=205#primaryimage"},"thumbnailUrl":"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg","keywords":["Ai","Python","\u4f01\u4e1a\u534f\u4f5c","\u4f01\u4e1a\u5fae\u4fe1","\u6559\u7a0b","\u673a\u5668\u4eba","\u81ea\u52a8\u5316","\u9489\u9489","\u98de\u4e66"],"articleSection":["\u4f01\u4e1a\u534f\u4f5c"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/win7er.com\/?p=205#respond"]}]},{"@type":"WebPage","@id":"https:\/\/win7er.com\/?p=205","url":"https:\/\/win7er.com\/?p=205","name":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b - Winter&#039;s Life","isPartOf":{"@id":"https:\/\/win7er.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/win7er.com\/?p=205#primaryimage"},"image":{"@id":"https:\/\/win7er.com\/?p=205#primaryimage"},"thumbnailUrl":"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg","datePublished":"2026-03-07T07:09:31+00:00","author":{"@id":"https:\/\/win7er.com\/#\/schema\/person\/40b2ae9640523bebb22a847803dbf22a"},"breadcrumb":{"@id":"https:\/\/win7er.com\/?p=205#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/win7er.com\/?p=205"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/win7er.com\/?p=205#primaryimage","url":"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg","contentUrl":"https:\/\/win7er.com\/wp-content\/uploads\/2026\/02\/53ffae4ec874ac74a396fe834f3ca5e8-scaled.jpeg","width":2560,"height":1920},{"@type":"BreadcrumbList","@id":"https:\/\/win7er.com\/?p=205#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/win7er.com\/"},{"@type":"ListItem","position":2,"name":"\u4f01\u4e1a\u534f\u4f5c\u5e73\u53f0\u63a5\u5165\u8be6\u7ec6\u6559\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/win7er.com\/#website","url":"https:\/\/win7er.com\/","name":"Winter's Life","description":"\u6280\u672f\u5206\u4eab | \u7a0b\u5e8f\u5f00\u53d1 | \u4ea7\u54c1\u6d4b\u8bc4 | \u6280\u672f\u54a8\u8be2 | \u8fdc\u7a0b\u534f\u52a9 | \u751f\u6d3b\u611f\u609f | \u884c\u4e1a\u65b0\u95fb","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/win7er.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/win7er.com\/#\/schema\/person\/40b2ae9640523bebb22a847803dbf22a","name":"winter.yu","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/822954e373be717fced36ce555e788a845ab401b70f421cad86458368d68bc54?s=96&d=mm&r=g","caption":"winter.yu"},"sameAs":["https:\/\/win7er.com","https:\/\/www.facebook.com\/knowwinter\/","https:\/\/x.com\/https:\/\/x.com\/winter_know"],"url":"https:\/\/win7er.com\/?author=1"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/posts\/205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/win7er.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=205"}],"version-history":[{"count":1,"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/posts\/205\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/posts\/205\/revisions\/206"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/win7er.com\/index.php?rest_route=\/wp\/v2\/media\/117"}],"wp:attachment":[{"href":"https:\/\/win7er.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/win7er.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/win7er.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}