{"id":2784,"date":"2022-05-14T10:33:07","date_gmt":"2022-05-14T02:33:07","guid":{"rendered":"https:\/\/ufqi.com\/blog\/?p=2784"},"modified":"2022-07-25T08:35:55","modified_gmt":"2022-07-25T00:35:55","slug":"gwa2-fuzzy-search","status":"publish","type":"post","link":"https:\/\/ufqi.com\/blog\/gwa2-fuzzy-search\/","title":{"rendered":"GWA2\u5409\u5a03\u5154\ud83d\udc07\u5347\u7ea7\u589e\u52a0\u641c\u7d22\u6a21\u7cca\u8bed\u6cd5\u652f\u6301"},"content":{"rendered":"\n<p>\u4e00\u4e9b\u4e8b\u60c5\u4e00\u65e6\u5f00\u59cb\u5f80\u5f80\u65e0\u6cd5\u4ee5\u81ea\u5df1\u9884\u671f\u7684\u65b9\u5f0f\u7ed3\u675f\u3002<br \/>\u6bd4\u5982\u59cb\u4e8e2022\u5e742\u670824\u65e5\u7684\u4fc4\u7f57\u65af\u4fb5\u7565\u4e4c\u514b\u5170\u7684\u6218\u4e89\uff0c\u5165\u4fb5\u8005\u539f\u8ba1\u5212\u4e09\u5929\u4e4b\u5185\u6253\u57ae\u88ab\u4fb5\u7565\u7684\u4e4c\u514b\u5170\u73b0\u653f\u6743\uff0c\u6ca1\u60f3\u5230\u5feb\u4e09\u4e2a\u6708\u8fc7\u53bb\u4e86\uff0c\u6218\u4e89\u4ecd\u7136\u6ca1\u6709\u7ed3\u675f\u3002\u53cd\u800c\u6218\u4e89\u7684\u5f3a\u5f31\u53cc\u65b9\u5f00\u59cb\u9006\u8f6c\u3002\u987d\u5f3a\u7684\u4e4c\u514b\u5170\u4eba\u6c11\u82f1\u52c7\u62b5\u6297\u7cbe\u795e\u6b63\u5728\u9010\u6e10\u83b7\u5f97\u66f4\u591a\u56fd\u5bb6\u7684\u6b63\u4e49\u652f\u6301\uff08 https:\/\/ufqi.com\/news\/ulongpage.3839.html?tit=\u4e00\u4e2a\u65b0\u7684\u5c0f\u5f3a\u56fd\u6b63\u5728\u6323\u624e\u4e2d\u5d1b\u8d77 \uff09\u3002\u663e\u7136\u5165\u4fb5\u8005\u65e0\u6cd5\u4ee5\u81ea\u5df1\u7684\u9884\u671f\u7684\u65b9\u5f0f\u6765\u7ed3\u675f\u8fd9\u573a\u6218\u4e89\u3002<\/p>\n\n\n\n<p>\u4e0e\u7834\u574f\u4f5c\u6076\u8005\u76f8\u53cd\uff0c\u4e00\u4e9b\u5efa\u8bbe\u8005\u7684\u79ef\u6781\u9879\u76ee\u4e5f\u662f\u4e00\u65e6\u5f00\u59cb\u4e86\uff0c\u5c31\u6301\u7eed\u4e0d\u65ad\u7684\u6539\u8fdb\u3001\u5347\u7ea7\uff0c\u6d88\u706d\u4e00\u4e2a\u53c8\u4e00\u4e2abug\uff0c\u589e\u52a0\u4e00\u5c42\u53c8\u4e00\u5c42\u9632\u62a4\uff0c\u539f\u6765\u4e16\u754c\u53ef\u4ee5\u53d8\u5f97\u66f4\u52a0\u7f8e\u597d\uff0c\u6bd4\u5982GWA2 \u5409\u5a03\u5154\u9879\u76ee\u3002\u6700\u597d\u7684\u7248\u672c\u6c38\u8fdc\u662f\u4e0b\u4e00\u4e2a\u53d1\u884c\u7248\u672c\u3002<\/p>\n\n\n\n<p>GWA2\u5409\u5a03\u5154\u81ea\u4ece2022\u5e742\u6708\u4efd\u8fdb\u884c\u4e86\u591a\u8fdb\u7a0b\u591a\u7ebf\u7a0b\u6539\u8fdb\u5347\u7ea7\u4ee5\u6765\uff08 GWA2 Java \u589e\u52a0\u591a\u7ebf\u7a0b\u6570\u636e\u5171\u4eab\u901a\u9053 globalData\uff0c https:\/\/ufqi.com\/blog\/gwa2-java-multiple-threads-globaldata\/ \uff09\uff0c\u53c8\u9646\u7eed\u8fdb\u884c\u4e86\u4e00\u4e9b\u4f18\u5316\uff0c\u5179\u8bb0\u5f55\u5982\u4e0b\uff0c\u4ee5\u5907\u67e5\u8bbf\u3002<\/p>\n\n\n\n<ol><li><strong>Page Navigator  \u9875\u9762\u6d4f\u89c8\u589e\u52a0\u5bf9\u6a21\u7cca\u641c\u7d22\u7684\u652f\u6301<br \/><\/strong>Page Navigator \u9875\u9762\u6d4f\u89c8\u6a21\u5757\u662f\u6240\u6709\u7f51\u7edc\u5e94\u7528\u5f00\u53d1\u4e2d\u6700\u9ad8\u9891\u4f7f\u7528\u7684\u529f\u80fd\u4e4b\u4e00\u3002\u6211\u4eec\u4e5f\u5bf9\u6b64\u8fdb\u884c\u4e86\u8fdb\u884c\u8bbe\u8ba1\u548c\u4ee3\u7801\u5b9e\u73b0\u3002\u968f\u7740\u591a\u5e74\u6765\u5927\u91cf\u7684\u8f6f\u4ef6\u5de5\u7a0b\u9879\u76ee\u5b9e\u8df5\uff0c\u6211\u4eec\u9646\u7eed\u5f00\u53d1\u4e86\u72ec\u6709\u7684 PNSK \u548c OPPKNSK \u529f\u80fd\u8bbe\u8ba1\uff0c\u5b9e\u73b0\u4e86\u4ece\u6d4f\u89c8\u5668\u53c2\u6570\u8bbe\u7f6e\u5230\u6570\u636e\u5e93SQL\u67e5\u8be2\u8bed\u53e5\u7ec4\u88c5\u7684\u5168\u6d41\u7a0b\u652f\u6301\u3002<\/li><\/ol>\n\n\n\n<p>PNSK , Page Navigator Search Key, \u9875\u9762\u6d4f\u89c8\u641c\u7d22\u5173\u952e\u8bcd\uff0c<br \/>OPPNSK, Operator of Page Navigator Search Key. \u9875\u9762\u6d4f\u89c8\u641c\u7d22\u5173\u952e\u8bcd\u7684\u64cd\u4f5c\u7b26.<\/p>\n\n\n\n<p>\u7ed9\u5b9a\u9875\u9762\u8bf7\u6c42\u53c2\u6570\u5982\uff0c&amp;pnskfielda=abc&amp;oppnskfielda=contains ,<br \/>\u5c06\u901a\u8fc7 PageNavi \u7ec4\u88c5\u6210\u5982\u4e0b\u6570\u636e\u5e93SQL\u67e5\u8be2\u8bed\u53e5\uff1a<br \/>&#8230;. and fielda like &#8216;%abc%&#8217; &#8230;<\/p>\n\n\n\n<p>\u8fd9\u6b21\u6539\u8fdb\u5347\u7ea7\u7684\u5305\u62ec\uff0c\u5982\u679c\u7ed9\u5b9a\u9875\u9762\u8bf7\u6c42\u53c2\u6570\u4e2d\u5305\u62ec\u4e86\u7a7a\u683c\u6216\u8005\u95ee\u53f7?\/\uff1f\u7b49\u6a21\u7cca\u67e5\u8be2\u7684\u641c\u7d22\u8bed\u6cd5\u65f6\uff0cPageNavi \u80fd\u591f\u8bc6\u522b\u8fd9\u79cd\u8bed\u6cd5\u5e76\u505a\u8fdb\u4e00\u6b65\u7684\u5904\u7406\uff0c\u4f7f\u4e4b\u80fd\u591f\u8f6c\u5316\u4e3a\u76f8\u5e94\u7684\u6570\u636e\u5e93SQL\u67e5\u8be2\u8bed\u53e5\u3002<\/p>\n\n\n\n<p> \u7ed9\u5b9a\u9875\u9762\u8bf7\u6c42\u53c2\u6570\u5982\uff0c&amp;pnskfielda=abc%20efg&amp;oppnskfielda=contains ,<br \/>\u5c06\u901a\u8fc7 PageNavi \uff0c\u589e\u52a0\u5bf9\u6a21\u7cca\u67e5\u8be2\u7684\u652f\u6301\uff0c\u7ec4\u88c5\u6210\u5982\u4e0b\u6570\u636e\u5e93SQL\u67e5\u8be2\u8bed\u53e5\uff1a<br \/>&#8230;. and fielda like &#8216;%abc%efg%&#8217; &#8230;<\/p>\n\n\n\n<p> \u5bf9\u6a21\u7cca\u67e5\u8be2\u8bed\u6cd5\u7684\u652f\u6301\uff0c\u6700\u65e9\u7684\u60f3\u6cd5\u548c\u5b9e\u73b0\u662f\u5728 gMIS\u5409\u5bc6\u65af\u7684\u6539\u8fdb\u5347\u7ea7\u4e2d\uff0c\u5f53\u521d\u7684\u5199\u6cd5\u4e3a\uff1a<br \/>$gtbl-&gt;set($field, &#8220;%&#8221;.str_replace(&#8216; &#8216;,&#8217;%&#8217;,$v).&#8221;%&#8221;);<\/p>\n\n\n\n<p>\u6539\u8fdb\u540e\u7684\u5199\u6cd5\u5c06\u4f7f\u7528 _parseBlank \u6765\u7edf\u4e00\u66ff\u4ee3\uff1a<br \/>$v = $this-&gt;_parseBlank($fieldopv, $v);<\/p>\n\n\n\n<p>\u5728\u65b0\u589e\u52a0\u7684 _parseBlank \u4e2d\u7ea6\u675f\u4e86\u76ee\u524d\u53ea\u9488\u5bf9 contains \u548c notcontains \u8fd9\u8fde\u4e2a oppnsk \u8fdb\u884c\u5982\u4e0a\u64cd\u4f5c\uff0c\u540c\u65f6\u4e5f\u901a\u8fc7\u5168\u5c40\u914d\u7f6e\u5f00\u5173 GWA2_Is_Parse_Blank \u8fdb\u884c\u63a7\u5236\uff0c\u53ef\u4ee5\u5bf9\u8be5\u529f\u80fd\u8fdb\u884c\u505c\u7528\u3002<\/p>\n\n\n\n<p>\u9664\u4e86 gMIS\u5409\u5bc6\u65af\u4e4b\u5916\uff0c\u8fd9\u9879\u5347\u7ea7\u6539\u8fdb\uff0c\u5c06\u9646\u7eed\u5e94\u7528\u5728 UfqiWork\u6709\u798f\u5de5\u574a \u548c UfqiFina\u6709\u798f\u91d1\u878d \u7684\u641c\u7d22\u529f\u80fd\u6a21\u5757\u4e2d\u3002<\/p>\n\n\n\n<ol><li><strong>\u589e\u52a0\u5bf9\u4f20\u7edf Base64 \u7f16\u89e3\u7801\u7684\u5c01\u88c5<\/strong><\/li><\/ol>\n\n\n\n<p>\u4f5c\u4e3a\u7f16\u89e3\u7801\u7684\u8f85\u52a9\u8bbe\u65bd\uff0c\u5728 GWA2\u5409\u5a03\u5154\u7684\u8bbe\u8ba1\u4e2d\uff0c\u9ed8\u8ba4\u7684\u5de5\u5177\u662f Base62x, \u5979\u6bd4\u539f\u751f\u7684 Base64 \u6709\u66f4\u597d\u7684\u9002\u5e94\u6027\uff08 https:\/\/ufqi.com\/dev\/base62x \uff09\u3002\u7531\u4e8e Base62x \u63a8\u51fa\u65f6\u95f4\u8f83\u65b0\uff0c\u5728GWA2\u5409\u5a03\u5154\u5f00\u53d1\u7684\u7f51\u7edc\u5e94\u7528\u4e2d\uff0c\u51fa\u4e8e\u5bf9\u63a5\u5176\u4ed6\u8001\u65e7\u7cfb\u7edf\u7684\u9700\u8981\uff0c\u4ecd\u9700\u8981\u517c\u5bb9\u4f20\u7edf Base64 \u7684\u7f16\u89e3\u7801\u5904\u7406\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u6539\u8fdb\u4e86 inc\/Zeea.class, \u589e\u52a0\u4e86\u76f8\u5e94\u7684\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p>inc\/Zeea.base64Encode \u548c inc\/Zeea.base64Decode<\/p>\n\n\n\n<p>\u6bd4\u5982\uff0c\u6211\u4eec\u5728\u65b0\u8fd1\u7684\u4e00\u4e2a\u9879\u76ee\u4e2d\u9700\u8981\u5bf9\u63a5 Aliyun\u963f\u91cc\u4e91\u7684\u4e00\u4e2a\u5728\u7ebf\u670d\u52a1\uff0c\u5176\u4e2d\u7684API\u63a5\u53e3\u4e2d\uff0c\u9700\u8981\u5c01\u88c5\u53c2\u6570\uff0c\u4e3a\u5b89\u5168\u8d77\u89c1\uff0c\u5728API\u63a5\u53e3\u8bf7\u6c42\u53c2\u6570\u65f6\uff0c\u4f7f\u7528 URLEncode\u5bf9\u53c2\u6570\u8fdb\u884c\u7f16\u89e3\u7801\uff0c\u5176\u4e2d\u7684\u4e0d\u5b89\u5168\u5b57\u7b26\u9700\u8981\u505a\u66ff\u6362\u5904\u7406\uff1a<\/p>\n\n\n\n<p>private String specialUrlEncode(Object value) throws Exception {<br \/>return java.net.URLEncoder.encode((String)value, &#8220;UTF-8&#8221;)<br \/>.replace(&#8220;+&#8221;, &#8220;%20&#8221;)<br \/>.replace(&#8220;*&#8221;, &#8220;%2A&#8221;)<br \/>.replace(&#8220;%7E&#8221;, &#8220;~&#8221;);<br \/>}<\/p>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u8f83\u65b0\u7684 Base62x \u6765\u8fdb\u884c URLEncode\u7684\u8bdd\uff0c\u5219\u4e0d\u5fc5\u5982\u6b64\u7e41\u7410\u5730\u8fdb\u884c\u591a\u4e2a\u4e0d\u5b89\u5168\u5b57\u7b26\u7684\u66ff\u6362 ( https:\/\/www.researchgate.net\/publication\/307786166_Uniform_Resource_Identifier_Encoded_by_Base62x )\u3002 \u56e0\u6b64\uff0c\u5021\u8bae\u66f4\u591a\u7684\u5f00\u53d1\u8005\u5728\u9762\u5411\u672a\u6765\u7684\u7f51\u7edc\u5e94\u7528\u5f00\u53d1\u4e2d\uff0c\u5168\u9762\u4f7f\u7528 Base62x \u53d6\u4ee3\u4f20\u7edf\u7684 Base64 .<\/p>\n\n\n\n<ol><li><strong>\u589e\u52a0\u5bf9JSON\/CSV\u683c\u5f0f\u6570\u636e\u7684\u8f6c\u6362\u5904\u7406<\/strong><\/li><\/ol>\n\n\n\n<p>GWA2\u5409\u5a03\u5154 \u5728\u6700\u8fd1\u5347\u7ea7\u6539\u8fdb\u4e2d\uff0c\u5728 Hanjst \u6a21\u677f\u5904\u7406\u7684\u670d\u52a1\u5668\u7aef\uff0c\u589e\u52a0\u4e86\u4e24\u4e2a\u5904\u7406\u683c\u5f0f\u6570\u636e\u7684\u65b9\u6cd5\uff0c\u5206\u522b\u662f\u5904\u7406JSON\u6570\u636e\u7684 json2Map \u548c\u5904\u7406CSV\u6570\u636e\u7684 csv2Map . \u8fd9\u4e24\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u65b9\u4fbf\u5bf9\u5916\u5904\u7406\u6570\u636e\u4ea4\u6362\u3002<\/p>\n\n\n\n<p>\u6570\u636e\u8f6c\u6362\u5904\u7406\u80cc\u540e\u7684\u652f\u6301\u7c7b\u5e93\u662f Google Gson . \u76f8\u5e94\u7684\u7c7b\u5e93\u5305\u5df2\u7ecf\u968f\u7740 GWA2\u5409\u5a03\u5154\u6253\u5305\u5728\u4e00\u8d77\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u9996\u53d1\u5730\u5740\uff1a<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/ufqi.com\/naturedns\/search?q=-R\/q2Sa\" target=\"_blank\">-R\/q2Sa<\/a><\/strong> \uff0c https:\/\/ufqi.com\/blog\/gwa2-fuzzy-search\/  \u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"https:\/\/ufqi.com\/blog\/wp-content\/uploads\/2020\/08\/gwa2-logo-202005.v3.png\" alt=\"\" width=\"256\" height=\"256\" \/><figcaption>GWA2\u5409\u5a03\u5154<\/figcaption><\/figure>\n\n\n\n<p><a href=\"https:\/\/ufqi.com\/dev\/gwa2\/\">-GWA2 \u5409\u5a03\u5154<\/a>\u00a0\u662f\u201d\u901a\u7528\u7f51\u7edc\u5e94\u7528\u67b6\u6784( General Web Application Architecture,\u00a0https:\/\/ufqi.com\/dev\/gwa2\/ )\u201d\uff0c\u57fa\u4e8e -GWA2 \u53ef\u4ee5\u8f7b\u4fbf\u6784\u5efa\u5404\u79cd\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f,<br \/>\u5305\u62ec\u590d\u6742\u7684\u5728\u7ebf\u8d2d\u7269\u5546\u57ce\u3001\u5728\u7ebf\u533b\u7597\u3001\u5728\u7ebf\u6559\u80b2\u3001 \u65c5\u6e38\u4ea4\u6613\u5e73\u53f0\u3001\u793e\u7fa4\u6216\u8005\u793e\u4ea4\u7f51\u7ad9\u548c\u65b0\u95fb\u8d44\u8baf\u7f51\u7ad9\u7b49\uff0c<br \/>\u4e5f\u5305\u62ec\u5404\u79cd\u4f01\u4e8b\u4e1a\u5355\u4f4d\u7f51\u4e0a\u95e8\u6237\uff0c\u5728\u7ebf\u4ea4\u4e92\u53ca\u670d\u52a1\u4f5c\u4e1a\u7cfb\u7edf\u7b49.<br \/>\u8fd8\u53ef\u4ee5\u5305\u62ec\u4e3aNativeApp\u505a\u670d\u52a1\u5668\u7aef\u652f\u6301, \u751a\u81f3\u662fWebApp\u7684\u5168\u90e8.<br \/>-GWA2 \u662f\u4e3a\u6570\u4e0d\u591a\u7684\u652f\u6301\u8de8\u5f00\u53d1\u8bed\u8a00\u7684\u5e94\u7528\u6846\u67b6\uff0c\u76ee\u524d\u652f\u6301 -Java, -PHP, -Perl, -Aspx and -Python .<\/p>\n\n\n\n<p>-GWA2 is a \u201cGeneral Web Application Architecture\u201d and based on -GWA2 developers can easily build a variety of network applications,<br \/>including complex online shopping malls, online medical services, online teaching, travel trading platforms, community or social networking sites and news information sites, etc.<br \/>Also the applications include various online portals of enterprises and institutions, online interaction and service operations systems.<br \/>Moreover it contains server-side support for Native App, or even all of the WebApp.<br \/>-GWA2 is one of the web frameworks which provide cross-language support for -Java, -PHP, -Perl, -Aspx and -Python at present.<\/p>\n\n\n\n<p><strong>-GWA2 is E.A.S.Y&nbsp;<\/strong><br \/><strong>Easy Along, Swift Yield<br \/><\/strong>\u8f7b\u677e\u542f\u52a8, \u5feb\u901f\u4ea7\u51fa.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e9b\u4e8b\u60c5\u4e00\u65e6\u5f00\u59cb\u5f80\u5f80\u65e0\u6cd5\u4ee5\u81ea\u5df1\u9884\u671f\u7684\u65b9\u5f0f\u7ed3\u675f\u3002\u6bd4\u5982\u59cb\u4e8e2022\u5e742\u670824\u65e5\u7684\u4fc4\u7f57 &hellip; <a href=\"https:\/\/ufqi.com\/blog\/gwa2-fuzzy-search\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41,42,301,6],"tags":[86,482,481,152,479,480],"_links":{"self":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2784"}],"collection":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/comments?post=2784"}],"version-history":[{"count":8,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2784\/revisions"}],"predecessor-version":[{"id":2841,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2784\/revisions\/2841"}],"wp:attachment":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media?parent=2784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/categories?post=2784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/tags?post=2784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}