{"id":867,"date":"2024-09-08T00:34:55","date_gmt":"2024-09-07T16:34:55","guid":{"rendered":"http:\/\/lingbo.online\/?p=867"},"modified":"2024-09-15T13:26:44","modified_gmt":"2024-09-15T05:26:44","slug":"abstract_factory","status":"publish","type":"post","link":"https:\/\/lingbo.online\/index.php\/software_building\/design-pattern\/abstract_factory\/","title":{"rendered":"[\u8bbe\u8ba1\u6a21\u5f0f]\u62bd\u8c61\u5de5\u5382"},"content":{"rendered":"<h3>\u8bbe\u8ba1\u6a21\u5f0f\u2014\u2014\u62bd\u8c61\u5de5\u5382<\/h3>\n<h4>\u6982\u8ff0<\/h4>\n<p>\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\uff08Abstract Factory Pattern\uff09\u662f\u4e00\u79cd\u521b\u5efa\u578b\u8bbe\u8ba1\u6a21\u5f0f\u3002\u4ed6\u80fd\u521b\u5efa\u4e00\u4e9b\u5217\u76f8\u5173\u7684\u5bf9\u8c61\uff0c\u800c\u65e0\u9700\u6307\u5b9a\u5176\u5177\u4f53\u7c7b\u3002\u901a\u4fd7\u7684\u6765\u8bf4\uff0c\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u56f4\u7ed5\u4e00\u4e2a\u8d85\u7ea7\u5de5\u5382\u521b\u5efa\u5176\u4ed6\u5de5\u5382\u3002\u8be5\u8d85\u7ea7\u5de5\u5382\u53c8\u79f0\u4e3a\u5176\u4ed6\u5de5\u5382\u7684\u5de5\u5382\u3002<\/p>\n<p>\u5728\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u4e2d\uff0c\u63a5\u53e3\u662f\u8d1f\u8d23\u521b\u5efa\u4e00\u4e2a\u76f8\u5173\u5bf9\u8c61\u7684\u5de5\u5382\uff0c\u4e0d\u9700\u8981\u663e\u5f0f\u6307\u5b9a\u5b83\u4eec\u7684\u7c7b\u3002\u6bcf\u4e2a\u751f\u6210\u7684\u5de5\u5382\u90fd\u80fd\u6309\u7167\u5de5\u5382\u6a21\u5f0f\u63d0\u4f9b\u5bf9\u8c61\u3002<\/p>\n<p>\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u63d0\u4f9b\u4e86\u4e00\u79cd\u521b\u5efa\u4e00\u7cfb\u5217\u76f8\u5173\u6216\u76f8\u4e92\u4f9d\u8d56\u5bf9\u8c61\u7684\u63a5\u53e3\uff0c\u800c\u65e0\u9700\u6307\u5b9a\u5177\u4f53\u5b9e\u73b0\u7c7b\u3002\u901a\u8fc7\u4f7f\u7528\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5c06\u5ba2\u6237\u7aef\u4e0e\u5177\u4f53\u4ea7\u54c1\u7684\u521b\u5efa\u8fc7\u7a0b\u89e3\u8026\uff0c\u4f7f\u5f97\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u5de5\u5382\u63a5\u53e3\u6765\u521b\u5efa\u4e00\u65cf\u4ea7\u54c1\u3002<\/p>\n<h4>\u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\u7ed3\u6784<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2024\/09\/1725726801-image-20240907225156431.png\" alt=\"\" \/><\/p>\n<p>\u62bd\u8c61\u5de5\u5382\u7684\u4e3b\u8981\u89d2\u8272\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u62bd\u8c61\u5de5\u5382\uff08Abstract Factory\uff09\uff1a\u58f0\u660e\u4e86\u4e00\u7ec4\u7528\u4e8e\u521b\u5efa\u4ea7\u54c1\u5bf9\u8c61\u7684\u65b9\u6cd5\uff0c\u6bcf\u4e2a\u65b9\u6cd5\u5bf9\u5e94\u4e00\u79cd\u4ea7\u54c1\u7c7b\u578b\u3002\u62bd\u8c61\u5de5\u5382\u53ef\u4ee5\u662f\u63a5\u53e3\u6216\u62bd\u8c61\u7c7b\u3002<\/li>\n<li>\u5177\u4f53\u5de5\u5382\uff08Concrete Factory\uff09\uff1a\u5b9e\u73b0\u4e86\u62bd\u8c61\u5de5\u5382\u63a5\u53e3\uff0c\u8d1f\u8d23\u521b\u5efa\u5177\u4f53\u4ea7\u54c1\u5bf9\u8c61\u7684\u5b9e\u4f8b\u3002<\/li>\n<li>\u62bd\u8c61\u4ea7\u54c1\uff08Abstract Product\uff09\uff1a\u5b9a\u4e49\u4e86\u4e00\u7ec4\u4ea7\u54c1\u5bf9\u8c61\u7684\u5171\u540c\u63a5\u53e3\u6216\u62bd\u8c61\u7c7b\uff0c\u63cf\u8ff0\u4e86\u4ea7\u54c1\u5bf9\u8c61\u7684\u516c\u5171\u65b9\u6cd5\u3002<\/li>\n<li>\u5177\u4f53\u4ea7\u54c1\uff08Concrete Product\uff09\uff1a\u5b9e\u73b0\u4e86\u62bd\u8c61\u4ea7\u54c1\u63a5\u53e3\uff0c\u5b9a\u4e49\u4e86\u5177\u4f53\u4ea7\u54c1\u7684\u7279\u5b9a\u884c\u4e3a\u548c\u5c5e\u6027\u3002<\/li>\n<\/ul>\n<h4>\u62bd\u8c61\u5de5\u5382\u7684\u4f18\u7f3a\u70b9<\/h4>\n<h5>\u4f18\u70b9<\/h5>\n<ul>\n<li>\u786e\u4fdd\u540c\u4e00\u5de5\u5382\u751f\u6210\u7684\u4ea7\u54c1\u76f8\u4e92\u5339\u914d<\/li>\n<li>\u907f\u514d\u5ba2\u6237\u7aef\u548c\u5177\u4f53\u4ea7\u54c1\u4ee3\u7801\u7684\u8026\u5408<\/li>\n<li>\u590d\u5408\u5355\u4e00\u804c\u8d23\u539f\u5219\uff0c\u53ef\u4ee5\u5c06\u4ea7\u54c1\u751f\u6210\u7684\u4ee3\u7801\u62bd\u53d6\u5230\u540c\u4e00\u4f4d\u7f6e\uff0c\u4f7f\u5f97\u4ee3\u7801\u6613\u4e8e\u7ef4\u62a4<\/li>\n<li>\u590d\u5408\u5f00\u95ed\u539f\u5219\uff0c\u5411\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5f15\u5165\u65b0\u4ea7\u54c1\u53d8\u4f53\u65f6\uff0c\u65e0\u9700\u4fee\u6539\u5ba2\u6237\u7aef\u4ee3\u7801<\/li>\n<\/ul>\n<h5>\u7f3a\u70b9<\/h5>\n<ul>\n<li>\u7531\u4e8e\u8be5\u7c7b\u6a21\u5f0f\u9700\u8981\u5411\u5e94\u7528\u4e2d\u5f15\u5165\u5927\u91cf\u63a5\u53e3\u548c\u7c7b\uff0c\u4ee3\u7801\u53ef\u80fd\u4f1a\u6bd4\u4f7f\u7528\u4e4b\u524d\u66f4\u52a0\u590d\u6742<\/li>\n<li>\u62d3\u5c55\u4ea7\u54c1\u65cf\u5f88\u56f0\u96be\uff0c\u589e\u52a0\u4e00\u4e2a\u65b0\u7684\u4ea7\u54c1\u65cf\u9700\u8981\u4fee\u6539\u62bd\u8c61\u5de5\u5382\u548c\u6240\u6709\u5177\u4f53\u5de5\u5382\u7684\u4ee3\u7801<\/li>\n<\/ul>\n<h4>\u5b9e\u73b0\u65b9\u5f0f<\/h4>\n<ul>\n<li>\u4ece\u4e0d\u540c\u7684\u4ea7\u54c1\u7c7b\u578b\u548c\u4ea7\u54c1\u53d8\u4f53\u51fa\u53d1\uff0c\u7ed8\u5236\u7ef4\u5ea6\u77e9\u9635<\/li>\n<li>\u4e3a\u6240\u6709\u4ea7\u54c1\u58f0\u660e\u62bd\u8c61\u4ea7\u54c1\u63a5\u53e3\uff0c\u7136\u540e\u8ba9\u6240\u6709\u7684\u5177\u4f53\u4ea7\u54c1\u5b9e\u73b0\u8fd9\u4e9b\u63a5\u53e3<\/li>\n<li>\u58f0\u660e\u62bd\u8c61\u5de5\u5382\u63a5\u53e3\uff0c\u5e76\u5728\u63a5\u53e3\u4e2d\u4e3a\u6240\u6709\u62bd\u8c61\u4ea7\u54c1\u63d0\u4f9b\u4e00\u7ec4\u6784\u5efa\u65b9\u6cd5<\/li>\n<li>\u4e3a\u6bcf\u79cd\u4ea7\u54c1\u5b9e\u73b0\u4e00\u4e2a\u5177\u4f53\u5de5\u5382\u7c7b<\/li>\n<li>\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5f00\u53d1\u521d\u59cb\u5316\u4ee3\u7801\u3002\u521d\u59cb\u5316\u4ee3\u7801\u6839\u636e\u914d\u7f6e\u6216\u5f53\u524d\u73af\u5883\uff0c\u5bf9\u7279\u5b9a\u5177\u4f53\u5de5\u5382\u7c7b\u8fdb\u884c\u521d\u59cb\u5316\uff0c\u7136\u540e\u5c06\u8be5\u5de5\u5382\u5bf9\u8c61\u4f20\u9012\u7ed9\u6240\u6709\u9700\u8981\u521b\u5efa\u4ea7\u54c1\u7684\u7c7b\u3002<\/li>\n<li>\u627e\u51fa\u4ee3\u7801\u4e2d\u6240\u6709\u5bf9\u4ea7\u54c1\u6784\u9020\u51fd\u6570\u7684\u76f4\u63a5\u8c03\u7528\uff0c\u5c06\u5176\u66ff\u6362\u4e3a\u5bf9\u5de5\u5382\u5bf9\u8c61\u4e2d\u76f8\u5e94\u6784\u5efa\u65b9\u6cd5\u7684\u8c03\u7528<\/li>\n<\/ul>\n<h4>\u9002\u7528\u573a\u666f<\/h4>\n<ul>\n<li>\n<p>\u5982\u679c\u4ee3\u7801\u9700\u8981\u4e0e\u591a\u4e2a\u4e0d\u540c\u7cfb\u5217\u7684\u76f8\u5173\u4ea7\u54c1\u4ea4\u4e92\uff0c\u4f46\u662f\u7531\u4e8e\u65e0\u6cd5\u63d0\u524d\u83b7\u53d6\u76f8\u5173\u4fe1\u606f\uff0c\u6216\u8005\u51fa\u4e8e\u5bf9\u672a\u6765\u6269\u5c55\u6027\u7684\u8003\u8651\uff0c \u4e0d\u5e0c\u671b\u4ee3\u7801\u57fa\u4e8e\u4ea7\u54c1\u7684\u5177\u4f53\u7c7b\u8fdb\u884c\u6784\u5efa\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528\u62bd\u8c61\u5de5\u5382\u3002<\/p>\n<blockquote>\n<p>\u62bd\u8c61\u5de5\u5382\u63d0\u4f9b\u4e86\u7528\u4e8e\u521b\u5efa\u6bcf\u4e2a\u7cfb\u5217\u4ea7\u54c1\u5bf9\u8c61\u7684\u63a5\u53e3\u3002\u4e3b\u8981\u4ee3\u7801\u901a\u8fc7\u8be5\u63a5\u53e3\u521b\u9020\u5bf9\u8c61\uff0c\u5c31\u4e0d\u4f1a\u751f\u6210\u4e0e\u5e94\u7528\u7a0b\u5e8f\u5df2\u751f\u6210\u7684\u4ea7\u54c1\u7c7b\u578b\u4e0d\u4e00\u81f4\u7684\u4ea7\u54c1\u3002<\/p>\n<\/blockquote>\n<\/li>\n<li>\n<p>\u5982\u679c\u6709\u4e00\u4e2a\u57fa\u4e8e\u4e00\u7ec4\u62bd\u8c61\u65b9\u6cd5\u7684\u7c7b\uff0c\u4e14\u5176\u4e3b\u8981\u529f\u80fd\u56e0\u6b64\u53d8\u5f97\u4e0d\u660e\u786e\uff0c\u90a3\u4e48\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u53ef\u4ee5\u4f7f\u7528\u62bd\u8c61\u5de5\u5382\u3002<\/p>\n<blockquote>\n<p>\u5728\u8bbe\u8ba1\u826f\u597d\u7684\u7a0b\u5e8f\u4e2d\uff0c\u6bcf\u4e2a\u7c7b\u4ec5\u8d1f\u8d23\u4e00\u4ef6\u4e8b\u60c5\u3002\u5982\u679c\u4e00\u4e2a\u7c7b\u4e0e\u591a\u79cd\u7c7b\u578b\u4ea7\u54c1\u4ea4\u4e92\uff0c\u5c31\u53ef\u4ee5\u8003\u8651\u5c06\u5de5\u5382\u65b9\u6cd5\u62bd\u53d6\u5230\u72ec\u7acb\u7684\u5de5\u5382\u7c7b\u6216\u5177\u5907\u5b8c\u6574\u529f\u80fd\u7684\u62bd\u8c61\u5de5\u5382\u4e2d<\/p>\n<\/blockquote>\n<\/li>\n<\/ul>\n<h4>\u4ee3\u7801\u6846\u67b6<\/h4>\n<pre><code class=\"language-python\">from __future__ import annotations\nfrom abc import ABC, abstractmethod\n\nclass AbstractFactory(ABC):\n    @abstractmethod\n    def create_product_a(self) -&gt; AbstractProductA:\n        pass\n\n    @abstractmethod\n    def create_product_b(self) -&gt; AbstractProductB:\n        pass\n\nclass ConcreteFactory1(AbstractFactory):\n\n    def create_product_a(self) -&gt; AbstractProductA:\n        return ConcreteProductA1()\n\n    def create_product_b(self) -&gt; AbstractProductB:\n        return ConcreteProductB1()\n\nclass ConcreteFactory2(AbstractFactory):\n\n    def create_product_a(self) -&gt; AbstractProductA:\n        return ConcreteProductA2()\n\n    def create_product_b(self) -&gt; AbstractProductB:\n        return ConcreteProductB2()\n\nclass AbstractProductA(ABC):\n\n    @abstractmethod\n    def useful_function_a(self) -&gt; str:\n        pass\n\nclass ConcreteProductA1(AbstractProductA):\n    def useful_function_a(self) -&gt; str:\n        return &quot;The result of the product A1.&quot;\n\nclass ConcreteProductA2(AbstractProductA):\n    def useful_function_a(self) -&gt; str:\n        return &quot;The result of the product A2.&quot;\n\nclass AbstractProductB(ABC):\n\n    @abstractmethod\n    def useful_function_b(self) -&gt; None:\n        pass\n\n    @abstractmethod\n    def another_useful_function_b(self, collaborator: AbstractProductA) -&gt; None:\n        pass\n\nclass ConcreteProductB1(AbstractProductB):\n    def useful_function_b(self) -&gt; str:\n        return &quot;The result of the product B1.&quot;\n\n    def another_useful_function_b(self, collaborator: AbstractProductA) -&gt; str:\n        result = collaborator.useful_function_a()\n        return f&quot;The result of the B1 collaborating with the ({result})&quot;\n\nclass ConcreteProductB2(AbstractProductB):\n    def useful_function_b(self) -&gt; str:\n        return &quot;The result of the product B2.&quot;\n\n    def another_useful_function_b(self, collaborator: AbstractProductA):\n\n        result = collaborator.useful_function_a()\n        return f&quot;The result of the B2 collaborating with the ({result})&quot;\n\ndef client_code(factory: AbstractFactory) -&gt; None:\n\n    product_a = factory.create_product_a()\n    product_b = factory.create_product_b()\n\n    print(f&quot;{product_b.useful_function_b()}&quot;)\n    print(f&quot;{product_b.another_useful_function_b(product_a)}&quot;, end=&quot;&quot;)\n\nif __name__ == &quot;__main__&quot;:\n\n    print(&quot;Client: Testing client code with the first factory type:&quot;)\n    client_code(ConcreteFactory1())\n\n    print(&quot;\\n&quot;)\n\n    print(&quot;Client: Testing the same client code with the second factory type:&quot;)\n    client_code(ConcreteFactory2())<\/code><\/pre>\n<h4>\u4ee3\u7801\u793a\u4f8b<\/h4>\n<p><em>FactoryProducer<\/em> \u7c7b\u83b7\u53d6 <em>AbstractFactory<\/em> \u5bf9\u8c61\u3002\u5b83\u5c06\u5411 <em>AbstractFactory<\/em> \u4f20\u9012\u5f62\u72b6\u4fe1\u606f <em>Shape<\/em>\uff08<em>CIRCLE \/ RECTANGLE \/ SQUARE<\/em>\uff09\uff0c\u4ee5\u4fbf\u83b7\u53d6\u5b83\u6240\u9700\u5bf9\u8c61\u7684\u7c7b\u578b\u3002\u540c\u65f6\u5b83\u8fd8\u5411 <em>AbstractFactory<\/em> \u4f20\u9012\u989c\u8272\u4fe1\u606f <em>Color<\/em>\uff08<em>RED \/ GREEN \/ BLUE<\/em>\uff09\uff0c\u4ee5\u4fbf\u83b7\u53d6\u5b83\u6240\u9700\u5bf9\u8c61\u7684\u7c7b\u578b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lingbo.online\/wp-content\/uploads\/2024\/09\/1725726802-image-20240908002828820.png\" alt=\"\" \/><\/p>\n<pre><code class=\"language-py\">from __future__ import annotations\nfrom abc import ABC, abstractmethod\n\nclass AbstractFactory(ABC):\n    @abstractmethod\n    def get_shape(self, shape) -&gt; Shape:\n        pass\n\n    @abstractmethod\n    def get_color(self, color) -&gt; Color:\n        pass\n\nclass ShapeFactory(AbstractFactory):\n\n    def get_shape(self, shape) -&gt; Shape:\n        if shape == &quot;Circle&quot;:\n            return Circle()\n        elif shape == &quot;Square&quot;:\n            return Square()\n        elif shape == &quot;Rectangle&quot;:\n            return Rectangle()\n        else:\n            raise NotImplementedError(f&quot; The {shape} has not be implemented&quot;)\n\n    def get_color(self, color) -&gt; str:\n        pass\n\nclass ColorFactory(AbstractFactory):\n\n    def get_shape(self, shape) -&gt; str:\n        pass\n\n    def get_color(self, color) -&gt; Color:\n        if color == &quot;Red&quot;:\n            return Red()\n        elif color == &quot;Green&quot;:\n            return Green()\n        elif color == &quot;Blue&quot;:\n            return Blue()\n        else:\n            raise NotImplementedError(f&quot; The {color} has not be implemented&quot;)\n\nclass Shape(ABC):\n\n    @abstractmethod\n    def draw(self) -&gt; str:\n        pass\n\nclass Circle(Shape):\n    def draw(self) -&gt; str:\n        return &quot;\u753b\u4e86\u4e00\u4e2a\u5706&quot;\n\nclass Square(Shape):\n    def draw(self) -&gt; str:\n        return &quot;\u753b\u4e86\u4e00\u4e2a\u6b63\u65b9\u5f62&quot;\n\nclass Rectangle(Shape):\n    def draw(self) -&gt; str:\n        return &quot;\u753b\u4e86\u4e00\u4e2a\u957f\u65b9\u5f62&quot;\n\nclass Color(ABC):\n\n    @abstractmethod\n    def fill(self) -&gt; None:\n        pass\n\nclass Red(Color):\n    def fill(self) -&gt; str:\n        return &quot;\u586b\u5145\u4e86\u7ea2\u8272&quot;\n\nclass Green(Color):\n    def fill(self) -&gt; str:\n        return &quot;\u586b\u5145\u4e86\u7eff\u8272&quot;\n\nclass Blue(Color):\n    def fill(self) -&gt; str:\n        return &quot;\u586b\u5145\u4e86\u84dd\u8272&quot;\n\nclass FactoryProducer:\n    @classmethod\n    def get_factory(self,choice) -&gt; AbstractFactory:\n        if choice == &quot;shape&quot;:\n            return ShapeFactory()\n        elif choice == &quot;color&quot;:\n            return ColorFactory()\n        else:\n            raise NotImplementedError(f&quot;The {choice} has not be implemented&quot;)\n\nif __name__ == &quot;__main__&quot;:\n    shape_list = [&quot;Circle&quot;, &quot;Rectangle&quot;, &quot;Square&quot;, &quot;Circle&quot;, &quot;Rectangle&quot;]\n    color_list = [&quot;Red&quot;, &quot;Green&quot;, &quot;Blue&quot;, &quot;Blue&quot;, &quot;Green&quot;]\n\n    shape_factory = FactoryProducer.get_factory(&quot;shape&quot;)\n    color_factory = FactoryProducer.get_factory(&quot;color&quot;)\n\n    for shp, col in zip(shape_list, color_list):\n        shape = shape_factory.get_shape(shp)\n        print(shape.draw())\n        color = color_factory.get_color(col)\n        print(color.fill())<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8bbe\u8ba1\u6a21\u5f0f\u2014\u2014\u62bd\u8c61\u5de5\u5382 \u6982\u8ff0 \u62bd\u8c61\u5de5\u5382\u6a21\u5f0f\uff08Abstract Factory Pattern\uff09\u662f\u4e00\u79cd\u521b\u5efa\u578b\u8bbe\u8ba1\u6a21\u5f0f\u3002\u4ed6\u80fd\u521b\u5efa\u4e00\u4e9b\u5217\u76f8 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":878,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[47],"tags":[48],"class_list":["post-867","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-design-pattern","tag-48"],"_links":{"self":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/comments?post=867"}],"version-history":[{"count":1,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/867\/revisions"}],"predecessor-version":[{"id":870,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/posts\/867\/revisions\/870"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/media\/878"}],"wp:attachment":[{"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/media?parent=867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/categories?post=867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lingbo.online\/index.php\/wp-json\/wp\/v2\/tags?post=867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}