Software copyright transaction and protection method and system based on block chain
By integrating software copyright transactions and plagiarism detection on the blockchain, and using alliance chains and IPFS, the problems of complex software copyright transactions and difficult plagiarism detection are solved, and efficient, safe and credible copyright protection and transactions are achieved.
Patent Information
- Application Number
- CN202411674150.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-21
AI Technical Summary
In the prior art, software copyright storage costs are high, transaction complexity and plagiarism detection are difficult.
Using blockchain-based software copyright transactions and protection methods, software copyright transactions and plagiarism detection are integrated through alliance chains and interstellar file systems (IPFS), abstract syntax trees and improved Jaccard coefficient algorithms are used to perform plagiarism detection, and copyright transactions are conducted through smart contracts.
It realizes low-cost, efficient, traceable and trustworthy software copyright transactions and protection, reduces judicial costs, improves the ability to deposit copyright evidence and protect rights, and enhances the system's anti-attack ability and transparency.
Smart Images

Figure CN119622670A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain application technology, and in particular to a software copyright transaction and protection method and system based on blockchain. Background Art
[0002] In the current software copyright protection practice, although traditional centralized storage methods ensure the security of copyright information to a certain extent, they have significant limitations, including high storage costs, cumbersome application processes, long waiting times, and susceptibility to tampering and theft; these defects not only make it difficult for the rights of original creators to be fully protected, but also increase the complexity of copyright protection; although there are suggestions to use IPFS and blockchain technology to strengthen the protection of digital media copyrights, such as Dr. Kwame proposed in "Digital Media Copyright and Content Protection Using IPFS and Blockchain" to combine the Interstellar File System (IPFS) and Fabric Alliance blockchain technology to help protect digital media copyrights and ensure full ownership, the protection of software copyrights is more complicated than digital copyrights; on the one hand, the research on software copyrights is mostly focused on code plagiarism detection, and has failed to fundamentally solve the problem of copyright confirmation and protection; on the other hand, it is difficult to define software plagiarism. Although blockchain technology provides an unalterable and traceable way to store copyright, in actual operation, how to effectively use these technologies to detect and prevent software plagiarism is still an unresolved problem;
[0003] The present invention proposes a blockchain-based platform that integrates software copyright transactions and software plagiarism detection, so that compared with previous systems, it exhibits higher integration, faster response speed and better storage efficiency; the system combines two methods in use to ensure the traceability of copyright information, while facilitating the detection of infringing software and subsequent genuine rights protection actions. Summary of the invention
[0004] In view of the shortcomings of the above-mentioned technologies, the purpose of the present invention is to provide a software copyright transaction and protection method and system based on blockchain to solve the problems of high copyright storage cost, complicated transactions and difficult plagiarism detection in the prior art;
[0005] To achieve the above object, the present invention adopts the following technical solutions, including:
[0006] S1. Several software vendors establish a consortium chain through consensus, and each offline terminal device serves as an InterPlanetary File System (IPFS) node;
[0007] S2. Software developers upload finished software and its copyright information to the Interstellar File System (IPFS), and record and verify the copyright information on the blockchain digital node;
[0008] S3. Generate a digital signature based on the copyright information. The software extracts the syntax structure of the software code through the abstract syntax tree. The extracted tree is a tree representation of the abstract syntax structure of the source code. Each node on the tree represents a structure in the source code. The digital signature, abstract syntax tree, copyright information and software version information are integrated and written into the blockchain digital node as the initial block of the alliance chain.
[0009] S4. After the two parties to the software purchase reach a transaction intention, the copyright transaction is carried out through a smart contract; the purchaser conducts an off-chain transaction after meeting the conditions of the smart contract; after the transaction is completed, the transaction process is stored in the digital node of the alliance chain, and the purchaser obtains the hash value index CID of the latest version of the software on the Interstellar File System IPFS. CID is the only way to accurately obtain the corresponding software file in IPFS;
[0010] S5. When the software purchase parties discover suspected infringing software, they will propose a detection requirement. The suspected software will be uploaded to the alliance chain after being processed through the abstract syntax tree. The smart contract will automatically compare the abstract syntax tree structure of the genuine software and the suspected software.
[0011] S6. Set a similarity threshold, and calculate the similarity of the two softwares according to the improved Jaccard coefficient determination interval algorithm. According to the calculation results, determine whether there is plagiarism.
[0012] Software suppliers establish alliance chains through a consensus mechanism. Initial software suppliers are required to undergo real-name authentication; suppliers joining the alliance chain must verify their identities through authoritative authentication; after the authentication is completed, other suppliers on the alliance chain will allow the supplier to join and grant it the rights to upload software and participate in voting. Through real-name authentication and authoritative authentication, suppliers can ensure the authenticity of their identities, reduce the occurrence of malicious behavior, and further enhance the credibility of the system.
[0013] The abstract syntax tree extracts the grammatical structure of the software code and first preprocesses the source code to be converted, including removing comments and space characters, unifying the code format, and normalizing the variable names, thereby converting the code into a standardized JavaScript code form with unified specifications, reducing the complexity of subsequent processing and analysis, and improving the efficiency of code conversion, optimization and analysis.
[0014] Create a side chain to separate copyright transactions of different software. The number of side chains is the same as the number of software for copyright transactions. The initial node generated by the side chain will be recorded in the main chain. As the number of software increases, the system capacity can be easily expanded, performance can be optimized, and transaction processing speed can be increased by adding side chains.
[0015] The second object of the present invention is to provide a copyright trading system generated according to the software copyright protection method based on blockchain technology, comprising the following steps:
[0016] The data upload module is used by software suppliers to upload information related to finished software and the abstract syntax tree of the software after passing identity authentication. This information will serve as the basic data for copyright protection and transactions, and provide necessary data support for subsequent processes;
[0017] Record storage module, including Interstellar File System IPFS and consortium chain. The former is used to permanently store detailed information of software products and suppliers, while the latter records software version update information and evidence of copyright transaction process;
[0018] A data processing module for processing and converting uploaded data, including generating a digital signature for the identity of the software vendor, providing software source code preprocessing, and extracting the abstract syntax tree structure of the software;
[0019] The transaction module includes providing a platform for both parties in software copyright transactions to negotiate the price of the software, and is responsible for the delivery of the software after the transaction is completed and packaging the transaction data for storage;
[0020] The plagiarism detection module is used to determine whether the suspected software has plagiarism behavior. It extracts non-obfuscating features in the source code and converts them into abstract syntax trees, identifies the similarities between abstract syntax trees, and provides technical support for plagiarism detection.
[0021] Threshold change module, used to improve the plagiarism interval determination threshold, and dynamically adjust the threshold according to the complexity and comprehensiveness of the software;
[0022] The data upload module, transaction module, data processing module, and plagiarism detection module are all connected to the record storage module to ensure the consistency and traceability of data in the entire system; the threshold change module is connected to the plagiarism detection module, and each change in the threshold will directly affect the result obtained by the plagiarism detection module.
[0023] As described above, the software copyright transaction and protection method based on blockchain of the present invention has the following beneficial effects:
[0024] The present invention integrates software copyright transaction and software plagiarism detection in the same environment, which greatly reduces the difficulty of use and improves the convenience of use compared with the method with only a single function.
[0025] The alliance blockchain technology is adopted to provide a low-cost, efficient, traceable and trustworthy solution, which can reduce judicial costs, protect legal rights and interests, and improve the ability of copyright evidence and rights protection. The alliance chain is established through consensus among software suppliers, which ensures the decentralized nature and democratic governance structure of the chain and enhances the system's anti-attack ability and transparency. Each offline terminal acts as an IPFS node, which helps to realize the distributed storage of data and improve the availability and disaster resistance of data.
[0026] Generating digital signatures and extracting abstract syntax trees of software code provide a unique and content-based identifier for copyright information. Writing this information into the blockchain as the initial block establishes a clear and tamper-proof evidence for software copyright, providing a solid foundation for copyright verification and dispute resolution.
[0027] After the two parties to the software purchase reach a transaction intention, they conduct the transaction off-chain through smart contracts, which simplifies the transaction process and reduces transaction costs. After the transaction is completed, the relevant information is stored on the alliance chain to ensure the transparency and traceability of the transaction process.
[0028] Setting a similarity threshold and calculating the similarity through an interval determination algorithm provides a clear standard for plagiarism judgment. This method not only improves the objectivity of plagiarism detection, but also helps reduce human subjective judgment errors, making copyright protection more fair and reliable.
[0029] At the same time, the blockchain-based software copyright transaction and protection system of the present invention has the following beneficial effects:
[0030] The system uses software sharding storage, uploads it to the IPFS network, and combines it with the alliance chain for copyright transactions, realizing a decentralized storage and processing model; by separating the software upload and copyright transaction links, the system's operating efficiency and overall security are effectively improved.
[0031] In addition, the system uses the abstract syntax tree structure for comparison and introduces an improved Jaccard coefficient algorithm to accurately identify software plagiarism behavior; in order to adapt to the complexity of different types of software, the system can dynamically adjust the threshold of plagiarism detection to ensure the accuracy and flexibility of the copyright protection process, further improving the application effect of the system in the field of copyright protection and ensuring the long-term applicability and innovation ability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The advantages of the above aspects of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0033] Figure 1 It is a flowchart of a software copyright transaction and protection method based on blockchain according to a specific embodiment of the present invention;
[0034] Figure 2 It is a schematic diagram of a software copyright transaction process performed by a software supplier according to a specific embodiment of the present invention;
[0035] Figure 3 It is a schematic diagram of a software copyright transaction process performed by a software purchaser according to a specific embodiment of the present invention;
[0036] Figure 4 It is a schematic diagram of detailed steps of plagiarism detection according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Example 1: Please refer to Figure 1 As shown, this example provides a software copyright transaction and protection method based on blockchain. The copyright transaction process includes the following steps:
[0039] S1. Several software vendors establish a consortium chain through consensus, and each offline terminal device serves as an InterPlanetary File System (IPFS) node;
[0040] S2. Software developers upload finished software and its copyright information to the Interstellar File System (IPFS), and record and verify the copyright information on the blockchain digital node;
[0041] S3. Generate a digital signature based on the copyright information. The software extracts the syntax structure of the software code through the abstract syntax tree. The extracted tree is a tree representation of the abstract syntax structure of the source code. Each node on the tree represents a structure in the source code. The digital signature, abstract syntax tree, copyright information and software version information are integrated and written into the blockchain digital node as the initial block of the alliance chain.
[0042] S4. After the two parties to the software purchase reach a transaction intention, the copyright transaction is carried out through a smart contract; the purchaser conducts an off-chain transaction after meeting the conditions of the smart contract; after the transaction is completed, the transaction process is stored in the digital node of the alliance chain, and the purchaser obtains the hash value index CID of the latest version of the software on the Interstellar File System IPFS. CID is the only way to accurately obtain the corresponding software file in IPFS;
[0043] In this solution, the software supplier undergoes real-name authentication through an authoritative certification body, obtains a digital certificate, generates a digital signature based on the copyright information, and writes the digital signature, copyright information, and the abstract syntax tree structure of the software into the consortium chain as the initial node. This process establishes the unique correspondence between the copyright information and the software supplier, ensuring the authenticity of the supplier's identity. Copyright information can be verified before each transaction, thereby achieving effective protection of software copyright.
[0044] The consensus mechanism allows suppliers to join the alliance chain, ensuring the security of the transaction environment and effectively preventing common transaction vulnerabilities, such as double-spending attacks. Each offline terminal acts as an IPFS node and participates in data storage and retrieval, which eliminates the single point of failure caused by centralized software storage, reduces costs, and ensures the expansion of subsequent software updates and the convenience of adding new software.
[0045] Example 2: Please refer to Figure 2 , Figure 3 and Figure 4 As shown, this example provides a software copyright transaction and protection method based on blockchain. The software protection process includes the following steps:
[0046] S1. When the software purchase parties discover suspected infringing software, they will propose a detection requirement. The suspected software will be uploaded to the alliance chain after being processed through the abstract syntax tree. The smart contract will automatically compare the abstract syntax tree structure of the genuine software and the suspected software.
[0047] S2. Set a similarity threshold and calculate the similarity of the two softwares based on the improved Jaccard coefficient determination interval algorithm. Based on the calculation results, determine whether there is plagiarism.
[0048] Using the characteristics of IPFS, the system divides the finished software into fixed-size data blocks and uploads them to decentralized nodes. This process generates a hash value for the software, and thanks to the advantages of distributed storage, it significantly improves the throughput of the system, and can handle access requests from different completed transactions at any time, achieving parallel processing of copyright transactions to complete software delivery, and reducing the transaction complexity that may arise during the copyright transfer process, that is, reducing the data information that software authors and buyers need to process during the transaction. Moreover, when the software needs to be updated, for some modules with unchanged functions, files with the same content will have the same index value, and there is no need to upload them repeatedly. Suppliers can use this feature to easily manage versions and trace the historical information of software copyrights;
[0049] When a suspected plagiarism incident occurs, it may come from outside, or it may be other similar software in the alliance chain. The first step is to preprocess the source code. The purpose of this step is to delete some source code that is not related to the programming logic. In addition, the functions that can be implemented in a variety of ways are standardized into a unified form. The compiler's parser is then used for analysis to generate an abstract syntax tree (AST); these parse trees usually contain a lot of information that is irrelevant to the logic and structure of the source code. In order to eliminate unnecessary nodes, all nodes that do not contain program structure information are deleted. Finally, the resulting tree contains only important nodes and contains the structural information of the program, which is called an abstract syntax tree. When the software in the alliance chain is uploaded to IPFS, the abstract syntax tree structure is saved in the alliance chain node. When there is suspected plagiarized software outside, the transaction parties can directly upload the abstract syntax tree of the software to be detected, triggering the smart contract to automatically detect it. The similarity coefficient of the two syntax trees will be automatically calculated in the contract through the formula. The formula is as follows:
[0050]
[0051] In the above formula, Sc1 and Sc2 are two software source codes that need to be verified for similarity. SET(Sc1) and SET(Sc2) are the standardized format sets of Javascript codes of Sc1 and Sc2 respectively. The similarity between the two source codes is expressed in the form of a similarity score. The similarity score ranges from 0 to 100, where 0 represents completely different source codes and 100 represents an exact copy without modification. Then, based on a reasonable threshold, if the similarity score exceeds the threshold, it can be determined whether the code is original or plagiarized. In addition, the threshold can vary with the amount of code. For example, for software with a large amount of code and more comprehensive functions, the similarity between them tends to be relatively high, so the corresponding threshold will be reduced accordingly.
[0052] The present invention also provides a software copyright transaction and protection system based on blockchain, which is characterized by comprising a data upload module, a record storage module, a data processing module, a transaction module, a plagiarism detection module and a threshold change module;
[0053] Data upload module: After passing identity verification, the software supplier uploads the relevant information of the finished software and the abstract syntax tree of the software. These data not only constitute the core foundation of copyright protection and transactions, but also provide necessary support for the subsequent processing and analysis of the system.
[0054] The record storage module includes the Interplanetary File System IPFS and the consortium chain. IPFS is responsible for permanently preserving detailed information on finished software products and suppliers to ensure that data cannot be tampered with and can be stored for a long time; the consortium chain records software version update information and evidence of copyright transaction processes to ensure the transparency and traceability of the transaction process.
[0055] Data processing module: mainly responsible for processing and converting uploaded data; this module can generate digital signatures for software suppliers to ensure the uniqueness and authenticity of the identity; at the same time, it provides preprocessing of software source code and extracts the abstract syntax tree structure of the software to provide support for plagiarism detection and subsequent transactions.
[0056] The transaction module provides a negotiation platform for both parties in the software copyright transaction, allowing the two parties to negotiate the software price. After the transaction is completed, the system automatically delivers the latest version of the software by sending the IPFS software node information to the buyer, and packages the transaction data and uploads it to the storage module to ensure that the entire transaction process is recorded completely and the fairness and legality of the transaction is guaranteed.
[0057] The plagiarism detection module is responsible for determining whether the suspected software has plagiarism. By extracting the non-obfuscation features in the source code and converting them into an abstract syntax tree, the system evaluates the similarity between software using the improved Jaccard coefficient, providing technical support for plagiarism detection and ensuring the effectiveness of copyright protection.
[0058] The threshold change module dynamically adjusts the threshold range for plagiarism determination according to the complexity and comprehensiveness of the software. As the threshold changes, the system can flexibly respond to the needs of different software and further improve the accuracy of plagiarism detection.
[0059] The data upload module, transaction module, data processing module and plagiarism detection module are all connected to the record storage module to ensure the consistency and traceability of data in the entire system; the threshold change module is connected to the plagiarism detection module, and each change in the threshold will directly affect the plagiarism detection result, ensuring that the detection process has high flexibility and accuracy.
[0060] In the blockchain-based software copyright trading and protection system, significant improvements have been achieved compared with the existing copyright trading platform; this system stores the software in IPFS after sharding, and conducts transactions on the consortium chain, ensuring decentralized storage of software, effectively separating the software upload and copyright trading processes, and improving transaction efficiency and security; at the same time, the system uses a comparative abstract syntax tree structure and an improved Jaccard coefficient to determine software plagiarism, which improves the accuracy of plagiarism detection, and dynamically adjusts the threshold for judging plagiarism to adapt to the complexity of different software, making copyright protection more refined.
[0061] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A software copyright transaction and protection method based on blockchain, characterized in that: The steps include: S1. Several software vendors establish a consortium chain through a consensus mechanism, and each offline terminal device serves as an InterPlanetary File System (IPFS) node; S2. Software developers upload finished software and its copyright information to the Interstellar File System (IPFS), and record and verify the copyright information in the alliance chain digital node; S3. Generate a digital signature based on the copyright information. The software extracts the syntax structure of the software code through an abstract syntax tree. The extracted abstract syntax tree is a tree representation of the abstract syntax structure of the source code. Each node on the tree represents a structure in the source code. Integrate digital signatures, abstract syntax trees, copyright information, and software version information, and write them into blockchain digital nodes as the initial block of the alliance chain; S4. After the two parties to the software purchase reach a transaction intention, the copyright transaction is carried out through a smart contract; the purchaser conducts an off-chain transaction after meeting the conditions of the smart contract; after the transaction is completed, the transaction process is stored in the digital node of the alliance chain, and the purchaser obtains the hash value index CID of the latest version of the software on the Interstellar File System IPFS. CID is the only way to accurately obtain the corresponding software file in IPFS; S5. When the software purchase parties discover suspected infringing software, they will propose a detection requirement. The suspected software will be uploaded to the alliance chain after being processed through the abstract syntax tree. The smart contract will automatically compare the abstract syntax tree structure of the genuine software and the suspected software. S6, setting a similarity threshold, and calculating the similarity of the two softwares according to the improved Jaccard coefficient determination interval algorithm; Determine whether plagiarism exists based on the calculation results.
2. The software copyright transaction and protection method based on blockchain according to claim 1 is characterized in that: In step S1, the software suppliers establish a consortium chain through consensus. The initial software suppliers need to undergo real-name authentication. Suppliers joining the consortium chain need authoritative authentication to prove their identities. Authentication methods include certificates issued by the industrial and commercial departments and digital certificates issued by digital certificate certification authorities. After the supplier meets the authentication standards of the consortium chain, it will obtain a digital certificate assigned by the consortium chain. Only after the certification is completed will other suppliers on the alliance chain allow this organization or node to enter and obtain the rights to upload software, vote, etc.
3. The software copyright transaction and protection method based on blockchain according to claim 1 is characterized in that: In step S3, the copyright information and software version information are used as the initial block of the alliance chain. The method includes creating a side chain to separate copyright transactions of different software. The number of side chains is the same as the number of software for copyright transactions. The initial node generated by the side chain will be recorded in the main chain.
4. The software copyright transaction and protection method based on blockchain according to claim 1 is characterized in that: In step S6, the improved interval determination algorithm determines plagiarism, and the algorithm includes the following steps: Assume that Sc1 and Sc2 are two software source codes that need similarity verification, define SET(Sc1) and SET(Sc2) as the standardized format sets of preprocessed Javascript codes of Sc1 and Sc2, and then use the improved Jaccard coefficient to evaluate the similarity score between Sc1 and Sc2. The calculation method is as follows: The result of this formula will not be affected by the amount of difference between the two hash values or by the process of generating the hash value index; In this way, the similarity between two pieces of software source code is normalized to a range of 0% to 100%; based on a pre-set reasonable threshold, if the similarity score exceeds the threshold, the code is judged to be plagiarized; the threshold will vary with the amount of code; for software with a large amount of code and more comprehensive functions, the corresponding threshold will be lowered accordingly.
5. A software copyright transaction and protection system based on blockchain, characterized in that: The system is used to implement a blockchain-based software copyright transaction and protection method as described in any one of claims 1 to 4 above, comprising a data upload module, a record storage module, a data processing module, a transaction module, a plagiarism detection module and a threshold change module; The data upload module is used by software suppliers to upload information related to finished software and the abstract syntax tree of the software after passing identity authentication. This information will serve as the basic data for copyright protection and transactions, and provide necessary data support for subsequent processes; Record storage module, including Interstellar File System IPFS and consortium chain. The former is used to permanently store detailed information of software products and suppliers, while the latter records software version update information and evidence of copyright transaction process; A data processing module for processing and converting uploaded data, including generating a digital signature for the identity of the software vendor, providing software source code preprocessing, and extracting the abstract syntax tree structure of the software; The transaction module includes providing a platform for both parties in software copyright transactions to negotiate the price of the software, and is responsible for the delivery of the software after the transaction is completed and packaging the transaction data to the storage module; The plagiarism detection module is used to determine whether the suspected software has plagiarism behavior. It extracts the non-obfuscating features in the source code and converts them into an abstract syntax tree, identifies the similarity between abstract syntax trees, and provides technical support for plagiarism detection. Threshold change module, used to improve the plagiarism interval determination threshold, and dynamically adjust the threshold according to the complexity and comprehensiveness of the software; The data upload module, transaction module, data processing module and plagiarism detection module are all connected to the record storage module; the threshold change module is connected to the plagiarism detection module, and each change of the threshold will directly affect the result obtained by the plagiarism detection module.
6. A blockchain-based software copyright transaction and protection system according to claim 7, characterized in that: The data upload module includes an identity authentication module, and the user must pass the identity authentication before proceeding to the next step.
7. A blockchain-based software copyright transaction and protection system according to claim 7, characterized in that: For the record storage module, each modification result of the side chain will be recorded in the main chain.
8. According to claim 7, a blockchain-based software copyright transaction and protection system is characterized in that: In the data processing module, the black box upload method provided by the Interstellar File System IPFS is used. The system stores the software in blocks. Each software block is organized in the form of a Merkle Directed Acyclic Graph (Merkle DAG), and the hash value of the root node serves as the unique identifier of the software.
Citation Information
Patent Citations
Copyright protection system and method based on block chain and IPFS
CN114722355A
Software copyright protection method and system based on block chain technology
CN116563030A
Open source license detection method, electronic device, medium and computer program product
CN117931675A
Method for evaluating software similarity using stack and apparatus therefor
KR1020150111610A
Copyright protection based on hidden copyright information
US10789339B1
Cited By
Software copyright management system based on smart contract
CN119903491A
Automatic evidence obtaining method and system for software copyright infringement
CN120372581A
An automated evidence collection method and system for software copyright infringement
CN120372581B