A clothing information tracing method based on two-dimensional code recognition technology

By using QR code recognition and blockchain evidence storage technology, the system can accurately identify the identity of clothing and objectively quantify the state of damage during the clothing rental process. This solves the problems of difficulty in identifying the identity of clothing and determining responsibility in the clothing rental system, thereby improving management efficiency and user trust.

CN120931301BActive Publication Date: 2026-02-10JIANGXI INST OF FASHION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511462244.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-10
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

In existing clothing rental systems, it is difficult to accurately identify the identity of clothing, objectively quantify the state of damage, determine liability, and break the traceability chain, leading to management difficulties and frequent disputes.

Method used

By employing QR code recognition technology, combined with image processing and blockchain notarization, a unique QR code is generated to record the entire process of clothing status. Through image acquisition, authenticity analysis, damage detection, and causal inference, a damage analysis report is generated.

Benefits of technology

It enables full-process perception and behavior tracking of clothing status, improves the objectivity and transparency of responsibility determination, reduces disputes, and enhances management efficiency and user trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931301B_ABST
    Figure CN120931301B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of information tracing, in particular to a garment information tracing method based on two-dimensional code identification technology. The method generates a unique two-dimensional code for each rental garment to realize the unique identification and indexing of the garment identity; image data is collected at the garment delivery and return link and uploaded to the cloud server for image authenticity analysis and damage state identification; a garment state data block is constructed based on the hash algorithm and a state evidence chain is formed, and the detection results are stored in a tamper-proof manner combined with the blockchain technology; after the garment is returned, image comparison and difference analysis are carried out, new damage is identified and grade evaluation is carried out; further, the damage cause is analyzed through the cause-effect discovery algorithm, and a damage analysis report is generated. The present application realizes the state tracking and responsibility tracing of the whole life cycle of the garment, and improves the intelligibility and credibility of the garment rental management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information traceability technology, specifically to a method for tracing clothing information based on QR code recognition technology. Background Technology

[0002] With the development of the sharing economy, clothing rental services are becoming increasingly popular in areas such as high-end formal wear, professional uniforms, film and television costumes, and industrial protective clothing. However, the repeated rental and return of clothing often presents challenges such as difficulty in identification, management, and frequent damage disputes. For example, users may return clothing with undisclosed damage, the platform may be unable to trace liability, and images may be falsified, posing numerous challenges to service operation.

[0003] Existing clothing rental systems primarily rely on manual registration and image-based evidence storage to manage clothing status, lacking efficient, objective, and traceable technological means. While some platforms have introduced QR codes or RFID tags for identification, these are often limited to static identification and fail to establish an effective correlation with changes in clothing status, user behavior, or image data, making it difficult to support damage liability analysis and dispute resolution.

[0004] Therefore, a method for tracing clothing information that combines QR code identification, image processing, and trusted evidence storage technology is proposed to achieve full-process recording of clothing status, support for liability determination, and traceability of user operations. Summary of the Invention

[0005] This invention provides a method for tracing clothing information based on QR code recognition technology. It aims to solve technical problems in existing clothing rental processes, such as difficulty in accurately identifying clothing identity, difficulty in objectively quantifying damage status, difficulty in determining liability, and broken traceability chains. The method achieves status perception, behavior tracking, and evidence solidification for rented clothing throughout the entire process from dispatch to return.

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

[0007] A method for tracing clothing information based on QR code recognition technology includes:

[0008] Generate a QR code containing unique identification information for the rental clothing, and embed the QR code on the corresponding clothing to identify its identity and establish a unique index relationship;

[0009] During the clothing outbound and return process, images of the clothing are captured using mobile terminals to form image data records that include outbound and return images.

[0010] The collected image data is uploaded to the cloud server and image authenticity analysis is performed. The images that pass the image authenticity analysis are then subjected to damage state analysis based on a visual detection model to obtain damage detection results.

[0011] The damage detection results, along with the detection timestamp, collection location, and user identification data, are used to generate a digital fingerprint through a hash algorithm, forming a chain of evidence of clothing status with a chronological order.

[0012] After the clothing is returned, the cloud server retrieves the outbound images and outbound damage detection results, performs difference analysis and image comparison and recognition with the returned damage detection results, determines whether there is any new damage, and assesses the degree of damage.

[0013] Based on historical test results and blockchain evidence records, a state evolution sequence is constructed. Combined with a causal discovery algorithm, the causes of clothing damage are inferred, the direct causes of the damage are identified, and a damage analysis report is generated for liability determination.

[0014] Furthermore, the QR code is used to guide rental users to a URL page specified by the cloud server by scanning it. Users can complete operations such as confirming clothing information, uploading clothing image data, and binding identity information through the URL page.

[0015] Furthermore, the steps of image authenticity analysis are as follows:

[0016] Based on the illumination direction estimation algorithm, the shadow edge and brightness distribution information of the image region are extracted, the main illumination direction in the image is inferred, and illumination consistency analysis is performed to determine whether there are unnatural illumination changes in the image.

[0017] Based on the gray-level co-occurrence matrix, local texture features of images are extracted to identify abnormally smooth regions or repetitive texture structures in the image, which can be used to detect potential image forgery regions.

[0018] An edge detection algorithm is used to identify natural edge structures in an image and analyze changes in edge continuity and sharpness to determine whether there are breaks, smoothing, or edge overlaps caused by image editing.

[0019] Furthermore, the steps for damage state analysis are as follows:

[0020] Image data that has passed image authenticity analysis is input into a pre-trained visual detection model, which extracts features from clothing images based on a convolutional neural network;

[0021] The visual detection model identifies surface damage features in the image, including but not limited to cracks, stains, wear, abnormal wrinkles, or areas of loose threads.

[0022] The identified damaged areas are labeled and classified, and damage detection results are generated and bound to the image.

[0023] Furthermore, the steps to form a chain of evidence regarding the condition of the clothing are as follows:

[0024] Each clothing damage detection result is combined with the corresponding detection timestamp, user identification information, collection location information, and hash digest of image data to form a structured state data block;

[0025] Generate the current state hash value for each state data block and link it with the hash value of the previous state data block to form a chain-structured state hash sequence;

[0026] The state hash sequence is uploaded to the blockchain for immutable storage, forming a chain of evidence of clothing state that is both immutable and chronologically ordered.

[0027] Furthermore, the steps for performing difference analysis and image comparison recognition are as follows:

[0028] Based on the image registration algorithm, the images of clothing leaving the warehouse and returning the garment are spatially aligned to ensure that the comparison areas are consistent in spatial position.

[0029] A change detection model is used to compare the aligned image to identify newly added or changed damage areas and obtain the region mask of the damage areas.

[0030] The newly added or changed damaged areas are matched with the outgoing images, and the overlap rate is calculated to determine whether it is a new damage or an exacerbation of the original damage.

[0031] Quantitative analysis is performed on newly added or changed damaged areas, and damage level assessment results are generated by combining them with preset damage assessment rules.

[0032] Furthermore, the steps for generating a damage analysis report are as follows:

[0033] Time-series state data is constructed based on historical clothing inspection records stored in the blockchain to form a clothing state evolution sequence;

[0034] Identify and label state changes between adjacent nodes in a state evolution sequence;

[0035] A causal graph of clothing damage is constructed based on a pre-defined causal discovery algorithm. By combining the current state changes with contextual data, the direct cause of the damage is inferred.

[0036] Output a damage liability score based on causal inference and generate a damage analysis report that includes user information, details of status changes, and the strength of evidence.

[0037] The beneficial effects of this invention are:

[0038] 1. This invention effectively identifies whether acquired clothing images have been beautified or tampered with by performing image authenticity analysis. Specifically, it employs illumination direction estimation, gray-level co-occurrence matrix texture analysis, and edge detection algorithms to detect illumination consistency, texture anomalies, and smooth or broken edge features in the image, thereby eliminating forged or modified images, ensuring the accuracy and reliability of subsequent damage detection, and improving the system's ability to determine the true state of damage.

[0039] 2. This invention utilizes a causal discovery algorithm to perform in-depth analysis of historical garment inspection data and state evolution sequences to infer the direct causes of damage. By constructing a causal map of garment damage and combining contextual environment and time series changes, the invention scientifically identifies the causes of damage and the responsible parties. This method not only enhances the objectivity and transparency of liability determination but also provides effective decision support for rental management, reduces disputes, and improves user trust and management efficiency. Attached Figure Description

[0040] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0041] Figure 1 This is a flowchart of a clothing information traceability method based on QR code recognition technology provided by the present invention;

[0042] Figure 2 This is a flowchart illustrating the implementation of a clothing information traceability method based on QR code recognition technology provided by the present invention. Detailed Implementation

[0043] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0044] Example 1

[0045] A method for tracing clothing information based on QR code recognition technology, such as Figure 1 As shown, it includes:

[0046] S100: Generate a QR code containing unique identification information for the rental clothing, and embed the QR code on the corresponding clothing to identify its identity and establish a unique index relationship;

[0047] Furthermore, the QR code is used to guide rental users to a URL page specified by the cloud server by scanning it. Users can complete operations such as confirming clothing information, uploading clothing image data, and binding identity information through the URL page.

[0048] Specifically, the system backend assigns a unique identifier (UID) to each garment. This UID may include a combination of information such as garment number, rental batch number, category code, and manufacturing timestamp. The UID is then encrypted to generate a QR code. The QR code uses a standard QR encoding format to encode the UID into a QR code image, which is then printed by a QR code printing device onto a flexible material with washability and durability (such as PVC coated fabric, self-adhesive labels, etc.).

[0049] When picking up rented clothing, users can scan the QR code on the clothing using a mobile device provided by the rental platform (such as a mobile app or rental terminal device). The UID in the QR code will be parsed and automatically redirected to a pre-set URL page on the cloud server. This page guides users through the binding process.

[0050] Displays basic information about the current clothing, including clothing image, brand and model, current rental status, and rental period reminder;

[0051] A user identity verification interface is provided, where users need to bind their identity through methods such as account login, mobile phone number verification, and facial recognition;

[0052] The image acquisition module is activated, guiding the user to upload an image of the current garment status as the initial image for shipment.

[0053] The user's identity information, the collected image data, and the clothing UID indicated in the QR code are associated and stored, and then uploaded to the cloud server database to complete the clothing outbound registration.

[0054] To ensure system security and data consistency, the cloud server encrypts and verifies all requests for access via QR code scanning, ensuring that the URL pointed to by the QR code can only be accessed within a specific time window, and uses the HTTPS protocol to ensure the secure transmission of image data.

[0055] This step establishes a one-to-one correspondence between the physical garment and its digital identity, and uses QR code technology to complete the binding process between the user and the garment, providing basic data support for subsequent image acquisition, status analysis, and accountability.

[0056] S200: During the clothing outbound and return process, images of the clothing are captured by a mobile terminal to form an image data record that includes outbound and return images.

[0057] Specifically, before the garment is picked up by the customer, staff or the customer scans the QR code on the garment using a mobile device to verify their identity. The terminal then activates the image acquisition module. The system guides the operator to capture images of the garment from multiple angles (such as the front, back, side, cuffs, collar, hem, and other key areas) according to a preset template. Each image can be accompanied by metadata such as resolution, timestamp, and exposure value. After image acquisition, the images are automatically uploaded to a cloud server as an "outbound image record" for the garment, used for subsequent comparative analysis.

[0058] When a user returns clothing, multi-angle images of the garment are captured again via a mobile device. The acquisition process is consistent with that during outbound processing to ensure spatial correspondence and accurate feature matching in image comparison. The returned image records are also uploaded to a cloud server and linked to the garment's unique identifier.

[0059] S300: Uploads the collected image data to the cloud server and performs image authenticity analysis. For images that pass the image authenticity analysis, it performs damage state analysis based on a visual detection model to obtain damage detection results.

[0060] Furthermore, the steps of image authenticity analysis are as follows:

[0061] Based on the illumination direction estimation algorithm, the shadow edge and brightness distribution information of the image region are extracted, the main illumination direction in the image is inferred, and illumination consistency analysis is performed to determine whether there are unnatural illumination changes in the image.

[0062] Based on the gray-level co-occurrence matrix, local texture features of images are extracted to identify abnormally smooth regions or repetitive texture structures in the image, which can be used to detect potential image forgery regions.

[0063] An edge detection algorithm is used to identify natural edge structures in an image and analyze changes in edge continuity and sharpness to determine whether there are breaks, smoothing, or edge overlaps caused by image editing.

[0064] Specifically, to detect whether there are unnatural lighting distributions or traces of post-processing in an image, the system adopts the following algorithm flow:

[0065] Using illumination direction estimation algorithms (such as the Lambertian model based on the shape-shadow relationship and the illumination gradient inversion model), the shadow edges and light-dark distribution areas of clothing regions in the image are analyzed; shadow contours in key areas (such as clothing folds, cuff edges, and neckline areas) are extracted; the incident direction of the main light source is deduced based on the relationship between the shadow edges and the shape structure; if there are significantly inconsistent illumination directions in different areas of the image (i.e., the angle between illumination directions is too large), it may be a stitched or post-edited image; an illumination direction consistency score is output as one of the criteria for image authenticity. The formula for calculating the angle between illumination directions is:

[0066] ;

[0067] in, This represents the angle between the illumination of any two regions. Represents the direction vector of illumination. This represents the magnitude of the illumination direction vector. The standard deviation of the angular distribution is compared with an empirical threshold; if the difference in illumination direction is small in most areas, the score is high. The scoring function is defined as follows: ,in The standard deviation of the angular distribution is represented by the standard deviation of the angular distribution. This represents the maximum permissible empirical threshold.

[0068] To determine whether there are post-processing forgeries such as smearing, beautification, or cloning stamps in an image, the system extracts local texture features of the image based on the gray-level co-occurrence matrix: the image is divided into multiple local regions (such as 16×16 or 32×32 pixel windows); the gray-level co-occurrence matrix is ​​calculated for each window, and feature vectors such as energy, contrast, homogeneity, and correlation are extracted from it;

[0069] These feature vectors are input into a preset texture anomaly detection model (which can be SVM, KNN, or a lightweight neural network); abnormally smooth regions, repetitive texture regions, or regions with local texture abrupt changes are identified; if a large number of low variance regions or pattern repetition regions are found, it indicates that the image has been over-enhanced or manually edited.

[0070] By detecting the edge morphology of an image, it is possible to identify whether there are edge anomalies or breaks caused by image editing. The specific steps include: using the Canny edge detection algorithm to extract the salient edges of the image (i.e., natural boundaries such as clothing outlines, seams, and decorative patterns); analyzing the edges, such as edge continuity (analyzing whether there are sudden breaks in the edge curve), sharpness changes (such as abrupt changes between blurred and clear areas), and geometric symmetry or overlap detection (checking whether there are left-right duplication or partial pasting phenomena in the image); statistically analyzing the above detection results, if there are a high proportion of discontinuous edges, blurred or overlapping edges, etc., the authenticity of the image is considered questionable.

[0071] The system independently evaluates the authenticity and credibility of the image based on the output results of the three analysis modules. If any analysis does not meet the preset evaluation rules, the image upload is rejected or marked as a "suspicious image", and the user is prompted to re-collect the image.

[0072] By integrating illumination consistency assessment, local texture anomaly detection, and edge structure integrity analysis, this method can effectively identify potential forgery, tampering, or unnatural editing in images. On one hand, illumination direction estimation-based methods can detect areas with inconsistent light sources in the image, thus eliminating synthetic images. On the other hand, texture features extracted from the gray-level co-occurrence matrix help identify excessively smoothed or repetitive areas in the image, thereby identifying potential copy-paste forgeries. Simultaneously, edge detection analysis of edge continuity and sharpness can reveal unnatural editing traces.

[0073] Furthermore, the steps for damage state analysis are as follows:

[0074] Image data that has passed image authenticity analysis is input into a pre-trained visual detection model, which extracts features from clothing images based on a convolutional neural network;

[0075] The visual detection model identifies surface damage features in the image, including but not limited to cracks, stains, wear, abnormal wrinkles, or areas of loose threads.

[0076] The identified damaged areas are labeled and classified, and damage detection results are generated and bound to the image.

[0077] Specifically, clothing images that have passed authenticity analysis are input into a pre-trained visual detection model. This model preferably employs a convolutional neural network structure, such as ResNet, YOLOv5, Faster R-CNN, or U-Net, to extract key visual features related to damage in the images. The model's input is a color image with a resolution of 512×512 or higher. To improve model performance, image normalization, scaling, and enhancement (such as contrast stretching and random cropping) can be optionally applied. The visual detection model locates and identifies potential anomalies on the clothing surface in the images, outputting damage types including cracks, stains, wear, abnormal wrinkles, and loose threads. It also provides specific location and category labels for each damaged area in the image; for example, using a YOLOv5 model to output multiple rectangles with category labels, or using a U-Net network to generate pixel-level masks for the damaged areas. Finally, the analysis results for each image are structured and output as damage detection result data.

[0078] Based on a pre-trained convolutional neural network visual detection model, this method can automatically, efficiently, and accurately identify various damage features on clothing surfaces, such as cracks, stains, wear, abnormal wrinkles, or loose threads. By extracting, labeling, and classifying the depth features of damaged areas in the image, this method significantly improves the accuracy and consistency of damage identification, avoiding subjective errors and omissions inherent in manual detection. Simultaneously, the generated structured damage detection results provide standardized and quantitative evidence for subsequent state comparison analysis, damage liability determination, and traceability.

[0079] S400: Combines the damage detection results with the detection timestamp, collection location, and user identification data, and generates a digital fingerprint using a hash algorithm to form a chain of evidence of clothing status with a chronological order;

[0080] Furthermore, the steps to form a chain of evidence regarding the condition of the clothing are as follows:

[0081] Each clothing damage detection result is combined with the corresponding detection timestamp, user identification information, collection location information, and hash digest of image data to form a structured state data block;

[0082] Generate the current state hash value for each state data block and link it with the hash value of the previous state data block to form a chain-structured state hash sequence;

[0083] The state hash sequence is uploaded to the blockchain for immutable storage, forming a chain of evidence of clothing state that is both immutable and chronologically ordered.

[0084] Specifically, each time clothing is shipped out or returned, the system generates a structured status data block containing the following fields:

[0085] Detection results: Damage analysis results output by the visual detection model, including damage type, location, area, and confidence level;

[0086] Image summary: The image hash value extracted from the corresponding image data using a hash algorithm (such as SHA-256), used to identify the image content;

[0087] Timestamp: A precise record of the time of garment inspection (e.g., UTC time);

[0088] User Identifier: The unique identity ID of the rental user (such as an encrypted mobile phone number or anonymous UUID);

[0089] Location of collection: Fields that identify the location where clothing images are collected, such as GPS coordinates or store codes;

[0090] Data signature: A digital signature generated by the system or device to ensure the authenticity and trustworthiness of the data source.

[0091] Each data block is encapsulated as a standard JSON object according to the above structure, or serialized as binary structure data.

[0092] The system performs hash processing on each state data block using a hash algorithm (such as SHA-256 or Keccak-256) to obtain a unique hash value for subsequent chain-like connections. State data blocks are concatenated according to the chronological order of data collection, establishing logical references between the current block and the previous block to form a chain structure. This creates an irreversible state hash sequence; if the data content of any block is tampered with, the hash of subsequent blocks will not correspond, ensuring chain integrity. The hash sequence can be periodically or in real-time written into smart contracts on consortium or public blockchains. This includes generating a digital signature for each state data block, calling the blockchain smart contract interface to package the hash value and timestamp and write it on-chain; blockchain nodes completing the consensus process and recording it in the block, achieving immutable on-chain notarization; and generating an on-chain notarization address or transaction hash for each rental order for subsequent verification.

[0093] By constructing structured state data blocks and generating hash value sequences, and combining this with blockchain technology, a chain-like record and tamper-proof evidence of clothing status information are achieved, effectively ensuring the authenticity and timeliness of each test result and related metadata. This chain of evidence is tamper-proof and traceable, providing credible evidentiary support for subsequent discrepancy analysis, damage liability determination, and dispute resolution.

[0094] S500: After the clothing is returned, the cloud server retrieves the outbound images and outbound damage detection results, performs difference analysis and image comparison and recognition with the returned damage detection results, determines whether there is any new damage, and assesses the degree of damage.

[0095] Furthermore, the steps for performing difference analysis and image comparison recognition are as follows:

[0096] Based on the image registration algorithm, the images of clothing leaving the warehouse and returning the garment are spatially aligned to ensure that the comparison areas are consistent in spatial position.

[0097] A change detection model is used to compare the aligned image to identify newly added or changed damage areas and obtain the region mask of the damage areas.

[0098] The newly added or changed damaged areas are matched with the outgoing images, and the overlap rate is calculated to determine whether it is a new damage or an exacerbation of the original damage.

[0099] Quantitative analysis is performed on newly added or changed damaged areas, and damage level assessment results are generated by combining them with preset damage assessment rules.

[0100] Specifically, before detecting damage changes, the outgoing and returning images of the same garment need to be spatially aligned to ensure that subsequent comparisons of image differences are consistent in spatial dimensions. First, local feature extraction algorithms such as SIFT, SURF, or ORB are used to extract key point features from the two images. Then, the RANSAC algorithm is used to estimate the affine transformation matrix or perspective transformation matrix between the images. Finally, the returning image undergoes a geometric transformation to make it consistent with the outgoing image in terms of size, angle, and scale, resulting in a registered image.

[0101] Pixel-level or feature-level change detection is performed on the registered image to identify newly added or worsened damage areas. This includes aligning the input aligned image to a depth change detection model (such as SiameseNetwork, ChangeStar, CDNet, etc.). The model outputs a change mask image, where each pixel value indicates whether a significant change has occurred at that location. Morphological closing operations and area filtering are performed on the mask image to remove noise areas and retain potential damage areas.

[0102] To distinguish between newly added damage and the aggravation of existing damage, the system performs an intersection-union (IoU) calculation on the damaged area in the outgoing image and the change mask in the returned image. If the overlap rate is lower than a preset threshold (e.g., IoU < 0.2), the change is judged as "new damage"; if the area of ​​the region increases significantly, it is judged as "aggravation of existing damage".

[0103] The system performs quantitative analysis on the identified change areas to assess the degree of damage. In one feasible implementation, area statistics analysis can be used for quantification, that is, the proportion of the number of pixels in the change area to the total area of ​​the image.

[0104] By employing image registration, change detection, and region analysis, it is possible to accurately identify whether new or worsening damage occurs to clothing during the rental period and quantify its severity. Using region masking and overlap rate calculations, it distinguishes between genuine new damage and legacy issues, effectively avoiding misjudgments and confusion of responsibility. This process enhances the objectivity and accuracy of damage assessment and improves the intelligence and fairness of clothing rental management.

[0105] S600: Based on historical detection results and blockchain evidence records, it constructs a state evolution sequence, combines a causal discovery algorithm to infer the causes of clothing damage, identifies the direct causes of the damage, and generates a damage analysis report for liability determination.

[0106] Furthermore, the steps for generating a damage analysis report are as follows:

[0107] Time-series state data is constructed based on historical clothing inspection records stored in the blockchain to form a clothing state evolution sequence;

[0108] Identify and label state changes between adjacent nodes in a state evolution sequence;

[0109] A causal graph of clothing damage is constructed based on a pre-defined causal discovery algorithm. By combining the current state changes with contextual data, the direct cause of the damage is inferred.

[0110] Output a damage liability score based on causal inference and generate a damage analysis report that includes user information, details of status changes, and the strength of evidence.

[0111] Specifically, historical state data corresponding to the unique identifier of the target garment is obtained from the blockchain, including image damage detection results, timestamps, user identifiers, and collection locations for each outbound or returned item. This data is constructed into a state evolution sequence in chronological order, with each node representing a state snapshot, recording the damage characteristics and usage environment information of the garment at that point in time, forming the basic input for subsequent causal analysis.

[0112] By comparing adjacent state nodes in the time series, changes in clothing between consecutive states are identified, including the addition, deterioration, migration, or repair of damage. These changes are then labeled to form an event sequence. For example, "new tear (back)," "stain area expansion," and "wear level upgrade" are all used as observation variables for subsequent causal mapping.

[0113] Causal discovery algorithms are used to model the causal structure of the above event sequence in order to identify possible causes of damage changes. Illustratively, the PC (Peter–Clark) algorithm is used as an example, and its implementation steps are as follows:

[0114] Use the labels in the event sequence as random variable nodes, for example, X1: whether the usage time has expired; X2: user ID history; X3: image authenticity score; X4: new cracks; X5: increased wear and tear;

[0115] Assuming that there may be causal relationships between all variables, construct a complete graph, that is, each variable node is connected by an undirected edge;

[0116] Use statistical tests (such as chi-square test, mutual information, etc.) to determine whether two variables are independent given a third variable. Repeat this operation to test all variable pairs, gradually eliminating irrelevant edges until there are no more edges to remove.

[0117] Based on the established conditional independence relationship, the PC algorithm applies the V-shaped structure rule to determine the direction of the edge. For example, if X1→X3←X2 is the only structure that meets the statistical dependency condition (X1 and X2 are conditionally independent, but each is related to X3), then the causal direction can be determined as X1→X3←X2.

[0118] Further, directional constraints are imposed on other undirected edges in the graph to ensure the formation of a directed acyclic graph and avoid logical conflicts or causal loops.

[0119] After acquiring the causal graph, the system compares the current damage status node with historical event paths. Based on the conditional probability and pattern matching degree in the inference path, it generates a responsibility score (e.g., 0-100 points) for the user. The scoring criteria include, but are not limited to: the severity of the damage increment, direct dependent variables in the event path, image authenticity, and the user's historical risk index. Finally, the system generates a standardized "Damage Analysis Report," which includes elements such as damage description, image evidence, responsibility inference path, causal score, user identity, and strength of evidence, for platform management reference, archiving, or arbitration purposes.

[0120] By constructing a time-series record of the evolution of clothing conditions and combining it with causal discovery algorithms to conduct source analysis on the damage formation process, the direct causes of damage can be effectively identified, clarifying the causal relationship between damage and usage behavior. The resulting liability score and damage analysis report are interpretable and supported by evidence, which not only helps improve the scientific rigor and fairness of liability determination but also provides a reliable basis for user complaints, platform arbitration, and insurance claims, thereby enhancing transparency and trust in the clothing rental process.

[0121] Example 2

[0122] This embodiment uses a "high-end formal wear rental platform" as the application scenario, such as... Figure 2 As shown, the specific implementation process of a clothing information traceability method based on QR code recognition technology is explained in detail.

[0123] Unique Identifier QR Code Generation and Embedding:

[0124] The platform embeds a QR code label made of fabric inside each high-end gown available for rent, sewn onto the inside. This QR code contains a unique identifier for the gown (e.g., clothing ID: CLOTH-202507001), and links the QR code to clothing information (size, brand, fabric, color, historical damage records, etc.) in the platform's database. After scanning the code, users can access a dedicated rental page to complete identity binding and information confirmation.

[0125] Image acquisition record:

[0126] When a customer leaves the store or receives the dress, staff or the customer can use the platform's app to access their phone's camera to capture images of the dress's front, back, and details, generating an "outbound image record." When the dress is returned, the platform's recycling staff will also use the app to take images of the dress at the time of return, creating a "return image record."

[0127] Image fidelity and damage detection:

[0128] After receiving the image, the platform server first performs illumination direction estimation and texture consistency analysis to determine if the image has been edited. If edits are found, the image is rejected or marked as suspicious. Images that pass the authenticity check are then fed into a ResNet-based convolutional neural network model. This model has been trained on thousands of images labeled with dress defects and can automatically identify surface anomalies such as stains, scratches, and wear, and output structured damage information, including damage type, location coordinates, and damage severity level.

[0129] State evidence chain generation:

[0130] The platform packages the structured results generated from each image detection, along with information such as the timestamp of image acquisition, user ID, and geographical location of the acquisition device, into a state data block, calculates its hash value, and links it with the hash of the previous state data block to form a chain structure. This is then uploaded to a notarization system built on a consortium blockchain to ensure that the data cannot be tampered with and that the time sequence is traceable.

[0131] Difference analysis and image comparison:

[0132] When a user returns a dress, the cloud retrieves the outgoing and returned images of the dress, performs spatial alignment using SIFT+RANSAC image registration technology, and employs a change detection model (such as a variant of U-Net) to identify newly added or expanded damage areas in the returned image. Based on changes in the area of ​​the damage area, color differences, morphological characteristics, etc., it is determined whether the damage is new or an aggravation of existing damage, and a damage level score is assigned.

[0133] Causal analysis and liability determination:

[0134] The platform extracts the timeline changes of the dress's state based on the historical state evolution sequence stored in the blockchain. Through a causal graph learning model based on PC algorithms, it identifies potential causal relationships between user actions, weather conditions, return time delays, and damage, and outputs a damage liability score report, including liability attribution suggestions, evidence node citations, image comparison results, and reliability indicators.

[0135] Ultimately, the damage analysis report is stored in the platform's database and simultaneously sent to user accounts and the customer service review system to support subsequent dispute resolution and compensation determination.

[0136] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. 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 tracing clothing information based on QR code recognition technology, characterized in that, include: Generate a QR code containing unique identification information for the rental clothing, and embed the QR code on the corresponding clothing to identify its identity and establish a unique index relationship; During the clothing outbound and return process, images of the clothing are captured using mobile terminals to form image data records that include outbound and return images. The collected image data is uploaded to the cloud server and image authenticity analysis is performed. The images that pass the image authenticity analysis are then subjected to damage state analysis based on a visual detection model to obtain damage detection results. The damage detection results, along with the detection timestamp, collection location, and user identification data, are used to generate a digital fingerprint through a hash algorithm, forming a chain of evidence of clothing status with a chronological order. After the clothing is returned, the cloud server retrieves the outbound images and outbound damage detection results, performs difference analysis and image comparison and recognition with the returned damage detection results, determines whether there is any new damage, and assesses the degree of damage. Based on historical test results and blockchain evidence records, a state evolution sequence is constructed. Combined with a causal discovery algorithm, the causes of clothing damage are inferred, the direct causes of the damage are identified, and a damage analysis report is generated for liability determination.

2. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The QR code is used to guide rental users to a URL page specified by the cloud server by scanning it. Users can complete operations such as confirming clothing information, uploading clothing image data, and binding identity information through the URL page.

3. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The steps of image authenticity analysis are as follows: Based on the illumination direction estimation algorithm, the shadow edge and brightness distribution information of the image region are extracted, the main illumination direction in the image is inferred, and illumination consistency analysis is performed to determine whether there are unnatural illumination changes in the image. Based on the gray-level co-occurrence matrix, local texture features of images are extracted to identify abnormally smooth regions or repetitive texture structures in the image, which can be used to detect potential image forgery regions. An edge detection algorithm is used to identify natural edge structures in an image and analyze changes in edge continuity and sharpness to determine whether there are breaks, smoothing, or edge overlaps caused by image editing.

4. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The steps for damage status analysis are as follows: Image data that has passed image authenticity analysis is input into a pre-trained visual detection model, which extracts features from clothing images based on a convolutional neural network; The visual detection model is used to identify surface damage features in the image; The identified damaged areas are labeled and classified, and damage detection results are generated and bound to the image.

5. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The steps to form a chain of evidence regarding the condition of clothing are as follows: Each clothing damage detection result is combined with the corresponding detection timestamp, user identification information, collection location information, and hash digest of image data to form a structured state data block; Generate the current state hash value for each state data block and link it with the hash value of the previous state data block to form a chain-structured state hash sequence; The state hash sequence is uploaded to the blockchain for immutable storage, forming a chain of evidence of clothing state that is both immutable and chronologically ordered.

6. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The steps for performing difference analysis and image comparison recognition are as follows: Based on the image registration algorithm, the images of clothing leaving the warehouse and returning the garment are spatially aligned to ensure that the comparison areas are consistent in spatial position. A change detection model is used to compare the aligned image to identify newly added or changed damage areas and obtain the region mask of the damage areas. The newly added or changed damaged areas are matched with the outgoing images, and the overlap rate is calculated to determine whether it is a new damage or an exacerbation of the original damage. Quantitative analysis is performed on newly added or changed damaged areas, and damage level assessment results are generated by combining them with preset damage assessment rules.

7. The method for tracing clothing information based on QR code recognition technology according to claim 1, characterized in that, The steps to generate a damage analysis report are as follows: Time-series state data is constructed based on historical clothing inspection records stored in the blockchain to form a clothing state evolution sequence; Identify and label state changes between adjacent nodes in a state evolution sequence; A causal graph of clothing damage is constructed based on a pre-defined causal discovery algorithm. By combining the current state changes with contextual data, the direct cause of the damage is inferred. Output a damage liability score based on causal inference and generate a damage analysis report that includes user information, details of status changes, and the strength of evidence.

Citation Information

Patent Citations

  • Leasing method, leasing device, leasing platform and storage medium

    CN113065908A

  • Rental equipment survey method and device, computer equipment and storage medium

    CN114897581A