Jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method and system
By establishing multi-level association mapping relationships in the jewelry cloud distribution platform, the problems of data inconsistency, price lag, and overselling risks caused by data replication schemes have been solved. This has improved the efficiency of product listing and the accuracy of transaction data, and adapted to the parameter processing needs of multiple jewelry categories.
Patent Information
- Application Number
- CN202611320148.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-24
AI Technical Summary
Existing jewelry cloud distribution platforms have several issues in the retailer product selection and listing process. These include: data replication schemes leading to downstream stores being unable to synchronize with upstream data changes in real time; price fluctuations causing synchronization delays; asynchronous inventory synchronization posing a risk of overselling; and the complexity of multiple jewelry categories requiring retailers to manually input data, resulting in low listing efficiency.
Establish a multi-level association mapping relationship between cloud warehouse products and retail stores, including basic information mapping, dynamic price mapping and inventory synchronization mapping. Replace physical data copying with logical references, obtain authoritative upstream data in real time and transmit it instantly when the certificate changes, dynamically calculate and display prices, and lock upstream inventory in reverse when an order is placed. It also supports adaptive parameter processing for multiple product categories.
It achieves real-time linkage and personalized display of upstream and downstream data, eliminates synchronization delay and overselling risk, accelerates product launch efficiency and ensures the accuracy of transaction data, and solves the problems of high storage redundancy, large synchronization delay and lack of parameter adaptive processing caused by the replication architecture of existing technologies.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of e-commerce data processing technology, and in particular to a method and system for dynamic listing and display of multi-level association mapping of jewelry cloud distribution products. Background Technology
[0002] Jewelry cloud distribution platforms are crucial infrastructure connecting upstream suppliers and downstream retailers. Retailers select products from upstream cloud warehouses and list them in their own stores for sale. Jewelry, especially loose diamonds, is characterized by a large number of SKUs, complex parameters, and prices significantly affected by real-time fluctuations in international gold prices. The 4Cs, certificate numbers, fluorescence grades, and other attribute data for loose diamonds are sourced from authoritative third-party appraisal institutions, ensuring immutability and strong correlation. Product prices are dynamically calculated based on international loose diamond quotes, exchange rates, and other variables, rather than remaining fixed. Inventory management of high-value goods requires extremely high data consistency; overselling can lead to serious transaction disputes.
[0003] However, existing cloud distribution platforms generally employ a data replication solution in the retailer's product selection and listing process. This involves the system copying a snapshot of the product data from the cloud warehouse and storing it in the retailer's store after the retailer selects the products. This solution has the following inherent technical flaws in the jewelry industry: First, when upstream certificate data or product attributes change, the data copies in each downstream store cannot be updated in real time, leading to inconsistencies between front-end and back-end data. Second, international gold prices fluctuate frequently in real time, and there is a delay window in the scheduled batch synchronization of price data, causing the prices displayed on the retail end to lag behind the actual market prices. Third, inventory data is synchronized asynchronously between upstream and downstream, posing a risk of overselling in multiple stores under high-concurrency scenarios. Furthermore, the diverse product categories in the jewelry industry require varying parameter dimensions, making it difficult to directly adapt to the product attribute structures of general e-commerce platforms. Downstream retailers need to manually input a large number of professional parameters, resulting in low listing efficiency.
[0004] In the prior art, patent number CN108600323B discloses a multi-center data sharing system and its usage method. After a distributor selects a product, they search for the product data in the database using the product ID and update it to the distributor's store cache data area. Although this method achieves product data sharing through ID lookup, it is essentially still a data snapshot mode: the data obtained is an instantaneous snapshot at the time of query, and the cache will not be automatically updated after upstream data changes. The next update depends on the next lookup trigger. Furthermore, this method only involves ID lookup of basic product information, does not layer the mapping relationship according to data type and synchronization requirements, and does not involve the reference of price calculation formulas or the reverse locking mechanism of inventory.
[0005] Patent No. CN121259948A discloses an unmanned vending machine application system based on radio frequency identification technology. Its real-time price calculation module connects to an authoritative data source and calculates the real-time selling price according to a preset formula. However, its formula is a simple summation formula (weight × real-time gold price + processing fee). It does not disclose the technical means of parsing the pricing formula to construct an expression tree and obtaining multi-source real-time variables in parallel. Its RFID fault alarm mechanism belongs to the hardware level fault detection and manual intervention processing. It does not disclose the software level automatic degradation switching and time-of-use marking mechanism.
[0006] Therefore, in the context of jewelry cloud distribution, how to achieve real-time synchronization of upstream and downstream product data, dynamic price calculation, and inventory consistency assurance using a non-replicable data architecture, while supporting adaptive parameter processing for multiple product categories and possessing automatic fault tolerance and degradation capabilities at the software level, is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] The first objective of this invention is to provide a method for dynamic listing and display of multi-level related mapping of jewelry cloud distribution products. This method aims to solve the problems of existing cloud distribution platforms using data replication schemes in the product selection and listing process of retailers, which result in downstream stores being unable to synchronize in real time when upstream data changes, price synchronization delays due to fluctuations in international gold prices, and the risk of overselling due to asynchronous inventory synchronization. Additionally, the complexity of the parameters of multiple jewelry categories leads to retailers having to manually supplement data, resulting in low listing efficiency.
[0008] To address the aforementioned technical issues, a method for dynamically listing and displaying jewelry products through multi-level association mapping is provided, including the following steps:
[0009] S1. A multi-level association mapping between cloud warehouse products and retailer stores is established. In response to the retailer's product selection operation in the cloud warehouse, a multi-level association mapping relationship is established between the retailer's store and the cloud warehouse products. The multi-level association mapping relationship consists of three types of logical references: basic information mapping, dynamic price mapping, and inventory synchronization mapping, forming an overall mapping architecture. The basic information mapping is a logical reference to the immutable attribute data of products in the cloud warehouse. The dynamic price mapping is a logical reference to the price calculation formula of products in the cloud warehouse. The inventory synchronization mapping is a logical reference to the inventory deduction strategy of products in the cloud warehouse. The three types of logical references correspond to the authority dimension, real-time dimension, and consistency dimension of product data, respectively.
[0010] S2. Real-time acquisition of product data and dynamic price calculation: Based on the multi-level association mapping relationship, the attribute data of the product is obtained from the cloud warehouse in real time through the basic information mapping; the price calculation formula is parsed through the dynamic price mapping and the current variable value is substituted to dynamically calculate the product display price; and the inventory status is obtained through the inventory synchronization mapping.
[0011] S3. Detail page template matching and personalization injection: Match the corresponding detail page rendering template according to the product category characteristics, inject the obtained attribute data, the calculated display price and the inventory status into the rendering template, display the available or sold-out inventory indicators in the product detail page according to the inventory status, and overlay the retailer's store custom decoration elements to generate the product detail page;
[0012] S4. Multi-terminal adaptive rendering: Identify the terminal type accessing the product details page, and perform adaptive layout rendering of the product details page according to the terminal type; the terminal type includes mini-program terminal, WeChat H5 terminal, and shared poster terminal.
[0013] In one embodiment, the immutable attribute data of the basic information mapping includes the diamond certificate number and 4C parameters. The basic information mapping is a reference pointer to the corresponding certificate record in the cloud warehouse diamond database. When the upstream certificate data changes, the change is immediately transmitted to all downstream stores that have established the basic information mapping through the reference pointer.
[0014] In one embodiment, the price calculation formula for the dynamic price mapping includes international loose diamond price variables, premium coefficients, and fixed processing fees, and its expression is:
[0015] ;
[0016] in, To display the price of the product, Real-time international quotes for loose diamonds. This is the premium factor. For fixed labor costs, For exchange rate; when the stated or the aforementioned When changes occur, the system automatically triggers price recalculation based on the dynamic price mapping, without requiring upstream suppliers to actively push price update notifications. The price calculation formula is preset by the upstream supplier and stored in the cloud warehouse price strategy table. The dynamic price mapping references the logical pointer of the calculation formula, rather than the numerical value of the calculation result.
[0017] In one embodiment, the inventory deduction strategy of the inventory synchronization mapping includes a safety stock warning number and an oversold threshold. When a downstream order is generated and payment is completed, the system initiates an inventory lock request to the upstream cloud warehouse through the inventory synchronization mapping. If the lock is successful, a confirmation signal is returned. If the lock fails, the order is suspended and the retailer is notified.
[0018] In one embodiment, parsing the price calculation formula includes: converting the infix expression to a postfix expression, constructing an expression tree, wherein the leaf nodes of the expression tree are variable identifiers or constants, and the non-leaf nodes are operators; the variable identifiers include and The constants include and .
[0019] In one embodiment, the dynamic calculation of the product display price by substituting the current variable value includes: initiating requests to the international loose diamond quotation interface and the exchange rate interface in parallel to obtain... and The real-time values; the acquired real-time values are cached in Redis, the... The cache expiration time is 5 minutes. The cache expiration time is 1 minute; the timeout time for the parallel requests is configured independently, and when any interface request fails, the cache value corresponding to that interface is used as the fallback variable value for calculation.
[0020] In one embodiment, the inventory deduction strategy of the inventory synchronization mapping includes a safety stock warning number and an oversold threshold. When a downstream order is generated and payment is completed, the system initiates an inventory lock request to the upstream cloud warehouse through the inventory synchronization mapping. If the lock is successful, a confirmation signal is returned. If the lock fails, the order is suspended and the retailer is notified.
[0021] In one embodiment, the matching of the corresponding details page rendering template based on the product category characteristics includes: a diamond template that highlights the cut ratio diagram and certificate information for loose diamonds, a jadeite template that highlights the color and texture grading indicators for jadeite, and a gold template that highlights the weight and labor cost details for gold.
[0022] In one embodiment, when the terminal type is a sharing poster terminal, the main image, title and display price of the product are extracted, and intelligently arranged with the distributor's custom copy and distributor's exclusive QR code to generate a sharing image, and a deep link pointing to the product details page is embedded in the sharing image.
[0023] The second objective of this invention is to provide a dynamic listing and display system for multi-level association mapping of jewelry cloud distribution products, which aims to solve the problems of high storage redundancy and large synchronization latency caused by the replication architecture of existing cloud distribution systems, as well as the lack of parameter adaptive processing mechanism for the characteristics of multiple jewelry categories.
[0024] To address the aforementioned technical issues, a dynamic product listing and display system with multi-level association mapping for jewelry cloud distribution is provided. The method for implementing this system includes:
[0025] The mapping relationship establishment module is used to respond to the retailer's product selection operation in the cloud warehouse and establish a multi-level association mapping relationship between the retailer's store and the cloud warehouse products. The multi-level association mapping relationship consists of three types of logical references: basic information mapping, dynamic price mapping, and inventory synchronization mapping, which form an overall mapping architecture. The basic information mapping is a logical reference to the immutable attribute data of products in the cloud warehouse, the dynamic price mapping is a logical reference to the price calculation formula of products in the cloud warehouse, and the inventory synchronization mapping is a logical reference to the inventory deduction strategy of products in the cloud warehouse. The three types of logical references correspond to the authority dimension, real-time dimension, and consistency dimension of product data, respectively.
[0026] The data acquisition and calculation module is used to acquire product attribute data from the cloud warehouse in real time through the basic information mapping based on the multi-level association mapping relationship, parse the price calculation formula through the dynamic price mapping and dynamically calculate the product display price by substituting the current variable value, and acquire the inventory status through the inventory synchronization mapping.
[0027] The template injection and page generation module is used to match the corresponding detail page rendering template according to the product category characteristics, inject the acquired attribute data, the calculated display price and the inventory status into the rendering template, display the available or sold-out inventory indicators in the product detail page according to the inventory status, and overlay the retailer's store custom decoration elements to generate the product detail page;
[0028] A multi-terminal rendering module is used to identify the terminal type accessing the product details page and to perform adaptive layout rendering of the product details page according to the terminal type. The terminal types include mini-program terminal, WeChat H5 terminal, and shared poster terminal.
[0029] In one embodiment, the data acquisition and calculation module further includes: a price formula parsing unit, which parses the price calculation formula in the dynamic price mapping, identifies variable identifiers and operators in the formula, and constructs an executable expression tree; a real-time variable acquisition unit, which acquires the real-time values corresponding to the variable identifiers from external data sources, including international loose diamond price interfaces and exchange rate interfaces; the real-time variable acquisition unit is also used to use the cached value corresponding to the interface as a fallback variable value in the calculation when any interface request fails; and a calculation execution unit, which substitutes the real-time values into the expression tree, performs the calculation, and outputs the displayed price of the product.
[0030] In one embodiment, the mapping relationship establishment module is also used to store the multi-level association mapping relationship in the form of metadata, recording the logical reference path, synchronization strategy and degradation processing rules when failure occurs; when the upstream cloud warehouse system is unavailable, the data acquisition and calculation module calls the most recent valid data in the local cache according to the degradation processing rules, and marks the data timeliness status, and automatically switches back to real-time reference mode after the upstream system recovers.
[0031] Implementing the embodiments of the present invention will have the following beneficial effects:
[0032] 1. The jewelry cloud distribution product multi-level association mapping dynamic listing and display method in this embodiment establishes three types of logical reference relationships between cloud warehouse products and retail stores: basic information mapping, dynamic price mapping, and inventory synchronization mapping. This replaces the physical data copying in traditional solutions with logical references. The basic information mapping obtains authoritative upstream data in real time and transmits it to all downstream stores immediately when certificates change. The dynamic price mapping parses the price calculation formula and dynamically calculates the display price by substituting real-time variables. The inventory synchronization mapping locks upstream inventory in reverse when an order is placed. Compared to existing data copying solutions, this method solves the problems of inconsistency between front-end and back-end data caused by downstream stores' inability to synchronize upstream data in real time, price lag caused by timed synchronization in scenarios of fluctuating international gold prices, and the risk of overselling in multiple stores caused by asynchronous inventory synchronization in high-concurrency ordering scenarios. It achieves real-time linkage between upstream and downstream data while maintaining personalized display, eliminating synchronization delays and overselling risks, accelerating product listing efficiency, and ensuring the accuracy of transaction data.
[0033] 2. The jewelry cloud distribution product multi-level association mapping dynamic listing and display system in this embodiment uses a mapping relationship establishment module to store logical reference relationships in the form of metadata. The data acquisition and calculation module completes formula parsing, variable acquisition, and price calculation through a three-level pipeline of price formula parsing unit, real-time variable acquisition unit, and calculation execution unit. The template injection and page generation module automatically matches and renders templates based on category characteristics and integrates standardized product data with personalized decoration elements. The multi-terminal rendering module achieves multi-terminal adaptive display. Compared with existing systems, this system solves the technical defects of existing cloud distribution systems, such as high storage redundancy, large synchronization latency, and lack of atomicity guarantee for inventory deduction caused by the data synchronization architecture of replication, as well as the lack of parameter adaptive processing mechanism for the multi-category characteristics of jewelry. It provides reliable technical support for flexible product management and efficient listing and display of jewelry cloud distribution platforms. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of the dynamic listing and display method for multi-level association mapping of jewelry cloud distribution products according to Embodiment 1 of the present invention;
[0036] Figure 2 This is a diagram of the jewelry cloud distribution product multi-level association mapping dynamic listing and display system architecture as described in Embodiment 2 of the present invention;
[0037] Figure 3 This is a schematic diagram of the multi-level association mapping relationship and data synchronization interaction described in Embodiment 1 of the present invention;
[0038] Figure 4 This is a schematic diagram of the details page template matching and multi-terminal adaptive rendering described in Embodiment 1 of the present invention. Detailed Implementation
[0039] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0040] It should be noted that when a component is said to be "fixed to" another component, it can be directly attached to the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0042] Example 1
[0043] Please refer to Figure 1 , 34. Embodiment 1 of the present invention provides a method for dynamic listing and display of multi-level related mapping of jewelry cloud distribution products. This embodiment includes:
[0044] First, a multi-level association mapping engine is built on the server side of the cloud distribution platform to establish multi-level association mapping relationships between retailer stores and cloud warehouse products when retailers select products. The multi-level association mapping relationships are stored in the platform's mapping relationship database in the form of metadata. Each mapping record contains the following fields: mapping unique identifier, retailer ID, store ID, cloud warehouse product ID, mapping type identifier, logical reference path, synchronization strategy configuration, and failure degradation rules.
[0045] In one specific embodiment, the mapping type identifier is used to distinguish three types of mapping relationships: type "01" represents basic information mapping, type "02" represents dynamic price mapping, and type "03" represents inventory synchronization mapping. The logical reference path records the access address of the corresponding data in the cloud warehouse, including the database connection string, data table name, and primary key value, rather than a copy of the data itself. The synchronization strategy configuration defines the triggering conditions and frequency of data updates. The failure degradation rule defines the local data retrieval strategy when the upstream cloud warehouse system is unavailable.
[0046] Retailers browse jewelry products posted by suppliers through the "Cloud Warehouse Products" interface of the Speedybao mini-program. The Cloud Warehouse Products interface displays product thumbnails, certificate numbers, a summary of the 4Cs of loose diamonds, and the supplier's reference price in a list format. Retailers select target products and click the "One-Click Product Selection" button. The client sends a product selection request to the server, with the request body containing the retailer ID, store ID, and a list of selected product IDs.
[0047] After receiving a product selection request, the server-side mapping relationship establishment module creates a mapping record for each selected product. In a specific embodiment, for a loose diamond with certificate number GIA1234567890, the mapping relationship establishment process is as follows:
[0048] Basic Information Mapping Establishment: The mapping relationship establishment module queries the cloud warehouse product database based on the product ID to obtain the product's certificate number GIA1234567890. The system sets the mapping type identifier to "01," and the logical reference path points to the data record in the cloud warehouse diamond database with this certificate number as the primary key. The referenced fields include: certificate number (cert_no), carat weight, color grade, clarity grade, cut grade, fluorescence grade, and certificate type (cert_type). The synchronization strategy is configured as "event-driven": when any referenced field of the certificate record in the cloud warehouse changes (e.g., the certificate status changes from "valid" to "cancelled"), the system automatically triggers an update through the database change capture mechanism, marking all downstream mapping relationships referencing this record as "pending update," and fetching the latest data during the next data retrieval. In one specific embodiment, the database change capture mechanism is implemented based on MySQL's binlog log parsing, and the change event is captured and pushed to the mapping relationship update queue within milliseconds.
[0049] Dynamic price mapping establishment: The mapping relationship establishment module obtains the price calculation formula set by the supplier for this product. In a specific embodiment, this formula is stored in the cloud warehouse product pricing strategy table, recording the formula template and variable mapping relationship as structured fields. The storage format of the formula template is as follows: ,in This is a variable in the real-time international price of loose diamonds. This is the premium factor. For fixed labor costs, This is the exchange rate variable. The system sets the mapping type identifier to "02", the logical reference path points to this price strategy record, and the synchronization strategy is configured as "real-time calculation on demand": calculation is triggered every time the front end requests the product display price, without timed caching.
[0050] Inventory synchronization mapping establishment: The mapping relationship establishment module obtains the inventory deduction strategy configured by the supplier for this product. In a specific embodiment, the inventory deduction strategy includes a safety stock warning number (e.g., 5 units) and an oversold threshold (the maximum quantity allowed to be oversold). The system sets the mapping type identifier to "03", the logical reference path points to the inventory field corresponding to the product ID in the cloud warehouse inventory data table, and the synchronization strategy is configured as "transaction synchronization": after the downstream order payment is completed, an inventory lock request is initiated within the database transaction.
[0051] When a consumer accesses a product's details page through a retailer's own mini-program store, the system triggers a real-time product data acquisition and dynamic price calculation process. The data acquisition and calculation module performs data acquisition in parallel based on the three types of mapping relationships established in S1:
[0052] For basic information mapping, the module initiates a query to the cloud warehouse diamond database via a logical reference path. The SQL statement is: SELECT cert_no,carat,color,clarity,cut,fluorescence,cert_type FROM diamond_cert_db WHERE cert_no='GIA1234567890'. The query result contains all 4C parameters and certificate information for the diamond. In one specific embodiment, the query result is also cached in Redis with the cache key name cert:{certificate number} and a cache expiration time set to 24 hours to reduce frequent access to the upstream database. When the upstream certificate data changes, the change capture mechanism proactively pushes a cache expiration notification, clears the corresponding cache key, and retrieves the latest data from the database on the next query.
[0053] For dynamic price mapping, after obtaining the price calculation formula template, the module parses it through the price formula parsing unit. In one specific embodiment, the price formula parsing unit uses a reverse Polish notation algorithm to process the formula template. First, the infix expression... Convert to postfix expression Then, an expression tree is constructed, with leaf nodes representing variable identifiers or constants and non-leaf nodes representing operators. The root node of the expression tree is the multiplication operator, and its left subtree contains addition operations. ), the right subtree is Variables. Variable identifiers include: (International loose diamond price) (USD to RMB exchange rate).
[0054] The real-time variable acquisition unit initiates requests to two external data sources simultaneously in parallel, based on the variable identifiers in the expression tree. In one specific embodiment, international loose diamond prices are obtained by calling the RapNet official API, with the request URL format being https: / / api.rapnet.com / v2 / price?carat={carat weight}&color={color}&clarity={clarity}, returning real-time price data in JSON format, with a request timeout set to 3 seconds. Exchange rate data is obtained by calling the Bank of China foreign exchange rate API, with the request URL format being https: / / api.boc.cn / exchange / rate?currency=USD, returning real-time exchange rate data in JSON format. The real-time variable acquisition unit initiates requests to the two external data sources simultaneously in parallel to reduce overall response latency. In one specific embodiment, the response data from the external data sources is also cached in Redis, with the international loose diamond price cache expiration time set to 5 minutes (because loose diamond prices are relatively stable), and the exchange rate cache expiration time set to 1 minute (because exchange rates fluctuate more frequently). The timeout for parallel requests is configured independently. When any interface request times out or returns an error, the system uses the Redis cached value corresponding to that interface as a fallback variable value to be substituted into the expression tree for calculation, ensuring that a single interface failure does not affect the overall price calculation process.
[0055] The computational execution unit substitutes the acquired real-time variable values into the expression tree for calculation. In one specific embodiment, for a 1.00-carat, D-color, VS1 clarity loose diamond, the RapNet API returns a real-time quote of $14,500, with a current exchange rate of 7.25, and the supplier sets a premium factor. Fixed labor cost is 1.15. The value is 500 yuan. The computation execution unit performs expression tree calculations: The result is the displayed price of the product, along with a detailed breakdown of the price calculation (loose diamond quote, premium factor, labor costs, exchange rate) to enhance price transparency.
[0056] For inventory synchronization mapping, the module initiates a query to the cloud warehouse inventory data table through a logical reference path to obtain the current inventory quantity. If the inventory quantity is greater than zero, it returns the inventory status indicator "available for sale"; if the inventory quantity is equal to zero, it returns the inventory status indicator "sold out"; if the inventory quantity is lower than the safety stock warning number, it returns the inventory status indicator "shortage" along with the current inventory quantity.
[0057] After data acquisition is complete, the process moves to the product details page template matching and personalization phase. The template injection and page generation module matches the corresponding product details page rendering template based on the product's category characteristics.
[0058] In one specific embodiment, the matching rules between category features and rendering templates are shown in the table below:
[0059] Table 1 Category-Template Matching Rules
[0060]
[0061] In one specific embodiment, the rendering template is stored in JSON format, defining the page's component layout tree. Taking the loose diamond template TPL_DIA_001 as an example, its component layout tree is defined as follows: the root node is the details page container, containing the top main image carousel area, price display area, inventory indicator area, 4C parameter table area, cut radar chart area, certificate information card area, and bottom operation area. The component type, data binding fields, and style parameters for each area are predefined in the template JSON.
[0062] The template injection and page generation module injects the attribute data, calculated display price, and inventory status obtained by S2 according to the data binding fields defined in the template JSON. In one specific embodiment, the carat (carat weight) field in the attribute data is bound to the "carat weight" cell in the 4C parameter table area; color (color grade) is bound to the "color" cell; the display price is bound to the price text component in the price display area; and the inventory status is bound to the inventory label area. When the inventory status is "available," a green "in stock available" label is displayed; when the inventory status is "short supply," an orange "short supply" label is displayed; and when the inventory status is "sold out," a gray "temporarily sold out" label is displayed.
[0063] After the page is generated, it enters the multi-terminal adaptive rendering stage. The multi-terminal rendering module identifies the terminal type accessing the product details page. In one specific embodiment, terminal type identification is achieved by parsing the User-Agent field in the HTTP request header. If the User-Agent contains the "MiniProgram" identifier, it is determined to be a mini-program terminal; if the User-Agent contains "MicroMessenger" but does not contain "MiniProgram", it is determined to be a WeChat H5 terminal; if the request originates from a poster generation service, it is determined to be a poster sharing terminal.
[0064] Based on the terminal type, the multi-terminal rendering module performs adaptive layout rendering of the product details page. In a specific embodiment, the rendering parameter configurations for different terminal types are shown in the table below:
[0065] Table 2 Multi-device adaptive rendering parameters
[0066]
[0067] When the terminal type is a shared poster terminal, the system extracts the highest resolution version of the product's main image, the title text, and the displayed price, and intelligently arranges them with the distributor's custom copy and exclusive QR code. In one specific embodiment, the poster layout is as follows: the top displays the product's main image (750px wide, 600px high, centered and cropped); below the product's main image, a semi-transparent black gradient mask is overlaid, displaying the displayed price (bold white font, 48px); below the price, the product title is displayed (white font, 32px, truncated to a maximum of two lines); the bottom left of the poster displays the distributor's custom copy (24px font, color of the brand's main color), and the bottom right embeds the distributor's exclusive mini-program QR code (150px × 150px), with the prompt "Long press to identify and view details" displayed below the QR code. The generated poster is output in JPEG format, with the quality parameter set to 90%, and the file size controlled within 500KB. While the poster is being generated, the system embeds a deep link encoding into the QR code. The URL format of the deep link is / pages / product / detail?id={product ID}&referrer={distributor ID}. After scanning the code, consumers can directly jump to the product details page. At the same time, the system records the distribution relationship chain based on the referrer parameter and links it to the performance data table of the corresponding distributor.
[0068] In one specific embodiment, when the upstream cloud warehouse system becomes unavailable due to network failure or server maintenance, the system automatically switches the data processing mode according to the failure degradation rules configured in S1. The degradation trigger condition is: three consecutive data requests to the upstream cloud warehouse system all return timeout or connection rejection errors. After degradation is triggered, the system calls the most recently successfully retrieved valid data in the Redis cache as the degradation data source. For basic information data, immutable attribute data such as certificate number and 4C parameters directly use the cached values; for dynamic price data, the most recent calculation result in the cache is used, and a timely reminder is added to the details page: "The price may not reflect the latest gold price fluctuations, please refer to the actual price quoted by the store"; for inventory data, due to high real-time requirements, the inventory indicator is not displayed during the degradation period, and a reminder is added to the details page: "Inventory status is temporarily unavailable, please consult customer service before placing an order." The system sends a health check request (ping) to the upstream cloud warehouse system every 30 seconds. After three consecutive successful health checks, the system automatically switches from degradation mode back to real-time reference mode, restoring real-time retrieval of all data fields.
[0069] To verify the actual technical effect of the present invention, the applicant conducted a comparative test on its own Suyibao cloud distribution platform. The test selected 50 items from each of three typical jewelry categories on the platform as test samples: loose diamonds, jade pendants, and gold jewelry. The benchmark for comparison was the functional module of a cloud distribution platform using a data replication scheme in existing technologies.
[0070] The test recorded the end-to-end time from the retailer completing the product selection process to the successful publication and display of the product on the retailer's store front end. Under existing data replication solutions, the system needs to copy all attribute data and image resources of the products from the cloud warehouse to the retailer's store database, and then transcode and distribute the images via CDN. The average time for a single product to be listed is approximately 45 seconds, with image resource processing accounting for over 60% of the time. Using the method of this invention, only one metadata record needs to be written during the mapping relationship establishment phase. Attribute data is obtained in real-time through logical references without copying, and image resources directly reference the cloud warehouse CDN address without transcoding. The average time for a single product to be listed is reduced to less than 3 seconds, an acceleration of approximately 93%. For retailers selecting 100 products in a single batch, the existing solution takes approximately 75 minutes, while the method of this invention only takes approximately 5 minutes.
[0071] In data consistency verification testing, testers simulated an upstream supplier changing the certificate status of an already listed loose diamond (changing the certificate status from "valid" to "cancelled"). Under the existing data replication scheme, the downstream stores' product detail pages still displayed the original certificate information until the next scheduled synchronization task was executed (the default interval is 2 hours). During this period, in 5 simulated orders, 3 consumers unknowingly placed orders for products with cancelled certificates. After adopting the method of this invention, the upstream change event is transmitted to all related downstream stores through mapping relationships within 300 milliseconds. When consumers visit the detail page again, the system displays the message "Certificate status has been updated, please consult customer service."
[0072] The above comparative test data demonstrates that the method of this invention can effectively shorten product listing time, ensure real-time consistency of upstream and downstream data, and guarantee service availability through an intelligent degradation mechanism in the jewelry cloud distribution scenario. The above test data are comparative test records completed by our company's R&D department from December 2025 to March 2026. The original test logs are retained for future reference. The time consumption data is the difference in system execution timestamps recorded in the server-side logs, and the data synchronization latency is the difference in timestamps between the change event trigger time and the downstream store data update time.
[0073] To further illustrate the essential differences between this invention and existing technologies, a comparison is made at the data architecture level:
[0074] It is necessary to explain the fundamental technical difference between the "logical reference" mechanism of this invention and the existing "ID lookup" scheme. The existing ID lookup scheme queries the database using the product ID when a customer browses products and updates the data to the cache. The retrieved data is a snapshot at the moment of the query; the cache does not automatically update after upstream data changes, and the next update depends on the next lookup trigger. The "reference pointer" mechanism used in this invention establishes a persistent logical reference chain. This reference chain actively triggers update notifications through a change capture mechanism when upstream data changes, achieving immediate transmission of changes, rather than passively waiting for the next query. The two differ fundamentally in their data update propagation mechanisms: the existing scheme is "passive retrieval," while this invention is "active push."
[0075] Existing data replication solutions copy all attribute data, image resources, and current price snapshots of products from the cloud warehouse to the retailer's store database when retailers select products. Essentially, this creates a data snapshot copy within a distributed system. The fundamental flaw of this solution is that there is no real-time data dependency between the snapshot copy and the source data; any changes to the source data cannot be proactively propagated to the copy. When upstream certificate status changes or international gold prices fluctuate, the copy data will inevitably lag, with the lag time equal to the interval between two synchronization tasks. Furthermore, each downstream store maintains an independent data copy, and when the number of upstream SKUs reaches hundreds of thousands, the storage redundancy caused by full replication increases linearly.
[0076] This invention does not copy any product data when retailers select products. Instead, it establishes a logical reference pointer to the cloud warehouse data. This reference pointer is a lightweight metadata (approximately 200 bytes per record) that records the physical storage location and access path of the data. When a consumer visits a product details page, the system retrieves the latest data from the cloud warehouse in real time through the reference pointer and performs price calculations. For price data, the system parses the price calculation formula to construct an expression tree, and obtains real-time variables from international loose diamond price interfaces and exchange rate interfaces in parallel, substituting them into the calculation to achieve second-level dynamic price updates based on market conditions. Compared to data replication schemes, the essential difference of this invention lies in replacing "physical replication" with "virtual references," changing the data distribution paradigm from "state synchronization" to "reference synchronization," thereby eliminating data consistency issues at the architectural level.
[0077] Implementing Embodiment 1 of the present invention will have the following beneficial effects:
[0078] By establishing three logical reference relationships between cloud warehouse products and retail stores—basic information mapping, dynamic price mapping, and inventory synchronization mapping—this approach replaces the physical data replication of traditional solutions with logical references. Basic information mapping acquires authoritative upstream data in real time and transmits it to all downstream stores instantly when certificates change. Dynamic price mapping parses price calculation formulas to construct expression trees, acquiring real-time variables such as international loose diamond prices and exchange rates in parallel and substituting them into the calculations, achieving second-level dynamic price updates based on market conditions. Inventory synchronization mapping locks upstream inventory in reverse when an order is placed. Compared to existing data replication solutions, this method solves the problems of inconsistency between front-end and back-end data caused by downstream stores' inability to synchronize upstream data in real time, price lag caused by timed synchronization in scenarios of fluctuating international gold prices, and the risk of overselling multiple stores caused by asynchronous inventory synchronization in high-concurrency order scenarios. It achieves real-time linkage between upstream and downstream data while maintaining personalized display, eliminating synchronization delays and overselling risks, accelerating product launch efficiency, and ensuring the accuracy of transaction data.
[0079] Example 2
[0080] The jewelry cloud distribution product multi-level association mapping dynamic listing and display system in this embodiment two protects a different subject from the jewelry cloud distribution product multi-level association mapping dynamic listing and display method in embodiment one. The specific differences are as follows:
[0081] The jewelry cloud distribution product multi-level association mapping dynamic listing and display system includes a mapping relationship establishment module, a data acquisition and calculation module, a template injection and page generation module, and a multi-terminal rendering module.
[0082] In one specific embodiment, the system is deployed using a microservice architecture, with each module running as an independent service process in a Docker container, and container orchestration and service discovery using Kubernetes. Inter-module communication uses the gRPC protocol, and message serialization uses Protocol Buffers format to ensure communication efficiency in high-concurrency scenarios. The system provides a RESTful API interface for the SpeedEasyPack mini-program client and the web management backend to access.
[0083] The mapping relationship establishment module is deployed in the mapping service container and is responsible for managing the multi-level association mapping relationship between cloud warehouse products and retailer stores. In one specific embodiment, the mapping relationship establishment module is developed using the Go language, and the mapping relationship data is persistently stored in a MySQL database, while frequently accessed mapping relationships are cached in Redis. The mapping relationship establishment module exposes the following core API interfaces: CreateMapping (create mapping relationship), DeleteMapping (delete mapping relationship), QueryMappingByShop (query mapping list by store), and UpdateSyncStrategy (update synchronization strategy).
[0084] In one specific embodiment, when the CreateMapping interface of the mapping relationship establishment module is called, the module performs the following transaction operations: First, it inserts a mapping record into the mapping_relation table in MySQL, containing a unique mapping identifier (UUIDv4 format), retailer ID, store ID, cloud warehouse product ID, mapping type identifier, logical reference path, and a JSON string of synchronization strategy configuration; then, it creates a corresponding cache key in Redis, with the naming rule of mapping:{store ID}:{product ID}, the cache value being the JSON serialized string of the mapping record, and the cache expiration time being set to 7 days; finally, it registers a listener event for the mapping relationship with the change capture service, and the registration information includes the name of the data table to be listened to, the primary key value to be listened to, and the callback notification address.
[0085] The data acquisition and calculation module is deployed in a data service container and is responsible for acquiring commodity data in real time and performing price calculations based on mapping relationships. In one specific embodiment, the data acquisition and calculation module includes three sub-modules: a price formula parsing unit, a real-time variable acquisition unit, and a calculation execution unit.
[0086] The price formula parsing unit is responsible for parsing the price calculation formulas in the dynamic price mapping. In one specific embodiment, the price formula parsing unit uses the ANTLR4 parser generation tool, which predefines the domain-specific language syntax rules for price calculation formulas. Supported operators include: addition (+), subtraction (-), multiplication (*), division ( / ), and nested parentheses. Supported variable identifier naming rules are strings that begin with an uppercase letter and are separated by underscores, such as... , Supported constant types include integers and floating-point numbers. The formula parsing process includes: a lexical analysis phase that splits the formula string into a token sequence (such as...). *Identifies as VARIABLEToken, *Identifies as MULToken); during the syntax analysis phase, the token sequence is constructed into an abstract syntax tree according to the syntax rules; during the semantic analysis phase, the variable identifier is checked to see if it is in the pre-registered variable dictionary (the pre-registered variable dictionary includes...). , , , If an unregistered variable exists, a parsing exception is thrown and an error log is logged.
[0087] The real-time variable acquisition unit is responsible for obtaining the real-time values corresponding to variable identifiers from external data sources. In one specific embodiment, the real-time variable acquisition unit adopts an adapter pattern design, implementing a unified data acquisition interface for each external data source. Data source adapters include RapNetPriceAdapter (interfacing with the international diamond price API), ExchangeRateAdapter (interfacing with the exchange rate API), etc. Each adapter encapsulates the authentication method, request format, response parsing logic, and exception retry strategy for the corresponding external data source. The real-time variable acquisition unit simultaneously sends requests to two external data sources in parallel. All real-time data obtained by the adapters is uniformly written to the Redis cache, with the cache key naming convention being var:{variable identifier}. The cache expiration time is 5 minutes. The cache expiration time is 1 minute. The timeout for parallel requests is configured independently. When any adapter request fails, the real-time variable acquisition unit uses the Redis cached value corresponding to the adapter as the fallback variable value and returns it to the calculation execution unit, ensuring that a single interface failure does not affect the overall price calculation process.
[0088] The calculation execution unit is responsible for substituting real-time variable values into the expression tree and performing calculations. In one specific embodiment, the calculation execution unit traverses the expression tree using the visitor pattern, performing the corresponding calculation operation for each node. For leaf nodes (variable nodes), the current value is obtained from the real-time variable acquisition unit; for leaf nodes (constant nodes), the constant value is read directly; for non-leaf nodes (operator nodes), their child nodes are recursively calculated before the operation is performed. The calculation result is a double-precision floating-point number, ultimately formatted as a price string with two decimal places. The calculation execution unit also generates a price calculation detail object, containing the values of each variable and intermediate calculation steps. The detail object is stored in JSON format in the calculation result for use by the front end when displaying price details.
[0089] The template injection and page generation module is deployed in the rendering service container and is responsible for matching rendering templates based on category characteristics and generating product detail pages. In one specific embodiment, the template injection and page generation module is developed based on the Node.js Express framework. The rendering template is written using the Handlebars template engine syntax, pre-compiled, and stored in the template cache. The template matching logic queries the template mapping table through the category identifier, obtains the corresponding template ID, and then loads the pre-compiled template from the template cache. The data injection process is implemented using the Handlebars data binding syntax {{variable_name}}. The module encapsulates product attribute data, display price, and inventory status into context data objects and calls the template rendering method to generate complete HTML fragments. The overlay of decoration elements is implemented by introducing retailer-customized partial template fragments through the {{>partial_name}} syntax in the template. These partial template fragments are stored in the retailer's store decoration configuration and dynamically combined with the main template for rendering.
[0090] The multi-terminal rendering module is deployed in a rendering service container, sharing the same service process as the template injection and page generation modules. In one specific embodiment, the multi-terminal rendering module identifies the terminal type by parsing the User-Agent field in the HTTP request header and selects the corresponding CSS stylesheet and layout parameters based on the terminal type. The mini-program uses the WeUI style library to adapt to the design specifications of WeChat mini-programs; the WeChat H5 uses a responsive CSSGrid layout, with single-column and double-column adaptive switching implemented at breakpoints of 375px and 768px; the poster sharing client calls the Puppeteer headless browser rendering engine to render the HTML page as a 750px wide screenshot in JPEG format with a quality parameter of 90%.
[0091] In one specific embodiment, the system further includes a monitoring and alarm module, deployed in a separate container, responsible for real-time monitoring of the operational status of each module. Monitoring metrics include: request volume and response latency for each API interface, Redis cache hit rate, external data source API call success rate and response time, mapping relationship creation and update frequency, and product details page generation time. When any metric exceeds a preset threshold, the monitoring and alarm module pushes an alarm message to operations and maintenance personnel via a WeChat Work robot.
[0092] Implementing Embodiment 2 of the present invention will have the following beneficial effects:
[0093] The system establishes logical reference relationships through a mapping module, storing them in metadata form. The data acquisition and calculation module completes formula parsing, variable acquisition, and price calculation via a three-tiered pipeline: a price formula parsing unit, a real-time variable acquisition unit, and a calculation execution unit. The template injection and page generation module automatically matches and renders templates based on product category characteristics, integrating standardized product data with personalized design elements. A multi-terminal rendering module enables adaptive display across multiple terminals. Compared to existing systems, this system addresses the technical shortcomings of existing cloud distribution systems, such as high storage redundancy, large synchronization latency, and lack of atomicity guarantees in inventory deduction due to the replication-based data synchronization architecture. It also solves the problem of lacking an adaptive parameter processing mechanism for the multi-category characteristics of jewelry, providing reliable technical support for flexible product management and efficient product display on the jewelry cloud distribution platform.
Claims
1. A multi-level association mapping dynamic on-shelf display method for jewelry cloud distribution commodities, characterized in that, Including the following steps: S1. A multi-level association mapping between cloud warehouse products and retailer stores is established. In response to the retailer's product selection operation in the cloud warehouse, a multi-level association mapping relationship is established between the retailer's store and the cloud warehouse products. The multi-level association mapping relationship consists of three types of logical references: basic information mapping, dynamic price mapping, and inventory synchronization mapping, forming an overall mapping architecture. The basic information mapping is a logical reference to the immutable attribute data of products in the cloud warehouse. The dynamic price mapping is a logical reference to the price calculation formula of products in the cloud warehouse. The inventory synchronization mapping is a logical reference to the inventory deduction strategy of products in the cloud warehouse. The three types of logical references correspond to the authority dimension, real-time dimension, and consistency dimension of product data, respectively. S2. Real-time acquisition of product data and dynamic price calculation: Based on the multi-level association mapping relationship, the attribute data of the product is obtained from the cloud warehouse in real time through the basic information mapping; the price calculation formula is parsed through the dynamic price mapping and the current variable value is substituted to dynamically calculate the product display price; and the inventory status is obtained through the inventory synchronization mapping. S3. Detail page template matching and personalization injection: Match the corresponding detail page rendering template according to the product category characteristics, inject the obtained attribute data, the calculated display price and the inventory status into the rendering template, display the available or sold-out inventory indicators in the product detail page according to the inventory status, and overlay the retailer's store custom decoration elements to generate the product detail page; S4. Multi-terminal adaptive rendering: Identify the terminal type accessing the product details page, and perform adaptive layout rendering of the product details page according to the terminal type; the terminal type includes mini-program terminal, WeChat H5 terminal, and shared poster terminal.
2. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 1, characterized in that, The immutable attribute data of the basic information mapping includes the diamond certificate number and 4C parameters. The basic information mapping is a reference pointer to the corresponding certificate record in the cloud warehouse diamond database. When the upstream certificate data changes, the change is immediately transmitted to all downstream stores that have established the basic information mapping through the reference pointer.
3. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 1, characterized in that, The price calculation formula for the dynamic price mapping includes international loose diamond price variables, premium coefficients, and fixed processing fees, and its expression is as follows: ; Wherein, is the commodity display price, is the international bare drill real-time price, is the premium coefficient, is the fixed labor cost, is the exchange rate; when the or the changes, the system automatically triggers price recalculation according to the dynamic price mapping; the price calculation formula is preset by the upstream supplier and stored in the cloud warehouse price strategy table, and the dynamic price mapping references the logical pointer of the calculation formula instead of the calculation result value.
4. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 3, characterized in that, The parsing the price calculation formula comprises: converting a middle expression into a postfix expression, constructing an expression tree, leaf nodes of the expression tree being variable identifiers or constants, and non-leaf nodes being operators; the variable identifiers comprise and , and the constants comprise and .
5. The method of claim 4, wherein, The dynamic calculation of the commodity display price by substituting the current variable value comprises: initiating a request to an international bare drill quotation interface and an exchange rate interface respectively in parallel to obtain and real-time values; the obtained real-time values are cached in Redis, the cache expiration time of the is 5 minutes, and the cache expiration time of the is 1 minute; the timeout time of the parallel request is independently configured, and when any interface request fails, the cache value corresponding to the interface is used as a degraded variable value for substitution in calculation.
6. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 1, characterized in that, The inventory deduction strategy of the inventory synchronization mapping includes a safety stock warning number and an oversold threshold. When a downstream order is generated and payment is completed, the system initiates an inventory lock request to the upstream cloud warehouse through the inventory synchronization mapping. If the lock is successful, a confirmation signal is returned. If the lock fails, the order is suspended and the retailer is notified.
7. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 1, characterized in that, The product detail page rendering templates matched according to the product category characteristics include: diamond templates that highlight the cut proportions and certificate information for loose diamonds, jadeite templates that highlight the grading indicators of texture, water, and color for jadeite, and gold templates that highlight the detailed list of weight and labor costs for gold.
8. The jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display method according to claim 1, characterized in that, When the terminal type is a sharing poster terminal, the main image, title and display price of the product are extracted, and intelligently arranged with the distributor's custom copy and exclusive QR code to generate a sharing image. A deep link pointing to the product details page is embedded in the sharing image.
9. A jewelry cloud distribution commodity multi-level association mapping dynamic on-shelf display system for performing the method of any one of claims 1 to 8, characterized in that, include: The mapping relationship establishment module is used to respond to the retailer's product selection operation in the cloud warehouse and establish a multi-level association mapping relationship between the retailer's store and the cloud warehouse products. The multi-level association mapping relationship consists of three types of logical references: basic information mapping, dynamic price mapping, and inventory synchronization mapping, which form an overall mapping architecture. The basic information mapping is a logical reference to the immutable attribute data of products in the cloud warehouse, the dynamic price mapping is a logical reference to the price calculation formula of products in the cloud warehouse, and the inventory synchronization mapping is a logical reference to the inventory deduction strategy of products in the cloud warehouse. The three types of logical references correspond to the authority dimension, real-time dimension, and consistency dimension of product data, respectively. The data acquisition and calculation module is used to acquire product attribute data from the cloud warehouse in real time through the basic information mapping based on the multi-level association mapping relationship, parse the price calculation formula through the dynamic price mapping and dynamically calculate the product display price by substituting the current variable value, and acquire the inventory status through the inventory synchronization mapping. The template injection and page generation module is used to match the corresponding detail page rendering template according to the product category characteristics, inject the acquired attribute data, the calculated display price and the inventory status into the rendering template, display the available or sold-out inventory indicators in the product detail page according to the inventory status, and overlay the retailer's store custom decoration elements to generate the product detail page; A multi-terminal rendering module is used to identify the terminal type accessing the product details page and to perform adaptive layout rendering of the product details page according to the terminal type. The terminal types include mini-program terminal, WeChat H5 terminal, and shared poster terminal.
10. The jewelry cloud distribution multi-level association mapping dynamic on-shelf display system of claim 9, wherein, The data acquisition and calculation module also includes: A price formula parsing unit is used to parse the price calculation formula in the dynamic price mapping, identify variable identifiers and operators in the formula, and construct an executable expression tree; A real-time variable acquisition unit is used to acquire the real-time value corresponding to the variable identifier from an external data source, including an international loose diamond price interface and an exchange rate interface; the real-time variable acquisition unit is also used to use the cached value corresponding to the interface as a fallback variable value in the calculation when any interface request fails. The calculation execution unit is used to substitute the real-time value into the expression tree, perform calculations, and output the product display price.
Citation Information
Patent Citations
A multi-center data sharing system and its usage method
CN108600323B
Unmanned vending machine application system based on radio frequency identification technology
CN121259948A
