A distribution e-commerce front-end page generation method, system, medium and product
By dividing the distribution e-commerce front-end system into a three-layer architecture of core layer, adapter layer and plugin layer, the channel-differentiated logic is decoupled, enabling independent development and rapid iteration of multi-channel pages. This solves the problem of high coupling of page generation logic in a multi-channel environment and improves response efficiency and development efficiency.
Patent Information
- Application Number
- CN202611159440.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-01
- Publication Date
- 2026-11-06
AI Technical Summary
In the front-end system of distribution e-commerce, the page generation logic is highly coupled in a multi-channel environment, which leads to increased development and maintenance costs and makes it difficult to respond independently and quickly to business changes in the channel environment.
The distribution e-commerce front-end system is divided into a three-layer architecture: core layer, adapter layer, and plugin layer. The core layer is responsible for initializing the basic page structure and initiating capability call requests. The adapter layer parses the channel environment identifier and matches the channel environment customized plugins of the plugin layer. The plugin layer loads differentiated business resources and generates a unified standard interface. The core layer integrates the general page skeleton with the channel customized resources, breaks the coupling of channel rendering logic, and achieves plug-in isolation.
It reduces the coupling of page code in multi-channel scenarios, reduces the scope of iterative regression testing and release costs, improves the response efficiency to changes in multi-channel business, and enables on-demand customization and rapid generation of multi-channel pages.
Smart Images

Figure CN123048882A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of front-end development technology, and in particular to a method, system, medium and product for generating front-end pages for distribution e-commerce. Background Technology
[0002] With the rapid development of mobile internet and e-commerce, distribution e-commerce, as a business model that relies on social relationships for product promotion and sales, has been widely adopted. In distribution e-commerce, the same product often needs to be reached and sold through multiple channels, such as WeChat mini-programs, Alipay mini-programs, H5 web pages, independent apps, and various third-party open platforms, to cover a wider user base and improve product exposure and conversion rates. Because different channel environments differ in user identity systems, payment capabilities, UI specifications, marketing activity formats, and data reporting requirements, efficiently generating e-commerce front-end pages that match each channel environment has become a key consideration in the design of distribution e-commerce front-end systems.
[0003] To meet the needs of e-commerce front-end page generation in multi-channel environments, related technologies typically employ a combination of templating and conditional judgment to construct e-commerce front-end pages. Specifically, developers pre-maintain a page template in the front-end project, containing a page skeleton and various business modules. Within the page template, corresponding rendering logic is written for the differentiated business content of different channel environments. When a user initiates a page access through a certain channel environment, the distribution e-commerce front-end system performs conditional branch judgments within the page template based on the channel environment identifier. Based on the judgment results, it selectively renders the corresponding business modules, style resources, and marketing content for that channel environment, thereby assembling an e-commerce front-end page suitable for that channel environment and returning it to the user for display.
[0004] However, since the differentiated business content and rendering logic of each channel environment are all coupled together in the same page template, when a new channel environment needs to be added or the business rules of a certain channel environment need to be adjusted, the developers need to modify the corresponding conditional branch logic within the shared page template. This modification often involves the rendering logic of other existing channel environments in the page template, so that any change to any channel environment requires regression testing and redeployment of the entire page template. This not only causes the maintenance cost of page generation logic to rise sharply with the increase in the number of channel environments, but also makes it difficult to complete the business updates of a single channel environment independently and quickly, thus affecting the response efficiency of the distribution e-commerce front-end system to changes in business in multiple channel environments. Summary of the Invention
[0005] This application provides a method, system, medium, and product for generating front-end pages for distribution e-commerce, which can improve the responsiveness of the front-end of distribution e-commerce to changes in multi-channel business.
[0006] Firstly, this application provides a method for generating a front-end page for a distribution e-commerce platform, applied to a distribution e-commerce front-end system. The distribution e-commerce front-end system includes a core layer, an adapter layer, and a plugin layer. The method includes: after receiving a terminal access request, the core layer initializes a basic page structure based on the terminal access request and generates a capability call request, which is sent to the adapter layer; wherein, the terminal access request refers to an e-commerce front-end page access request initiated by a user through a target channel environment, and the capability call request includes front-end page context information and channel environment access information; the adapter layer parses the capability call request, extracts the channel environment identifier, and matches the corresponding channel environment customized plugin to the plugin layer based on the channel environment identifier; wherein, the channel environment identifier is used to uniquely identify the target channel environment, and the channel environment customized plugin is used to carry the differentiated configuration content of the target channel environment; the plugin layer loads the channel environment customized plugin to the adapter layer; the adapter layer extracts the differentiated business resources from the channel environment customized plugin to generate a unified standard interface; the core layer executes the unified standard interface, integrates the differentiated business resources with the basic page structure, and generates a customized distribution page; wherein, the customized distribution page refers to an e-commerce front-end page adapted to the target channel environment.
[0007] By adopting the above technical solution, the distribution e-commerce front-end system is divided into a three-layer architecture: core layer, adapter layer, and plugin layer. The core layer is responsible for initializing the basic page structure and initiating capability call requests, and decouples the channel differentiation logic into a custom plugin for an independent channel environment. The adapter layer completes the identifier resolution, plugin matching, and unified interface encapsulation of differentiated resources. The core layer then integrates the general page skeleton with the channel-customized resources to generate the corresponding channel page. This breaks the design pattern of coupling multi-channel rendering logic with the same page template in related technologies. It no longer relies on a large number of conditional branches within the template to distinguish channels. Adding or modifying any channel business only requires maintaining the corresponding independent plugin, without changing the shared basic page structure. This reduces the coupling of page code in multi-channel scenarios from the root, significantly reducing the scope of regression testing and release costs for channel iterations. At the same time, after isolating the channel differentiation logic through plugins, the distribution e-commerce front-end system can develop and independently launch the exclusive page capabilities of each channel in parallel, effectively improving the response efficiency of the distribution e-commerce front-end to changes in multi-channel businesses such as WeChat mini-programs, H5, and Apps. This fully realizes the invention's purpose of on-demand customization and lightweight rapid generation of multi-channel pages.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the adapter layer includes a component adaptation module and a business adaptation module, and the unified standard interface includes a unified component call interface and a unified business call interface; the adapter layer extracts differentiated business resources from the channel environment customized plugin to generate a unified standard interface, specifically including: the component adaptation module extracts customized front-end components from the channel environment customized plugin and converts the customized front-end components into a unified component call interface that can be recognized by the core layer; the business adaptation module extracts customized business logic from the channel environment customized plugin and converts the customized business logic into a unified business call interface that can be recognized by the core layer.
[0009] By adopting the above technical solution, channel-differentiated resources are decoupled and adapted according to two dimensions: view components and business logic. This allows the two capability lines of page view rendering and interactive business processing to be independent of each other. The core layer does not need to be aware of the underlying implementation differences of various channel components and business logics. Resource calls can be completed through two unified interfaces. This simplifies the page integration logic of the core layer and allows the component resources and business logic resources of channel-customized plugins to be developed and updated separately. This avoids the situation where changes to a single channel component affect the business logic or vice versa. It further reduces the complexity of maintaining internal resources of the plugin, strengthens the advantages of independent iteration of multiple channels brought about by layered decoupling, and ensures that the development, maintenance, and debugging of views and business logic do not interfere with each other during the process of multi-channel page customization.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the core layer executes a unified standard interface to integrate differentiated business resources with the basic page structure and generate a customized distribution page. Specifically, this includes: when rendering the basic page structure, the core layer replaces the common components in the basic page structure with customized front-end components by triggering a unified component call interface; when responding to user interaction events, the core layer routes the default business logic to customized business logic for processing by triggering a unified business call interface; and outputs a customized distribution page that includes customized front-end components and customized business logic.
[0011] By adopting the above technical solution and relying on two separate standardized interfaces, the two capabilities of page appearance display and click interaction are completely decoupled and isolated, so that the channel interface and business logic can be modified independently without affecting each other, reducing code conflicts and bugs in multiple channels, and ultimately achieving low-cost, independent and rapid iteration of multi-channel pages.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the differentiated business resources corresponding to the channel environment customization plugin include at least customized page resources, customized script resources, customized style resources, customized component resources, and customized capability library resources; the customized page resources are used to carry the front-end page exclusive to the target channel environment; the customized script resources are used to provide the software development kit for the target channel environment; the customized style resources are used to define the interface theme color and font specifications of the target channel environment; the customized component resources are used to provide view components exclusive to the target channel environment; and the customized capability library resources are used to provide the encapsulation of the underlying interactive capabilities corresponding to the target channel environment.
[0013] By adopting the above technical solution, all differentiated front-end resources of each channel are divided into five categories and uniformly encapsulated in independent plugins. This enables the adaptation work of a single channel to be completed within the plugin, and differentiated code is no longer scattered on the basic page. This strengthens the code isolation between the channel and the general platform, reduces the development and maintenance costs of multiple channels, and enables independent and rapid iteration of each channel's page.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after the steps of resolving the capability call request at the adapter layer, extracting the channel environment identifier, and matching the corresponding channel environment customized plugin at the plugin layer based on the channel environment identifier, the method further includes: the adapter layer performing a plugin initialization process; wherein, the plugin initialization process includes preloading the initialization data on which the channel environment customized plugin depends for operation based on the channel environment identifier.
[0015] By adopting the above technical solution, all channel initialization pre-operations are completed in advance before page rendering, solving the page lag problem caused by synchronous loading. At the same time, the channel-specific initialization logic is isolated in the adapter layer, so as not to pollute the core page rendering logic, thus taking into account the design goal of low coupling between page performance and architecture.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, a plugin registry center is pre-configured in the plugin layer; the plugin layer loads channel environment customized plugins to the adapter layer, specifically including: the plugin layer receiving a plugin acquisition request sent by the adapter layer through the plugin registry center; wherein, the plugin acquisition request carries a channel environment identifier; the plugin registry center queries the local plugin mapping table based on the channel environment identifier to determine whether there is a channel environment customized plugin corresponding to the channel environment identifier; if so, the channel environment customized plugin is extracted and loaded into the adapter layer; if not, a dynamic pull request is initiated from the remote plugin repository based on the channel environment identifier to download the channel environment customized plugin, and after the legality verification of the channel environment customized plugin is passed, the channel environment customized plugin is loaded into the adapter layer.
[0017] By adopting the above technical solution, relying on the plugin registration center to achieve a dual loading mode of local caching and remote dynamic retrieval of plugins, it can not only speed up the access speed of mainstream channel pages and reduce the size of the front-end package, but also eliminate the need for a complete version release base when adding new channels. Combined with plugin legality verification to ensure page loading security, it enables low-cost, flexible and rapid expansion and launch of multiple channels.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, a default plugin is pre-installed in the core layer. The default plugin is used to provide basic business resources under a standard channel environment. The method further includes: if the adapter layer does not match the corresponding channel environment customized plugin in the plugin layer according to the channel environment identifier, the adapter layer loads the default plugin in the core layer; the adapter layer extracts the basic business resources in the default plugin to generate a default standard interface, and the core layer executes the default standard interface to generate a standard distribution page.
[0019] By adopting the above technical solution, an exception fallback is achieved through a default plugin with a built-in unified interface specification. When the plugin fails to match, the standard distribution page is automatically rendered to avoid business paralysis. At the same time, there is no need to add complex judgment logic, which takes into account the advantages of system operation stability and loose coupling and easy maintenance.
[0020] Secondly, embodiments of this application provide a distribution e-commerce front-end system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions, and the one or more processors call the computer instructions to cause the distribution e-commerce front-end system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a distribution e-commerce front-end system, cause the distribution e-commerce front-end system to execute the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a distribution e-commerce front-end system, cause the distribution e-commerce front-end system to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the distribution e-commerce front-end system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0025] 1. By adopting the above technical solution, the distribution e-commerce front-end system is divided into a three-layer architecture: core layer, adapter layer, and plugin layer. The core layer is responsible for initializing the basic page structure and initiating capability call requests. The channel differentiation logic is separated into a custom plugin for an independent channel environment. The adapter layer completes the identifier resolution, plugin matching, and unified interface encapsulation of differentiated resources. Then, the core layer integrates the general page skeleton and channel-customized resources to generate the corresponding channel page. This breaks the design pattern of coupling multi-channel rendering logic with the same page template in related technologies. It no longer relies on a large number of conditional branches inside the template to distinguish channels. Adding or modifying any channel business only requires maintaining the corresponding independent plugin, without changing the shared basic page structure. This reduces the coupling of page code in multi-channel scenarios from the root, significantly reducing the scope of regression testing and release costs for channel iteration. At the same time, after isolating the channel differentiation logic by plugins, the distribution e-commerce front-end system can develop and independently launch the exclusive page capabilities of each channel in parallel. This effectively improves the response efficiency of the distribution e-commerce front-end to changes in multi-channel business such as WeChat mini-programs, H5, and Apps, and fully realizes the invention's purpose of on-demand customization and lightweight rapid generation of multi-channel pages.
[0026] 2. By adopting the above technical solution, channel-differentiated resources are decoupled and adapted according to two dimensions: view components and business logic. This allows the two capability lines of page view rendering and interactive business processing to be independent of each other. The core layer does not need to be aware of the underlying implementation differences of various channel components and business logics. Resource calls can be completed through two unified interfaces. This simplifies the core layer page integration logic and allows the component resources and business logic resources of channel-customized plugins to be developed and updated separately. This avoids the situation where changes to a single channel component affect the business logic or vice versa. It further reduces the complexity of maintaining internal plugin resources, strengthens the advantages of multi-channel independent iteration brought about by layered decoupling, and ensures that the development, maintenance, and debugging of views and business logic do not interfere with each other during the multi-channel page customization process.
[0027] 3. By adopting the above technical solution, the plugin registration center is used to realize a dual loading mode of local caching and remote dynamic retrieval of plugins. This not only speeds up the access speed of mainstream channel pages and reduces the size of the front-end package, but also ensures that no new version base is needed for new channels. Combined with plugin legality verification, page loading security is guaranteed, enabling low-cost, flexible and rapid expansion and launch of multiple channels. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating a method for generating a front-end page for a distribution e-commerce platform, as described in this application.
[0029] Figure 2This is another flowchart illustrating the method for generating a front-end page for e-commerce distribution in this application embodiment;
[0030] Figure 3 This is a schematic diagram of the physical device structure of a distribution e-commerce front-end system in the embodiments of this application. Detailed Implementation
[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0033] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a method for generating a front-end page for a distribution e-commerce platform in this embodiment.
[0034] S101. After receiving the terminal access request, the core layer initializes the basic page structure based on the terminal access request and generates a capability call request to send to the adapter layer. The terminal access request refers to the e-commerce front-end page access request initiated by the user through the target channel environment. The capability call request includes front-end page context information and channel environment access information.
[0035] The core layer is responsible for handling the core business logic and basic framework of e-commerce front-end pages, and is used to uniformly handle common processes such as page initialization, capability scheduling, and final page composition. A terminal access request represents a user's request to access the e-commerce front-end page through a target channel environment, used to trigger the entire page generation process. For example, an HTTP request or route redirection request generated when a user clicks on a brand's online store advertisement in an application. The target channel environment refers to the specific business channel and operating platform where the user actually initiates the access, used to define the operating scenario that the page needs to adapt to, such as WeChat mini-program channels, Alipay mini-program channels, H5 web page channels, or third-party distribution platform channels. The basic page structure refers to the general page skeleton without channel-specific content, used to carry the common page layout and component framework of various channels, such as the DOM structure or component tree containing common containers such as headers, product display areas, and bottom navigation. A capability call request is a request message initiated by the core layer to the adapter layer to request channel adaptation capabilities, used to drive subsequent channel-specific processing flows. Front-end page context information represents the current page's runtime state and environment parameters, used to describe the specific business context in which the page exists, such as the current page route, user login status, and page parameters. Channel environment access information represents identifiers and access parameters related to the target channel environment, used by the adapter layer to identify the channel type, such as channel source identifier, channel version number, and channel access entry point.
[0036] Specifically, when the core layer receives a terminal access request initiated by a user through the target channel environment, it first parses the request to extract the page access target and basic parameters carried within it. Then, the core layer initializes the basic page structure based on this request. That is, according to the page type pointed to by the terminal access request, it loads and constructs a common page skeleton and basic component framework for various channels. At this point, this basic page structure does not yet incorporate any channel-specific content; it serves only as a general foundation for subsequent integration. While completing the initialization of the basic page structure, the core layer further collects and encapsulates front-end page context information and channel environment access information, assembling them into a capability invocation request. This request is then sent to the adapter layer, thus initiating a request to obtain channel adaptation capabilities. Through this step, the core layer not only completes the construction of the common page components but also transmits the necessary context and channel parameters for subsequent channel-specific adaptation, achieving initial decoupling between core business logic and channel-specific logic.
[0037] S102, the adapter layer parses the capability call request, extracts the channel environment identifier, and matches the corresponding channel environment customized plugin to the plugin layer based on the channel environment identifier; wherein, the channel environment identifier is used to uniquely identify the target channel environment, and the channel environment customized plugin is used to carry the differentiated configuration content of the target channel environment.
[0038] The adapter layer, located between the core layer and the plugin layer, is an intermediate functional layer responsible for parsing capability call requests and completing channel adaptation capability integration. It shields the differences between different channels and provides a unified capability interface to the core layer. The channel environment identifier represents unique identification information for the target channel environment, used to accurately locate the specific channel being accessed among numerous channel environments. For example, "wechat_mini" represents the WeChat Mini Program channel, "alipay_mini" represents the Alipay Mini Program channel, and "h5_web" represents the H5 webpage channel—all unique strings or codes. The plugin layer is responsible for storing, managing, and providing customized plugins for various channel environments. It supplies the adapter layer with differentiated configuration capabilities for the corresponding channel as needed. A channel environment customized plugin represents a loadable functional unit that carries differentiated configuration content for a specific target channel environment. It encapsulates the channel's unique business resources and configuration logic; for example, a plugin package for the WeChat Mini Program channel encapsulates its unique payment methods, UI styles, and interaction rules. Differentiated configuration content refers to business configuration information that is distinct from each channel environment and requires separate customization. It is used to reflect the personalized needs of different channels, such as page style themes, marketing campaign rules, and payment channel configurations for different channels.
[0039] Specifically, upon receiving a capability invocation request, the adapter layer first parses the request, extracting a channel environment identifier that uniquely identifies the target channel environment from the channel environment access information carried in the request. Then, using this channel environment identifier as the matching basis, the adapter layer initiates a plugin matching request to the plugin layer. This involves searching among the multiple channel environment customized plugins managed by the plugin layer for the specific plugin corresponding to the channel environment identifier. During the matching process, the adapter layer can use a pre-established mapping table between channel environment identifiers and plugins for precise retrieval, ensuring that the matched channel environment customized plugin is indeed the one carrying the differentiated configuration content of the current target channel environment. Through this step, the adapter layer achieves precise positioning from abstract channel access parameters to specific channel adaptation plugins, laying the foundation for subsequently loading and using the differentiated business resources of the channel. Furthermore, due to the identifier matching mechanism, the distribution e-commerce front-end system only needs to expand the corresponding plugins and mapping relationships when adding new channels without modifying the core logic, demonstrating good scalability.
[0040] S103, Load the channel environment customized plugin to the adapter layer at the plugin layer;
[0041] Specifically, after the adapter layer completes the matching of channel environment customized plugins, the plugin layer loads the corresponding channel environment customized plugins into the adapter layer based on the matching results determined by the adapter layer. This means loading the plugin from the plugin layer's storage management environment into the adapter layer's runtime environment. During loading, the plugin layer can use on-demand loading or dynamic loading, loading the corresponding plugin only when the current access truly requires the channel adaptation capability, thus avoiding the resource waste and performance loss caused by loading all channel plugins at once. After loading, the channel environment customized plugin is in a state that the adapter layer can directly access and call, and its encapsulated differentiated configuration content also enters the adapter layer's processing scope. Through this step, the channel differentiation capability is transitioned from being "located" to being "actually supplied and used," enabling the adapter layer to extract differentiated business resources from the loaded plugins and generate unified standard interfaces in subsequent steps. At the same time, the on-demand loading mechanism also ensures the operational efficiency and resource utilization of the distribution e-commerce front-end system in multi-channel scenarios.
[0042] Optionally, in general, a plugin registry is pre-built in the plugin layer. The plugin layer loads channel environment customized plugins into the adapter layer, specifically including: the plugin layer receiving a plugin retrieval request sent by the adapter layer through the plugin registry; wherein the plugin retrieval request carries a channel environment identifier; the plugin registry queries the local plugin mapping table based on the channel environment identifier to determine whether there is a channel environment customized plugin corresponding to the channel environment identifier; if so, the channel environment customized plugin is extracted and loaded into the adapter layer; if not, a dynamic pull request is initiated from the remote plugin repository based on the channel environment identifier to download the channel environment customized plugin, and after the legality verification of the channel environment customized plugin is passed, the channel environment customized plugin is loaded into the adapter layer.
[0043] S104. The adapter layer extracts differentiated business resources from the channel environment customization plugin to generate a unified standard interface;
[0044] Among them, differentiated business resources refer to the specific business materials and functional resources encapsulated in the channel environment customization plugin, which distinguish each channel from one another. These resources are used to reflect the personalized characteristics of different channels in page presentation and business processing, such as channel-specific page style themes, marketing campaign components, product display templates, payment channel configurations, and interaction logic scripts. The unified standard interface represents the capability call interface provided by the adapter layer based on differentiated business resources, which has a unified and standardized form. It is used to shield the core layer from the structural and formal differences in differentiated resources across channels, enabling the core layer to call the differentiated capabilities of different channels in a consistent manner. For example, it encapsulates the diverse resources of different channels into standardized functions or service interfaces that follow unified input / output parameter specifications and calling conventions.
[0045] Specifically, after acquiring the loaded channel environment customization plugin, the adapter layer first parses the plugin's content, extracting differentiated business resources that carry the target channel's differentiated characteristics. This involves identifying and extracting the style resources, business rules, component templates, and configuration parameters encapsulated in the plugin. Subsequently, the adapter layer standardizes and encapsulates these extracted differentiated business resources. Based on a pre-agreed unified interface specification, it converts and packages these resources, which vary in form and structure, into a unified standard interface with a consistent calling format. This ensures that regardless of how the underlying differentiated business resources change across different channels, the exposed interface remains consistent. During the encapsulation process, the adapter layer can perform format normalization, parameter mapping, and calling convention alignment on the differentiated business resources, thereby eliminating differences in data structure and calling methods between channel resources. Through this step, the adapter layer achieves the conversion from channel-specific, heterogeneous differentiated business resources to a general, standardized unified standard interface. This allows the core layer to call these resources uniformly without needing to be aware of the specific differences between each channel, effectively reducing the coupling between the core layer and the channel differentiation logic while ensuring the channel differentiation capabilities are supported.
[0046] Optionally, under normal circumstances, the differentiated business resources corresponding to the channel environment customization plugin include at least customized page resources, customized script resources, customized style resources, customized component resources, and customized capability library resources; customized page resources are used to carry the front-end pages exclusive to the target channel environment; customized script resources are used to provide the software development kit for the target channel environment; customized style resources are used to define the interface theme colors and font specifications for the target channel environment; customized component resources are used to provide view components exclusive to the target channel environment; and customized capability library resources are used to provide the encapsulation of the underlying interactive capabilities corresponding to the target channel environment.
[0047] Optionally, in general, the adapter layer includes a component adaptation module and a business adaptation module, and the unified standard interface includes a unified component call interface and a unified business call interface. The adapter layer extracts differentiated business resources from the channel environment customized plugin to generate a unified standard interface. Specifically, this includes: the component adaptation module extracting customized front-end components from the channel environment customized plugin and converting the customized front-end components into a unified component call interface that can be recognized by the core layer; and the business adaptation module extracting customized business logic from the channel environment customized plugin and converting the customized business logic into a unified business call interface that can be recognized by the core layer.
[0048] S105. The core layer executes a unified standard interface to integrate differentiated business resources with the basic page structure and generate customized distribution pages; among them, customized distribution pages refer to e-commerce front-end pages adapted to the target channel environment.
[0049] In this context, "fusion" refers to the process of combining differentiated business resources with the basic page structure to integrate them into a complete page. This is used to overlay channel-specific content on top of a general framework, such as applying channel-specific styles to the basic container or injecting channel-specific components into the corresponding display area. "Customized distribution page" refers to an e-commerce front-end page adapted to the target channel environment. It is used to present users with a final page that possesses general functionality while also fitting the characteristics of the current channel. For example, a product distribution page adapted to the WeChat mini-program channel to present its unique style and functions.
[0050] Specifically, after obtaining the unified standard interface provided by the adapter layer, the core layer executes the unified standard interface, that is, it obtains encapsulated differentiated business resources through the standardized interface. Subsequently, the core layer integrates the obtained differentiated business resources with the basic page structure. That is, it overlays and injects the differentiated business resources specific to the target channel on top of the general skeleton and container provided by the basic page structure. For example, it applies the channel-specific style theme to the basic layout, fills the corresponding display container with the channel-specific functional components, and binds the channel-specific business rules to the corresponding interaction logic. During the integration process, the core layer accurately maps and assembles the differentiated business resources to the corresponding positions according to the container positions and expansion points reserved in the basic page structure, so that the general skeleton and the personalized content of the channel are organically combined into a complete page. After the integration is completed, a customized distribution page adapted to the target channel environment is generated. This customized distribution page retains the basic functions and layout common to all channels, while presenting the style and business characteristics specific to the target channel. Through this step, the distribution e-commerce front-end system achieves the final integration of the general page structure and channel-differentiated resources, completing the full transformation from abstract access requests to specific customized pages. This enables the efficient output of e-commerce front-end pages adapted to multiple channel environments under a unified architecture, ensuring both the reusability of development and meeting the personalized customization needs of each channel.
[0051] Optionally, under normal circumstances, the core layer executes a unified standard interface to integrate differentiated business resources with the basic page structure, generating a customized distribution page. Specifically, this includes: when rendering the basic page structure, the core layer triggers a unified component call interface to replace the common components in the basic page structure with customized front-end components; when responding to user interaction events, the core layer triggers a unified business call interface to route the default business logic to customized business logic for processing; and outputs a customized distribution page that includes customized front-end components and customized business logic.
[0052] By adopting the above technical solution, the distribution e-commerce front-end system is divided into a three-layer architecture: core layer, adapter layer, and plugin layer. The core layer is responsible for initializing the basic page structure and initiating capability call requests, and decouples the channel differentiation logic into a custom plugin for an independent channel environment. The adapter layer completes the identifier resolution, plugin matching, and unified interface encapsulation of differentiated resources. The core layer then integrates the general page skeleton with the channel-customized resources to generate the corresponding channel page. This breaks the design pattern of coupling multi-channel rendering logic with the same page template in related technologies. It no longer relies on a large number of conditional branches within the template to distinguish channels. Adding or modifying any channel business only requires maintaining the corresponding independent plugin, without changing the shared basic page structure. This reduces the coupling of page code in multi-channel scenarios from the root, significantly reducing the scope of regression testing and release costs for channel iterations. At the same time, after isolating the channel differentiation logic through plugins, the distribution e-commerce front-end system can develop and independently launch the exclusive page capabilities of each channel in parallel, effectively improving the response efficiency of the distribution e-commerce front-end to changes in multi-channel businesses such as WeChat mini-programs, H5, and Apps. This fully realizes the invention's purpose of on-demand customization and lightweight rapid generation of multi-channel pages.
[0053] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the method for generating a front-end page for e-commerce distribution in this application.
[0054] S201. After receiving the terminal access request, the core layer initializes the basic page structure based on the terminal access request and generates a capability call request to send to the adapter layer. The terminal access request refers to the e-commerce front-end page access request initiated by the user through the target channel environment. The capability call request includes front-end page context information and channel environment access information.
[0055] For details, please refer to step S101, which will not be repeated here.
[0056] S202, the adapter layer parses the capability call request, extracts the channel environment identifier, and matches the corresponding channel environment customized plugin to the plugin layer based on the channel environment identifier; wherein, the channel environment identifier is used to uniquely identify the target channel environment, and the channel environment customized plugin is used to carry the differentiated configuration content of the target channel environment.
[0057] For details, please refer to step S102, which will not be repeated here.
[0058] S203, The adapter layer executes the plugin initialization process; wherein, the plugin initialization process includes preloading the initialization data that the channel environment customized plugin depends on for running, based on the channel environment identifier.
[0059] The plugin initialization process refers to the preprocessing steps performed by the adapter layer before the customized plugin for the channel environment is officially launched. This preprocessing prepares the necessary prerequisites for the plugin's subsequent normal operation. Initialization data refers to the prerequisite data that the customized plugin for the channel environment depends on and needs to be prepared in advance before the plugin officially runs. This ensures that the plugin can run normally after loading without needing to be temporarily retrieved. Examples include the channel's global configuration parameters, basic dictionary data, theme style variables, interface authentication credentials, or runtime context parameters. Preloading means completing the initialization data acquisition and readiness processing before the plugin officially runs, preventing delays or blockages caused by temporary data retrieval during plugin runtime.
[0060] Specifically, after determining the channel environment-customized plugin, the adapter layer executes the plugin initialization process. This involves determining the range of initialization data the plugin depends on based on the channel environment identifier and pre-loading this initialization data. During pre-loading, the adapter layer can request the corresponding data source based on the channel environment identifier to obtain the configuration parameters, basic data, and context information required for the plugin's operation in advance, preparing them for direct use during subsequent plugin runtime. By pre-loading the initialization data before the plugin is officially loaded and run, the channel environment-customized plugin is ready to run immediately upon loading, eliminating the need to temporarily acquire dependent data during runtime. Through this step, the adapter layer provides necessary pre-load data assurance for the smooth operation of the channel environment-customized plugin, avoiding runtime anomalies or performance delays caused by missing data or temporary fetching, and improving the stability and execution efficiency of subsequent plugin loading and differentiated business resource extraction processes.
[0061] S204, Load the channel environment customized plugin to the adapter layer at the plugin layer.
[0062] For details, please refer to step S103, which will not be repeated here.
[0063] S205. The adapter layer extracts differentiated business resources from the channel environment customization plugin to generate a unified standard interface.
[0064] For details, please refer to step S104, which will not be repeated here.
[0065] S206. The core layer executes a unified standard interface to integrate differentiated business resources with the basic page structure and generate customized distribution pages; among them, customized distribution pages refer to e-commerce front-end pages adapted to the target channel environment.
[0066] For details, please refer to step S105, which will not be repeated here.
[0067] S207. If the adapter layer does not match the corresponding channel environment customized plugin in the plugin layer based on the channel environment identifier, the adapter layer loads the default plugin in the core layer. The default plugin is pre-configured in the core layer and is used to provide basic business resources in the standard channel environment.
[0068] Default plugins refer to general-purpose plugins pre-installed in the core layer, providing fallback capabilities when no corresponding channel-specific plugins are available. They ensure that the front-end system of a distribution e-commerce platform can still output pages correctly even without specific channel adaptation capabilities. Examples include pre-installed plugins that encapsulate common styles and basic business logic for standard channel environments. A standard channel environment refers to a general benchmark operating scenario that does not rely on differentiated configurations specific to a particular channel. It serves as the default adaptation benchmark when dedicated adaptations are lacking, such as standardized channel formats using common styles and business rules. Basic business resources refer to the basic business materials and functional resources provided by the default plugins that are common to all channels. These constitute the common business content of standard pages, such as common page styles, basic product display templates, and common interaction logic.
[0069] Specifically, after the adapter layer searches for plugins in the plugin layer based on the channel environment identifier, if it finds that no channel-specific plugin corresponding to that identifier exists in the plugin layer, it determines that the plugin matching has failed. At this point, the adapter layer no longer waits or reports an error; instead, it loads the default plugin pre-installed in the core layer. This means it calls a pre-built-in general fallback plugin in the core layer to replace the missing channel-specific plugin. Since this default plugin carries the basic business resources of a standard channel environment, even in the absence of specific channel-specific configurations, the distribution e-commerce front-end system can still continue the subsequent page generation process using the default plugin. Through this step, the distribution e-commerce front-end system establishes a fallback fault-tolerance mechanism for plugin matching failures, effectively avoiding the problem of page generation failure or access interruption due to the lack of a specific custom plugin for a particular channel, thereby significantly improving the robustness and availability of the entire distribution e-commerce front-end system.
[0070] S208. The adapter layer extracts basic business resources from the default plugin to generate a default standard interface, and the core layer executes the default standard interface to generate a standard distribution page.
[0071] The default standard interface refers to the capability call interface with a unified specification provided by the adapter layer based on basic business resources. It is used by the core layer to obtain and apply the basic business resources provided by the default plugin in a consistent manner, such as a standardized fallback interface that follows a unified input and output parameter specification. The standard distribution page refers to the e-commerce front-end page generated based on basic business resources and using a common configuration for a standard channel environment. It is used to present users with a general page with basic functions when there is a lack of specific channel adaptation capabilities. For example, a product distribution page that does not have any channel-specific styles and functions overlaid and only uses a general style and basic business logic.
[0072] Specifically, after the adapter layer loads the default plugin into the core layer, it first parses the plugin's content, extracting the common basic business resources for various channels. This involves extracting the common styles, basic templates, and common business logic encapsulated in the default plugin. Then, based on a pre-agreed unified interface specification, the adapter layer encapsulates the extracted basic business resources into a default standard interface with a consistent calling format, allowing the core layer to call it in a manner consistent with handling ordinary unified standard interfaces. Next, the core layer executes this default standard interface, obtaining the encapsulated basic business resources and combining them with the basic page structure to generate a standard distribution page using the common configuration of the standard channel environment. Through this step, the distribution e-commerce front-end system completes the full transformation from a fallback plugin to the final page even in cases of plugin mismatch. This ensures that even if the target channel lacks a dedicated custom plugin, users can still access a standard distribution page with basic functions and a common style, thus guaranteeing service continuity and basic consistency of user experience for the distribution e-commerce front-end system under various abnormal or default scenarios.
[0073] The following describes the distribution e-commerce front-end system in the embodiments of this invention from the perspective of hardware processing. Please refer to [link / reference]. Figure 3 This is a schematic diagram of a physical device structure of a distribution e-commerce front-end system in an embodiment of this application.
[0074] It should be noted that, Figure 3 The structure of the distribution e-commerce front-end system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0075] like Figure 3As shown, the distribution e-commerce front-end system includes a CPU 301, which can perform various appropriate actions and processes based on a program stored in the read-only memory ROM 302 or a program loaded from the storage section 308 into the random access memory RAM 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0076] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0077] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.
[0078] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.
[0080] Specifically, the distribution e-commerce front-end system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the distribution e-commerce front-end page generation method provided in the above embodiment.
[0081] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the distribution e-commerce front-end system described in the above embodiments; or it may exist independently and not assembled into the distribution e-commerce front-end system. The storage medium carries one or more computer programs, which, when executed by a processor of the distribution e-commerce front-end system, cause the distribution e-commerce front-end system to implement the distribution e-commerce front-end page generation method provided in the above embodiments.
[0082] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0083] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0084] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for generating a front-end page for a distribution e-commerce platform, characterized in that, Applied to a distribution e-commerce front-end system, the distribution e-commerce front-end system includes a core layer, an adapter layer, and a plugin layer, the method includes: After receiving the terminal access request, the core layer initializes the basic page structure based on the terminal access request and generates a capability invocation request to be sent to the adapter layer; wherein, the terminal access request refers to the e-commerce front-end page access request initiated by the user through the target channel environment, and the capability invocation request includes front-end page context information and channel environment access information; The adapter layer parses the capability call request, extracts the channel environment identifier, and matches the corresponding channel environment customized plugin to the plugin layer based on the channel environment identifier; wherein, the channel environment identifier is used to uniquely identify the target channel environment, and the channel environment customized plugin is used to carry the differentiated configuration content of the target channel environment; The plugin layer loads the channel environment customized plugin into the adapter layer; The adapter layer extracts differentiated business resources from the channel environment customization plugin to generate a unified standard interface; The core layer executes the unified standard interface to integrate the differentiated business resources with the basic page structure, generating a customized distribution page; wherein, the customized distribution page refers to an e-commerce front-end page adapted to the target channel environment.
2. The method according to claim 1, characterized in that, The adapter layer includes a component adaptation module and a business adaptation module, and the unified standard interface includes a unified component call interface and a unified business call interface. The adapter layer extracts differentiated business resources from the channel environment customization plugin to generate a unified standard interface, specifically including: The component adaptation module extracts the customized front-end components from the channel environment customization plugin and converts the customized front-end components into the unified component call interface that the core layer can recognize; The business adaptation module extracts the customized business logic from the channel environment customization plugin and converts the customized business logic into the unified business call interface that can be recognized by the core layer.
3. The method according to claim 2, characterized in that, The core layer executes the unified standard interface, integrates the differentiated business resources with the basic page structure, and generates a customized distribution page, specifically including: When rendering the basic page structure, the core layer replaces the common components in the basic page structure with the customized front-end components by triggering the unified component call interface. When responding to user interaction events, the core layer triggers the unified business call interface to route the default business logic to the customized business logic for processing. The output includes a customized distribution page that incorporates the customized front-end components and the customized business logic.
4. The method according to claim 1, characterized in that, The differentiated business resources corresponding to the channel environment customization plugin include at least customized page resources, customized script resources, customized style resources, customized component resources, and customized capability library resources. The customized page resources are used to host the front-end pages specific to the target channel environment; The customized script resources are used to provide the software development kit for the target channel environment; The customized style resources are used to define the interface theme colors and font specifications for the target channel environment; The customized component resources are used to provide view components specific to the target channel environment; The customized capability library resources are used to provide the underlying interactive capability encapsulation corresponding to the target channel environment.
5. The method according to claim 1, characterized in that, After the steps of parsing the capability invocation request at the adapter layer, extracting the channel environment identifier, and matching the corresponding channel environment customized plugin to the plugin layer based on the channel environment identifier, the method further includes: The adapter layer performs a plugin initialization process; wherein, the plugin initialization process includes preloading the initialization data that the channel environment customized plugin depends on for running, based on the channel environment identifier.
6. The method according to claim 1, characterized in that, The plugin layer includes a pre-configured plugin registration center. The plugin layer loads the channel environment customized plugin into the adapter layer, specifically including: The plugin layer receives a plugin acquisition request sent by the adapter layer through the plugin registration center; wherein the plugin acquisition request carries the channel environment identifier. The plugin registration center queries the local plugin mapping table based on the channel environment identifier to determine whether there is a channel environment customized plugin corresponding to the channel environment identifier. If so, extract the channel environment customization plugin and load it into the adapter layer; If not, a dynamic pull request is initiated from the remote plugin repository based on the channel environment identifier to download the channel environment customized plugin. After the legality verification of the channel environment customized plugin is passed, the channel environment customized plugin is loaded into the adapter layer.
7. The method according to claim 1, characterized in that, The core layer contains a default plugin, which is used to provide basic business resources in a standard channel environment. The method further includes: If the adapter layer does not find a corresponding channel environment customized plugin in the plugin layer based on the channel environment identifier, the adapter layer loads the default plugin in the core layer. The adapter layer extracts basic business resources from the default plugin to generate a default standard interface, and the core layer executes the default standard interface to generate a standard distribution page.
8. A distribution e-commerce front-end system, characterized in that, The distribution e-commerce front-end system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the distribution e-commerce front-end system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the distribution e-commerce front-end system, the distribution e-commerce front-end system performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the distribution e-commerce front-end system, the distribution e-commerce front-end system performs the method as described in any one of claims 1-7.
