{"id":115553,"date":"2026-10-12T14:49:25","date_gmt":"2026-10-12T06:49:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115553.html"},"modified":"2026-10-12T14:49:25","modified_gmt":"2026-10-12T06:49:25","slug":"libwebsockets-%e5%85%a8%e6%96%87%e6%90%9c%e7%b4%a2%ef%bc%88fts%ef%bc%89http-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%9e%e6%88%98%ef%bc%9a%e6%9e%84%e5%bb%ba%e4%b8%8e%e5%89%96%e6%9e%90-minimal-http-server-full","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115553.html","title":{"rendered":"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search"},"content":{"rendered":"<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><\/li>\n<li><span class=\"gcb-tag\">AI Agent<\/span><\/li>\n<li><span class=\"gcb-tag\">\u591a\u6a21\u6001<\/span><\/li>\n<li><span class=\"gcb-tag\">\u8bed\u97f3<\/span><\/li>\n<li><span class=\"gcb-tag\">AI \u5e94\u7528<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011ten-framework<\/h3>\n<p class=\"gcb-project-desc\"> Open-source framework for conversational voice AI agents<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/TEN-framework\/ten-framework<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<p>\u672c\u7bc7\u6307\u5357\u4ee5 libwebsockets \u5b98\u65b9\u6700\u5c0f\u793a\u4f8b minimal-http-server-fulltext-search \u4e3a\u6838\u5fc3&#xff0c;\u8bb2\u89e3\u5982\u4f55\u6784\u5efa\u3001\u8fd0\u884c\u4e00\u4e2a\u5185\u7f6e\u5168\u6587\u68c0\u7d22\u80fd\u529b\u7684 HTTP \u670d\u52a1\u5668&#xff0c;\u5e76\u6df1\u5165\u5256\u6790\u5176\u80cc\u540e\u7684 lws FTS&#xff08;Full Text Search&#xff09;\u7d22\u5f15\u4e0e\u67e5\u8be2\u673a\u5236\u3002\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u5c06\u638c\u63e1\u8be5\u793a\u4f8b\u7684\u7f16\u8bd1\u8fd0\u884c\u65b9\u5f0f\u3001\u524d\u7aef\u81ea\u52a8\u8865\u5168\u4e0e\u7ed3\u679c\u5c55\u793a\u7684\u4ea4\u4e92\u6d41\u7a0b\u3001lws_fts_* \u516c\u5171 API \u7684\u7528\u6cd5&#xff0c;\u4ee5\u53ca on-disk \u7d22\u5f15\u6587\u4ef6\u7684\u683c\u5f0f\u8bbe\u8ba1&#xff0c;\u53ef\u76f4\u63a5\u53c2\u8003\u672c\u4ed3\u5e93\u793a\u4f8b\u642d\u5efa\u81ea\u5df1\u7684\u8f7b\u91cf\u5168\u6587\u641c\u7d22\u670d\u52a1\u3002<\/p>\n<h3>\u793a\u4f8b\u6982\u89c8&#xff1a;\u4e00\u4e2a\u81ea\u5e26\u5168\u6587\u641c\u7d22\u7684 HTTP \u670d\u52a1\u5668<\/h3>\n<p>\u8be5\u793a\u4f8b\u4f4d\u4e8e\u4ed3\u5e93\u7684 third_party\/libwebsockets\/minimal-examples\/http-server\/minimal-http-server-fulltext-search \u76ee\u5f55\u3002\u5b83\u7684\u76ee\u6807\u975e\u5e38\u5177\u4f53&#xff1a;\u7528 libwebsockets \u542f\u52a8\u4e00\u4e2a HTTP \u670d\u52a1\u5668&#xff0c;\u5c06 Oscar Wilde\u300aThe Picture of Dorian Gray\u300b\u5168\u6587&#xff08;\u5171 8904 \u884c&#xff09;\u4f5c\u4e3a\u68c0\u7d22\u8bed\u6599&#xff0c;\u901a\u8fc7\u4e00\u4e2a\u7f51\u9875\u524d\u7aef\u63d0\u4f9b\u8fb9\u8f93\u5165\u8fb9\u8865\u5168\u3001\u547d\u4e2d\u884c\u539f\u6587\u5c55\u793a\u7684\u5168\u6587\u641c\u7d22\u4f53\u9a8c\u3002<\/p>\n<p>\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b&#xff1a;<\/p>\n<table>\n<tr>\u6587\u4ef6\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>minimal-http-server.c<\/td>\n<td>\u670d\u52a1\u5668\u4e3b\u7a0b\u5e8f&#xff1a;\u521b\u5efa context\u3001\u6302\u8f7d\u9759\u6001\u76ee\u5f55\u4e0e \/fts \u52a8\u6001\u534f\u8bae<\/td>\n<\/tr>\n<tr>\n<td>CMakeLists.txt<\/td>\n<td>\u6784\u5efa\u811a\u672c&#xff0c;\u663e\u5f0f\u68c0\u67e5 LWS_WITH_FTS \u7b49\u7f16\u8bd1\u9009\u9879<\/td>\n<\/tr>\n<tr>\n<td>lws-fts.index<\/td>\n<td>\u9884\u5148\u751f\u6210\u7684 FTS \u7d22\u5f15\u6587\u4ef6&#xff08;trie \u5e8f\u5217\u5316\u4ea7\u7269&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>the-picture-of-dorian-gray.txt<\/td>\n<td>\u641c\u7d22\u8bed\u6599&#xff1a;\u5c0f\u8bf4\u5168\u6587<\/td>\n<\/tr>\n<tr>\n<td>mount-origin\/<\/td>\n<td>\u9759\u6001\u9875\u9762\u8d44\u6e90&#xff1a;index.html\u3001lws-fts.js\u3001lws-fts.css \u7b49<\/td>\n<\/tr>\n<tr>\n<td>plugins\/protocol_fulltext_demo.c<\/td>\n<td>\u5168\u6587\u5b57\u641c\u7d22\u534f\u8bae\u63d2\u4ef6&#xff1a;\u5904\u7406 \/a\/&#xff08;\u81ea\u52a8\u8865\u5168&#xff09;\u4e0e \/r\/&#xff08;\u67e5\u8be2\u7ed3\u679c&#xff09;\u8bf7\u6c42<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6784\u5efa&#xff1a;cmake \u4e0e make<\/h3>\n<p>\u539f\u6587\u6863\u7ed9\u51fa\u7684\u6784\u5efa\u65b9\u5f0f\u975e\u5e38\u7b80\u6d01&#xff1a;<\/p>\n<p>$ cmake . &amp;&amp; make<\/p>\n<p>\u5f53\u524d\u4ed3\u5e93\u5185\u5bf9\u5e94\u7684 CMakeLists.txt \u63ed\u793a\u4e86\u8be5\u793a\u4f8b\u7684\u771f\u5b9e\u7f16\u8bd1\u524d\u63d0\u2014\u2014libwebsockets \u5728\u7f16\u8bd1\u65f6\u5fc5\u987b\u5f00\u542f\u4e09\u4e2a\u7279\u6027&#xff0c;\u5426\u5219\u6784\u5efa\u4f1a\u88ab require_lws_config \u68c0\u67e5\u62e6\u622a&#xff1a;<\/p>\n<p>require_lws_config(LWS_ROLE_H1 1 requirements)   # HTTP\/1 \u89d2\u8272<br \/>\nrequire_lws_config(LWS_WITH_FTS 1 requirements)  # \u5168\u6587\u641c\u7d22\u7ec4\u4ef6<br \/>\nrequire_lws_config(LWS_WITH_SERVER 1 requirements) # \u670d\u52a1\u5668\u80fd\u529b<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u6784\u5efa libwebsockets \u672c\u8eab\u65f6\u9700\u8981\u5f00\u542f LWS_WITH_FTS&#xff08;cmake \u914d\u7f6e\u9879&#xff09;&#xff0c;\u672c\u793a\u4f8b\u4f9d\u8d56\u7684 FTS \u529f\u80fd\u624d\u53ef\u7528\u3002\u6784\u5efa\u6210\u529f\u540e\u4f1a\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6 lws-minimal-http-server-fulltext-search\u3002\u6ce8\u610f CMakeLists.txt \u4e2d\u901a\u8fc7 include_directories(..\/..\/..\/plugins) \u628a\u63d2\u4ef6\u76ee\u5f55\u52a0\u5165\u5934\u6587\u4ef6\u641c\u7d22\u8def\u5f84&#xff0c;\u4e3b\u7a0b\u5e8f\u91cc\u6b63\u662f\u4ee5 #include &lt;protocol_fulltext_demo.c&gt; \u7684\u65b9\u5f0f\u9759\u6001\u5f15\u7528\u63d2\u4ef6\u6e90\u7801&#xff08;\u5bf9\u5e94\u6e90\u7801\u89c1 minimal-http-server.c&#xff09;\u3002<\/p>\n<h3>\u8fd0\u884c\u4e0e\u8bbf\u95ee&#xff1a;\u7aef\u53e3 7681<\/h3>\n<p>\u6784\u5efa\u5b8c\u6210\u540e\u6309\u539f\u6587\u6863\u8fd0\u884c&#xff1a;<\/p>\n<p>$ .\/lws-minimal-http-server<br \/>\n[2018\/03\/04 09:30:02:7986] USER: LWS minimal http server | visit http:\/\/localhost:7681<br \/>\n[2018\/03\/04 09:30:02:7986] NOTICE: Creating Vhost &#039;default&#039; port 7681, 1 protocols, IPv6 on<\/p>\n<p>\u7136\u540e\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:7681 \u5373\u53ef\u3002\u542f\u52a8\u65e5\u5fd7\u7684\u4e24\u884c\u542b\u4e49&#xff1a;<\/p>\n<ul>\n<li>USER \u884c\u662f\u793a\u4f8b\u81ea\u8eab\u7684\u6b22\u8fce\u63d0\u793a&#xff0c;\u544a\u77e5\u8bbf\u95ee\u5730\u5740&#xff1b;<\/li>\n<li>NOTICE \u884c\u6765\u81ea libwebsockets \u6838\u5fc3&#xff0c;\u8bf4\u660e\u5df2\u521b\u5efa\u540d\u4e3a default \u7684 vhost&#xff0c;\u76d1\u542c\u7aef\u53e3 7681&#xff0c;\u542f\u7528 IPv6\u3002<\/li>\n<\/ul>\n<p>\u670d\u52a1\u5668\u4e3b\u7a0b\u5e8f\u7684\u5173\u952e\u914d\u7f6e&#xff08;\u89c1 minimal-http-server.c&#xff09;&#xff1a;<\/p>\n<p>memset(&amp;info, 0, sizeof info);<br \/>\ninfo.port &#061; 7681;<br \/>\ninfo.mounts &#061; &amp;mount;          \/\/ \u9759\u6001\u76ee\u5f55\u6302\u8f7d\u94fe<br \/>\ninfo.protocols &#061; protocols;    \/\/ \u542b lws-test-fts \u534f\u8bae<br \/>\ninfo.pvo &#061; &amp;pvo;               \/\/ \u534f\u8bae\u79c1\u6709\u9009\u9879&#xff1a;indexpath<br \/>\ninfo.options &#061; LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE;<\/p>\n<ul>\n<li>\u9759\u6001\u6302\u8f7d&#xff1a;URL \u6839\u8def\u5f84 \/ \u6620\u5c04\u5230 .\/mount-origin \u76ee\u5f55&#xff0c;\u9ed8\u8ba4\u6587\u4ef6 index.html&#xff08;LWSMPRO_FILE&#xff09;&#xff1b;<\/li>\n<li>\u52a8\u6001\u6302\u8f7d&#xff1a;URL \/fts \u6620\u5c04\u5230\u534f\u8bae lws-test-fts&#xff08;LWSMPRO_CALLBACK&#xff09;&#xff0c;\u6240\u6709\u5168\u6587\u641c\u7d22\u8bf7\u6c42\u90fd\u8d70\u8fd9\u91cc&#xff1b;<\/li>\n<li>\u901a\u8fc7 pvo&#xff08;protocol vhost options&#xff09;\u5c06 indexpath \u6307\u5411\u7d22\u5f15\u6587\u4ef6\u8def\u5f84&#xff0c;\u9ed8\u8ba4\u503c\u4e3a .\/lws-fts.index\u3002<\/li>\n<\/ul>\n<h3>\u524d\u7aef\u4ea4\u4e92&#xff1a;\u81ea\u52a8\u8865\u5168\u4e0e\u547d\u4e2d\u884c\u5c55\u793a<\/h3>\n<p>\u9875\u9762\u5165\u53e3 mount-origin\/index.html \u5b9a\u4e49\u4e86\u4e00\u4e2a\u641c\u7d22\u8f93\u5165\u6846&#xff08;maxlength&#061;80&#xff09;\u548c\u4e24\u4e2a\u7ed3\u679c\u5bb9\u5668\u3002\u5168\u90e8\u903b\u8f91\u5728 mount-origin\/lws-fts.js \u4e2d&#xff1a;<\/p>\n<ul>\n<li>\u8fb9\u8f93\u5165\u8fb9\u8865\u5168&#xff1a;\u76d1\u542c\u8f93\u5165\u6846\u7684 input \u4e8b\u4ef6&#xff0c;\u6bcf\u6b21\u8f93\u5165\u90fd\u53d1\u8d77 GET ..\/fts\/a\/&lt;\u5173\u952e\u8bcd&gt; \u8bf7\u6c42&#xff0c;\u8fd4\u56de\u4ee5\u8be5\u524d\u7f00\u5f00\u5934\u7684\u81ea\u52a8\u8865\u5168\u5efa\u8bae\u5217\u8868&#xff1b;<\/li>\n<li>\u56de\u8f66\u51fa\u7ed3\u679c&#xff1a;\u8f93\u5165\u6846\u83b7\u5f97 viable \u6837\u5f0f&#xff08;\u5373\u5b58\u5728\u6709\u6548\u5efa\u8bae&#xff09;\u540e&#xff0c;\u6309 Enter \u53d1\u8d77 GET ..\/fts\/r\/&lt;\u5173\u952e\u8bcd&gt; \u8bf7\u6c42&#xff0c;\u5c55\u793a\u6bcf\u4e2a\u547d\u4e2d\u6587\u4ef6\u7684\u884c\u53f7\u4e0e\u547d\u4e2d\u884c\u539f\u6587&#xff1b;<\/li>\n<li>\u4e24\u4e2a\u8bf7\u6c42\u90fd\u5e26 cache-control: max-age&#061;0 \u5934\u7981\u7528\u7f13\u5b58&#xff0c;\u786e\u4fdd\u5b9e\u65f6\u6027\u3002<\/li>\n<\/ul>\n<p>\u524d\u7aef\u8c03\u7528\u7684 \/a\/ \u4e0e \/r\/ \u4e24\u4e2a URL \u5b50\u8def\u5f84&#xff0c;\u6b63\u662f\u540e\u7aef\u534f\u8bae\u63d2\u4ef6\u7ea6\u5b9a\u7684&#034;\u5b50\u76ee\u5f55\u9009\u62e9\u4efb\u52a1&#034;\u7ea6\u5b9a&#xff08;\u89c1\u4e0b\u6587&#xff09;\u3002<\/p>\n<h3>\u540e\u7aef\u534f\u8bae\u5256\u6790&#xff1a;\u4e00\u6b21\u641c\u7d22\u8bf7\u6c42\u7684\u5b8c\u6574\u94fe\u8def<\/h3>\n<p>\u6240\u6709\u641c\u7d22\u8bf7\u6c42\u6700\u7ec8\u843d\u5728\u534f\u8bae\u63d2\u4ef6 plugins\/protocol_fulltext_demo.c \u4e2d\u3002\u6838\u5fc3\u662f callback_fts \u56de\u8c03&#xff0c;\u5173\u952e\u5206\u652f\u5982\u4e0b&#xff1a;<\/p>\n<p>1. \u534f\u8bae\u521d\u59cb\u5316&#xff08;LWS_CALLBACK_PROTOCOL_INIT&#xff09;<\/p>\n<p>\u4ece pvo \u8bfb\u53d6 indexpath \u53c2\u6570\u5e76\u5b58\u5165 vhost \u79c1\u6709\u6570\u636e&#xff1a;<\/p>\n<p>vhd &#061; lws_protocol_vh_priv_zalloc(&#8230;);<br \/>\nif (lws_pvo_get_str(in, &#034;indexpath&#034;, (const char **)&amp;vhd-&gt;indexpath))<br \/>\n    return 1;<\/p>\n<p>\u82e5\u8bfb\u53d6\u5931\u8d25\u5219\u521d\u59cb\u5316\u5931\u8d25&#xff0c;\u534f\u8bae\u4e0d\u53ef\u7528\u3002<\/p>\n<p>2. HTTP \u8bf7\u6c42\u5206\u53d1&#xff08;LWS_CALLBACK_HTTP&#xff09;<\/p>\n<p>if (strncmp(ccp, &#034;\/a\/&#034;, 3) &amp;&amp; strncmp(ccp, &#034;\/r\/&#034;, 3))<br \/>\n    goto reply_404;<\/p>\n<p>params.needle &#061; ccp &#043; 3;           \/\/ \u5173\u952e\u8bcd\u5728\u7b2c\u4e09\u4e2a\u5b57\u7b26\u4e4b\u540e<br \/>\nif (*(ccp &#043; 1) &#061;&#061; &#039;a&#039;)             \/\/ \/a\/ \u81ea\u52a8\u8865\u5168<br \/>\n    params.flags &#061; LWSFTS_F_QUERY_AUTOCOMPLETE;<br \/>\nif (*(ccp &#043; 1) &#061;&#061; &#039;r&#039;)             \/\/ \/r\/ \u67e5\u8be2\u7ed3\u679c<br \/>\n    params.flags &#061; LWSFTS_F_QUERY_FILES |<br \/>\n                   LWSFTS_F_QUERY_FILE_LINES |<br \/>\n                   LWSFTS_F_QUERY_QUOTE_LINE;<br \/>\nparams.max_autocomplete &#061; 10;<br \/>\nparams.max_files &#061; 10;<\/p>\n<p>\u7136\u540e\u6267\u884c\u4e00\u6b21\u5b8c\u6574\u7684&#034;\u6253\u5f00\u7d22\u5f15 -&gt; \u641c\u7d22 -&gt; \u5173\u95ed&#034;\u6d41\u7a0b&#xff1a;<\/p>\n<p>jtf &#061; lws_fts_open(vhd-&gt;indexpath);<br \/>\nresult &#061; lws_fts_search(jtf, &amp;params);<br \/>\nlws_fts_close(jtf);<\/p>\n<p>\u641c\u7d22\u7ed3\u679c\u662f\u5206\u914d\u5728 lwsac&#xff08;\u5185\u5b58\u5757\u5206\u914d\u5668&#xff09;\u4e2d\u7684&#xff0c;\u4ece result-&gt;autocomplete_head \u4e0e result-&gt;filepath_head \u62ff\u5230\u4e24\u6761\u94fe\u8868\u5934&#xff0c;\u4e4b\u540e\u5728 LWS_CALLBACK_HTTP_WRITEABLE \u4e2d\u5206\u591a\u6b21\u3001\u6309 2KB \u7f13\u51b2\u6d41\u5f0f\u5e8f\u5217\u5316\u4e3a JSON \u8fd4\u56de\u7ed9\u524d\u7aef\u3002\u641c\u7d22\u7ed3\u675f\u540e\u7528 lwsac_free \u91ca\u653e\u7ed3\u679c\u5185\u5b58&#xff08;LWS_CALLBACK_CLOSED_HTTP \u5206\u652f&#xff09;\u3002<\/p>\n<p>3. JSON \u8f93\u51fa\u683c\u5f0f<\/p>\n<p>\u81ea\u52a8\u8865\u5168\u9879\u8f93\u51fa {&#034;ac&#034;: &#034;&#8230;&#034;, &#034;matches&#034;: N, &#034;agg&#034;: N, &#034;elided&#034;: N}&#xff0c;\u5176\u4e2d agg \u662f\u8be5\u524d\u7f00\u8def\u5f84\u4e0b\u6240\u6709\u540e\u4ee3\u547d\u4e2d\u7684\u805a\u5408\u6570&#xff0c;\u7528\u4e8e\u6392\u5e8f&#034;\u6700\u53ef\u80fd\u7ed3\u679c&#034;&#xff1b;\u6587\u4ef6\u547d\u4e2d\u9879\u8f93\u51fa {&#034;path&#034;: &#034;&#8230;&#034;, &#034;matches&#034;: N, &#034;origlines&#034;: N, &#034;hits&#034;: [{&#034;l&#034;: \u884c\u53f7, &#034;o&#034;: \u884c\u8d77\u59cb\u504f\u79fb, &#034;s&#034;: &#034;\u547d\u4e2d\u884c\u539f\u6587&#034;}]}\u3002<\/p>\n<p>\u82e5\u7d22\u5f15\u6587\u4ef6\u6253\u4e0d\u5f00&#xff0c;\u5219\u8f93\u51fa {&#034;indexed&#034;: 0, &#8230;}&#xff0c;\u524d\u7aef\u636e\u6b64\u663e\u793a&#034;\u6ca1\u6709\u7d22\u5f15&#034;\u7684\u63d0\u793a&#xff1b;\u7d22\u5f15\u6784\u5efa\u4e2d\u5219\u7531 JS \u8f6e\u8be2\u5e76\u5c55\u793a\u8fdb\u5ea6\u6761\u3002<\/p>\n<h3>FTS \u516c\u5171 API \u4e0e\u67e5\u8be2\u9009\u9879<\/h3>\n<p>libwebsockets \u7684\u5168\u6587\u641c\u7d22\u63a5\u53e3\u96c6\u4e2d\u5728 include\/libwebsockets\/lws-fts.h&#xff0c;\u5206\u4e3a\u7d22\u5f15\u521b\u5efa\u4e0e\u7d22\u5f15\u641c\u7d22\u4e24\u7ec4&#xff1a;<\/p>\n<p>\u7d22\u5f15\u521b\u5efa\u4fa7&#xff08;\u5199\u7d22\u5f15&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u51fd\u6570\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>lws_fts_create(int fd)<\/td>\n<td>\u521d\u59cb\u5316\u65b0\u7d22\u5f15\u6587\u4ef6&#xff0c;\u8fd4\u56de struct lws_fts *<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_file_index(t, filepath, len, priority)<\/td>\n<td>\u4e3a\u6bcf\u4e2a\u8f93\u5165\u6587\u4ef6\u767b\u8bb0 filepath&#xff0c;\u8fd4\u56de\u5176\u5e8f\u53f7<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_fill(t, file_index, buf, len)<\/td>\n<td>\u9010\u7f13\u51b2\u5757\u7d22\u5f15\u8f93\u5165\u6587\u4ef6\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_serialize(t)<\/td>\n<td>\u5c06\u6240\u6709\u8f93\u5165\u5904\u7406\u5b8c\u540e&#xff0c;\u628a\u5185\u5b58 trie \u5e8f\u5217\u5316\u5199\u5165\u7d22\u5f15\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_destroy(&amp;trie)<\/td>\n<td>\u7ed3\u675f\u5199\u5165\u5e76\u91ca\u653e\u5185\u5b58 trie<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7d22\u5f15\u641c\u7d22\u4fa7&#xff08;\u8bfb\u7d22\u5f15&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u51fd\u6570\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>lws_fts_open(filepath)<\/td>\n<td>\u6253\u5f00\u73b0\u6709\u7d22\u5f15\u6587\u4ef6&#xff0c;\u8fd4\u56de struct lws_fts_file *&#xff0c;\u5931\u8d25\u8fd4\u56de NULL<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_search(jtf, &amp;params)<\/td>\n<td>\u6267\u884c\u641c\u7d22&#xff0c;\u7ed3\u679c\u5206\u914d\u5728 params.results_head \u6307\u5411\u7684 lwsac \u4e2d<\/td>\n<\/tr>\n<tr>\n<td>lws_fts_close(jtf)<\/td>\n<td>\u5173\u95ed\u7d22\u5f15\u6587\u4ef6\u5e76\u91ca\u653e\u76f8\u5173\u5206\u914d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u67e5\u8be2\u6807\u5fd7&#xff08;params.flags \u7ec4\u5408&#xff09;&#xff1a;<\/p>\n<p>#define LWSFTS_F_QUERY_AUTOCOMPLETE   (1 &lt;&lt; 0)  \/\/ \u8fd4\u56de\u81ea\u52a8\u8865\u5168\u5efa\u8bae<br \/>\n#define LWSFTS_F_QUERY_FILES          (1 &lt;&lt; 1)  \/\/ \u8fd4\u56de\u547d\u4e2d\u6587\u4ef6\u5217\u8868<br \/>\n#define LWSFTS_F_QUERY_FILE_LINES     (1 &lt;&lt; 2)  \/\/ \u6bcf\u4e2a\u6587\u4ef6\u9644\u5e26\u884c\u53f7&#043;\u884c\u8d77\u59cb\u504f\u79fb<br \/>\n#define LWSFTS_F_QUERY_QUOTE_LINE     (1 &lt;&lt; 3)  \/\/ \u989d\u5916\u9644\u5e26\u547d\u4e2d\u884c\u539f\u6587&#xff08;\u6700\u591a255\u5b57\u7b26&#xff09;<\/p>\n<p>struct lws_fts_search_params \u5173\u952e\u6210\u5458&#xff1a;needle&#xff08;\u68c0\u7d22\u8bcd&#xff09;\u3001only_filepath&#xff08;\u9650\u5b9a\u5355\u6587\u4ef6\u68c0\u7d22&#xff09;\u3001flags\u3001max_autocomplete\u3001max_files\u3001max_lines&#xff08;\u6bcf\u4e2a\u6587\u4ef6\u6700\u591a\u8fd4\u56de\u591a\u5c11\u884c\u7ed3\u679c&#xff09;\u3002<\/p>\n<p>\u4e09\u79cd\u7ed3\u679c\u5f62\u6001\u4e0e\u793a\u4f8b\u7684\u5bf9\u5e94\u5173\u7cfb&#xff1a;\u81ea\u52a8\u8865\u5168&#xff08;\/a\/&#xff09;\u3001\u6587\u4ef6\u5217\u8868&#xff08;\/r\/ \u7684 fp \u6bb5&#xff09;\u3001\u6587\u4ef6&#043;\u884c\u53f7&#043;\u539f\u6587&#xff08;\/r\/ \u7684 hits \u6bb5&#xff09;\u3002\u8c03\u7528\u524d\u5e94\u5c06 params \u6574\u4f53 memset \u4e3a 0&#xff0c;\u907f\u514d\u540e\u7eed\u7248\u672c\u65b0\u589e\u6210\u5458\u5305\u542b\u672a\u77e5\u503c\u3002<\/p>\n<h3>\u7d22\u5f15\u539f\u7406&#xff1a;\u5185\u5b58 trie \u4e0e\u78c1\u76d8\u5e8f\u5217\u5316<\/h3>\n<p>lws FTS \u7684\u6574\u4f53\u8bbe\u8ba1\u5728 third_party\/libwebsockets\/lib\/misc\/fts\/README.md \u4e2d\u6709\u5b8c\u6574\u8bf4\u660e&#xff0c;\u5b9e\u73b0\u4ee3\u7801\u4f4d\u4e8e lib\/misc\/fts\/trie.c \u4e0e lib\/misc\/fts\/trie-fd.c\u3002\u6838\u5fc3\u601d\u8def&#xff1a;<\/p>\n<ul>\n<li>\u626b\u63cf\u4e00\u4e2a\u6216\u591a\u4e2a UTF-8 \u6587\u672c&#034;\u6587\u4ef6&#034;&#xff08;\u53ef\u4ee5\u662f\u7eaf\u5185\u5b58\u6570\u636e&#xff09;&#xff0c;\u4e3a\u6bcf\u4e2a token \u6784\u5efa\u5185\u5b58\u4f18\u5316\u7684 trie&#xff08;\u524d\u7f00\u6811&#xff09;&#xff1b;<\/li>\n<li>\u65e0\u8bba\u8f93\u5165\u6587\u4ef6\u591a\u5c11\u3001\u4f53\u91cf\u591a\u5927&#xff0c;\u6700\u7ec8\u5e8f\u5217\u5316\u4e3a\u5355\u4e00\u7d22\u5f15\u6587\u4ef6&#xff1b;<\/li>\n<li>\u641c\u7d22\u65f6\u53ea\u9700\u8bfb\u5165\u7ed3\u679c\u5185\u5b58&#xff0c;\u901a\u8fc7\u5728\u78c1\u76d8\u7d22\u5f15\u6587\u4ef6\u4e2d\u5feb\u901f seek \u5b8c\u6210\u68c0\u7d22\u4e0e\u81ea\u52a8\u8865\u5168&#xff0c;\u5bf9\u5f31\u6027\u80fd\u8bbe\u5907&#xff08;\u5e26\u968f\u673a\u8bbf\u95ee\u5b58\u50a8&#xff09;\u53cb\u597d\u3002<\/li>\n<\/ul>\n<p>\u5185\u5b58\u4e2d\u7684 trie \u8282\u70b9\u5305\u542b\u5927\u91cf\u989d\u5916\u6307\u9488\u4e0e\u5927\u7c7b\u578b\u5b57\u6bb5&#xff0c;\u800c\u5e8f\u5217\u5316\u540e\u7684\u6587\u4ef6\u5927\u91cf\u91c7\u7528 VLI&#xff08;\u53d8\u957f\u6574\u6570&#xff09; \u7f16\u7801\u6309\u503c\u5927\u5c0f\u4f38\u7f29\u5360\u5b57\u8282&#xff0c;\u56e0\u6b64\u5927\u8bed\u6599\u7684\u5cf0\u503c\u5185\u5b58\u5360\u7528\u8fdc\u9ad8\u4e8e\u6700\u7ec8\u7d22\u5f15\u6587\u4ef6\u4f53\u79ef\u3002\u5e8f\u5217\u5316\u5b8c\u6210\u540e&#xff0c;\u67e5\u8be2\u6210\u672c\u6781\u4f4e&#xff1a;\u5b50\u8282\u70b9\u6309\u5b57\u7b26\u6392\u5e8f\u53ef\u63d0\u524d\u5224\u5b9a&#034;\u65e0\u5339\u914d&#034;&#xff1b;\u6839 trie \u989d\u5916\u9644\u5e26 256 \u9879\u6307\u9488\u8868\u5b9e\u73b0\u4e00\u6b65\u5b9a\u4f4d&#xff08;\u8be5\u8868\u7ea6 2KiB&#xff0c;\u8fc7\u5927\u6545\u4ec5\u6839\u8282\u70b9\u4f7f\u7528&#xff09;\u3002<\/p>\n<p>\u6587\u6863\u8fd8\u7ed9\u51fa\u4e86\u540c\u6761\u4ef6\u4e0b\u7684\u5b9e\u6d4b\u53c2\u8003\u6570\u636e&#xff08;\u6765\u81ea libwebsockets \u9879\u76ee\u6587\u6863&#xff0c;\u975e\u672c\u4ed3\u5e93\u8bc4\u6d4b&#xff09;&#xff1a;\u7d22\u5f15 Linux 4.14 \u5185\u6838\u6e90\u7801\u9ed8\u8ba4\u6587\u4ef6\u5217\u8868\u65f6&#xff0c;52932 \u4e2a\u6587\u4ef6\u3001694MiB \u8bed\u6599&#xff0c;\u7d22\u5f15\u8017\u65f6\u7ea6 50.1s&#xff08;\u7ea6 13.8MB\/s&#xff09;&#xff0c;\u5cf0\u503c\u5206\u914d\u7ea6 78MiB&#xff0c;\u5e8f\u5217\u5316\u8017\u65f6\u7ea6 202ms&#xff0c;trie \u6587\u4ef6\u7ea6 347MiB&#xff1b;\u7d22\u5f15 libwebsockets \u81ea\u8eab main \u5206\u652f&#xff08;489 \u6587\u4ef6\u30013MiB&#xff09;\u65f6&#xff0c;\u7d22\u5f15\u8017\u65f6\u7ea6 123ms&#xff0c;\u5cf0\u503c\u7ea6 3MiB&#xff0c;trie \u6587\u4ef6\u7ea6 1.4MiB\u3002<\/p>\n<h3>\u78c1\u76d8\u7d22\u5f15\u6587\u4ef6\u683c\u5f0f<\/h3>\n<p>lws-fts.index \u9075\u5faa\u56fa\u5b9a\u5e03\u5c40&#xff08;\u8be6\u89c1 lib\/misc\/fts\/README.md \u7684 &#034;Structure on disk&#034; \u4e00\u8282&#xff09;&#xff1a;<\/p>\n<li>\u6587\u4ef6\u5934&#xff08;16 \u5b57\u8282\u5b9a\u957f&#xff09;&#xff1a;Magic 0xCA7A5F75\u3001\u6839 trie \u6761\u76ee fileoffset\u3001\u521b\u5efa\u65f6 trie \u6587\u4ef6\u5927\u5c0f&#xff08;\u7528\u4e8e\u68c0\u6d4b\u622a\u65ad&#xff09;\u3001filepath map \u7684 fileoffset\u3001filepath \u6570\u91cf&#xff1b;<\/li>\n<li>Filepath \u884c\u8868&#xff1a;\u6bcf\u6587\u4ef6\u6309\u5757\u8bb0\u5f55\u5404\u884c\u5b57\u8282\u957f\u5ea6&#xff0c;\u5757\u5934 8 \u5b57\u8282&#xff08;\u672c\u5757\u957f\u5ea6\u3001\u8986\u76d6\u884c\u6570\u3001\u8986\u76d6\u8f93\u5165\u5b57\u8282\u6570&#xff09;&#xff0c;\u672b\u5c3e\u5168\u96f6\u5757\u6807\u8bb0\u7ed3\u675f&#xff0c;\u652f\u6301\u5feb\u901f\u8df3\u8dc3\u5b9a\u4f4d\u903b\u8f91\u884c\u53f7&#xff1b;<\/li>\n<li>Filepaths&#xff1a;\u6bcf\u4e2a\u6587\u4ef6\u4e00\u6761\u8bb0\u5f55&#xff08;\u884c\u8868\u8d77\u59cb\u504f\u79fb\u3001\u603b\u884c\u6570\u3001\u6587\u4ef6\u540d\u5b57\u8282\u957f\u5ea6\u3001\u6587\u4ef6\u540d\u5b57\u7b26\u4e32&#xff09;&#xff1b;<\/li>\n<li>Filepath map&#xff1a;\u6bcf\u6587\u4ef6\u4e00\u4e2a 32-bit \u504f\u79fb\u8868&#xff0c;\u7528\u4e8e\u628a\u6587\u4ef6\u5e8f\u53f7\u5feb\u901f\u8f6c\u6362\u4e3a\u6587\u4ef6\u4fe1\u606f&#xff1b;<\/li>\n<li>Trie \u6761\u76ee&#xff1a;\u6761\u76ee\u5934\u542b&#034;\u9996\u5b9e\u4f8b\u6587\u4ef6\u8868\u504f\u79fb\u3001\u5b50\u6761\u76ee\u6570\u3001\u5b9e\u4f8b\u6570&#034;\u4e09\u4e2a VLI&#xff0c;\u5176\u540e\u662f\u8be5\u6761\u76ee\u7684\u6587\u4ef6\u5b9e\u4f8b\u8868&#xff08;\u4e0b\u4e00\u5b9e\u4f8b\u6587\u4ef6\u504f\u79fb\u3001filepath \u5e8f\u53f7\u3001\u884c\u53f7\u5b9e\u4f8b\u6570&#xff09;\u3001\u5347\u5e8f\u884c\u53f7\u8868\u3001\u5b50\u8868&#xff08;\u5b50\u504f\u79fb\u3001\u76f4\u63a5\u5b9e\u4f8b\u6570\u3001\u540e\u4ee3\u805a\u5408\u5b9e\u4f8b\u6570\u3001\u540e\u4ee3\u805a\u5408\u5b50\u6570\u3001\u5339\u914d\u4e32\u957f\u5ea6\u3001\u5339\u914d\u4e32&#xff09;\u3002<\/li>\n<p>\u9664\u5c11\u6570\u9700\u4e8b\u540e\u56de\u586b\u7684\u6570\u5b57\u5916&#xff0c;\u5168\u90e8\u4f7f\u7528 VLI \u7f16\u7801&#xff0c;\u591a\u5b57\u8282\u6570\u5b57\u6309\u7f51\u7edc\u5b57\u8282\u5e8f&#xff08;MSB first&#xff09;\u3002VLI \u89c4\u5219&#xff1a;\u5b57\u8282\u6700\u9ad8\u4f4d\u4e3a EON \u6807\u5fd7&#xff0c;0 \u8868\u793a\u6570\u636e\u7ed3\u675f\u3001\u4f4e 7 \u4f4d\u5373\u6570\u503c&#xff1b;1 \u8868\u793a\u540e\u7eed\u5b57\u8282\u4e3a\u66f4\u9ad8\u4f4d\u3002\u4f8b\u5982 0x30 &#061; 48\u30010x81 0x30 &#061; 176\u30010x81 0x80 0x00 &#061; 16384\u3002\u7531\u4e8e\u884c\u53f7\u901a\u5e38\u5c0f\u4e8e 16K&#xff08;2 \u5b57\u8282\u5373\u53ef\u8868\u793a&#xff09;&#xff0c;\u8fd9\u79cd\u7f16\u7801\u5bf9\u884c\u53f7\u7c7b\u5c0f\u6570\u503c\u6781\u5176\u7d27\u51d1\u3002<\/p>\n<h3>\u672c\u793a\u4f8b\u5728\u4ed3\u5e93\u4e2d\u7684\u5b9a\u4f4d<\/h3>\n<p>libwebsockets \u4ee5 submodule\/third_party \u5f62\u5f0f\u968f\u672c\u4ed3\u5e93\u63d0\u4f9b&#xff08;\u89c1 third_party\/BUILD.gn \u7b49\u6784\u5efa\u5165\u53e3&#xff09;&#xff0c;\u672c\u793a\u4f8b\u5c5e\u4e8e\u5176 minimal-examples \u4e2d\u7684 http-server \u6f14\u793a\u96c6\u5408&#xff0c;\u662f FTS \u529f\u80fd\u7684\u5b98\u65b9\u6700\u5c0f\u53ef\u8fd0\u884c\u5c55\u793a\u3002\u5b83\u7684\u4ef7\u503c\u5728\u4e8e&#xff1a;\u5b8c\u6574\u7684\u6784\u5efa\u914d\u7f6e\u3001\u9884\u751f\u6210\u7684 lws-fts.index\u3001\u53ef\u79bb\u7ebf\u8fd0\u884c\u7684\u8bed\u6599\u4e0e\u524d\u7aef&#xff0c;\u8ba9\u5f00\u53d1\u8005\u65e0\u9700\u4efb\u4f55\u989d\u5916\u6570\u636e\u5373\u53ef\u4f53\u9a8c\u5e76\u7406\u89e3 libwebsockets \u5168\u6587\u641c\u7d22\u7684\u5b8c\u6574\u5de5\u4f5c\u94fe\u8def\u3002\u4ece plugins\/protocol_fulltext_demo.c \u5934\u90e8\u6ce8\u91ca\u53ef\u4ee5\u770b\u51fa&#xff0c;\u8be5\u63d2\u4ef6\u4ee5 Public Domain&#xff08;CC0&#xff09;\u8bb8\u53ef\u63d0\u4f9b&#xff0c;\u660e\u786e&#034;\u610f\u5728\u8ba9\u4f60\u6539\u7f16\u8fdb\u81ea\u5df1\u7684&#xff08;\u53ef\u80fd\u4e13\u6709\u7684&#xff09;\u4ee3\u7801&#034;&#xff0c;\u662f\u5b66\u4e60\u4e0e\u590d\u7528\u7684\u76f4\u63a5\u6a21\u677f\u3002<\/p>\n<p>\u82e5\u8981\u5728\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\u590d\u7528&#xff0c;\u53c2\u8003\u8def\u5f84\u662f&#xff1a;\u7528 lws_fts_create\/lws_fts_file_index\/lws_fts_fill\/lws_fts_serialize \u5efa\u7acb\u7d22\u5f15\u6587\u4ef6&#xff0c;\u518d\u5728 HTTP \u534f\u8bae\u56de\u8c03\u4e2d\u7528 lws_fts_open\/lws_fts_search\/lws_fts_close \u54cd\u5e94\u641c\u7d22\u8bf7\u6c42&#xff0c;\u6700\u540e\u7528 lwsac_free \u91ca\u653e\u7ed3\u679c\u2014\u2014\u8fd9\u6b63\u662f\u672c\u793a\u4f8b\u7528 200 \u4f59\u884c C \u4ee3\u7801\u6f14\u793a\u7684\u5b8c\u6574\u95ed\u73af\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012064924-6acc82f4b71f1.svg\" alt=\"\" width=\"16\" height=\"16\" \/> <span class=\"gcb-like-text\">\u8d5e<\/span>  <\/p>\n<p>   <span class=\"gcb-share-text\">\u5206\u4eab<\/span>  <\/p>\n<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><\/li>\n<li><span class=\"gcb-tag\">AI Agent<\/span><\/li>\n<li><span class=\"gcb-tag\">\u591a\u6a21\u6001<\/span><\/li>\n<li><span class=\"gcb-tag\">\u8bed\u97f3<\/span><\/li>\n<li><span class=\"gcb-tag\">AI \u5e94\u7528<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011ten-framework<\/h3>\n<p class=\"gcb-project-desc\"> Open-source framework for conversational voice AI agents<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/TEN-framework\/ten-framework<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<h4 class=\"gcb-related-title\">\u76f8\u5173\u63a8\u8350<\/h4>\n<ul class=\"gcb-related-list\">\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">\u57fa\u4e8e libwebsockets \u6784\u5efa\u6700\u5c0f HTTP \u670d\u52a1\u5668&#xff1a;minimal-http-server \u793a\u4f8b\u5168\u89e3\u6790&#xff08;TEN-framework \u96c6\u6210\u89c6\u89d2&#xff09;<\/h5>\n<p class=\"gcb-related-item-desc\">\u57fa\u4e8e libwebsockets \u6784\u5efa\u6700\u5c0f HTTP \u670d\u52a1\u5668&#xff1a;minimal http server \u793a\u4f8b\u5168\u89e3\u6790&#xff08;TEN framework \u96c6\u6210\u89c6\u89d2&#xff09; \u5bfc\u8bfb <\/p>\n<p>     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">AI Agent<\/span><br \/>\n     <span class=\"gcb-tag\">\u591a\u6a21\u6001<\/span><br \/>\n     <span class=\"gcb-tag\">\u8bed\u97f3<\/span><br \/>\n     <span class=\"gcb-tag\">AI \u5e94\u7528<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">libwebsockets \u591a vhost HTTP \u670d\u52a1\u5668\u5b9e\u6218&#xff1a;\u57fa\u4e8e Host \u5934\u8def\u7531\u7684 minimal-http-server-multivhost \u6df1\u5ea6\u89e3\u6790<\/h5>\n<p class=\"gcb-related-item-desc\">libwebsockets \u591a vhost HTTP \u670d\u52a1\u5668\u5b9e\u6218&#xff1a;\u57fa\u4e8e Host \u5934\u8def\u7531\u7684 minimal http server multivhost \u6df1\u5ea6\u89e3<\/p>\n<p>     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">AI Agent<\/span><br \/>\n     <span class=\"gcb-tag\">\u591a\u6a21\u6001<\/span><br \/>\n     <span class=\"gcb-tag\">\u8bed\u97f3<\/span><br \/>\n     <span class=\"gcb-tag\">AI \u5e94\u7528<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">\u57fa\u4e8e libwebsockets \u7684\u6700\u5c0f\u5316 HTTPS \u670d\u52a1\u5668&#xff1a;minimal-http-server-tls \u5b9e\u6218\u4e0e\u6e90\u7801\u89e3\u6790<\/h5>\n<p class=\"gcb-related-item-desc\">\u57fa\u4e8e libwebsockets \u7684\u6700\u5c0f\u5316 HTTPS \u670d\u52a1\u5668&#xff1a;minimal http server tls \u5b9e\u6218\u4e0e\u6e90\u7801\u89e3\u6790 \u672c\u6307\u5357\u4ee5 TEN framewo<\/p>\n<p>     <span class=\"gcb-tag\">\u4eba\u5de5\u667a\u80fd<\/span><br \/>\n     <span class=\"gcb-tag\">AI Agent<\/span><br \/>\n     <span class=\"gcb-tag\">\u591a\u6a21\u6001<\/span><br \/>\n     <span class=\"gcb-tag\">\u8bed\u97f3<\/span><br \/>\n     <span class=\"gcb-tag\">AI \u5e94\u7528<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   \u300a\u7ecf\u6d4e\u7814\u7a76\u300bLaTeX\u6a21\u677f\u7ec8\u6781\u6307\u5357&#xff1a;\u4ece\u96f6\u57fa\u7840\u5230\u5b66\u672f\u8fbe\u4eba\u7684\u5b8c\u7f8e\u8715\u53d8 <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n   3\u6b65\u641e\u5b9aSD\u6a21\u578b\u4e0b\u8f7d&#xff1a;\u544a\u522b\u6162\u901f\u548c\u590d\u6742\u914d\u7f6e\u7684\u7ec8\u6781\u65b9\u6848 <\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eba\u5de5\u667a\u80fdAI Agent\u591a\u6a21\u6001\u8bed\u97f3AI \u5e94\u7528 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011ten-framework Open-source framework for conversational voice AI agents \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/TEN-framework\/ten-framework \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d  \u672c\u7bc7\u6307\u5357\u4ee5 libwebsockets \u5b98\u65b9\u6700\u5c0f\u793a\u4f8b minimal-http-server-fulltext-search \u4e3a\u6838\u5fc3<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-115553","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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:\/\/www.wsisp.com\/helps\/115553.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4eba\u5de5\u667a\u80fdAI Agent\u591a\u6a21\u6001\u8bed\u97f3AI \u5e94\u7528 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011ten-framework Open-source framework for conversational voice AI agents \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/TEN-framework\/ten-framework \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d \u672c\u7bc7\u6307\u5357\u4ee5 libwebsockets \u5b98\u65b9\u6700\u5c0f\u793a\u4f8b minimal-http-server-fulltext-search \u4e3a\u6838\u5fc3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115553.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-12T06:49:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012064924-6acc82f4b71f1.svg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115553.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115553.html\",\"name\":\"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-12T06:49:25+00:00\",\"dateModified\":\"2026-10-12T06:49:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115553.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115553.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115553.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/115553.html","og_locale":"zh_CN","og_type":"article","og_title":"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4eba\u5de5\u667a\u80fdAI Agent\u591a\u6a21\u6001\u8bed\u97f3AI \u5e94\u7528 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011ten-framework Open-source framework for conversational voice AI agents \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/TEN-framework\/ten-framework \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d \u672c\u7bc7\u6307\u5357\u4ee5 libwebsockets \u5b98\u65b9\u6700\u5c0f\u793a\u4f8b minimal-http-server-fulltext-search \u4e3a\u6838\u5fc3","og_url":"https:\/\/www.wsisp.com\/helps\/115553.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-12T06:49:25+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012064924-6acc82f4b71f1.svg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115553.html","url":"https:\/\/www.wsisp.com\/helps\/115553.html","name":"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-12T06:49:25+00:00","dateModified":"2026-10-12T06:49:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115553.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115553.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115553.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"libwebsockets \u5168\u6587\u641c\u7d22\uff08FTS\uff09HTTP \u670d\u52a1\u5668\u5b9e\u6218\uff1a\u6784\u5efa\u4e0e\u5256\u6790 minimal-http-server-fulltext-search"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=115553"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115553\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115553"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}