WO2023221350A1 - Blockchain-based code copyright registration system, method and platform - Google Patents

Blockchain-based code copyright registration system, method and platform Download PDF

Info

Publication number
WO2023221350A1
WO2023221350A1 PCT/CN2022/120150 CN2022120150W WO2023221350A1 WO 2023221350 A1 WO2023221350 A1 WO 2023221350A1 CN 2022120150 W CN2022120150 W CN 2022120150W WO 2023221350 A1 WO2023221350 A1 WO 2023221350A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature set
registration
blockchain
data package
client
Prior art date
Application number
PCT/CN2022/120150
Other languages
French (fr)
Chinese (zh)
Inventor
陈小娜
Original Assignee
陈小娜
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 陈小娜 filed Critical 陈小娜
Publication of WO2023221350A1 publication Critical patent/WO2023221350A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/105Arrangements for software license management or administration, e.g. for managing licenses at corporate level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • This application relates to the field of data processing technology, and in particular to a blockchain-based code copyright registration system, method and platform.
  • the purpose of the present invention is to provide a blockchain-based code copyright registration system, method and platform in view of the shortcomings of the existing technology.
  • this application provides a blockchain-based code copyright registration system, which includes a client and a blockchain platform, including:
  • the client is used to send a registration data packet to the blockchain platform, wherein the registration data packet includes a feature set, and the feature set is generated by the client;
  • the blockchain platform is used to verify the originality of the feature set; when the feature set is successfully verified, receive the feature set and perform registration services related to the feature set; when the feature set is successfully verified, When the feature set verification fails, the feature set is rejected;
  • the client is also used to send a change data package to the blockchain platform;
  • the change data package is generated by the client;
  • the change data package includes the registration voucher and the first digital signature;
  • the blockchain platform is also used to perform signature verification on the change data package; when the change data package is successfully verified, execute the change business related to the registration certificate; when the change data package is verified On failure, reject the change packet.
  • the client is also configured to obtain source code data and initialize the feature set before sending a registration data package to the blockchain platform; decompose the source code data into several feature vectors; and for each feature vector. Perform a hash operation on each of the feature vectors to obtain a set of hash values; weight the hash value corresponding to each feature vector; traverse the set, and compare the features according to each hash value in the set.
  • the blockchain platform is specifically used to obtain a feature set set; traverse the feature set set, perform a Hamming operation on the current feature set and the feature set, and obtain the Hamming distance; when the Hamming distance exists When the Hamming distance is less than or equal to 3, it is determined that the originality verification fails; when the Hamming distance does not exist and is less than or equal to 3, it is determined that the originality verification is successful.
  • the registration data package also includes a timestamp and a rights public key
  • the registration service specifically includes:
  • the blockchain platform performs a hash operation based on the feature set to generate a digital fingerprint; the blockchain platform uses the digital fingerprint as a Key value, and uses the feature set, the timestamp and the rights public key as a Value value is stored in the storage domain.
  • the change data package further includes a second digital signature
  • the registration certificate includes the target public key and the digital fingerprint
  • the signature verification specifically includes:
  • the blockchain platform performs verification based on the rights public key, the registration certificate and the first digital signature
  • the blockchain platform performs verification based on the target public key, the registration certificate and the second digital signature
  • the change service specifically includes: the blockchain platform obtains the corresponding public rights key based on the digital fingerprint search; and replaces the value of the public rights key with the value of the target public key.
  • this application provides a blockchain-based code copyright registration method, which method includes:
  • the client sends a registration data packet to the blockchain platform, where the registration data packet includes a feature set, and the feature set is generated by the client;
  • the blockchain platform performs originality verification on the feature set; when the feature set is successfully verified, it receives the feature set and performs registration services related to the feature set; when the feature set fails to be verified , reject the feature set;
  • the client sends a change data package to the blockchain platform;
  • the change data package is generated by the client;
  • the change data package includes the registration voucher and the first digital signature;
  • the blockchain platform performs signature verification on the change data package; when the verification of the change data package is successful, executes the change business related to the registration certificate; when verification of the change data package fails, rejects Receive the change packet
  • this application provides a blockchain-based code copyright registration platform, which includes:
  • the first acquisition module is used to acquire the registration data packet sent by the client; wherein the registration data packet includes a feature set, and the feature set is generated by the client;
  • An originality verification module used to verify the originality of the feature set
  • a registration module configured to receive the feature set and perform registration services related to the feature set when the feature set is successfully verified; to reject the feature set when the feature set fails to be verified;
  • the second acquisition module is used to obtain the change data packet sent by the client; the change data packet is generated by the client; the change data packet includes the registration voucher and the first digital signature;
  • a signature verification module used to perform signature verification on the change data package
  • a change module configured to perform change services related to the registration voucher when the change data package is successfully verified; and to reject the change data package when the change data package fails to be verified.
  • One aspect of this application provides a computer device, including a memory and a processor.
  • the memory stores a computer program.
  • the computer program When executed by the processor, it causes the processor to execute the method in one aspect of this application.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the above-mentioned aspect. method.
  • the code copyright registration system, method and platform based on the blockchain provided by the present invention achieve the effect of reducing the storage pressure of the blockchain and calculating gas costs by storing the feature set used to judge originality in the blockchain.
  • the data fingerprint of the feature set is also calculated and used as an identification of copyright to facilitate the confirmation of rights.
  • double signature verification is set up to ensure the accuracy of rights changes and prevent irreversible losses caused by the irreversibility of the blockchain network. Realize unified management of code copyright.
  • Figure 1 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application
  • Figure 2 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application
  • Figure 3 is a schematic diagram showing the feature set generation process provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a data interaction process scenario between a client and a blockchain platform provided by an embodiment of the present application
  • Figure 5 is a flow chart of a blockchain-based code copyright registration method provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a blockchain-based code copyright registration platform provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • Blockchain technology is the technical basis for realizing distributed applications.
  • Blockchain technology uses hash pointers instead of traditional pointers and stores digital asset transactions in the block body. It is a transaction-driven state machine.
  • smart contract refers to a piece of status code running on the blockchain system.
  • the code logic defines the content of the contract. It is a special protocol that is used when formulating contracts in the blockchain and contains code functions (Function). , and can also interact with other contracts, make decisions, store data and other functions.
  • Smart contracts provide verification and execution of the conditions specified in the contract. Smart contracts allow trusted transactions to be made without third parties, which are traceable and irreversible.
  • Figure 1 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application.
  • the network architecture may include a blockchain network 10 and a terminal 20.
  • the blockchain network 10 may include multiple blockchain nodes.
  • the logic code of the smart contract runs in the blockchain nodes.
  • the multiple blockchain nodes can interact with each other in data.
  • the link node may include n nodes such as node N1, node N2,... and node Nn.
  • the terminal 20 may include n client nodes such as node C1, node C2, ... and node Cn.
  • the client nodes included in the terminal 20 are also nodes in the blockchain.
  • the nodes in the blockchain network 10 are usually full nodes, and the nodes in the terminal 20 are usually light nodes.
  • all nodes in the blockchain are divided into blockchain network 10 and terminal 20.
  • Full nodes save all the contents of the entire block, while light nodes only save the header information of the block.
  • the light node only needs to store the block header information, and the full node stores all the contents of the block.
  • Merkle Proof can be used to go from the transaction to the root.
  • a path of a node is Merkle Proof, also known as Merkle Path.
  • the full node sends the entire Merkle Proof to the light node.
  • the light node can calculate the root hash value based on it and compare it with its own saved one to verify whether the transaction has been written. into the blockchain. As long as all hashes along this path are correct, the content has not been modified.
  • a blockchain node in the blockchain network 10 or a node in the terminal 20 can be composed of a server or a terminal device.
  • the server used to constitute the 10 nodes of the blockchain network can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud Cloud servers for basic cloud computing services such as functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the server used to form the terminal node 20 is usually a terminal device, and the terminal device can be: a smart terminal such as a smart phone, a tablet computer, a notebook computer, or a desktop computer.
  • Figure 2 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application.
  • a code copyright registration system based on blockchain including client 100 and blockchain platform 200, including:
  • the client 100 is configured to send a registration data packet to the blockchain platform 200, where the registration data packet includes a feature set, and the feature set is generated by the client 100;
  • the blockchain platform 200 can obtain the registration data package sent by the client 100.
  • the registration data package sent by the client 100 to the blockchain platform 200 mainly includes the feature set of the source code data.
  • the source code data can be a document containing source code data
  • the feature set refers to a feature set with code arrangement characteristics obtained according to a certain algorithm operation based on the source code data.
  • the blockchain platform 200 is a decentralized and distributed platform based on smart contracts, if the client 100 directly uploads source code data to the blockchain platform 200, it will not only greatly increase the storage of each blockchain node The pressure will also cause the blockchain platform 200 to greatly increase the calculation amount, reduce the operating efficiency, and generate a large amount of gas fees, making the entire system only theoretically feasible. Therefore, pre-producing the feature set of source code data in the client 100 will greatly reduce the storage pressure and computing pressure of the blockchain platform 200 and save gas costs.
  • Client 100 is also used for:
  • the source code data may be uploaded to the client 100 by the user.
  • the feature set can be a binary value with a data width of 64 bits.
  • the decomposition process of source code data can be achieved through word segmentation or bigram, and then five levels of weights, such as 1-5, are set for each feature vector.
  • each bit on the hash value is traversed.
  • the hash value and the weight value are multiplied.
  • the hash value and the weight are multiplied. Values are multiplied negatively.
  • Figure 3 is a schematic diagram illustrating the feature set generation process provided by an embodiment of the present application.
  • the blockchain platform 200 decomposes the source code data into several feature vectors through word segmentation or bigram and gives each feature vector a certain weight. Then, it performs a hash operation on the feature vector and multiplies it by the weight value. Obtain the set of hash values h1, h2...hn, and then accumulate and merge the sets of hash values, that is, add the first value of h1, h2...hn to obtain the feature set No. The value of one digit, the value of the second digit of h1, h2...hn are added to obtain the value of the second digit of the feature set, and so on until the values of all corresponding bits are accumulated to obtain the first stage feature set. , and finally perform dimensionality reduction on the first-stage feature set, that is, if the value of a specific bit is greater than 1, it is set to 1, otherwise it is set to 0, and the final feature set can be obtained.
  • the above process is the feature set generation process.
  • the feature set obtained by performing a series of operations on the source code data such as word segmentation, hashing, weighting, accumulation, and dimensionality reduction can not only save the source code document data features, but also occupy a small space, achieving The feature set is easy to store in the blockchain platform 200 and consumes less gas.
  • the blockchain platform 200 is used to verify the originality of the feature set; when the feature set is successfully verified, receive the feature set and perform registration services related to the feature set; when the feature set is successfully verified, When the verification of the feature set fails, the feature set will be rejected;
  • the blockchain platform 200 can verify the originality of the feature set.
  • the blockchain platform 200 can register the feature set as a copyright, and the smart contract in the blockchain platform 200 can write the feature set data into the storage domain.
  • the blockchain platform 200 When a block is generated, relevant transactions are published to the blockchain network 10 to achieve announcement and non-tampering functions.
  • Blockchain platform 200 is specifically used for:
  • the feature set set may be the sum of all registered feature sets in the blockchain platform 200 .
  • the current feature set may be the feature set currently read when the blockchain platform 200 traverses the feature set set and compared with the feature set that needs to be registered.
  • the code distance also known as the Hamming distance.
  • the above process is the originality verification process. It determines whether the originality verification is successful by comparing the feature sets that need to be registered with the feature sets that have been registered in the blockchain platform 200 and calculating the Hamming distance. This method can greatly reduce the computing pressure of the blockchain platform 200 and reduce gas expenses.
  • the registration data package also includes a timestamp and a rights public key.
  • the registration services specifically include:
  • the blockchain platform 200 performs a hash operation according to the feature set to generate a digital fingerprint; the blockchain platform 200 uses the digital fingerprint as a Key value, and publicizes the feature set, the timestamp and the rights.
  • the key is stored in the storage domain as the Value value.
  • the blockchain platform 200 can perform a hash operation based on the feature set to generate a digital fingerprint.
  • the digital fingerprint is used as a unique identifier of copyright and plays a role in rapid retrieval.
  • due to the hash Anti-collision characteristics can clarify the ownership of rights.
  • the blockchain platform 200 can also use the timestamp in the registration data package as the copyright application date, and use the rights public key as an identifier of the rights holder.
  • the rights public key can be the public key address of the client 100, or it can It is the public key address of the right holder entered by the user.
  • the blockchain platform 200 can store the above data in the storage domain of the smart contract in the form of HashMap, and can use the digital fingerprint as the Key value, and the feature set, timestamp and rights public key as the Value value to facilitate quick search. .
  • the above process is the copyright registration process.
  • a digital fingerprint is generated based on the feature set as the unique identifier of copyright, which can quickly index and clarify rights.
  • the client 100 is also used to send a change data package to the blockchain platform 200; the change data package is generated by the client 100; the change data package includes the registration voucher and the first digital signature;
  • the blockchain platform 200 can obtain the registration certificate and the first digital signature, and then verify the legality of the change data package based on the registration certificate and the first digital signature.
  • the registration voucher is used to record information related to the change business, and the first digital signature can be obtained by the copyright owner using the private key to sign the registration voucher.
  • the blockchain platform 200 is also used to perform signature verification on the change data package; when the verification of the change data package is successful, execute the change business related to the registration certificate; when the change data package is successfully verified, When verification fails, the change data packet will be rejected;
  • the blockchain platform 200 can read the registration voucher and the first digital signature contained in the change data package, and then perform signature verification on the registration voucher.
  • the registration certificate may include the digital fingerprint of the copyright that needs to be changed.
  • the blockchain platform 200 can obtain the corresponding rights public key based on the digital fingerprint. The blockchain platform 200 will then use the rights public key to decrypt the first digital signature. The data obtained is then compared with the registration voucher, and when the two match, the signature verification is successful.
  • the registration certificate also includes the target public key, which is the public key address of the copyright assignee.
  • the blockchain platform 200 can modify the rights address corresponding to the digital fingerprint to the target public key value.
  • the above process is the signature verification and change business process.
  • signature verification By setting up signature verification, the authenticity of the change business can be guaranteed. Malicious nodes cannot pass the verification without obtaining the private key corresponding to the right public key, thus ensuring the security of the system.
  • the registration voucher is generated unilaterally by the right holder. If the copyright changes are carried out by the two parties, the process of generating the registration voucher may be changed by the right holder. The target public key is incorrectly recorded, resulting in the transferee being unable to obtain the copyright.
  • the change data package also includes a second digital signature.
  • the registration certificate includes the target public key and the digital fingerprint.
  • the signature verification specifically includes:
  • the blockchain platform 200 performs verification based on the rights public key, the registration certificate and the first digital signature
  • the blockchain platform 200 performs verification based on the target public key, the registration certificate and the second digital signature;
  • the second digital signature may be obtained by the copyright transferee using the transferee's private key to sign the registration certificate, and the transferee's private key and the target public key are combined into a public-private key pair.
  • the blockchain platform 200 can obtain the corresponding rights public key based on the digital fingerprint. The blockchain platform 200 will then use the rights public key to decrypt the first digital signature to compare the data with the registration certificate. When the two match Signature verification is successful.
  • the blockchain platform 200 can obtain the target public key based on the registration voucher. The blockchain platform 200 will then use the target public key to decrypt the second digital signature and compare the data obtained with the registration voucher. When the two match, the signature Verification successful.
  • the blockchain platform 200 can perform the change business associated with the registration certificate.
  • the registration certificate is generated after confirmation by both the right holder and the transferee.
  • the signature information of both parties needs to be confirmed to ensure the accuracy of the transferee.
  • symmetric encryption involves the management of symmetric keys, especially the distribution of symmetric keys. It requires the communicating parties to exchange a shared symmetric key through another secure channel before communicating in order to be safe. The ciphertext is transmitted through unsecured channels; once the symmetric key is stolen, the encryption will be immediately invalid.
  • the blockchain platform 200 obtains the corresponding rights public key according to the digital fingerprint search; replaces the value of the rights public key with the value of the target public key.
  • the blockchain platform 200 quickly locates the rights public key through the digital fingerprint in the registration certificate, thereby realizing the system's rapid change of the copyright owner.
  • the following takes the data interaction between the client 100 and the blockchain platform 200 as an example to perform a detailed description of the embodiments of this application.
  • Figure 4 is a schematic diagram of a data interaction process scenario between a client 100 and a blockchain platform 200 provided by an embodiment of the present application.
  • the client 100 generates a feature set based on the source code data
  • the source code data can be a document containing source code data
  • the feature set refers to a feature set with code arrangement characteristics obtained according to a certain algorithm operation based on the source code data.
  • the client 100 sends a registration data packet to the blockchain platform 200;
  • the blockchain platform 200 can obtain the registration data package sent by the client 100.
  • the registration data package sent by the client 100 to the blockchain platform 200 mainly includes the feature set of the source code data.
  • the blockchain platform 200 performs originality verification and performs registration business
  • the blockchain platform 200 can verify the originality of the feature set.
  • the blockchain platform 200 can register the feature set as a copyright, and the smart contract in the blockchain platform 200 can write the feature set data into the storage domain.
  • the blockchain platform 200 When a block is generated, relevant transactions are published to the blockchain network 10 to achieve announcement and non-tampering functions.
  • the blockchain platform 200 returns the digital fingerprint to the client 100;
  • digital fingerprint is used as the unique identification of copyright, which plays a role in quick retrieval.
  • digital fingerprint is used as the unique identification of copyright, which plays a role in quick retrieval.
  • the ownership of rights can be clarified.
  • the client 100 sends a change data packet to the blockchain platform 200;
  • the blockchain platform 200 can obtain the registration certificate and the first digital signature, and then verify the legality of the change data package based on the registration certificate and the first digital signature.
  • the blockchain platform 200 performs signature verification and executes the change business.
  • the registration certificate also includes the target public key, which is the public key address of the copyright assignee.
  • the blockchain platform 200 can modify the rights address corresponding to the digital fingerprint to the target public key value.
  • the above process is the data interaction process between the client 100 and the blockchain platform 200.
  • an embodiment of this application provides a blockchain-based code copyright registration system.
  • the storage pressure of the blockchain and the calculation of gas costs are reduced.
  • the data fingerprint of the feature set is also obtained through calculation as an identification of copyright, which facilitates confirmation of rights.
  • double signature verification is set up to ensure the accuracy of rights changes and prevent irreversible losses caused by the irreversibility of the blockchain network 10.
  • Figure 5 is a flow chart of a blockchain-based code copyright registration method provided by an embodiment of the present application.
  • the client 100 sends a registration data packet to the blockchain platform 200;
  • the registration data package includes a feature set, and the feature set is generated by the client 100 .
  • the blockchain platform 200 performs originality verification on the feature set
  • the feature set is received and the registration service related to the feature set is performed; when the verification of the feature set fails, the feature set is rejected.
  • the client 100 sends a change data packet to the blockchain platform 200;
  • the change data package is generated by the client 100; the change data package includes the registration certificate and the first digital signature.
  • the blockchain platform 200 performs signature verification on the change data package
  • Figure 6 is a schematic structural diagram of a blockchain-based code copyright registration platform provided by an embodiment of the present application.
  • the code copyright registration platform 1 may include: a first acquisition module 11, an originality verification module 12, a registration module 13, a second acquisition module 14, a signature verification module 15, and a change module 16:
  • the first acquisition module 11 is used to acquire the registration data packet sent by the client; wherein the registration data packet includes a feature set, and the feature set is generated by the client.
  • the originality verification module 12 is used to verify the originality of the feature set.
  • the registration module 13 is configured to receive the feature set and perform registration services related to the feature set when the feature set is successfully verified; and to reject the feature set when the feature set fails to be verified.
  • the second acquisition module 14 is used to acquire the change data packet sent by the client; the change data packet is generated by the client; the change data packet includes the registration voucher and the first digital signature.
  • the signature verification module 15 is used to perform signature verification on the change data package.
  • the change module 16 is configured to perform the change service related to the registration certificate when the verification of the change data package is successful; and to reject the change data package when the verification of the change data package fails.
  • FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device 1000 may include a processor 1001 , a network interface 1004 and a memory 1005 .
  • the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002 .
  • the communication bus 1002 is used to realize connection communication between these components.
  • the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.
  • the memory 1005 may optionally be at least one storage platform located far away from the aforementioned processor 1001. As shown in Figure 7, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 Program to implement the description of the blockchain-based code copyright registration method in any of the corresponding embodiments in Figure 5.
  • the computer device 1000 described in this application can also perform the description of the code copyright registration platform 1 in the remaining embodiments above, and the details will not be described again. In addition, the description of the beneficial effects of using the same method will not be described again.
  • this application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the code copyright registration platform 1 mentioned above, and the computer program includes a program Instructions.
  • the processor executes the program instructions, it can execute the description of the blockchain-based code copyright registration method in any corresponding embodiment in Figure 5. Therefore, the details will not be described here.
  • the description of the beneficial effects of using the same method will not be described again.
  • the above program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium.
  • the process may include the processes of the above method embodiments.
  • the above-mentioned storage medium can be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)

Abstract

The present application discloses a blockchain-based code copyright registration system, method and platform. The effects of reducing the storage pressure of a blockchain and the gasoline fee for computing are achieved by storing a feature set for determining the originality in the blockchain, and the data fingerprint of a data set is obtained by calculation to serve as a copyright identifier for facilitating confirming the copyright. In addition, the accuracy of the copyright change is ensured by setting double signature verification, and the irreversible loss caused by the irreversibility of a blockchain network is prevented, so that unified management of the code copyright is realized.

Description

基于区块链的代码版权登记系统、方法及平台Blockchain-based code copyright registration system, method and platform 技术领域Technical field
本申请涉及数据处理技术领域,尤其涉及一种基于区块链的代码版权登记系统、方法及平台。 This application relates to the field of data processing technology, and in particular to a blockchain-based code copyright registration system, method and platform.
背景技术Background technique
随着互联网技术发展,越来越多的软件系统被开发并应用到生产生活当中。与此同时,软件代码版权管理问题也日益突出。首先,软件系统往往包含大量的代码文档,判断代码文档的原创性需要大量的人力物力,导致软件代码的版权难以注册。其次,缺乏统一的代码版权管理平台,导致版权资源分散,版权归属模糊,不利于版权交易以及形式市场经济。With the development of Internet technology, more and more software systems are developed and applied to production and life. At the same time, the issue of software code copyright management has become increasingly prominent. First of all, software systems often contain a large number of code documents. Judging the originality of code documents requires a lot of manpower and material resources, making it difficult to register the copyright of software codes. Secondly, the lack of a unified code copyright management platform leads to the dispersion of copyright resources and unclear copyright ownership, which is not conducive to copyright transactions and formal market economy.
技术问题technical problem
目前,代码文档的版权资源分散,所有权模糊,导致代码盗用和侵犯原作者权利的问题十分突出,引起了许多领域学者的广泛关注。同时,区块链技术由于其分散性、抗篡改性、数据可追溯性等特点,为解决代码版权保护问题提供了一条新途径。At present, the copyright resources of code documents are scattered and the ownership is blurred, which leads to prominent problems of code theft and infringement of the original author's rights, which has attracted widespread attention from scholars in many fields. At the same time, blockchain technology provides a new way to solve the problem of code copyright protection due to its characteristics such as decentralization, tamper resistance, and data traceability.
技术解决方案Technical solutions
本发明的目的是针对现有技术的不足,提供一种基于区块链的代码版权登记系统、方法及平台。The purpose of the present invention is to provide a blockchain-based code copyright registration system, method and platform in view of the shortcomings of the existing technology.
本申请一方面提供了一种基于区块链的代码版权登记系统,该系统包括客户端及区块链平台,其中:On the one hand, this application provides a blockchain-based code copyright registration system, which includes a client and a blockchain platform, including:
所述客户端,用于向所述区块链平台发送登记数据包,其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The client is used to send a registration data packet to the blockchain platform, wherein the registration data packet includes a feature set, and the feature set is generated by the client;
所述区块链平台,用于对所述特征集进行原创性验证;当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;The blockchain platform is used to verify the originality of the feature set; when the feature set is successfully verified, receive the feature set and perform registration services related to the feature set; when the feature set is successfully verified, When the feature set verification fails, the feature set is rejected;
所述客户端,还用于向所述区块链平台发送变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括所述登记凭证及第一数字签名;The client is also used to send a change data package to the blockchain platform; the change data package is generated by the client; the change data package includes the registration voucher and the first digital signature;
所述区块链平台,还用于对所述变更数据包进行签名验证;当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包。The blockchain platform is also used to perform signature verification on the change data package; when the change data package is successfully verified, execute the change business related to the registration certificate; when the change data package is verified On failure, reject the change packet.
优选地,所述客户端,还用于在向所述区块链平台发送登记数据包前,获取源代码数据并初始化所述特征集;将所述源代码数据分解为若干特征向量;对每个所述特征向量执行hash运算获得hash值的集合;对每个所述特征向量对应的所述hash值进行加权;遍历所述集合,根据所述集合中每个所述hash值对所述特征集进行换算;将所述hash值特定位的值,累加合并至所述特征集的对应位上;遍历所述特征集的每一位,当所述位的值大于0时,所述特征集的对应位的值设为1;当所述位的值小于等于0时,所述特征集的对应位的值设为0。Preferably, the client is also configured to obtain source code data and initialize the feature set before sending a registration data package to the blockchain platform; decompose the source code data into several feature vectors; and for each feature vector. Perform a hash operation on each of the feature vectors to obtain a set of hash values; weight the hash value corresponding to each feature vector; traverse the set, and compare the features according to each hash value in the set. Sets are converted; the values of specific bits of the hash value are accumulated and merged into the corresponding bits of the feature set; each bit of the feature set is traversed, and when the value of the bit is greater than 0, the feature set The value of the corresponding bit of the feature set is set to 1; when the value of the bit is less than or equal to 0, the value of the corresponding bit of the feature set is set to 0.
优选地,所述区块链平台,具体用于获取特征集集合;遍历特征集集合,将当前特征集与所述特征集执行海明运算,求得海明距离;当存在所述海明距离小于等于3时,确定所述原创性验证失败;当不存在所述海明距离小于等于3时,确定所述原创性验证成功。Preferably, the blockchain platform is specifically used to obtain a feature set set; traverse the feature set set, perform a Hamming operation on the current feature set and the feature set, and obtain the Hamming distance; when the Hamming distance exists When the Hamming distance is less than or equal to 3, it is determined that the originality verification fails; when the Hamming distance does not exist and is less than or equal to 3, it is determined that the originality verification is successful.
优选地,所述登记数据包还包括时间戳及权利公钥,所述登记业务,具体包括:Preferably, the registration data package also includes a timestamp and a rights public key, and the registration service specifically includes:
所述区块链平台根据所述特征集执行hash运算生成数字指纹;所述区块链平台将所述数字指纹作为Key值,将所述特征集、所述时间戳及所述权利公钥作为Value值,存入存储域中。The blockchain platform performs a hash operation based on the feature set to generate a digital fingerprint; the blockchain platform uses the digital fingerprint as a Key value, and uses the feature set, the timestamp and the rights public key as a Value value is stored in the storage domain.
优选地,所述变更数据包还包括第二数字签名,所述登记凭证包括目标公钥及所述数字指纹,所述签名验证,具体包括:Preferably, the change data package further includes a second digital signature, the registration certificate includes the target public key and the digital fingerprint, and the signature verification specifically includes:
所述区块链平台根据所述权利公钥、所述登记凭证及第一数字签名进行验证;The blockchain platform performs verification based on the rights public key, the registration certificate and the first digital signature;
所述区块链平台根据所述目标公钥、所述登记凭证及第二数字签名进行验证;The blockchain platform performs verification based on the target public key, the registration certificate and the second digital signature;
当验证均通过时,确认签名验证成功。When all verifications pass, it is confirmed that the signature verification is successful.
优选地,所述变更业务,具体包括:所述区块链平台根据所述数字指纹检索获得对应的所述权利公钥;将所述权利公钥的值替换为所述目标公钥的值。Preferably, the change service specifically includes: the blockchain platform obtains the corresponding public rights key based on the digital fingerprint search; and replaces the value of the public rights key with the value of the target public key.
本申请一方面提供了一种基于区块链的代码版权登记方法,所述方法包括:On the one hand, this application provides a blockchain-based code copyright registration method, which method includes:
客户端向所述区块链平台发送登记数据包,其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The client sends a registration data packet to the blockchain platform, where the registration data packet includes a feature set, and the feature set is generated by the client;
区块链平台对所述特征集进行原创性验证;当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;The blockchain platform performs originality verification on the feature set; when the feature set is successfully verified, it receives the feature set and performs registration services related to the feature set; when the feature set fails to be verified , reject the feature set;
所述客户端向所述区块链平台发送变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括所述登记凭证及第一数字签名;The client sends a change data package to the blockchain platform; the change data package is generated by the client; the change data package includes the registration voucher and the first digital signature;
所述区块链平台对所述变更数据包进行签名验证;当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包The blockchain platform performs signature verification on the change data package; when the verification of the change data package is successful, executes the change business related to the registration certificate; when verification of the change data package fails, rejects Receive the change packet
本申请一方面提供了一种基于区块链的代码版权登记平台,所述平台包括:On the one hand, this application provides a blockchain-based code copyright registration platform, which includes:
第一获取模块,用于获取客户端发送的登记数据包;其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The first acquisition module is used to acquire the registration data packet sent by the client; wherein the registration data packet includes a feature set, and the feature set is generated by the client;
原创性验证模块,用于对所述特征集进行原创性验证;An originality verification module, used to verify the originality of the feature set;
登记模块,用于当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;A registration module, configured to receive the feature set and perform registration services related to the feature set when the feature set is successfully verified; to reject the feature set when the feature set fails to be verified;
第二获取模块,用于获取客户端发送的变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括所述登记凭证及第一数字签名;The second acquisition module is used to obtain the change data packet sent by the client; the change data packet is generated by the client; the change data packet includes the registration voucher and the first digital signature;
签名验证模块,用于对所述变更数据包进行签名验证;A signature verification module, used to perform signature verification on the change data package;
变更模块,用于当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包A change module, configured to perform change services related to the registration voucher when the change data package is successfully verified; and to reject the change data package when the change data package fails to be verified.
本申请一方面提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行本申请中一方面中的方法。One aspect of this application provides a computer device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it causes the processor to execute the method in one aspect of this application.
本申请一方面提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序包括程序指令,该程序指令被处理器执行时使该处理器执行上述一方面中的方法。In one aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the above-mentioned aspect. method.
有益效果beneficial effects
本发明提供的基于区块链的代码版权登记系统、方法及平台,通过将用于判断原创性的特征集存储在区块链中,实现减小区块链存储压力及运算汽油费的效果,还通过计算获取特征集的数据指纹作为版权的标识,便于确权,此外,还通过设置双重签名验证确保权利变更的准确性,防止因为区块链网络的不可逆性导致无法挽回的损失,以此实现代码版权的统一管理。The code copyright registration system, method and platform based on the blockchain provided by the present invention achieve the effect of reducing the storage pressure of the blockchain and calculating gas costs by storing the feature set used to judge originality in the blockchain. The data fingerprint of the feature set is also calculated and used as an identification of copyright to facilitate the confirmation of rights. In addition, double signature verification is set up to ensure the accuracy of rights changes and prevent irreversible losses caused by the irreversibility of the blockchain network. Realize unified management of code copyright.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the existing technical solutions more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for illustration. For some embodiments recorded in the invention, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting any creative effort.
图1是本申请一实施例提供的一种基于区块链的代码版权登记系统的结构示意图; Figure 1 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application;
图2是本申请一实施例提供的一种基于区块链的代码版权登记系统的结构示意图;Figure 2 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application;
图3是本申请一实施例提供的特征集产生过程演示示意图; Figure 3 is a schematic diagram showing the feature set generation process provided by an embodiment of the present application;
图4是本申请一实施例提供的一种客户端、区块链平台之间的数据交互过程场景示意图;Figure 4 is a schematic diagram of a data interaction process scenario between a client and a blockchain platform provided by an embodiment of the present application;
图5是本申请一个实施例提供的一种基于区块链的代码版权登记方法的流程图;Figure 5 is a flow chart of a blockchain-based code copyright registration method provided by an embodiment of the present application;
图6是本申请一个实施例提供的一种基于区块链的代码版权登记平台的结构示意图;Figure 6 is a schematic structural diagram of a blockchain-based code copyright registration platform provided by an embodiment of the present application;
图7是本申请一个实施例提供的一种计算机设备的结构示意图。Figure 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
本发明的最佳实施方式Best Mode of Carrying Out the Invention
可以理解的是,本申请涉及区块链技术及其智能合约相关技术。区块链技术是实现分布式应用的技术基础,区块链技术采用哈希指针代替传统指针,并将数字资产的交易存储在区块体中,是一种交易驱动的状态机。其中,智能合约是指运行在区块链系统上的一段状态代码,代码逻辑定义了合约内容,是一种特殊协议,在区块链内制定合约时使用,当中内含了代码函数 (Function),亦能与其他合约进行交互、做决策、存储资料等功能。智能合约提供验证及执行合约内所订立的条件。智能合约允许在没有第三方的情况下进行可信交易,这些交易可追踪且不可逆转。It can be understood that this application involves blockchain technology and its smart contract related technologies. Blockchain technology is the technical basis for realizing distributed applications. Blockchain technology uses hash pointers instead of traditional pointers and stores digital asset transactions in the block body. It is a transaction-driven state machine. Among them, smart contract refers to a piece of status code running on the blockchain system. The code logic defines the content of the contract. It is a special protocol that is used when formulating contracts in the blockchain and contains code functions (Function). , and can also interact with other contracts, make decisions, store data and other functions. Smart contracts provide verification and execution of the conditions specified in the contract. Smart contracts allow trusted transactions to be made without third parties, which are traceable and irreversible.
请参见图1,图1是本申请一实施例提供的一种基于区块链的代码版权登记系统的结构示意图。Please refer to Figure 1. Figure 1 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application.
如图1所示,该网络架构可以包括区块链网络10、终端20。其中,区块链网络10中可以包括多个区块链节点,智能合约的逻辑代码运行在区块链节点中,该多个区块链节点之间可以相互进行数据交互,该多个区块链节点可以包括节点N1、节点N2、……和节点Nn等n个节点。终端20可以包括节点C1、节点C2、……和节点Cn等n个客户端节点。As shown in Figure 1, the network architecture may include a blockchain network 10 and a terminal 20. Among them, the blockchain network 10 may include multiple blockchain nodes. The logic code of the smart contract runs in the blockchain nodes. The multiple blockchain nodes can interact with each other in data. The multiple blocks The link node may include n nodes such as node N1, node N2,... and node Nn. The terminal 20 may include n client nodes such as node C1, node C2, ... and node Cn.
必须说明的是,终端20中包含的客户端节点同时也是区块链中的节点,区块链网络10中的节点通常为全节点,终端20中的节点通常为轻节点。为了便于理解,将区块链中所有的节点划分为区块链网络10和终端20。全节点保存整个区块的所有内容,而轻节点仅仅保存区块的块头信息,对于移动便携设备来说,如果存储区块的所有内容,则所需空间过大,而这是不现实的。所以轻节点只需要存储区块块头信息,全节点存储区块所有内容即可,当需要向轻节点证明某条交易是否被写入区块链网络10时,可以使用Merkle Proof,从交易到根节点的一条路径即为Merkle Proof也称为Merkle Path,全节点将整个Merkle Proof发送给轻节点,轻节点即可根据其算出根哈希值,和自己保存的对比,从而验证该交易是否被写入区块链。只要沿着该路径,所有哈希值都正确,说明内容没有被修改过。 It must be noted that the client nodes included in the terminal 20 are also nodes in the blockchain. The nodes in the blockchain network 10 are usually full nodes, and the nodes in the terminal 20 are usually light nodes. For ease of understanding, all nodes in the blockchain are divided into blockchain network 10 and terminal 20. Full nodes save all the contents of the entire block, while light nodes only save the header information of the block. For mobile portable devices, if all the contents of the block are stored, the space required is too large, which is unrealistic. Therefore, the light node only needs to store the block header information, and the full node stores all the contents of the block. When it is necessary to prove to the light node whether a transaction has been written to the blockchain network 10, Merkle Proof can be used to go from the transaction to the root. A path of a node is Merkle Proof, also known as Merkle Path. The full node sends the entire Merkle Proof to the light node. The light node can calculate the root hash value based on it and compare it with its own saved one to verify whether the transaction has been written. into the blockchain. As long as all hashes along this path are correct, the content has not been modified.
更多的,区块链网络10中的一个区块链节点或者终端20中的一个节点,可以由服务器构成,也可以由终端设备构成。其中,用于构成区块链网络10节点的服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。用于构成终端20节点的服务器通常为终端设备,终端设备可以是:智能手机、平板电脑、笔记本电脑、桌上型电脑等智能终端。Furthermore, a blockchain node in the blockchain network 10 or a node in the terminal 20 can be composed of a server or a terminal device. Among them, the server used to constitute the 10 nodes of the blockchain network can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud Cloud servers for basic cloud computing services such as functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server used to form the terminal node 20 is usually a terminal device, and the terminal device can be: a smart terminal such as a smart phone, a tablet computer, a notebook computer, or a desktop computer.
可以理解的是,由于软件系统往往包含大量代码文档,现有的中心化代码版权登记系统几乎不可能对每个文档进行原创性验证。其次,由于版权归属模糊,缺乏统一的代码版本管理平台,导致版权交易不通畅,无法形成代码版权市场经济。It is understandable that since software systems often contain a large number of code documents, it is almost impossible for the existing centralized code copyright registration system to verify the originality of each document. Secondly, due to the ambiguity of copyright ownership and the lack of a unified code version management platform, copyright transactions are not smooth and a code copyright market economy cannot be formed.
请参见图2,图2是本申请一实施例提供的一种基于区块链的代码版权登记系统的结构示意图。Please refer to Figure 2. Figure 2 is a schematic structural diagram of a blockchain-based code copyright registration system provided by an embodiment of the present application.
一种基于区块链的代码版权登记系统,包括客户端100及区块链平台200,其中:A code copyright registration system based on blockchain, including client 100 and blockchain platform 200, including:
所述客户端100,用于向所述区块链平台200发送登记数据包,其中,所述登记数据包包括特征集,所述特征集是由所述客户端100生成的;The client 100 is configured to send a registration data packet to the blockchain platform 200, where the registration data packet includes a feature set, and the feature set is generated by the client 100;
具体地,区块链平台200可以获取到客户端100所发送的登记数据包。客户端100向区块链平台200发送的登记数据包主要包括源代码数据的特征集。 Specifically, the blockchain platform 200 can obtain the registration data package sent by the client 100. The registration data package sent by the client 100 to the blockchain platform 200 mainly includes the feature set of the source code data.
其中,源代码数据可以是包含源代码数据的文档,特征集是指根据源代码数据根据一定的算法运算获得的具有代码编排特征的特征集合。Among them, the source code data can be a document containing source code data, and the feature set refers to a feature set with code arrangement characteristics obtained according to a certain algorithm operation based on the source code data.
由于区块链平台200是一个基于智能合约的去中心化的分布式的平台,如果客户端100直接将源代码数据上传至区块链平台200,不仅会大大增加每个区块链节点的存储压力,同时会导致区块链平台200的计算量大增、运行效率降低,还会产生大量汽油费,使得整个系统只在理论上可行。因此,预先在客户端100中生产源代码数据的特征集将大大降低区块链平台200的存储压力、运算压力、节省汽油费。Since the blockchain platform 200 is a decentralized and distributed platform based on smart contracts, if the client 100 directly uploads source code data to the blockchain platform 200, it will not only greatly increase the storage of each blockchain node The pressure will also cause the blockchain platform 200 to greatly increase the calculation amount, reduce the operating efficiency, and generate a large amount of gas fees, making the entire system only theoretically feasible. Therefore, pre-producing the feature set of source code data in the client 100 will greatly reduce the storage pressure and computing pressure of the blockchain platform 200 and save gas costs.
可以理解的是,在智能合约技术中,数据的计算及存储都是需要支付汽油费的。因此,设计一种既能使特征集占用空间小,又能保存源代码文档数据特征,且便于验证特征集的生成方式十分必要。It is understandable that in smart contract technology, data calculation and storage require payment of gas fees. Therefore, it is necessary to design a generation method that can make the feature set occupy a small space, save the source code document data features, and facilitate verification of the feature set.
客户端100还用于:Client 100 is also used for:
在向所述区块链平台200发送登记数据包前,获取源代码数据并初始化所述特征集;Before sending the registration data package to the blockchain platform 200, obtain source code data and initialize the feature set;
其中,源代码数据可以是用户上传到客户端100的。特征集可以是一个二进制,数据宽度为64比特位的值。The source code data may be uploaded to the client 100 by the user. The feature set can be a binary value with a data width of 64 bits.
将所述源代码数据分解为若干特征向量;Decompose the source code data into several feature vectors;
具体地,源代码数据的分解过程可以通过分词,也可以通过bigram实现,然后为每一个特征向量设置1-5等5个级别的权重。Specifically, the decomposition process of source code data can be achieved through word segmentation or bigram, and then five levels of weights, such as 1-5, are set for each feature vector.
对每个所述特征向量执行hash运算获得hash值的集合;Perform a hash operation on each feature vector to obtain a set of hash values;
对每个所述特征向量对应的所述hash值进行加权;Weight the hash value corresponding to each feature vector;
具体地,遍历hash值上的每个比特位,当一个比特位上的数值为1时,则hash值和权重值正相乘,当一个比特位上的数值为0时,则hash值和权重值负相乘。Specifically, each bit on the hash value is traversed. When the value on a bit is 1, the hash value and the weight value are multiplied. When the value on a bit is 0, the hash value and the weight are multiplied. Values are multiplied negatively.
遍历所述集合,根据所述集合中每个所述hash值对所述特征集进行换算;将所述hash值特定位的值,累加合并至所述特征集的对应位上;Traverse the set and convert the feature set according to each hash value in the set; accumulate and merge the values of specific bits of the hash value into the corresponding bits of the feature set;
遍历所述特征集的每一位,当所述位的值大于0时,所述特征集的对应位的值设为1;当所述位的值小于等于0时,所述特征集的对应位的值设为0;Traverse each bit of the feature set. When the value of the bit is greater than 0, the value of the corresponding bit of the feature set is set to 1; when the value of the bit is less than or equal to 0, the corresponding bit of the feature set is set to 1. The bit value is set to 0;
请一并参见图3,图3是本申请一实施例提供的特征集产生过程演示示意图。Please refer to Figure 3 as well. Figure 3 is a schematic diagram illustrating the feature set generation process provided by an embodiment of the present application.
如图3所示,首先,区块链平台200通过分词或bigram将源代码数据分解为若干特征向量并赋予每个特征向量一定的权重,接着,对特征向量执行hash运行并乘以权重值后获得hash值的集合h1、h2.......hn,再对hash值的集合进行累加合并,即h1、h2.......hn第一位的值相加获得特征集第一位的值,h1、h2.......hn第二位的值相加获得特征集第二位的值,以此类推直至累加完所有对应位上的值获得第一阶段特征集,最后对第一阶段特征集执行降维,即特定位上的值大于1则设为1,否则设为0,便可获得最终的特征集。As shown in Figure 3, first, the blockchain platform 200 decomposes the source code data into several feature vectors through word segmentation or bigram and gives each feature vector a certain weight. Then, it performs a hash operation on the feature vector and multiplies it by the weight value. Obtain the set of hash values h1, h2...hn, and then accumulate and merge the sets of hash values, that is, add the first value of h1, h2...hn to obtain the feature set No. The value of one digit, the value of the second digit of h1, h2...hn are added to obtain the value of the second digit of the feature set, and so on until the values of all corresponding bits are accumulated to obtain the first stage feature set. , and finally perform dimensionality reduction on the first-stage feature set, that is, if the value of a specific bit is greater than 1, it is set to 1, otherwise it is set to 0, and the final feature set can be obtained.
上述过程即特征集产生过程,通过对源代码数据进行分词、hash、加权、累加、降维等一系列操作后获得的特征集,既能够保存源代码文档数据特征,占用空间还小,实现了特征集在区块链平台200中便于存储,消耗汽油费少的效果。The above process is the feature set generation process. The feature set obtained by performing a series of operations on the source code data such as word segmentation, hashing, weighting, accumulation, and dimensionality reduction can not only save the source code document data features, but also occupy a small space, achieving The feature set is easy to store in the blockchain platform 200 and consumes less gas.
所述区块链平台200,用于对所述特征集进行原创性验证;当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;The blockchain platform 200 is used to verify the originality of the feature set; when the feature set is successfully verified, receive the feature set and perform registration services related to the feature set; when the feature set is successfully verified, When the verification of the feature set fails, the feature set will be rejected;
具体地,区块链平台200获取到特征集之后,就可以对特征集进行原创性验证。Specifically, after the blockchain platform 200 obtains the feature set, it can verify the originality of the feature set.
具体地,原创性验证成功后,区块链平台200可以将特征集作为版权进行登记注册,区块链平台200中的智能合约可以将特征集数据写入存储域中,当区块链平台200产生区块时,将相关交易发布到区块链网络10中,以实现公告和不可篡改的作用。Specifically, after the originality verification is successful, the blockchain platform 200 can register the feature set as a copyright, and the smart contract in the blockchain platform 200 can write the feature set data into the storage domain. When the blockchain platform 200 When a block is generated, relevant transactions are published to the blockchain network 10 to achieve announcement and non-tampering functions.
可以理解的是,在智能合约技术中,算力是十分宝贵的资源,进行原创性验证时,应当避免消耗区块链平台200过量的算力,这不仅会降低系统运行效率,还会产生大量汽油费。It is understandable that in smart contract technology, computing power is a very precious resource. When verifying originality, you should avoid consuming excessive computing power on the blockchain platform. This will not only reduce the system operating efficiency, but also generate a large number of Gasoline costs.
当然,可以具体设计一种原创性验证方式,详见如下:Of course, a specific originality verification method can be designed, as detailed below:
区块链平台200,具体用于:Blockchain platform 200 is specifically used for:
获取特征集集合;其中,特征集集合可以是区块链平台200中所有已经登记注册的特征集的总和。Obtain a feature set set; wherein the feature set set may be the sum of all registered feature sets in the blockchain platform 200 .
遍历特征集集合,将当前特征集与所述特征集执行海明运算,求得海明距离;当存在所述海明距离小于等于3时,确定所述原创性验证失败;当不存在所述海明距离小于等于3时,确定所述原创性验证成功;其中,当前特征集可以是区块链平台200遍历特征集集合时当下读取到特征集与需要进行注册登记特征集进行比对。其中,在信息编码中,两个合法代码对应位上编码不同的位数称为码距,又称海明距离。Traverse the feature set collection, perform Hamming operation on the current feature set and the feature set, and obtain the Hamming distance; when the Hamming distance is less than or equal to 3, it is determined that the originality verification fails; when the Hamming distance does not exist When the Hamming distance is less than or equal to 3, it is determined that the originality verification is successful; the current feature set may be the feature set currently read when the blockchain platform 200 traverses the feature set set and compared with the feature set that needs to be registered. Among them, in information coding, the number of different bits encoded in the corresponding bits of two legal codes is called the code distance, also known as the Hamming distance.
上述过程即为原创性验证过程,通过将需要注册登记的特征集与已经在区块链平台200中注册登记的特征集进行一一比对计算海明距离来确定原创性验证是否成功,这种方式能够很大程度上减小区块链平台200的计算压力,减少汽油费的支出。The above process is the originality verification process. It determines whether the originality verification is successful by comparing the feature sets that need to be registered with the feature sets that have been registered in the blockchain platform 200 and calculating the Hamming distance. This method can greatly reduce the computing pressure of the blockchain platform 200 and reduce gas expenses.
可以理解的是,在互联网环境中传输交通数据是不安全的,交通数据有被篡改的风险,因此,需要对交通数据进行合法性验证,详见如下:It is understandable that it is unsafe to transmit traffic data in the Internet environment, and there is a risk of traffic data being tampered with. Therefore, the legality of traffic data needs to be verified, as detailed below:
登记数据包还包括时间戳及权利公钥,所述登记业务,具体包括:The registration data package also includes a timestamp and a rights public key. The registration services specifically include:
所述区块链平台200根据所述特征集执行hash运算生成数字指纹;所述区块链平台200将所述数字指纹作为Key值,将所述特征集、所述时间戳及所述权利公钥作为Value值,存入存储域中。The blockchain platform 200 performs a hash operation according to the feature set to generate a digital fingerprint; the blockchain platform 200 uses the digital fingerprint as a Key value, and publicizes the feature set, the timestamp and the rights. The key is stored in the storage domain as the Value value.
具体地,原创性验证成功之后,区块链平台200就可以根据特征集进行hash运算生成数字指纹,其中,数字指纹用于作为版权的唯一标识,起到快速检索到作用,此外,由于hash的防碰撞特性,可以明确权利归属。Specifically, after the originality verification is successful, the blockchain platform 200 can perform a hash operation based on the feature set to generate a digital fingerprint. The digital fingerprint is used as a unique identifier of copyright and plays a role in rapid retrieval. In addition, due to the hash Anti-collision characteristics can clarify the ownership of rights.
具体地,区块链平台200还可以将登记数据包中的时间戳作为版权的申请日,将权利公钥作为权利人身份的标识,权利公钥可以是客户端100的公钥地址,也可以是用户输入的权利人的公钥地址。Specifically, the blockchain platform 200 can also use the timestamp in the registration data package as the copyright application date, and use the rights public key as an identifier of the rights holder. The rights public key can be the public key address of the client 100, or it can It is the public key address of the right holder entered by the user.
进一步地,区块链平台200可以将上述数据以HashMap的形式存储至智能合约的存储域中,可以将数字指纹作为Key值,将特征集、时间戳及权利公钥作为Value值,便于快速查找。Further, the blockchain platform 200 can store the above data in the storage domain of the smart contract in the form of HashMap, and can use the digital fingerprint as the Key value, and the feature set, timestamp and rights public key as the Value value to facilitate quick search. .
上述过程即为版权的登记过程,根据特征集生成数字指纹作为版权的唯一标识,可以起到快速索引、明确权利的作用。The above process is the copyright registration process. A digital fingerprint is generated based on the feature set as the unique identifier of copyright, which can quickly index and clarify rights.
所述客户端100,还用于向所述区块链平台200发送变更数据包;所述变更数据包是由所述客户端100生成的;所述变更数据包包括所述登记凭证及第一数字签名;The client 100 is also used to send a change data package to the blockchain platform 200; the change data package is generated by the client 100; the change data package includes the registration voucher and the first digital signature;
具体地,区块链平台200获取到变更数据包之后,就可以获取登记凭证及第一数字签名,再根据登记凭证及第一数字签名验证变更数据包的合法性。Specifically, after the blockchain platform 200 obtains the change data package, it can obtain the registration certificate and the first digital signature, and then verify the legality of the change data package based on the registration certificate and the first digital signature.
其中,登记凭证用于记录变更业务相关信息,第一数字签名可以是版权权利人使用私钥对登记凭证签名后获得的。The registration voucher is used to record information related to the change business, and the first digital signature can be obtained by the copyright owner using the private key to sign the registration voucher.
所述区块链平台200,还用于对所述变更数据包进行签名验证;当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包;The blockchain platform 200 is also used to perform signature verification on the change data package; when the verification of the change data package is successful, execute the change business related to the registration certificate; when the change data package is successfully verified, When verification fails, the change data packet will be rejected;
具体地,区块链平台200获取到变更数据包之后,就可以读取到变更数据包中包含的登记凭证及第一数字签名,就可以对登记凭证进行签名验证。Specifically, after the blockchain platform 200 obtains the change data package, it can read the registration voucher and the first digital signature contained in the change data package, and then perform signature verification on the registration voucher.
具体地,登记凭证中可以包括需要变更的版权的数字指纹,区块链平台200可以根据数字指纹获取到相应的权利公钥,区块链平台200再将使用权利公钥对第一数字签名解密后获得数据与登记凭证进行比较,当两者匹配时签名验证成功。Specifically, the registration certificate may include the digital fingerprint of the copyright that needs to be changed. The blockchain platform 200 can obtain the corresponding rights public key based on the digital fingerprint. The blockchain platform 200 will then use the rights public key to decrypt the first digital signature. The data obtained is then compared with the registration voucher, and when the two match, the signature verification is successful.
具体地,登记凭证还包括目标公钥,目标公钥即版权受让人的公钥地址,签名验证成功之后,区块链平台200可以将数字指纹对应的权利地址修改为目标公钥值。Specifically, the registration certificate also includes the target public key, which is the public key address of the copyright assignee. After successful signature verification, the blockchain platform 200 can modify the rights address corresponding to the digital fingerprint to the target public key value.
上述过程即为签名验证及变更业务过程,通过设置签名验证可以保障变更业务的真实性,恶意节点无法在不取得权利公钥对应的私钥情况下通过验证,保证了系统的安全性。The above process is the signature verification and change business process. By setting up signature verification, the authenticity of the change business can be guaranteed. Malicious nodes cannot pass the verification without obtaining the private key corresponding to the right public key, thus ensuring the security of the system.
可以理解的是,由于区块链技术存在着操作不可逆性,同时,登记凭证是由权利人单方面生成的,如果在两方进行版权变更的过程中,生成登记凭证的过程权利人方可能将目标公钥进行错误记录,而导致受让人无法获得版权。It is understandable that due to the irreversibility of operations in blockchain technology, and at the same time, the registration voucher is generated unilaterally by the right holder. If the copyright changes are carried out by the two parties, the process of generating the registration voucher may be changed by the right holder. The target public key is incorrectly recorded, resulting in the transferee being unable to obtain the copyright.
因此,可以具体设计一种双方共同确认的方式进行版权变更,详见如下:Therefore, a specific method for copyright changes to be confirmed by both parties can be specifically designed, as detailed below:
变更数据包还包括第二数字签名,所述登记凭证包括目标公钥及所述数字指纹,所述签名验证,具体包括:The change data package also includes a second digital signature. The registration certificate includes the target public key and the digital fingerprint. The signature verification specifically includes:
所述区块链平台200根据所述权利公钥、所述登记凭证及第一数字签名进行验证;The blockchain platform 200 performs verification based on the rights public key, the registration certificate and the first digital signature;
所述区块链平台200根据所述目标公钥、所述登记凭证及第二数字签名进行验证;The blockchain platform 200 performs verification based on the target public key, the registration certificate and the second digital signature;
当验证均通过时,确认签名验证成功。When all verifications pass, it is confirmed that the signature verification is successful.
其中,第二数字签名可以是版权受让人使用受让人私钥对登记凭证签名后获得的,受让人私钥与目标公钥合为公私钥对。The second digital signature may be obtained by the copyright transferee using the transferee's private key to sign the registration certificate, and the transferee's private key and the target public key are combined into a public-private key pair.
具体地,区块链平台200可以根据数字指纹获取到相应的权利公钥,区块链平台200再将使用权利公钥对第一数字签名解密后获得数据与登记凭证进行比较,当两者匹配时签名验证成功。Specifically, the blockchain platform 200 can obtain the corresponding rights public key based on the digital fingerprint. The blockchain platform 200 will then use the rights public key to decrypt the first digital signature to compare the data with the registration certificate. When the two match Signature verification is successful.
进一步地,区块链平台200可以根据登记凭证获取得到目标公钥,区块链平台200再将使用目标公钥对第二数字签名解密后获得数据与登记凭证进行比较,当两者匹配时签名验证成功。Further, the blockchain platform 200 can obtain the target public key based on the registration voucher. The blockchain platform 200 will then use the target public key to decrypt the second digital signature and compare the data obtained with the registration voucher. When the two match, the signature Verification successful.
进一步地,当两个签名验证都通过之后,区块链平台200便可执行与登记凭证相关联的变更业务。Further, after both signature verifications pass, the blockchain platform 200 can perform the change business associated with the registration certificate.
上述过程中,登记凭证是由权利人与受让人双方确认后生成的,执行变更业务前也需确认两者的签名信息,确保了受让人的准确无误。In the above process, the registration certificate is generated after confirmation by both the right holder and the transferee. Before executing the change business, the signature information of both parties needs to be confirmed to ensure the accuracy of the transferee.
可以理解的是,对称加密牵涉到对称密钥的管理问题,尤其是对称密钥的分发问题,它需要通讯双方在通讯之前先透过另一个安全的渠道交换共用的对称密钥,才可以安全地把密文透过不安全的渠道传送;对称密钥一旦被窃,其所作的加密将即时失效。It is understandable that symmetric encryption involves the management of symmetric keys, especially the distribution of symmetric keys. It requires the communicating parties to exchange a shared symmetric key through another secure channel before communicating in order to be safe. The ciphertext is transmitted through unsecured channels; once the symmetric key is stolen, the encryption will be immediately invalid.
因此,可以具体设计一种在互联网环境下使用非对称加密传输对称密钥的方法,详见如下:Therefore, a method for transmitting symmetric keys using asymmetric encryption in an Internet environment can be specifically designed, as detailed below:
变更业务,具体包括:Change business, specifically including:
所述区块链平台200根据所述数字指纹检索获得对应的所述权利公钥;将所述权利公钥的值替换为所述目标公钥的值。The blockchain platform 200 obtains the corresponding rights public key according to the digital fingerprint search; replaces the value of the rights public key with the value of the target public key.
上述过程中,区块链平台200通过登记凭证中的数字指纹快速定位权利公钥,实现系统对版权权利人的快速变更。During the above process, the blockchain platform 200 quickly locates the rights public key through the digital fingerprint in the registration certificate, thereby realizing the system's rapid change of the copyright owner.
下面以客户端100、区块链平台200之间的数据交互为例,执行本申请实施例的具体描述。The following takes the data interaction between the client 100 and the blockchain platform 200 as an example to perform a detailed description of the embodiments of this application.
请一并参见图4,图4是本申请一实施例提供的一种客户端100、区块链平台200之间的数据交互过程场景示意图。Please refer to Figure 4 as well. Figure 4 is a schematic diagram of a data interaction process scenario between a client 100 and a blockchain platform 200 provided by an embodiment of the present application.
S401.客户端100根据源代码数据生成特征集;S401. The client 100 generates a feature set based on the source code data;
其中,源代码数据可以是包含源代码数据的文档,特征集是指根据源代码数据根据一定的算法运算获得的具有代码编排特征的特征集合。Among them, the source code data can be a document containing source code data, and the feature set refers to a feature set with code arrangement characteristics obtained according to a certain algorithm operation based on the source code data.
S402.客户端100向区块链平台200发送登记数据包;S402. The client 100 sends a registration data packet to the blockchain platform 200;
具体地,区块链平台200可以获取到客户端100所发送的登记数据包。客户端100向区块链平台200发送的登记数据包主要包括源代码数据的特征集。Specifically, the blockchain platform 200 can obtain the registration data package sent by the client 100. The registration data package sent by the client 100 to the blockchain platform 200 mainly includes the feature set of the source code data.
S403.区块链平台200进行原创性验证并执行登记业务;S403. The blockchain platform 200 performs originality verification and performs registration business;
具体地,区块链平台200获取到特征集之后,就可以对特征集进行原创性验证。Specifically, after the blockchain platform 200 obtains the feature set, it can verify the originality of the feature set.
具体地,原创性验证成功后,区块链平台200可以将特征集作为版权进行登记注册,区块链平台200中的智能合约可以将特征集数据写入存储域中,当区块链平台200产生区块时,将相关交易发布到区块链网络10中,以实现公告和不可篡改的作用。Specifically, after the originality verification is successful, the blockchain platform 200 can register the feature set as a copyright, and the smart contract in the blockchain platform 200 can write the feature set data into the storage domain. When the blockchain platform 200 When a block is generated, relevant transactions are published to the blockchain network 10 to achieve announcement and non-tampering functions.
S404.区块链平台200向客户端100返回数字指纹;S404. The blockchain platform 200 returns the digital fingerprint to the client 100;
其中,数字指纹用于作为版权的唯一标识,起到快速检索到作用,此外,由于hash的防碰撞特性,可以明确权利归属。Among them, digital fingerprint is used as the unique identification of copyright, which plays a role in quick retrieval. In addition, due to the anti-collision characteristics of hash, the ownership of rights can be clarified.
S405.客户端100向区块链平台200发送变更数据包;S405. The client 100 sends a change data packet to the blockchain platform 200;
具体地,区块链平台200获取到变更数据包之后,就可以获取登记凭证及第一数字签名,再根据登记凭证及第一数字签名验证变更数据包的合法性。Specifically, after the blockchain platform 200 obtains the change data package, it can obtain the registration certificate and the first digital signature, and then verify the legality of the change data package based on the registration certificate and the first digital signature.
S406.区块链平台200进行签名验证并执行变更业务。S406. The blockchain platform 200 performs signature verification and executes the change business.
具体地,登记凭证还包括目标公钥,目标公钥即版权受让人的公钥地址,签名验证成功之后,区块链平台200可以将数字指纹对应的权利地址修改为目标公钥值。Specifically, the registration certificate also includes the target public key, which is the public key address of the copyright assignee. After successful signature verification, the blockchain platform 200 can modify the rights address corresponding to the digital fingerprint to the target public key value.
上述过程即为客户端100、区块链平台200之间的数据交互过程。The above process is the data interaction process between the client 100 and the blockchain platform 200.
综上,本申请一个实施例提供的一种基于区块链的代码版权登记系统In summary, an embodiment of this application provides a blockchain-based code copyright registration system.
通过将用于判断原创性的特征集存储在区块链中,实现减小区块链存储压力及运算汽油费的效果,还通过计算获取特征集的数据指纹作为版权的标识,便于确权,此外,还通过设置双重签名验证确保权利变更的准确性,防止因为区块链网络10的不可逆性导致无法挽回的损失。By storing the feature set used to judge originality in the blockchain, the storage pressure of the blockchain and the calculation of gas costs are reduced. The data fingerprint of the feature set is also obtained through calculation as an identification of copyright, which facilitates confirmation of rights. In addition, double signature verification is set up to ensure the accuracy of rights changes and prevent irreversible losses caused by the irreversibility of the blockchain network 10.
请参见图5,图5是本申请一个实施例提供的一种基于区块链的代码版权登记方法的流程图。Please refer to Figure 5. Figure 5 is a flow chart of a blockchain-based code copyright registration method provided by an embodiment of the present application.
S501.客户端100向所述区块链平台200发送登记数据包;S501. The client 100 sends a registration data packet to the blockchain platform 200;
其中,所述登记数据包包括特征集,所述特征集是由所述客户端100生成的。Wherein, the registration data package includes a feature set, and the feature set is generated by the client 100 .
S502.区块链平台200对所述特征集进行原创性验证;S502. The blockchain platform 200 performs originality verification on the feature set;
当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集。When the verification of the feature set is successful, the feature set is received and the registration service related to the feature set is performed; when the verification of the feature set fails, the feature set is rejected.
S503.所述客户端100向所述区块链平台200发送变更数据包;S503. The client 100 sends a change data packet to the blockchain platform 200;
其中,所述变更数据包是由所述客户端100生成的;所述变更数据包包括所述登记凭证及第一数字签名。Wherein, the change data package is generated by the client 100; the change data package includes the registration certificate and the first digital signature.
S504.所述区块链平台200对所述变更数据包进行签名验证;S504. The blockchain platform 200 performs signature verification on the change data package;
当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包;When the verification of the change data package is successful, execute the change business related to the registration voucher; when the verification of the change data package fails, reject the change data package;
通过本申请所提供的方法,可以实现客户端100与区块链平台200之间实时、可靠的数据交互,确保代码版权归属清晰,有利于代码版权进行统一管理。Through the method provided by this application, real-time and reliable data interaction between the client 100 and the blockchain platform 200 can be achieved, ensuring clear code copyright ownership and conducive to unified management of code copyright.
请参见图6,图6是本申请一个实施例提供的一种基于区块链的代码版权登记平台的结构示意图。Please refer to Figure 6, which is a schematic structural diagram of a blockchain-based code copyright registration platform provided by an embodiment of the present application.
该代码版权登记平台1可以包括:第一获取模块11、原创性验证模块12、登记模块13、第二获取模块14、签名验证模块15、变更模块16:The code copyright registration platform 1 may include: a first acquisition module 11, an originality verification module 12, a registration module 13, a second acquisition module 14, a signature verification module 15, and a change module 16:
第一获取模块11,用于获取客户端发送的登记数据包;其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的。The first acquisition module 11 is used to acquire the registration data packet sent by the client; wherein the registration data packet includes a feature set, and the feature set is generated by the client.
原创性验证模块12,用于对所述特征集进行原创性验证。The originality verification module 12 is used to verify the originality of the feature set.
登记模块13,用于当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集。The registration module 13 is configured to receive the feature set and perform registration services related to the feature set when the feature set is successfully verified; and to reject the feature set when the feature set fails to be verified.
第二获取模块14,用于获取客户端发送的变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括所述登记凭证及第一数字签名。The second acquisition module 14 is used to acquire the change data packet sent by the client; the change data packet is generated by the client; the change data packet includes the registration voucher and the first digital signature.
签名验证模块15,用于对所述变更数据包进行签名验证。The signature verification module 15 is used to perform signature verification on the change data package.
变更模块16,用于当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包。The change module 16 is configured to perform the change service related to the registration certificate when the verification of the change data package is successful; and to reject the change data package when the verification of the change data package fails.
请参见图7,图7是本申请一个实施例提供的一种计算机设备的结构示意图。Please refer to FIG. 7 , which is a schematic structural diagram of a computer device provided by an embodiment of the present application.
图7所示,计算机设备1000可以包括:处理器1001,网络接口1004和存储器1005,此外,计算机设备1000还可以包括:用户接口1003,和至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储平台。如图7所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。As shown in FIG. 7 , the computer device 1000 may include a processor 1001 , a network interface 1004 and a memory 1005 . In addition, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002 . Among them, the communication bus 1002 is used to realize connection communication between these components. Among them, the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1005 may optionally be at least one storage platform located far away from the aforementioned processor 1001. As shown in Figure 7, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
在图7所示的计算机设备1000中,网络接口1004可提供网络通讯功能;而用户接口1003主要用于为用户提供输入的接口;而处理器1001可以用于调用存储器1005中存储的设备控制应用程序,以实现前文图5中任一个所对应实施例中对基于区块链的代码版权登记方法的描述。应当理解,本申请中所描述的计算机设备1000,也可执行前文其余实施例中对代码版权登记平台1的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。In the computer device 1000 shown in Figure 7, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 Program to implement the description of the blockchain-based code copyright registration method in any of the corresponding embodiments in Figure 5. It should be understood that the computer device 1000 described in this application can also perform the description of the code copyright registration platform 1 in the remaining embodiments above, and the details will not be described again. In addition, the description of the beneficial effects of using the same method will not be described again.
此外,这里需要指出的是:本申请还提供了一种计算机可读存储介质,且计算机可读存储介质中存储有前文提及的代码版权登记平台1所执行的计算机程序,且计算机程序包括程序指令,当处理器执行程序指令时,能够执行前文图5中任一个所对应实施例中对基于区块链的代码版权登记方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。In addition, it should be pointed out here that this application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the code copyright registration platform 1 mentioned above, and the computer program includes a program Instructions. When the processor executes the program instructions, it can execute the description of the blockchain-based code copyright registration method in any corresponding embodiment in Figure 5. Therefore, the details will not be described here. In addition, the description of the beneficial effects of using the same method will not be described again. For technical details not disclosed in the computer storage medium embodiments involved in this application, please refer to the description of the method embodiments in this application.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,上述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,上述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The above program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium. When executed, the process may include the processes of the above method embodiments. Among them, the above-mentioned storage medium can be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.

Claims (10)

  1. 一种基于区块链的代码版权登记系统,其特征在于,包括客户端及区块链平台,其中:A code copyright registration system based on blockchain, which is characterized by including a client and a blockchain platform, including:
    所述客户端,用于向所述区块链平台发送登记数据包,其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The client is used to send a registration data packet to the blockchain platform, wherein the registration data packet includes a feature set, and the feature set is generated by the client;
    所述区块链平台,用于对所述特征集进行原创性验证;当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;The blockchain platform is used to verify the originality of the feature set; when the feature set is successfully verified, receive the feature set and perform registration services related to the feature set; when the feature set is successfully verified, When the feature set verification fails, the feature set is rejected;
    所述客户端,还用于向所述区块链平台发送变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括登记凭证及第一数字签名;The client is also used to send a change data package to the blockchain platform; the change data package is generated by the client; the change data package includes a registration certificate and a first digital signature;
    所述区块链平台,还用于对所述变更数据包进行签名验证;当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包。The blockchain platform is also used to perform signature verification on the change data package; when the change data package is successfully verified, execute the change business related to the registration certificate; when the change data package is verified On failure, reject the change packet.
  2. 根据权利要求1所述的系统,其特征在于,所述客户端,还用于:The system according to claim 1, characterized in that the client is also used to:
    在向所述区块链平台发送登记数据包前,获取源代码数据并初始化所述特征集;Before sending the registration data package to the blockchain platform, obtain source code data and initialize the feature set;
    将所述源代码数据分解为若干特征向量;Decompose the source code data into several feature vectors;
    对每个所述特征向量执行hash运算获得hash值的集合;Perform a hash operation on each feature vector to obtain a set of hash values;
    对每个所述特征向量对应的所述hash值进行加权;Weight the hash value corresponding to each feature vector;
    遍历所述集合,根据所述集合中每个所述hash值对所述特征集进行换算;将所述hash值上特定位的值,累加合并至所述特征集的对应位上;Traverse the set and convert the feature set according to each hash value in the set; accumulate and merge the values of specific bits on the hash value into the corresponding bits of the feature set;
    遍历所述特征集的每一位,当所述位的值大于0时,所述特征集的对应位的值设为1;当所述位的值小于等于0时,所述特征集的对应位的值设为0。Traverse each bit of the feature set. When the value of the bit is greater than 0, the value of the corresponding bit of the feature set is set to 1; when the value of the bit is less than or equal to 0, the corresponding bit of the feature set is set to 1. The bit value is set to 0.
  3. 根据权利要求2所述的系统,其特征在于,所述区块链平台,具体用于:The system according to claim 2, characterized in that the blockchain platform is specifically used for:
    获取特征集集合;Get the feature set collection;
    遍历特征集集合,将当前特征集与所述特征集执行海明运算,求得海明距离;当存在所述海明距离小于等于3时,确定所述原创性验证失败;当不存在所述海明距离小于等于3时,确定所述原创性验证成功。Traverse the feature set collection, perform Hamming operation on the current feature set and the feature set, and obtain the Hamming distance; when the Hamming distance is less than or equal to 3, it is determined that the originality verification fails; when the Hamming distance does not exist When the Hamming distance is less than or equal to 3, it is determined that the originality verification is successful.
  4. 根据权利要求3所述的系统,其特征在于,所述登记数据包还包括时间戳及权利公钥,所述登记业务,具体包括:The system according to claim 3, characterized in that the registration data package further includes a timestamp and a rights public key, and the registration service specifically includes:
    所述区块链平台根据所述特征集执行hash运算生成数字指纹;The blockchain platform performs a hash operation based on the feature set to generate a digital fingerprint;
    所述区块链平台将所述数字指纹作为Key值,将所述特征集、所述时间戳及所述权利公钥作为Value值,存入存储域中。The blockchain platform uses the digital fingerprint as the Key value, and the feature set, the timestamp and the rights public key as the Value value, and stores them in the storage domain.
  5. 根据权利要求4所述的系统,其特征在于,所述变更数据包还包括第二数字签名,所述登记凭证包括目标公钥及所述数字指纹,所述签名验证,具体包括:The system according to claim 4, wherein the change data package further includes a second digital signature, the registration certificate includes the target public key and the digital fingerprint, and the signature verification specifically includes:
    所述区块链平台根据所述权利公钥、所述登记凭证及第一数字签名进行验证;The blockchain platform performs verification based on the rights public key, the registration certificate and the first digital signature;
    所述区块链平台根据所述目标公钥、所述登记凭证及第二数字签名进行验证;The blockchain platform performs verification based on the target public key, the registration certificate and the second digital signature;
    当验证均通过时,确认签名验证成功。When all verifications pass, it is confirmed that the signature verification is successful.
  6. 根据权利要求5所述的系统,其特征在于,所述变更业务,具体包括:The system according to claim 5, characterized in that the change service specifically includes:
    所述区块链平台根据所述数字指纹检索获得对应的所述权利公钥;将所述权利公钥的值替换为所述目标公钥的值。The blockchain platform obtains the corresponding rights public key according to the digital fingerprint search; replaces the value of the rights public key with the value of the target public key.
  7. 一种基于区块链的代码版权登记方法,其特征在于,包括:A blockchain-based code copyright registration method, which is characterized by including:
    客户端向所述区块链平台发送登记数据包,其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The client sends a registration data packet to the blockchain platform, where the registration data packet includes a feature set, and the feature set is generated by the client;
    区块链平台对所述特征集进行原创性验证;当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;The blockchain platform performs originality verification on the feature set; when the feature set is successfully verified, it receives the feature set and performs registration services related to the feature set; when the feature set fails to be verified , reject the feature set;
    所述客户端向所述区块链平台发送变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括登记凭证及第一数字签名;The client sends a change data package to the blockchain platform; the change data package is generated by the client; the change data package includes a registration certificate and a first digital signature;
    所述区块链平台对所述变更数据包进行签名验证;当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包。The blockchain platform performs signature verification on the change data package; when the verification of the change data package is successful, executes the change business related to the registration certificate; when verification of the change data package fails, rejects Receive the change packet.
  8. 一种基于区块链的代码版权登记平台,其特征在于,所述平台包括:A blockchain-based code copyright registration platform, characterized in that the platform includes:
    第一获取模块,用于获取客户端发送的登记数据包;其中,所述登记数据包包括特征集,所述特征集是由所述客户端生成的;The first acquisition module is used to acquire the registration data packet sent by the client; wherein the registration data packet includes a feature set, and the feature set is generated by the client;
    原创性验证模块,用于对所述特征集进行原创性验证;An originality verification module, used to verify the originality of the feature set;
    登记模块,用于当对所述特征集验证成功时,接收所述特征集并执行与所述特征集相关的登记业务;当对所述特征集验证失败时,拒收所述特征集;A registration module, configured to receive the feature set and perform registration services related to the feature set when the feature set is successfully verified; to reject the feature set when the feature set fails to be verified;
    第二获取模块,用于获取客户端发送的变更数据包;所述变更数据包是由所述客户端生成的;所述变更数据包包括登记凭证及第一数字签名;The second acquisition module is used to obtain the change data packet sent by the client; the change data packet is generated by the client; the change data packet includes a registration voucher and a first digital signature;
    签名验证模块,用于对所述变更数据包进行签名验证;A signature verification module, used to perform signature verification on the change data package;
    变更模块,用于当对所述变更数据包验证成功时,执行与所述登记凭证相关的变更业务;当对所述变更数据包验证失败时,拒收所述变更数据包。A change module, configured to perform change services related to the registration voucher when the change data package is successfully verified; and to reject the change data package when the change data package fails to be verified.
  9. 一种计算机设备, 其特征在于, 包括存储器和处理器, 所述存储器存储有计算机程序, 所述计算机程序被所述处理器执行时, 使得所述处理器执行权利要求7中所述方法的步骤。A computer device, characterized in that it includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described in claim 7 .
  10. 一种计算机可读存储介质, 其特征在于, 所述计算机可读存储介质存储有计算机程序, 所述计算机程序包括程序指令, 所述程序指令被处理器执行时, 执行权利要求7所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the method of claim 7 is performed. .
PCT/CN2022/120150 2022-05-18 2022-09-21 Blockchain-based code copyright registration system, method and platform WO2023221350A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210550099.7 2022-05-18
CN202210550099.7A CN114896569A (en) 2022-05-18 2022-05-18 Code copyright registration system, method and platform based on block chain

Publications (1)

Publication Number Publication Date
WO2023221350A1 true WO2023221350A1 (en) 2023-11-23

Family

ID=82723575

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120150 WO2023221350A1 (en) 2022-05-18 2022-09-21 Blockchain-based code copyright registration system, method and platform

Country Status (2)

Country Link
CN (1) CN114896569A (en)
WO (1) WO2023221350A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114896569A (en) * 2022-05-18 2022-08-12 陈小娜 Code copyright registration system, method and platform based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145768A (en) * 2016-03-01 2017-09-08 华为技术有限公司 Copyright managing method and system
CN107679045A (en) * 2016-08-01 2018-02-09 华为技术有限公司 Copyright authorization management method and system
CN110968842A (en) * 2019-11-19 2020-04-07 南通大学 Digital copyright protection method based on block chain technology
CN112418851A (en) * 2019-08-21 2021-02-26 余伟坚 Digital copyright registration, transaction and protection method and system
WO2021172668A1 (en) * 2020-02-27 2021-09-02 (주)브레인콜라 First copyright holder authentication system using blockchain, and method therefor
CN114896569A (en) * 2022-05-18 2022-08-12 陈小娜 Code copyright registration system, method and platform based on block chain

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846776B (en) * 2018-04-19 2021-09-21 中山大学 Digital copyright protection method based on block chain technology
CN109101787B (en) * 2018-07-18 2020-11-06 创新先进技术有限公司 Method and device for credit evaluation of copyright user based on block chain
CN113032739A (en) * 2021-03-25 2021-06-25 苏州灵天微半导体科技有限公司 Software code copyright protection method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145768A (en) * 2016-03-01 2017-09-08 华为技术有限公司 Copyright managing method and system
CN107679045A (en) * 2016-08-01 2018-02-09 华为技术有限公司 Copyright authorization management method and system
CN112418851A (en) * 2019-08-21 2021-02-26 余伟坚 Digital copyright registration, transaction and protection method and system
CN110968842A (en) * 2019-11-19 2020-04-07 南通大学 Digital copyright protection method based on block chain technology
WO2021172668A1 (en) * 2020-02-27 2021-09-02 (주)브레인콜라 First copyright holder authentication system using blockchain, and method therefor
CN114896569A (en) * 2022-05-18 2022-08-12 陈小娜 Code copyright registration system, method and platform based on block chain

Also Published As

Publication number Publication date
CN114896569A (en) 2022-08-12

Similar Documents

Publication Publication Date Title
US10924285B2 (en) Method and server for providing notary service with respect to file and verifying file recorded by the notary service
US11050690B2 (en) Method for providing recording and verification service for data received and transmitted by messenger service, and server using method
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
US11849051B2 (en) System and method for off-chain cryptographic transaction verification
US12118556B2 (en) Database configuration for asset transfers
Wang et al. Blockchain-based IoT device identification and management in 5G smart grid
EP3859647A1 (en) Blockchain transaction generation method and device
US20190220624A1 (en) Method and server for providing notary service for file and verifying file recorded by notary service
CA3190548A1 (en) Cryptographic-asset collateral management
US11194911B2 (en) Blockchain technique for agile software development framework
US20230096457A1 (en) Data synchronization method, apparatus, and device, and computer readable storage medium
CN110851877B (en) Data processing method and device, block chain node equipment and storage medium
US20200019707A1 (en) Blockchain technique for agile software development framework
US20200021602A1 (en) Trace-based transaction validation and commitment
WO2022237569A1 (en) Transaction repeat checking method and apparatus, and device and medium
Garcia Bringas et al. BlockChain platforms in financial services: current perspective
WO2023134291A1 (en) Blockchain-based data processing method and apparatus, and device and readable storage medium
JP2023530594A (en) Permitted Event Processing in Distributed Databases
JP2024534315A (en) Privacy protection status reference
CN113255014A (en) Data processing method based on block chain and related equipment
WO2023221350A1 (en) Blockchain-based code copyright registration system, method and platform
US20240163118A1 (en) Blockchain-based data processing method, device, and readable storage medium
Zhang et al. Cross-Chain Interoperability and Collaboration for Keyword-Based Embedded Smart Contracts in the Internet of Things
WO2023207529A1 (en) Data processing method and apparatus, device, medium, and product
WO2023231558A1 (en) Blockchain consensus method and apparatus, medium, electronic device, and program product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22942378

Country of ref document: EP

Kind code of ref document: A1