Cross-platform framework-based cross-border e-commerce applet implementation method, system and equipment and medium

By using a cross-platform framework and platform adapters, we achieve multi-platform compatibility, immersive product display, and efficient order processing for cross-border e-commerce mini-programs. This solves the problems of high repetition in multi-platform development, monotonous product display formats, and low efficiency in cross-border payments for cross-border e-commerce mini-programs, thereby improving user experience and order processing efficiency.

CN121807289APending Publication Date: 2026-04-07INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing cross-border e-commerce mini-programs suffer from problems such as high repetition in development across multiple platforms, limited product display formats, and low efficiency in cross-border payments, resulting in high development costs, poor user experience, and low product conversion rates.

Method used

It adopts a cross-platform framework approach, achieving multi-platform compatibility through unified business logic source code and platform adapters. It combines a WebGL rendering engine and gesture controller for 3D product display, and supports intelligent localization and efficient order processing through a unified localized interface and distributed order processing architecture.

Benefits of technology

It improved code reusability, reduced development and maintenance costs, enhanced user experience and product conversion rates, resolved language barriers in cross-border e-commerce, and achieved high efficiency in processing high-concurrency orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807289A_ABST
    Figure CN121807289A_ABST
Patent Text Reader

Abstract

The invention provides a cross-platform framework-based cross-border e-commerce applet implementation method, system and device and a medium, and belongs to the technical field of mobile e-commerce, the method comprises the following steps: compiling a business logic source code based on a cross-platform application development framework to generate an applet code package; in the operation environment, the loading platform adapter accesses a native function of the current operation platform in the applet code package; driving a rendering engine to render the 3D commodity model in response to the commodity viewing operation of the user; in response to region setting and commodity selection operation of the user, driving a localization engine to execute localization processing of commodity information and commodity prices, and generating a localization order; sending the localized order to a server to execute fragmentation processing; and responding to a payment instruction of the user, driving a native payment control of the current operation platform, and selecting a payment channel for payment. According to the invention, multi-platform compatibility, 3D commodity display, localization and efficient order processing are realized, and user experience and business efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of mobile e-commerce technology, specifically relating to a method, system, device and medium for implementing cross-border e-commerce mini-programs based on a cross-platform framework. Background Technology

[0002] Cross-border e-commerce mini-programs are an important tool for merchants to expand their international business. Through multilingual interfaces, localized services, and convenient payment and logistics functions, they assist merchants in conducting cross-border business. However, current cross-border e-commerce mini-programs generally suffer from poor multi-platform compatibility, limited product display formats, and low efficiency in cross-border payments. Specifically: First, there's high redundancy in multi-platform development: Due to differences in the development frameworks of mini-programs across different platforms, developers need to write a large amount of repetitive code for each platform, resulting in low code reuse and high development and maintenance costs. Second, product display is limited: Traditional e-commerce mini-programs mostly use static images to display products, preventing users from viewing them in a three-dimensional, interactive way, leading to insufficient information for user purchase decisions and low product conversion rates. Third, cross-border order processing suffers from significant delays: Affected by international payments, logistics, and other environmental factors, order processing chains are long and response times are slow, resulting in long delays for single orders. This makes it impossible to support high-concurrency scenarios, impacting user experience and increasing costs for merchants.

[0003] Therefore, the industry urgently needs a cross-border e-commerce mini-program solution that can achieve high code reuse, immersive product display, intelligent localization support, and efficient order processing. Summary of the Invention

[0004] In a first aspect, embodiments of this application provide a method for implementing a cross-border e-commerce mini-program based on a cross-platform framework, including the following steps: S1. Pre-build a unified business logic source code, and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package contains a platform adapter. S2. In the runtime environment of any mini-program code package, load the internally encapsulated platform adapter to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface; S3. The currently running mini-program code package responds to the user's operation of viewing products by calling the unified rendering interface through the platform adapter, driving the WebGL rendering engine to render the preset 3D product model, and binding a gesture controller to the 3D product model to respond to the user's touch screen operation; S4. The currently running mini-program code package responds to the user's region settings and product selection operations, calls the platform adapter's unified localization interface, drives the localization engine to perform localization processing of product information and product prices, and generates localized orders in response to the user's order placement operation; S5. After receiving a localized order, the currently running mini-program code package calls the unified network interface of the platform adapter to send the order to the server for fragment processing; S6. The currently running mini-program code package responds to the user's payment instruction, calls the platform adapter's unified payment interface, drives the native payment control of the currently running platform, and selects a payment channel to make the payment based on the user's regional characteristics.

[0005] Furthermore, the specific steps of step S1 are as follows: S11. Pre-write a platform adapter for each target platform, encapsulate the native application programming interface of the target platform, and generate a platform adapter library; S12. Write unified source code for cross-border e-commerce business logic; S13. Identify the target platforms and declare each target platform in the cross-platform framework's configuration file; S14. Use a cross-platform framework compiler to compile the cross-border e-commerce business logic source code, configuration files, and platform adapter library to generate an independent mini-program code package for each target platform; each mini-program code package contains the business logic source code and the corresponding platform adapter for the target platform.

[0006] Furthermore, the specific steps of step S2 are as follows: S21. When a cross-border e-commerce mini-program starts, it loads the platform adapter integrated into the current mini-program's code package; S22. During business logic execution, the native functions of the currently running platform are accessed through the unified native application interface provided by the platform adapter.

[0007] Furthermore, the business logic source code includes the product display logic; The specific steps of step S3 are as follows: S31. The currently running mini-program code package responds to the user's operation of viewing products and executes the product display logic; S32. Obtain the 3D product model pre-stored on the server through the product display logic, call the unified rendering interface provided by the platform adapter, and drive a WebGL engine to load and render the 3D product model; S33. Bind a gesture controller to the currently rendered 3D product model to respond to the user's touch screen operation and perform interactive actions such as rotation, scaling and sectioning on the rendered 3D product model.

[0008] Furthermore, the business logic source code includes localization and order logic; The specific steps of step S4 are as follows: S41. The currently running mini-program code package responds to the user's region setting operation and executes localization and order logic; S42. By calling the platform adapter's unified localization interface through localization and order logic, the localization engine is driven to perform the following processing: S421. Match specialized terms from the product information using a pre-defined localized terminology database; If a match is generated, localized product information will be produced. If no match is found, the machine translation service interface is invoked to translate and generate localized product information; S422. Obtain the user-set region in real time, convert the original price of the goods according to the exchange rate information corresponding to the region, and generate a localized price for the goods; S43. Display the processed localized product information and localized product prices to the user; S44. Respond to the user's order placement and generate a localized order that includes the user's regional characteristics and localized pricing.

[0009] Furthermore, step S5 specifically involves the following steps: S51. After receiving an order, the server segments the order data according to the user's region characteristics and the order amount. S52. The server distributes the fragmented orders to different processing queues through message queues; S53. When the server uses distributed locks to process preset critical processes, it ensures the atomicity of the critical processes.

[0010] Furthermore, the specific steps for selecting a payment channel based on user region characteristics in step S6 are as follows: S61. The currently running mini-program code package calls the unified payment interface of the platform adapter and sends the user's regional characteristics and the platform identifier of the currently running platform to the server; S62. The server queries the preset payment routing strategy table based on the received platform identifier and user region characteristics to match the optimal payment channel; S63. The server returns payment channel confirmation information to the mini-program code package, driving the native payment control of the currently running platform to guide the user to complete the payment.

[0011] Secondly, embodiments of this application also provide a cross-border e-commerce mini-program implementation system based on a cross-platform framework, including: The environment configuration and compilation module is used to pre-build a unified business logic source code and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package encapsulates a platform adapter. The environment adaptation module is used to load the internally encapsulated platform adapter in any mini-program code package runtime environment, so as to call the unified interface and access the native functions of the current running platform in the mini-program code package; The product interaction and display module is used to respond to user operations in the currently running mini-program code package. It calls the unified rendering interface through the platform adapter to drive the WebGL rendering engine to render the preset 3D product model and binds a gesture controller to the 3D product model to respond to user touch screen operations. The localization and order module is used to respond to the user's regional settings and product selection operations in the currently running mini-program code package, call the unified localization interface of the platform adapter, drive the localization engine to perform localization processing of product information and product prices, and generate localized orders in response to the user's order operation; The order processing module is used to receive the order data in the currently running mini-program code package, call the unified network interface of the platform adapter, and send the order to the server for fragment processing. The payment and fulfillment module is used to respond to the user's payment instructions in the currently running mini-program code package, call the unified payment interface of the platform adapter, drive the native payment control of the currently running platform, and select a payment channel for payment based on the user's regional characteristics.

[0012] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework as described in the first aspect.

[0013] Fourthly, embodiments of this application also provide a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the method for implementing a cross-border e-commerce mini-program based on a cross-platform framework as described in the first aspect.

[0014] As can be seen from the above technical solutions, this application has the following advantages: The cross-platform framework-based cross-border e-commerce mini-program implementation method, system, device, and medium provided in this application achieve multi-platform compatibility, immersive product display, intelligent localization support, and efficient order processing through unified business logic source code and platform adapters. Dynamically loading platform adapters improves code reusability and reduces development and maintenance costs. Employing a WebGL rendering engine and gesture controller provides interactive viewing of 3D product models, enhancing user experience and product conversion rates. A terminology library and machine translation services enable localized processing of product information and prices, resolving language barriers in cross-border e-commerce. A distributed order processing architecture implements order sharding and a distributed locking mechanism, enabling high-concurrency order processing and improving order processing efficiency. Attached Figure Description

[0015] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating the cross-platform framework-based implementation method for cross-border e-commerce mini-programs according to the present invention.

[0017] Figure 2 This is a schematic diagram of the cross-platform framework-based cross-border e-commerce mini-program implementation system of the present invention. Detailed Implementation

[0018] The following detailed description of the specific steps for implementing a cross-platform e-commerce mini-program based on a cross-platform framework will provide a more comprehensive overview of various embodiments of this disclosure. This disclosure may have various embodiments, and adjustments and modifications may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all modifications, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.

[0019] For example, cross-border e-commerce mini-programs are an important tool for merchants to expand into international markets. They help merchants conduct cross-border business through multilingual interfaces, localized services, and convenient payment and logistics functions. However, current cross-border e-commerce mini-programs suffer from several problems that limit their development and application. Specifically, these problems include high redundancy in multi-platform development, limited product display formats, and inefficient cross-border payments. The following is a detailed description of these problems: First, there is a high degree of repetition in multi-platform development. Due to differences in the development frameworks of mini-programs across different platforms, developers need to write a large amount of repetitive code for each platform, resulting in low code reusability and high development and maintenance costs. Second, the product display format is limited. Traditional e-commerce mini-programs mostly use static images to display products, preventing users from viewing them in a three-dimensional, interactive way. This leads to insufficient information for users' purchase decisions and low product conversion rates. Third, cross-border order processing suffers from significant delays. Affected by international payments, logistics, and other environmental factors, the order processing chain is long and the response is slow. The long delay in processing a single order cannot support high-concurrency scenarios, impacting user experience and increasing costs for merchants.

[0020] Therefore, the industry urgently needs a cross-border e-commerce mini-program solution that can achieve high code reusability, immersive product display, intelligent localization support, and efficient order processing. This solution should address the pain points of existing cross-border e-commerce mini-programs, improve development efficiency, enhance user experience, and reduce merchant costs, thereby driving the development of the cross-border e-commerce industry.

[0021] To address the aforementioned issues, this embodiment provides a method for implementing cross-border e-commerce mini-programs based on a cross-platform framework. Through unified business logic source code and platform adapters, it achieves multi-platform compatibility, immersive product display, intelligent localization support, and efficient order processing.

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Please see Figure 1 The diagram shows a flowchart of a method for implementing a cross-border e-commerce mini-program based on a cross-platform framework in a specific embodiment. The method includes the following steps: S1. Pre-build a unified business logic source code, and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package contains a platform adapter. It should be noted that by pre-building a unified business logic source code, the consistency and scalability of the business logic are ensured; by compiling the business logic source code through a cross-platform application development framework, multiple mini-program code packages corresponding to each target platform are generated, reducing development and maintenance costs. S2. In the runtime environment of any mini-program code package, load the internally encapsulated platform adapter to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface; It should be noted that by loading the internally encapsulated platform adapter, access to the native functions of the current running platform is achieved, ensuring platform compatibility and operating efficiency; through a unified interface, a standardized function call method is provided, improving code reusability and maintainability. S3. The currently running mini-program code package responds to the user's operation of viewing products by calling the unified rendering interface through the platform adapter, driving the WebGL rendering engine to render the preset 3D product model, and binding a gesture controller to the 3D product model to respond to the user's touch screen operation; It should be noted that the WebGL rendering engine and gesture controller provide interactive viewing of 3D product models, improving user experience and product conversion rate; by binding the gesture controller, users can rotate, scale, and slice the 3D product models, enhancing the user's interactive experience. S4. The currently running mini-program code package responds to the user's region settings and product selection operations, calls the platform adapter's unified localization interface, drives the localization engine to perform localization processing of product information and product prices, and generates localized orders in response to the user's order placement operation; It should be noted that the localization engine enables the localization of product information and prices, thus overcoming language barriers in cross-border e-commerce; by generating localized orders that include user regional characteristics and localized prices, the accuracy and efficiency of order processing are improved. S5. After receiving a localized order, the currently running mini-program code package calls the unified network interface of the platform adapter to send the order to the server for fragment processing; It should be noted that by using a message queue, order sharding is achieved, enabling high-concurrency order processing and improving order processing efficiency; S6. The currently running mini-program code package responds to the user's payment instruction, calls the unified payment interface of the platform adapter, drives the native payment control of the currently running platform, and selects a payment channel to make payment based on the user's regional characteristics; It should be noted that by using the payment routing strategy table, the optimal payment channel is matched based on the user's regional characteristics and platform identifier, which improves the convenience and success rate of payment; by driving the native payment control of the currently running platform, the security of the payment process is ensured and the user experience is improved.

[0024] This embodiment achieves multi-platform compatibility and improves code reusability through a platform adapter and unified interface; it provides interactive viewing of 3D product models through a WebGL rendering engine and gesture controller, improving user experience and product conversion rate; it achieves localized processing of product information and prices through a localization engine, solving the language barrier problem in cross-border e-commerce; and it implements order sharding processing and a distributed locking mechanism through a distributed order processing architecture, enabling high-concurrency order processing and improving order processing efficiency.

[0025] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, in order to fully illustrate the specific implementation process of this embodiment, another method for implementing cross-border e-commerce mini-programs based on a cross-platform framework is provided, which includes the following steps: S1. Pre-build a unified business logic source code, and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package encapsulates a platform adapter. The specific steps of step S1 are as follows: S11. Pre-write a platform adapter for each target platform, encapsulate the native application programming interface of the target platform, and generate a platform adapter library; S12. Write unified cross-border e-commerce business logic source code; the business logic source code includes product display logic and localization and order logic; S13. Identify the target platforms and declare each target platform in the cross-platform framework's configuration file; For example, the cross-platform framework uses the UniApp framework based on Vue.js; S14. Use a cross-platform framework compiler to compile the cross-border e-commerce business logic source code, configuration files, and platform adapter library to generate an independent mini-program code package for each target platform; each mini-program code package contains the business logic source code and the corresponding platform adapter for the target platform; For example, a cosmetics company plans to expand its cross-border e-commerce business to multiple domestic and international markets, which requires coverage of three major platforms: WeChat Mini Programs, Alipay International Mini Programs, and ByteDance International Mini Programs. When developing based on the UniApp framework, the three target platforms are clearly declared in the framework configuration file, and the platform-specific parameters are configured, such as the payment interface permissions of WeChat Mini Programs, the customs clearance connection parameters of Alipay International, and the logistics interface information of ByteDance International. During the compilation phase, the framework automatically combines the unified business logic source code covering core functions such as product management, order process, and user center with the platform-specific adapters to generate three independent mini-program code packages. Among them, the core business code does not need to be rewritten, has a high reusability, and only needs to be adapted to the special functions of each platform through adapters, which greatly reduces the development workload. S2. In the runtime environment of any mini-program code package, load the internally encapsulated platform adapter to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface; the specific steps of step S2 are as follows: S21. When a cross-border e-commerce mini-program starts, it loads the platform adapter integrated into the current mini-program's code package; S22. During business logic execution, the native functions of the currently running platform are accessed through the unified native application programming interface provided by the platform adapter; S3. The currently running mini-program code package responds to the user's operation of viewing products by calling the unified rendering interface through the platform adapter, driving the WebGL rendering engine to render the preset 3D product model, and binding a gesture controller to the 3D product model to respond to the user's touch screen operation; The specific steps of step S3 are as follows: S31. The currently running mini-program code package responds to the user's operation of viewing products and executes the product display logic; S32. Obtain the 3D product model pre-stored on the server through the product display logic, call the unified rendering interface provided by the platform adapter, and drive a WebGL engine to load and render the 3D product model; S33. Bind a gesture controller to the currently rendered 3D product model to respond to the user's touch screen operation and perform interactive actions such as rotation, scaling and sectioning on the rendered 3D product model; For example, to improve the online display effect of lipstick products, a beauty brand used WebGL rendering technology to realize 3D product display. First, the lipstick3D model was optimized and the model file was compressed to ensure that the loading time of the model is short in a cross-border network environment, so as to avoid user churn due to slow loading. When a user clicks to view a lipstick product in a mini-program on any platform, the mini-program calls the unified rendering interface through the platform adapter, starts the WebGL rendering engine to load and render the lipstick's 3D model. Users can interact with the model via touchscreen: a single finger swipe rotates the lipstick model 360° to view the texture of the lipstick case, the logo engraving, and the shape of the top of the lipstick; pinching or spreading two fingers zooms in and out to observe the texture details of the lipstick up close, such as the distribution of pearlescent particles; long-pressing and swiping allows for a cross-section of the model to view the color layers inside the lipstick, providing a clear understanding of the actual effects of different shades. This 3D interactive display method allows users to understand the product features more comprehensively. Compared with traditional static image displays, it extends the user's dwell time, improves the conversion rate of lipstick products, and reduces user inquiries to customer service about the product's appearance and texture. S4. The currently running mini-program code package responds to the user's region settings and product selection operations, calls the platform adapter's unified localization interface, drives the localization engine to perform localization processing of product information and prices, and generates a localized order in response to the user's order placement operation; the specific steps of step S4 are as follows: S41. The currently running mini-program code package responds to the user's region setting operation and executes localization and order logic; S42. By calling the platform adapter's unified localization interface through localization and order logic, the localization engine is driven to perform the following processing: S421. Match specialized terms from the product information using a pre-defined localized terminology database; If a match is generated, localized product information will be produced. If no match is found, the machine translation service interface is invoked to translate and generate localized product information; S422. Obtain the user-set region in real time, convert the original price of the goods according to the exchange rate information corresponding to the region, and generate a localized price for the goods; S43. Display the processed localized product information and localized product prices to the user; S44. Respond to the user's order placement and generate a localized order that includes the user's regional characteristics and localized pricing; For example, when a user from country A completes the region settings (selects "Country A - City B") and browses products in the mini-program, the localization engine will automatically start the processing flow. In terms of product information localization, the engine first queries the preset beauty industry terminology database of country A. For professional terms such as "sunscreen," "lipstick," and "foundation," it directly matches the translations of country A in the terminology database to ensure the accuracy and professionalism of the translation. For descriptive text not included in the terminology database, such as "lightweight and breathable, suitable for summer use," it calls the machine translation service interface to accurately translate it into the language of country A while maintaining the fluency and naturalness of the sentence. Regarding the localization of product prices, the engine connects in real time to the official exchange rate interface of a bank in country A to obtain the exchange rate between the currency of country A and the currency of country A on that day. If the original price of a sunscreen is known, the engine will automatically calculate and generate a localized price in country A, and at the same time mark the exchange rate update time next to the price so that users can understand the timeliness of the price. When a user places an order for this sunscreen, the system will generate a localized order. The order will include not only the product's language information and price in country A, but also the user's location (city B in country A) and supported local payment methods, providing a clear basis for subsequent order processing and fulfillment. S5. After receiving a localized order, the currently running mini-program code package calls the unified network interface of the platform adapter to send the order to the server for fragmentation processing; the specific steps of step S5 are as follows: S51. After receiving an order, the server segments the order data according to the user's region characteristics and the order amount. S52. The server distributes the fragmented orders to different processing queues through message queues; S53. When the server uses distributed locks to handle pre-defined critical processes (such as those involving customs clearance), it ensures the atomicity of the critical processes. For example, during a promotional period, a cross-border e-commerce platform faced a surge in orders, with a large number of orders during peak hours. To ensure that order processing was not delayed or congested, the server adopted a sharding mechanism to cope with high concurrency. When the server receives a large number of localized orders, it first segments the orders based on the user's region characteristics and the order amount in the order data: small orders with an amount ≤ a set threshold for the first region are divided into "small orders in the first region"; large orders with an amount > a threshold for the second region are divided into "large orders in the second region"; and the remaining orders are classified into "general orders". Subsequently, the server distributes orders from different segments to corresponding processing queues via message queues. Each processing queue is handled by a dedicated server cluster. For example, the "Small Order Segmentation in Region 1" queue connects to the local customs clearance system and logistics service providers in Region 1, prioritizing the processing of small, high-frequency orders. The "Large Order Segmentation in Region 2" queue, on the other hand, focuses on connecting to the customs duty calculation system and international logistics lines in Region 2, ensuring the efficiency of customs clearance and transportation for large orders. Meanwhile, for critical processes in order processing (such as customs declaration and payment confirmation), the server adopts a distributed lock mechanism to prevent multiple servers from processing the same critical steps of the same order at the same time, thus preventing issues such as duplicate customs clearance and duplicate deductions, ensuring the atomicity of each critical process, reducing order processing delays, and guaranteeing service stability during promotional periods. S6. The currently running mini-program code package responds to the user's payment instruction, calls the platform adapter's unified payment interface, drives the native payment control of the currently running platform, and selects a payment channel based on the user's regional characteristics to complete the payment; the specific steps in step S6 for selecting a payment channel based on the user's regional characteristics are as follows: S61. The currently running mini-program code package calls the unified payment interface of the platform adapter and sends the user's regional characteristics and the platform identifier of the currently running platform to the server; S62. The server queries the preset payment routing strategy table based on the received platform identifier and user region characteristics to match the optimal payment channel; The payment routing strategy table uses platform identifier and user region characteristics as a combined primary key, and the specific matching logic is as follows: Prioritize matching payment channels where both the platform identifier and the user's region characteristics correspond; If no exact match is found, the default payment channel corresponding to the platform identifier will be matched first. S63. The server returns payment channel confirmation information to the mini-program code package, driving the native payment control of the currently running platform to guide the user to complete the payment; For example, to meet the payment habits of users in different regions, the mini-program constructs a payment channel selection mechanism, matching the optimal payment channel based on platform identification and user regional characteristics. For instance, when a user in country A places an order on a WeChat mini-program, the system prioritizes WeChat Pay, leveraging WeChat's social ecosystem and user payment habits to improve payment convenience. When a user in country B shops on an Alipay international mini-program, Alipay international payment in country B's currency is recommended first, while providing commonly used local payment methods as backup options. When a user in country C places an order on a ByteDance international mini-program, the system will match the Stripe payment channel; if the Stripe channel is temporarily unavailable, it will automatically switch to the PayPal payment channel.

[0026] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0027] like Figure 2 As shown, the following are embodiments of a cross-platform e-commerce mini-program implementation system based on a cross-platform framework provided in this disclosure. This system and the cross-platform e-commerce mini-program implementation methods based on a cross-platform framework described above belong to the same inventive concept. For details not described in detail in the embodiments of the cross-platform e-commerce mini-program implementation system based on a cross-platform framework, please refer to the embodiments of the cross-platform e-commerce mini-program implementation methods based on a cross-platform framework described above.

[0028] The system includes: The environment configuration and compilation module is used to pre-build a unified business logic source code and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package encapsulates a platform adapter. The environment adaptation module is used to load the internally encapsulated platform adapter in any mini-program code package runtime environment to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface. The product interaction and display module is used to respond to user operations in the currently running mini-program code package. It calls the unified rendering interface through the platform adapter to drive the WebGL rendering engine to render the preset 3D product model and binds a gesture controller to the 3D product model to respond to user touch screen operations. The localization and order module is used to respond to the user's regional settings and product selection operations in the currently running mini-program code package, call the unified localization interface of the platform adapter, drive the localization engine to perform localization processing of product information and product prices, and generate localized orders in response to the user's order operation; The order processing module is used to receive the order data in the currently running mini-program code package, call the unified network interface of the platform adapter, and send the order to the server for fragment processing. The payment and fulfillment module is used to respond to the user's payment instructions in the currently running mini-program code package, call the unified payment interface of the platform adapter, drive the native payment control of the currently running platform, and select a payment channel for payment based on the user's regional characteristics.

[0029] This embodiment achieves multi-platform compatibility, 3D product display, intelligent localization, and efficient order processing through the interactive collaboration of the environment configuration and compilation module, environment adaptation module, product interaction and display module, localization and order placement module, order processing module, and payment and fulfillment module, thereby improving user experience and business efficiency.

[0030] The cross-platform framework-based cross-border e-commerce mini-program implementation method provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0031] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.

[0032] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0033] A processor may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0034] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0035] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0036] The aforementioned electronic device implements the pre-built unified business logic source code of the cross-platform e-commerce mini-program implementation method of this application, and compiles the business logic source code based on the cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. Each mini-program code package encapsulates a platform adapter. In the runtime environment of any mini-program code package, the encapsulated platform adapter is loaded to call a unified interface and access the native functions of the currently running platform within the mini-program code package. The unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface. The currently running mini-program code package responds to user operations by viewing products, calling the unified rendering interface through the platform adapter to drive the WebGL rendering engine to render a preset 3D product model, and binding a gesture controller to the 3D product model to respond to user touch screen operations. The currently running mini-program code package also responds to user operations by setting the region and selecting products, calling the unified interface of the platform adapter. The localization interface drives the localization engine to perform localized processing of product information and prices, and to generate localized orders in response to user order placement. Upon receiving a localized order, the currently running mini-program code package calls the unified network interface of the platform adapter to send the order to the server for sharding processing. The currently running mini-program code package responds to user payment instructions by calling the unified payment interface of the platform adapter, driving the native payment controls of the currently running platform, and selecting the payment channel based on the user's regional characteristics. This technical solution improves code reusability and reduces development and maintenance costs through a cross-platform framework and platform adapter. The WebGL rendering engine and gesture controller provide interactive viewing of 3D product models, improving user experience and product conversion rates. The intelligent localization engine solves language barriers in cross-border e-commerce. The distributed order processing architecture implements sharding processing and a distributed locking mechanism, enabling high-concurrency order processing and improving order processing efficiency.

[0037] The storage medium provided in this application stores a program product capable of implementing a cross-platform e-commerce mini-program implementation method.

[0038] The implementation method of cross-border e-commerce mini-programs based on a cross-platform framework includes: pre-building unified business logic source code, compiling the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform, wherein each mini-program code package encapsulates a platform adapter; in the runtime environment of any mini-program code package, loading the encapsulated platform adapter to call a unified interface and access the native functions of the currently running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface; the currently running mini-program code package responds to the user's operation of viewing products by calling the unified rendering interface through the platform adapter to drive the WebGL rendering engine. The engine renders a preset 3D product model and binds a gesture controller to it to respond to user touch screen operations. The currently running mini-program code package responds to the user's region settings and product selection operations, calls the platform adapter's unified localization interface, drives the localization engine to perform localization processing of product information and prices, and generates a localized order in response to the user's order placement operation. After receiving the localized order, the currently running mini-program code package calls the platform adapter's unified network interface to send the order to the server for fragmentation processing. The currently running mini-program code package responds to the user's payment instructions, calls the platform adapter's unified payment interface, drives the native payment control of the currently running platform, and selects a payment channel based on the user's region characteristics to complete the payment.

[0039] In some possible implementations, the cross-platform framework-based cross-border e-commerce mini-program implementation method of this disclosure can be implemented as a program product, which includes program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.

[0040] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0041] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for implementing a cross-platform e-commerce mini-program, characterized in that, Includes the following steps: S1. Pre-build a unified business logic source code, and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package contains a platform adapter. S2. In the runtime environment of any mini-program code package, load the internally encapsulated platform adapter to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface; S3. The currently running mini-program code package responds to the user's operation of viewing products by calling the unified rendering interface through the platform adapter, driving the WebGL rendering engine to render the preset 3D product model, and binding a gesture controller to the 3D product model to respond to the user's touch screen operation; S4. The currently running mini-program code package responds to the user's region settings and product selection operations, calls the platform adapter's unified localization interface, drives the localization engine to perform localization processing of product information and product prices, and generates localized orders in response to the user's order placement operation; S5. After receiving a localized order, the currently running mini-program code package calls the unified network interface of the platform adapter to send the order to the server for fragmentation processing; S6. The currently running mini-program code package responds to the user's payment instruction, calls the platform adapter's unified payment interface, drives the native payment control of the currently running platform, and selects a payment channel to make the payment based on the user's regional characteristics.

2. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 1, characterized in that, The specific steps of step S1 are as follows: S11. Pre-write a platform adapter for each target platform, encapsulate the native application programming interface of the target platform, and generate a platform adapter library; S12. Write unified source code for cross-border e-commerce business logic; S13. Identify the target platforms and declare each target platform in the cross-platform framework's configuration file; S14. Use a cross-platform framework compiler to compile the cross-border e-commerce business logic source code, configuration files, and platform adapter library to generate an independent mini-program code package for each target platform; each mini-program code package contains the business logic source code and the corresponding platform adapter for the target platform.

3. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 2, characterized in that, The specific steps of step S2 are as follows: S21. When a cross-border e-commerce mini-program starts, it loads the platform adapter integrated into the current mini-program's code package; S22. During business logic execution, the native functions of the currently running platform are accessed through the unified native application interface provided by the platform adapter.

4. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 2, characterized in that, The business logic source code includes the product display logic; The specific steps of step S3 are as follows: S31. The currently running mini-program code package responds to the user's operation of viewing products and executes the product display logic; S32. Obtain the 3D product model pre-stored on the server through the product display logic, call the unified rendering interface provided by the platform adapter, and drive a WebGL engine to load and render the 3D product model; S33. Bind a gesture controller to the currently rendered 3D product model to respond to the user's touch screen operation and perform interactive actions such as rotation, scaling and sectioning on the rendered 3D product model.

5. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 2, characterized in that, The business logic source code includes localization and order logic; The specific steps of step S4 are as follows: S41. The currently running mini-program code package responds to the user's region setting operation and executes localization and order logic; S42. By calling the platform adapter's unified localization interface through localization and order logic, the localization engine is driven to perform the following processing: S421. Match specialized terms from the product information using a pre-defined localized terminology database; If a match is generated, localized product information will be produced. If no match is found, the machine translation service interface is invoked to translate and generate localized product information; S422. Obtain the user-set region in real time, convert the original price of the goods according to the exchange rate information corresponding to the region, and generate a localized price for the goods; S43. Display the processed localized product information and localized product prices to the user; S44. Respond to the user's order placement and generate a localized order that includes the user's regional characteristics and localized pricing.

6. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 1, characterized in that, The specific steps of step S5 are as follows: S51. After receiving an order, the server segments the order data according to the user's region characteristics and the order amount. S52. The server distributes the fragmented orders to different processing queues through message queues; S53. When the server uses distributed locks to process preset critical processes, it ensures the atomicity of the critical processes.

7. The method for implementing a cross-platform e-commerce mini-program based on a cross-platform framework according to claim 1, characterized in that, The specific steps for selecting a payment channel based on user region characteristics in step S6 are as follows: S61. The currently running mini-program code package calls the unified payment interface of the platform adapter and sends the user's regional characteristics and the platform identifier of the currently running platform to the server; S62. The server queries the preset payment routing strategy table based on the received platform identifier and user region characteristics to match the optimal payment channel; S63. The server returns payment channel confirmation information to the mini-program code package, driving the native payment control of the currently running platform to guide the user to complete the payment.

8. A cross-platform e-commerce mini-program implementation system, characterized in that, include: The environment configuration and compilation module is used to pre-build a unified business logic source code and compile the business logic source code based on a cross-platform application development framework to generate several mini-program code packages corresponding to each target platform. The mini-program code package encapsulates a platform adapter. The environment adaptation module is used to load the internally encapsulated platform adapter in any mini-program code package runtime environment to call the unified interface and access the native functions of the current running platform in the mini-program code package; the unified interface includes a unified rendering interface, a unified localization interface, a unified network interface, and a unified payment interface. The product interaction and display module is used to respond to user operations in the currently running mini-program code package. It calls the unified rendering interface through the platform adapter to drive the WebGL rendering engine to render the preset 3D product model and binds a gesture controller to the 3D product model to respond to user touch screen operations. The localization and order module is used to respond to the user's regional settings and product selection operations in the currently running mini-program code package, call the unified localization interface of the platform adapter, drive the localization engine to perform localization processing of product information and product prices, and generate localized orders in response to the user's order operation; The order processing module is used to receive the order data in the currently running mini-program code package, call the unified network interface of the platform adapter, and send the order to the server for fragment processing. The payment and fulfillment module is used to respond to the user's payment instructions in the currently running mini-program code package, call the unified payment interface of the platform adapter, drive the native payment control of the currently running platform, and select a payment channel for payment based on the user's regional characteristics.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method for implementing a cross-platform e-commerce mini-program based on any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for implementing a cross-platform e-commerce mini-program based on any one of claims 1 to 7.