Blockchain-based intelligent steel bar processing whole-process tracing method and device
By generating rolling patterns and fingerprints from steel bar images and combining them with hash operations and digital signatures, the accuracy problem of tracing the entire steel bar processing process was solved, ensuring the reliability and immutability of data on the blockchain and achieving accurate traceability of information throughout the entire process.
Patent Information
- Application Number
- CN202511405636.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing technologies cannot achieve accurate traceability of the entire steel bar processing process, which means that the accuracy of data on the blockchain cannot be guaranteed.
By recognizing images of steel bars, rolling patterns and steel bar fingerprints are generated. Combined with processing information, hash calculations and digital signatures are performed to generate evidence-based data blocks and upload them to the blockchain network, ensuring the accuracy and immutability of the data.
It achieves the accuracy and immutability of information throughout the entire steel bar processing process on the blockchain, providing a reliable data foundation for quality traceability and supply chain management.
Smart Images

Figure CN120875916B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain storage, in particular to a smart steel processing full-process tracing method and device based on blockchain storage. BACKGROUND
[0002] In the current blockchain and steel processing combined tracing practice, the steel material source is usually collected through the Internet of Things, the smart contract is used to execute the procurement order generation, audit and settlement, and the key information is stored in the blockchain to realize the tamper-proof traceability. However, the current tracing method cannot adapt to the steel processing full-process tracing, and cannot guarantee the data accuracy on the blockchain.
[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0004] The main purpose of the present application is to provide a smart steel processing full-process tracing method and device based on blockchain storage, which aims to solve the technical problem that it is difficult to guarantee the data accuracy of steel processing full-process information on the blockchain in the prior art.
[0005] To achieve the above purpose, the present application provides a smart steel processing full-process tracing method based on blockchain storage, which comprises the following steps:
[0006] Recognizing the steel image of the target steel, determining the rolling pattern of the target steel, generating a steel fingerprint according to the rolling pattern, and generating a unique steel identifier according to the steel fingerprint;
[0007] Collecting the processing information of each processing equipment in the steel processing full-process, binding the processing information with the unique steel identifier, and generating a steel processing record;
[0008] Hashing and digitally signing the steel processing record to obtain a storage data block, and uploading the storage data block to a blockchain network;
[0009] Based on the storage record, the corresponding tracing result of the storage record is obtained on the blockchain network, and the storage record is the feedback information after the storage data block is successfully uploaded to the blockchain network.
[0010] In an embodiment, the step of recognizing the steel image of the target steel, determining the rolling pattern of the target steel, generating a steel fingerprint according to the rolling pattern, and generating a unique steel identifier according to the steel fingerprint comprises:
[0011] Obtaining a full-form pattern image of the target steel under multiple viewing angles;
[0012] perform image recognition on the full-form pattern images under multiple perspectives respectively to obtain rolling textures of the target steel bar;
[0013] perform feature extraction on the rolling textures to obtain local binary pattern features and gray level co-occurrence matrix features;
[0014] fuse the local binary pattern features and the gray level co-occurrence matrix features corresponding to each of the full-form pattern images to generate a unique feature vector representing the overall surface texture of the target steel bar, and take the unique feature vector as a steel bar fingerprint;
[0015] encode the steel bar fingerprint to generate a unique steel bar identification.
[0016] In an embodiment, the step of performing image recognition on the full-form pattern images under multiple perspectives respectively to obtain rolling textures of the target steel bar comprises:
[0017] perform corrosion recognition on the full-form pattern images, and when there is a corrosion area on the surface of the target steel bar, locate the corrosion area in the full-form pattern image;
[0018] expand the corrosion area by a preset expansion scale to obtain a context area;
[0019] input the corrosion area and the context area into a texture reconstruction model to obtain a rolling texture repair feature map of the corrosion area;
[0020] determine the gray scale distribution of the rolling texture repair feature map and the full-form pattern image respectively, and perform histogram matching based on the gray scale distribution to obtain a rolling texture repair feature map that eliminates illumination differences;
[0021] determine the joint between the repair area corresponding to the rolling texture repair feature map that eliminates illumination differences and the full-form pattern image, perform Poisson fusion on the joint to obtain the rolling texture of the target steel bar.
[0022] In an embodiment, before the step of inputting the corrosion area and the context area into a texture reconstruction model to obtain a rolling texture repair feature map of the corrosion area, the method further comprises:
[0023] extract an artificial corrosion area and an original texture in a steel bar surface image simulated by artificial corrosion, combine the artificial corrosion area and the original texture into a data pair, and take the data pair as training data;
[0024] input the training data into an initial texture reconstruction model;
[0025] Based on the initial texture reconstruction model, the feature extraction layer extracts the spatial features of undamaged textures in a preset extraction area outside the artificial rust area from the training data, and adaptively samples the periodic directional features of the rolling texture based on the feature extraction layer.
[0026] A repair texture map matching the size of the artificial rust area is generated based on the spatial features and the periodic directional features.
[0027] The similarity analysis between the repaired texture map and the original texture is performed to obtain the repair difference value;
[0028] The model parameters of the initial texture reconstruction model are constrained based on the repair difference value to obtain the texture reconstruction model.
[0029] In one embodiment, the step of generating a unique identifier for a steel bar based on the steel bar fingerprint includes:
[0030] Determine the production batch number of the target steel bar, and determine the blast furnace molten iron batch based on the production batch number;
[0031] Obtain the trace element ratio data of the blast furnace hot metal in the batches mentioned above;
[0032] A chemical fingerprint is generated based on the trace element ratio data;
[0033] A unique identifier for a steel bar is generated, primarily based on the steel bar fingerprint and secondarily based on the chemical fingerprint.
[0034] In one embodiment, the step of collecting processing information from each processing device throughout the entire steel bar processing process, binding the processing information with the unique identifier of the steel bar, and generating a steel bar processing record includes:
[0035] Collect processing information throughout the entire steel bar processing process. The processing information includes equipment number, equipment execution parameters, process status code, and corresponding timestamp.
[0036] The device number, the device execution parameters, the process status code, and the timestamp are encapsulated into a data packet;
[0037] Generate key-value pairs based on the data packet and the unique identifier of the rebar;
[0038] The key-value pairs are sorted according to the process logic of the data packet, and the sorted key-value pairs are aggregated to generate a rebar processing record.
[0039] In one embodiment, the step of performing hash calculation and digital signature on the steel bar processing record to obtain a storage data block, and uploading the storage data block to the blockchain network includes:
[0040] Determine a subset of key quality parameters in the steel bar processing records, and calculate a first-level hash value for the subset of key quality parameters;
[0041] The second-level hash value is calculated for the steel bar processing record. The calculation methods for the first-level hash value and the second-level hash value are different.
[0042] Generate a device-level digital signature of the first-level hash value based on the device's private key;
[0043] A factory-level digital signature is generated based on the factory-side private key to produce the second-level hash value;
[0044] A data block for evidence storage is generated based on the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature.
[0045] The evidence storage data block is uploaded to the blockchain network.
[0046] In one embodiment, the step of generating a storage data block based on the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature includes:
[0047] Add a quality level flag to the header of the first-level hash value to obtain an optimized first-level hash value;
[0048] When the target steel bar passes through the full-process processing equipment within a preset time, the second-level hash value is evenly cut and distributed to the full-process processing equipment so that the full-process processing equipment generates fragment signatures.
[0049] All the fragmented signatures are aggregated and reconstructed into a complete hash value to obtain the joint digital signature;
[0050] Based on the optimized first-level hash value, the second-level hash value, the device-level digital signature, the joint digital signature, and the factory-level digital signature, a data block for evidence storage is generated.
[0051] In one embodiment, the step of obtaining the traceability result corresponding to the evidence storage record on the blockchain network based on the evidence storage record includes:
[0052] The evidence storage records are parsed to determine the query identifier of the query target, wherein the query identifier is a unique identifier of the steel bar contained in the evidence storage records;
[0053] Based on the query identifier, the target evidence storage data block is traversed in the blockchain network, and there is a unique mapping relationship between the unique identifier of the steel bar and the target evidence storage data block.
[0054] The target evidence storage data block is decoded to obtain the traceability result corresponding to the evidence storage record.
[0055] Furthermore, to achieve the above objectives, this application also proposes a blockchain-based intelligent steel bar processing full-process traceability device, which includes:
[0056] The fingerprint generation module is used to identify the image of the target steel bar, determine the rolling pattern of the target steel bar, generate a steel bar fingerprint based on the rolling pattern, and generate a unique identifier for the steel bar based on the steel bar fingerprint.
[0057] The information recording module is used to collect processing information from each processing equipment in the entire process of steel bar processing, bind the processing information with the unique identifier of the steel bar, and generate steel bar processing records.
[0058] The data storage module is used to perform hash calculations and digital signatures on the steel bar processing records to obtain storage data blocks, and upload the storage data blocks to the blockchain network.
[0059] The data traceability module is used to obtain the traceability result corresponding to the evidence storage record on the blockchain network based on the evidence storage record, wherein the evidence storage record is the feedback information after the evidence storage data block is successfully uploaded to the blockchain network.
[0060] In addition, to achieve the above objectives, this application also proposes a smart steel bar processing full-process traceability device based on blockchain evidence storage. The smart steel bar processing full-process traceability device based on blockchain evidence storage includes: a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The computer program is configured to implement the steps of the smart steel bar processing full-process traceability method based on blockchain evidence storage as described above.
[0061] In addition, to achieve the above objectives, the present invention also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the smart steel bar processing full-process traceability method based on blockchain evidence storage as described above.
[0062] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the smart steel bar processing full-process traceability method based on blockchain evidence storage as described above.
[0063] This application provides a method for full-process traceability of intelligent steel bar processing based on blockchain evidence storage. By extracting the rolling pattern of the steel bar itself to generate a unique, uncopyable digital fingerprint, it achieves precise anchoring of physical entity and digital identity. Automated data collection and digital signature technologies ensure that processing information is authentic, complete, and traceable from the source. Furthermore, by leveraging the distributed storage and immutability of blockchain, the aforementioned trustworthy data is permanently solidified, constructing a decentralized trust foundation. Ultimately, the accuracy of the entire process information on the blockchain is fundamentally guaranteed, providing a solid data foundation for achieving accurate and reliable quality traceability and supply chain management. Attached Figure Description
[0064] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a flowchart illustrating Embodiment 1 of the intelligent steel bar processing full-process traceability method based on blockchain evidence storage in this application;
[0067] Figure 2 A flowchart is provided to assign a unique identifier to the steel bar in an embodiment of the intelligent steel bar processing full-process traceability method based on blockchain evidence storage in this application.
[0068] Figure 3 This is a schematic diagram of the module structure of the smart steel bar processing full-process traceability device based on blockchain evidence in an embodiment of this application;
[0069] Figure 4 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the blockchain-based intelligent steel bar processing full-process traceability method in the embodiments of this application.
[0070] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0071] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0072] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0073] The main solution of this application embodiment is: to identify the image of the target steel bar, determine the rolling pattern of the target steel bar, generate a steel bar fingerprint based on the rolling pattern, and generate a unique steel bar identifier based on the steel bar fingerprint;
[0074] Collect processing information from each processing equipment throughout the entire steel bar processing process, bind the processing information with the unique identifier of the steel bar, and generate a steel bar processing record;
[0075] The steel bar processing records are hashed and digitally signed to obtain a data block for evidence storage, which is then uploaded to the blockchain network.
[0076] Based on the evidence storage record, the traceability result corresponding to the evidence storage record is obtained on the blockchain network. The evidence storage record is the feedback information after the evidence storage data block is successfully uploaded to the blockchain network.
[0077] Currently, in the traceability practice of combining blockchain with steel bar processing, the usual approach is to collect the source of steel bar materials through the Internet of Things (IoT), use smart contracts to execute the generation, review, and settlement of purchase orders, and store key information on the blockchain to achieve tamper-proof traceability. However, the current traceability method cannot be adapted to the entire process of steel bar processing traceability and cannot guarantee the accuracy of the data on the blockchain.
[0078] This application provides a solution that generates a unique, uncopyable digital fingerprint by extracting the rolling pattern of the steel bars themselves, thus achieving precise anchoring of physical entities and digital identities. It utilizes automated data collection and digital signature technology to ensure that processing information is authentic, complete, and traceable from the source. Furthermore, by leveraging the distributed storage and immutability of blockchain, the aforementioned trustworthy data is permanently solidified, constructing a decentralized trust foundation. Ultimately, this fundamentally guarantees the accuracy of information throughout the entire process on the blockchain, providing a solid data foundation for accurate and reliable quality traceability and supply chain management.
[0079] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a smart rebar processing full-process traceability device based on blockchain evidence storage, etc. This embodiment does not specifically limit it in this way. The following uses a smart rebar processing full-process traceability device based on blockchain evidence storage as an example to describe this embodiment and the following embodiments.
[0080] All actions involving the acquisition of signals, information, or data in this application are carried out in accordance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the owner of the relevant device.
[0081] This application provides a method for tracing the entire process of intelligent steel bar processing based on blockchain-based evidence storage, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the intelligent steel bar processing traceability method based on blockchain evidence storage in this application.
[0082] In this embodiment, the smart steel bar processing full-process traceability method based on blockchain evidence storage includes steps S10~S40:
[0083] Step S10: Identify the image of the target steel bar, determine the rolling pattern of the target steel bar, generate a steel bar fingerprint based on the rolling pattern, and generate a unique steel bar identifier based on the steel bar fingerprint.
[0084] It should be noted that "target rebar" refers to a specific rebar that requires individual identification, information collection, and full-process traceability during processing, transportation, or use. A rebar image refers to a digital image of a specific area on the surface of the target rebar, typically an end face or surface, acquired using image acquisition devices such as industrial cameras, high-definition scanners, or smartphones. The rebar image needs to be clear enough to display the microscopic texture features of the rebar surface. Rolling marks refer to the microscopic textures and patterns naturally formed on the surface of the rebar during hot rolling production due to scratches or wear on the rolls. These marks are random and unique; even rebars from the same batch may exhibit slight differences in their marks.
[0085] It should be noted that a rebar fingerprint refers to a highly abstract set of digital feature vectors extracted from the rolling patterns using image processing and feature extraction algorithms, which can uniquely represent a rebar. A rebar unique identifier refers to a fixed-length, unique hash value string generated by hashing the rebar fingerprint.
[0086] Understandably, when assigning a unique identifier to a rebar, the flowchart is as follows: Figure 2 As shown, this process can be summarized into three steps: image acquisition and preprocessing, texture recognition and feature extraction, and unique identifier generation. First, image acquisition equipment installed at the production line's unloading port or processing station automatically captures high-resolution images of the target rebar surface under fixed lighting conditions. The acquired raw images may have issues such as uneven lighting, noise, and angular offset. Therefore, image preprocessing is necessary. Preprocessing methods can include grayscale conversion, image noise reduction, contrast enhancement, and geometric correction to improve image quality.
[0087] When an image meets the conditions for texture recognition, computer vision algorithms are used to analyze the preprocessed image, locate the rolling texture region, and extract unique features from it. If a local binarization algorithm is used, key points in the image can be detected, their descriptors calculated, and feature vectors formed. Key points can be intersections, corners, etc., of the texture. These features have a certain degree of stability against rotation, scaling, and lighting changes. If a deep learning method is used, a pre-trained feature extractor can be implemented, which can be constructed from a convolutional neural network. The rebar image is input into the network, and a high-dimensional feature vector is output from the final fully connected layer or a specific intermediate layer. The deep learning model, trained on a large amount of data, can automatically learn the abstract features that best represent the rebar texture, obtaining the feature vector. Regardless of the method, after obtaining the feature vector, it can be identified as the rebar fingerprint. This feature vector is then input into an encrypted hash function, such as SHA-256. The hash function maps input data of arbitrary length to a fixed-length binary string, and the resulting binary string is the unique identifier of the rebar.
[0088] In one feasible implementation, the steps of identifying the target rebar image, determining the rolling pattern of the target rebar, generating a rebar fingerprint based on the rolling pattern, and generating a unique rebar identifier based on the rebar fingerprint include:
[0089] Acquire full-morphology images of the target rebar from multiple perspectives;
[0090] Image recognition is performed on the full-morphology pattern images from multiple perspectives to obtain the rolling texture of the target steel bar;
[0091] Feature extraction is performed on the rolling texture to obtain local binary pattern features and gray-level co-occurrence matrix features;
[0092] By fusing the local binary mode features and gray-level co-occurrence matrix features corresponding to each of the full-morphology mode images, a unique feature vector representing the overall surface texture of the target steel bar is generated, and the unique feature vector is used as the steel bar fingerprint.
[0093] The fingerprint of the steel bar is encoded to generate a unique identifier for the steel bar.
[0094] It should be noted that "multiple perspectives" refers to acquiring images of the same target rebar from different angles and orientations. For example, rotating the rebar around its axis by specific angles, such as 0°, 90°, 180°, or 270°, or selecting multiple points along the rebar's length for imaging. Full-morphology mode images refer to high-resolution digital images that can completely reflect the surface texture of the target rebar from a specific perspective. Local binary mode features are binary features obtained by binarizing local areas of the rolling pattern using a local binarization algorithm. Gray-level co-occurrence matrix features are matrices formed from statistical quantities extracted from the rolling pattern, such as contrast, energy, homogeneity, and correlation. A unique feature vector is a feature vector constructed by fusing all feature data obtained from multiple perspectives and feature extraction methods.
[0095] In practical implementation, an image acquisition system consisting of multiple industrial cameras is deployed on the rebar conveyor rollers or fixed supports, or a robotic arm controls a single camera to capture images at multiple predetermined points. The shooting environment needs to be equipped with uniform and stable light sources to reduce shadows and reflections. High-resolution images of the same area of the rebar at different rotation angles are automatically triggered to ensure coverage of its entire circumference. Then, each raw image undergoes grayscale conversion, filtering and noise reduction, and contrast enhancement to improve image quality. Using edge detection or machine learning models, the main body of the rebar is automatically identified and bounded within the image, eliminating background interference. The bounded area containing only clear rolling marks is the effective rolling mark area.
[0096] For each viewpoint, the effective region of the extracted rolling texture is calculated for its local binary pattern features and gray-level co-occurrence matrix features. When extracting the local binary pattern features, an improved circular neighborhood local binarization operator is used, with the following formula:
[0097]
[0098] in, The coordinates of the center pixel. The grayscale value of the center pixel. Let P be the grayscale values of P neighboring pixels evenly spaced on a circle with radius R centered at the center point. For symbolic functions, This is a local binarization feature.
[0099] When extracting features from the gray-level co-occurrence matrix (GLCM), the GLCM M is first calculated at a specific direction and offset distance d. Matrix elements... Indicates direction The probability that two pixels separated by a distance d have different gray values, i and j respectively. Then, several statistics are extracted from matrix M, such as:
[0100] Contrast: ;
[0101] energy:
[0102] Homogeneity:
[0103] Correlation:
[0104] Assuming there are four viewpoints, each image from which one LBP histogram feature vector and four GLCM statistics are extracted. The local binarized feature vectors and gray-level co-occurrence matrix feature vectors from each viewpoint are concatenated to form a fused feature vector representing that viewpoint. Then, the fused feature vectors from all viewpoints are concatenated again to form an extended feature vector. This extended feature vector serves as the unique feature vector. Finally, this unique feature vector is input into a cryptographic hash function for encoding, yielding a unique identifier for the rebar.
[0105] In one feasible implementation, the step of performing image recognition on the full-morphology pattern images from multiple perspectives to obtain the rolling texture of the target steel bar includes:
[0106] Rust identification is performed on the full-morphology image, and when there is a rust area on the surface of the target steel bar, the rust area in the full-morphology image is located.
[0107] The corroded area is expanded outward by a preset expansion scale to obtain the context area;
[0108] The rusted area and the context area are input into the texture reconstruction model to obtain the rolling texture repair feature map of the rusted area;
[0109] The grayscale distributions of the rolling texture repair feature map and the full-morphology mode image are determined respectively, and histogram matching is performed based on the grayscale distribution to obtain the rolling texture repair feature map that eliminates illumination differences.
[0110] The seam between the repair area corresponding to the rolling texture repair feature map that eliminates illumination differences and the full morphology mode image is determined, and Poisson fusion is performed on the seam to obtain the rolling texture of the target steel bar.
[0111] It should be noted that the rusted area is an abnormal pixel region identified by image recognition algorithms, where the texture features of the steel rebar are damaged or obscured due to oxidation. The context region refers to the normal, undamaged rolling texture area surrounding the "rusted area," obtained by extending outward by a certain pixel distance from the boundary of the rusted area. The rolling texture restoration feature map is a generated image of the same size as the rusted area. It predicts the ideal rolling texture pattern that the rusted area should present without damage, based on the contour of the rusted area and the normal texture information of the context region. The rolling texture restoration feature map that eliminates lighting differences refers to the restored feature map after histogram matching processing, eliminating lighting and color differences between the model-generated content and the actual photographed content.
[0112] In the specific implementation, a trained semantic segmentation model is used to perform pixel-level classification on the input full-morphology image, classifying each pixel in the image into background, normal texture, or rust region, and outputting a binary mask, where a pixel value of 1 indicates a located rust region. Then, based on the obtained rust region mask, an expansion scale is performed to obtain the context region. The rust region and context region are then input into a texture reconstruction model to obtain a rolling texture repair feature map of the rust region. Since the content generated by the model may differ from the actual ambient lighting of the photograph, coordination is required. Therefore, the grayscale distribution of the rolling texture repair feature map and the full-morphology image can be determined separately, and histogram matching is performed based on the grayscale distribution to obtain a rolling texture repair feature map that eliminates lighting differences. The seam between the repair region corresponding to the rolling texture repair feature map that eliminates lighting differences and the full-morphology image is determined, and Poisson fusion is performed on the seam to obtain the rolling texture of the target rebar. The mathematical expression of the processing is as follows:
[0113]
[0114] in, Represents the areas to be integrated. represent The boundary, The source image is in the region gradient field inside, It is the target image. The final fused image in the region The color value within.
[0115] This makes the required integration area The internal texture details are made as consistent as possible with the source image, while the region boundaries... The color values are strictly consistent with the target image to achieve a seamless blending effect.
[0116] In one feasible implementation, before the step of inputting the rusted area and the context area into the texture reconstruction model to obtain the rolling texture repair feature map of the rusted area, the method further includes:
[0117] Artificial rust areas and original textures are extracted from the surface image of the steel bar simulated by artificial rust. The artificial rust areas and the original textures are combined into data pairs, and the data pairs are used as training data.
[0118] Input the training data into the initial texture reconstruction model;
[0119] Based on the initial texture reconstruction model, the feature extraction layer extracts the spatial features of undamaged textures in a preset extraction area outside the artificial rust area from the training data, and adaptively samples the periodic directional features of the rolling texture based on the feature extraction layer.
[0120] A repair texture map matching the size of the artificial rust area is generated based on the spatial features and the periodic directional features.
[0121] The similarity analysis between the repaired texture map and the original texture is performed to obtain the repair difference value;
[0122] The model parameters of the initial texture reconstruction model are constrained based on the repair difference value to obtain the texture reconstruction model.
[0123] It should be noted that the artificial corrosion area refers to a controlled image area of steel bar corrosion generated through chemical or physical methods (such as salt spray testing). The original texture refers to a clear, undamaged rolling texture image acquired by an image acquisition device at the same location on the same steel bar before the artificial corrosion simulation. Training data refers to the dataset used for training; the initial texture reconstruction model refers to the model architecture before training begins, which is a deep learning network with randomly initialized weights and has not yet learned any effective parameters. Spatial features refer to the local texture details and spatial structure information captured by the model. Periodic directional features refer to patterns that exhibit periodicity or directionality along the rolling direction. The restored texture map is an image predicted based on the input artificial corrosion area. The restoration difference value is used to measure the degree of difference between the restored texture map and the original texture.
[0124] In the specific implementation, an artificially corroded image patch is input into an initial texture reconstruction model. Spatial characteristics and periodic directional features are extracted from the encoder portion of the initial texture reconstruction model. Convolutional layers are used to extract rich multi-scale spatial texture features; guided filters adaptively enhance the texture response in specific directions; a self-attention mechanism allows the model to focus on the correlation between distant pixels, thereby capturing periodic patterns; Fourier transform layers analyze the periodicity of the texture in the frequency domain and extract the dominant frequency components as features. After feature fusion, a comprehensive feature containing local details and global regularities is formed. The decoder then receives this comprehensive feature, transforms it back into pixel space, and gradually generates a restored texture map with the same size as the corroded area. The restored texture map is then compared with the original texture to determine the restoration difference value. Based on the restoration difference value, the model parameters of the initial texture reconstruction model are constrained to obtain the texture reconstruction model.
[0125] In one feasible implementation, the step of generating a unique identifier for the reinforcing bar based on the reinforcing bar fingerprint includes:
[0126] Determine the production batch number of the target steel bar, and determine the blast furnace molten iron batch based on the production batch number;
[0127] Obtain the trace element ratio data of the blast furnace hot metal in the batches mentioned above;
[0128] A chemical fingerprint is generated based on the trace element ratio data;
[0129] A unique identifier for a steel bar is generated, primarily based on the steel bar fingerprint and secondarily based on the chemical fingerprint.
[0130] It should be noted that a blast furnace molten iron batch refers to the molten iron produced in a single tapping operation from the same blast furnace during the steelmaking process. This batch of molten iron is treated as a single unit for subsequent steelmaking, refining, and continuous casting and rolling processes. A batch of reinforcing steel typically originates from the same molten steel billet, which in turn originates from one or more specific blast furnace molten iron batches. This is a crucial node in the product traceability chain. Trace element composition data refers to the set of percentage data for trace elements (such as silicon (Si), manganese (Mn), sulfur (S), phosphorus (P), chromium (Cr), nickel (Ni), and copper (Cu)) other than the main components iron (Fe) and carbon (C) obtained after chemical composition analysis of a specific "blast furnace molten iron batch" or the molten steel refined from it. Due to slight differences in ore source, auxiliary material additions, and process fluctuations, different batches of molten iron / steel will have unique chemical fingerprints in their trace element composition. A chemical fingerprint is a digital and hashed representation of the trace element composition data. A fixed-length, unique hash value string is generated by performing an encrypted hash operation on the proportion data of trace elements.
[0131] In practice, modern steel companies generally use Manufacturing Execution Systems (MES) or Enterprise Resource Planning (ERP) systems to manage production processes. Each steel rebar is marked with a production batch number. This batch number is a key index in the database. By querying the production batch number, the system can trace back to the continuous casting billet number used to produce this batch of rebar, then to the steel furnace number used to smelt the billet, and finally to the blast furnace batch number used to refine the steel. The traceability process is automatically completed through inter-table joins in the database, thus establishing a precise mapping from the target steel rebar to the blast furnace batch number. During the steelmaking process, each furnace of molten iron or steel undergoes rapid pre-furnace analysis or laboratory sampling analysis, using equipment such as spectrometers to accurately determine its chemical composition. The analysis results are automatically uploaded as quality data and stored in the database of the MES or quality management system, and bound to the corresponding blast furnace batch number or steel furnace number. Using the blast furnace batch number as the query key, the corresponding trace element ratio data is retrieved from the database. The data format is usually a vector or a JSON object. To transform the chemical composition data into a compact and secure identifier, a hash operation is required. First, the obtained trace element ratio data is converted into a standardized string format to ensure consistent input each time. For example, the elements are sorted and concatenated according to their symbols. Then, this string is input into a cryptographic hash function, outputting a fixed-length chemical fingerprint. Even the slightest change in the formula will result in a completely different hash value. The rebar fingerprint and chemical fingerprint are then used in a primary-secondary relationship to generate a unique rebar identifier. This fusion, with the rebar fingerprint as the primary identifier and the chemical fingerprint as the secondary identifier, can be achieved by combining the two hash values again and hashing them to obtain the unique rebar identifier. The final identifier relies on two completely different dimensions of extremely difficult-to-forge features—physical and chemical—maximizing the reliability and robustness of the unique identifier. Furthermore, there is no need to expose the original physical feature vectors or chemical composition data; verification can be performed simply by publicly disclosing or transmitting the final unique identifier. Moreover, under extreme conditions, theoretically, chemical composition analysis can still be used to assist in verifying its identity, providing redundancy.
[0132] Step S20: Collect processing information from each processing device in the entire steel bar processing process, bind the processing information with the unique identifier of the steel bar, and generate a steel bar processing record;
[0133] It should be noted that processing information refers to the data automatically generated or recorded by each processing equipment during the entire production and processing flow of steel bars, from raw materials to finished or semi-finished products, and is related to the processing process. Steel bar processing records refer to a complete data set formed by linking and packaging all processing information generated for a specific steel bar in the entire processing flow in chronological order, which is a digital archive of the entire life cycle of the steel bar.
[0134] In practice, processing information from each processing device throughout the entire rebar processing process is collected, including device identification information, processing parameters, spatiotemporal information, and personnel quality information. When a rebar arrives at a processing station, its identification tag is automatically recognized, obtaining a unique identifier for the rebar. Then, from that moment until the rebar leaves the station after processing, all processing information generated by the equipment at that station is automatically tagged and linked to the unique rebar identifier, generating a rebar processing record.
[0135] In one feasible implementation, the step of collecting processing information from each processing device throughout the entire steel bar processing process, binding the processing information with the unique identifier of the steel bar, and generating a steel bar processing record includes:
[0136] Collect processing information throughout the entire steel bar processing process. The processing information includes equipment number, equipment execution parameters, process status code, and corresponding timestamp.
[0137] The device number, the device execution parameters, the process status code, and the timestamp are encapsulated into a data packet;
[0138] Generate key-value pairs based on the data packet and the unique identifier of the rebar;
[0139] The key-value pairs are sorted according to the process logic of the data packet, and the sorted key-value pairs are aggregated to generate a rebar processing record.
[0140] It should be noted that the equipment number refers to the unique identifier of each processing device in the factory network, which can be the device's MAC address. Equipment execution parameters refer to the process parameter settings used during the actual operation of processing steel bars. The process status code is a predefined standardized code used to quickly and accurately represent the process execution status. The corresponding timestamp refers to the moment the processing occurred. A data packet refers to a structured data unit formed by packaging together information related to a single processing time. A key-value pair is a data structure consisting of a unique key and a corresponding value. The unique identifier of the steel bar is the key, and the encapsulated data packet is the value.
[0141] In the implementation, each processing device acts as a data source. When a device completes a processing action, its built-in PLC or data acquisition gateway automatically captures the device's execution parameters and generates an event message containing the device number, process status code, and precise timestamp. These time messages are then encapsulated into data packets. The device number and timestamp are used to query the logs of the steel bars being processed at that moment, thus identifying the unique identifier of the steel bar. Key-value pairs are then generated based on the unique identifier and the data packet. The process logic of the data packets is then sorted to generate an ordered list of processing times. Finally, the data packets in the ordered list are aggregated to obtain a complete record of steel bar processing.
[0142] Step S30: Perform hash operation and digital signature on the steel bar processing record to obtain the evidence storage data block, and upload the evidence storage data block to the blockchain network;
[0143] It should be noted that a blockchain network refers to a decentralized, distributed database system composed of numerous dispersed nodes. These nodes are connected through a peer-to-peer network and follow a predetermined consensus mechanism.
[0144] In the specific implementation, the rebar processing record is taken as input and fed into a cryptographic hash function, outputting a fixed-length, unique hash value string. Then, the rebar processing record is digitally signed; this operation is performed by the entity responsible for that processing stage, using their unique private key. The original data, its hash value, the digital signature, and other necessary metadata are then assembled into a structured data packet, resulting in a notarized data block. Finally, the notarized data block is sent to a specific blockchain address to sign the on-chain process and broadcast the signed data to achieve consensus among other nodes. Once consensus is reached, the notarized data block is successfully uploaded to the blockchain.
[0145] In one feasible implementation, the step of performing hash calculation and digital signature on the steel bar processing record to obtain a storage data block, and uploading the storage data block to the blockchain network includes:
[0146] Determine a subset of key quality parameters in the steel bar processing records, and calculate a first-level hash value for the subset of key quality parameters;
[0147] The second-level hash value is calculated for the steel bar processing record. The calculation methods for the first-level hash value and the second-level hash value are different.
[0148] Generate a device-level digital signature of the first-level hash value based on the device's private key;
[0149] A factory-level digital signature is generated based on the factory-side private key to produce the second-level hash value;
[0150] A data block for evidence storage is generated based on the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature.
[0151] The evidence storage data block is uploaded to the blockchain network.
[0152] It should be noted that the subset of key quality parameters refers to a small number of core parameters selected from the complete rebar processing records that have a decisive impact on the final quality and safety of the rebar, such as: actual bending angle, actual cutting length, welding current, and quality inspection results. The first-level hash value and the second-level hash value refer to the hash values obtained by performing the first and second hash operations. Device-level digital signature refers to the data obtained by encrypting and signing the first-level hash value using the private key corresponding to the digital certificate of the specific equipment performing the processing. Factory-level digital signature refers to the data obtained by encrypting and signing the second-level hash value using the private key corresponding to the digital certificate of the rebar processing plant.
[0153] In the specific implementation, key fields and their values are extracted from the complete processing record according to predefined rules and serialized into a standard string. Then, a subset of key quality parameters is hashed using SHA-256 to obtain the first-level hash value. Next, the rebar processing record is hashed using SHA3-512 to obtain the second-level hash value. The first-level hash value is then digitally signed using the device's private key, and the second-level hash value is digitally signed using the factory's private key. Finally, the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature are assembled to generate a data block for evidence storage.
[0154] In one feasible implementation, the step of generating the evidence storage data block based on the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature includes:
[0155] Add a quality level flag to the header of the first-level hash value to obtain an optimized first-level hash value;
[0156] When the target steel bar passes through the full-process processing equipment within a preset time, the second-level hash value is evenly cut and distributed to the full-process processing equipment so that the full-process processing equipment generates fragment signatures.
[0157] All the fragmented signatures are aggregated and reconstructed into a complete hash value to obtain the joint digital signature;
[0158] Based on the optimized first-level hash value, the second-level hash value, the device-level digital signature, the joint digital signature, and the factory-level digital signature, a data block for evidence storage is generated.
[0159] It should be noted that the quality grade flag is a short code or numerical value used to quickly identify the final quality grade of the steel bars. For example, 00 can represent superior grade, 01 represents qualified grade, 10 represents grade to be inspected, and 11 represents scrap. Fragmented signatures refer to the process of dividing a complete secondary hash value into multiple fragments, with each processing device in the process using its own private key to digitally sign its assigned hash fragment. Each fragmented signature is part of the overall signature and does not possess complete verification power on its own. Joint digital signatures refer to a single, complete digital signature formed by aggregating or reconstructing all fragmented signatures using a specific cryptographic algorithm.
[0160] In the specific implementation, the quality grade of the rebar is first automatically determined based on a subset of key quality parameters, and this flag is appended as a prefix to the header of the first-level hash value. Then, as the target rebar passes through the processing equipment throughout the entire process within a preset time, the second-level hash value is evenly divided and distributed to the processing equipment, enabling each processing equipment to generate fragment signatures. Assuming the target rebar passes through N processing devices, the second-level hash value is evenly divided into N fragments. Each hash fragment is then distributed to its corresponding processing device. Upon receiving its corresponding hash fragment, each device signs the fragment using its own device-side private key, obtaining a fragment signature. After all devices have generated corresponding fragment signatures, all fragment signatures can be aggregated and reconstructed to obtain a joint digital signature. Based on the optimized first-level hash value, second-level hash value, device-level digital signature, joint digital signature, and factory-level digital signature, a data block for evidence storage is generated.
[0161] Step S40: Based on the evidence storage record, obtain the traceability result corresponding to the evidence storage record on the blockchain network. The evidence storage record is the feedback information after the evidence storage data block is successfully uploaded to the blockchain network.
[0162] It should be noted that the feedback information is the success receipt returned by the blockchain node to the client after the evidence data block is submitted to the blockchain network. The traceability result refers to a complete and verifiable historical report of steel bar processing returned after a query request is initiated using the evidence record.
[0163] In the implementation, once the evidence-based data block is successfully uploaded to the blockchain, the application receives feedback from the blockchain network. This evidence record is then immediately and securely stored and linked to the locally stored original rebar processing records to determine its unique coordinates within the blockchain. When a user queries, the corresponding traceability results can be retrieved from the blockchain based on the provided evidence record, enabling rebar traceability.
[0164] In one feasible implementation, the step of obtaining the traceability result corresponding to the evidence storage record on the blockchain network based on the evidence storage record includes:
[0165] The evidence storage records are parsed to determine the query identifier of the query target, wherein the query identifier is a unique identifier of the steel bar contained in the evidence storage records;
[0166] Based on the query identifier, the target evidence storage data block is traversed in the blockchain network, and there is a unique mapping relationship between the unique identifier of the steel bar and the target evidence storage data block.
[0167] The target evidence storage data block is decoded to obtain the traceability result corresponding to the evidence storage record.
[0168] It should be noted that the query identifier refers to the core index key used by the user when initiating a traceability query. The target evidence data block refers to the specific data unit on the blockchain network that ultimately contains the evidence information for the rebar processing. The unique mapping relationship refers to the logical one-to-one relationship between the unique identifier of the rebar and the target evidence data block; that is, one unique identifier of the rebar must correspond to one evidence data block on the blockchain, and one evidence data block also corresponds to only one unique rebar.
[0169] In the specific implementation, the evidence storage record is parsed to determine the query identifier of the target. The query identifier can be a unique identifier of the rebar contained in the evidence storage record. Then, based on the query identifier, all evidence storage data blocks in the blockchain network are traversed to determine the target evidence storage data block. Since there is a unique mapping relationship between the unique rebar identifier and the target evidence storage data block, the corresponding evidence storage data block can be accurately determined. When the target evidence storage data block is obtained, it is decoded to obtain the traceability result corresponding to the evidence storage record.
[0170] This embodiment provides a method for full-process traceability of smart steel bar processing based on blockchain evidence storage. By extracting the rolling pattern of the steel bar itself to generate a unique, uncopyable digital fingerprint, it achieves precise anchoring of physical entity and digital identity. Automated data collection and digital signature technology ensure that processing information is authentic, complete, and traceable from the source. Furthermore, by leveraging the distributed storage and immutability of blockchain, the aforementioned trustworthy data is permanently solidified, constructing a decentralized trust foundation. Ultimately, the accuracy of the entire process information on the blockchain is fundamentally guaranteed, providing a solid data foundation for achieving accurate and reliable quality traceability and supply chain management.
[0171] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the smart steel bar processing traceability method based on blockchain evidence storage in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0172] This application also provides a smart steel bar processing full-process traceability device based on blockchain evidence storage. Please refer to [link / reference]. Figure 3 The smart steel bar processing traceability device based on blockchain evidence storage includes:
[0173] The fingerprint generation module 10 is used to identify the image of the target steel bar, determine the rolling pattern of the target steel bar, generate a steel bar fingerprint based on the rolling pattern, and generate a unique steel bar identifier based on the steel bar fingerprint.
[0174] Information recording module 20 is used to collect processing information of each processing equipment in the entire process of steel bar processing, bind the processing information with the unique identifier of the steel bar, and generate steel bar processing records;
[0175] The data storage module 30 is used to perform hash calculation and digital signature on the steel bar processing record to obtain a storage data block, and upload the storage data block to the blockchain network.
[0176] The data traceability module 40 is used to obtain the traceability result corresponding to the evidence storage record on the blockchain network based on the evidence storage record, wherein the evidence storage record is the feedback information after the evidence storage data block is successfully uploaded to the blockchain network.
[0177] In one feasible implementation, the fingerprint generation module 10 is also used to acquire full-morphology images of the target rebar from multiple perspectives.
[0178] Image recognition is performed on the full-morphology pattern images from multiple perspectives to obtain the rolling texture of the target steel bar;
[0179] Feature extraction is performed on the rolling texture to obtain local binary pattern features and gray-level co-occurrence matrix features;
[0180] By fusing the local binary mode features and gray-level co-occurrence matrix features corresponding to each of the full-morphology mode images, a unique feature vector representing the overall surface texture of the target steel bar is generated, and the unique feature vector is used as the steel bar fingerprint.
[0181] The fingerprint of the steel bar is encoded to generate a unique identifier for the steel bar.
[0182] In one feasible implementation, the fingerprint generation module 10 is further used to perform corrosion recognition on the full-morphology pattern image, and when there is a corrosion area on the surface of the target steel bar, locate the corrosion area in the full-morphology pattern image.
[0183] The corroded area is expanded outward by a preset expansion scale to obtain the context area;
[0184] The rusted area and the context area are input into the texture reconstruction model to obtain the rolling texture repair feature map of the rusted area;
[0185] The grayscale distributions of the rolling texture repair feature map and the full-morphology mode image are determined respectively, and histogram matching is performed based on the grayscale distribution to obtain the rolling texture repair feature map that eliminates illumination differences.
[0186] The seam between the repair area corresponding to the rolling texture repair feature map that eliminates illumination differences and the full morphology mode image is determined, and Poisson fusion is performed on the seam to obtain the rolling texture of the target steel bar.
[0187] In one feasible implementation, the fingerprint generation module 10 is further used to extract the artificial rust area and the original texture from the image of the steel bar surface simulated by artificial rust, combine the artificial rust area and the original texture into a data pair, and use the data pair as training data.
[0188] Input the training data into the initial texture reconstruction model;
[0189] Based on the initial texture reconstruction model, the feature extraction layer extracts the spatial features of undamaged textures in a preset extraction area outside the artificial rust area from the training data, and adaptively samples the periodic directional features of the rolling texture based on the feature extraction layer.
[0190] A repair texture map matching the size of the artificial rust area is generated based on the spatial features and the periodic directional features.
[0191] The similarity analysis between the repaired texture map and the original texture is performed to obtain the repair difference value;
[0192] The model parameters of the initial texture reconstruction model are constrained based on the repair difference value to obtain the texture reconstruction model.
[0193] In one feasible implementation, the fingerprint generation module 10 is further used to determine the production batch number of the target steel bar, and to determine the blast furnace molten iron batch based on the production batch number;
[0194] Obtain the trace element ratio data of the blast furnace hot metal in the batches mentioned above;
[0195] A chemical fingerprint is generated based on the trace element ratio data;
[0196] A unique identifier for a steel bar is generated, primarily based on the steel bar fingerprint and secondarily based on the chemical fingerprint.
[0197] In one feasible implementation, the information recording module 20 is also used to collect processing information throughout the entire steel bar processing process. The processing information includes equipment number, equipment execution parameters, process status code and corresponding timestamp.
[0198] The device number, the device execution parameters, the process status code, and the timestamp are encapsulated into a data packet;
[0199] Generate key-value pairs based on the data packet and the unique identifier of the rebar;
[0200] The key-value pairs are sorted according to the process logic of the data packet, and the sorted key-value pairs are aggregated to generate a rebar processing record.
[0201] In one feasible implementation, the data storage module 30 is further configured to determine a subset of key quality parameters in the steel bar processing record and calculate a first-level hash value for the subset of key quality parameters.
[0202] The second-level hash value is calculated for the steel bar processing record. The calculation methods for the first-level hash value and the second-level hash value are different.
[0203] Generate a device-level digital signature of the first-level hash value based on the device's private key;
[0204] A factory-level digital signature is generated based on the factory-side private key to produce the second-level hash value;
[0205] A data block for evidence storage is generated based on the first-level hash value, the second-level hash value, the device-level digital signature, and the factory-level digital signature.
[0206] The evidence storage data block is uploaded to the blockchain network.
[0207] In one feasible implementation, the data storage module 30 is further configured to add a quality level flag bit to the header of the first-level hash value to obtain an optimized first-level hash value.
[0208] When the target steel bar passes through the full-process processing equipment within a preset time, the second-level hash value is evenly cut and distributed to the full-process processing equipment so that the full-process processing equipment generates fragment signatures.
[0209] All the fragmented signatures are aggregated and reconstructed into a complete hash value to obtain the joint digital signature;
[0210] Based on the optimized first-level hash value, the second-level hash value, the device-level digital signature, the joint digital signature, and the factory-level digital signature, a data block for evidence storage is generated.
[0211] In one feasible implementation, the data traceability module 40 is further configured to parse the evidence record and determine the query identifier of the query target, wherein the query identifier is a unique identifier of the steel bar contained in the evidence record;
[0212] Based on the query identifier, the target evidence storage data block is traversed in the blockchain network, and there is a unique mapping relationship between the unique identifier of the steel bar and the target evidence storage data block.
[0213] The target evidence storage data block is decoded to obtain the traceability result corresponding to the evidence storage record.
[0214] The smart rebar processing traceability device based on blockchain evidence provided in this application adopts the smart rebar processing traceability method based on blockchain evidence in the above embodiments, which can solve the technical problem of difficulty in ensuring the accuracy of rebar processing information on the blockchain. Compared with the prior art, the beneficial effects of the smart rebar processing traceability device based on blockchain evidence provided in this application are the same as the beneficial effects of the smart rebar processing traceability method based on blockchain evidence provided in the above embodiments, and other technical features in the smart rebar processing traceability device based on blockchain evidence are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0215] This application provides a smart steel bar processing traceability device based on blockchain evidence storage. The smart steel bar processing traceability device based on blockchain evidence storage includes: at least one processor; and a memory communicatively connected to at least one processor; wherein the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable at least one processor to execute the smart steel bar processing traceability method based on blockchain evidence storage in the above embodiment 1.
[0216] The following is for reference. Figure 4 The diagram illustrates a structural schematic of a blockchain-based intelligent steel bar processing traceability device suitable for implementing embodiments of this application. The blockchain-based intelligent steel bar processing traceability device in this application can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4The smart steel bar processing traceability device based on blockchain evidence shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments in this application.
[0217] like Figure 4 As shown, the blockchain-based intelligent rebar processing traceability device can include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in ROM (Read Only Memory) 1002 or the program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the blockchain-based intelligent rebar processing traceability device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard drives, etc.; and communication devices 1009. Communication device 1009 allows the blockchain-based intelligent rebar processing traceability device to wirelessly or wiredly communicate with other devices to exchange data. Although the figure shows a blockchain-based intelligent rebar processing traceability device with various systems, it should be understood that implementing or having all the systems shown is not required. More or fewer systems can be implemented alternatively.
[0218] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0219] The blockchain-based intelligent rebar processing full-process traceability device provided in this application, employing the blockchain-based intelligent rebar processing full-process traceability method described in the above embodiments, can solve the technical problems of blockchain-based intelligent rebar processing full-process traceability. Compared with the prior art, the beneficial effects of the blockchain-based intelligent rebar processing full-process traceability device provided in this application are the same as those of the blockchain-based intelligent rebar processing full-process traceability method provided in the above embodiments, and other technical features in this blockchain-based intelligent rebar processing full-process traceability device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0220] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0221] The above are merely specific embodiments 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.
[0222] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the smart steel bar processing full-process traceability method based on blockchain evidence storage in the above embodiments.
[0223] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0224] The aforementioned computer-readable storage medium may be included in a blockchain-based intelligent steel bar processing traceability device; or it may exist independently and not be assembled into the blockchain-based intelligent steel bar processing traceability device.
[0225] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the blockchain-based intelligent steel bar processing full-process traceability device, the device performs the following actions: identifies the steel bar image of the target steel bar, determines the rolling pattern of the target steel bar, generates a steel bar fingerprint based on the rolling pattern, and generates a unique steel bar identifier based on the steel bar fingerprint; collects processing information from each processing device in the entire steel bar processing process, binds the processing information with the unique steel bar identifier, and generates a steel bar processing record; performs hash calculation and digital signature on the steel bar processing record to obtain a storage data block, and uploads the storage data block to the blockchain network; and obtains the traceability result corresponding to the storage record on the blockchain network based on the storage record, wherein the storage record is feedback information after the storage data block is successfully uploaded to the blockchain network.
[0226] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0227] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0228] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0229] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned smart rebar processing full-process traceability method based on blockchain evidence storage. This solves the technical problem of smart rebar processing full-process traceability based on blockchain evidence storage. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the smart rebar processing full-process traceability method based on blockchain evidence storage provided in the above embodiments, and will not be repeated here.
[0230] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for tracing the entire process of intelligent steel bar processing based on blockchain evidence storage.
[0231] The computer program product provided in this application can solve the technical problem of full-process traceability of intelligent steel bar processing based on blockchain evidence storage. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the full-process traceability method of intelligent steel bar processing based on blockchain evidence storage provided in the above embodiments, and will not be repeated here.
[0232] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A smart steel bar processing full-process tracing method based on blockchain storage, characterized in that, The blockchain-based intelligent steel bar processing full-process traceability method comprises the following steps: Recognize the steel bar image of a target steel bar, determine the rolling texture of the target steel bar, generate a steel bar fingerprint according to the rolling texture, and generate a unique steel bar identifier according to the steel bar fingerprint; Collect processing information of each processing equipment in the steel bar processing full process, bind the processing information and the unique steel bar identifier, and generate a steel bar processing record; Hash operation and digital signature are performed on the steel bar processing record to obtain a record storage data block, and the record storage data block is uploaded to a blockchain network; Based on the record storage, the corresponding traceability result of the record storage is obtained in the blockchain network, and the record storage is feedback information after the record storage data block is successfully uploaded to the blockchain network; The step of recognizing the steel bar image of a target steel bar, determining the rolling texture of the target steel bar, generating a steel bar fingerprint according to the rolling texture, and generating a unique steel bar identifier comprises the following steps: Obtain full-form pattern images of the target steel bar under multiple viewing angles; Respectively perform image recognition on the full-form pattern images under multiple viewing angles to obtain the rolling texture of the target steel bar; Feature extraction is performed on the rolling texture to obtain local binary pattern features and gray level co-occurrence matrix features; Fusion of the local binary pattern features and the gray level co-occurrence matrix features corresponding to each full-form pattern image generates a unique feature vector representing the overall surface texture of the target steel bar, and the unique feature vector is used as a steel bar fingerprint; Encode the steel bar fingerprint to generate a unique steel bar identifier; The step of generating a unique steel bar identifier according to the steel bar fingerprint comprises the following steps: Determine the production batch number of the target steel bar, determine the blast furnace molten iron batch based on the production batch number; Obtain the trace element ratio data of the blast furnace molten iron batch; Generate a chemical fingerprint according to the trace element ratio data; Generate a unique steel bar identifier based on the steel bar fingerprint and the chemical fingerprint.
2. The method of claim 1, wherein, The step of respectively performing image recognition on the full-form pattern images under multiple viewing angles to obtain the rolling texture of the target steel bar comprises the following steps: Perform corrosion recognition on the full-form pattern image, and when there is a corrosion area on the surface of the target steel bar, locate the corrosion area in the full-form pattern image; The corrosion area is expanded by a preset expansion scale to obtain a context area; Input the corrosion area and the context area into a texture reconstruction model to obtain a rolling texture repair feature map of the corrosion area; Determine the gray scale distribution of the rolling texture repair feature map and the full-form pattern image respectively, and perform histogram matching based on the gray scale distribution to obtain a rolling texture repair feature map that eliminates illumination differences; Determine the joint between the repair area corresponding to the rolling texture repair feature map that eliminates illumination differences and the full-form pattern image, and perform Poisson fusion on the joint to obtain the rolling texture of the target steel bar.
3. The method of claim 2, wherein, Before the step of inputting the corrosion area and the context area into a texture reconstruction model to obtain a rolling texture repair feature map of the corrosion area, the following steps are further included: extracting an artificial corrosion area and an original texture from an image of a steel bar surface artificially corroded and simulated, combining the artificial corrosion area and the original texture into a data pair, taking the data pair as training data; inputting the training data into an initial texture reconstruction model; extracting spatial features of undamaged textures in a preset extraction area outside the artificial corrosion area from the training data based on a feature extraction layer of the initial texture reconstruction model, and adaptively sampling periodic directional features of rolled textures based on the feature extraction layer; generating a repair texture map matching a size of the artificial corrosion area according to the spatial features and the periodic directional features; performing similarity analysis on the repair texture map and the original texture to obtain a repair difference value; constraining model parameters of the initial texture reconstruction model based on the repair difference value to obtain a texture reconstruction model.
4. The method of claim 1, wherein, The step of collecting processing information of each processing equipment in the whole steel bar processing process, binding the processing information with the unique identification of the steel bar, and generating a steel bar processing record includes: collecting processing information in the whole steel bar processing process, the processing information including equipment number, equipment execution parameter, process state code and corresponding timestamp; packaging the equipment number, the equipment execution parameter, the process state code and the timestamp into a data packet; generating a key-value pair according to the data packet and the unique identification of the steel bar; sorting the key-value pair according to the process logic of the data packet, and aggregating the sorted key-value pair to generate a steel bar processing record.
5. The method of claim 1, wherein, The step of performing hash operation and digital signature on the steel bar processing record to obtain a notarization data block and uploading the notarization data block to a blockchain network includes: determining a key quality parameter subset in the steel bar processing record, and calculating a first-level hash value of the key quality parameter subset; calculating a second-level hash value of the steel bar processing record, the calculation method of the first-level hash value being different from that of the second-level hash value; generating a device-level digital signature of the first-level hash value according to a device-side private key; generating a factory-level digital signature of the second-level hash value according to a factory-side private key; generating a notarization data block according to the first-level hash value, the second-level hash value, the device-level digital signature and the factory-level digital signature; uploading the notarization data block to the blockchain network.
6. The method of claim 5, wherein, The step of generating a notarization data block according to the first-level hash value, the second-level hash value, the device-level digital signature and the factory-level digital signature includes: adding a quality level flag bit to the head of the first-level hash value to obtain an optimized first-level hash value; when the target steel bar passes through the processing equipment in the whole process within a preset time, cutting the second-level hash value evenly and distributing it to the processing equipment in the whole process, so that the processing equipment in the whole process generates a fragment signature; summarizing all the fragment signatures, reconstructing the fragment signatures into a complete hash value, and obtaining a joint digital signature; generating a notarization data block based on the optimized first-level hash value, the second-level hash value, the device-level digital signature, the joint digital signature and the factory-level digital signature.
7. The method of claim 1, wherein, The step of obtaining the traceability result corresponding to the deposit record based on the deposit record in the blockchain network comprises: The deposit record is parsed to determine a query identity of a query target, the query identity being a unique steel bar identity contained in the deposit record; The target deposit data block is traversed in the blockchain network based on the query identity, the unique steel bar identity and the target deposit data block being in a unique mapping relationship; The target deposit data block is decoded to obtain the traceability result corresponding to the deposit record.
8. A smart steel bar processing full-process tracing device based on blockchain storage, characterized in that, The smart steel bar processing full-process traceability device based on blockchain deposit comprises: A fingerprint generation module is configured to identify a steel bar image of a target steel bar, determine a rolling pattern of the target steel bar, generate a steel bar fingerprint based on the rolling pattern, and generate a unique steel bar identity based on the steel bar fingerprint; An information recording module is configured to collect processing information of each processing equipment in a steel bar processing full process, bind the processing information with the unique steel bar identity, and generate a steel bar processing record; A data deposit module is configured to perform a hash operation and a digital signature on the steel bar processing record to obtain a deposit data block, and upload the deposit data block to a blockchain network; A data traceability module is configured to obtain a traceability result corresponding to a deposit record in the blockchain network based on the deposit record, the deposit record being feedback information after the deposit data block is successfully uploaded to the blockchain network; The step of identifying a steel bar image of a target steel bar, determining a rolling pattern of the target steel bar, generating a steel bar fingerprint based on the rolling pattern, and generating a unique steel bar identity based on the steel bar fingerprint comprises: Obtaining full-form pattern images of a target steel bar under multiple viewing angles; Respectively performing image recognition on the full-form pattern images under multiple viewing angles to obtain a rolling pattern of the target steel bar; Performing feature extraction on the rolling pattern to obtain local binary pattern features and gray level co-occurrence matrix features; Fusing the local binary pattern features and the gray level co-occurrence matrix features corresponding to each full-form pattern image to generate a unique feature vector representing the overall surface texture of the target steel bar, and taking the unique feature vector as a steel bar fingerprint; Encoding the steel bar fingerprint to generate a unique steel bar identity; The step of generating a unique steel bar identity based on the steel bar fingerprint comprises: Determining a production batch number of the target steel bar, determining a blast furnace molten iron batch based on the production batch number; Obtaining microelement ratio data of the blast furnace molten iron of the blast furnace molten iron batch; Generating a chemical fingerprint based on the microelement ratio data; Generating a unique steel bar identity based on the steel bar fingerprint as the main part and the chemical fingerprint as the auxiliary part.
Citation Information
Patent Citations
Blockchain-based steel anti-counterfeiting traceability system and method
CN113177799A
Diagnosis record evidence storage method and system based on blockchain and related device
CN113658656A