A digital traceability method and system for gold trading

Through blockchain and smart contracts combined with gold material characteristic spectral data, the problem of complex and low transparency of data traceability in gold transactions is solved, and the transaction data is not tampered with and trustworthy traceability is realized, and the security and transparency of transactions are improved.

CN120182005BActive Publication Date: 2025-08-01SHENZHEN GOLD RICHES WEALTH MANAGEMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510619047.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-01
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

There is information asymmetry in gold trading, high risk of manual errors, complex data traceability and low transparency and security, especially when multi-party transactions, it is difficult to achieve comprehensive and reliable transaction records.

Method used

Blockchain technology is used for data storage, combining smart contracts and gold material characteristic spectral data, ensuring data integrity through hash encoding, generating gold digital fingerprints, monitoring abnormal behavior of transaction blocks in real time, and conducting traceability analysis.

Benefits of technology

It improves the transparency and security of gold transactions, ensures the immutability and credibility of transaction data, can quickly identify fraudulent behaviors, and improves the fairness and legality of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182005B_ABST
    Figure CN120182005B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of transaction management, and in particular to a digital traceability method and system for gold transactions. The method includes the following steps: collecting gold transaction data, where the gold transaction data includes transaction process information, transaction timestamps, and the average gold weight, performing hash encoding on the gold transaction data to generate a transaction verification hash value; obtaining gold material characteristic spectral data; analyzing the gold element composition of the gold sample according to the gold material characteristic spectral data, and constructing a gold digital fingerprint in combination with the gold material characteristic spectral data; uploading the transaction verification hash value, the gold digital fingerprint code, and the element composition data to the blockchain, and performing multi-node consensus verification through a smart contract to generate a gold transaction block encrypted with a timestamp. The present invention improves the transparency and security in gold transaction traceability by combining blockchain, smart contracts, and gold material characteristic spectral data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transaction management, and particularly to a digital traceability method and system for gold trading. Background Art

[0002] Gold trading mostly relies on traditional paper trading records and manual management, which poses risks of information asymmetry and human errors. The rise of Internet technology and big data has promoted the gradual digital transformation of gold trading. The emergence of blockchain technology provides strong technical support for the traceability system of gold trading. Blockchain technology ensures the immutability and transparency of transaction data through a decentralized approach, providing real-time traceable records for every step in the gold trading chain. In recent years, gold traceability systems combined with technologies such as the Internet of Things (IoT) and artificial intelligence (AI) have been further improved, which can not only trace the origin of gold but also monitor its circulation in real time, providing a more efficient, secure, and transparent trading environment for participants in the gold market. However, currently, traditional methods often lack comprehensive and reliable transaction records. Especially when the gold trading chain is long or involves multiple trading parties, data traceability becomes complex and difficult. At the same time, in the gold trading chain, there are multiple different entities and links, and data often exists in information silos, and data in different links is inconsistent, resulting in lower transparency and security of traceability. Summary of the Invention

[0003] Based on this, it is necessary to provide a digital traceability method and system for gold trading to solve at least one of the above technical problems.

[0004] To achieve the above object, a digital traceability method for gold trading, the method includes the following steps:

[0005] Step S1: Collect gold trading data, where the gold trading data includes transaction process information, transaction timestamps, and average gold weights, and perform hash encoding on the gold trading data to generate a transaction verification hash value;

[0006] Step S2: Obtain gold material characteristic spectral data; analyze the gold element composition of the gold sample according to the gold material characteristic spectral data, and construct a gold digital fingerprint in combination with the gold material characteristic spectral data;

[0007] Step S3: Upload the transaction verification hash value, gold digital fingerprint encoding, and element composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold trading block encrypted with a timestamp;

[0008] Step S4: Real-time monitor the abnormal transaction behavior data of the gold trading block, and perform traceability backtracking on the gold trading chain link based on the abnormal transaction behavior data to generate a traceability display report of the gold trading.

[0009] This invention ensures the integrity and immutability of gold transaction data (such as transaction process information, timestamps, and gold weight) by hashing it, thus eliminating the risk of human intervention and data tampering. By using blockchain technology to upload transaction verification hash values, gold digital fingerprints, and elemental composition data to the blockchain, and integrating this with smart contracts for multi-node consensus verification, the security of gold transactions is significantly enhanced, ensuring that transaction data is verified and trustworthy. Analysis of gold's characteristic spectral data not only confirms the gold's composition but also constructs its digital fingerprint, providing a more accurate and unique method for identifying gold samples, thereby mitigating the risk of counterfeit or illegal transactions. During the transaction process, real-time monitoring of abnormal behavior in transaction blocks and traceability analysis of the gold transaction chain based on this abnormal data can quickly identify and address potential fraudulent or non-compliant behavior, ensuring the fairness and legitimacy of transactions. Combining the decentralized nature of blockchain with the automated execution of smart contracts can significantly enhance user trust in gold transactions, as the entire transaction process is open, transparent, and verified by multiple parties. Therefore, the present invention improves the transparency and security of gold transaction traceability by combining blockchain, smart contracts and gold material characteristic spectral data.

[0010] Preferably, step S1 includes the following steps:

[0011] Step S11: Collect the identity information of the transaction parties and record the unique identification code of the transaction device to obtain transaction process information;

[0012] Step S12: Obtain the reference time using the time synchronization server, and perform network protocol clock calibration on the reference time to obtain a transaction timestamp;

[0013] Step S13: Measure the gold weight data using a high-precision electronic scale, repeat the measurement 3-5 times, and remove outliers to calculate the average value of the gold weight data;

[0014] Step S14: Concatenate the transaction party identity information, transaction timestamp, and average gold weight into gold transaction data; perform hash coding on the gold transaction data to generate a transaction verification hash value.

[0015] The present invention collects the identity information of the trading parties and records the unique identification code of the trading device, ensuring the accurate confirmation of the identities of the trading participants and avoiding the risks of identity fraud or forged transactions. This makes the behaviors of all parties in the trading process more traceable, contributing to the improvement of trading compliance and transparency. A time synchronization server is used to obtain and calibrate the reference time, ensuring the accuracy and consistency of each transaction timestamp. This can effectively prevent errors or tampering of the trading time and ensure that each gold transaction has an accurate time record, further guaranteeing the legality and reliability of the transaction. A high-precision electronic scale is used to measure the gold weight multiple times and outliers are removed to calculate the accurate average value of the gold weight. This measure avoids the influence of single measurement errors on the trading results, ensures the authenticity and reliability of the gold weight data in gold transactions, and improves the trading accuracy. By splicing the identity information of the trading parties, the transaction timestamp, and the average value of the gold weight, the integrity and consistency of the gold transaction data are ensured. This not only helps to generate accurate transaction records but also provides a stable basis for subsequent hash encoding and blockchain storage. After the gold transaction data is hash encoded to generate a transaction verification hash value, the immutability of the data can be effectively guaranteed. Once the data is encoded and uploaded to the blockchain, it cannot be tampered with or forged, ensuring the fairness of the transaction and the permanence of the transaction record. The use of automated RFID data collection, precise time synchronization, and high-precision measurement equipment simplifies the trading process, reduces the chance of human intervention, improves the trading efficiency and automation level, and further accelerates the processing speed of gold transactions.

[0016] Preferably, the analysis of the gold element composition of the gold sample according to the gold material characteristic spectral data in step S2 includes:

[0017] Extract the characteristic peaks in the gold material characteristic spectral data and classify the characteristic peaks to obtain the characteristic peaks of gold elements and the characteristic peaks of impurities;

[0018] Identify the wavelength and intensity of the characteristic peaks of gold elements to calculate the gold purity;

[0019] Analyze the impurity element concentration of the gold material characteristic spectral data according to the characteristic peaks of impurities to generate impurity concentration data;

[0020] Calculate the gold element composition of the gold purity through the impurity concentration data to obtain the gold element composition data;

[0021] Perform feature fusion on the gold material characteristic spectral data and the gold element composition data to construct a gold digital fingerprint.

[0022] By extracting the characteristic peaks in the characteristic spectral data of the gold material and classifying them, the present invention can accurately identify the characteristic peaks of gold elements and the characteristic peaks of impurities. By identifying the wavelength and intensity of the characteristic peaks of gold elements, the gold purity is calculated. This makes the determination of gold purity more accurate and reliable, avoiding the errors brought by traditional measurement methods. By analyzing the characteristic peaks of impurities and calculating the concentration of impurity elements, a detailed component analysis of the quality of the gold sample is provided. Identifying the impurity concentration helps to accurately evaluate the quality and authenticity of gold, preventing impure gold from entering the market. According to the impurity concentration data, further elemental composition calculations are performed on the gold purity to obtain the gold elemental composition data. This process precisely reveals the composition of the gold sample, helps to conduct a more detailed quality assessment, and prevents excessive impurities or other harmful elements from existing in the gold sample. Through the characteristic fusion of the characteristic spectral data of the gold material and the gold elemental composition data, a unique digital fingerprint of gold can be constructed. Each gold sample has a unique digital fingerprint, which provides a reliable basis for the traceability, verification, and anti-counterfeiting of gold. The generation of the gold digital fingerprint helps to enhance the traceability of gold, enabling each gold product to have a clear record of its source and composition, effectively avoiding the bad behaviors of counterfeiting gold and doping substances, and improving the transparency and trust of the gold market.

[0023] Preferably, the analysis of the impurity element concentration of the gold material characteristic spectral data according to the impurity characteristic peaks includes:

[0024] When any of the following situations occurs, it is determined that the silver content is abnormal, and the silver impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 328.1 nm or 546.6 nm exceeds 15% of the preset gold reference spectral standard peak value; the silver XRF characteristic peak intensity is higher than 5% of the gold Lα peak; through ICP - OES analysis, the silver element concentration exceeds the normal range of 50 - 500 mg / kg;

[0025] When the following situations occur simultaneously, it is determined that the content exceeds the standard, and the copper impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 324.8 nm or 327.4 nm exceeds 20% of the gold reference spectral standard peak value; the ratio of the copper XRF characteristic peak to the gold Lα peak is higher than 0.08; through ICP - OES analysis, the copper element concentration exceeds 200 mg / kg and continues to be on the high side;

[0026] When the following situations occur simultaneously, it is determined that the platinum content is abnormal, and the platinum impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 214.4 nm or 265.9 nm is higher than 10% of the gold standard peak value; the ratio of the platinum XRF characteristic peak to the gold Lα peak is higher than 0.12; through ICP - OES analysis, the platinum element concentration exceeds 100 mg / kg, and the deposition stability test shows that the deposition rate decreases by more than 10%;

[0027] Integrate the silver impurity concentration data, copper impurity concentration data, and platinum impurity concentration data to obtain impurity concentration data.

[0028] Through the combination of various detection means such as the characteristic peak intensity at different wavelengths, the XRF characteristic peak intensity ratio, and ICP-OES analysis, the present invention can efficiently and accurately identify impurity elements such as silver, copper, and platinum in gold samples. This multi-dimensional detection method significantly improves the accuracy of impurity detection and avoids the situation of omission or misjudgment. The combination of various detection means such as the characteristic peak intensity at different wavelengths, the XRF characteristic peak intensity ratio, and ICP-OES analysis can efficiently and accurately identify impurity elements such as silver, copper, and platinum in gold samples. This multi-dimensional detection method significantly improves the accuracy of impurity detection and avoids the situation of omission or misjudgment. By accurately identifying and analyzing the concentrations of impurities such as silver, copper, and platinum, detailed gold sample purity information can be provided, thereby better evaluating the quality of gold, preventing gold products from being misidentified as high-purity gold, and ensuring the fairness and transparency of the market. This process can effectively control and supervise the impurity content in gold. Especially in high-value gold transactions, accurate impurity concentration data can help identify the true value of gold and avoid the excessive impurities in gold samples from affecting their market circulation value. By obtaining the concentration data of impurity elements such as silver, copper, and platinum and comparing them with the standard spectral data of gold, forged gold or adulterated gold can be identified. This helps enhance the anti-counterfeiting ability of the gold market and ensures that the gold products purchased by consumers are genuine gold that meets the quality standards.

[0029] Preferably, the multi-node consensus verification through the smart contract in step S3 includes:

[0030] Associate the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data, generate a composite data packet and attach a digital signature;

[0031] Call the smart contract in the blockchain to verify the integrity of the composite data packet. If the transaction verification hash value matches and the digital signature is valid, trigger the multi-node consensus mechanism and perform block encapsulation on the composite data packet to obtain a transaction block;

[0032] Conduct node voting on the transaction block through the multi-node consensus mechanism. After more than 2 / 3 of the nodes confirm, use the timestamp server to encrypt the transaction block to obtain an encrypted transaction block;

[0033] Write the encrypted transaction block into the blockchain distributed ledger according to the Merkle tree structure and broadcast it to all participating nodes to update the ledger status, generating a time-stamped encrypted gold transaction block.

[0034] The present invention associates the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data, and attaches a digital signature to ensure the integrity and immutability of the transaction data. After the digital signature is verified, only legitimate transaction data can continue with subsequent processing, avoiding the risk of data tampering or forgery. The introduction of smart contracts automates the entire verification process, avoiding errors and delays caused by manual intervention. When the transaction verification hash value matches and the digital signature is valid, the smart contract triggers a multi-node consensus mechanism, effectively improving the transaction verification efficiency while ensuring the transparency and compliance of the transaction. The multi-node consensus mechanism ensures the distributed verification process of transaction data through the voting verification of multiple nodes, avoiding the risks of single-point failure and centralized control. The confirmation mechanism of more than 2 / 3 of the nodes ensures the wide acceptance of the transaction, increasing the fault tolerance and security of the system. Encrypting the transaction block through a timestamp server ensures that the time record of the transaction is true and immutable. Timestamp encryption not only ensures the timeliness of the transaction but also provides a reliable time basis for subsequent traceability, enhancing the credibility of the transaction. After writing the encrypted transaction block into the blockchain distributed ledger in the Merkle tree structure, the transaction information is immutable and transparent on the blockchain. During the process of each participating node updating the ledger state, all data updates are automatically synchronized, ensuring the authenticity and consistency of all gold transaction data in the blockchain. Through blockchain technology, all gold transaction data and related transaction processes are transparently recorded and immutable. This not only enhances the trust of all parties in the system but also provides a safe, transparent, and fair platform for gold transactions, effectively reducing transaction disputes and fraud.

[0035] Preferably, the encryption of the transaction block by the timestamp server includes:

[0036] Extract the block header information of the transaction block, and perform validity verification processing on the block header information to generate block verification data;

[0037] Perform integrity calculation processing on the block verification data to generate block integrity data;

[0038] Authenticate the time server of the transaction block according to the block integrity data;

[0039] Use the authenticated time server to perform time synchronization processing on the transaction block to generate timing feature data;

[0040] Perform UTC binding on the timing feature data to generate timestamp signature data;

[0041] Perform timestamp encryption and encapsulate the link on the transaction block through the timestamp signature data to obtain the encrypted transaction block.

[0042] The present invention ensures the legality of each transaction block by extracting the block header information of the transaction block and validating its effectiveness. This step can prevent invalid or forged blocks from entering the blockchain system, guaranteeing the accuracy and security of the blockchain. By performing integrity calculation processing on the block verification data, it is ensured that the transaction block will not be tampered with or damaged after a series of processes. Integrity calculation can promptly detect any block content that does not meet the standards, effectively protecting the data structure and content of the transaction block. Authenticating the time server of the transaction block based on the block integrity data ensures that the time server used is verified, avoiding the risk of using an unreliable time source. The authenticated time server provides a trustworthy time basis for subsequent time synchronization and encryption processes. Using the authenticated time server to perform time synchronization processing on the transaction block ensures that the time record of the transaction block is accurate. The time synchronization characteristic data provides an accurate time reference for the transaction block, avoiding transaction record errors caused by time deviation. Binding the time synchronization characteristic data to UTC and generating timestamp signature data can ensure that the timestamp of the transaction block has the property of being tamper-proof. After encrypting and encapsulating and linking the transaction block through the timestamp signature, the time information of the transaction block is permanently bound and not easily modified, which provides a solid time basis for the traceability and recall of gold transactions.

[0043] Preferably, the abnormal transaction behaviors of the real-time monitoring of the gold transaction block in step S4 include:

[0044] When any of the following situations occurs, it is determined that the transaction frequency in the block is abnormal, and frequency abnormal data is obtained: within the same transaction block, the number of transactions is greater than or equal to 100 times, and the time interval between adjacent transactions is less than 2 seconds per time; the number of transactions in the same transaction block deviates from the average number of transactions in the past 30 minutes in this block by more than ±50%; within a single block, the number of transactions initiated by the trader address is greater than or equal to 30 times, and the time interval between adjacent transactions is less than 3 seconds per time;

[0045] When the following situations occur simultaneously, it is determined that the transaction amount in the block is abnormal, and amount abnormal data is obtained: within the same transaction block, the single transaction amount is greater than or equal to 5 times the maximum transaction amount in the past 30 minutes in this block, and the single transaction amount is greater than or equal to 1000 grams of gold; within the same transaction block, the cumulative transaction amount exceeds 20% of all transaction amounts in the past 30 minutes in this block, and the cumulative transaction amount is greater than or equal to 5000 grams of gold; the transaction amount fluctuation of a single wallet address within the same block does not exceed ±1%, and the total transaction amount of this wallet address is greater than or equal to 5000 grams of gold;

[0046] When the following conditions occur simultaneously, it is determined that the transaction mode within the block is abnormal, and abnormal mode data is obtained: within the same transaction block, the transaction amounts and directions between multiple transaction addresses are exactly the same, and this mode appears more than 5 times; the transaction direction of a single wallet address frequently switches more than 10 times, and the transaction amount fluctuation each time is less than or equal to 5%; the transaction modes between the same wallet address and different trading pairs are similar, and this mode repeatedly appears within the block more than 20 times, and the total transaction amount is greater than or equal to 2,000 grams of gold;

[0047] When any of the following situations occurs, it is determined that the transaction chain within the block is abnormal, and abnormal transaction chain data is obtained: the formation time of the transaction chain within the block is too short and the transaction amount fluctuation is less than ±0.5%, and the transaction amounts and directions within this transaction chain are consistent; the transaction chain within the same block completely conforms to the historical transaction behavior pattern outside the block, and the transaction amounts and time intervals are highly consistent, indicating the existence of forged transaction behavior; within the transaction chain within the block, the addresses of both trading parties are consistent with the high-frequency transaction addresses in the historical records, and the transaction frequency exceeds 30 times;

[0048] Integrate the abnormal transaction frequency data, abnormal transaction amount data, abnormal transaction mode data, and abnormal transaction chain data within the block to obtain abnormal transaction behavior data.

[0049] Through real-time monitoring of multiple dimensions such as transaction frequency, amount, mode, and transaction chain, the present invention can timely identify abnormal transaction behaviors. For example, overly frequent transactions, abnormal fluctuations in transaction amounts, and abnormal changes in transaction modes can all be detected by the system in a timely manner, thereby effectively avoiding the occurrence of malicious behaviors. By monitoring the number of transactions within the same block, when the transaction frequency is too high and the time interval is too short, the system can automatically determine it as abnormal, helping to discover abnormal behaviors, fraudulent operations, or other malicious attacks. The acquisition of abnormal frequency data helps to further identify abnormal behaviors related to frequent transactions, improving the security of the system. By detecting abnormal transaction modes, such as similar transaction modes between multiple transaction addresses, multiple transaction behaviors of accounts can be discovered in a timely manner. Frequent fund transfers between addresses or the repeated appearance of similar modes are often signs of malicious behaviors. Through this function, potential fraud behaviors can be effectively prevented. By integrating abnormal data of transaction frequency, amount, mode, and chain, the system can more comprehensively identify potential abnormal transaction behaviors. Comprehensive analysis of multiple factors helps to further improve the accuracy and comprehensiveness of abnormal behavior detection, avoiding missed judgments or misjudgments.

[0050] Preferably, the gold transaction chain link traceability and backtracking based on the abnormal transaction behavior data in step S4 includes:

[0051] Perform a sliding window scan on the blockchain transaction data to generate real-time transaction feature stream data;

[0052] Perform multi-dimensional threshold comparison on real-time transaction feature stream data to generate abnormal feature vector data, where the multi-dimensional threshold comparison includes transaction amount deviation comparison and timestamp anomaly comparison;

[0053] Perform cosine similarity matching between the abnormal feature vector data and a preset digital fingerprint database to generate abnormal anchoring coordinate data;

[0054] Perform spatio-temporal correlation analysis on the abnormal anchoring coordinate data to generate three-dimensional link topology data;

[0055] Reconstruct the evidence chain of the gold trading block according to the three-dimensional link topology data, generate traceability code stream data and visualize it, so as to generate a traceability display report of the gold transaction.

[0056] The present invention scans blockchain transaction data through a sliding window to generate real-time transaction feature stream data, enabling the entire transaction process to be dynamically monitored. Timely discovery and traceability of abnormal transaction behaviors can ensure the integrity and transparency of gold transaction data, providing a clear transaction chain for users and regulatory parties. Adopting a multi-dimensional threshold comparison method (such as transaction amount deviation and timestamp anomaly comparison) can detect transaction features from multiple angles. Deviations in transaction amount and time are common features of abnormal transactions. This method can timely identify potential abnormal transactions and conduct in-depth analysis on them, improving the comprehensiveness of data analysis. By performing cosine similarity matching, comparing abnormal feature vectors with a preset digital fingerprint database, behaviors similar to historical abnormal transaction patterns can be effectively identified. Through this method, abnormal links in the transaction chain can be more accurately located, effectively reducing the situation of missed or misjudged cases. Perform spatio-temporal correlation analysis on the abnormal anchoring coordinate data to construct three-dimensional link topology data, which can accurately restore the spatio-temporal relationship in the transaction and form a clear transaction chain. This three-dimensional link topology data provides a comprehensive and three-dimensional perspective for traceability, facilitating in-depth analysis of each link of the transaction chain. Reconstructing the evidence chain of the gold trading block based on the three-dimensional link topology data can effectively combine transaction data, abnormal behaviors and their time series relationships to generate complete traceability code stream data. This process makes the source and processing process of gold transactions more reliable, providing sufficient evidence support for judicial review or regulatory agencies.

[0057] Preferably, the spatio-temporal correlation analysis of the abnormal anchoring coordinate data includes the following steps:

[0058] Locate the position of the abnormal gold trading block according to the abnormal anchoring coordinate data;

[0059] Extract the transaction information of the abnormal gold trading block based on the position of the abnormal gold trading block;

[0060] Screen the transaction information of the abnormal gold trading block for abnormal information, and perform three-dimensional spatial modeling on the screened abnormal information to generate the three-dimensional spatial distribution of abnormal data points;

[0061] Calculate the distances and directions between abnormal data points and adjacent points in the three-dimensional spatial distribution of abnormal data points to define the topological relationship of abnormal data points;

[0062] Perform link topology construction on the abnormal information through the topological relationship of abnormal data points to generate three-dimensional link topology data.

[0063] Through the positioning of abnormal anchor coordinate data, the present invention can accurately identify the location of the abnormal gold trading block, providing a basis for further analyzing trading behaviors. It can ensure that in a large amount of trading data, the abnormal areas can be quickly screened out, thereby improving the efficiency and accuracy of data processing. Extracting transaction information based on the location of the abnormal gold trading block and screening the transaction information for abnormal information can effectively focus on abnormal data, thereby reducing the interference of redundant data. This process significantly improves the detection sensitivity to abnormal behaviors by excluding normal transactions. Performing three-dimensional spatial modeling on the screened abnormal information and generating the three-dimensional spatial distribution of abnormal data points can visually present the spatial distribution of abnormal transactions. This spatial modeling method provides a clear structure for subsequent spatio-temporal correlation analysis, facilitating the analysis of the spatial distribution characteristics of abnormal behaviors. Calculating the distances and directions between abnormal data points and adjacent points to define the topological relationship between abnormal data points. This process can reveal the correlation between abnormal trading points, help identify potential abnormal patterns, and further enhance the ability to track abnormal behaviors. Performing link topology construction through the topological relationship of abnormal data points to generate three-dimensional link topology data can show the relationship network between abnormal trading behaviors in three-dimensional space. This link topology data provides a clear structural framework for traceability analysis, helping to identify abnormal links in the trading chain as a whole.

[0064] In this specification, a digital traceability system for gold trading is provided, which is used to execute the above-mentioned digital traceability method for gold trading. The digital traceability system for gold trading includes:

[0065] A data acquisition module, which is used to collect gold trading data. The gold trading data includes transaction process information, transaction timestamps, and average gold weights, and perform hash encoding on the gold trading data to generate transaction verification hash values;

[0066] A composition identification module, which is used to obtain gold material characteristic spectral data; analyze the gold element composition of the gold sample according to the gold material characteristic spectral data, and construct a gold digital fingerprint in combination with the gold material characteristic spectral data;

[0067] A transaction verification module, which is used to upload the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold transaction block encrypted with a timestamp;

[0068] A transaction traceability module, which is used to monitor the abnormal transaction behavior data of the gold transaction block in real time, trace back the gold transaction chain link based on the abnormal transaction behavior data, and generate a traceability display report of the gold transaction.

[0069] The beneficial effects of the present invention are as follows: The data collection module generates a transaction verification hash value through real-time collection and hash coding of gold transaction data, ensuring the integrity and authenticity of the gold transaction data. Once the data is collected and hash-coded, any tampering will affect the hash value, making non-compliant transactions obvious at a glance. The component identification module analyzes the gold elemental composition of the gold sample by obtaining the gold material characteristic spectrum data and constructs a gold digital fingerprint. This not only ensures the accurate identification of the gold material and composition but also provides a unique identifier for each batch of gold samples through the digital fingerprint, effectively preventing fake and shoddy products from entering the market. The transaction verification module uploads the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data to the blockchain, and uses a smart contract and a multi-node consensus mechanism to verify the legality of the transaction. Through timestamp encryption, it ensures that the transaction data cannot be tampered with, enhancing the anti-counterfeiting property and transparency of the transaction. The transaction traceability module can monitor the abnormal transaction behavior data of the gold transaction block in real time, discover abnormalities by analyzing the transaction behavior characteristics, and perform chain link traceability backtracking. Through in-depth analysis and generation of a traceability display report, it can accurately identify abnormal links in the transaction chain, timely discover potential malicious transactions, and ensure the healthy operation of the market. Through the combination of the data collection, component identification, verification, and traceability modules, it can not only provide a clear traceable record for each gold transaction but also improve the transparency of the gold market, enabling every link in the transaction process to be effectively monitored and verified, preventing the occurrence of non-compliant transaction behaviors. Therefore, the present invention improves the transparency and security in gold transaction traceability by combining blockchain, smart contracts, and gold material characteristic spectrum data. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a schematic diagram of the step flow of a digital traceability method for gold transactions;

[0071] Figure 2 It is Figure 1 a detailed implementation step flow schematic diagram of step S1 in

[0072] The realization, functional characteristics, and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0073] The technical method of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those skilled in the art within the scope of the present invention without creative work belong to the scope of protection of the present invention.

[0074] In addition, the accompanying drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.

[0075] It should be understood that although terms such as "first" and "second" may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit can be called the second unit, and similarly the second unit can be called the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed associated items.

[0076] To achieve the above object, please refer to Figures 1 to 2 , a digital traceability method for gold trading, the method comprising the following steps:

[0077] Step S1: Collect gold trading data, where the gold trading data includes trading process information, trading timestamps, and the average gold weight, and perform hash encoding on the gold trading data to generate a trading verification hash value;

[0078] Step S2: Obtain the gold material characteristic spectral data; analyze the gold element composition of the gold sample based on the gold material characteristic spectral data, and construct a gold digital fingerprint in combination with the gold material characteristic spectral data;

[0079] Step S3: Upload the trading verification hash value, the gold digital fingerprint code, and the element composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold trading block encrypted with a timestamp;

[0080] Step S4: Real-time monitor the abnormal trading behavior data of the gold trading block, and perform traceability backtracking on the gold trading chain link based on the abnormal trading behavior data to generate a traceability display report of the gold trading.

[0081] The present invention ensures the integrity and immutability of transaction data by hashing the gold transaction data (such as transaction process information, timestamp, gold weight, etc.), avoiding the risks of human intervention and data tampering. The blockchain technology is used to upload the transaction verification hash value, digital fingerprint of gold and elemental composition data to the blockchain, and combined with smart contracts for multi-node consensus verification, greatly enhancing the security of gold transactions and ensuring that the transaction data is verified and credible. Through the analysis of the spectral data of the gold material characteristics, not only can the composition of the gold be confirmed, but also the digital fingerprint of the gold can be constructed, providing a more accurate and unique way to identify the gold sample, thus avoiding the risks of counterfeits or illegal transactions. During the transaction process, the abnormal behaviors of the transaction blocks are monitored in real time, and the traceability analysis of the gold transaction chain is carried out based on these abnormal data, which can quickly identify and process potential fraud or non-compliance behaviors, ensuring the fairness and legality of the transaction. Combining the decentralized characteristics of the blockchain and the automated execution of smart contracts can greatly enhance the user's trust in gold transactions, because the entire transaction process is public, transparent and verified by multiple parties. Therefore, the present invention improves the transparency and security in the traceability of gold transactions by combining the blockchain, smart contracts and the spectral data of gold material characteristics.

[0082] In an embodiment of the present invention, refer to Figure 1 As shown, it is a schematic diagram of the step flow of a digital traceability method for gold transactions according to the present invention. In this example, the digital traceability method for gold transactions includes the following steps:

[0083] Step S1: Collect gold transaction data, where the gold transaction data includes transaction process information, transaction timestamp and average gold weight, and perform hash encoding on the gold transaction data to generate a transaction verification hash value;

[0084] In the embodiments of the present invention, by connecting to the interface of the gold trading system, detailed process information of each gold transaction is obtained. This includes but is not limited to the initiator of the transaction, the recipient of the transaction, the transaction type (buy, sell, etc.), the transaction status (success, failure, etc.), and other relevant transaction steps. These process information can clearly reflect the execution path of the transaction. Each transaction will be automatically recorded with a transaction timestamp by the system when it occurs. The timestamp is accurate to milliseconds, ensuring that the time of each transaction can be uniquely identified, providing a chronological basis for subsequent data analysis and verification. Based on the single transaction volume of gold recorded in the trading system, the average gold weight of each transaction is calculated. For the above collected transaction data (including transaction process information, transaction timestamp, and average gold weight), the system will use a reliable hashing algorithm (such as SHA-256) to perform hashing encoding on it. This process converts the transaction data into a fixed-length string (hash value), and even a slight change in the data will result in a significant change in the hash value. During the hashing encoding process, each piece of data is independently encoded and then integrated to form a comprehensive hash value. After integrating all the hashed transaction data, a final transaction verification hash value is generated.

[0085] Step S2: Obtain the spectral data of the gold material characteristics; analyze the gold element composition of the gold sample based on the spectral data of the gold material characteristics, and construct a gold digital fingerprint in combination with the spectral data of the gold material characteristics;

[0086] In the embodiments of the present invention, a suitable spectroscopic instrument is selected to analyze the gold sample. Commonly used instruments include: Fourier Transform Infrared Spectrometer (FTIR), X-ray Fluorescence Spectrometer (XRF), and Visible and Near-Infrared Spectrometer (VIS / NIR). The gold sample is placed in the measurement area of the spectroscopic analyzer. Ensure that the sample surface is clean and free of any contamination. After the spectroscopic instrument is started, light irradiation in different wavelength ranges is automatically performed, and the light intensity reflected, absorbed, or transmitted by the gold sample is recorded. During the measurement process, multiple data points need to be obtained, covering a wavelength range from visible light to near-infrared or a wider range (e.g., 400nm - 2500nm). This process ensures that the reaction data of the gold material at different wavelengths can be obtained. The specific wavelengths of the X-ray fluorescence spectrometer are used to identify the gold element (Au) and other alloy elements (such as silver Ag, copper Cu, lead Pb, etc.). When the sample is excited by X-rays, the sample emits specific fluorescent X-rays, and each element has a specific fluorescent spectral line. By analyzing these spectral lines, the content of each element in the gold sample can be determined. The gold element (Au) will exhibit significant characteristic peaks in the X-ray spectrum, such as the Kα and Kβ ray peaks of metallic Au. According to the known standard sample, by comparing the peak intensity with the standard curve, the content of gold is accurately calculated (for example, the concentration of Au is 99%). The analysis of alloy elements is also based on their characteristic spectral lines, and their specific composition ratios are determined by comparing the peak intensities. From the obtained spectral data, the characteristic spectral peaks of gold are extracted, including the absorption peaks, reflection peaks, and fluorescent spectral lines of metallic Au, etc. Special attention is paid to the absorption peaks in the infrared region and the visible light region, and these peaks are closely related to the chemical composition and structure of gold. Combining the elemental composition of the gold sample (such as Au, Ag, Cu, etc.), the spectral characteristics of different elements are incorporated into the data model to form a feature vector containing chemical composition, physical properties, and spectral characteristics. Using multi-dimensional data analysis methods, the spectral data of each gold sample is combined with the elemental composition to generate a "gold digital fingerprint". This digital fingerprint usually consists of several features, including the percentage of elemental content, the position and intensity of absorption peaks at different wavelengths, the shape of the spectral curve, etc. These features provide a unique identity for the gold sample. For example, in X-ray fluorescence analysis, the Au peak intensity of gold, the elemental ratio (such as the ratio of Au:Ag), etc. can all be part of the fingerprint. These digital fingerprints have extremely high uniqueness and can effectively distinguish different gold samples. The gold digital fingerprint can be used to verify the authenticity of the gold sample and prevent forgery or adulteration. By comparing the digital fingerprint of the known gold sample with that of the sample to be detected, it can be determined whether they are of the same batch or meet specific standards.

[0087] Step S3: Upload the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold transaction block encrypted with a timestamp;

[0088] In the embodiments of the present invention, the gold trading verification hash value obtained from step S1, the gold digital fingerprint code generated in step S2, and the elemental composition data need to be integrated. The integrated data includes: the trading verification hash value, the gold digital fingerprint code, and the elemental composition data. The above three types of data (trading verification hash value, gold digital fingerprint code, elemental composition data) are packaged into a data packet in a specific format (such as JSON or Protobuf format) to form a trading data packet. The data packet is uploaded through the smart contract interface of the blockchain. Here, a public blockchain platform (such as Ethereum, Hyperledger, etc.) or a private chain (such as an enterprise internal blockchain network) can be used for operation. The process of data upload includes: calling the storage function of the smart contract to submit the data packet to the blockchain. When storing on the blockchain, the data packet will be encrypted and has the property of immutability, ensuring the security and transparency of the data. Deploy a smart contract, and the core function of this contract is to accept the data packet and process it. The logic of the smart contract includes the following aspects: The smart contract will check the data format, content, and legality according to predefined rules. For example, verify whether the trading hash value is correct, whether the gold digital fingerprint conforms to the predefined format, and whether the elemental composition data is reasonable. The smart contract embeds a consensus mechanism (such as PoW, PoS, or BFT, etc.) to ensure that the uploaded transaction data reaches an agreement among multiple nodes. The process of consensus verification is: Multiple nodes will verify the trading data packet to ensure that all the information in the data packet is valid and not tampered with. The consensus protocol of the blockchain network (such as PoW, PoS of Ethereum, or PBFT of Hyperledger) is used to confirm the data by multiple nodes, ensuring that each uploaded data packet is verified by multiple nodes. Once the trading data packet is uploaded to the blockchain network, the smart contract will perform consensus verification by calling the verification algorithms of different nodes. Each node will independently verify the trading hash value, gold digital fingerprint, elemental composition, etc. in the data packet. The verification results among the nodes will be merged through the consensus mechanism. If most nodes unanimously agree on the validity of the data packet (for example, reaching a preset consensus threshold), then the data packet is considered valid and is confirmed through the smart contract. Once the data packet passes the consensus verification of the smart contract, the smart contract will automatically generate a timestamp for this transaction. The role of the timestamp is to identify the specific time when the transaction occurs and provide an immutable time basis for the transaction. The timestamp is usually stored in the block height (block number) of each block on the blockchain and the timestamp field generated by the block. The timestamp and the transaction data will be encrypted to ensure the privacy and security of the data in the blockchain. Encryption usually uses a public-private key encryption pair (such as RSA, ECDSA, etc.) to ensure that only users holding the private key can decrypt or operate.After the transaction is confirmed to pass consensus verification, the smart contract stores the transaction data (including verification hash value, gold fingerprint, elemental composition, and timestamp) into a new block. This new block will become a new block in the blockchain linked list. The block contains a unique block hash value, which is an encrypted value based on the block content (including transaction data, timestamp, and the hash of the previous block).

[0089] Step S4: Real-time monitor the abnormal transaction behavior data of the gold trading block, conduct traceability backtracking of the gold trading chain link based on the abnormal transaction behavior data, and generate a traceability display report of the gold trading.

[0090] In the embodiments of the present invention, abnormal transaction behaviors are defined. For example: initiating a large number of gold transactions from the same account multiple times within a short period, the digital fingerprint or elemental composition data of the gold transaction does not match the historical data, indicating that the gold sample has been tampered with, the transaction amount or quantity is abnormal, far exceeding the normal transaction standard. All gold transaction block data stored in the blockchain network is utilized to monitor transaction activities in real time. The transaction data in each block includes: transaction hash value, gold digital fingerprint code, elemental composition data, as well as timestamp and transaction frequency. Once the monitoring system detects an abnormal transaction behavior, the system will automatically trigger an alarm mechanism. The alarm information can be sent to the administrator or relevant personnel through notifications for manual inspection. For example, if the frequency of a certain transaction is too high, the system will automatically mark this transaction as an "abnormal frequency transaction" and send an alarm. Once an abnormal transaction is discovered, the system will conduct a chain link traceback based on this abnormal transaction, tracking the data source and its influence scope of this abnormal transaction. Trace all relevant transaction records before this transaction occurred. By tracking the transfer path of the gold sample related to the current transaction, find the source of the abnormal transaction. Trace all relevant transaction records after this transaction occurred, and analyze whether this transaction has affected the transactions of other gold samples. By analyzing the subsequent transaction data, determine whether this transaction has triggered other abnormal behaviors. To achieve real-time monitoring, threshold standards and rules need to be set (such as maximum transaction quantity, maximum transaction frequency, sample feature mismatch threshold, etc.). Based on these standards, it can be determined whether a transaction is abnormal. During the traceback process, the system needs to gradually trace back the transaction chain through the transaction hash value. Each gold transaction block contains the hash value of the previous block (i.e., the parent block hash value), and through this information, the previous transaction can be traced. The system combines these transaction block data with the digital fingerprint code and elemental composition data of the gold to determine whether each transaction involves the same gold sample or similar gold samples. Through the traceback mechanism, the system can generate the transfer path of each gold transaction and track the occurrence process of abnormal transactions. Based on smart contracts or automated rules deployed on the blockchain, the system can automatically identify the root cause of abnormal transactions. If it is found that the digital fingerprint of a certain gold sample does not match the historical record, or there are abnormal deviations in the elemental composition data, the system will automatically trace back to the previous transaction link of this sample to find out whether there are signs of tampering or forgery in the transaction chain. During the traceback process, the system will record all relevant gold transaction data, including transaction time, transaction amount, gold elemental composition, digital fingerprint and other information. All abnormal transaction behaviors will be detailedly recorded to form a complete transaction tracking chain. The information of each link will be marked as "normal" or "abnormal", and the specific reasons for the abnormality will be listed in detail. The system will automatically generate a traceback display report of gold transactions based on the traceback data.

[0091] As an example of the present invention, refer to Figure 2As shown, in this example, step S1 includes:

[0092] Step S11: Collect the identity information of the transaction parties and record the unique identification code of the transaction device to obtain transaction process information;

[0093] Step S12: Obtain the reference time using the time synchronization server, and perform network protocol clock calibration on the reference time to obtain a transaction timestamp;

[0094] Step S13: Measure the gold weight data using a high-precision electronic scale, repeat the measurement 3-5 times, and remove outliers to calculate the average value of the gold weight data;

[0095] Step S14: Concatenate the transaction party identity information, transaction timestamp, and average gold weight into gold transaction data; perform hash coding on the gold transaction data to generate a transaction verification hash value.

[0096] In an embodiment of the present invention, by installing RFID readers at key positions in the trading venue, such as the gold trading desk, it is ensured that the RFID readers have sufficient reading range and efficient identification capabilities. The trading party carries an identity verification device with an RFID tag, such as an ID card or a smart card. When the trading party enters the trading area, the RFID reader automatically scans and collects the identity information of the trading party. The device records the identity information of the trading party and the unique identification code of the device (such as the RFID tag number) to ensure that each transaction can be traced back to a specific trading party. The collected identity information of the trading party and the device identification code are sent to the trading management system through a secure transmission channel to form preliminary trading process information. By configuring a time synchronization server (such as an NTP server), accurate reference time is obtained from a reliable time source regularly. According to network protocols (such as NTP or PTP), the obtained reference time is calibrated to ensure that the timestamps used in the trading process are consistent with the standard time, avoiding confusion in trading records caused by time deviation. The calibrated reference time is used as the trading timestamp and recorded together with the trading process information to ensure that the time of each transaction can be accurately traced. A high-precision electronic scale is selected to ensure that it can accurately measure the weight of gold and avoid measurement errors. The gold in each transaction is measured multiple times (3 to 5 times), and the data is recorded after each measurement. To exclude the influence of accidental external factors, outlier values can be removed through statistical methods, such as using methods like Z-score or box plot for data processing. The multiple measured weight data is calculated, and after removing the outlier values, the final average weight of the gold is obtained and recorded in the trading data. The identity information of the trading party collected in step S11, the trading timestamp generated in step S12, and the average weight of the gold calculated in step S13 are concatenated to form a complete gold trading data record. This data record will contain all important information of the transaction. A strong hashing algorithm (such as SHA-256 or SHA-3) is used to perform hash encoding on the concatenated gold trading data to generate a unique transaction verification hash value. This hash value is the digital fingerprint of the gold trading data, ensuring the integrity and immutability of the trading data. The generated transaction verification hash value is stored in the trading system together with the trading data. Through the hash value, the authenticity and integrity of the trading data can be verified at any time to prevent tampering or forgery.

[0097] Preferably, the analysis of the gold element composition of the gold sample according to the spectral data of the gold material characteristics in step S2 includes:

[0098] Extracting the characteristic peaks in the spectral data of the gold material characteristics and classifying the characteristic peaks to obtain the characteristic peaks of gold elements and the characteristic peaks of impurities;

[0099] Identifying the wavelength and intensity of the characteristic peaks of gold elements to calculate the gold purity;

[0100] Analyze the impurity element concentration of the characteristic spectral data of the gold material based on the impurity characteristic peaks to generate impurity concentration data;

[0101] Calculate the gold element composition of the gold purity through the impurity concentration data to obtain the gold element composition data;

[0102] Perform feature fusion on the characteristic spectral data of the gold material and the gold element composition data to construct a gold digital fingerprint.

[0103] In the embodiments of the present invention, spectral analysis is performed on a gold sample using a high-precision spectrometer (such as a Fourier transform infrared spectrometer, an X-ray fluorescence spectrometer, or other applicable instruments). This device can accurately measure the spectral data of the sample, including spectral characteristics such as absorption, reflection, and transmission. A peak detection algorithm (such as Gaussian peak fitting method, derivative-based peak detection method, etc.) is used to extract characteristic peaks from the spectral data. The characteristic peaks reflect the spectral responses of different elements in the gold sample. Each characteristic peak corresponds to a specific element or compound. The extracted characteristic peaks are classified according to wavelength and intensity. The characteristic peaks of gold element are usually located within a specific wavelength range (for example, the characteristic peak of gold element in X-ray fluorescence spectrum is about 68.88 keV). The characteristic peaks of impurity elements overlap with those of gold element or are located in other wavelength ranges. By the wavelength, intensity, and their variation rules of the characteristic peaks, the characteristic peaks of gold element and impurity characteristic peaks are classified and distinguished. The characteristic peaks of gold element represent purity, while the impurity characteristic peaks represent other elements or impurities in the sample. According to the wavelength of the characteristic peaks of gold element in the spectral data (such as in X-ray spectrum or ultraviolet-visible spectrum), the characteristic absorption wavelength of gold element is identified. The intensity of the characteristic peaks of gold element is analyzed, and the intensity is proportional to the content of gold. Using the known concentration data of standard gold element samples, an intensity-concentration model of gold element is constructed to estimate the content of gold element in the sample. By comparing the intensity of the characteristic peaks of gold element with the standard data, the purity of gold is calculated (usually expressed as weight percentage). For example, gold purity = (intensity of gold element peak / total intensity) * 100%. The impurity components are identified according to the characteristic peaks of impurity elements in the spectral data (such as the characteristic absorption wavelengths of metal elements such as copper, silver, lead, etc.). Using the relationship between the characteristic peak intensity and concentration of known impurity elements, quantitative analysis methods (such as based on standard curve method, colorimetry, or external standard method, etc.) are used to analyze the impurity concentration. By comparing with standard impurity samples, the concentration of impurity elements in the gold sample is estimated. For each impurity element, its concentration is calculated separately and impurity concentration data (expressed in ppm or percentage) is generated, and the concentration value of each impurity element is recorded. By removing the influence of impurity concentration, the purity of the gold sample is recalculated. The gold element composition data includes the actual purity of gold and the concentration of each impurity element. Based on the impurity concentration data, the gold purity is corrected according to the concentration of impurity elements. If the impurity concentration in the sample is high, the influence of impurity elements on the characteristic peaks of gold element can be further analyzed, and a correction algorithm (such as least squares method or multiple linear regression analysis) is used for correction. The element composition data of each gold sample is recorded, including gold purity and impurity element concentration. This data can be used to verify the quality of the gold sample and the standards it meets. The spectral data of the gold material (including the characteristic peaks of gold element and impurity characteristic peaks) is fused with the gold element composition data (including purity and impurity concentration). Feature selection or dimensionality reduction techniques (such as principal component analysis PCA or t-SNE) can be used to optimize and reduce the dimensionality of these data.Combine the spectral data and elemental composition data of the gold samples to generate a digital fingerprint for each gold sample. The digital fingerprint should be unique and used to identify and verify the authenticity of the gold samples.

[0104] Preferably, the analysis of the impurity element concentration in the characteristic spectral data of the gold material according to the impurity characteristic peaks includes:

[0105] When any of the following situations occurs, it is determined that the silver content is abnormal and the silver impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 328.1 nm or 546.6 nm exceeds 15% of the preset gold reference spectral standard peak value; the silver XRF characteristic peak intensity is higher than 5% of the gold Lα peak; through ICP - OES analysis, the silver element concentration exceeds the normal range of 50 - 500 mg / kg;

[0106] When the following situations occur simultaneously, it is determined that the content exceeds the standard and the copper impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 324.8 nm or 327.4 nm exceeds 20% of the gold reference spectral standard peak value; the ratio of the copper XRF characteristic peak to the gold Lα peak is higher than 0.08; through ICP - OES analysis, the copper element concentration exceeds 200 mg / kg and continues to be on the high side;

[0107] When the following situations occur simultaneously, it is determined that the platinum content is abnormal and the platinum impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 214.4 nm or 265.9 nm is higher than 10% of the gold standard peak value; the ratio of the platinum XRF characteristic peak to the gold Lα peak is higher than 0.12; through ICP - OES analysis, the platinum element concentration exceeds 100 mg / kg, and the deposition stability test shows that the deposition rate decreases by more than 10%;

[0108] Integrate the silver impurity concentration data, copper impurity concentration data, and platinum impurity concentration data to obtain the impurity concentration data.

[0109] Preferably, the multi - node consensus verification through the smart contract in step S3 includes:

[0110] Associate the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data to generate a composite data packet and attach a digital signature;

[0111] Call the smart contract in the blockchain to verify the integrity of the composite data packet. If the transaction verification hash value matches and the digital signature is valid, trigger the multi - node consensus mechanism and perform block encapsulation on the composite data packet to obtain a transaction block;

[0112] Conduct node voting on the transaction block through the multi - node consensus mechanism. After more than 2 / 3 of the nodes confirm, use the timestamp server to encrypt the transaction block to obtain an encrypted transaction block;

[0113] Write the encrypted transaction block into the blockchain distributed ledger in the Merkle tree structure and broadcast it to all participating nodes to update the ledger status, generating a timestamp-encrypted gold transaction block.

[0114] In the embodiments of the present invention, the following data are associated to form a composite data packet: the transaction verification hash value, the gold digital fingerprint code, and the elemental composition data. Use the private key of the trading party to digitally sign the composite data packet to ensure the integrity and immutability of the data packet. The digital signature can be generated by standard encryption algorithms (such as RSA or ECC). At this time, the composite data packet contains the key information of the transaction, the digital fingerprint, the elemental composition data, and the signature information, providing data support for subsequent consensus verification. Deploy a smart contract on the blockchain platform. The smart contract is program code used to automatically execute and verify transactions, ensuring that each transaction node follows the predetermined rules. The smart contract verifies whether the transaction verification hash value in the composite data packet matches the hash value in the blockchain record by calling the data verification function in the blockchain. If they match, it proves that the transaction data has not been tampered with. The smart contract uses the public key to verify the digital signature in the composite data packet to ensure that the signature comes from a legitimate trading party and the data has not been tampered with. Once the hash value and digital signature of the composite data packet pass the verification, the smart contract triggers the multi-node consensus mechanism on the blockchain. This mechanism will start the block encapsulation process, that is, pack the verified data into a transaction block. Each participating node votes on the transaction block to be processed according to a predetermined consensus algorithm (such as PoW, PoS, PBFT, etc.). Each node verifies the validity and legality of the composite data packet. After the voting results are collected, if more than 2 / 3 of the nodes confirm that the transaction block is valid, proceed to the next step. Once the transaction block is confirmed by multiple nodes, call the timestamp server in the blockchain to obtain the current accurate timestamp. Encrypt the transaction block with the timestamp. The timestamp encryption ensures the immutability of the transaction block in the blockchain and can also ensure the time sequence of the transaction block. The transaction block after timestamp encryption is the encrypted transaction block. This encrypted transaction block contains the complete transaction information, digital signature, timestamp, and verified data.

[0115] Preferably, the encryption of the transaction block using the timestamp server includes:

[0116] Extract the block header information of the transaction block and perform validity verification processing on the block header information to generate block verification data;

[0117] Perform integrity calculation processing on the block verification data to generate block integrity data;

[0118] Authenticate the time server of the transaction block according to the block integrity data;

[0119] Use the authenticated time server to perform time synchronization processing on the transaction block to generate timing feature data;

[0120] Perform UTC binding on the timing feature data to generate timestamp signature data;

[0121] Perform timestamp encryption on the transaction block through the timestamp signature data and encapsulate the link to obtain an encrypted transaction block.

[0122] In the embodiments of the present invention, by extracting the block header information of a transaction block, where the block header of the transaction block includes: the hash value of the previous block, the Merkle root, the hash value of transaction data, the block creation time, and node information. Check whether the hash value of the previous block stored in the block header matches the previous block in the blockchain to ensure the continuity of the blockchain. Calculate the Merkle root of the block transaction data and check whether it is consistent with the Merkle root in the block header to ensure the integrity of the transaction data. Check whether the block creation time conforms to the expected timestamp range to prevent clock deviation or tampering. Through the above verification process, extract the validity verification result to form block verification data for subsequent integrity calculation. Calculate the hash value of the block verification data using a standard hash algorithm (such as SHA-256) to obtain block integrity data. This hash value will be used to detect data tampering and ensure the integrity of the transaction block. Store the block integrity data in a secure storage area to ensure consistency verification during the timestamp encryption process. The transaction block must be timestamp authenticated through a trusted time server. Adopt a time authentication mechanism based on PKI (Public Key Infrastructure) to ensure the credibility of the time server. The transaction node sends an authentication request to multiple time servers, including the block integrity data and node identity information. The time server returns the digital signature authentication data and verifies the validity of the block integrity data. If the time server authentication passes, it returns an authentication token indicating that this time server can be used for the timestamp encryption of the current transaction block. Record the selected time server information to ensure the traceability of the source of the timestamp signature data of the transaction block. Use NTP (Network Time Protocol) or PTP (Precision Time Protocol) to synchronize time with the time server to obtain a standard timestamp. Through cross-verification of multiple time servers, eliminate abnormal timestamp data to improve the timing accuracy. Record the following time synchronization related data: time server ID, timing accuracy, synchronization error, final confirmation timestamp. These data will constitute the timing characteristic data to ensure the accuracy of time synchronization of the transaction block. Adopt the international standard UTC time to convert the timing characteristic data into the UTC time format to ensure a globally applicable time standard. Use the private key of the time server to digitally sign the timing characteristic data to generate timestamp signature data. This signature ensures that the time record of the transaction block cannot be tampered with and can be verified in the blockchain network. Encrypt the data of the transaction block using symmetric encryption (AES) or asymmetric encryption (RSA / ECC) and append the timestamp signature data. Generate the final timestamp encrypted data packet to ensure the immutability of the transaction block. Through the Merkle tree structure of the blockchain, encapsulate the timestamp encrypted transaction block into a new block. Calculate the hash value of the new block and link it to the previous block to form a continuous structure of the blockchain. Broadcast the encrypted transaction block to all nodes and confirm and store it through a multi-node consensus mechanism. All nodes update the distributed ledger to ensure that the entire blockchain network synchronizes the latest transaction information.

[0123] Preferably, the abnormal transaction behaviors of the real-time monitored gold trading block in step S4 include:

[0124] When any of the following situations occurs, it is determined that the transaction frequency in the block is abnormal, and frequency abnormal data is obtained: within the same transaction block, the number of transactions is greater than or equal to 100 times, and the time interval between adjacent transactions is less than 2 seconds / transaction; the number of transactions in the same transaction block deviates from the average number of transactions in the past 30 minutes in this block by more than ±50%; within a single block, the number of transactions initiated by the trader address is greater than or equal to 30 times, and the time interval between adjacent transactions is less than 3 seconds / transaction;

[0125] When the following situations occur simultaneously, it is determined that the transaction amount in the block is abnormal, and amount abnormal data is obtained: within the same transaction block, the single transaction amount is greater than or equal to 5 times the maximum transaction amount in the past 30 minutes in this block, and the single transaction amount is greater than or equal to 1000 grams of gold; within the same transaction block, the cumulative transaction amount exceeds 20% of all transaction amounts in the past 30 minutes in this block, and the cumulative transaction amount is greater than or equal to 5000 grams of gold; the transaction amount fluctuation of a single wallet address within the same block does not exceed ±1%, and the total transaction amount of this wallet address is greater than or equal to 5000 grams of gold;

[0126] When the following situations occur simultaneously, it is determined that the transaction mode in the block is abnormal, and mode abnormal data is obtained: within the same transaction block, the transaction amounts and directions between multiple transaction addresses are exactly the same, and this mode appears more than 5 times; the transaction direction of a single wallet address frequently switches more than 10 times, and the transaction amount fluctuation each time is less than or equal to 5%; the transaction modes between the same wallet address and different trading pairs are similar, and this mode repeatedly appears in the block more than 20 times, and the total transaction amount is greater than or equal to 2000 grams of gold;

[0127] When any of the following situations occurs, it is determined that the transaction chain in the block is abnormal, and transaction chain abnormal data is obtained: the formation time of the transaction chain in the block is too short and the transaction amount fluctuation is less than ±0.5%, and the transaction amounts and directions within this transaction chain are consistent; the transaction chain within the same block is completely consistent with the historical transaction behavior pattern outside the block, and the transaction amounts and time intervals are highly consistent, indicating the existence of forged transaction behaviors; within the transaction chain in the block, the addresses of both trading parties are consistent with the high-frequency trading addresses in the historical records, and the transaction frequency exceeds 30 times;

[0128] Integrate the transaction frequency abnormal data, transaction amount abnormal data, transaction mode abnormal data, and transaction chain abnormal data in the block, so as to obtain abnormal transaction behavior data.

[0129] Preferably, the gold trading chain traceback based on the abnormal transaction behavior data in step S4 includes:

[0130] Performing a sliding window scan on the blockchain transaction data to generate real-time transaction feature stream data;

[0131] Performing multi-dimensional threshold comparison on the real-time transaction feature stream data to generate abnormal feature vector data, where the multi-dimensional threshold comparison includes transaction amount deviation comparison and timestamp anomaly comparison;

[0132] Performing cosine similarity matching between the abnormal feature vector data and a preset digital fingerprint database to generate abnormal anchoring coordinate data;

[0133] Performing spatio-temporal correlation analysis on the abnormal anchoring coordinate data to generate three-dimensional link topology data;

[0134] Reconstructing the evidence chain of the gold trading block according to the three-dimensional link topology data, generating traceability code stream data and visualizing it, so as to generate a traceability display report of the gold trading.

[0135] In the embodiment of the present invention, by adopting a time window (such as 5 minutes, 10 minutes, etc.) or a transaction volume window (such as the most recent 100 transactions). Ensure that the window size can capture real-time transaction behaviors without affecting the blockchain performance. Extract core features from the blockchain transaction data, including: transaction amount, transaction time, transaction address, transaction hash value, transaction type (buy, sell, transfer, etc.), to form real-time transaction feature stream data as the input for subsequent analysis. Calculate the historical mean of the transaction amount and standard deviation : ; if the Z-score of the transaction amount exceeds a set threshold (such as ±3 ), it is determined as an abnormal transaction. Calculate the transaction frequency. If a large number of transactions are made by the same account in a short period of time, calculate the transaction interval distribution. Use a sliding window autoregressive model (AR) to detect timestamp anomalies: calculate the prediction error: ; set a threshold. If exceeds the threshold, the transaction time is abnormal. Combining the transaction amount deviation and timestamp anomaly comparison to generate an abnormal feature vector: , this vector is used for subsequent pattern matching and abnormal anchoring. Store the patterns of known abnormal transaction behaviors, including: transaction frequency anomaly data, transaction amount anomaly data, transaction pattern anomaly data, transaction chain anomaly data. Each pattern is represented by a multi-dimensional feature vector, such as: ; = transaction pattern (such as rapid large-amount transfer), = historical transaction similarity. Use the cosine similarity formula to calculate the abnormal feature vector and the database sample Similarity: ; Set a matching threshold (e.g., 0.8), and if it is exceeded, it is determined as a similar abnormal pattern. Record the matching results, generate abnormal anchor coordinate data, and mark the location where the abnormal transaction occurred. Use time series clustering (DBSCAN) to identify the time distribution pattern of abnormal transactions. Identify associated transactions within a short period of time and determine whether there is a fund flow chain. Construct a transaction address network and calculate the PageRank weight: if a transaction address is referenced by multiple abnormal transactions, its suspiciousness increases. Use graph topology analysis to construct a transaction ring structure. Combine time, transaction address, and transaction mode to construct a three-dimensional link topology: ; Among them = time dimension, = transaction address network, = transaction mode matching. Use block data + transaction characteristics + time series to reconstruct the evidence chain of fund flow: Trace the fund outflow path to determine the final recipient. Trace the source of funds to determine whether the initial source is legal. Record the transaction chain, generate traceability code stream data, and ensure auditability. Construct a transaction flow graph: Nodes represent transaction addresses, edges represent transaction directions, and colors distinguish the degree of abnormality. Use a time-axis animation to show the process of fund flow evolution over time. Summarize all analysis results and automatically generate a gold transaction traceability report.

[0136] Especially importantly, the reconstruction of the evidence chain for the gold transaction block based on the three-dimensional link topology data includes:

[0137] Perform high-dimensional topological network modeling on the three-dimensional link topology data to generate topological feature manifold data;

[0138] Perform deep graph matching transaction path mapping on the topological feature manifold data to generate a structured transaction path mapping matrix;

[0139] Perform multi-scale link weight calculation and transaction block consistency measure on the structured transaction path mapping matrix to generate transaction block consistency measure data;

[0140] Perform transaction block partition optimization on the transaction block consistency measure data to generate a transaction block topology mapping matrix;

[0141] Perform time-series causal network analysis on the gold transaction block through the transaction block topology mapping matrix to generate a causal network matrix;

[0142] Reconstruct the evidence chain for the transaction block topology mapping matrix according to the causal network matrix to generate traceability code stream data.

[0143] In the embodiments of the present invention, a high-dimensional topological network of a transaction link is constructed based on dimensions such as a transaction account, a transaction amount, and a transaction time. During the topological modeling process, core transaction nodes (such as a fund convergence account) and their associated accounts are identified. The connection strength of the transaction link (such as a transaction amount weight, a transaction frequency, etc.) is calculated. Key transaction paths are extracted, and high-risk transaction chains are screened out. Through a topological manifold mapping method, the multi-dimensional relationships of the transaction chains are mapped into topological feature manifold data that can be analyzed, providing structured data support for subsequent analysis. Through a deep graph matching technology, the fund transfer paths in the transaction chains are compared. The similarity between different transaction paths is calculated, and highly similar transaction patterns (such as circular transactions, split transactions) are identified. A transaction path mapping matrix is constructed based on the matching results, where: the rows represent transaction accounts or transaction nodes, the columns represent fund transfer paths, and the weight values of the matrix represent the intensity or matching degree of the transactions. This matrix can be used for further analyzing the structure of the transaction paths and abnormal behaviors. Different weights are assigned to different transaction link rings according to indicators such as the transaction amount, the number of transactions, and the transaction frequency. The overall importance of the transaction chains is calculated, and high-risk transaction link rings are identified. By comparing the similarities of the transactions within a transaction block, the consistency between blocks is calculated. The consistency measure can be used to determine whether a transaction block contains abnormal transactions or whether there are associated transaction patterns. According to the consistency measure data of the transaction blocks, the transaction blocks are classified and partitioned. The partitioning strategy is optimized to ensure that similar transaction patterns are classified into the same block for subsequent analysis. According to the optimized transaction partitioning, a topological mapping matrix is established. This matrix can reflect the correlation between different transaction blocks and provide data support for causal network analysis. The transaction data is arranged in chronological order, and the time pattern of the fund flow direction is analyzed. It is identified whether the funds are abnormally transferred in a short period of time, such as a large amount of funds being instantaneously transferred or circular transactions among multiple accounts. A causal network is constructed based on the transaction time, the fund flow direction, and the correlation between transaction accounts. Key transaction nodes are identified, and potential illegal transaction networks are discovered. The evidence chain consists of multiple transaction blocks, and each block contains information such as transaction details, a timestamp, and a fund flow direction. The tracing path of the transaction is clearly visible and can be used for judicial evidence collection and financial supervision. According to the causal network matrix, all relevant transaction blocks are integrated to form a complete transaction evidence chain. The evidence chain can intuitively display the fund flow direction and the structure of the transaction network, providing a strong basis for financial compliance.

[0144] Particularly importantly, the evidence chain reconstruction of the transaction block topological mapping matrix according to the causal network matrix includes:

[0145] Performing a temporal causal analysis on the causal network matrix to identify the causal relationships between transaction data and generating causal relationship data;

[0146] Extract the spatial and temporal features of causal relationship data through graph neural network technology, and perform spatio-temporal feature embedding to generate transaction path embedding data;

[0147] Calculate the topological invariants of the transaction path embedding data to generate topological integrity evaluation data;

[0148] Construct a multi-level evidence chain for the transaction path embedding data based on the topological integrity evaluation data, and hierarchically divide the multi-level evidence chain using hierarchical graph structure learning to generate globally consistent evidence chain data;

[0149] Perform source code stream generation processing on the globally consistent evidence chain data to generate source code stream data.

[0150] In the embodiments of the present invention, by collecting information of all transaction blocks and constructing a causal network matrix based on the transaction data of the blockchain. Each element of the causal network matrix represents the causal relationship between different transaction blocks, and the time series and dependency relationship between each transaction event are analyzed using the temporal causal analysis method in graph theory. Time series analysis techniques (such as Granger causality analysis or Bayesian networks) are used to identify the causal relationships between transaction blocks. The time-dependent model in the graph neural network (GNN) is used to capture the temporal dependencies in the transaction data, thereby establishing causal connections between transaction blocks. Causal relationship data is generated, where each causal relationship represents the influence or dependency of a certain transaction block on another block. Based on the generated causal relationship data, the spatio-temporal features are extracted using the graph neural network (GNN). The core of this step is to model the transaction data as a graph structure, where each node represents a transaction block and each edge represents the causal relationship between transaction blocks. Through graph convolution operations, the spatial (structural) and temporal (event) features of each transaction path are extracted and embedded into a low-dimensional space. The graph neural network (Graph Neural Network, GNN), especially the spatio-temporal GNN model, is used to capture the temporal features of transactions in the time dimension and identify the topological structure of transaction blocks in the spatial dimension. The temporal-spatial embedding technology is used to map the transaction blocks and causal relationships to a unified embedding space to ensure that the spatial structure and time information of transactions can be represented simultaneously. Transaction path embedding data is generated, representing the embedding positions of transaction blocks in the spatio-temporal domain, which is convenient for subsequent topological invariant calculation and evidence chain construction. By calculating the topological invariants of the transaction path embedding data, the coherence and stability of the transaction path in the graph space are evaluated. Topological invariants refer to the graphical features that do not change with transformation or perturbation, such as node degree, shortest path, etc. Through these invariants, we can judge the stability and integrity of the transaction path, whether there are data missing or abnormal chains. Graph topology analysis techniques (such as invariant features in spectral theory) are used, such as calculating indicators such as the diameter, loop length, and connectivity of the graph. The shortest path algorithm, graph connectivity analysis, and topological feature calculation are used to evaluate the stability and connectivity of each transaction path. Topological integrity evaluation data is generated, representing the stability and reliability of each transaction path. According to the topological integrity evaluation data, the transaction path embedding data is constructed into a multi-level evidence chain. The embedding data of each transaction path in the graph will be used as part of the evidence chain, and the evidence chain is hierarchically divided through the hierarchical graph structure learning method to enhance the hierarchical structure and information flow of the data. The hierarchical graph structure learning method is used to perform hierarchical analysis on the topological integrity data, and the evidence chain is gradually constructed from low level to high level.Apply graph convolutional network (GCN) and graph attention network (GAT) to extract evidence chain information at different levels, and merge each evidence link into a globally consistent evidence chain through graph embedding. Generate globally consistent evidence chain data, which represents all transaction paths organized into a coherent evidence chain in topological order and consistency, ensuring the consistency and reliability of transaction data. Use graph visualization techniques (such as D3.js, Graphviz) to convert the globally consistent evidence chain data into a visualized traceability path. By generating a traceability code flow graph, indicate the source, processing steps, and relevant evidence of each transaction block, thus achieving a complete traceability display.

[0151] Preferably, the spatio-temporal correlation analysis of the abnormal anchor coordinate data includes the following steps:

[0152] Locate the position of the abnormal gold trading block according to the abnormal anchor coordinate data;

[0153] Extract the transaction information of the abnormal gold trading block based on the position of the abnormal gold trading block;

[0154] Screen the abnormal information of the transaction information of the abnormal gold trading block, and perform three-dimensional space modeling on the screened abnormal information to generate the three-dimensional spatial distribution of abnormal data points;

[0155] Calculate the distance and direction between the abnormal data points and the adjacent points in the three-dimensional spatial distribution of the abnormal data points to define the topological relationship of the abnormal data points;

[0156] Construct a link topology for the abnormal information through the topological relationship of the abnormal data points to generate three-dimensional link topology data.

[0157] In the embodiments of the present invention, the block number is extracted from the identified abnormal transaction data, and the complete block data corresponding to the number is queried in the blockchain network. Since a block contains multiple transactions, it is necessary to further screen out the blocks that only contain abnormal transactions to ensure the accuracy of subsequent analysis. If a block contains multiple abnormal transactions, the system will further analyze the characteristics of these transactions, including information such as the source account, receiving account, amount, handling fee, number of transaction confirmations, and transaction type of the transactions, to ensure that all records related to the abnormal transactions are completely extracted. Once the location of the abnormal transaction block is determined, the system will extract all transaction information from the block and sort out the key fields of each transaction, including: the unique identifier of the transaction (transaction hash value), the sender and receiver addresses of the transaction, the amount and handling fee of the transaction, the timestamp of the transaction, the type of the transaction, such as buy, sell, transfer, etc., the confirmation status of the transaction (i.e., the number of confirmed blocks). After extracting the transaction information, the system will standardize the data, for example, convert different transaction amounts into the same comparison standard for subsequent outlier detection. If the amount of a transaction is far higher or lower than the historical transaction records of the account, it belongs to an abnormal transaction. If an account frequently initiates multiple transactions within a short period of time and the amounts show abnormal changes, it involves abnormal behavior. If funds quickly flow between multiple accounts or eventually flow back to the original sender, there is a suspicion of circular transactions. After screening out the abnormal transactions, the system will perform three-dimensional spatial modeling on these transactions to visualize the transaction behavior. The core of the three-dimensional modeling is to construct a transaction data distribution map based on the time, amount, and address relationships of the transactions to help identify transaction patterns. By comparing information such as the time, amount, and address of the transactions, it is judged whether there is a connection between different transactions. If two transactions occur consecutively within an extremely short period of time and involve the same or related accounts, they are part of the same batch of fund flows. If an account transfers funds to another account, and then this account transfers funds to a third-party account within a short period of time, this is a characteristic of fund splitting operations. If an account receives funds and then returns the funds to the original sender, it indicates that the transaction involves circular fund flows, such as false transactions or illegal fund backflows. By analyzing the transfer process of the transactions, it is judged where the funds come from and where they flow to. If the funds of a certain transaction finally flow into a high-risk account (such as a blacklist account or a long-term idle account), the transaction behavior of this account needs to be further monitored. After completing the screening of the transaction data and the analysis of the fund flow direction, the system will construct a transaction network topology structure based on these data to more intuitively understand the link relationship of the abnormal transactions. The transaction network is composed of account nodes and transaction connection relationships. The system will draw a complete transaction network relationship map based on the fund flow situation. Each account node represents a transaction address, and each connection line represents a transaction transfer. If a certain amount of funds flow back to the starting account after flowing through multiple accounts.The system will automatically detect whether such a cyclic structure exists in the trading network and mark it as a high-risk trading chain. Combining information such as the time, amount, and fund flow of the transactions, a complete topological structure of the trading chain is formed. This topological data can be used for subsequent fund tracking, risk warning, and trading visualization display. Through the above analysis, the system can generate a detailed gold trading traceability report.

[0158] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application document are intended to be embraced within the present invention.

[0159] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features invented herein.

Claims

1. A digital traceability method for gold trading, characterized in that, Including the following steps: Step S1: Collect gold trading data, where the gold trading data includes transaction process information, transaction timestamps, and the average gold weight. Perform a hash encoding on the gold trading data to generate a transaction verification hash value; Step S2: Obtain the spectral data of the gold material characteristics; analyze the gold element composition of the gold sample based on the spectral data of the gold material characteristics, and construct a gold digital fingerprint in combination with the spectral data of the gold material characteristics. Among them, analyzing the gold element composition of the gold sample based on the spectral data of the gold material characteristics includes: Extract the characteristic peaks in the spectral data of the gold material characteristics and classify the characteristic peaks to obtain the characteristic peaks of gold elements and the characteristic peaks of impurities; Identify the wavelength and intensity of the characteristic peaks of gold elements to calculate the gold purity; Analyze the impurity element concentration of the spectral data of the gold material characteristics based on the characteristic peaks of impurities to generate impurity concentration data; Calculate the gold element composition based on the impurity concentration data to obtain the gold element composition data; Perform feature fusion on the spectral data of the gold material characteristics and the gold element composition data to construct a gold digital fingerprint; Step S3: Upload the transaction verification hash value, the encoded gold digital fingerprint, and the element composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold trading block encrypted with a timestamp; Step S4: Real-time monitor the abnormal transaction behavior data of the gold trading block, and perform source tracing backtracking on the gold trading chain link based on the abnormal transaction behavior data to generate a source tracing display report of the gold trading. Among them, the source tracing backtracking on the gold trading chain link based on the abnormal transaction behavior data in Step S4 includes: Perform a sliding window scan on the blockchain transaction data to generate real-time transaction feature stream data; Perform multi-dimensional threshold comparison on the real-time transaction feature stream data to generate abnormal feature vector data, where the multi-dimensional threshold comparison includes the comparison of the deviation degree of the transaction amount and the comparison of the abnormal timestamp; Match the abnormal feature vector data with a preset digital fingerprint database to generate abnormal anchoring coordinate data; Perform spatio-temporal correlation analysis on the abnormal anchoring coordinate data to generate three-dimensional link topology data; Reconstruct the evidence chain of the gold trading block based on the three-dimensional link topology data, generate source tracing code stream data and visualize it to generate a source tracing display report of the gold trading. Among them, the spatio-temporal correlation analysis of the abnormal anchoring coordinate data includes the following steps: Locate the position of the abnormal gold trading block according to the abnormal anchoring coordinate data; Extract the transaction information of the abnormal gold trading block based on the position of the abnormal gold trading block; Screen the abnormal information of the transaction information of the abnormal gold trading block, and perform three-dimensional space modeling on the screened abnormal information to generate the three-dimensional spatial distribution of abnormal data points; Calculate the distance and direction between the abnormal data points and the adjacent points in the three-dimensional spatial distribution of the abnormal data points to define the topological relationship of the abnormal data points; Construct a link topology for the abnormal information through the topological relationship of the abnormal data points to generate three-dimensional link topology data.

2. The digital traceability method for gold trading according to claim 1, wherein Step S1 includes the following steps: Step S11: Collect the identity information of the trading parties and record the unique identification code of the trading device to obtain the transaction process information; Step S12: Obtain the reference time using a time synchronization server, and perform network protocol clock calibration on the reference time to obtain a transaction timestamp; Step S13: Measure the gold weight data using a high-precision electronic scale, repeat the measurement 3 - 5 times and eliminate outliers to calculate the average value of the gold weight data; Step S14: Concatenate the transaction party identity information, transaction timestamp, and the average value of the gold weight to form gold transaction data; perform hash encoding on the gold transaction data to generate a transaction verification hash value.

3. The digital traceability method for gold trading according to claim 1, wherein, The analysis of the impurity element concentration in the gold material characteristic spectral data based on the impurity characteristic peaks includes: When any of the following situations occurs, it is determined that the silver content is abnormal, and the silver impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 328.1 nm or 546.6 nm exceeds 15% of the preset gold reference spectral standard peak value; the silver XRF characteristic peak intensity is higher than 5% of the gold Lα peak; through ICP - OES analysis, the silver element concentration exceeds the normal range of 50 - 500 mg / kg; When the following situations occur simultaneously, it is determined that the content exceeds the standard, and the copper impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 324.8 nm or 327.4 nm exceeds 20% of the gold reference spectral standard peak value; the ratio of the copper XRF characteristic peak to the gold Lα peak is higher than 0.08; through ICP - OES analysis, the copper element concentration exceeds 200 mg / kg and continues to be on the high side; When the following situations occur simultaneously, it is determined that the platinum content is abnormal, and the platinum impurity concentration data is obtained: In spectral detection, the characteristic peak intensity at 214.4 nm or 265.9 nm is higher than 10% of the gold standard peak value; the ratio of the platinum XRF characteristic peak to the gold Lα peak is higher than 0.12; through ICP - OES analysis, the platinum element concentration exceeds 100 mg / kg, and the deposition stability test shows that the deposition rate decreases by more than 10%; Integrate the silver impurity concentration data, copper impurity concentration data, and platinum impurity concentration data to obtain the impurity concentration data.

4. The digital traceability method for gold trading according to claim 1, wherein, The multi - node consensus verification through the smart contract in Step S3 includes: Associate the transaction verification hash value, gold digital fingerprint encoding, and element composition data to generate a composite data packet and attach a digital signature; Invoke the smart contract in the blockchain to verify the integrity of the composite data packet. If the transaction verification hash value matches and the digital signature is valid, trigger the multi - node consensus mechanism and perform block encapsulation on the composite data packet to obtain a transaction block; Conduct node voting on the transaction block through the multi - node consensus mechanism. After more than 2 / 3 of the nodes confirm, use the timestamp server to encrypt the transaction block to obtain an encrypted transaction block; Write the encrypted transaction block into the blockchain distributed ledger in the Merkle tree structure and broadcast it to all participating nodes to update the ledger status, generating a gold transaction block encrypted with a timestamp.

5. The digital traceability method for gold trading according to claim 4, wherein, The encryption of the transaction block using the timestamp server includes: Extract the block header information of the transaction block, and perform validity verification processing on the block header information to generate block verification data; Perform integrity calculation processing on the block verification data to generate block integrity data; Authenticate the time server of the transaction block based on the block integrity data; Perform time synchronization processing on the transaction block using the authenticated time server to generate timing feature data; Perform UTC binding on the timing feature data to generate timestamp signature data; Perform timestamp encryption on the transaction block through the timestamp signature data and encapsulate the link to obtain an encrypted transaction block.

6. The digital traceability method for gold trading according to claim 1, characterized in that, The abnormal transaction behaviors of the real-time monitored gold transaction block described in step S4 include: When any of the following situations occurs, it is determined that the transaction frequency within the block is abnormal, and frequency abnormal data is obtained: within the same transaction block, the number of transactions is greater than or equal to 100 times, and the time interval between adjacent transactions is less than 2 seconds / transaction; the number of transactions within the same transaction block deviates from the average number of transactions in the past 30 minutes within the block by more than ±50%; within a single block, the number of transactions initiated by the trader address is greater than or equal to 30 times, and the time interval between adjacent transactions is less than 3 seconds / transaction; When the following situations occur simultaneously, it is determined that the transaction amount within the block is abnormal, and amount abnormal data is obtained: within the same transaction block, the single transaction amount is greater than or equal to 5 times the maximum transaction amount in the past 30 minutes within the block, and the single transaction amount is greater than or equal to 1000 grams of gold; within the same transaction block, the cumulative transaction amount exceeds 20% of all transaction amounts in the past 30 minutes within the block, and the cumulative transaction amount is greater than or equal to 5000 grams of gold; the transaction amount fluctuation of a single wallet address within the same block does not exceed ±1%, and the total transaction amount of this wallet address is greater than or equal to 5000 grams of gold; When the following situations occur simultaneously, it is determined that the transaction mode within the block is abnormal, and mode abnormal data is obtained: within the same transaction block, the transaction amounts and directions between multiple transaction addresses are exactly the same, and this mode appears more than 5 times; the transaction direction of a single wallet address frequently switches more than 10 times, and the transaction amount fluctuation each time is less than or equal to 5%; the transaction modes between the same wallet address and different trading pairs are similar, and this mode repeatedly appears within the block more than 20 times, and the total transaction amount is greater than or equal to 2000 grams of gold; When any of the following situations occurs, it is determined that the transaction chain within the block is abnormal, and transaction chain abnormal data is obtained: the formation time of the transaction chain within the block is too short and the transaction amount fluctuation is less than ±0.5%, and the transaction amounts and directions within this transaction chain are consistent; the transaction chain within the same block is completely consistent with the historical transaction behavior pattern outside the block, and the transaction amounts and time intervals are highly consistent, indicating the existence of forged transaction behaviors; within the transaction chain within the block, the addresses of both trading parties are the same as the high-frequency trading addresses in the historical records, and the transaction frequency exceeds 30 times; Integrate the transaction frequency abnormal data, transaction amount abnormal data, transaction mode abnormal data, and transaction chain abnormal data within the block to obtain abnormal transaction behavior data.

7. A digital traceability system for gold trading, characterized in that, For implementing the digital traceability method for gold trading as described in claim 1, the digital traceability system for gold trading includes: A data acquisition module, which is used to collect gold trading data. The gold trading data includes trading process information, trading timestamps, and the average gold weight. Hash encoding is performed on the gold trading data to generate a trading verification hash value; A component identification module, which is used to obtain the gold material characteristic spectrum data; analyze the gold element components of the gold sample based on the gold material characteristic spectrum data, and construct a gold digital fingerprint in combination with the gold material characteristic spectrum data; A trading verification module, which is used to upload the trading verification hash value, the gold digital fingerprint code, and the element composition data to the blockchain, and perform multi-node consensus verification through a smart contract to generate a gold trading block encrypted with a timestamp; A trading traceability module, which is used to monitor the abnormal trading behavior data of the gold trading block in real time, trace back the gold trading chain link based on the abnormal trading behavior data, and generate a traceability display report of the gold trading.

Citation Information

Patent Citations

  • system and method for blockchain project management

    CN108665275A

  • A system and method for data management of cross-block link

    CN109299338A