A software anti-counterfeiting method and system based on blockchain technology and a storage medium

By generating PUSH and PULL transactions on the blockchain, leveraging the blockchain's tamper-proof and unforgeable nature, users can verify the authenticity of software without in-depth knowledge, reducing the risk of downloading malicious software and improving the security of user devices and trust in software vendors.

CN115809456BActive Publication Date: 2026-02-06CHENGDU DBAPP SECURITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210762614.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2026-02-06
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Ordinary users lack the knowledge and experience to verify the authenticity of software, making it difficult for them to verify the authenticity of software using existing technologies, which leads to security risks.

Method used

A software anti-counterfeiting method based on blockchain technology is adopted. By generating PUSH and PULL transactions on the blockchain, the hash value of the software is published and verified. The authenticity of the software is verified by leveraging the tamper-proof and unforgeable nature of the blockchain.

Benefits of technology

Users can easily verify the authenticity of software without needing in-depth software knowledge, reducing the risk of downloading malicious software and improving the security of user devices and trust in software vendors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115809456B_ABST
    Figure CN115809456B_ABST
Patent Text Reader

Abstract

The application provides a software anti-counterfeiting method and system based on a blockchain technology and a storage medium, wherein the address of software published by a software manufacturer on a blockchain is acquired first, and a PUSH transaction and a PULL transaction are published on the blockchain; then, the hash value of the genuine software published by the PUSH transaction acquired by a user through the PULL transaction is acquired; finally, the hash value of the downloaded software is compared with the acquired hash value, if the hash values are equal, the software is judged as genuine software, otherwise, the software is judged as pirated software, the safety of the downloaded software can be easily verified by the user without too much software knowledge, the identity authentication process of the software manufacturer is saved, the user from downloading malicious pirated software is effectively avoided, the safety of the user equipment is improved, and the trust of the user to the software manufacturer is enhanced. Meanwhile, the application constructs two transaction chains through a combination of on-chain storage and off-chain storage, reduces the cost of ensuring software safety, and improves the scalability of the scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the Internet field, and more specifically, to a software anti-counterfeiting method, system, and storage medium based on blockchain technology. Background Technology

[0002] With the rapid development of internet technology, various applications have become an important part of people's daily lives. People can use Alipay for mobile payments, video streaming apps to play videos, and chat apps for communication. These applications can be obtained through various channels, such as app stores or browser downloads. However, ordinary users lack the methods and experience to distinguish genuine from fake software, making it difficult for them to identify legitimate applications. If users use malicious software, it can lead to serious security problems, such as privacy breaches and financial losses.

[0003] As a distributed ledger, blockchain possesses characteristics such as tamper-proof and unforgeable properties. It is a chain-like data structure composed of a series of blocks. In addition to containing the corresponding transaction information, each block records the hash value of the previous block, and the blockchain is linked together through this hash value.

[0004] A blockchain is maintained by a network of mutually distrustful nodes that reach a consensus through a consensus algorithm. With a majority of honest nodes, the blockchain is secure. Ultimately, all nodes will obtain a unified ledger.

[0005] Software anti-counterfeiting aims to prevent malicious or pirated software from compromising user device security and stealing user data. To prevent software from unknown sources, many platforms have signing mechanisms. Software releases must be signed by certified developers using the platform's key. If a user tries to install unsigned software, the platform will display a warning and block the installation.

[0006] The current common practice is to provide both a hash code and a signature file when releasing software. The former ensures that it has not been modified by a third party, while the latter guarantees that it is indeed from the original author. Users then download the software and verify its authenticity, which requires the following steps:

[0007] Step 1: The user downloads the software and obtains the software content. ;

[0008] Step 2: The user downloads the software hash value and signature, obtaining the hash value. and signature ;

[0009] Step 3: The user downloads the software publisher's public key. ;

[0010] Step 4: The user performs a hash operation on the software content to obtain the hash result. ;

[0011] Step 5: Users compare and To ensure integrity;

[0012] Step 6: Using the public key Hash value and signature Verify that the software was released by the publisher;

[0013] The verification process described above requires users to complete it themselves, which is impossible for users lacking certain knowledge and experience. Furthermore, while users can verify that the software was released by the publisher using the public key, hash value, and signature, they cannot be certain whether the public key was obtained from the publisher. To ensure the trustworthiness of the public key, a trusted third party and authorized CA are needed. Summary of the Invention

[0014] This invention addresses the problem in existing technologies where users lack the necessary knowledge and experience to independently verify the authenticity of software. It proposes a software anti-counterfeiting method, system, and storage medium based on blockchain technology. By comparing the hash value of the anti-counterfeiting information of the obtained genuine software with the hash value of the downloaded software, if they are equal, the software is determined to be genuine; otherwise, it is considered pirated. This allows users to easily verify the security of downloaded software without requiring extensive software knowledge, effectively preventing users from downloading malicious pirated software, improving the security of user devices, and enhancing user trust in software vendors.

[0015] The specific implementation details of this invention are as follows:

[0016] A software anti-counterfeiting method based on blockchain technology includes the following steps:

[0017] Step 1: Obtain the address A publicly disclosed by the software vendor on the blockchain, generate PULL and PUSH transactions on the blockchain, and publish the anti-counterfeiting information of the genuine software through the PUSH transaction. The anti-counterfeiting information includes at least the software name n, version number v, hash value h, and date d of the genuine software.

[0018] Step 2: Obtain the software downloaded by the user from the Internet based on the software name n, version number v, and date d, and obtain the hash value h(m) of the downloaded software through the obtained downloaded software;

[0019] Step 3: Obtain the hash value h of the genuine software obtained by the user through the PULL transaction in address A. Compare the hash value h(m) of the downloaded software obtained in Step 2 with the hash value h of the genuine software. If they are equal, the software downloaded by the user is genuine software; otherwise, the software downloaded by the user is pirated software.

[0020] To better implement this invention, the specific steps for performing anti-counterfeiting verification on the software by further splitting the PUSH transaction into PUSH1 and PUSH2 transactions are as follows:

[0021] Step S1: Generate a PUSH1 transaction on the blockchain, and publish the anti-counterfeiting information and metadata of the software through the PUSH1 transaction. The metadata includes the description of the software and the license of the software. The PUSH1 transaction is stored in the software vendor's local storage.

[0022] Step S2: Generate PUSH2 transaction on the blockchain and store the hash value h1 of PUSH1 transaction in PUSH2 transaction;

[0023] Step S3: Repeat steps S1 and S2 until n PUSH2 transactions are generated to form a blockchain transaction chain; generate n PUSH1 transactions to form a local transaction chain in the software vendor's local storage, and store the hash value of the (n-1)th PUSH2 transaction in the PUSH1 transaction.

[0024] Step S4: Obtain the hash value h of the genuine software in blockchain address A through the PULL transaction. Compare the hash value h of the genuine software with the hash value h(m) of the downloaded software. If they are equal, the software downloaded by the user is genuine software; otherwise, the software downloaded by the user is pirated software.

[0025] To better implement this invention, the specific operation of verifying the authenticity of software by obtaining its anti-counterfeiting information and metadata is as follows: Obtain the last PUSH2 transaction at public address A on the blockchain; find the PUSH1 transaction corresponding to the last PUSH2 transaction; compare the obtained anti-counterfeiting information and metadata retrieved from blockchain address A via the PULL transaction with the anti-counterfeiting information and metadata of the last PUSH1 transaction; if they are the same, the software downloaded by the user is genuine; otherwise, the software downloaded by the user is pirated.

[0026] To better implement this invention, a software verification interface is further published on the blockchain. This interface obtains the hash value h published by the software vendor through a PUSH transaction via a PULL transaction, and calculates the hash value h(m) of the downloaded software through hash operations. If the hash value h obtained through the PULL transaction is the same as the hash value h(m) of the downloaded software, the user has obtained genuine software, and the result is "Yes"; if the hash value h obtained through the PULL transaction is different from the hash value h(m) of the downloaded software, the user has obtained pirated software, and the result is "No".

[0027] To better implement this invention, the verification interface further obtains the anti-counterfeiting information and metadata at blockchain address A through a PULL transaction. The anti-counterfeiting information and metadata obtained through the PULL transaction are compared with the anti-counterfeiting information and metadata of the last PUSH1 transaction. If they are the same, the software downloaded by the user is genuine software; otherwise, the software downloaded by the user is pirated software.

[0028] To better implement the present invention, the PULL transaction further carries a digital signature from the software vendor.

[0029] To better implement the present invention, the blockchain further stores the hash value of the PUSH2 transaction.

[0030] To better implement this invention, the hash value of the PUSH2 transaction is further defined as not exceeding one hundred bytes in the blockchain.

[0031] Based on the above-mentioned software anti-counterfeiting method based on blockchain technology, in order to better realize the present invention, a software anti-counterfeiting system is further proposed, including a publishing unit, a downloading unit, a PUSH transaction unit, a PULL transaction unit, a calculation unit, a verification unit, and an output unit.

[0032] The publishing unit is used by software vendors to publish software on the blockchain for address A, PUSH transactions, and PULL transactions.

[0033] The PUSH transaction unit is used by software vendors to release anti-counterfeiting information and metadata of genuine software;

[0034] The download unit is used for downloading software that the user downloads from the Internet;

[0035] The PULL transaction unit is used to obtain the anti-counterfeiting information and metadata of genuine software;

[0036] The computing unit is used to calculate the hash value of the downloaded software;

[0037] The verification unit is used to verify whether the hash value of the genuine software is equal to the hash value of the downloaded software;

[0038] The output unit is used to output the result of the verification unit to the user. If the verification results are equal, the output message is "Genuine Software"; otherwise, the output message is "Pirated Software".

[0039] Based on the aforementioned software anti-counterfeiting method based on blockchain technology, in order to better realize the present invention, a storage medium containing computer-executable instructions is further proposed, wherein the computer-executable instructions are used to execute the aforementioned software anti-counterfeiting method when executed by a computer processor.

[0040] The present invention has the following beneficial effects:

[0041] (1) Compared with existing solutions, this invention allows users to easily verify the security of downloaded software without requiring excessive software knowledge;

[0042] (2) This invention constructs two transaction chains by combining on-chain and off-chain transactions, which improves the scalability of software anti-counterfeiting. It can ensure that when software vendors need to add additional software metadata when releasing software, it will not generate more expenses and economic costs, thus reducing the economic costs for software vendors when releasing software.

[0043] (3) This invention uploads information such as the software version number through blockchain, eliminating the need for users to authenticate the identity of the software vendor;

[0044] (4) This invention proposes two transaction types, PUSH transaction and PULL transaction, at the same time. PUSH transaction can upload software version information and increase the cost of malicious software to do evil. PULL transaction can make it convenient for users to obtain software version information.

[0045] (5) This invention effectively prevents users from downloading malicious pirated software, improves the security of user devices, and enhances users' trust in software vendors. Attached Figure Description

[0046] Figure 1 This is a schematic diagram illustrating the PUSH transaction process of this invention;

[0047] Figure 2 This is a schematic diagram illustrating the PULL transaction process of this invention;

[0048] Figure 3 A schematic diagram of the system architecture when setting up the verification interface for this invention;

[0049] Figure 4 This is a schematic diagram illustrating the linking relationship between PUSH1 and PUSH2 transactions in an embodiment of the present invention. Detailed Implementation

[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments, and therefore should not be regarded as a limitation on the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "set up," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0052] Example 1:

[0053] This embodiment proposes a software anti-counterfeiting method based on blockchain technology, including the following steps:

[0054] Step 1: Obtain the address A publicly disclosed by the software vendor on the blockchain, generate PULL and PUSH transactions on the blockchain, and publish the anti-counterfeiting information of the genuine software through the PUSH transaction. The anti-counterfeiting information includes at least the software name n, version number v, hash value h, and date d of the genuine software.

[0055] Step 2: Obtain the software downloaded by the user from the Internet based on the software name n, version number v, and date d, and obtain the hash value h(m) of the downloaded software through the obtained downloaded software;

[0056] Step 3: Obtain the hash value h of the genuine software obtained by the user through the PULL transaction in address A. Compare the hash value h(m) of the downloaded software obtained in Step 2 with the hash value h of the genuine software. If they are equal, the software downloaded by the user is genuine software; otherwise, the software downloaded by the user is pirated software.

[0057] Working Principle: This embodiment uses QQ software as an example to explain in detail the process of a user searching for and downloading QQ software online. If a user wants to obtain QQ software version 1.0, which was released in 2019, the user goes online to search for such software. The user finds a website that claims to have the QQ software the user wants, specifically version 1.0, released in 2019. The user downloads it, but cannot be sure if this software is the same as the official QQ version 1.0 released by Tencent in 2019. Therefore, a hash calculation is needed for comparison. If the website sends the user other versions of QQ, the final result will also be inconsistent, so the user will know that this is not the software they want. This is the process of a user searching for and downloading the software they need online. They can download it through any channel. The method proposed in this embodiment allows the user to know whether the downloaded software is the software they expected.

[0058] This embodiment obtains the address A of the software published by the software vendor on the blockchain and publishes PUSH and PULL transactions. It then obtains the hash value of the software published by the user through the PULL transaction and compares it with the hash value of the software downloaded by the user from the Internet. If they are equal, the software is considered genuine; otherwise, it is considered pirated. This allows users to easily verify the security of downloaded software without much software knowledge, effectively preventing users from downloading malicious pirated software, improving the security of user devices, and enhancing user trust in software vendors.

[0059] Example 2:

[0060] Based on Example 1 above, this embodiment splits the PUSH transaction into PUSH1 and PUSH2 transactions and performs anti-counterfeiting verification on the software as follows:

[0061] Step S1: Generate a PUSH1 transaction on the blockchain, and publish the anti-counterfeiting information and metadata of the software through the PUSH1 transaction. The metadata includes the description of the software and the license of the software. The PUSH1 transaction is stored in the software vendor's local storage.

[0062] Step S2: Generate PUSH2 transaction on the blockchain and store the hash value h1 of PUSH1 transaction in PUSH2 transaction;

[0063] Step S3: Repeat steps S1 and S2 until n PUSH2 transactions are generated to form a blockchain transaction chain; generate n PUSH1 transactions to form a local transaction chain in the software vendor's local storage, and store the hash value of the (n-1)th PUSH2 transaction in the PUSH1 transaction.

[0064] Step S4: Obtain the hash value h of the genuine software in blockchain address A through the PULL transaction. Compare the hash value h of the genuine software with the hash value h(m) of the downloaded software. If they are equal, the software downloaded by the user is genuine software; otherwise, the software downloaded by the user is pirated software.

[0065] Working Principle: The above scheme utilizes blockchain to upload and download anti-counterfeiting information for software. Besides the anti-counterfeiting information, publishers and users inevitably involve other information when releasing and downloading software, such as software descriptions and licenses. We collectively refer to this information as software metadata. Our above embodiment does not involve uploading software metadata to the blockchain, as uploading metadata does not affect the anti-counterfeiting process. However, uploading software metadata allows users to better understand the software, and software publishers may also need to upload information beyond anti-counterfeiting based on their specific needs.

[0066] If software publishers want to upload the software's anti-counterfeiting information along with its metadata to the blockchain, the overhead of uploading to the blockchain increases with the amount of data uploaded. This can easily lead to problems such as low scalability and high overhead in the above solution.

[0067] Therefore, in order to further improve the scalability of the solution and reduce the overhead of uploading software anti-counterfeiting information and corresponding metadata, this embodiment uses blockchain to construct a software anti-counterfeiting information chain. This chain is not recorded on the blockchain, but only the hash value of each anti-counterfeiting record is recorded on the blockchain, which only occupies a few dozen bytes. This greatly reduces the overhead incurred by software publishers in using blockchain to ensure software security. At the same time, the release history and update information of the software can also be traced through this chain.

[0068] The other parts of this embodiment are the same as those in Embodiment 1 above, so they will not be described again.

[0069] Example 3:

[0070] This embodiment, based on any one of the above embodiments 1-2, provides a detailed description of the process by which a user downloads software and verifies its authenticity.

[0071] How it works: First, the software developer needs to have a public address on the blockchain so that users can obtain anti-counterfeiting information about the software from that address.

[0072] Every time a software developer releases software, they need to upload anti-counterfeiting information about the software to the blockchain. The main fields involved are Name, Version, Hash, and Date, which represent the software name, version number, hash value, and release date, respectively.

[0073] After obtaining software from the internet, users need to access the anti-counterfeiting information for that version of software through the blockchain address information publicly available from the software vendor, and then calculate and compare the hash value of the obtained software with the hash value obtained from the blockchain. Some common and widely used algorithms for calculating file hash functions include MD5 and SHA3.

[0074] Specifically, the uploading of anti-counterfeiting information by software vendors and the acquisition of such information by users can be abstracted into two transaction types: PUSH and PULL. These can be represented by the following data structure:

[0075] {

[0076] TransactionType:PUSH

[0077] Sender: / / is the transaction sender, which should be the software developer.

[0078] Name: / / Software Name

[0079] Version: / / Version Number

[0080] Hash: / / software hash value

[0081] Date: / / Release Date

[0082] Metadata: / / Other valid fields that identify transactions, also known as software metadata.

[0083] }

[0084] {

[0085] TransactionType:PULL

[0086] Sender: / / Transaction sender, user

[0087] Receiver: / / the receiver, the software developer

[0088] Name: / / Software Name

[0089] Version: / / Version Number

[0090] }

[0091] In this process, the PUSH transaction will be confirmed by other nodes and ultimately recorded on the blockchain, specifically at the address publicly disclosed by the software developer. Therefore, this transaction requires a fee to complete, which increases the cost for malicious attackers to tamper with legitimate software, implant malicious code, and impersonate it.

[0092] A PULL transaction, on the other hand, is a fake transaction and is not recorded on the blockchain. Therefore, this transaction incurs no fees; its purpose is to retrieve anti-counterfeiting information about the software from other nodes. Because the blockchain is tamper-proof, it ensures that the anti-counterfeiting information obtained by the user is authentic and reliable.

[0093] Below is the process by which software developers release software, and users download and verify its authenticity:

[0094] 1. Obtain the software vendor's publicly disclosed address A on the blockchain;

[0095] 2. The software vendor releases the software via a push transaction and pays the corresponding fee. The software name is n, the version number is v, the hash value is h, and the date is d. The software's anti-counterfeiting information is ultimately recorded at address A on the blockchain.

[0096] 3. Obtain the software downloaded by the user from the Internet, with software name n and version number v, and software content m;

[0097] 4. Obtain the anti-counterfeiting information about the software from address A retrieved by the user through the PULL transaction, namely the software name n, version number v, hash value h, and date d initially uploaded by the software publisher;

[0098] 5. The system determines the authenticity of software by comparing the hash h(m) of the downloaded software content with the hash value h obtained from the blockchain. If they are equal, the user can confirm that they have downloaded genuine software; otherwise, the user has downloaded pirated software.

[0099] Compared to traditional solutions, the proposed solution in this embodiment does not require users to verify the software publisher's signature themselves. This step is already completed by nodes on the network when the publisher releases the software and submits a PUSH transaction. The verification process is an internal mechanism of the blockchain. Simply put, when the software publisher releases the software, a PULL transaction is generated on the blockchain. This transaction automatically carries the digital signature of the transaction initiator. Then, this transaction begins to be verified by all participants on the network, i.e., the nodes on the network. There are many mature technologies for verifying digital signatures. Only after a majority of nodes on the network confirm that the transaction was indeed initiated by the software vendor will the transaction be finally recorded on the blockchain and become a valid transaction. The blockchain itself contains an identity signature verification mechanism, and the specific process is the same as that of electronic signature verification. Therefore, users do not need to perform additional verification locally and do not need to doubt the authenticity of other entities' identities on the blockchain.

[0100] In addition, the tamper-proof nature of blockchain can ensure that the anti-counterfeiting information obtained by users is authentic and reliable. At the same time, based on the generation record of blockchain, the version update record of the corresponding software can be tracked very well.

[0101] Finally, to make it easier for ordinary users to verify the authenticity of software, software vendors can provide a corresponding software verification interface. This interface helps users quickly complete the verification process, or users can choose to verify it themselves. The purpose of this interface is to further reduce the user's verification efforts, completing steps 1-5 of the verification process on their behalf, and ultimately returning information on the authenticity of the software obtained. If the user has obtained genuine software, the verification interface returns "yes"; otherwise, it returns "no". Users can choose to trust the result returned by this interface or choose to question it and verify it themselves. Furthermore, the code for this verification interface can be open source, thus ensuring trust between users and software vendors without harming the interests of the software vendors.

[0102] The other parts of this embodiment are the same as any one of the embodiments 1-2 above, so they will not be described again.

[0103] Example 4:

[0104] This embodiment modifies the definition of PUSH transactions based on any one of embodiments 1-3 above, and provides a detailed explanation of the modification process.

[0105] Working principle: First, the definition of the PUSH transaction in Example 3 is modified as follows:

[0106] {

[0107] TransactionType:PUSH1

[0108] Sender: / / is the transaction sender, which should be the software developer.

[0109] Name: / / Software Name

[0110] Version: / / Version Number

[0111] Hash: / / software hash value

[0112] Date: / / Release Date

[0113] Metadata: / / Other valid fields that identify transactions, also known as software metadata.

[0114] PrevHash: / / The hash value of the previous PUSH2 transaction

[0115] }

[0116] {

[0117] TransactionType:PUSH2

[0118] HashPUSH1: / / The hash value of the PUSH1 transaction

[0119] }

[0120] Therefore, the process of obtaining software released by software vendors becomes as follows:

[0121] 1. Similar steps to the above embodiments are followed, but a transaction is published via PUSH1, and this transaction is stored in the software vendor's local storage. In fact, the newly added field PrevHash is the hash value of the previous PUSH2 transaction.

[0122] 2. Then, a PUSH2 transaction is published in the blockchain. The HashPUSH1 field of this transaction is the hash value of the PUSH1 transaction that was just stored locally, i.e., h(PUSH1).

[0123] Ultimately, by combining blockchain technology, the following two chain-like structures will be formed, one on the blockchain and one locally:

[0124] like Figure 4As shown in the diagram, solid lines represent actual links, while dashed lines represent links that don't actually exist but can be constructed using solid lines. Suppose the vendor has already uploaded transactions PUSH1 and PUSH2, marked ① in the diagram. The vendor updates its software and uploads new information. It first generates a transaction PUSH1 in ②, whose PrevHash field points to the PUSH2 transaction in ①. Then it generates another PUSH2 transaction in ②, whose hash HashPUSH1 points to the PUSH1 transaction in ②. The links between solid lines indirectly form the links between dashed lines.

[0125] The immutability of blockchain guarantees the immutability of the transaction chain on the blockchain, and the link between the local transaction chain and the transaction chain on the blockchain also guarantees the immutability of the local transaction chain. Ultimately, the record stored on the blockchain is simply the hash value of all PUSH1 transactions locally, while the PUSH1 transactions actually record the software's anti-counterfeiting information and corresponding metadata. Software vendors can expand the corresponding metadata to add more descriptive content about the software without incurring additional overhead, thus demonstrating excellent scalability.

[0126] It can obtain anti-counterfeiting information and corresponding metadata about the software from users through PULL transactions. However, this information is not obtained from the blockchain, but from the local transaction chain. Nevertheless, it can ensure the authenticity of the software. Users can verify the software's authenticity through the same verification process. At the same time, the obtained software metadata can better help users understand the software.

[0127] If a user questions the authenticity of software information obtained from the local transaction chain, they can take the following steps:

[0128] 1. Obtain the last PUSH2 transaction published on the blockchain by the software vendor's public address A, i.e., the PUSH2 transaction marked as n in the diagram.

[0129] 2. Follow the solid line links to find the corresponding PUSH1 transaction.

[0130] 3. If the content of this transaction is the same as the software anti-counterfeiting information and metadata obtained through the PULL transaction, then the user can be certain of the software's authenticity.

[0131] The other parts of this embodiment are the same as any one of the embodiments 1-3 above, so they will not be described again.

[0132] Example 5:

[0133] This embodiment is based on any one of embodiments 1-4 above, such as Figure 2 As shown, the software anti-counterfeiting system is described in detail.

[0134] Working principle: Includes publishing unit, download unit, PUSH transaction unit, PULL transaction unit, calculation unit, verification unit, and output unit;

[0135] The publishing unit is used by software vendors to publish software on the blockchain, including address A, PUSH transactions, and PULL transactions.

[0136] The PUSH transaction unit is used to obtain anti-counterfeiting information and / or metadata of the software released by the software vendor;

[0137] The download unit is used to acquire software downloaded by the user from the Internet;

[0138] The PULL transaction unit is used to obtain the user's anti-counterfeiting information and / or metadata at address A;

[0139] The computing unit is used to calculate the hash value of the software in the PUSH transaction unit and the hash value of the software in the PULL transaction unit;

[0140] The verification unit is used to verify whether the hash value of the software in the PUSH transaction unit and the hash value of the software in the PULL transaction unit are equal;

[0141] The output unit is used to output the result of the calculation unit to the user. If the calculation results are equal, the output information is "Genuine Software"; otherwise, the output information is "Pirated Software".

[0142] The other parts of this embodiment are the same as any one of the embodiments 1-4 above, so they will not be described again.

[0143] Example 6:

[0144] This embodiment is based on any one of embodiments 1-5 above, such as Figure 3 As shown, the software anti-counterfeiting storage medium is described in detail.

[0145] Working principle: This embodiment proposes a combined on-chain and off-chain storage approach, which reduces the cost of ensuring software security and improves the scalability of the solution.

[0146] Simply uploading information to the blockchain to ensure software anti-counterfeiting would inevitably lead to high anti-counterfeiting costs and poor scalability, as is the case in this embodiment. When software vendors need to upload information beyond anti-counterfeiting measures, such as user manuals, the cost increases as the amount of data uploaded to the blockchain grows. Therefore, this embodiment further improves upon this by combining on-chain and off-chain storage to ensure scalability while reducing anti-counterfeiting costs.

[0147] The immutability of blockchain guarantees the immutability of the transaction chain on the blockchain, and the link between the local transaction chain and the transaction chain on the blockchain also guarantees the immutability of the local transaction chain. Ultimately, the record we store on the blockchain is simply the hash value of all local PUSH1 transactions, while the PUSH1 transactions actually record the software's anti-counterfeiting information and corresponding metadata. Software vendors can expand the corresponding metadata to add more descriptive content about the software without incurring additional overhead, thus demonstrating excellent scalability.

[0148] The other parts of this embodiment are the same as any one of the embodiments 1-5 above, so they will not be described again.

[0149] Example 7:

[0150] This embodiment, based on any one of embodiments 1-6 above, provides a detailed explanation of the process of verifying the hash value of software P released by the software vendor and the hash value of software Q downloaded by the user.

[0151] Working principle: This embodiment proposes a software anti-counterfeiting method based on blockchain technology, including the following steps:

[0152] Step 1: Obtain the address A publicly disclosed by the software vendor on the blockchain, generate PULL and PUSH transactions on the blockchain, and publish the anti-counterfeiting information of software P through the PUSH transaction. The anti-counterfeiting information includes at least the software name n, version number v, hash value h, and date d. Note: The hash value h obtained in Step 1 is the hash value h of the content of software P.

[0153] Step 2: Obtain the software Q downloaded by the user from the Internet based on the software name n, version number v, and date d, and obtain the software content m through the obtained software Q;

[0154] Step 3: Obtain the hash value h of software P obtained by the user in address A through the PULL transaction. Compare the hash value h(m) of software content m obtained in Step 2 with the hash value h of software P. If they are equal, the software Q downloaded by the user is genuine software; otherwise, the software Q downloaded by the user is pirated software.

[0155] Furthermore, when publishing the anti-counterfeiting information of software P through PUSH transactions, the software's metadata is also published. The specific steps for verifying software Q by obtaining the metadata are as follows:

[0156] Step S1: Generate a PUSH1 transaction on the blockchain, and publish the anti-counterfeiting information and metadata of software P through the PUSH1 transaction. The metadata includes the description of the software and the software license. The PUSH1 transaction is stored in the software vendor's local storage.

[0157] Step S2: Generate PUSH2 transaction on the blockchain and store the hash value h1 of PUSH1 transaction in PUSH2 transaction;

[0158] Step S3: Repeat steps S1 and S2 until n PUSH2 transactions are generated to form a blockchain transaction chain; generate n PUSH1 transactions to form a local transaction chain in the software vendor's local storage, and store the hash value of the (n-1)th PUSH2 transaction in the PUSH1 transaction.

[0159] Step S4: Obtain the hash value h of software P in blockchain address A through the PULL transaction. Compare the hash value h of software P with the hash value h(m) of software Q. If they are equal, the software Q downloaded by the user is genuine software; otherwise, the software Q downloaded by the user is pirated software.

[0160] Furthermore, a software verification interface is published on the blockchain. The verification interface obtains the anti-counterfeiting information and metadata released by the software vendor through PUSH transactions via PULL transactions, verifies the anti-counterfeiting information and / or metadata of software Q, completes the authenticity verification process of software Q on behalf of the user, and returns the authenticity information of software Q obtained at the moment to the user. If the user obtains genuine software, the result is "yes"; otherwise, the result is "no".

[0161] A software anti-counterfeiting system includes a publishing unit, a downloading unit, a PUSH transaction unit, a PULL transaction unit, a calculation unit, a verification unit, and an output unit;

[0162] The publishing unit is used by software vendors to publish software P on the blockchain at address A, PUSH transactions, and PULL transactions.

[0163] The PUSH transaction unit is used by software vendors to release anti-counterfeiting information and metadata of software P;

[0164] The download unit is used by the user to download software Q from the Internet;

[0165] The PULL transaction unit is used to obtain the anti-counterfeiting information and metadata of software P;

[0166] The computing unit is used to calculate the hash value of software Q;

[0167] The verification unit is used to verify whether the hash value of software P is equal to the hash value of software Q;

[0168] The output unit is used to output the result of the verification unit to the user. If the verification results are equal, the output message is "Genuine Software"; otherwise, the output message is "Pirated Software".

[0169] A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the aforementioned software anti-counterfeiting method.

[0170] The other parts of this embodiment are the same as any one of the embodiments 1-6 above, so they will not be described again.

[0171] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A software anti-counterfeiting method based on blockchain technology, characterized in that, The method comprises the following steps: Step 1: obtaining the address A disclosed by a software manufacturer on a blockchain, generating a PULL transaction and a PUSH transaction on the blockchain, and publishing anti-counterfeiting information of the genuine software through the PUSH transaction, wherein the anti-counterfeiting information at least comprises a software name n, a version number v, a hash value h, and a date d of the genuine software; Step 2: obtaining the software downloaded by a user from the Internet according to the software name n, the version number v, and the date d, and obtaining a hash value h(m) of the downloaded software through the downloaded software; Step 3: obtaining the hash value h of the genuine software published by the PUSH transaction in the address A through the PULL transaction, comparing the hash value h(m) of the downloaded software obtained in step 2 with the hash value h of the genuine software, and if they are equal, the software downloaded by the user is the genuine software; otherwise, the software downloaded by the user is the pirated software; The specific steps of splitting the PUSH transaction into PUSH1 transaction and PUSH2 transaction for anti-counterfeiting verification of the software are as follows: Step S1: generating a PUSH1 transaction on the blockchain, publishing anti-counterfeiting information and meta information of the genuine software through the PUSH1 transaction, wherein the meta information comprises an explanation of the genuine software and a license of the software, and storing the PUSH1 transaction in a local storage of the software manufacturer; Step S2: generating a PUSH2 transaction on the blockchain, and storing a hash value h1 of the PUSH1 transaction in the PUSH2 transaction; Step S3: repeating steps S1 and S2 until n PUSH2 transactions are generated to form a blockchain transaction chain on the blockchain; n PUSH1 transactions are generated to form a local transaction chain in the local storage of the software manufacturer, and a hash value h2 of the (n-1)th PUSH2 transaction is stored in the nth PUSH1 transaction; Step S4: obtaining the hash value h of the genuine software in the address A on the blockchain through the PULL transaction, comparing the hash value h of the genuine software with a hash value h(m) of the downloaded software, and if they are equal, the downloaded software is the genuine software; otherwise, the downloaded software is the pirated software.

2. The software anti-counterfeiting method based on blockchain technology according to claim 1, characterized in that, The specific operation of verifying the authenticity of the software by obtaining the anti-counterfeiting information and the meta information of the software is as follows: obtaining the last PUSH2 transaction at the address A on the blockchain, finding the corresponding PUSH1 transaction of the last PUSH2 transaction, comparing the anti-counterfeiting information and the meta information obtained through the PULL transaction at the address A on the blockchain with the anti-counterfeiting information and the meta information of the last PUSH1 transaction, and if they are the same, the downloaded software is the genuine software; otherwise, the downloaded software is the pirated software. 3.The software anti-counterfeiting method based on blockchain technology of claim 1, wherein, The software verification interface is published on the blockchain, the software verification interface acquires the hash value h published by the software manufacturer through the PUSH transaction through the PULL transaction, and calculates the hash value h(m) of the downloaded software through hash operation, if the hash value h acquired through the PULL transaction is the same as the hash value h(m) of the downloaded software, the downloaded software is the genuine software, and the result "yes" is returned; if the hash value h acquired through the PULL transaction is different from the hash value h(m) of the downloaded software, the downloaded software is the pirated software, and the result "no" is returned.

4. The software anti-counterfeiting method based on blockchain technology according to claim 3, characterized in that, The verification interface acquires the anti-counterfeiting information and the meta information at the blockchain address A through the PULL transaction, compares the anti-counterfeiting information and the meta information acquired through the PULL transaction with the anti-counterfeiting information and the meta information of the last PUSH1 transaction, if they are the same, the downloaded software is the genuine software; otherwise, the downloaded software is the pirated software.

5. The software anti-counterfeiting method based on blockchain technology according to claim 1, characterized in that, The PULL transaction carries the digital signature of the software manufacturer.

6. The software anti-counterfeiting method based on blockchain technology according to claim 1, characterized in that, The hash value of the PUSH2 transaction stored on the blockchain.

7. The software anti-counterfeiting method based on blockchain technology according to claim 6, characterized in that, The hash value of the PUSH2 transaction is not more than one hundred bytes in the blockchain.

8. A software anti-counterfeiting system for performing a software anti-counterfeiting method based on blockchain technology according to claim 1; characterized in that, It comprises a publishing unit, a downloading unit, a PUSH transaction unit, a PULL transaction unit, a calculating unit, a verifying unit, and an output unit. The publishing unit is used for the software manufacturer to publish the address A of the software on the blockchain, the PUSH transaction, and the PULL transaction. The PUSH transaction unit is used for the software manufacturer to publish the anti-counterfeiting information and the meta information of the genuine software. The downloading unit is used for the user to download the software from the Internet. The PULL transaction unit is used for acquiring the anti-counterfeiting information and the meta information of the genuine software. The calculating unit is used for calculating the hash value of the downloaded software. The verifying unit is used for verifying whether the hash value of the genuine software is equal to the hash value of the downloaded software. The output unit is used for outputting the result of the verifying unit to the user, if the verifying result is equal, the information "genuine software" is outputted, otherwise, the information "pirated software" is outputted.

9. A storage medium containing computer-executable instructions, wherein: The computer executable instructions, when executed by the computer processor, are used for executing the software anti-counterfeiting method based on the blockchain technology according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for publishing and validating software applications

    CN107077557A