An e-commerce product spot check evidence storage system and method thereof

By using hardware quantum random number generation for sampling instructions and fog computing blockchain technology, the issues of credibility and fragile evidence chain in the sampling process of e-commerce product spot checks are solved, achieving fairness and transparency throughout the process and providing an intuitive verification experience.

CN122390754APending Publication Date: 2026-07-14
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-04-07
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In traditional e-commerce product sampling inspection models, the sampling process has low credibility, the process evidence chain is fragile, and there is a lack of unpredictable and unreproducible physical randomness to ensure that evidence is lost and difficult to form a complete and coherent evidence chain.

Method used

Unpredictable sampling instructions are generated using hardware quantum random numbers. Combined with fog computing and blockchain technology, data is collected in real time through intelligent evidence storage containers and fog computing node networks to generate an immutable, end-to-end time-series evidence chain, which is then verified using near-field communication and augmented reality technologies.

Benefits of technology

This approach aims to eliminate human manipulation of samples at the source, ensure the fairness of the sampling process, form a complete electronic evidence chain, enhance the transparency and credibility of the results, and provide an intuitive verification experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390754A_ABST
    Figure CN122390754A_ABST
Patent Text Reader

Abstract

The application discloses an e-commerce product spot-check storage evidence system and method, and relates to the technical field of e-commerce product quality supervision and credible calculation, and comprises the following steps: based on quantum random numbers, unpredictably sampling instructions are dynamically generated on the spot, and physical sampling operations are performed according to the instructions, and first process data containing instruction generation and execution processes are synchronously collected; the sampled samples are placed in intelligent storage containers embedded with environment and state sensors, second process data are continuously collected through the containers and their associated fog calculation node networks during the whole process of sample circulation to detection institutions, and real-time hash sequences are generated at the network edges; through hardware quantum random number injection sampling links, the possibility of artificially manipulating samples is eliminated from the source, laying the foundation for the fairness of the whole process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of e-commerce product quality supervision and trusted computing technology, and more specifically, to an e-commerce product sampling and evidence storage system and method. Background Technology

[0002] With the rapid development of e-commerce, the quality supervision of goods traded online has become a crucial link in protecting consumer rights and maintaining market order. Product quality supervision and spot checks are an important means for regulatory authorities to fulfill their functions. However, the traditional e-commerce platform product spot check model has the following technical shortcomings that urgently need to be addressed in practice:

[0003] Low reliability of the sampling process: The sampling process usually relies on the subjective judgment of the sampler or a simple random number table, lacking the guarantee of unpredictable and unreproducible physical randomness. This may lead to the sampling location and sample selection being pre-set or interfered with, and there is a moral hazard of "specially supplied samples" replacing actual products sold, making the samples unable to truly reflect the state of goods circulating in the market.

[0004] The process evidence chain is fragile and fragmented: from on-site sampling, sample sealing, logistics and transportation to laboratory testing, multiple physical steps and different responsible parties are involved. Currently, evidence mainly relies on paper documents, isolated photos or video clips. This evidence is easily lost, altered, or forged, and it is difficult to form a complete, coherent, and irrefutable chain of evidence in terms of time, space, and logic. Data at each stage is scattered, and there is a lack of effective cross-verification mechanisms.

[0005] Therefore, there is an urgent need for a new technology solution for sampling and evidence preservation of e-commerce products that can guarantee the randomness of sampling from a technical perspective, solidify credible evidence throughout the process, improve the transparency and credibility of the results, and enhance judicial effectiveness. Summary of the Invention

[0006] To overcome the aforementioned shortcomings of existing technologies, this invention provides an e-commerce product sampling and evidence preservation system and method. By injecting hardware quantum random numbers into the sampling process, the possibility of human manipulation of samples is eliminated from the very beginning, laying the foundation for the fairness of the entire process. It innovatively applies the concept of fog computing to logistics monitoring, enabling the continuous state changes of the physical world to be converted into digital evidence in real time and tamper-proofly through edge sensing, local evidence preservation, and cross-validation. This solves the pain points of easy data loss and difficulty in traceability in the process.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A method for sampling and evidence preservation of e-commerce products includes the following steps: dynamically generating unpredictable sampling instructions at the sampling site based on quantum random numbers, and performing physical sampling operations according to the instructions, while simultaneously collecting first process data including the instruction generation and execution process; placing the sampled samples in an intelligent evidence preservation container embedded with environmental and state sensors, and continuously collecting second process data through the container and its associated fog computing node network throughout the entire process of sample transfer to the testing institution, and generating a real-time hash sequence at the network edge; simultaneously anchoring the evidence digests of the first process data and the second process data to the blockchain to form an immutable full-process time-series evidence chain; generating a digital testing report bound to the full-process time-series evidence chain, and configuring a dynamic graphical verification interface for the report that can be visualized and verified through near-field communication and augmented reality technology.

[0009] In a preferred embodiment, the dynamic generation of unpredictable sampling instructions based on quantum random numbers at the sampling site specifically involves: using a portable quantum random number generation device, combining the sampling task information with the on-site collected information from the merchandise shelves, to generate a random number seed for this sampling in real time; based on the random number seed, calculating and generating a specific sampling location index and sampling quantity using a preset algorithm to form a visual sampling instruction; the sampler operates the device to locate and obtain the merchandise according to the visual sampling instruction, and the device and auxiliary recorder simultaneously record the instruction display and instruction execution process.

[0010] In a preferred embodiment, the container and its associated fog computing node network continuously collect second process data. Specifically, after the smart evidence storage container is sealed and activated, it continuously collects internal environmental data, spatial attitude data, and physical sealing status data. During transportation, the container, along with associated logistics positioning equipment and sampling terminal, forms a fog computing network to perform data cross-validation and consensus. Each node in the fog computing network performs local computation on the time-series sensor data stream, generates and stores continuous process hash fragments, and sends the summary information of key fragments to the blockchain node.

[0011] In a preferred embodiment, the evidence digests of the first process data and the second process data are synchronously anchored to the blockchain. Specifically, this involves: constructing a Merkle tree structure with the sampling task as the root node, and using the evidence digests of each key step in the first and second process data as leaf nodes; packaging the root hash of the Merkle tree, the random number seed, and the timestamps of each step's data together to generate block data; and distributing the block data to a consortium blockchain network composed of regulatory nodes, testing agency nodes, and notary nodes for consensus and storage.

[0012] In a preferred embodiment, a digital inspection report is generated and bound to the entire process time-series evidence chain, and a dynamic graphical verification interface is configured for the report. Specifically, after the inspection agency completes the inspection, the system automatically generates a standard inspection report file; the key information hash of the standard inspection report is bound to the Merkle root hash of the entire process time-series evidence chain to generate a unique digital report identifier; the digital report identifier is encoded and written into a near-field communication chip and associated with an augmented reality visualization script; when the user terminal reads the near-field communication chip or scans the associated dynamic QR code, the augmented reality visualization script is triggered, and an animated summary of the key links of this spot check and the blockchain verification status are overlaid on the terminal screen.

[0013] An e-commerce product sampling and evidence preservation system includes: an instruction generation and acquisition module, an edge evidence preservation and circulation module, a blockchain anchoring module, and a report generation and verification module. The instruction generation and acquisition module generates unpredictable sampling instructions based on quantum random numbers and collects process data related to instruction generation and on-site execution. The edge evidence preservation and circulation module continuously collects and solidifies environmental and status data during sample circulation through intelligent evidence storage containers and a fog computing node network. The blockchain anchoring module integrates evidence summaries of process data from each stage and writes them into the blockchain to form a trusted evidence chain. The report generation and verification module generates a digital report bound to the evidence chain and provides a visual verification interface based on near-field communication and augmented reality.

[0014] In a preferred embodiment, the instruction generation and acquisition module specifically includes: a quantum random number generation unit for generating hardware-level random number seeds; an instruction calculation unit for calculating specific sampling instructions based on the random number seeds and on-site environmental information; and a data synchronization acquisition unit for synchronously acquiring audio and video data of the instruction display and execution process through multiple devices and aligning the timestamps.

[0015] In a preferred embodiment, the edge evidence storage and transfer module specifically includes: an intelligent evidence storage container, which has built-in multiple environmental sensors, anti-tamper detection devices and a lightweight computing and storage unit, for data acquisition, local hash calculation and secure storage; and a fog computing gateway, which is deployed on transportation vehicles or key transit nodes, for integrating container data and logistics data, and performing data verification and digest synchronization within the local network.

[0016] In a preferred embodiment, the report generation and verification module specifically includes: a report synthesis engine for binding and synthesizing the detection results with the root hash of the evidence chain on the blockchain; a dynamic encoding unit for generating near-field communication data and dynamic QR codes; and an augmented reality rendering engine for generating and rendering a three-dimensional visual verification animation by calling the corresponding evidence chain summary data according to the verification request.

[0017] The technical effects and advantages of the e-commerce product sampling and evidence storage system and method of the present invention are as follows:

[0018] By injecting hardware quantum random numbers into the sampling process, the possibility of human manipulation of samples is eliminated from the very beginning, laying the foundation for the fairness of the entire process. The innovative application of fog computing concepts to logistics monitoring, through edge sensing, local evidence storage, and cross-verification, enables the continuous state changes of the physical world to be converted into digital evidence in real time and tamper-proofly, solving the pain points of easily lost and difficult-to-trace process data. Utilizing the distributed and immutable characteristics of blockchain, fragmented process evidence is "welded" into a complete, time-sequentially rigorous electronic evidence chain, greatly enhancing the legal validity of the evidence. The pioneering combination of NFC and AR technologies for publicizing government / regulatory results transforms complex back-end technology into a vivid, intuitive, and interactive verification experience on the front end, representing a breakthrough in enhancing credibility and public participation. Attached Figure Description

[0019] Figure 1 This is an overall flowchart of a method for random inspection and evidence preservation of e-commerce products according to the present invention;

[0020] Figure 2 This is a flowchart of the quantum random sampling instruction generation process for a method for random inspection and evidence preservation of e-commerce products according to the present invention.

[0021] Figure 3 This is a schematic diagram of the intelligent evidence storage and fog computing network of the e-commerce product sampling and evidence storage method of the present invention;

[0022] Figure 4 This is a schematic diagram illustrating the evidence chain construction and blockchain anchoring of an e-commerce product sampling and evidence preservation method according to the present invention.

[0023] Figure 5 This is a block diagram of the system modules of an e-commerce product sampling and evidence storage system according to the present invention.

[0024] Figure 6 This is a flowchart illustrating the digital report generation and verification process of an e-commerce product sampling and evidence storage system according to the present invention. Detailed Implementation

[0025] 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0026] Example 1, Figures 1-4 This invention presents a method for sampling and evidence preservation of e-commerce products, comprising the following steps: dynamically generating unpredictable sampling instructions at the sampling site based on quantum random numbers, and performing physical sampling operations according to the instructions, while simultaneously collecting first-process data including the instruction generation and execution process; placing the sampled samples in an intelligent evidence preservation container embedded with environmental and state sensors, and continuously collecting second-process data through the container and its associated fog computing node network throughout the entire process of sample transfer to the testing institution, and generating a real-time hash sequence at the network edge; simultaneously anchoring the evidence digests of the first-process data and the second-process data to the blockchain to form an immutable full-process time-series evidence chain; generating a digital testing report bound to the full-process time-series evidence chain, and configuring a dynamic graphical verification interface for the report that can be visualized and verified through near-field communication and augmented reality technology.

[0027] In this embodiment, unpredictable sampling instructions are dynamically generated at the sampling site based on quantum random numbers. Specifically, a portable quantum random number generation device is used to generate a random number seed for this sampling in real time, combining the sampling task information and the information of the merchandise shelves collected on site. Based on the random number seed, a specific sampling location index and sampling quantity are calculated and generated through a preset algorithm, forming a visual sampling instruction. The sampler operates the device to locate and obtain the merchandise according to the visual sampling instruction, and the device and auxiliary recorder simultaneously record the instruction display and the instruction execution process.

[0028] It should be noted that, in combination with sampling scenarios (mobile scenarios such as e-commerce warehouses, offline stores, and logistics stations), portable devices meet the mobile use requirements of being handheld / shoulder-carried, battery-powered, weighing ≤5kg, and measuring ≤30cm×20cm×10cm. They do not require a fixed power source or large stand, thus adapting to the flexibility of on-site operations for samplers.

[0029] Quantum random number generation uses devices to generate random numbers through physical quantum processes (such as photon polarization, vacuum fluctuations, and the uncertainty principle of quantum mechanics, including radioactive decay), rather than through software algorithms (such as pseudo-random number generators, PRNGs). The core technical indicators are the non-periodicity, unpredictability, and non-reproducibility of the random number sequence, and it meets nationally recognized random number testing standards (such as NIST SP800-22). The sampling task information comes from preset information in the regulatory system: including the sampling task number, the category of goods to be sampled (such as infant formula and electronic products), the sampling base (such as 1000 items of this category in a warehouse), the sampling ratio (such as 5% sampling), the regulatory area code, and structured data such as task start and end timestamps (format can be JSON / XML). The product shelf information collected on-site is collected in real time by the sampler: including the physical location code of the shelf (e.g., row 3, layer 5 in area A), the SKU code of the products on the shelf, the quantity of products displayed, photos of the shelf area (with GPS location watermark), and on-site environmental parameters (e.g., temperature, humidity, for data traceability), as well as unstructured and structured data.

[0030] The data hash fusion logic is adopted, and the specific steps are as follows: (1) Convert the structured data of the sampling task information into a string (such as task number 20240501-category infant formula-base 1000-proportion 5%); (2) Convert the shelf information collected on site (including SKU code, location code, GPS coordinates) into a string, and perform hash calculation on the shelf photos (such as SHA-256) to obtain the photo hash value; (3) Concatenate the above two types of strings and the photo hash value in a fixed order (such as task information string + shelf information string + photo hash value) to form a fused data string; (4) Use the fused data string as the entropy source input of the quantum random number generation device, and the device generates a unique random number seed for this sampling based on the quantum process (seed length ≥ 256 bits).

[0031] The technical scope and selection logic of the preset algorithm are the sampling algorithms based on random number seeds commonly used in this field, including but not limited to: uniform random sampling algorithm (suitable for ordinary goods without stratification requirements, such as randomly selecting 5 items); stratified random sampling algorithm (suitable for goods with multiple batches and specifications, such as randomly selecting items from each layer after stratification by production date); and systematic sampling algorithm (suitable for goods that are neatly displayed on shelves, such as selecting 1 item every N items after determining the starting position according to the random number seed).

[0032] Sampling quantity: Calculated by combining the random number seed with the sampling ratio in the sampling task information. For example, the first 8 bits of the seed are converted to decimal, multiplied by the sampling base, and the integer part is taken (e.g., the first 8 bits of the seed are 10010110 → 150, the base is 1000 → 150 × 5% = 7.5 → rounded down to 7 items). If the result exceeds the sampling quantity range preset by the task (e.g., the task requires 3-10 items), the closest value within the range is taken.

[0033] Sampling Location Index: The subsequent bits of the random number seed (e.g., 8-64 bits) are converted to decimal and matched with the product display location code in the shelf information. For example, if the shelf is coded as 3 rows and 5 layers in section A with three-dimensional coordinates (3,5,2) (row, layer, column), the corresponding bits of the seed are converted to coordinate values ​​(e.g., 3≤x≤8, 5≤y≤10, 2≤z≤6), generating specific sampling locations (e.g., 4 rows, 7 layers, 3 columns in section A; 6 rows, 9 layers, 5 columns in section A), and the shelf diagram with highlighted locations is displayed on the device screen.

[0034] Equipment: The portable quantum random number generator mentioned above (with built-in display screen, camera, and microphone); Auxiliary recorder: the law enforcement recorder worn by the sampler (with GPS, timestamp, and anti-tampering function), the fixed surveillance camera in the shelf area (if any), or the mobile sampling APP (which synchronizes data with the quantum device via Bluetooth).

[0035] Recording of instruction display process: Record the visual sampling instructions on the quantum device display screen (including sampling quantity, location index, generation timestamp, random number seed hash value (displayed in anonymized form, such as the first 8 bits + the last 8 bits)), with a recording duration of ≥10 seconds (ensuring that the instructions are clearly identifiable), and the video includes the device number, GPS location, and timestamp watermark (accurate to milliseconds).

[0036] Recording of instruction execution process: Record the entire process of the sampler locating the shelf, selecting goods, verifying SKU codes, and sealing samples according to instructions. The focus is on recording the correspondence between the goods and the shelf positions, the continuity of the sampling actions, and the sample sealing operation. The video is unedited (integrity is verified by video hash value). The audio is recorded synchronously with the communication between the sampler and the on-site personnel (if any).

[0037] In this embodiment, the second process data is continuously collected through the container and its associated fog computing node network. Specifically, after the smart evidence storage container is sealed and activated, it continuously collects internal environmental data, spatial attitude data, and physical sealing status data. During transportation, the container, associated logistics positioning equipment, and sampling terminal form a fog computing network to perform data cross-validation and consensus. Each node in the fog computing network performs local calculations on the time-series sensor data stream, generates and stores continuous process hash fragments, and sends the summary information of key fragments to the blockchain node.

[0038] It should be noted that the triggering method and technical constraints of the seal activation are as follows: The intelligent evidence storage container initiates data collection through a dual triggering mechanism of physical sealing and electronic verification. Specifically, the physical sealing uses a one-time tamper-proof sealing buckle (such as a buckle with a unique QR code / RFID chip). After the sampler puts the sample into the container, he closes the sealing buckle and breaks the tamper-proof coating at the buckle. Electronic activation: After the pressure sensor / Hall sensor built into the container detects the sealing buckle's closing signal, it automatically wakes up the sensor module and computing unit, records the activation timestamp (accurate to milliseconds), and binds and stores the unique identifier of the sealing buckle (QR code hash value / RFID code) with the activation status.

[0039] Specific indicators and technical requirements for the three types of data collected: Internal environment data: Key environmental parameters for sample storage, including but not limited to: temperature (measurement range -20℃~60℃, accuracy ±0.5℃), humidity (measurement range 10%RH~90%RH, accuracy ±3%RH), gas concentration (for easily oxidized / deteriorated samples, such as oxygen concentration and CO2 concentration, accuracy ±1%), and light intensity (for photosensitive samples, accuracy ±10 lux). The acquisition frequency is 1 time / minute (which can be adaptively adjusted to 1 time / 10 seconds according to sample characteristics). Spatial attitude data: Collected via a six-axis gyroscope (accelerometer + angular velocity meter) built into the container. Indicators include: three-dimensional acceleration (range ±16g, accuracy ±0.01g), three-dimensional angular velocity (range ±2000° / s, accuracy ±0.1° / s), and attitude angles (pitch, roll, yaw, accuracy ±0.5°). This data is used to determine if the container has experienced a severe impact, tipping, or tampering (e.g., a sudden change in attitude angle exceeding 45° for more than 1 second triggers an alarm). Physical sealing status data: Collected via pressure sensors at the sealing buckle and a conductive film under the tamper-evident coating. Indicators include: sealing buckle pressure value (normal range 5~10N, below 3N indicates a loose seal), and the continuity of the conductive film (continuity indicates a good seal, disconnection indicates a damaged seal). The data is collected once per second to ensure real-time monitoring of the sealing status.

[0040] Connectivity Technology: A hybrid architecture of short-range wireless communication and wide-area communication is adopted: Containers, sampler terminals (mobile phones / tablets), and logistics positioning devices (such as GPS trackers) are connected via Bluetooth 5.0 / BLEMesh protocols (transmission distance ≤100 meters, latency ≤10ms) for real-time synchronization of high-frequency sensor data (such as attitude data and sealing status data); the fog computing gateway (deployed in transport vehicles / transfer nodes) connects to various terminal devices via 4G / 5G / NB-IoT protocols to integrate low-frequency data (such as environmental data and positioning data) and upload it to the blockchain node (if the network is interrupted, the gateway caches the data locally and re-uploads it after recovery). Network Architecture: A distributed peer-to-peer node architecture is adopted, with containers, sampler terminals, logistics positioning devices, and fog computing gateways all being independent nodes without a central control device, ensuring that the failure of a single node does not affect the overall data acquisition.

[0041] The verification objects and logic of cross-validation: The core of the verification is the consistency of multi-node data to avoid data tampering by a single node. Specifically, it includes: ① Timestamp verification: Each node carries a local GPS timestamp (accurate to milliseconds) when collecting data. The gateway compares the timestamp deviations of different nodes at the same time point (allowed deviation ≤ 50ms). If the deviation exceeds the limit, the data is judged as abnormal; ② Key parameter verification: The sealing status data collected by the container is cross-validated with the sealing operation time recorded by the sampler's terminal (e.g., the container sealing activation timestamp must have a deviation of ≤ 1 minute from the sealing operation timestamp recorded by the terminal). The location data collected by the container is cross-validated with the GPS data of the logistics positioning device (deviation ≤ 10 meters); ③ Data integrity verification: Each node generates a local hash value (e.g., SHA-256) for the collected data. The gateway compares the same data hash value of different nodes. If they match, the data is judged as valid. If they do not match, an abnormal alarm is triggered and all node data is recorded for subsequent traceability.

[0042] Consensus Mechanism Selection and Logic: A lightweight consensus algorithm suitable for edge devices in this field is adopted, including but not limited to: a simplified version of the Practical Byzantine Fault Tolerance (PBFT) algorithm and a lightweight version of the Delegated Proof-of-Stake (DPOS) algorithm. The core logic is as follows: the gateway acts as the consensus coordinating node, initiates a consensus vote on abnormal data, and participating nodes (containers, terminals, positioning devices) vote based on their local raw data. If the vote rate is ≥2 / 3, the data is deemed valid; otherwise, it is marked as abnormal data and the raw data of all nodes is stored (without discarding any data to ensure traceability integrity).

[0043] The specific content of local computing refers to the lightweight data processing completed locally by each node (container, terminal, gateway) of the fog computing network without uploading to the cloud. This includes: data preprocessing: removing outliers collected by sensors (such as invalid data where the temperature suddenly exceeds the measurement range), and aligning the timestamps of continuous data streams (to ensure time sequence consistency); hash generation: performing hash calculations (such as SHA-256) on the preprocessed valid data to generate data hash values; fragment packaging: packaging the hash values ​​within a continuous time period with the corresponding original data fragments to form process hash fragments (containing data content, timestamp range, and local hash value).

[0044] Process hash fragment generation rules: Time granularity: Adaptively adjusted according to data acquisition frequency. High-frequency data (such as attitude data and sealing status data) are generated in 1-minute increments, while low-frequency data (such as environmental data and positioning data) are generated in 5-minute increments. Data range: Each fragment contains all valid acquired data within the time interval (e.g., 60 attitude data points or 60 sealing status data points within 1 minute). Fragment naming rules are: device number - timestamp start - timestamp end - fragment hash value (e.g., Container-20240501100000-20240501100100-7a3f9d...). Storage requirements: All process hash fragments are stored locally on each node (using encrypted storage, with the key generated locally by the node and bound to the device's unique identifier). The storage duration is ≥ 6 months after sample testing (meeting regulatory traceability cycle requirements).

[0045] Criteria for determining key data segments and the logic for uploading them: Criteria for determining key data segments: These are data segments that play a core role in proving the integrity and legality of the sample transfer, including but not limited to: ① Segments at the moment of seal activation (recording the seal activation status and initial environment / attitude data); ② Segments at the moment of sudden changes in attitude angle or abnormal seal status during transportation (recording possible tampering / damage events); ③ Segments at the moment of handover at transit nodes (recording the sample handover time, location, and operators); ④ Segments at the moment of seal release after arrival at the testing institution (recording the sample status before testing).

[0046] Upload logic: Each node sends the summary information of key fragments (including fragment name, timestamp range, fragment hash value, and node identifier) ​​to the blockchain node, while non-key fragments are only stored locally (if traceability is required, local non-key fragments can be retrieved by associating the key fragment summary on the blockchain).

[0047] In this embodiment, the evidence digests of the first process data and the second process data are simultaneously anchored to the blockchain. Specifically, a Merkle tree structure is constructed with the sampling task as the root node, and the evidence digests of each key step in the first process data and the second process data are used as leaf nodes. The root hash of the Merkle tree, the random number seed, and the timestamps of each step data are packaged together to generate block data. The block data is distributed to a consortium blockchain network composed of regulatory nodes, testing agency nodes, and notary nodes for consensus and storage.

[0048] It should be noted that: using the sampling task as the unique identifier, a Merkle tree is constructed with the evidence digest as the leaf node and the aggregate hash as the root node. The core is to associate the tree structure through the task identifier, rather than using the task itself as the physical root node of the tree. The specific implementation is as follows:

[0049] (1) The identifier-structure association logic of Merkle tree

[0050] ① Unique Identifier for Spot Check Tasks: First, assign a globally unique ID (such as regulatory agency code + date + random sequence, e.g., BJ-20240501-8F3D) to each spot check task. This ID serves as the association identifier for the Merkle tree, used to bind the tree structure to the specific task. ② Technical Definition of Root Node: The root node is not the spot check task itself, but the final root hash value generated after multi-level hash aggregation of evidence digests from all leaf nodes. This root hash value is bound and stored with the spot check task ID, forming the association relationship of task ID → root hash → tree structure, thus solving the problem of distinguishing tree structures when anchoring multiple tasks.

[0051] (2) Evidence summary screening criteria for leaf nodes

[0052] Leaf nodes are not the complete content of the data from the first and second processes, but rather core evidence summaries of key stages. Selection must meet the principles of relevance and non-substitutability, specifically including three categories: First process data core summary: hash value of the quantum random number seed, timestamp of sampling instruction generation, hash of sampling location index, hash of key frames in the sampling execution audio and video (one frame is taken every 30 seconds, generating a SHA-256 hash); Second process data core summary: timestamp of smart storage container sealing activation, hash fragments of abnormal posture / sealing status, hash of key data passed through fog computing network consensus, timestamp of sample arrival at the testing institution; Cross-validation data summary: hash of communication logs between fog computing nodes and blockchain nodes, hash of identity authentication of personnel at each stage (such as digital signature hashes of samplers / logistics personnel).

[0053] Filtering logic: Exclude duplicate data (such as continuous and normal environmental data) and non-core data (such as device power information) to ensure that the leaf nodes are both concise and can cover the key nodes of the entire sampling-transfer process, and avoid redundancy in the tree structure.

[0054] (3) Steps for partitioning and constructing Merkle trees

[0055] A three-level hierarchical structure is adopted to balance computational efficiency and verification convenience. The specific steps are as follows: Level 1 (Leaf Layer): Arrange the N evidence summaries after screening in chronological order, with each summary as an independent leaf node and assigned a unique index (e.g., task ID-leaf index-timestamp); Level 2 (Branch Layer): Group the leaf nodes into groups of 2 (if N is odd, the last node is combined with itself), concatenate the hash values ​​of the two summaries in each group and then hash them to generate the branch node hash value; if the number of branch nodes is still ≥2, repeat this operation until ≤2 branch nodes are generated; Level 3 (Root Node Layer): Concatenate the hash values ​​of the last 1-2 branch nodes and then hash them to generate the final Merkle tree root hash, completing the tree structure construction.

[0056] Example: If there are 8 leaf nodes (digest AH), the branch layer first generates (A+B) hash, (C+D) hash, (E+F) hash, and (G+H) hash, and then generates [(A+B)+(C+D)] hash and [(E+F)+(G+H)] hash. The final root node is the aggregate hash of these two branch hashes.

[0057] In this embodiment, a digital test report bound to the entire process time-series evidence chain is generated, and a dynamic graphical verification interface is configured for the report. Specifically, after the testing agency completes the inspection, the system automatically generates a standard test report file; the key information hash of the standard test report is bound to the Merkle root hash of the entire process time-series evidence chain to generate a unique digital report identifier; the digital report identifier is encoded and written into the near-field communication chip, and associated with an augmented reality visualization script; when the user terminal reads the near-field communication chip or scans the associated dynamic QR code, the augmented reality visualization script is triggered, and an animated summary of the key links of this spot check and the blockchain verification status are superimposed on the terminal screen.

[0058] It should be noted that the selection of key information must adhere to the principles of uniqueness, relevance, and immutability, covering three core types of data while excluding redundant information such as formatted or annotated content. The specific scope and hash calculation rules are as follows: Sample identity association information: including sample SKU code, unique sampling task ID, and smart evidence storage container number. This information directly links the report to the specific sample inspected, preventing misattribution between the report and the sample; Core testing data: targeting key regulatory areas for e-commerce products, including the name of the testing item (e.g., microbiological indicators for food, safety performance of electronic products), test values, pass / fail results (must be marked as compliant with XX standard or non-compliant with XX clause), and the digital signature of the testing personnel. This information is the core carrier of the report's validity; Report traceability metadata: test report number, test completion timestamp (accurate to the second, calibrated with blockchain timestamps), and testing institution qualification number. This information ensures the report's compliance and traceability.

[0059] During hash calculation, the above key information must first be converted into a UTF-8 encoded string in a fixed order of sample ID → test item → judgment result → traceability metadata (e.g., SKU12345-task BJ20240501-microorganism ≤10CFU-qualified-report No.8765-20240501153000-qualification CNASL1234). Then, a 256-bit hash value is generated using the SHA-256 algorithm to ensure that any change in key information will result in a completely different hash value.

[0060] The generation of digital report identifiers employs a composite logic of double hash anchoring and task identifier prefix to ensure global uniqueness. The specific steps are as follows: Hash Binding: The hash of the report's key information and the Merkle root hash are concatenated in a fixed order: report hash first, root hash last, forming a 512-bit composite hash string (e.g., report hash: a7f2d3... + root hash: e9b4c1...); Identifier Generation: The composite hash string is again subjected to SHA-256 hash calculation to obtain a 256-bit basic identifier. A prefix of the sampling task ID + the abbreviation of the testing agency (e.g., BJ20240501-CMA123-) is appended to this basic identifier, resulting in a string of prefix + basic identifier (approximately 60 characters in total); Uniqueness Verification: After generation, the system automatically queries the blockchain for existing identifiers. If a duplicate exists (probability less than 10%), the identifier is checked. -77 If the hash is positive, then insert a random check bit into the composite hash and recalculate until it passes the uniqueness check.

[0061] This logic, through double hashing and a task-specific prefix, not only achieves a strong binding between the report and the evidence chain, but also distinguishes different sampling scenarios through the task ID, thus avoiding duplicate identifiers from the root.

[0062] A lightweight approach combining chip-stored core identifiers and cloud-linked AR resources is adopted to avoid the bottleneck of limited NFC chip storage capacity (typically ≤1KB). The specific implementation is as follows: NFC chip data writing: The digital report identifier and the chip's unique ID are encrypted and written to the chip using a dedicated NFC programming device (supporting the ISO14443A protocol). Encryption employs the AES-128 algorithm, and the key is jointly managed by the testing agency and the regulatory platform. After writing, the chip is locked in read-only mode to prevent data tampering. The chip's physical form is an ultra-thin sticker (≤1cm in diameter), which can be directly pasted onto the cover of a paper testing report. AR script association logic: The AR visualization script (including 3D animation templates and data parsing rules) is stored on the regulatory platform's cloud server, not within the chip. The digital report identifier in the chip serves as a unique index, forming a one-to-one association with the cloud script. Simultaneously, the system generates a corresponding dynamic QR code (containing the same identifier information), printed on the report's first page, as a backup method for NFC reading.

[0063] AR verification is designed with low-barrier interaction and visualization of core information as its core principles. It fully supports offline verification (a lightweight plugin needs to be downloaded for first-time use). The specific process and display content are as follows: Triggering method: Users use NFC-enabled mobile phones (such as Android / Apple phones with NFC modules) to tap against the NFC chip on the report, or scan the dynamic QR code with their phone's camera. The system automatically wakes up the pre-installed regulatory verification APP (or mini-program), without requiring manual input of information; Data parsing and verification: The APP obtains the corresponding AR script and blockchain evidence chain digest from local cache (offline mode) or the cloud through an identifier, automatically parses it, and initiates a verification request to the blockchain node (can be called offline). The system displays historical verification results stored locally, returning a pass or fail status within 1 second. Visualized content includes: upon successful verification, a 3D animation and data panel overlaid on the phone screen: ① Key process animation (15-20 seconds long, including dynamic effects such as highlighted sampling locations, container sealing status, and fluctuating core detection indicator values, with no redundant video clips); ② Blockchain verification panel (displaying Merkel root hash, number of verification nodes, and report generation timestamp; clicking allows access to the blockchain explorer to view the original anchored data); if verification is abnormal (e.g., the report has been tampered with), a red warning box is immediately displayed, indicating the type of abnormality (e.g., the report hash does not match the on-chain hash) and a regulatory complaint entry point.

[0064] Example 2, Figure 5 and Figure 6 This invention provides an e-commerce product sampling and evidence storage system, comprising: an instruction generation and collection module, an edge evidence storage and circulation module, a blockchain anchoring module, and a report generation and verification module;

[0065] The instruction generation and acquisition module is used to generate unpredictable sampled instructions based on quantum random numbers and to acquire process data of instruction generation and on-site execution.

[0066] The edge evidence storage and transfer module is used to continuously collect and solidify environmental and status data during the sample transfer process through intelligent evidence storage containers and fog computing node networks.

[0067] The blockchain anchoring module is used to integrate the evidence summaries of process data from each stage and write them into the blockchain to form a trusted chain of evidence.

[0068] The report generation and verification module is used to generate digital reports that bind a chain of evidence and provides a visual verification interface based on near-field communication and augmented reality.

[0069] In this embodiment, the instruction generation and acquisition module specifically includes: a quantum random number generation unit for generating hardware-level random number seeds; an instruction calculation unit for calculating specific sampling instructions based on the random number seeds and on-site environmental information; and a data synchronization acquisition unit for synchronously acquiring audio and video data of the instruction display and execution process through multiple devices and aligning the timestamps.

[0070] In this embodiment, the edge evidence storage and transfer module specifically includes: an intelligent evidence storage container, which has built-in multiple environmental sensors, anti-tamper detection devices, and a lightweight computing and storage unit, used to realize data collection, local hash calculation, and secure storage; and a fog computing gateway, which is deployed on transportation vehicles or key transit nodes to integrate container data and logistics data, and to perform data verification and digest synchronization within the local network.

[0071] In this embodiment, the report generation and verification module specifically includes: a report synthesis engine, used to bind and synthesize the detection results with the root hash of the evidence chain on the blockchain; a dynamic encoding unit, used to generate near-field communication data and dynamic QR codes; and an augmented reality rendering engine, used to call the corresponding evidence chain summary data according to the verification request, and generate and render a three-dimensional visual verification animation.

[0072] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0073] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.

[0074] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0075] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0076] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0077] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for sampling and storing evidence of e-commerce products, characterized in that, Includes the following steps: Based on quantum random numbers, unpredictable sampling instructions are dynamically generated at the sampling site, and physical sampling operations are performed according to the instructions, while simultaneously collecting first process data including the instruction generation and execution process. The extracted samples are placed in an intelligent evidence storage container embedded with environmental and state sensors. During the entire process of the sample being transferred to the testing institution, the second process data is continuously collected through the container and its associated fog computing node network, and a real-time hash sequence is generated at the network edge. The evidence summaries of the first process data and the second process data are simultaneously anchored to the blockchain to form an immutable full-process time-series evidence chain; A digital detection report is generated that is bound to the entire process time-series evidence chain, and the report is configured with a dynamic graphical verification interface that can be visualized and verified through near-field communication and augmented reality technology.

2. The method for random inspection and evidence preservation of e-commerce products according to claim 1, characterized in that, The method of dynamically generating unpredictable sampling instructions at the sampling site based on quantum random numbers specifically includes: Using a portable quantum random number generation device, combined with the sampling task information and the information of the goods shelves collected on site, a random number seed for this sampling is generated in real time. Based on the random number seed, a specific sampling location index and sampling quantity are calculated and generated through a preset algorithm to form a visual sampling instruction; The sampler operates the equipment to locate and acquire the goods according to the visual sampling instructions, and the equipment and auxiliary recorder simultaneously record the instruction display and instruction execution process.

3. The method for random inspection and evidence preservation of e-commerce products according to claim 2, characterized in that, The second process data is continuously collected through the container and its associated fog computing node network, specifically: After the intelligent evidence storage container is sealed and activated, it continuously collects internal environmental data, spatial posture data, and physical sealing status data. During transportation, the container, together with the associated logistics positioning equipment and the sampling terminal, forms a fog computing network to perform data cross-validation and consensus. Each node in the fog computing network performs local computation on the time-series sensor data stream, generates and stores continuous process hash fragments, and sends the summary information of key fragments to the blockchain node.

4. The method for random inspection and evidence preservation of e-commerce products according to claim 3, characterized in that, The evidence digests of the first process data and the second process data are synchronously anchored to the blockchain, specifically as follows: Construct a Merkel tree structure with the sampling task as the root node, and use the evidence summaries of each key step in the first process data and the second process data as leaf nodes. The root hash of the Merkle tree, the random number seed, and the timestamps of the data in each stage are packaged together to generate block data; The block data is distributed to a consortium blockchain network consisting of regulatory nodes, testing agency nodes, and notary nodes for consensus and storage.

5. The method for random inspection and evidence preservation of e-commerce products according to claim 4, characterized in that, A digital detection report is generated and bound to the entire process time-series evidence chain, and a dynamic graphical verification interface is configured for the report, specifically as follows: After the testing agency completes the inspection, the system automatically generates a standard test report file; The key information hash of the standard test report is bound to the Merkel root hash of the whole process time-series evidence chain to generate a unique digital report identifier; The digital report identifier is encoded and written into the near-field communication chip, and associated with an augmented reality visualization script; When a user terminal reads the near-field communication chip or scans the associated dynamic QR code, the augmented reality visualization script is triggered, and an animated summary of the key aspects of this spot check and the blockchain verification status are overlaid on the terminal screen.

6. An e-commerce product sampling and evidence storage system, used to implement the method according to any one of claims 1-5, characterized in that, include: The module includes instruction generation and acquisition, edge evidence storage and circulation, blockchain anchoring, and report generation and verification. The instruction generation and acquisition module is used to generate unpredictable sampling instructions based on quantum random numbers and to acquire process data of instruction generation and on-site execution. The edge evidence storage and transfer module is used to continuously collect and solidify environmental and status data during the sample transfer process through the intelligent evidence storage container and fog computing node network. The blockchain anchoring module is used to integrate the evidence summaries of process data from each stage and write them into the blockchain to form a credible evidence chain. The report generation and verification module is used to generate digital reports that bind a chain of evidence and provides a visual verification interface based on near-field communication and augmented reality.

7. The e-commerce product sampling and evidence storage system according to claim 6, characterized in that, The instruction generation and acquisition module specifically includes: A quantum random number generation unit is used to generate hardware-level random number seeds; The instruction calculation unit is used to calculate specific sampling instructions based on the random number seed and the on-site environment information; The data synchronization acquisition unit is used to synchronously acquire audio and video data from multiple devices and align the timestamps with the instructions for display and execution.

8. The e-commerce product sampling and evidence storage system according to claim 7, characterized in that, The edge evidence storage and transfer module specifically includes: The intelligent evidence storage container is equipped with multiple environmental sensors, anti-tamper detection devices, and a lightweight computing and storage unit to achieve data acquisition, local hash calculation, and secure storage. Fog computing gateways are deployed on transportation vehicles or key transit nodes to integrate container data and logistics data, and to perform data verification and summary synchronization within the local network.

9. The e-commerce product sampling and evidence storage system according to claim 8, characterized in that, The report generation and verification module specifically includes: The report synthesis engine is used to bind and synthesize detection results with the root hash of the evidence chain on the blockchain; A dynamic encoding unit is used to generate near-field communication data and dynamic QR codes; The augmented reality rendering engine is used to generate and render 3D visual verification animations by calling the corresponding evidence chain summary data based on the verification request.