Tamper-proof traceability method and system for credit contract

By embedding watermark seed values ​​in credit contracts and utilizing blockchain technology, the problem of high tampering risk in credit contracts is solved, achieving fine-grained tamper detection and immutability of contract content, and improving the efficiency and credibility of evidence storage and verification.

CN120975909APending Publication Date: 2025-11-18HAIER CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511138350.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Credit contracts are at high risk of being tampered with during the signing, circulation and archiving process. Traditional hash values ​​are easy to forge and the location of tampering cannot be located. Centralized databases are at risk of data deletion and tampering. Digital watermarking technology lacks credible evidence storage and fine-grained verification, making it difficult to meet the requirements for authoritative evidence collection.

Method used

By extracting fine-grained information from credit contracts, generating watermark seed values ​​and embedding them into the blockchain, and combining evidence storage smart contracts and blockchain technology, fine-grained tamper detection and immutability of contract content are achieved. The SHA-256 hash function, digital watermark, and quantization embedding method are used, combined with a consortium blockchain architecture and TLS encryption protocol, to ensure data security and trusted evidence storage.

Benefits of technology

It enables fine-grained monitoring of contract content tampering and ensures data immutability, reducing the risk of tampering and shortening verification time from hours to minutes, thereby improving the efficiency and credibility of evidence storage and verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975909A_ABST
    Figure CN120975909A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of risk prevention and control, and provides a tamper-proof traceability method and system for a credit contract, and the method comprises the steps: splicing information extracted from the credit contract, and carrying out the Hash processing, and obtaining a watermark seed value; fine-grained information of the credit contract is extracted, the watermark seed value is embedded into the fine-grained information, and an original hash value of the contract, the watermark seed value and contract signing and operation log information are packaged into a transaction; compiling an evidence storage smart contract, deploying the evidence storage smart contract to a block chain, sending a transaction to a block chain network through the evidence storage smart contract for evidence storage, and executing corresponding processing mechanisms by the smart contract according to different service requests; and in combination with a traceability query condition, querying contract operation records conforming to the condition on the block chain, sorting and analyzing a query result, and generating a traceability report. And the tampering risk of the fine-grained information of the contract is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of risk prevention and control, and in particular relates to a method and system for preventing tampering and tracing credit contracts. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Credit contract management faces a high risk of contract tampering, such as altering key terms like loan amounts and repayment periods. Current methods primarily rely on hash value comparison, but hash values ​​are easily forged and the location of tampering cannot be pinpointed. Traditional evidence preservation methods often use centralized databases, which are vulnerable to data deletion and alteration, failing to meet the requirements for authoritative evidence. Contracts lack effective records during signing, circulation, and archiving; if tampering leads to disputes, it's difficult to quickly trace the complete historical versions and operational records of the contract. While current digital watermarking technology can detect tampering, it lacks reliable evidence preservation, or while it can guarantee data immutability, it cannot perform fine-grained verification of contract content, leaving management security vulnerabilities. Summary of the Invention

[0004] To address at least one of the technical problems mentioned above, this invention provides a method and system for preventing tampering and tracing credit contracts. This system not only ensures that the data is immutable but also enables fine-grained tampering detection of contract content, greatly reducing the risk of contract tampering.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a method for preventing tampering and tracing credit contracts, comprising the following steps: The watermark seed value is obtained by concatenating the information extracted from the credit contract and then hashing it. Extract fine-grained information from the credit contract, embed the watermark seed value into the fine-grained information to obtain the credit contract with embedded watermark, and package the original hash value of the credit contract, the watermark seed value, the contract signing and operation log information into a transaction; Write a smart contract for evidence storage, deploy the smart contract for evidence storage on the blockchain, send transactions to the blockchain network for evidence storage through the smart contract, and the smart contract executes the corresponding processing mechanism according to different business requests. Based on the traceability query criteria, the system queries the blockchain for contract operation records that meet the criteria, organizes and analyzes the query results, and generates a traceability report.

[0006] Furthermore, the step of concatenating the information extracted from the credit contract and then performing hash processing to obtain the watermark seed value includes: The string of information extracted from the credit contract is concatenated and processed using the SHA-256 hash function to generate a hash value. This hash value is then XORed with a randomly generated salt value to obtain the final watermark seed value.

[0007] Furthermore, the extraction of fine-grained information from the credit contract includes: Convert the acquired credit contract documents into images; The image is segmented into non-overlapping pixel blocks, each pixel block is transformed from the spatial domain to the frequency domain, and the frequency domain information is filtered to obtain the key information of the contract.

[0008] Furthermore, the step of embedding the watermark seed value into fine-grained information to obtain the watermarked credit contract includes: The watermark seed value is encrypted and embedded with watermark information at specific positions in the low-frequency coefficients of the image. A quantization embedding method is used to represent the watermark information by modifying the values ​​of the coefficients. Specifically, the DC coefficient and the first few AC coefficients in the image are selected. The watermark seed value is mapped bit by bit to the quantization range of the coefficients, and the coefficients are fine-tuned according to the values ​​of the watermark bits.

[0009] Furthermore, the step of writing the evidence storage smart contract and deploying the evidence storage smart contract on the blockchain includes: The blockchain adopts a consortium blockchain architecture, with nodes including financial institutions, notary offices, and regulatory authorities. Financial institutions, as the initiators and primary users of contracts, are responsible for uploading relevant contract information. Notary offices, as neutral third parties, notarize the signing process and content of contracts, enhancing the credibility of the evidence. Regulatory authorities supervise and manage the entire evidence preservation process to ensure compliance. Nodes communicate with each other through a P2P network, using the TLS encryption protocol to ensure communication security. Each node has its own private and public keys for authentication and data encryption. Nodes use elliptic curve cryptography to generate public and private key pairs. Inter-node communication is based on a custom message protocol, and the message format is encapsulated in JSON.

[0010] Furthermore, the smart contract executes corresponding processing mechanisms based on different business requests, including: When the smart contract receives contract information uploaded by a financial institution, it verifies the validity of the message signature by decrypting the signature using the sender's public key and comparing it with the hash value of the message content. If the signature is valid, the smart contract packages the original hash value of the contract, the digital watermark seed value, the contract signing timestamp, and the operation log information into a transaction and broadcasts it to the blockchain network. After consensus verification by the nodes, the transaction is recorded on the blockchain. The smart contract assigns a unique transaction ID to each notarized transaction. When a user submits a contract verification request, the smart contract retrieves the stored record from the blockchain and compares it with the contract information provided by the user. First, it compares the contract hash value; if they do not match, the verification fails. Then, it compares the digital watermark seed value; if they also do not match, the contract may have been tampered with. The smart contract checks the integrity of the operation log to ensure there are no abnormal operation records. If the comparison results match, it returns a verification passed message; otherwise, it returns a verification failed message.

[0011] In the event of a contract dispute, the smart contract will handle it according to preset rules. When one party raises a question about contract tampering, the smart contract will automatically call digital watermark verification and blockchain evidence comparison. If the dispute cannot be resolved through automatic verification, the dispute will be submitted to a designated arbitration node for processing.

[0012] Furthermore, the method also includes obtaining the evidence storage record according to the contract verification request, and judging whether there is abnormal information based on the evidence storage record, including: when comparing the contract hash value and the watermark seed value, comparing the extracted watermark information with the original watermark seed value bit by bit; if the watermark is complete and the blockchain evidence storage is consistent with the original record, it is determined that the contract has not been tampered with; otherwise, it is determined that the contract may have been tampered with, and the relevant abnormal information is recorded.

[0013] A second aspect of the present invention provides a credit contract anti-tampering traceability system, comprising: The contract signing module is used to concatenate the information extracted from the credit contract and perform hash processing to obtain the watermark seed value; extract the fine-grained information of the credit contract, embed the watermark seed value into the fine-grained information to obtain the credit contract with embedded watermark, and package the original hash value of the contract, the watermark seed value, the contract signing and operation log information into a transaction. The evidence storage module is used to write and store smart contracts for contracts, deploy smart contracts for evidence storage on the blockchain, send transactions to the blockchain network for evidence storage through smart contracts for evidence storage, and execute corresponding processing mechanisms according to different business requests. In the contract traceability stage, it is used to query contract operation records that meet the conditions on the blockchain, combine traceability query conditions, organize and analyze the query results, and generate a traceability report.

[0014] A third aspect of the present invention provides a computer-readable storage medium.

[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the credit contract anti-tampering and traceability method described above.

[0016] A fourth aspect of the present invention provides a computer device.

[0017] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the credit contract anti-tampering and traceability method described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention extracts fine-grained information from credit contracts, embeds watermark seed values ​​into the fine-grained information, and then sends it to the blockchain for evidence storage. The digital watermark can monitor the tampering of fine-grained information of the contract content, while the blockchain ensures that the data is immutable, greatly reducing the risk of tampering with the fine-grained information of the contract.

[0019] 2. This invention, through an automated evidence storage and verification process, reduces contract verification time from the traditional several hours to minutes, thereby improving the efficiency of evidence storage and verification. Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 This is a schematic diagram of the overall architecture of a credit contract anti-tampering and traceability system provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the digital watermark embedding and extraction process provided in an embodiment of the present invention; Figure 3 This is the contract storage and verification process provided in the embodiments of the present invention. Detailed Implementation

[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0023] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0024] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0025] Credit contract management faces a high risk of contract tampering, such as altering key terms like loan amounts and repayment periods. Current methods primarily rely on hash value comparison, but hash values ​​are easily forged and the location of tampering cannot be pinpointed. Traditional evidence preservation methods often use centralized databases, which are vulnerable to data deletion and alteration, failing to meet the requirements for authoritative evidence. Contracts lack effective records during signing, circulation, and archiving; if tampering leads to disputes, it's difficult to quickly trace the complete historical versions and operational records of the contract. While current digital watermarking technology can detect tampering, it lacks reliable evidence preservation, or while it can guarantee data immutability, it cannot perform fine-grained verification of contract content, leaving management security vulnerabilities.

[0026] This invention extracts fine-grained information from credit contracts, embeds a watermark seed value into the fine-grained information, and then sends it to the blockchain for storage. The digital watermark enables the monitoring of tampering with fine-grained information of the contract content, while the blockchain ensures the immutability of the data, greatly reducing the risk of tampering with the fine-grained information of the contract.

[0027] Example 1 like Figure 1 As shown, this embodiment provides a method for preventing tampering and tracing credit contracts, including the following steps: Step 1: After concatenating the information extracted from the credit contract, perform hash processing to obtain the watermark seed value; embed the watermark seed value into the credit contract converted into an image, and package the original hash value of the contract, the watermark seed value, and the contract signing information into a transaction; like Figure 2 As shown, the specific steps include the following: Step 101: After concatenating the information extracted from the credit contract, perform hash processing to obtain the watermark seed value; In this embodiment, key information of the contract is collected, including but not limited to the contract number, the unique identifiers of the contracting parties (such as ID card numbers and unified social credit codes of enterprises), the signing time, the contract amount, and the repayment period. This key information is then concatenated to form a long string.

[0028] In this embodiment, the concatenated string is processed using the SHA-256 hash function to generate a 256-bit hash value. To further enhance the security and uniqueness of the watermark, this hash value is XORed with a randomly generated salt value (128 bits in length) to obtain the final watermark seed value.

[0029] Step 102: Convert the obtained credit contract documents into images; In this embodiment, the acquired contract PDF file is converted into a high-quality PNG image, and the resolution of the contract image is adjusted; to ensure the accuracy of subsequent processing, the image resolution is adjusted to 300 dpi.

[0030] Step 103: Segment the image into non-overlapping pixel blocks, transform each pixel block from the spatial domain to the frequency domain, and filter the frequency domain information to obtain the key information of the contract. In this embodiment, the image size is assumed to be... The image is segmented into non-overlapping 8×8 pixel blocks so that each block can be processed independently. A Discrete Cosine Transform (DCT) is performed on each pixel block to transform the image from the spatial domain to the frequency domain. The DCT transform concentrates the image's energy in the low-frequency components, while the high-frequency components contain the image's detailed information. The specific transformation formula is as follows: , in, It represents the pixel values ​​of the original image patch in the spatial domain. These are the frequency domain coefficients after DCT transformation. and It is a normalization constant.

[0031] After DCT transformation, the low-frequency coefficients contain the main energy and information of the image, while the high-frequency coefficients contain the details and noise of the image.

[0032] After each DCT transformation Singular value decomposition (SVD) is performed on the coefficient matrix to obtain the main structural and content information of the image based on the singular values; In this embodiment, a matrix is ​​decomposed into the product of three matrices using SVD decomposition, i.e. A = U Σ VT Σ is a diagonal matrix, where U and V are orthogonal matrices and Σ is a diagonal matrix whose diagonal elements are the singular values ​​of matrix A.

[0033] Singular values ​​are stable and representative, and can reflect important features of image patches. In credit contract images, by setting the size of singular values ​​and comparing them with a set threshold, the singular values ​​that are greater than the set threshold correspond to the main structure and content information of the contract image.

[0034] Step 104: Embed watermark information into the key information of the contract to obtain the credit contract with embedded watermark. Specifically, the steps include the following: Step 1041: Encrypt the watermark seed value to improve the security and confidentiality of the watermark.

[0035] In this embodiment, a symmetric encryption algorithm, such as AES (Advanced Encryption Standard), is used to encrypt the watermark information using a single key.

[0036] Step 1042: According to the set rules, the watermark is embedded by combining the magnitude of the singular values ​​and the specific position of the low-frequency coefficients in the image; In this embodiment, watermark information is embedded at specific positions in the low-frequency coefficients. A quantization embedding method is used to represent the watermark information by modifying the values ​​of the coefficients.

[0037] Specifically, select the DC coefficient (DC) and the first few AC coefficients from the image; Among them, the DC coefficient is the first coefficient obtained after DCT (Discrete Cosine Transform) (i.e. the coefficient at position [0,0]), which is called the DC coefficient. It represents the average brightness value of the pixel block and contains low-frequency information of the image (i.e., overall brightness / color).

[0038] The AC coefficients (Alternating Current coefficients) are all coefficients other than the DC coefficients (located from [0,1] to [7,7]), and are called AC coefficients. They represent detailed information of the image (high-frequency features such as edges, textures, and noise).

[0039] Because the DC coefficients have high energy, the modified watermark is more robust. The low-frequency AC coefficients contain important details, so the modified watermark still has a certain degree of robustness, while having little impact on visual quality.

[0040] Specifically, a quantization embedding method is adopted, which represents watermark information by modifying the value of the coefficient. This includes mapping the watermark seed value bit by bit to the quantization range of the coefficient, and fine-tuning the coefficient according to the value of the watermark bit.

[0041] Select a subset of singular values ​​for watermark embedding. For example, larger singular values ​​can be chosen because they have a greater impact on the image and can better hide the watermark information.

[0042] The watermark embedding formula is: , in, These are the original singular values. These are singular values ​​after the watermark is embedded. It is a parameter that controls the watermark embedding strength. This is the first watermark information i Bit.

[0043] Step 1043: Perform inverse DCT transformation on the coefficients after watermarking to convert the image from the frequency domain back to the spatial domain, and obtain the credit contract image after watermarking. The singular value matrix Σ after watermarking is combined with the original orthogonal matrices U and V to obtain the DCT coefficient matrix after watermarking. A ′= U Σ′ VT For each The inverse discrete cosine transform (IDCT) is performed on the DCT coefficient matrix after watermarking to convert the image from the frequency domain back to the spatial domain, resulting in a credit contract image with embedded digital watermark. The IDCT transformation formula is: , Step 1044: Perform necessary post-processing on the credit contract image after embedding the digital watermark, such as noise reduction and smoothing, to reduce the impact of the embedded watermark on the image quality, and convert the processed image back to the original format file.

[0044] By leveraging the characteristics of credit contracts and combining extracted features, digital watermark information is effectively embedded into credit contract documents while ensuring document quality and the watermark's invisibility. In subsequent verification, appropriate extraction algorithms can accurately extract the watermark information to verify the contract's authenticity and completeness.

[0045] Step 105: Calculate the original hash value of the contract, and package the original hash value of the contract, the watermark seed value, the contract signing timestamp, and the operation log into a transaction.

[0046] The original contract hash value is calculated using the SHA-256 algorithm to hash the original content of the contract, resulting in a 256-bit hash value. This hash value serves as a unique identifier for the contract and is used for subsequent verification and comparison.

[0047] Watermark seed value: The extracted watermark information is compared bit by bit with the original watermark seed value. If the two are completely consistent, it is determined that the contract has not been tampered with; if there are inconsistent bits, it is determined that the contract may have been tampered with.

[0048] To improve the accuracy of verification, this embodiment sets a certain fault tolerance rate, for example, allowing a certain number of bits to be inconsistent.

[0049] Contract signing timestamp: Records the exact time the contract was signed, using the UTC time standard to ensure consistency and accuracy. The timestamp is accurate to the millisecond level and calibrated via an NTP (Network Time Protocol) server.

[0050] Operation Log: Records all operations performed on the contract throughout its entire lifecycle, including signing, modification, and viewing. The operation log includes information such as operation time, operator, and operation type, facilitating traceability and auditing. The operation log is stored in a chained structure, with each record containing the hash value of the previous record, ensuring the log's integrity and immutability.

[0051] Step 2: Write a smart contract for evidence storage, deploy the smart contract to the blockchain, send the transaction to the blockchain network for evidence storage through the smart contract, and the smart contract executes the corresponding processing mechanism according to different business requests. In this embodiment, the blockchain adopts a consortium blockchain architecture, with nodes including financial institutions, notary offices, and regulatory authorities. Financial institutions, as the initiators and main users of the contract, are responsible for uploading contract-related information. Notary offices, as neutral third parties, notarize the signing process and content of the contract to enhance the credibility of the evidence. Regulatory authorities supervise and manage the entire evidence preservation process to ensure compliance.

[0052] Nodes communicate with each other through a P2P network, using the TLS encryption protocol to ensure communication security. Each node has its own private key and public key for authentication and data encryption. Nodes use the Elliptic Curve Cryptography (ECC) algorithm to generate public-private key pairs, with the private key being 256 bits long and the public key being 512 bits long.

[0053] Inter-node communication is based on a custom message protocol, with messages encapsulated in JSON format. Message types include evidence preservation request messages, evidence preservation response messages, verification request messages, and verification response messages.

[0054] For example, the format of a proof of evidence request message is as follows: { "message_type": "deposit_request", "contract_hash": "123456789abcdef...", "watermark_seed": "abc123def456...", "timestamp": 1630435200, "operation_log": [ { "operator": "financial_institution_1", "operation_type": "sign", "operation_time": 1630435200 } ], "signature": "sig123456789..." } Here, message_type represents the message type, contract_hash is the hash value of the contract, watermark_seed is the digital watermark seed value, timestamp is the timestamp, operation_log is the operation log, and signature is the result of the message sender signing the message content using their private key.

[0055] In this embodiment, the smart contract executes corresponding processing mechanisms based on different business requests, specifically including: When a financial institution uploads contract information, the smart contract first verifies the validity of the message signature. It decrypts the signature using the sender's public key and compares it with the hash value of the message content. If the signature is valid, the smart contract packages the original contract hash value, digital watermark seed value, contract signing timestamp, and operation logs into a single transaction and broadcasts it to the blockchain network. After consensus verification by the nodes, the transaction is recorded on the blockchain. The smart contract assigns a unique transaction ID to each documented transaction for easy subsequent retrieval and management.

[0056] When a user submits a contract verification request, the smart contract retrieves the evidence record from the blockchain and compares it with the contract information provided by the user. Specifically, the process includes: first, comparing the contract hash value; if they don't match, the verification fails. Then, comparing the digital watermark seed value; if they also don't match, the contract may have been tampered with. The smart contract also checks the integrity of the operation log to ensure there are no abnormal operation records. If the comparison results match, it returns a verification passed message; otherwise, it returns a verification failed message.

[0057] In the event of a contractual dispute, the smart contract handles it according to pre-defined rules. For example, if one party raises a claim of contract tampering, the smart contract can automatically invoke digital watermark verification and blockchain evidence comparison to provide objective supporting evidence. The smart contract also includes an arbitration mechanism; if the dispute cannot be resolved through automatic verification, it will be submitted to a designated arbitration node for processing. The arbitration node's ruling will be recorded on the blockchain and has immutable legal effect.

[0058] In this embodiment, the PBFT (Practical Byzantine Fault Tolerance) consensus mechanism is adopted, with the number of nodes set to 7, tolerating 2 malicious nodes. The PBFT consensus mechanism consists of three phases: the pre-preparation phase, the preparation phase, and the commit phase.

[0059] Pre-preparation phase: After receiving the evidence storage request, the master node broadcasts a pre-preparation message, which includes transaction information and view number.

[0060] Preparation phase: After receiving the pre-preparation message, other nodes verify its validity. If the verification passes, they broadcast the preparation message.

[0061] Commit Phase: Once a node receives a sufficient number of prepare messages (2f+1, where f is the number of malicious nodes), it broadcasts a commit message. After receiving 2f+1 commit messages, the node records the transaction to its local ledger.

[0062] Smart contracts execute corresponding processing mechanisms based on different business requests. Blockchain data is stored using a LevelDB database, a high-performance key-value store. Each node maintains a local ledger containing all blocks and transaction records of the blockchain. To improve data query efficiency, indexes are created for the stored information. For example, indexes are created based on contract hash values, timestamps, and other information to facilitate quick location and retrieval of relevant stored records.

[0063] Step 3: Based on the contract verification request, obtain the evidence storage record, and determine whether there is any abnormal information based on the evidence storage record; like Figure 3 As shown, based on the obtained evidence records, the contract hash value and watermark seed value are compared; In this embodiment, when comparing the contract hash value and the watermark seed value, the extracted watermark information is compared with the original watermark seed value bit by bit. If the watermark is complete and the blockchain evidence is consistent with the original record, it is determined that the contract has not been tampered with; otherwise, it is determined that the contract may have been tampered with, and the relevant abnormal information is recorded.

[0064] Step 4: Based on the traceability request and the traceability query conditions, query the contract operation records that meet the conditions on the blockchain, organize and analyze the query results, and generate a traceability report; In this embodiment, the traceability query conditions include contract number, time range, operator, and other query conditions.

[0065] The system queries all versions and operation records of a contract from its creation to its current state on the blockchain based on the query conditions. It then organizes and analyzes the query results to generate a traceability report. The report includes basic information about the contract, operation history, and evidence records, and presents them to the user in a visual manner.

[0066] Example 2 This invention provides a credit contract anti-tampering traceability system, comprising: The contract signing module is used to concatenate the information extracted from the credit contract and perform hash processing to obtain the watermark seed value; extract fine-grained information of the credit contract, embed the watermark seed value into the fine-grained information, and package the original hash value of the contract, the watermark seed value, the contract signing and operation log information into a transaction; The evidence storage module is used to write and store smart contracts for contracts, deploy smart contracts for evidence storage on the blockchain, send transactions to the blockchain network for evidence storage through smart contracts for evidence storage, and execute corresponding processing mechanisms according to different business requests. In the contract traceability stage, it is used to query contract operation records that meet the conditions on the blockchain, combine traceability query conditions, organize and analyze the query results, and generate a traceability report.

[0067] Example 3 This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the credit contract anti-tampering and traceability method described above.

[0068] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the credit contract anti-tampering and traceability method described above.

[0069] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0070] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0071] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0072] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0073] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0074] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for preventing tampering and tracing credit contracts, characterized in that, Includes the following steps: The watermark seed value is obtained by concatenating the information extracted from the credit contract and then hashing it. Extract fine-grained information from the credit contract, embed the watermark seed value into the fine-grained information to obtain the credit contract with embedded watermark, and package the original hash value of the credit contract, the watermark seed value, the contract signing and operation log information into a transaction; Write a smart contract for evidence storage, deploy the smart contract for evidence storage on the blockchain, send transactions to the blockchain network for evidence storage through the smart contract, and the smart contract executes the corresponding processing mechanism according to different business requests. Based on the traceability query criteria, the system queries the blockchain for contract operation records that meet the criteria, organizes and analyzes the query results, and generates a traceability report.

2. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The process of concatenating the information extracted from the credit contract and hashing it to obtain the watermark seed value includes: The string of information extracted from the credit contract is concatenated and processed using the SHA-256 hash function to generate a hash value. This hash value is then XORed with a randomly generated salt value to obtain the final watermark seed value.

3. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The extraction of fine-grained information from credit contracts includes: Convert the acquired credit contract documents into images; The image is segmented into non-overlapping pixel blocks, each pixel block is transformed from the spatial domain to the frequency domain, and the frequency domain information is filtered to obtain the key information of the contract.

4. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The step of embedding the watermark seed value into fine-grained information to obtain the watermarked credit contract includes: The watermark seed value is encrypted and embedded with watermark information at specific positions in the low-frequency coefficients of the image. A quantization embedding method is used to represent the watermark information by modifying the values ​​of the coefficients. Specifically, the DC coefficient and the first few AC coefficients in the image are selected. The watermark seed value is mapped bit by bit to the quantization range of the coefficients, and the coefficients are fine-tuned according to the values ​​of the watermark bits.

5. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The process of writing and deploying the evidence storage smart contract on the blockchain includes: The blockchain adopts a consortium blockchain architecture, with nodes including financial institutions, notary offices, and regulatory authorities. Financial institutions, as the initiators and primary users of contracts, are responsible for uploading relevant contract information. Notary offices, as neutral third parties, notarize the signing process and content of contracts, enhancing the credibility of the evidence. Regulatory authorities supervise and manage the entire evidence preservation process to ensure compliance. Nodes communicate with each other through a P2P network, using the TLS encryption protocol to ensure communication security. Each node has its own private and public keys for authentication and data encryption. Nodes use elliptic curve cryptography to generate public and private key pairs. Inter-node communication is based on a custom message protocol, and the message format is encapsulated in JSON.

6. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The smart contract executes corresponding processing mechanisms based on different business requests, including: When the smart contract receives contract information uploaded by a financial institution, it verifies the validity of the message signature by decrypting the signature using the sender's public key and comparing it with the hash value of the message content. If the signature is valid, the smart contract packages the original hash value of the contract, the digital watermark seed value, the contract signing timestamp, and the operation log information into a transaction and broadcasts it to the blockchain network. After consensus verification by the nodes, the transaction is recorded on the blockchain. The smart contract assigns a unique transaction ID to each notarized transaction. When a user submits a contract verification request, the smart contract retrieves the stored record from the blockchain and compares it with the contract information provided by the user. First, it compares the contract hash value; if they do not match, the verification fails. Then, it compares the digital watermark seed value; if they also do not match, the contract may have been tampered with. The smart contract checks the integrity of the operation log to ensure there are no abnormal operation records. If the comparison results match, it returns a verification passed message; otherwise, it returns a verification failed message. In the event of a contract dispute, the smart contract will handle it according to preset rules. When one party raises a question about contract tampering, the smart contract will automatically call digital watermark verification and blockchain evidence comparison. If the dispute cannot be resolved through automatic verification, the dispute will be submitted to a designated arbitration node for processing.

7. The method for preventing tampering and tracing credit contracts as described in claim 1, characterized in that, The method further includes obtaining the evidence storage record according to the contract verification request, and judging whether there is abnormal information based on the evidence storage record, including: when comparing the contract hash value and the watermark seed value, comparing the extracted watermark information with the original watermark seed value bit by bit; if the watermark is complete and the blockchain evidence storage is consistent with the original record, it is determined that the contract has not been tampered with; otherwise, it is determined that the contract may have been tampered with, and the relevant abnormal information is recorded.

8. A tamper-proof and traceability system for credit contracts, characterized in that, include: The contract signing module is used to concatenate the information extracted from the credit contract and perform hash processing to obtain the watermark seed value; extract the fine-grained information of the credit contract, embed the watermark seed value into the fine-grained information to obtain the credit contract with embedded watermark, and package the original hash value of the contract, the watermark seed value, the contract signing and operation log information into a transaction. The evidence storage module is used to write and store smart contracts for contracts, deploy smart contracts for evidence storage on the blockchain, send transactions to the blockchain network for evidence storage through smart contracts for evidence storage, and execute corresponding processing mechanisms according to different business requests. In the contract traceability stage, it is used to query contract operation records that meet the conditions on the blockchain, combine traceability query conditions, organize and analyze the query results, and generate a traceability report.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the credit contract anti-tampering and traceability method as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the credit contract anti-tampering and traceability method as described in any one of claims 1-7.