Blockchain-based LED product quality whole-process tracing method and system
By establishing a distributed ledger architecture and standardized evidence storage protocol in the LED industry chain through blockchain technology, multi-party consensus verification and automated evidence storage have been achieved, solving the problems of data silos and tampering risks in the LED industry chain, and ensuring the credibility and real-time nature of quality traceability.
Patent Information
- Application Number
- CN202611282531.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-17
AI Technical Summary
The lack of a unified data sharing and verification mechanism in the LED industry chain makes it difficult to establish trust across organizations, and centralized storage methods pose a risk of data tampering, affecting the credibility of product quality traceability.
Based on a blockchain-based distributed ledger architecture, all participants in the industry chain are designated as consensus nodes. Through standardized quality evidence storage protocols and real-time data collection interfaces from IoT devices, multi-party consensus verification and on-chain evidence storage of quality data are achieved. Combined with automated evidence storage smart contracts and multi-party consensus mechanisms, the immutability and real-time synchronization of data are ensured.
It breaks down data silos, enables cross-organizational quality traceability with solid credibility, improves the real-time and accuracy of data acquisition, reduces manual entry errors, and ensures the objectivity and immutability of data.
Smart Images

Figure CN123117899A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of blockchain technology, specifically relating to a blockchain-based method and system for tracing the quality of LED products throughout the entire process. Background Technology
[0002] This invention relates to the field of product quality traceability technology, specifically to a blockchain-based method and system for full-process traceability of LED product quality.
[0003] The production process of light-emitting diodes (LEDs) encompasses multiple stages, including chip manufacturing, device packaging, and module integration. Each stage is completed by different production entities, resulting in a long supply chain with numerous participants. Deviations in process parameters or quality abnormalities at any stage can affect the photoelectric performance and lifespan of the final product. Therefore, establishing a transparent and reliable quality traceability mechanism across all stages of the supply chain is fundamental to ensuring product quality and achieving accurate fault location.
[0004] Currently, quality data in the LED industry chain is mainly stored in the respective manufacturing execution systems or relational databases of each participant. These data systems are independent of each other, creating significant information silos. Due to the lack of a unified data sharing and verification mechanism, downstream entities struggle to effectively verify the authenticity of quality records provided by upstream entities, hindering the establishment of trust across the supply chain. Furthermore, centralized data storage allows for the possibility of internal personnel with back-end management privileges tampering with production records. Quality data provided unilaterally by a single entity lacks credibility and fails to gain the shared acceptance of all participants in the chain.
[0005] Therefore, how to break down the data barriers between multiple entities in the LED industry chain and establish a reliable data storage mechanism that does not rely on a single centralized institution for endorsement and can be jointly witnessed and supervised by all participants has become an urgent technical problem to be solved. Summary of the Invention
[0006] The purpose of this invention is to provide a blockchain-based method and system for full-process traceability of LED product quality, which can effectively solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A blockchain-based method for full-process traceability of LED product quality includes the following specific steps: A distributed ledger infrastructure is built, and the chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities in the LED industry chain are all set as consensus nodes, with each consensus node being assigned a digital identity. Define a standardized quality evidence storage protocol, which includes a hierarchical quality data structure. The hierarchical quality data structure includes at least a basic attribute layer carrying static description information, a photoelectric parameter layer carrying photoelectric parameters, and an environmental state layer carrying process environment parameters. The photoelectric parameter layer includes at least a sequence of instantaneous sampling points of the forward operating voltage and current characteristic curves. The blockchain edge gateway integrates a real-time data acquisition interface for IoT devices and establishes communication connections with the underlying production and testing equipment. The blockchain edge gateway is configured with a mapping relationship between the PLC register address and the evidence storage trigger signal. The blockchain edge gateway reads the status value of the corresponding register of the PLC in a polling manner. When it detects that the state of the trigger bit in the register is flipped due to external stimulus, it generates a trigger event and sends it to the automated evidence storage smart contract. In response to the triggering event, the automated evidence storage smart contract extracts standardized quality data and encapsulates it into an evidence storage transaction according to the standardized quality evidence storage protocol, and submits the evidence storage transaction to the consensus network. In the consensus network, the notarized transactions are verified through multi-party consensus, and the blocks generated by the verified notarized transactions are appended to the distributed ledger of each consensus node in a cryptographic hash anchoring manner, thus completing the on-chain notarization of quality data.
[0008] A blockchain-based LED product quality traceability system includes: The distributed ledger module is used to build a decentralized peer-to-peer network, setting up chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities in the LED industry chain as consensus nodes, and assigning a digital identity to each consensus node. A standardized quality evidence storage protocol module is used to define a hierarchical quality data structure. The hierarchical quality data structure includes at least a basic attribute layer carrying static description information, a photoelectric parameter layer carrying photoelectric parameters, and an environmental state layer carrying process environment parameters. The photoelectric parameter layer includes at least a sequence of instantaneous sampling points of the forward operating voltage and current characteristic curves. The IoT device real-time acquisition interface module is used to establish communication connections between the blockchain edge gateway and the underlying production equipment and testing equipment, respectively. The blockchain edge gateway is configured with a mapping relationship between the PLC register address and the evidence storage trigger signal. The automated evidence storage triggering module is used to enable the blockchain edge gateway to read the status value of the corresponding register of the PLC in a polling manner, and when it detects that the state of the trigger bit in the register is flipped due to external stimulus, it generates a trigger event and sends it to the automated evidence storage smart contract to trigger the evidence storage operation. The consensus and storage module is used to perform multi-party consensus verification of the notarized transactions in the consensus network, and to append the blocks generated by the verified notarized transactions to the distributed ledger of each consensus node in a cryptographic hash anchoring manner, thereby completing the on-chain notarization of quality data.
[0009] In summary, this application includes at least one of the following beneficial technical effects: 1. By building a distributed architecture for the entire LED industry chain based on a consortium blockchain, different stakeholders are designated as consensus nodes, breaking down data silos caused by traditional centralized manufacturing execution systems at the physical level. Since all quality data is jointly witnessed by multiple nodes and stored in a distributed ledger, no single entity can tamper with original production records using privately held backend permissions. This fundamentally solves the compliance risk of internal management personnel interfering with data, providing a solid foundation of credibility for cross-organizational quality traceability.
[0010] 2. By defining a unified quality certification protocol for LEDs, the format and verification logic of key quality data such as photoelectric parameters and environmental indicators are standardized. The standardized data structured packaging protocol ensures semantic consistency of heterogeneous data generated at different stages such as chip manufacturing, packaging, and integration throughout the entire industry chain, resolving the low traceability efficiency previously caused by inconsistent data standards among different manufacturers. Combined with the automated execution characteristics of smart contracts, quality certification actions are forcibly linked to actual production processes, ensuring real-time synchronization of quality traceability information flow and physical flow, forming a complete quality management closed loop.
[0011] 3. Integrating real-time data acquisition interfaces for IoT devices directly maps data from underlying production and testing equipment to the blockchain network, significantly reducing the risks of errors, omissions, or malicious concealment caused by manual data entry. The combination of automated data collection and smart contracts enables high-frequency data storage of key environmental indicators and photoelectric parameters without increasing labor costs. This not only improves the real-time nature of data acquisition but also ensures the originality and objectivity of traceability information at the moment of its generation through technological means.
[0012] 4. The distributed access control mechanism based on permission management provided by this invention utilizes asymmetric encryption technology to achieve fine-grained data privacy protection. Addressing concerns among manufacturers in the LED industry chain regarding the leakage of core process data, the system grants different levels of query permissions based on the visitor's identity. While ensuring that necessary quality information is open, transparent, and verifiable by downstream users, it securely isolates key technical parameters related to enterprise competitiveness, thereby effectively eliminating manufacturers' concerns about participating in consensus-based blockchain integration and promoting deep collaboration and data sharing across the entire industry chain. Attached Figure Description
[0013] Figure 1This is a schematic diagram of the overall technical solution for a blockchain-based method for tracing the quality of LED products throughout the entire process. Figure 2 This is a schematic diagram illustrating the core principles of distributed ledger and automated evidence storage protocols. Figure 3 It is a logical flowchart of real-time data collection and smart contract mapping in the IoT sensing layer; Figure 4 It is a multi-level interaction diagram of consensus verification and block hash anchoring across the entire industry chain; Figure 5 This is a schematic diagram of distributed access control based on asymmetric encryption. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of this invention clearer, the following description is provided in conjunction with the appendix. Figure 1 To be continued Figure 5 The present invention will be further described in detail below with reference to specific embodiments.
[0015] Firstly, the blockchain-based method for tracing the entire quality process of LED products is implemented according to the following steps: The first step, S1, involves building a decentralized, multi-entity, distributed ledger infrastructure. This infrastructure enables participants in the LED industry chain, such as chip manufacturing, device packaging, module integration, and end-user sales, to access the network as equals, providing underlying support for the reliable storage and transfer of subsequent quality data. The specific implementation process is broken down as follows.
[0016] Step S101: Establish a cross-organizational peer-to-peer network topology. In the distributed collaborative environment of the entire LED industry chain, consortium blockchain technology is used to designate chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities as consensus nodes in the distributed ledger.
[0017] When each consensus node starts up, it initiates a connection request to at least one pre-set seed node in the network and establishes a long TCP connection. Through this long connection, it receives and forwards network messages from other nodes. Each consensus node is configured with a unique network communication address, which consists of an IP address and a port number, and is recorded in the node list maintained by the network layer along with the node's identity information.
[0018] Each consensus node simultaneously acts as a data contributor and ledger maintainer, possessing independent data storage, verification, and synchronization functions.
[0019] Step S102: Configure an automatic node discovery mechanism based on the Gossip protocol. The network layer pre-configures the Gossip discovery protocol. Each node, within a preset detection period, selects several neighboring nodes from its currently maintained list of active neighboring nodes and sends a summary of its known and protocol-compatible node list to these neighboring nodes. After a new node completes a handshake and establishes a connection with a seed node, the seed node writes the new node's network communication address into its local node list and generates a node online message containing the new node's identity information and network communication address.
[0020] The node's online status message is disseminated to all reachable nodes across the network over multiple protocol cycles, following the forwarding and iteration mechanism of the Gossip protocol. Upon receiving the message, each node updates its corresponding entry in its local node list, thereby automatically identifying the new node's physical address and service port and incorporating it into the current peer-to-peer network topology, achieving dynamic updates to the topology.
[0021] Step S103 introduces a Certificate Authority (CA) based on public key infrastructure (PKI) to manage node access and identity. Applicants must submit enterprise qualification documents, including a scanned copy of their business license, production license number, and a declaration of their role type within the industry chain. This role type declaration identifies whether the node is a chip manufacturer, packager, integrator, or distributor.
[0022] The certificate authority invokes a pre-defined verification procedure to compare the aforementioned qualification documents with an authoritative business information database and verify whether the entity's role type matches the applied network permissions. Upon successful verification, the certificate authority issues a unique digital certificate for the entity according to the X.509 standard, with the authorized role attributes of the node embedded in the certificate's extended fields.
[0023] When a smart contract receives a transaction request, it verifies the role attributes to determine whether the node has the authority to initiate the corresponding type of evidence storage transaction.
[0024] Step S104: Assign a structured digital identity (DID) to each consensus node. The DID is generated as follows: First, the node collects the unique hardware identifier of its physical device, which is a combination of the CPU serial number and MAC address. The node then performs latitude and longitude rasterization on its geographical coordinates and uses a GeoHash encoded string with a preset precision as the geographical location input. Next, the node uses a preset hash function SHA-256 to perform a joint hash operation on the unique hardware identifier, manufacturer number, device attribute code, and the GeoHash encoded string to generate a fixed-length digest value. The first 20 bytes of this digest value are then encoded into a hexadecimal string and used as the node's DID.
[0025] The binding relationship between digital identity and physical device is established as follows: When a node registers for the first time, the certificate authority requires the node to submit the generated DID and the corresponding original data, and writes this information into the subject alternate name field of the digital certificate, and signs it using the certificate authority's private key.
[0026] Any third party can verify the signature and compare the DID in the certificate with the recalculated device information hash value to confirm the unique and tamper-proof binding relationship between the digital identity and the physical device.
[0027] Step S105: Unify the ledger storage structure of all consensus nodes. Each consensus node maintains a complete copy of the ledger. The ledger consists of a series of blocks linked in chronological order, and each block consists of a block header and a block body.
[0028] The block header contains the parent block hash, the Merkle root calculated layer by layer from the pairwise hashes of all transactions in the block body, and the timestamp; the block body records the actual quality proof transactions, and the data structure of a quality proof transaction contains the DID of the transaction initiator, the address of the recipient, the proof data field, and the digital signature of the sender.
[0029] When a node generates or receives a new valid block, it appends the block to the end of the ledger stored locally and broadcasts the new block to neighboring nodes via a network synchronization protocol. Through this decentralized, redundant storage method, the failure or malicious exit of any single node does not affect the continuous operation of the traceability system, thus ensuring the high availability of quality data.
[0030] Through the aforementioned sub-steps, this invention constructs a distributed ledger infrastructure across the entire LED industry chain, characterized by trusted identities, flexible topology, and high data redundancy. This architecture addresses the data silos and single-point-of-trust issues inherent in traditional centralized databases, providing a solid foundation of public trust for cross-organizational quality traceability. Building upon this foundation, step S2 further defines a unified LED quality verification protocol. Through standardized data structures and verification logic, it ensures that heterogeneous quality information from different process stages possesses consistent semantics and efficient flow capabilities across the entire industry chain.
[0031] The next step, S2, involves executing a standardized quality evidence storage protocol. The purpose is to define a unified data description standard for the entire LED industry chain, enabling heterogeneous quality information generated at different stages such as chip manufacturing, device packaging, and module integration to achieve semantic consistency. This provides standardized data input for subsequent automated evidence storage and reliable traceability. The specific implementation process is broken down into the following sub-steps.
[0032] Step S201: Define a hierarchical quality data structure. This method divides the quality data of LEDs into three levels.
[0033] The first layer is the basic attribute layer, used to carry static description information of the product. Fields in this layer include the globally unique product model number (GTIN), production batch number, production date, and the national or industry standard number followed by that batch of products. The production batch number is composed of the production date, production line number, and serial number, with the production date accurate to the minute.
[0034] The second layer is the photoelectric parameter layer, which is the core set of indicators for measuring the quality of light-emitting diodes (LEDs). The standardized fields in this layer include dominant wavelength, peak wavelength, color temperature, color rendering index, luminous flux, luminous efficacy, and forward operating voltage-current characteristic curves. The units for dominant wavelength and peak wavelength are nanometers, the unit for color temperature is Kelvin, the unit for luminous flux is lumen, and the unit for luminous efficacy is lumen per watt.
[0035] The recording of photoelectric parameters not only stores their nominal values but also includes the sequence of instantaneous sampling points acquired during detection. Taking the forward operating voltage-current characteristic curve as an example, the sequence of instantaneous sampling points consists of multiple voltage-current data pairs arranged in time sequence, which facilitates subsequent refined quality deviation analysis.
[0036] The third layer is the environmental status layer, used to record key process environmental parameters that affect the quality of LEDs. In core production processes such as die bonding, wire bonding, and encapsulation, the system is required to record the current real-time ambient temperature, relative humidity, workshop dust particle size, and electrostatic discharge protection level.
[0037] Ambient temperature is measured in degrees Celsius, relative humidity in percentage, dust particle size in cubic meters, and electrostatic discharge level in volts. Specifically, dust particle size refers to the number of dust particles with a diameter greater than or equal to 0.5 micrometers per cubic meter of air in a Class 10,000 or Class 1,000 cleanroom.
[0038] These three levels together constitute a complete data description framework covering static attributes, optoelectronic performance, and process environment.
[0039] Step S202: Deploy the data structuring conversion engine. The system calls the preset data structuring conversion engine to standardize and encapsulate the unstructured data records generated by the manufacturing execution systems of various manufacturers.
[0040] The input to the conversion engine is the raw data records exported by the manufacturing execution systems of various manufacturers. These raw data records are usually represented as XML text or custom-formatted text.
[0041] The conversion engine is internally configured with a field mapping table, which adopts a semi-automatic generation mechanism: the system has a built-in semantic ontology library for the LED manufacturing field, which defines the semantic associations between standard field names and synonyms, stems, and abbreviations; when a new manufacturing execution system data source is connected for the first time, the conversion engine uses natural language processing technology to segment and stem the original data field names, generating a keyword set, and uses a preset cosine similarity algorithm to calculate the cosine similarity between the generated keyword vectors and the standard term vectors in the semantic ontology library. When the similarity score exceeds a preset threshold (e.g., 0.85), candidate mapping pairs between the original field names and standard field names are automatically established; after the candidate mapping pairs are generated, they are reviewed once by the administrator of the node where the data source is located and confirmed by their digital signature. The mapping rules after review and confirmation are written into the field mapping table.
[0042] Taking the dominant wavelength field as an example, if chip manufacturing entity A uses WL_Chip as the field name in the original data, and "WL" and "wavelength" are semantically related in the ontology library, and "Chip" and "chip level" are semantically related, the system automatically generates a candidate mapping for the dominant wavelength corresponding to WL_Chip, which is recorded in the field mapping table after being confirmed by the administrator's signature. Device packaging entity B uses DomPeak as the field name, and the system automatically generates a candidate mapping for the dominant wavelength corresponding to DomPeak based on the semantic relationship between "Peak" and "peak wavelength" in the ontology library, which also takes effect after being confirmed by the administrator's signature.
[0043] After reading the input data, the transformation engine iterates through all data fields, replaces the original data field names with standard field names according to the field mapping table, extracts the corresponding values, reorganizes them according to the hierarchical structure from level 1 to level 3, and outputs a JSON object or Protobuf object conforming to the evidence storage protocol format, thus completing the standardization of the data structure. As a result, heterogeneous data from different vendors achieves a unified semantic expression across the entire industry chain.
[0044] Step S203: Perform data compliance verification. Before entering the certificate-issuing queue, the standardized data must pass through a preset verification logic. This verification logic has a built-in physical threshold rule set for photoelectric parameters, which defines the reasonable value range for each photoelectric parameter. For example, the reasonable value range for the chip's forward voltage is 2.8 volts to 3.4 volts, and the reasonable value range for the color rendering index is 0 to 100.
[0045] The verification logic sequentially reads the values of each photoelectric parameter in the standardized data object and compares them with the corresponding physical thresholds. If any parameter value exceeds its preset reasonable range, the data record is deemed non-compliant, discarded, and an alarm log is generated. Only data records where all photoelectric parameter values fall within the preset reasonable range are deemed compliant and allowed to enter the certificate-issuing queue.
[0046] Step S204: Generate data fingerprints. For data objects that pass compliance verification, the system calls a preset hash function to extract feature values.
[0047] The default hash function uses the SHA-256 algorithm. The complete byte sequence of the JSON or Protobuf object is used as input to the hash function, and after SHA-256 operation, a fixed-length 256-bit hash value is output. This hash value is the unique data fingerprint of the data object.
[0048] The purpose of data fingerprints is to serve as proof of data integrity in subsequent notarization transactions. Any tampering with the original quality data object will result in a recalculated hash value that is inconsistent with the on-chain notarized data fingerprint, thus being automatically identified by the traceability system.
[0049] Through step S2, this method establishes an end-to-end standardized quality assurance protocol across the entire LED industry chain. From defining hierarchical data structures, structuring heterogeneous data, verifying the physical compliance of optoelectronic parameters, to generating data fingerprints, each step progresses sequentially, ensuring that quality data generated by different manufacturers and at different process stages have unified semantics, verifiable physical credibility, and tamper-proof integrity across the entire network.
[0050] This standardized notarization protocol provides a compliant data receiving format for the real-time data collection and on-chain processing of IoT devices in step S3, and also clarifies the pre-processing steps of data encapsulation and verification for the automatic triggering of notarization operations by smart contracts in step S4. By embedding the standardized protocol into the on-chain path of notarization transactions, subsequent multi-party consensus witnessing, hash anchoring, and distributed access control are all based on semantically consistent, trustworthy, and verifiable quality data, thereby solving the problem of broken traceability chains caused by inconsistent data standards in traditional solutions.
[0051] For step S3, the integration of IoT device real-time data acquisition interfaces aims to map raw quality data generated by various physical sensors on the production site to the blockchain network in real time and securely, reducing manual data entry and ensuring that traceability data is authentic and tamper-proof from the moment it is generated. The specific implementation process is broken down into the following sub-steps.
[0052] Step S301: Deploy the IoT sensing layer and aggregate real-time data to the blockchain edge gateway. In the production site, the IoT sensing layer devices include high-precision temperature and humidity sensors, particle size counters, photodiode arrays, and online photoelectric testing instruments. These sensing layer devices transmit the real-time collected data to the blockchain edge gateway via industrial fieldbus protocols or low-power wireless sensor networks.
[0053] The industrial fieldbus protocol used is Modbus TCP or Profinet, and the low-power wireless sensor network uses LoRaWAN or Zigbee. The blockchain edge gateway, acting as a data aggregation node between the physical world and the blockchain network, is deployed near the production workshop or production line, responsible for receiving, buffering, and initially processing data packets from various sensing layer devices.
[0054] Step S302: Establish a device shadow model to achieve real-time state mapping between physical devices and the digital ledger. For each key production device connected to the network, the blockchain edge gateway creates a corresponding device shadow model. The device shadow model is a logical data object that stores the latest state variables of the physical device, specifically including operating frequency, load rate, and sensor sampling values.
[0055] When a blockchain edge gateway receives a data message from a physical device, it parses the unique identifier of the device from the message header and uses this identifier to look up the corresponding device shadow model in the locally maintained device shadow table.
[0056] If found, the corresponding field in the device shadow model is updated with the sensor sampling value in the message; if not found, a new device shadow entry is created and the initial value is written. Through the above mechanism, the logic layer always maintains a digital mapping that is synchronized with the current state of the physical device, providing a directly accessible digital view of the device state for subsequent automated evidence storage contracts.
[0057] Step S303: The raw data is preprocessed at the edge computing node to filter out redundancy and noise. The blockchain edge gateway has a built-in edge computing node. When new sampling data generated by IoT sensing layer devices arrives, the edge computing node first performs preprocessing operations on the massive amount of raw data.
[0058] The first step in preprocessing is moving average filtering. Each edge computing node defines a moving window for each type of sensor data, with the window width set according to the sensor's sampling frequency. For example, for a temperature sensor with a sampling frequency of 1 Hz, the window width could be set to 5 sampling points. Each time a new sampling point is received, the oldest sampling point in the window is discarded, and the arithmetic mean of all sampling points within the current window is recalculated. This arithmetic mean is then used as the filtered output value. Moving average filtering removes random noise superimposed on the true signal.
[0059] The second step in the preprocessing operation is feature extraction. For the data sequence after moving average filtering, the edge computing node uses a feature point extraction algorithm based on the rate of curvature change for the monotonic positive operating voltage and current characteristic curve. It calculates the rate of curvature change at each sampling point in turn. When the rate of curvature change of a sampling point exceeds a preset threshold, the sampling point is marked as a feature point. At the same time, the start and end points of the sampling sequence are retained. The values of the feature points, start and end points, and the corresponding sampling time information are combined into a simplified data message for subsequent signing and on-chain use, so as to maintain the curve shape characteristics while simplifying the data.
[0060] Step S304: Perform authenticity signature and verification on the data source based on the national cryptographic SM2 algorithm. Before mapping the simplified data message to the smart contract input terminal, the system uses the national cryptographic SM2 digital signature technology to confirm the authenticity of the data source.
[0061] Each IoT sensing layer device integrates a security encryption module (SE), which stores the device's unique SM2 private key and public key certificate. When the device is ready to send data, the SE automatically uses its private key to perform an SM2 signature operation on the hash value of the data packet and appends the generated digital signature to the end of the data packet.
[0062] After receiving a data packet with a digital signature, the blockchain edge gateway extracts the sender's identifier from the packet header and retrieves the device's public key certificate from the certificate store based on this identifier. The gateway then uses the SM2 public key to verify the digital signature in the packet. If the verification passes, it indicates that the data packet was indeed sent by the claimed legitimate device and was not intercepted or tampered with during transmission; if the verification fails, the packet is discarded and a security alert log is generated.
[0063] After successful signature verification, the data message is parsed by the blockchain edge gateway, which extracts the sensor sampling feature value sequence and assembles the fields according to the data structure defined in step S2 to form a data object conforming to the standardized evidence storage protocol. Subsequently, the blockchain edge gateway calls the predefined interface of the smart contract, passing the data object as a contract input parameter, thereby completing the direct mapping from the physical device to the smart contract input end. This hardware-level identity-bound signature verification mechanism eliminates the risks of false alarms or malicious concealment that may arise from traditional manual data entry, ensuring the originality of traceability information from the physical world to the digital world.
[0064] Step S3 establishes a secure data channel from production line sensors directly to the blockchain smart contract. High-frequency, raw production environment data, after noise reduction and feature compression, is automatically uploaded to the blockchain with verifiable device identities. This eliminates the need for manual data entry during the data collection process, ensuring the objectivity and integrity of quality data from the source.
[0065] This secure data channel provides standardized data input that can directly trigger contract execution for the deployment of the automated evidence storage smart contract in step S4. Once the process parameters of various production processes are transmitted to the blockchain in real time through the S3 channel, the evidence storage contract in S4 can automatically complete the evidence storage and encapsulation of quality data at key process nodes according to the preset "If-Then" logic. This seamlessly connects real-time IoT data collection with automated on-chain evidence storage, forming a closed-loop linkage between data flow and business flow.
[0066] The next step, S4, involves deploying an automated data storage smart contract. The aim is to link the data storage actions for quality data across key processes throughout the LED lifecycle with the real-time status of production equipment. By using deterministic execution logic in the on-chain code, data lag or omissions that might be introduced by human intervention are eliminated, achieving a rigid binding between the data storage process and the production process. Its specific implementation process is broken down into the following sub-steps.
[0067] Step S401: Compile an automated evidence storage contract template covering the entire lifecycle of LEDs and deploy the contract to the underlying blockchain protocol. The evidence storage contract template pre-defines the correspondence between trigger conditions and execution actions, and this correspondence follows explicit If-Then deterministic logic.
[0068] The data source for triggering the condition comes from the standardized data object passed in by the blockchain edge gateway in step S3. The execution actions include extracting specified fields from the standardized data object, encapsulating the notarized transaction according to the quality data structure defined in step S2, and submitting it to the consensus ranking network.
[0069] During deployment, the compiled contract bytecode is packaged into a deployment transaction using a smart contract lifecycle management tool. After verification by consensus nodes, the contract address and contract interface are written into the distributed ledger, and each node can call the evidence storage function through the contract address.
[0070] Step S402 involves configuring the interface between the evidence storage contract and the epitaxial wafer growth equipment control system during the chip manufacturing stage. The epitaxial wafer growth equipment control system pushes equipment state machine change information in real time, and the blockchain edge gateway converts this information into structured state messages and transmits them to the blockchain.
[0071] When the sensors on the epitaxial wafer growth equipment detect that the epitaxial wafer growth is complete and the tray automatically rotates to the detection tray position, the control system sends a pass / fail signal. The blockchain edge gateway encapsulates the pass / fail signal into a trigger message and sends the trigger message to the contract by calling the predefined interface of the evidence storage contract.
[0072] After receiving the trigger message, the evidence storage contract automatically extracts three key parameters of the batch of chips: wavelength distribution spectrum, brightness distribution level, and leakage current. These parameters, along with the current timestamp and device DID, are encapsulated according to the optoelectronic parameter layer structure defined in step S2 to generate a chip quality evidence storage transaction request to be uploaded to the blockchain.
[0073] Step S403: In the encapsulation stage, configure the evidence storage contract to monitor the heating and curing curve of the encapsulation process. The sampling data from the temperature sensor continuously flows in through the blockchain edge gateway. The evidence storage contract maintains a sliding time window, the duration of which is determined by a preset process threshold.
[0074] One specific configuration for the process threshold is a sustained temperature of 150 degrees Celsius for 120 minutes. The contract continuously compares the temperature value of each sampling point within the current window with the preset lower limit. When the temperature value of all sampling points within the window is greater than or equal to the preset lower limit, and the cumulative value of the window duration reaches the preset duration, the contract determines that the sealing process is complete.
[0075] The contract immediately extracts all sensor sampling point sequences within the window as environmental stability data, binds this environmental stability data with the unique serial number of the packaged device, generates a package quality certification transaction request, and submits it after packaging.
[0076] Step S404: Configure the evidence storage contract and the Bill of Materials (BOM) management system to work together during the module integration phase. The BOM management system is responsible for maintaining the material pairing status on the production line. When the chip mounting equipment or assembly station completes a material scan, the BOM management system sends the scanned chip serial number and packaged device serial number to the blockchain edge gateway.
[0077] The blockchain edge gateway encapsulates the chip serial number and the packaged device serial number into a pairing confirmation message, which is then passed to the corresponding interface of the evidence storage contract. Upon receiving the pairing confirmation message, the contract determines that a matching relationship exists between the chip serial number and the packaged device serial number, and automatically generates a material-related transaction.
[0078] The data body of the material-related transaction contains a mapping matrix. Each row of the mapping matrix records a one-to-one correspondence between a chip serial number and a packaged device serial number. This mapping matrix provides logical support for subsequent hierarchical traceability, enabling the system to trace back upstream to the corresponding original batch when a quality problem occurs at any level.
[0079] The above three sub-steps deploy corresponding automated evidence storage logic on three typical processes: chip manufacturing, packaging process, and module integration, so that each core process node can achieve the automated effect of production-as-evidence storage.
[0080] Step S405: Configure all evidence storage operations for silent background execution and automatic PLC signal triggering. The system establishes a communication connection with the production line's programmable logic controller (PLC). The edge gateway has a built-in industrial protocol parsing module that supports OPC-UA or Modbus TCP protocols, used to convert industrial bus signals into data structures recognizable by the blockchain network. The parsing module loads a preset XML configuration file, which defines the mapping relationship between PLC register addresses and evidence storage trigger signals. For example, register address DB1.DBX0.0 is mapped to "detection station trigger signal," and register address DB1.DBW2 is mapped to "current detection station number."
[0081] The edge gateway reads the status values of the corresponding registers of the PLC in a polling manner according to the register address mapping table in the configuration file. When the photoelectric sensor of the detection station is blocked by the product, the PLC flips the trigger bit state of the corresponding register channel from 0 to 1. After the blockchain edge gateway detects the change in the trigger bit state, the protocol parsing module extracts the device number and station information from the corresponding register, encapsulates the level trigger signal into a blockchain RPC call request in JSON format containing the device DID, station number, and timestamp, and sends this RPC call request as the trigger event to the smart contract.
[0082] Upon receiving the trigger event, the contract immediately initiates a data capture operation, obtaining sensor sampling data corresponding to the current detection station from the edge gateway, and then performs data encapsulation and transaction submission. The entire process, from trigger bit flipping to transaction submission, can be completed within hundreds of milliseconds under normal network communication conditions, without manual intervention.
[0083] By establishing a closed-loop chain—where the PLC trigger bit flips to 1, the contract receives the trigger event, and the certificate storage is automatically executed—the production line quality management standards are forcibly embedded into the certificate storage process, fundamentally eliminating the possibility of human intervention in skipping or delaying the certificate storage operation. For processes without photoelectric sensors, the trigger signal can also be obtained from the status bit of the PLC's internal logic relay, and the implementation method is consistent with the photoelectric sensor solution.
[0084] Through step S4, the quality verification logic for key processes throughout the entire LED chip production, packaging, and module integration process is written into deterministic smart contract code. Using real-time PLC I / O signals as a unified external trigger source, seamless linkage between verification actions and production processes is achieved. Since the initiation, execution, and submission of verification are all enforced by the contract code, quality management standards shift from relying on human initiative to being rigidly constrained by technological means. The real-time nature, integrity, and immutability of quality data are guaranteed at the mechanism level.
[0085] The deployment of this automated evidence storage smart contract system enables the secure data channel established in step S3 to have on-chain automatic response capabilities, allowing each piece of data collected by the sensors to be stored in real time according to the process rhythm. Building on this, step S5 will further introduce a multi-party consensus witnessing and hash anchoring mechanism to ensure that these evidence storage transactions automatically submitted by the contract receive irrefutable credibility across the entire network, making the traceability chain not only automated but also possessing legal evidentiary effect in cross-organizational scenarios.
[0086] The next step, S5, involves multi-party consensus witnessing and hash anchoring. The goal is to ensure that each quality-certified transaction in a decentralized network comprised of multiple independent participants is jointly verified and recorded by a sufficient number of nodes, thereby gaining irrefutable credibility. Simultaneously, cryptographic hashing anchors the certified data to a contiguous block sequence, ensuring that historical quality data cannot be tampered with once it is on the blockchain. The specific implementation process is broken down into the following sub-steps.
[0087] Step S501: Select the Practical Byzantine Fault Tolerance (PBFT) algorithm as the network consensus protocol and configure the consensus network parameters. The system uses the consortium blockchain node set established in step S1 as the PBFT consensus node set, with the total number of nodes denoted as N. Under the PBFT algorithm, the number f of faulty or malicious nodes that the system can tolerate satisfies... .
[0088] The current master node is determined as follows: all consensus nodes are sorted lexicographically by their identity DID and assigned a view number, v, which increments with each consensus round. The master node is the vNth node in the list. When the master node times out and becomes unresponsive, each backup node initiates a view change protocol to elect a new master node, thus ensuring that the consensus process is not blocked by a single point of failure.
[0089] Step S502: Execute the PBFT three-stage consensus process to process the evidence storage transaction request. After the consensus gateway of a certain production node submits the evidence storage transaction request generated in step S4 to the consensus network, the consensus process proceeds in the following stages.
[0090] Pre-preparation phase: The master node receives the notarization transaction request, checks the transaction format and signature validity, and assigns a monotonically increasing global sequence number s to the transaction after verification. Then, it constructs a pre-preparation message, which contains the current view number v, the sequence number s, and the transaction summary, and broadcasts the pre-preparation message to all backup nodes.
[0091] Preparation phase: After receiving the pre-preparation message, each backup node verifies the validity of the message. If it is valid, it constructs a preparation message, which includes the same view number v, sequence number s, the local node's DID, and a transaction summary, and broadcasts the preparation message to all other consensus nodes in the network.
[0092] Each node continuously collects preparation messages from other nodes. When a node collects at least 2f+1 valid preparation messages (including its own) with the same view number v and sequence number s, it indicates that the entire network has reached a preliminary consensus on the ordering of the current transaction at that sequence number position, and the node then enters the preparation complete state. The parameter f is the maximum number of fault-tolerant nodes set by the PBFT algorithm.
[0093] Confirmation Phase: Nodes in the ready-to-complete state construct a confirmation message containing the view number v, sequence number s, transaction summary, and their own DID, and broadcast it to the entire network. Each node continues to collect confirmation messages from other nodes. When a node has collected at least 2f+1 valid confirmation messages with the same view number v and sequence number s, it determines that the transaction has reached consensus across the entire network.
[0094] Transactions that have reached a consensus are written into the local transaction pool by each node in the order of their sequence numbers, and wait to be packaged into a new block.
[0095] The above three stages utilize pairwise interaction verification between nodes and threshold message aggregation to ensure that honest nodes can still reach a consensus on the ordering and validity of transactions even in the presence of a finite number of unreliable nodes.
[0096] Step S503: Summarize the block data and generate a block hash value containing parent hash references. The node responsible for producing blocks retrieves a batch of consensus-confirmed notarized transactions from the transaction pool to be packaged, and assembles a new block according to the block structure defined in step S105. The assembly process is as follows: All selected evidence-preserving transactions are sorted by serial number and used as a block body; For all transactions in the block, calculate the pairwise hash values and calculate upwards layer by layer until the root hash value is obtained, which is the Merkle root; Obtain the block hash value of the latest block in the blockchain as the parent block hash; Record the RFC 3161 standard timestamp provided by the current high-precision timestamp server as the block timestamp.
[0097] The block header consists of the parent block hash, Merkle root, and timestamp fields. The node then performs the SHA-256 secure hash algorithm on the binary sequence of the block header, outputting a fixed-length 256-bit hexadecimal string, which is the block hash value of the current block.
[0098] The calculation of this block's hash value depends on the Merkle root of all transaction data within this block and the hash references of previous blocks on the chain. If any quality data in a notarized transaction is tampered with, even by changing just one byte, the hash value of that transaction will change, which in turn will cause the Merkle root to change, ultimately rendering the hash value of this block and the hash values of all subsequent blocks invalid.
[0099] Therefore, the block hash value actually serves as a unique digital fingerprint of all on-chain quality attributes of the batch of LED products at a specific moment, forming a dual anchor with the quality data fingerprint in the transaction.
[0100] Step S504: Evaluate the reliability of the consensus algorithm. This method uses a reliability metric R to quantify the probability that the system can still correctly reach consensus even in the presence of malicious nodes. The relationship between R and the total number of nodes N is as follows: The meanings of each letter in the formula are as follows: N is the total number of nodes participating in the PBFT consensus; i is the number of nodes that actually fail or act maliciously in the system, with the index i ranging from 0 to the maximum number of faulty nodes that the system can tolerate. To Round down; p is the probability of a single node failing or acting maliciously, and its value is a real number between 0 and 1; Let be the combination number, representing the number of possible combinations for selecting i faulty nodes from N nodes. Its calculation formula is: .
[0101] This formula describes the maximum tolerance number of faulty nodes in the entire network when a single node independently fails with probability p. The probability of consensus being successfully achieved, i.e., the reliability of the consensus process. The system has a preset reliability threshold. The operations and maintenance personnel calculate the reliability R under the current network configuration by substituting the actual reputation data of each participant in the industry chain into the estimated value of p; when any consensus node is detected to have left the network, causing the recalculated R to be less than 1, the reliability R is calculated. When the time comes, the early warning smart contract automatically selects a backup node from the pre-maintained pool of candidate backup nodes and sends it an invitation to join the network. After the candidate backup node completes identity verification and authorization through the certificate authority access process in step S103, it joins the consensus network, realizing automatic replacement of consensus nodes and closed-loop control of network robustness.
[0102] Through the above steps, each quality-certified transaction automatically submitted by a smart contract must traverse the PBFT consensus witness network with multiple nodes across the entire network and be irreversibly anchored to the blockchain using cryptographic hashes. The transaction's legality verification, global ordering, sufficient share of cross-confirmation, and tamper-proof referencing of the hash chain are interconnected, endowing the quality traceability data with cross-organizational judicial acceptance-level evidentiary value.
[0103] With the support of this consensus and anchoring mechanism, the on-chain recording of quality data no longer needs to rely on the endorsement of any centralized institution. Downstream customers or regulatory agencies can verify the integrity and time authenticity of the batch of product data simply by using the publicly available block hashes on the chain.
[0104] Following this step, step S6 will configure a distributed access control mechanism to ensure that on-chain data is transparent and verifiable to legitimate users, while using asymmetric encryption and attribute strategies to isolate and protect sensitive information such as core process parameters, thereby achieving a balance between data openness and trustworthiness and the protection of trade secrets.
[0105] Finally, step S6 configures a distributed access control and quality anomaly early warning mechanism. The aim is to ensure that quality data across the entire industry chain is transparent and verifiable to legitimate users, while utilizing asymmetric encryption and attribute-based access control strategies to implement differentiated protection for data fields with different sensitivity levels. This eliminates data sharing barriers caused by concerns about core process leaks among participating parties. Simultaneously, it incorporates built-in automatic quality anomaly detection and early warning capabilities, enabling early risk discovery and accurate notification. Its specific implementation process is broken down into the following sub-steps.
[0106] Step S601: Establish an attribute-based access control ABAC permission management model and define multiple roles. The system divides access subjects into four roles: administrator, auditor, ordinary vendor, and end consumer. Each role is bound to a set of attribute assertions. The attribute assertions for the administrator role include node access approval authority and certificate revocation operation authority.
[0107] The auditor role's attribute assertions include read-only verification rights over all blockchain-stored data, but they cannot modify any data already on the blockchain. The ordinary vendor role's attribute assertions include a supply relationship filtering rule, allowing access only to quality data directly related to the vendor's upstream and downstream supply chain. The end-consumer role's attribute assertions use a minimal permission set, allowing access only to publicly available quality certificates, production dates, and key performance indicators. Their accessor identifier is an anonymized string, carrying no personally identifiable information.
[0108] Access policies are deployed on the blockchain in the form of smart contracts. When any party initiates a data query request, the access policy contract extracts the visitor's digital certificate from the request, parses the role attribute assertion in the certificate's extended fields, and then matches the assertion with the metadata tags of the requested data resource to determine whether the request is allowed or denied.
[0109] Step S602 involves performing field-level differential encryption on the quality data stored on the blockchain. Before the data is uploaded to the blockchain, the system marks the sensitivity level of each field in the three-layer quality data structure defined in step S2. The globally unified product model GTIN, production date, certificate number, and basic performance parameters are marked as public; the core epitaxial layer thickness parameters, specific phosphor ratios, key customer identification information, and real-time environmental humidity records during the packaging process are marked as sensitive.
[0110] Public-level data is stored in plaintext in the data field of the evidence storage transaction, and can be directly read by any node holding a valid certificate. Sensitive-level data, before being uploaded to the blockchain, is dynamically encrypted using a random symmetric key K by the node initiating the evidence storage transaction. Subsequently, the node retrieves the SM2 public keys of all entities authorized to access the sensitive field from a pre-defined access control list, and encrypts the symmetric key K using each authorizing entity's SM2 public key, generating multiple digital envelopes. The encrypted ciphertext of the sensitive field, along with all the digital envelopes, is written into the evidence storage transaction.
[0111] Only authorized entities holding the corresponding SM2 private key can first use their private key to unlock the digital envelope to obtain the symmetric key, and then use that symmetric key to decrypt the ciphertext field to view the original value. When performing the decryption operation, the consensus node generates a decryption audit record locally and writes it to the ledger to trace data access behavior.
[0112] Step S603: Embed quality control logic within the smart contract to achieve simultaneous evidence storage and detection. Step S4: Each automated evidence storage contract deployed, in addition to encapsulating the core logic of the evidence storage transaction, also injects a piece of quality control code. This quality control code maintains a set of control limit parameters, including the upper control limit UCL and the lower control limit LCL.
[0113] When the contract executes the notarization operation, the quality control code extracts the quality parameter to be tested from the input standardized data object and compares the current sampled value of the quality parameter with the corresponding UCL and LCL. If the current sampled value falls within the range between the UCL and LCL, it is considered normal, and the notarization transaction submission continues. If the current sampled value exceeds the UCL or falls below the LCL, the contract marks this sampling as an abnormal event and accumulates the consecutive abnormality count for that quality parameter in this batch.
[0114] The quality control code also incorporates a built-in module for calculating the photoelectric attenuation rate. The automated evidence storage smart contract, based on the unique traceability code of the current batch, uses the hash pointer of previous transactions to reverse-search the most recent historical evidence storage record corresponding to that traceability code in the global state database of the distributed ledger. From this historical evidence storage record, it reads the luminous flux sampling value of the same batch of products at the previous testing node, calculates the difference between this luminous flux sampling value and the luminous flux sampling value at the current testing node, and divides it by the time interval between the two samplings to obtain the photoelectric attenuation rate. If the calculated photoelectric attenuation rate exceeds a preset threshold... The contract also generates an exception flag. The value is set by the chip manufacturer according to the optical decay lifetime curve promised in the product specification. A typical reference value is the decay rate corresponding to the optical flux decay exceeding the initial value by 0.5% per thousand hours.
[0115] The introduction of the above quality control logic means that quality anomaly detection no longer relies on post-event offline analysis, but is completed synchronously in the same transaction as the evidence storage action, realizing the immediate on-chain evidence storage of the detection results.
[0116] Step S604: Configure a multi-condition composite triggering early warning mechanism and send asynchronous notifications. The exception flag generated in step S603 will be passed to a separate early warning smart contract. The early warning smart contract internally registers the asynchronous notification endpoint addresses of each participant. The endpoint address can be a message queue topic or an HTTP callback URL.
[0117] The early warning trigger condition adopts a composite rule configuration. A specific configuration is: the cleanliness level parameter in the die bonding process exceeds the preset standard for three consecutive samples. When the early warning smart contract detects that the cumulative cleanliness level anomaly count for a certain origin and a certain batch reaches 3, the trigger engine is activated. The trigger engine retrieves the current holder DID of the batch and the list of potential downstream integrator DIDs recorded for the batch from the distributed ledger, and sends asynchronous notification messages to the endpoint addresses associated with these DIDs one by one. The data structure of the asynchronous notification message includes an anomaly type code, the name of the parameter exceeding the standard, the number of consecutive exceedances, and the on-chain index hash of the corresponding notarized transaction.
[0118] The early warning smart contract also monitors for abnormal photoelectric decay rate markers. Once it receives a notification from any quality control code that the photoelectric decay rate exceeds the threshold, it immediately triggers a full-chain early warning with the highest priority, expanding the notification scope to all participating nodes in the distribution path of this batch of products. Through the combination of the above-mentioned multi-condition compound triggering and targeted asynchronous notification, quality risks are located and pushed to the relevant responsible parties in the first instance, enabling corrective and recall measures to be initiated with minimal impact.
[0119] Through step S6, this method overlays a field-level privacy isolation, role-based access control, and evidence-based detection access control and quality early warning system onto a distributed ledger shared across organizations. This system enables all participants in the industry chain to complete transparent verification and joint traceability of quality information without exposing core process parameters, while transforming the traditional post-event sampling inspection model into a real-time proactive defense model of risk control upon on-chain verification.
[0120] With the access control and early warning capabilities provided in step S6, the entire traceability scheme forms a closed loop: steps S1 to S3 build a trusted data pipeline from the device to the blockchain, steps S4 and S5 achieve automated notarization and multi-party witnessing anchoring, and this step adds a security lock and alarm to this trusted data infrastructure. Thus, this method achieves a complete technical closed loop for full-process tracking of LED product quality, from data collection, standardization, automatic notarization, consensus witnessing to encrypted authorization and rapid response to quality anomalies.
[0121] On the other hand, a blockchain-based LED product quality traceability system includes: The distributed ledger module is used to build a decentralized peer-to-peer network, setting up chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities in the LED industry chain as consensus nodes, and assigning a digital identity to each consensus node. The standardized quality evidence storage protocol module is used to define a hierarchical quality data structure. The hierarchical quality data structure includes at least a basic attribute layer carrying static description information, a photoelectric parameter layer carrying photoelectric parameters, and an environmental state layer carrying process environment parameters. The photoelectric parameter layer includes at least a sequence of instantaneous sampling points of the forward operating voltage and current characteristic curves. The IoT device real-time acquisition interface module is used to establish communication connections between the blockchain edge gateway and the underlying production equipment and testing equipment respectively. The blockchain edge gateway is configured with a mapping relationship between the PLC register address and the evidence storage trigger signal. The automated evidence storage triggering module is used to enable the blockchain edge gateway to read the status value of the corresponding register of the PLC in a polling manner, and when it detects that the state of the trigger bit in the register is flipped due to external stimulation, it generates a trigger event and sends it to the automated evidence storage smart contract to trigger the evidence storage operation. The consensus and storage module is used to perform multi-party consensus verification of evidence-stored transactions in the consensus network, and to append the blocks generated by the verified evidence-stored transactions to the distributed ledger of each consensus node in a cryptographic hash anchoring manner, thus completing the on-chain evidence storage of quality data.
[0122] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0123] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A blockchain-based method for full-process traceability of LED product quality, characterized in that, Includes the following steps: A distributed ledger infrastructure is built, and the chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities in the LED industry chain are all set as consensus nodes, with each consensus node being assigned a digital identity. Define a standardized quality evidence storage protocol, which includes a hierarchical quality data structure. The hierarchical quality data structure includes at least a basic attribute layer carrying static description information, a photoelectric parameter layer carrying photoelectric parameters, and an environmental state layer carrying process environment parameters. The photoelectric parameter layer includes at least a sequence of instantaneous sampling points of the forward operating voltage and current characteristic curves. The blockchain edge gateway integrates a real-time data acquisition interface for IoT devices and establishes communication connections with the underlying production and testing equipment. The blockchain edge gateway is configured with a mapping relationship between the PLC register address and the evidence storage trigger signal. The blockchain edge gateway reads the status value of the corresponding register of the PLC in a polling manner. When it detects that the state of the trigger bit in the register is flipped due to external stimulus, it generates a trigger event and sends it to the automated evidence storage smart contract. In response to the triggering event, the automated evidence storage smart contract extracts standardized quality data and encapsulates it into an evidence storage transaction according to the standardized quality evidence storage protocol, and submits the evidence storage transaction to the consensus network. In the consensus network, the notarized transactions are verified through multi-party consensus, and the blocks generated by the verified notarized transactions are appended to the distributed ledger of each consensus node in a cryptographic hash anchoring manner, thus completing the on-chain notarization of quality data.
2. The method for full-process traceability of LED product quality based on blockchain according to claim 1, characterized in that, The hierarchical quality data structure is specifically divided into three levels: the first level is the basic attribute layer, whose fields include at least the globally unified product model GTIN, the production batch number composed of the production date, production line number and serial number, and the production date; The second layer is the photoelectric parameter layer, whose fields include at least the dominant wavelength, peak wavelength, color temperature, color rendering index, luminous flux, luminous efficiency, and forward operating voltage and current characteristic curve. The record of the forward operating voltage and current characteristic curve includes a sequence of instantaneous sampling points composed of multiple voltage-current data pairs arranged in time sequence during detection. The third layer is the environmental status layer, whose fields include at least the real-time ambient temperature, relative humidity, workshop dust particle size, and electrostatic discharge protection level, which are mandatory to be recorded in the core production processes of die bonding, wire bonding, and encapsulation.
3. The method for full-process traceability of LED product quality based on blockchain according to claim 2, characterized in that, After obtaining the unstructured data records generated by the manufacturing execution systems of various manufacturers, a data structuring conversion engine is deployed. The data structuring conversion engine is configured with a field mapping table and has a built-in semantic ontology library for the LED manufacturing field. The semantic ontology library defines the semantic association between standard field names and synonyms, stems, and abbreviations. When a new manufacturing execution system data source is connected for the first time, the data structuring conversion engine uses natural language processing technology to segment and stem the original data field names. It uses a preset cosine similarity algorithm to calculate the cosine similarity between the generated keyword vector and the standard term vector in the semantic ontology library. When the similarity score exceeds a preset threshold (e.g., 0.85), it automatically establishes candidate mapping pairs between the original field names and the standard field names. After being confirmed by the administrator's signature, the mapping pairs are written into the field mapping table to complete the standardization conversion of heterogeneous data.
4. The method for full-process traceability of LED product quality based on blockchain according to claim 1, characterized in that, The step of assigning a digital identity identifier (DID) to each consensus node specifically includes: The node collects the unique hardware identifier of its physical device, which is composed of the CPU serial number and MAC address. The node performs latitude and longitude rasterization on its own geographic location coordinates and takes a GeoHash encoded string with a preset precision as the geographic location input. The node uses a preset hash function to perform a joint hash operation on the hardware unique identifier, manufacturer number, device attribute code and the GeoHash encoded string to generate a fixed-length digest value; The first 20 bytes of the fixed-length digest value are taken and encoded into a hexadecimal string, which serves as the digital identity identifier (DID) of the node. During the initial registration of a node, the Certificate Authority (CA) writes the generated Digital Identity (DID) and its corresponding original data into the Subject Alternate Name field of the digital certificate, and signs it using the CA's private key to establish a unique binding relationship between the digital identity and the physical device.
5. The method for full-process traceability of LED product quality based on blockchain according to claim 1, characterized in that, The blockchain edge gateway reads the status value of the corresponding register of the PLC in a polling manner. When it detects that the state of the trigger bit in the register has changed due to external stimulation, specifically: when the photoelectric sensor of the detection station is blocked by the product, the PLC changes the state of the trigger bit of the corresponding register channel from 0 to 1. After the blockchain edge gateway detects the change in the state of the trigger bit, it extracts the device number and station information from the corresponding register, encapsulates the level trigger signal into a blockchain RPC call request in JSON format containing the device DID, station number and timestamp, and sends the RPC call request as the trigger event to the automated evidence storage smart contract.
6. The method for full-process traceability of LED product quality based on blockchain according to claim 5, characterized in that, Before the automated evidence storage smart contract extracts standardized quality data, the blockchain edge gateway also performs preprocessing operations after receiving the raw data packets uploaded by the IoT sensing layer device: first, it performs a moving average filter, defines a moving window for each type of sensor data, and removes the earliest sampling point in the window each time a new sampling point is received, and recalculates the arithmetic mean of all sampling points in the current window. Subsequently, feature extraction is performed on the filtered data sequence. For the monotonic positive working voltage and current characteristic curve, a feature point extraction algorithm based on the rate of curvature change is adopted. The rate of curvature change at each sampling point is calculated sequentially. When the rate of curvature change of a sampling point exceeds a preset threshold, the sampling point is marked as a feature point. At the same time, the start point and end point of the sampling sequence are retained. The values of the feature points, start point and end point, and the corresponding sampling time information are combined into a simplified data message as the standardized quality data for subsequent on-chain evidence storage, so as to maintain the curve shape characteristics while simplifying the data.
7. The method for full-process traceability of LED product quality based on blockchain according to claim 1, characterized in that, Before the automated evidence storage smart contract encapsulates the standardized quality data into an evidence storage transaction, the node initiating the evidence storage transaction performs field-level differential encryption on the standardized quality data. Specifically, this includes: marking fields related to core processes in the second-layer optoelectronic parameter layer and the third-layer environmental state layer as sensitive fields; and dynamically generating a random symmetric key K for encryption of the sensitive fields. Subsequently, the preset access control list is retrieved to obtain the SM2 public keys of all entities authorized to access the sensitive field, and the symmetric key K is encrypted using the SM2 public key of each authorizing party to generate multiple digital envelopes; The encrypted sensitive fields, along with all the digital envelopes, are written into the data field of the evidence storage transaction, so that only authorized entities holding the corresponding SM2 private key can decrypt and view the original values.
8. The method for full-process traceability of LED product quality based on blockchain according to claim 1, characterized in that, The automated evidence storage smart contract also embeds quality control code, which maintains an upper control limit (UCL) and a lower control limit (LCL). When the automated evidence storage smart contract performs the evidence storage operation, the quality control code extracts the quality parameters to be detected from the input standardized data object, compares the current sampled value of the quality parameters with the UCL and LCL, and if the current sampled value exceeds the UCL or is lower than the LCL, the sample is marked as an abnormal event and the continuous abnormal count is accumulated. The quality control code also has a built-in photoelectric attenuation rate calculation module. The automated evidence storage smart contract uses the unique traceability code of the current batch and the hash pointer of the previous transaction to reversely retrieve the most recent historical evidence storage record corresponding to the traceability code in the global state database of the distributed ledger. It reads the light flux sampling value of the same batch of products at the previous detection node from the historical evidence storage record, calculates the difference between the light flux sampling value and the light flux sampling value of the current detection node, and divides it by the time interval between the two samplings to obtain the photoelectric attenuation rate. If the photoelectric attenuation rate exceeds a preset threshold, an anomaly mark is generated, and the anomaly mark is written into the current transaction as evidence storage content.
9. The method for full-process traceability of LED product quality based on blockchain according to claim 8, characterized in that, The anomaly flag is passed to a separate early warning smart contract; the early warning smart contract has registered the asynchronous notification endpoint addresses of each participant and is configured with composite rule triggering conditions. When the early warning smart contract detects that a batch of consecutive abnormal counts or abnormal photoelectric decay rate markers on specific parameters meet the preset composite rule triggering conditions, the triggering engine is activated. The triggering engine retrieves the current holder DID of the batch and the recorded list of potential downstream integrator DIDs from the distributed ledger, and sends asynchronous notification messages to the endpoint addresses associated with these DIDs one by one. The data structure of the asynchronous notification message includes at least the abnormality type code, the name of the parameter exceeding the standard, the number of consecutive exceedances, and the on-chain index hash of the corresponding evidence-based transaction.
10. A blockchain-based LED product quality traceability system, applied to the method described in any one of claims 1-9, characterized in that, include: The distributed ledger module is used to build a decentralized peer-to-peer network, setting up chip manufacturing entities, device packaging entities, module integration entities, and terminal sales entities in the LED industry chain as consensus nodes, and assigning a digital identity to each consensus node. A standardized quality evidence storage protocol module is used to define a hierarchical quality data structure. The hierarchical quality data structure includes at least a basic attribute layer carrying static description information, a photoelectric parameter layer carrying photoelectric parameters, and an environmental state layer carrying process environment parameters. The photoelectric parameter layer includes at least a sequence of instantaneous sampling points of the forward operating voltage and current characteristic curves. The IoT device real-time acquisition interface module is used to establish communication connections between the blockchain edge gateway and the underlying production equipment and testing equipment, respectively. The blockchain edge gateway is configured with a mapping relationship between the PLC register address and the evidence storage trigger signal. The automated evidence storage triggering module is used to enable the blockchain edge gateway to read the status value of the corresponding register of the PLC in a polling manner, and when it detects that the state of the trigger bit in the register is flipped due to external stimulus, it generates a trigger event and sends it to the automated evidence storage smart contract to trigger the evidence storage operation. The consensus and storage module is used to perform multi-party consensus verification of the notarized transactions in the consensus network, and to append the blocks generated by the verified notarized transactions to the distributed ledger of each consensus node in a cryptographic hash anchoring manner, thereby completing the on-chain notarization of quality data.
