WO2019196249A1 - Music publishing method and device based on blockchain, terminal device and readable storage medium - Google Patents

Music publishing method and device based on blockchain, terminal device and readable storage medium Download PDF

Info

Publication number
WO2019196249A1
WO2019196249A1 PCT/CN2018/097094 CN2018097094W WO2019196249A1 WO 2019196249 A1 WO2019196249 A1 WO 2019196249A1 CN 2018097094 W CN2018097094 W CN 2018097094W WO 2019196249 A1 WO2019196249 A1 WO 2019196249A1
Authority
WO
WIPO (PCT)
Prior art keywords
blockchain
file
upload
audio data
audio
Prior art date
Application number
PCT/CN2018/097094
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 WO2019196249A1 publication Critical patent/WO2019196249A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0008Associated control or indicating means
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/0033Recording/reproducing or transmission of music for electrophonic musical instruments
    • G10H1/0041Recording/reproducing or transmission of music for electrophonic musical instruments in coded form
    • G10H1/0058Transmission between separate instruments or between individual components of a musical system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2240/00Data organisation or data communication aspects, specifically adapted for electrophonic musical tools or instruments
    • G10H2240/011Files or data streams containing coded musical information, e.g. for transmission
    • G10H2240/026File encryption of specific electrophonic music instrument file or stream formats, e.g. MIDI, note oriented formats, sound banks, wavetables
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2240/00Data organisation or data communication aspects, specifically adapted for electrophonic musical tools or instruments
    • G10H2240/121Musical libraries, i.e. musical databases indexed by musical parameters, wavetables, indexing schemes using musical parameters, musical rule bases or knowledge bases, e.g. for automatic composing methods
    • G10H2240/125Library distribution, i.e. distributing musical pieces from a central or master library

Definitions

  • the present application belongs to the field of data processing technologies, and in particular, to a blockchain-based music distribution method, apparatus, terminal device, and computer readable storage medium.
  • the existing music platform is mostly open to everyone, after the user publishes the file corresponding to the music work, it is very likely that someone else intercepts the file and publishes it elsewhere.
  • the platform is actually unknown to the file. In this case, it is difficult to obtain valid evidence to judge, that is, the user's music copyright cannot be guaranteed from a recognized level.
  • some bad platforms may steal the relevant files of the user's music works, and instead, they are first released and encroach on the rights of the users.
  • the existing music distribution methods have low transparency and security, and the degree of protection for documents related to music works is low.
  • the embodiment of the present application provides a music distribution method, apparatus, terminal device, and computer readable storage medium based on a blockchain, so as to solve the problem of low security of music distribution in the prior art, and related files of music works.
  • a first aspect of the embodiment of the present application provides a blockchain-based music distribution method, including:
  • a second aspect of the embodiments of the present application provides a blockchain-based music distribution apparatus, which may include means for implementing the steps of the above-described blockchain-based music distribution method.
  • a third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, where the computer stores computer readable instructions executable on the processor, the processor executing the computer
  • the steps of the above blockchain-based music distribution method are implemented when the instruction is read.
  • a fourth aspect of embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the blockchain-based The steps of the music publishing method.
  • the audio data is uploaded by the user, and the audio data is converted and processed, and the uploaded file based on the audio data is obtained, and the blockchain technology is used to generate and upload the smart contract pre-set by the bottom layer of the blockchain.
  • the embodiment of the present application implements the upload file corresponding to the audio data by using the blockchain technology. Uploading ensures the rights to upload files and improves the transparency and security of music distribution.
  • FIG. 1 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 1 of the present application;
  • FIG. 2 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 2 of the present application;
  • FIG. 3 is a flowchart of implementing a blockchain-based music distribution method in Embodiment 3 of the present application.
  • FIG. 4 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 4 of the present application;
  • FIG. 5 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 5 of the present application;
  • FIG. 6 is a schematic diagram of a long-term and short-term memory network LSTM model provided in Embodiment 6 of the present application;
  • FIG. 7 is a structural block diagram of a blockchain-based music distribution apparatus in Embodiment 7 of the present application.
  • FIG. 8 is a schematic diagram of a terminal device in Embodiment 8 of the present application.
  • FIG. 1 is a flowchart of implementing a blockchain-based music distribution method according to an embodiment of the present application. As shown in FIG. 1, the music distribution method includes the following steps:
  • S101 Acquire audio data of the user.
  • the audio data of the user is first acquired.
  • the audio data can be digitally converted by the audio signal uploaded by the user, and the audio signal is digitized.
  • the audio signal is digitized.
  • the sampling frequency refers to the number of times the audio signal is sampled per unit time, and each sampling unit time sampling as the sampling frequency increases.
  • the sampling frequency and the sampling size of the audio signal may be preset to enable the converted audio data to meet the requirements of the application scenario.
  • the file format for saving audio data is wave.
  • the audio file uploaded by the user is obtained, and the audio file is used as audio data.
  • the user can directly obtain the audio file uploaded, wherein the audio file format is a readable music format, including the musical instrument digital interface (Musical) Instrument Digital Interface, MIDI), wave and mp3.
  • the audio file is used as audio data for subsequent processing, which improves the diversity of the acquired audio data.
  • S102 Perform conversion processing on the audio data to generate an upload file corresponding to the audio data.
  • the audio data is converted and processed to obtain a corresponding uploaded file.
  • the conversion process does not separately indicate an operation, for example, the conversion process can generate an upload file according to a fixed file format (such as MIDI) without changing the audio data itself; the conversion process can also be audio.
  • the data is fitted to the model to synthesize the uploaded file corresponding to the style of the model, and the specific content will be described later.
  • the conversion processing option is outputted to the user, the selection result of the user's output conversion processing option is obtained, and the conversion processing of the audio data is performed according to the selection result to generate an operation of uploading the file corresponding to the audio data.
  • the user may be provided with conversion processing options, including but not limited to "direct upload”, “music synthesis”, and "fixed format upload”, "direct upload”.
  • the audio data is directly used as an upload file;
  • music synthesis refers to changing the content of the audio data itself after performing certain processing on the audio data, and generating an upload file corresponding to the audio data;
  • fixed format uploading refers to audio
  • the data package is uploaded in a fixed format upload file, which can be extended to fixed MIDI format upload, fixed mp3 format upload, and the like.
  • the conversion processing option is provided, the selection result of the user for the conversion processing option is obtained, and the conversion processing method corresponding to the selection result is executed, and the upload file is generated, which satisfies the different needs of the user, and improves the applicability of the conversion processing.
  • S103 Execute a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file.
  • Blockchain technology uses blockchain data structures to validate and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure data transmission and access security, and utilizes intelligent contracts composed of automated script code.
  • a blockchain generally consists of a data layer, a network layer, a consensus layer, an incentive layer, a contract layer, and an application layer.
  • the data layer encapsulates the underlying data block and related data encryption and time stamping technologies;
  • the network layer includes a distributed networking mechanism, a data propagation mechanism, and a data verification mechanism;
  • the consensus layer is mainly encapsulated for each blockchain.
  • the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives;
  • the contract layer mainly encapsulates various scripts, algorithms, and smart contracts, which are blocks. The basis of the chain programmable feature;
  • the application layer encapsulates various application scenarios and cases of the blockchain.
  • the uploaded file is uploaded to the data block of the blockchain.
  • the smart contract preset in the blockchain contract layer is executed, thereby generating an upload identifier corresponding to the file to be uploaded.
  • smart contracts are digital versions of traditional contracts and are computer programs that run on blockchains.
  • the smart contract preset in the blockchain includes a state machine, a transaction, and a trigger condition, wherein the state machine mainly provides a running environment to run the code of the smart contract; the transaction refers to accessing and possibly updating the block.
  • a program execution unit of the data in the chain for convenience of explanation, the transaction related to the uploading process of the uploaded file is named as an upload transaction; the trigger condition is a precondition of the execution of the smart contract, and when the trigger condition is satisfied, the smart contract starts execution, triggering
  • the condition can be configured to receive the user's intent to upload the uploaded file. For example, after the upload file is generated, the user is provided with the “confirm upload” and “not upload” upload options, and the result of the selection of the upload option is obtained. After “confirm upload”, the state machine is started (the state machine can also be in the long-term online state), and the upload transaction related to the uploaded file is processed in the state machine.
  • the status of the state machine can be detected periodically, that is, the condition that the trigger condition is satisfied is detected, and the upload transaction satisfying the trigger condition is further processed. If there are other transactions that do not satisfy the trigger condition, other transactions are performed. Continue to be stored in the blockchain.
  • the upload queue is configured, and if the trigger condition is met, the upload transaction related to the uploaded file is transmitted to the upload queue. Specifically, after the trigger condition is met, the upload transaction including the uploaded file is transmitted to the tail of the upload queue, and when the upload transaction is queued to the head of the upload queue, the upload transaction is executed to improve the order of the smart contract execution process. And applicability, can be applied to scenarios that have multiple upload transactions to perform.
  • the uploading file is extracted by the feature extraction to generate an upload identifier corresponding to the uploaded file.
  • the manner of identifying the feature extraction is not limited, as long as it is related to the element having the degree of identification in the uploaded file, and the manner of extracting the feature is different, and the amount of the uploaded identifier generated by the different uploaded files is different.
  • the upload identifier may be a certain value, a set of multiple values, or a vector.
  • S104 Generate an update block in the blockchain, and store the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the Upload files and multiple existing files stored in the blockchain.
  • the upload transaction After generating the upload identifier, the upload transaction is continued, and the upload transaction is spread to each verification node of the blockchain, and the verification node performs signature verification to determine the validity of the upload transaction. After obtaining the signature verification of most of the verification nodes or all the verification nodes, the upload transaction is successfully executed, the update block is newly added in the data layer of the blockchain, and the upload file and the upload identifier are stored in the update block. Also, the state machine marks the smart contract as complete and removes the smart contract from the latest update block. After the uploaded file and the uploaded identifier are successfully saved, after the music is released, other nodes of the blockchain can access the file to be uploaded by accessing the latest block.
  • a blockchain-based music publishing platform may be created to perform the steps of S101 to S104.
  • the audio data of the user is obtained by the music publishing platform, and the audio data may be obtained by analog-to-digital conversion of the audio signal recorded by the user, or may be an audio file uploaded by the user.
  • the music distribution platform performs conversion processing on the audio data to obtain an upload file corresponding to the audio data.
  • the user equipment accessing the music distribution platform is a node of the blockchain, and the music publishing platform executes the preset smart contract in the blockchain based on the node of the user equipment and the generated upload file, and generates an upload identifier corresponding to the uploaded file. .
  • the update block is added in the blockchain, and the uploaded file and the uploaded identifier are saved in the update block, which is improved.
  • the music distribution platform may set an access interface to the update block so that other users of the music distribution platform (other nodes of the blockchain) access the update block through the access interface to access the uploaded file.
  • the blockchain network belongs to the peer-to-peer network, and the latest block where the uploaded file is located is generally encrypted, after the uploaded file and the uploaded identifier are successfully stored in the blockchain, the user may also want to purchase the right.
  • Create another smart contract with access to the uploaded file which is named a charge contract for illustrative purposes.
  • the charging contract if the request of another user is received and the money of the user is received, the right to access the uploaded file is opened to the user's disciplinary mechanism, and the other user's can be executed by executing the charging contract. The money is directly transferred to the account of the owner of the uploaded file, which simplifies the transaction process and improves the validity of the transaction.
  • audio data from a user is obtained in different manners, and after the audio data is converted, an upload file corresponding to the audio data is generated, and a blockchain is utilized.
  • the technology generates a upload identifier corresponding to the uploaded file by executing a smart contract of the bottom layer preset, and finally, after the verification is passed, generates an update block in the blockchain, and saves the uploaded file and the uploaded identifier into the update.
  • the effective rights of the uploaded file are guaranteed, which improves the security and reliability of the music release.
  • FIG. 2 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 2 of the present application.
  • the embodiment refines S104 to obtain S201 ⁇ S202, which are as follows:
  • S201 Acquire a plurality of existing identifiers corresponding to the plurality of existing files stored in the blockchain, and compare the uploaded identifiers with the plurality of existing identifiers.
  • the uploaded file is detected. Specifically, after generating the upload identifier corresponding to the uploaded file, acquiring a plurality of existing files stored in the blockchain and a plurality of existing identifiers corresponding to the plurality of existing files (which may exist in the blockchain) In different data blocks, there may also be a unit separately configured in the blockchain for storing a plurality of existing identifiers, and the uploaded identifier is compared with a plurality of existing identifiers, according to the comparison result. Perform different operations.
  • the uploading identifier is different from the multiple existing identifiers, it is proved that the uploaded file is valid, and then the execution of the update block and its subsequent operations in the blockchain is continued; if the uploaded identifier and the plurality of existing identifiers are uploaded If one of the same ones is the same, it proves that the existing file is the same as the uploaded file in the blockchain. In order to ensure the rights of the existing file, the subsequent operations are stopped. Optionally, the amount of the uploaded identifier is detected. After one of the existing identifiers is the same, the user is prompted to upload the failure.
  • a plurality of existing identifiers corresponding to a plurality of existing files stored in a blockchain are acquired, and the uploaded identifier and multiple existing identifiers are obtained. The quantity is compared. If the upload identifier is different from the multiple existing identifiers, the operation of generating the update block in the blockchain is performed; if the upload identifier is the same as one of the plurality of existing identifiers , the subsequent operations are stopped, and the same situation as an existing file after the upload file is uploaded is prevented, thereby improving the effectiveness of the music distribution.
  • FIG. 3 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 3 of the present application.
  • this embodiment refines S102 to obtain S301 ⁇ S302, which are as follows:
  • S301 Acquire an audio sample set, fit the audio sample set with a long-short-term memory network LSTM model, and output the fitted long-short-term memory network LSTM model as a file conversion model.
  • the obtained audio data may be subjected to conversion processing.
  • a conversion processing manner is to combine the audio data with a specific music style, thereby generating an upload file adapted to the music style.
  • the audio sample set contains multiple existing audio files belonging to the same music style.
  • the audio sample set can be stored in a database outside the blockchain, when needed. Obtained from the database when it is used.
  • the existing audio files in the audio sample set are fitted with the Long Short-Term Memory (LSTM) model, which belongs to the time recurrent neural network model and is suitable for processing and predicting time. Important events with relatively long intervals and delays in the sequence can be applied in the embodiments of the present application.
  • the existing audio files in the audio sample set need to be extracted according to the unit time, and the audio feature extraction can extract multiple features of the existing audio file to improve the accuracy of subsequent model training. For example, after determining the unit time, assuming that the existing audio file contains n unit time, the note attribute of the existing audio file (the note to which the audio of a unit belongs) from the start position of the existing audio file.
  • Performing audio feature extraction to obtain a first feature vector which is “ a 1 , a 2 , . . . , a n ”, and performing audio feature extraction on the volume of the existing audio file to obtain a second feature vector, which is “ b 1 , b 2 , ..., b n ”, performing audio feature extraction on the short-term energy of the existing audio file (representing the energy intensity of the audio file in the unit time) to obtain a third feature vector, which is “ c 1 , c 2 , ... , c n ”, etc.
  • the effect of training is proportional to the type of feature extracted by the audio feature extraction, but as the number of features increases, the amount of training will increase accordingly.
  • the audio feature extraction can be adjusted as needed. the process of.
  • the subsequent description is based on a class of feature vectors of the existing audio file, and the feature vector is related to a certain feature of the existing audio file, and is extracted by the audio feature as “ x 1 , x 2 , . . . , x n ", as the input vector of the LSTM model, corresponding to the sound feature extraction of the features related to the actual sound in the existing audio file, and obtain " y 1 , y 2 , ..., y n " as the actual Vector, used to correct the results of the training output via the LSTM model.
  • C t refers to the cell state of the LSTM model at this unit time, and the cells are mainly used to maintain the previously input memory;
  • x t is one of the feature vectors " x 1 , x 2 , ..., x n " Input parameters;
  • h t is the output parameter;
  • represents the SIGMOID function of the neural network;
  • tanh represents the hyperbolic tangent function.
  • the feature vector " x 1 , x 2 , ..., x n " is input into the LSTM model.
  • the first ⁇ layer from left to right in Figure 6 corresponds to the forgetting gate layer.
  • the main function of the forgetting gate layer is to determine the slave cell.
  • FIG. 6 corresponds to the input gate of the second layer is from left to right ⁇ layer, whose main purpose is to determine the state of the cell C t values need to be updated, i t and the output gate layer f t forgetting similar, but also as 0 A value between 1 and 1 means “completely reserved” and 0 means "completely discarded”.
  • the gradient descent method can be adopted to adjust the parameters of the formula in the LSTM model so that the output vector is as close as possible to the actual vector.
  • W t , W C , W O in the above formula represent the connection weights between different nodes.
  • b f , b i , b C and b o in the above formula represent preset variables in the calculation process. Adjust the values of the b f , b i , b C , and b o variables to achieve the purpose of training the LSTM model. After fitting a plurality of existing audio files of the audio sample set with the LSTM model, a file conversion model close to the music style corresponding to the audio sample set can be trained and output.
  • FIG. 4 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 4 of the present application.
  • S401 ⁇ S402 are obtained, which are as follows:
  • S401 Acquire a preference setting of the user.
  • a plurality of audio sample sets may also be preset, and an audio sample set corresponding to the preference setting is selected from a plurality of audio sample sets by acquiring a user's preference setting.
  • a plurality of audio sample sets are preset, multiple keywords are set, and the keywords are associated with the audio sample set.
  • the keywords are related to music categories, for example, setting "classical music” keywords, then the key
  • the plurality of existing audio files corresponding to the word corresponding audio sample set are related to classical music.
  • the user's preference is obtained, and the preference should include multiple keywords as described above, including but not limited to providing the user with multiple preferences including "classical music", "jazz" and "disco".
  • the user's selection result obtain the music category of the audio file with the highest listening rate from the user equipment, and use it as the user's preference setting and the like.
  • the same keyword is determined, and the audio sample set corresponding to the keyword is searched from the plurality of audio sample sets stored in the database, so as to compare the plurality of existing audio files in the audio sample set with the LSTM.
  • the model is fitted to train the LSTM model.
  • step S302 the audio data is input to the file conversion model, and the output result of the file conversion model is converted into the uploaded file.
  • the audio data is extracted according to the same audio feature extraction method, the file conversion model is input, and the output parameters calculated by the file conversion model are set as output results (output vector). . Since the audio feature extraction is performed according to each unit time, the output result can be integrated according to the unit time and converted into an uploaded file, and the uploaded file can realize the normal operation and playback of the existing audio file.
  • the long-short-term memory network LSTM model after fitting a plurality of existing audio files is output as a file conversion model, and the audio data is input into a file conversion model, and finally the output of the file conversion model is integrated into an uploaded file. It can generate upload files of different music styles, which improves the diversity of uploaded files.
  • FIG. 5 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 5 of the present application. With respect to the embodiment corresponding to FIG. 1, the embodiment further includes:
  • the Ethereum refers to an open source underlying system that can implement smart contracts on the blockchain.
  • the Ethereum network can be used to realize the creation and operation of smart contracts.
  • the Ethereum network is composed of multiple Ethereum node connections, launching one of the Ethereum nodes, and creating a smart contract in the Ethereum node.
  • the Ethereum node corresponds to a public key and a private key, and the public key indicates the account address of the Ethereum node, and the private key is used to operate the Ethereum node, and Subsequent signature of the smart contract.
  • S502 Create the smart contract in the Ethereum node.
  • a smart contract is a computer language version of a traditional physical contract, usually in the form of code, which can be deployed on a shared ledger, controls its own assets while maintaining its own state, and can perform external information or external assets received. Respond.
  • the smart contract is created in the Ethereum node, and the mechanism of the smart contract may be the content of step S103, that is, after receiving the file to be uploaded, the identifier corresponding to the file to be uploaded is generated, of course, according to the actual situation.
  • Smart contracts can also include more or less content for the needs of the application scenario. It is worth mentioning that the smart contract can be compiled using the solc smart contract compiler under the go-ethereum framework or testrpc framework. Another way is to use the Ethernet wallet to add the code corresponding to the smart contract to the Ether wallet for publishing, thus replacing the cumbersome compilation process and improving the efficiency of creating smart contracts.
  • S503 Deploy the smart contract in an Ethereum network where the Ethereum node is located, and store the smart contract in the blockchain after the Ethereum network successfully verifies.
  • the smart contract must be executed in the virtual machine, and the Ethereum virtual machine is the operating environment of the smart contract in the Ethereum.
  • the Ethereine virtual machine is internally packaged in a sandbox and is completely isolated. That is, the code inside the Ethereum virtual machine cannot be accessed by the network, file system or other processes.
  • the code of the smart contract is compiled into bytecode and passed through the remote procedure call protocol (Remote The Procedure Call (RPC) interface is sent to multiple Ethereum nodes in the Ethereum network in a point-to-point manner.
  • RPC Remote Procedure Call
  • each Ethereine node can receive the bytecode corresponding to the smart contract.
  • the Ethereum node calculates the bytecode corresponding to the smart contract in the Ethereum node's own Ethereum virtual machine to obtain the operation result.
  • the mutual authentication of each Ethereine virtual machine in the Ethereum network is verified.
  • the content of the verification is mainly whether the private key signature of the participant of the smart contract (ie Ethereum node) matches the account address. If it matches, the verification succeeds. If it does not match, the verification fails. After all the Ethereum nodes in the Ethereum network are successfully verified, the smart contract is written into the blockchain for storage.
  • a smart contract is created in an Ethereum node by launching an Ethereum node in the Ethereum network, and the smart contract is deployed in a peer-to-peer manner.
  • the smart contract is stored in the blockchain, which embodies the smart contract creation process in the Ethereum network, through the ether. The verification of the network ensures the fairness and reliability of the smart contract.
  • FIG. 7 is a structural block diagram of a blockchain-based music distribution apparatus provided by an embodiment of the present application.
  • the music distribution device includes:
  • the obtaining unit 71 is configured to acquire audio data of the user
  • the first generating unit 72 is configured to perform conversion processing on the audio data to generate an upload file corresponding to the audio data;
  • a second generating unit 73 configured to execute a preset smart contract in the blockchain to generate an uploading identifier corresponding to the uploaded file
  • a storage unit 74 configured to generate an update block in the blockchain, and store the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain Differentiating between the uploaded file and a plurality of existing files stored in the blockchain.
  • the storage unit 74 further includes:
  • An identifier obtaining unit configured to acquire a plurality of existing identifiers corresponding to the plurality of existing files stored in the blockchain, and compare the uploaded identifiers with the plurality of existing identifiers ;
  • an execution unit configured to perform the operation of generating an update block in the blockchain if the upload identifier is different from the multiple existing identifiers.
  • the first generating unit 73 includes:
  • a sample obtaining unit configured to acquire an audio sample set, fit the audio sample set with a long-short-term memory network LSTM model, and output the fitted long-short-term memory network LSTM model as a file conversion model;
  • a converting unit configured to input the audio data into the file conversion model, and convert an output result of the file conversion model into the uploaded file.
  • the sample obtaining unit includes:
  • a preference acquiring unit configured to acquire a preference setting of the user
  • a determining unit configured to determine the set of audio samples corresponding to the preference setting.
  • the music distribution device further includes:
  • a deployment unit configured to deploy the smart contract in an Ethereum network in which the Ethereum node is located, and store the smart contract in the blockchain after the Ethereum network successfully authenticates.
  • FIG. 8 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 8 of this embodiment includes a processor 80 and a memory 81 in which computer readable instructions 82 executable on the processor 80 are stored, for example, based on a blockchain. Music release program.
  • the processor 80 executes the computer readable instructions 82 to implement the steps in the various blockchain-based music distribution method embodiments described above, such as steps S101 through S104 shown in FIG.
  • the processor 80 executes the computer readable instructions 82
  • the functions of the units in the above-described music distribution apparatus embodiment are implemented, such as the functions of the units 71 to 74 shown in FIG.
  • the computer readable instructions 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80, To complete this application.
  • the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 82 in the terminal device 8.
  • the computer readable instructions 82 may be partitioned into an acquisition unit, a first generation unit, a second generation unit, and a storage unit, each unit having a specific function as described above.
  • the terminal device may include, but is not limited to, a processor 80 and a memory 81. It will be understood by those skilled in the art that FIG. 8 is merely an example of the terminal device 8, and does not constitute a limitation on the terminal device 8, and may include more or less components than those illustrated, or combine some components, or different components.
  • the terminal device may further include an input/output device, a network access device, a bus, and the like.
  • the so-called processor 80 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8.
  • the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk provided on the terminal device 8, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device.
  • the memory 81 is configured to store the computer readable instructions and other programs and data required by the terminal device.
  • the memory 81 can also be used to temporarily store data that has been output or is about to be output.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present solution is suitable for the technical field of data processing, and provided thereby are a music publishing method and device based on a blockchain, a terminal device and a computer-readable storage medium, the method comprising: acquiring audio data of a user; converting the audio data to generate an uploading file corresponding to the audio data; executing a preset smart contract in a blockchain so as to generate an uploading identification quantity corresponding to the uploading file; and generating an update block in the blockchain, and storing the uploading file and the uploading identification quantity in the update block, the uploading identification quantity being used by the blockchain to distinguish the uploading file and a plurality of current files stored in the blockchain. The present solution increases the transparency and the security of music publishing and effectively protects uploading files related to musical works.

Description

基于区块链的音乐发布方法、装置、终端设备及可读存储介质Block chain-based music distribution method, device, terminal device and readable storage medium
本申请要求于2018年04月10日提交中国专利局、申请号为201810316067.4、发明名称为“基于区块链的音乐发布方法、装置及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on April 10, 2018, the Chinese Patent Office, application number 201810316067.4, and the invention titled "block distribution-based music distribution method, device and terminal device", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请属于数据处理技术领域,尤其涉及基于区块链的音乐发布方法、装置、终端设备及计算机可读存储介质。The present application belongs to the field of data processing technologies, and in particular, to a blockchain-based music distribution method, apparatus, terminal device, and computer readable storage medium.
背景技术Background technique
音乐是人类创造性的体现,作为一种文明符号,从古至今都活跃在人们的日常生活中,各种音乐作品更是层出不穷。在以前,音乐作品的传播往往需要现场演奏,需要乐器或人声等硬性条件,故在音乐作品需求的乐器较多或者需要多人合唱时,演奏条件难以满足,为音乐作品的传播共享带来了困难。而在现代社会中,随着科技和网络的发展,用户可将自己创作的音乐作品保存为文件,发布在论坛或者音乐平台上,从而实现传播并提高关注度。Music is the embodiment of human creativity. As a symbol of civilization, it has been active in people's daily life since ancient times, and various music works are emerging one after another. In the past, the spread of musical works often required live performances and required hard conditions such as musical instruments or vocals. Therefore, when musical instruments require more musical instruments or when many people need to sing, the playing conditions are difficult to satisfy, which brings the sharing of musical works. It is difficult. In modern society, with the development of technology and network, users can save their own music works as files and publish them on forums or music platforms to achieve communication and improve attention.
但是,由于现有的音乐平台大多是对所有人开放,在用户在发布音乐作品对应的文件后,很可能会发生他人截取该文件并在他处进行发布的情况,平台在文件真正所属者未知的情况下,很难取得有效的证据来进行判断,即无法从公认层面上保证用户的音乐版权。此外,在用户通过音乐平台进行发布时,某些不良平台可能盗取用户的音乐作品相关文件后,反而率先发布,侵占用户的权益。综上,现有的音乐发布方法透明化程度和安全性低,并且对音乐作品相关文件的保护程度低。However, since the existing music platform is mostly open to everyone, after the user publishes the file corresponding to the music work, it is very likely that someone else intercepts the file and publishes it elsewhere. The platform is actually unknown to the file. In this case, it is difficult to obtain valid evidence to judge, that is, the user's music copyright cannot be guaranteed from a recognized level. In addition, when the user publishes through the music platform, some bad platforms may steal the relevant files of the user's music works, and instead, they are first released and encroach on the rights of the users. In summary, the existing music distribution methods have low transparency and security, and the degree of protection for documents related to music works is low.
技术问题technical problem
有鉴于此,本申请实施例提供了基于区块链的音乐发布方法、装置、终端设备及计算机可读存储介质,以解决现有技术中进行音乐发布的安全性低,对音乐作品相关文件的保护程度低的问题。In view of this, the embodiment of the present application provides a music distribution method, apparatus, terminal device, and computer readable storage medium based on a blockchain, so as to solve the problem of low security of music distribution in the prior art, and related files of music works. The problem of low protection.
技术解决方案Technical solution
本申请实施例的第一方面提供了一种基于区块链的音乐发布方法,包括:A first aspect of the embodiment of the present application provides a blockchain-based music distribution method, including:
获取用户的音频数据;Obtaining user's audio data;
对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;Performing conversion processing on the audio data to generate an upload file corresponding to the audio data;
执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;Executing a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file;
在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。Generating an update block in the blockchain, and storing the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the upload file And a plurality of existing files stored in the blockchain.
本申请实施例的第二方面提供了一种基于区块链的音乐发布装置,可以包括用于实现上述基于区块链的音乐发布方法的步骤的单元。A second aspect of the embodiments of the present application provides a blockchain-based music distribution apparatus, which may include means for implementing the steps of the above-described blockchain-based music distribution method.
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述基于区块链的音乐发布方法的步骤。A third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, where the computer stores computer readable instructions executable on the processor, the processor executing the computer The steps of the above blockchain-based music distribution method are implemented when the instruction is read.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述基于区块链的音乐发布方法的步骤。A fourth aspect of embodiments of the present application provides a computer readable storage medium storing computer readable instructions that, when executed by a processor, implement the blockchain-based The steps of the music publishing method.
有益效果Beneficial effect
本申请实施例通过获取用户上传的音频数据,对音频数据进行转换处理,得到基于音频数据的上传文件,并通过区块链技术,具体通过执行区块链底层预先设置的智能合约,生成与上传文件对应的上传标识量,最后在区块链中新增更新区块,并在更新区块中存储上传文件和上传标识量,本申请实施例通过区块链技术实现音频数据对应的上传文件的上传,保证了上传文件的权益,提升了音乐发布的透明程度和安全性。In the embodiment of the present application, the audio data is uploaded by the user, and the audio data is converted and processed, and the uploaded file based on the audio data is obtained, and the blockchain technology is used to generate and upload the smart contract pre-set by the bottom layer of the blockchain. The uploading identifier corresponding to the file, and finally adding the update block in the blockchain, and storing the upload file and the uploading identifier in the update block. The embodiment of the present application implements the upload file corresponding to the audio data by using the blockchain technology. Uploading ensures the rights to upload files and improves the transparency and security of music distribution.
附图说明DRAWINGS
图1是本申请实施例一中基于区块链的音乐发布方法的实现流程图;1 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 1 of the present application;
图2是本申请实施例二中基于区块链的音乐发布方法的实现流程图;2 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 2 of the present application;
图3是本申请实施例三中基于区块链的音乐发布方法的实现流程图;3 is a flowchart of implementing a blockchain-based music distribution method in Embodiment 3 of the present application;
图4是本申请实施例四中基于区块链的音乐发布方法的实现流程图;4 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 4 of the present application;
图5是本申请实施例五中基于区块链的音乐发布方法的实现流程图;5 is a flowchart of implementing a music distribution method based on a blockchain in Embodiment 5 of the present application;
图6是本申请实施例六提供的长短期记忆网络LSTM模型的示意图;6 is a schematic diagram of a long-term and short-term memory network LSTM model provided in Embodiment 6 of the present application;
图7是本申请实施例七中基于区块链的音乐发布装置的结构框图;7 is a structural block diagram of a blockchain-based music distribution apparatus in Embodiment 7 of the present application;
图8是本申请实施例八中终端设备的示意图。FIG. 8 is a schematic diagram of a terminal device in Embodiment 8 of the present application.
本发明的实施方式Embodiments of the invention
为了对本申请的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本申请的具体实施方式。In order to more clearly understand the technical features, objects and effects of the present application, the specific embodiments of the present application will be described in detail with reference to the accompanying drawings.
请参阅图1,图1是本申请实施例提供的一种基于区块链的音乐发布方法的实现流程图。如图1所示,该音乐发布方法包括以下步骤:Please refer to FIG. 1. FIG. 1 is a flowchart of implementing a blockchain-based music distribution method according to an embodiment of the present application. As shown in FIG. 1, the music distribution method includes the following steps:
S101:获取用户的音频数据。S101: Acquire audio data of the user.
在本申请实施例中,首先获取用户的音频数据。音频数据可由对用户上传的音频信号进行模数转换,使音频信号数字化产生,比如用户发出通过演唱或弹奏产生的原声,并同时开始录制,则录制来源的原声即为音频信号,录制完成后产生的数字化数据即为音频数据。在音频信号数字化的过程中,还需确定对音频信号的采样频率和采样大小,其中,采样频率指单位时间内对音频信号采样的次数,随着采样频率的增大,每个采样单位时间采样到的音频信号的内容越多,从而数字化得到的音频数据就越接近于真实的音频信号,但是采样频率的增大会使得音频数据的数据量增大,提高对音频数据处理的难度;而采样大小决定了对音频信号采样得到的音频数据样本值的数值位数范围,数值位数范围越大,对于音频信号中的变化的可记录程度越高,当然,音频数据的数据量也会对应增大。在实际应用场景中,执行音频信号到音频数据的模数转换之前,可预先设置对音频信号的采样频率和采样大小,以使转换出的音频数据满足应用场景的需求。当然,也可使用现有的录制工具进行音频信号的录制,并输出音频数据。一般地,保存音频数据的文件格式为wave。In the embodiment of the present application, the audio data of the user is first acquired. The audio data can be digitally converted by the audio signal uploaded by the user, and the audio signal is digitized. For example, if the user makes an original sound generated by singing or playing, and starts recording at the same time, the original sound of the recording source is an audio signal, and after the recording is completed, the audio data is generated. The digitized data generated is the audio data. In the process of digitizing the audio signal, it is also necessary to determine the sampling frequency and sampling size of the audio signal, wherein the sampling frequency refers to the number of times the audio signal is sampled per unit time, and each sampling unit time sampling as the sampling frequency increases. The more the content of the audio signal is, the closer the digitized audio data is to the real audio signal, but the increase of the sampling frequency will increase the data amount of the audio data, and the difficulty of processing the audio data; Determines the range of numerical digits of the audio data sample values obtained by sampling the audio signal. The larger the value digit range, the higher the recordable degree of the change in the audio signal. Of course, the data amount of the audio data is correspondingly increased. . In an actual application scenario, before performing analog-to-digital conversion of the audio signal to the audio data, the sampling frequency and the sampling size of the audio signal may be preset to enable the converted audio data to meet the requirements of the application scenario. Of course, you can also use the existing recording tool to record audio signals and output audio data. In general, the file format for saving audio data is wave.
可选地,获取用户上传的音频文件,将音频文件作为音频数据。除了录制用户的音频信号外,还可直接获取用户上传的音频文件,其中,音频文件格式为可读音乐格式,包括乐器数字接口(Musical Instrument Digital Interface,MIDI)、wave和mp3等。获取到音频文件后,将音频文件作为音频数据,进行后续处理,提升了获取音频数据的多样性。Optionally, the audio file uploaded by the user is obtained, and the audio file is used as audio data. In addition to recording the user's audio signal, the user can directly obtain the audio file uploaded, wherein the audio file format is a readable music format, including the musical instrument digital interface (Musical) Instrument Digital Interface, MIDI), wave and mp3. After the audio file is obtained, the audio file is used as audio data for subsequent processing, which improves the diversity of the acquired audio data.
S102:对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件。S102: Perform conversion processing on the audio data to generate an upload file corresponding to the audio data.
获取音频数据后,对音频数据进行转换处理,得到对应的上传文件。其中,转换处理并不单独指示某一种操作,比如,转换处理可在不改变音频数据本身的前提下,将音频数据按照固定的文件格式(如MIDI)生成上传文件;转换处理也可将音频数据与模型进行拟合,以合成模型对应风格的上传文件等,具体内容在后文进行阐述。After the audio data is acquired, the audio data is converted and processed to obtain a corresponding uploaded file. Wherein, the conversion process does not separately indicate an operation, for example, the conversion process can generate an upload file according to a fixed file format (such as MIDI) without changing the audio data itself; the conversion process can also be audio. The data is fitted to the model to synthesize the uploaded file corresponding to the style of the model, and the specific content will be described later.
可选地,输出转换处理选项至用户,获取用户对输出转换处理选项的选择结果,并根据选择结果执行对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件的操作。在实际应用场景中,在获取到用户的音频数据后,可向用户提供转换处理选项,转换处理选项包括但不限于“直接上传”、“音乐合成”和“固定格式上传”,“直接上传”是指将音频数据直接作为上传文件;“音乐合成”是指对音频数据进行一定处理后,改变音频数据本身的内容,并生成与音频数据对应的上传文件;“固定格式上传”是指将音频数据封装为固定格式的上传文件进行上传,可延伸为固定MIDI格式上传、固定mp3格式上传等。提供转换处理选项后,获取用户对于转换处理选项的选择结果,并执行与该选择结果对应的转换处理方法,生成上传文件,满足了用户的不同需求,提升了转换处理的适用性。Optionally, the conversion processing option is outputted to the user, the selection result of the user's output conversion processing option is obtained, and the conversion processing of the audio data is performed according to the selection result to generate an operation of uploading the file corresponding to the audio data. In the actual application scenario, after the user's audio data is obtained, the user may be provided with conversion processing options, including but not limited to "direct upload", "music synthesis", and "fixed format upload", "direct upload". It means that the audio data is directly used as an upload file; "music synthesis" refers to changing the content of the audio data itself after performing certain processing on the audio data, and generating an upload file corresponding to the audio data; "fixed format uploading" refers to audio The data package is uploaded in a fixed format upload file, which can be extended to fixed MIDI format upload, fixed mp3 format upload, and the like. After the conversion processing option is provided, the selection result of the user for the conversion processing option is obtained, and the conversion processing method corresponding to the selection result is executed, and the upload file is generated, which satisfies the different needs of the user, and improves the applicability of the conversion processing.
S103:执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量。S103: Execute a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file.
区块链技术是利用块链式数据结构来验证与存储数据,利用分布式节点共识算法来生成和更新数据,利用密码学保证数据传输和访问的安全,利用由自动化脚本代码组成的智能合约来编程和操作数据的分布式基础架构与计算范式。区块链一般由数据层、网络层、共识层、激励层、合约层和应用层组成。其中,数据层封装了底层数据区块以及相关的数据加密和时间戳等技术;网络层则包括分布式组网机制、数据传播机制和数据验证机制等;共识层主要封装针对区块链中各个节点的各类共识算法;激励层将经济因素集成到区块链技术体系中来,主要包括经济激励的发行机制和分配机制等;合约层主要封装各类脚本、算法和智能合约,是区块链可编程特性的基础;应用层则封装了区块链的各种应用场景和案例。Blockchain technology uses blockchain data structures to validate and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure data transmission and access security, and utilizes intelligent contracts composed of automated script code. A distributed infrastructure and computational paradigm for programming and manipulating data. A blockchain generally consists of a data layer, a network layer, a consensus layer, an incentive layer, a contract layer, and an application layer. The data layer encapsulates the underlying data block and related data encryption and time stamping technologies; the network layer includes a distributed networking mechanism, a data propagation mechanism, and a data verification mechanism; the consensus layer is mainly encapsulated for each blockchain. Various types of consensus algorithms for nodes; the incentive layer integrates economic factors into the blockchain technology system, mainly including the issuance mechanism and distribution mechanism of economic incentives; the contract layer mainly encapsulates various scripts, algorithms, and smart contracts, which are blocks. The basis of the chain programmable feature; the application layer encapsulates various application scenarios and cases of the blockchain.
在本申请实施例中,将上传文件上传至区块链的数据区块。首先,执行区块链合约层中预设的智能合约,从而生成与待上传文件对应的上传标识量。其中,智能合约是传统合约的数字化版本,是在区块链上运行的计算机程序。在本申请实施例中,区块链中预设的智能合约包括状态机、事务和触发条件,其中,状态机主要提供运行环境,以运行智能合约的代码;事务是指访问并可能更新区块链中数据的一个程序执行单元,为了方便说明,将与上传文件的上传过程相关的事务命名为上传事务;触发条件为智能合约执行的前提条件,当触发条件满足时,智能合约开始执行,触发条件可配置为接收到用户对上传文件的上传意图,如在上传文件生成后,向用户提供包含“确认上传”和“不上传”上传选项,并在获取到用户对该上传选项的选择结果为“确认上传”后,启动状态机(状态机也可处于长期在线的状态),将与上传文件相关的上传事务在状态机中进行处理。为了保证上传事务处理的时效性,可定期检测状态机状态,即检测触发条件满足的情况,并将满足触发条件的上传事务进行进一步处理,如果存在不满足触发条件的其他事务,则将其他事务继续存放在区块链中。In the embodiment of the present application, the uploaded file is uploaded to the data block of the blockchain. First, the smart contract preset in the blockchain contract layer is executed, thereby generating an upload identifier corresponding to the file to be uploaded. Among them, smart contracts are digital versions of traditional contracts and are computer programs that run on blockchains. In the embodiment of the present application, the smart contract preset in the blockchain includes a state machine, a transaction, and a trigger condition, wherein the state machine mainly provides a running environment to run the code of the smart contract; the transaction refers to accessing and possibly updating the block. A program execution unit of the data in the chain, for convenience of explanation, the transaction related to the uploading process of the uploaded file is named as an upload transaction; the trigger condition is a precondition of the execution of the smart contract, and when the trigger condition is satisfied, the smart contract starts execution, triggering The condition can be configured to receive the user's intent to upload the uploaded file. For example, after the upload file is generated, the user is provided with the “confirm upload” and “not upload” upload options, and the result of the selection of the upload option is obtained. After "confirm upload", the state machine is started (the state machine can also be in the long-term online state), and the upload transaction related to the uploaded file is processed in the state machine. In order to ensure the timeliness of the upload transaction, the status of the state machine can be detected periodically, that is, the condition that the trigger condition is satisfied is detected, and the upload transaction satisfying the trigger condition is further processed. If there are other transactions that do not satisfy the trigger condition, other transactions are performed. Continue to be stored in the blockchain.
可选地,配置上传队列,若检测到触发条件满足,则将与上传文件相关的上传事务传输至上传队列。具体地,当触发条件满足后,将包含上传文件的上传事务传输至上传队列的队尾,当上传事务排至上传队列的队首时,执行该上传事务,提升智能合约执行过程的有序性和适用性,可应用于有多个上传事务需要执行的场景。Optionally, the upload queue is configured, and if the trigger condition is met, the upload transaction related to the uploaded file is transmitted to the upload queue. Specifically, after the trigger condition is met, the upload transaction including the uploaded file is transmitted to the tail of the upload queue, and when the upload transaction is queued to the head of the upload queue, the upload transaction is executed to improve the order of the smart contract execution process. And applicability, can be applied to scenarios that have multiple upload transactions to perform.
在上传事务的执行过程中,对上传文件进行标识特征提取,以生成与该上传文件对应的上传标识量。在本申请实施例中,并不限定标识特征提取的方式,只要其与上传文件中具有标识度的元素相关,并且通过标识特征提取的方式,不同上传文件产生的上传标识量不同,则皆可应用在本申请实施例中,如可提取上传文件中的音乐时长和音乐密度,将两者进行综合处理生成上传标识量,上传标识量可以为某个数值、多个数值的集合或者向量等。During the execution of the upload transaction, the uploading file is extracted by the feature extraction to generate an upload identifier corresponding to the uploaded file. In the embodiment of the present application, the manner of identifying the feature extraction is not limited, as long as it is related to the element having the degree of identification in the uploaded file, and the manner of extracting the feature is different, and the amount of the uploaded identifier generated by the different uploaded files is different. In the embodiment of the present application, if the music duration and the music density in the uploaded file are extracted, the two are combined to generate an upload identifier, and the upload identifier may be a certain value, a set of multiple values, or a vector.
S104:在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。S104: Generate an update block in the blockchain, and store the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the Upload files and multiple existing files stored in the blockchain.
在生成上传标识量后,继续处理上传事务,将上传事务扩散到区块链的每一个验证节点,由验证节点进行签名验证确定该上传事务的有效性。当获取到大多数验证节点或全部验证节点的签名验证后,上传事务成功执行,在区块链的数据层中新增更新区块,并将上传文件和上传标识量存储在更新区块中,并且,状态机将智能合约标记为完成,并从最新的更新区块中移除智能合约。上传文件和上传标识量保存成功后,即实现了音乐的发布后,区块链的其他节点可通过访问最新区块从而访问待上传文件。After generating the upload identifier, the upload transaction is continued, and the upload transaction is spread to each verification node of the blockchain, and the verification node performs signature verification to determine the validity of the upload transaction. After obtaining the signature verification of most of the verification nodes or all the verification nodes, the upload transaction is successfully executed, the update block is newly added in the data layer of the blockchain, and the upload file and the upload identifier are stored in the update block. Also, the state machine marks the smart contract as complete and removes the smart contract from the latest update block. After the uploaded file and the uploaded identifier are successfully saved, after the music is released, other nodes of the blockchain can access the file to be uploaded by accessing the latest block.
在实际应用场景中,可创建基于区块链的音乐发布平台以执行S101到S104的步骤。具体地,由音乐发布平台获取用户的音频数据,音频数据可通过对用户录制的音频信号进行模数转换得到,或者可为接收到的用户上传的音频文件。在获取到音频数据后,音乐发布平台对音频数据进行转换处理,得到与音频数据对应的上传文件。访问音乐发布平台的用户设备为区块链的一个节点,音乐发布平台基于用户设备的节点和生成的上传文件,执行区块链中预设的智能合约,生成与该上传文件对应的上传标识量。在包含上传文件的上传事务经区块链中的大多数或全部验证节点签名验证后,在区块链中新增更新区块,并在更新区块中保存上传文件和上传标识量,提升了用户层面的易用性。此外,音乐发布平台可设置对于更新区块的访问接口,以便音乐发布平台的其他用户(区块链的其他节点)通过该访问接口访问更新区块,从而访问上传文件。In an actual application scenario, a blockchain-based music publishing platform may be created to perform the steps of S101 to S104. Specifically, the audio data of the user is obtained by the music publishing platform, and the audio data may be obtained by analog-to-digital conversion of the audio signal recorded by the user, or may be an audio file uploaded by the user. After the audio data is acquired, the music distribution platform performs conversion processing on the audio data to obtain an upload file corresponding to the audio data. The user equipment accessing the music distribution platform is a node of the blockchain, and the music publishing platform executes the preset smart contract in the blockchain based on the node of the user equipment and the generated upload file, and generates an upload identifier corresponding to the uploaded file. . After the upload transaction containing the uploaded file is verified by most or all of the verification nodes in the blockchain, the update block is added in the blockchain, and the uploaded file and the uploaded identifier are saved in the update block, which is improved. User-level ease of use. In addition, the music distribution platform may set an access interface to the update block so that other users of the music distribution platform (other nodes of the blockchain) access the update block through the access interface to access the uploaded file.
此外,由于区块链网络属于点对点网络,并且上传文件所在的最新区块一般会进行加密,故在上传文件和上传标识量成功存储在区块链中后,还可针对其他用户想要购买权限以访问上传文件的情况,创建另一种智能合约,为了便于说明,将其命名为收费合约。在收费合约中,可制定如在接收到其他用户的请求,并接收到该用户的钱款后,将访问上传文件的权限开放给该用户等纪机制,通过执行收费合约,可将其他用户的钱款直接汇入上传文件所有者的账户中,可简化交易过程,提升交易的有效性。In addition, since the blockchain network belongs to the peer-to-peer network, and the latest block where the uploaded file is located is generally encrypted, after the uploaded file and the uploaded identifier are successfully stored in the blockchain, the user may also want to purchase the right. Create another smart contract with access to the uploaded file, which is named a charge contract for illustrative purposes. In the charging contract, if the request of another user is received and the money of the user is received, the right to access the uploaded file is opened to the user's disciplinary mechanism, and the other user's can be executed by executing the charging contract. The money is directly transferred to the account of the owner of the uploaded file, which simplifies the transaction process and improves the validity of the transaction.
通过图1所示实施例可知,在本申请实施例中,通过不同方式获取来自用户的音频数据,对所述音频数据进行转换处理后,生成与音频数据对应的上传文件,并利用区块链技术,通过执行其底层预设的智能合约,生成与所述上传文件对应的上传标识量,最后在验证通过后,在区块链中生成更新区块,将上传文件和上传标识量存入更新区块中,保证了上传文件的有效权益,提升了音乐发布的安全性和可靠性。According to the embodiment shown in FIG. 1 , in the embodiment of the present application, audio data from a user is obtained in different manners, and after the audio data is converted, an upload file corresponding to the audio data is generated, and a blockchain is utilized. The technology generates a upload identifier corresponding to the uploaded file by executing a smart contract of the bottom layer preset, and finally, after the verification is passed, generates an update block in the blockchain, and saves the uploaded file and the uploaded identifier into the update. In the block, the effective rights of the uploaded file are guaranteed, which improves the security and reliability of the music release.
请参阅图2,图2是本申请实施例二提供的一种基于区块链的音乐发布方法的实现流程图。相对于图1对应的实施例,本实施例对S104进行细化后得到S201~S202,详述如下:Referring to FIG. 2, FIG. 2 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 2 of the present application. With respect to the embodiment corresponding to FIG. 1, the embodiment refines S104 to obtain S201~S202, which are as follows:
S201:获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对。S201: Acquire a plurality of existing identifiers corresponding to the plurality of existing files stored in the blockchain, and compare the uploaded identifiers with the plurality of existing identifiers.
在智能合约的执行过程中,为了保证上传文件的有效性,保证其不侵犯其他现有文件的权益,对上传文件进行检测。具体地,在生成与上传文件对应的上传标识量后,获取区块链存储的多个现有文件以及与多个现有文件对应的多个现有标识量(其可能存在于区块链的不同数据区块中,也可能存在于区块链中单独设置的用于存储多个现有标识量的单元),并将上传标识量与多个现有标识量进行比对,根据比对结果执行不同的操作。In the execution process of the smart contract, in order to ensure the validity of the uploaded file and ensure that it does not infringe the rights of other existing documents, the uploaded file is detected. Specifically, after generating the upload identifier corresponding to the uploaded file, acquiring a plurality of existing files stored in the blockchain and a plurality of existing identifiers corresponding to the plurality of existing files (which may exist in the blockchain) In different data blocks, there may also be a unit separately configured in the blockchain for storing a plurality of existing identifiers, and the uploaded identifier is compared with a plurality of existing identifiers, according to the comparison result. Perform different operations.
S202:若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。S202: If the upload identifier is different from the multiple existing identifiers, perform the operation of generating an update block in the blockchain.
若上传标识量与多个现有标识量都不相同,则证明上传文件有效,则继续执行在区块链中生成更新区块及其后续的操作;若上传标识量与多个现有标识量中的某一个相同,则证明区块链中存储有与上传文件相同的现有文件,为了保证该现有文件的权益,停止执行后续的操作,可选地,在检测出上传标识量与多个现有标识量中的某一个相同后,向用户输出上传失败的提示。If the uploading identifier is different from the multiple existing identifiers, it is proved that the uploaded file is valid, and then the execution of the update block and its subsequent operations in the blockchain is continued; if the uploaded identifier and the plurality of existing identifiers are uploaded If one of the same ones is the same, it proves that the existing file is the same as the uploaded file in the blockchain. In order to ensure the rights of the existing file, the subsequent operations are stopped. Optionally, the amount of the uploaded identifier is detected. After one of the existing identifiers is the same, the user is prompted to upload the failure.
通过图2所示实施例可知,在本申请实施例中,通过获取区块链中存储的与多个现有文件对应的多个现有标识量,并将上传标识量与多个现有标识量进行比对,如果上传标识量与多个现有标识量都不相同,则执行在区块链中生成更新区块的操作;如果上传标识量与多个现有标识量中的某一个相同,则停止执行后续的操作,防止了上传文件上传后与某个现有文件相同的情况,提升了音乐发布的有效性。According to the embodiment shown in FIG. 2, in the embodiment of the present application, a plurality of existing identifiers corresponding to a plurality of existing files stored in a blockchain are acquired, and the uploaded identifier and multiple existing identifiers are obtained. The quantity is compared. If the upload identifier is different from the multiple existing identifiers, the operation of generating the update block in the blockchain is performed; if the upload identifier is the same as one of the plurality of existing identifiers , the subsequent operations are stopped, and the same situation as an existing file after the upload file is uploaded is prevented, thereby improving the effectiveness of the music distribution.
请参阅图3,图3是本申请实施例三提供的一种基于区块链的音乐发布方法的实现流程图。相对于图1对应的实施例,本实施例对S102细化后得到S301~S302,详述如下:Please refer to FIG. 3. FIG. 3 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 3 of the present application. With respect to the embodiment corresponding to FIG. 1, this embodiment refines S102 to obtain S301~S302, which are as follows:
S301:获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出。S301: Acquire an audio sample set, fit the audio sample set with a long-short-term memory network LSTM model, and output the fitted long-short-term memory network LSTM model as a file conversion model.
在本申请实施例中,可对获取到的音频数据进行转换处理,特别地,一种转换处理的方式是将音频数据和特定的音乐风格结合,从而生成适应音乐风格的上传文件。首先,需要获取音频样本集,一般来说,音频样本集包含多个属于同一音乐风格的现有音频文件,为了减少计算资源的浪费,音频样本集可以存储区块链外的数据库中,在需要使用时从数据库中获取。In the embodiment of the present application, the obtained audio data may be subjected to conversion processing. In particular, a conversion processing manner is to combine the audio data with a specific music style, thereby generating an upload file adapted to the music style. First, you need to obtain an audio sample set. In general, the audio sample set contains multiple existing audio files belonging to the same music style. In order to reduce the waste of computing resources, the audio sample set can be stored in a database outside the blockchain, when needed. Obtained from the database when it is used.
获取完毕后,将音频样本集内的多个现有音频文件与长短期记忆网络(Long Short-Term Memory,LSTM)模型进行拟合,LSTM模型属于时间递归神经网络模型,适合于处理和预测时间序列中间隔和延迟相对较长的重要事件,故可应用在本申请实施例中。在拟合时,需要将音频样本集内的现有音频文件按照单位时间进行音频特征提取,音频特征提取可对现有音频文件的多个特征进行提取,以提升后续进行模型训练的准确性。举例来说,确定单位时间后,假定现有音频文件包含n个单位时间,则从现有音频文件的起始位置开始,对现有音频文件的音符属性(某个单位的音频所属的音符)进行音频特征提取得到第一特征向量,为“ a 1 a 2 ,……, a n ”,对现有音频文件的音量大小进行音频特征提取得到第二特征向量,为“ b 1 b 2 ,……, b n ”,对现有音频文件的短时能量(表示该单元时间内音频文件的能量强弱)进行音频特征提取得到第三特征向量,为“ c 1 c 2 ,……, c n ”等,训练的效果与音频特征提取提取特征的种类成正比,但随着特征的种类增多,训练的计算量也会对应增大,在实际应用场景中可根据需要调整音频特征提取的过程。为了便于理解,后续取基于现有音频文件的一类特征向量进行说明,特征向量与现有音频文件的某个特征相关,经音频特征提取后为“ x 1 x 2 ,……, x n ”,将其作为LSTM模型的输入向量,与之对应的,对现有音频文件中与实际声音相关的特征进行声音特征提取,得到“ y 1 y 2 ,……, y n ”,作为实际向量,用于对经LSTM模型训练输出的结果进行修正。 After the acquisition, the existing audio files in the audio sample set are fitted with the Long Short-Term Memory (LSTM) model, which belongs to the time recurrent neural network model and is suitable for processing and predicting time. Important events with relatively long intervals and delays in the sequence can be applied in the embodiments of the present application. In the fitting, the existing audio files in the audio sample set need to be extracted according to the unit time, and the audio feature extraction can extract multiple features of the existing audio file to improve the accuracy of subsequent model training. For example, after determining the unit time, assuming that the existing audio file contains n unit time, the note attribute of the existing audio file (the note to which the audio of a unit belongs) from the start position of the existing audio file. Performing audio feature extraction to obtain a first feature vector, which is “ a 1 , a 2 , . . . , a n ”, and performing audio feature extraction on the volume of the existing audio file to obtain a second feature vector, which is “ b 1 , b 2 , ..., b n ”, performing audio feature extraction on the short-term energy of the existing audio file (representing the energy intensity of the audio file in the unit time) to obtain a third feature vector, which is “ c 1 , c 2 , ... , c n ”, etc., the effect of training is proportional to the type of feature extracted by the audio feature extraction, but as the number of features increases, the amount of training will increase accordingly. In the actual application scenario, the audio feature extraction can be adjusted as needed. the process of. For ease of understanding, the subsequent description is based on a class of feature vectors of the existing audio file, and the feature vector is related to a certain feature of the existing audio file, and is extracted by the audio feature as “ x 1 , x 2 , . . . , x n ", as the input vector of the LSTM model, corresponding to the sound feature extraction of the features related to the actual sound in the existing audio file, and obtain " y 1 , y 2 , ..., y n " as the actual Vector, used to correct the results of the training output via the LSTM model.
图6所示,为LSTM模型的一个单位时间内的处理过程,通常称之为一个细胞,故对现有音频文件进行计算LSTM模型总共包含n个细胞,每个细胞中包括输入门层、遗忘门层和输出门层。图6中, C t 指的是LSTM模型在该单位时间的细胞状态,细胞主要用于维持以前输入的记忆; x t 为特征向量“ x 1 x 2 ,……, x n ”中的一个输入参数; h t 为输出参数;σ表示神经网络的SIGMOID函数;tanh表示双曲正切函数。具体计算过程如下: As shown in Figure 6, the processing of a unit time in the LSTM model is usually called a cell, so the calculation of the existing audio file LSTM model contains a total of n cells, including input gate layer and forgetting in each cell. Door layer and output gate layer. In Fig. 6, C t refers to the cell state of the LSTM model at this unit time, and the cells are mainly used to maintain the previously input memory; x t is one of the feature vectors " x 1 , x 2 , ..., x n " Input parameters; h t is the output parameter; σ represents the SIGMOID function of the neural network; tanh represents the hyperbolic tangent function. The specific calculation process is as follows:
首先,将特征向量“ x 1 x 2 ,……, x n ”输入LSTM模型,图6中从左至右的第一个σ层对应遗忘门层,遗忘门层的主要作用是确定从细胞状态 C t-1 中丢弃的信息,该层输出的 f t 为在0至1之间的数值,其中,1 表示“完全保留”,0 表示“完全舍弃”,具体计算公式为 f t =σ( W t ·[ h t-1 x t ]+ b f ),遗忘门层会读取经前一个细胞状态 C t-1 产生的输出参数 h t-1 ,和本次细胞状态的输入参数 x t First, the feature vector " x 1 , x 2 , ..., x n " is input into the LSTM model. The first σ layer from left to right in Figure 6 corresponds to the forgetting gate layer. The main function of the forgetting gate layer is to determine the slave cell. The information discarded in state C t-1 , the output f t of the layer is a value between 0 and 1, where 1 means "completely reserved" and 0 means "completely discarded", and the specific formula is f t = σ input parameters (W t · [h t- 1, x t] + b f), the gate layer forgetting reads output parameters premenstrual state of a C t-1 cell produced by h t-1, and the current cell state x t .
图6中从左至右的第二个σ层对应输入门层,其主要作用是确定细胞状态 C t 中需要更新的值,输出的 i t 与遗忘门层的 f t 类似,也为在0到1之间的数值,1表示“完全保留”,0 表示“完全舍弃”,具体计算公式为 i t =σ( W i ·[ h t-1 x t ]+ b i )。而图6中从左至右的第一个tanh层用于创建一个新的候选值向量,命名为 C(~)t,计算公式为 C(~)t = tanh( W C ·[ h t-1 x t ]+ b C ),第一个tanh层和第二个σ层共同确定存放在新的细胞状态 C t 中的新信息。经过遗忘门层和输入门层的计算后,即可对旧的细胞状态进行更新,计算公式为 C t = f * C t-1 + i * C(~)tIn FIG. 6 corresponds to the input gate of the second layer is from left to right σ layer, whose main purpose is to determine the state of the cell C t values need to be updated, i t and the output gate layer f t forgetting similar, but also as 0 A value between 1 and 1 means "completely reserved" and 0 means "completely discarded". The specific formula is i t = σ( W i ·[ h t-1 , x t ]+ b i ). The first tanh layer from left to right in Figure 6 is used to create a new candidate value vector named C(~)t , which is calculated as C(~)t = tanh( W C ·[ h t- 1 , x t ]+ b C ), the first tanh layer and the second σ layer together determine new information stored in the new cell state C t . After the calculation of the forgotten gate layer and the input gate layer, the old cell state can be updated by the formula C t = f t * C t-1 + i t * C(~)t .
图6中从左至右的第三个σ层对应输出门层,在经过上述的公式更新细胞状态的同时,通过输出门层计算该细胞状态的输出参数 h t ,计算公式为 O t =σ( W O ·[ C t h t-1 x t ]+ b O )和 h t = O * tanh( C t )。将特征向量中所有的输入参数输入LSTM模型后,经过计算,并综合每个单位时间的输出参数,可得到“ h 1 h 2 ,……, h n ”的输出向量。由于已知现有音频文件的实际向量“ y 1 y 2 ,……, y n ”,故可采取梯度下降的方法,调整LSTM模型中公式的参数,从而使输出向量尽量接近于实际向量。值得说明的是,上述公式中的 W t W C W O 表示不同节点之间的连接权重,上述公式中的 b f b i b C b o 表示预设的变量,在计算过程调整 b f b i b C b o 变量的值以达到训练LSTM模型的目的。在将音频样本集的多个现有音频文件与LSTM模型拟合后,可训练出接近于音频样本集对应音乐风格的文件转换模型,并进行输出。 The third σ layer from left to right in Fig. 6 corresponds to the output gate layer, and the output parameter h t of the cell state is calculated by the output gate layer while updating the cell state through the above formula, and the calculation formula is O t = σ ( W O ·[ C t , h t-1 , x t ]+ b O ) and h t = O t * tanh( C t ). After inputting all the input parameters in the feature vector into the LSTM model, after calculating and synthesizing the output parameters of each unit time, the output vector of " h 1 , h 2 , ..., h n " can be obtained. Since the actual vector " y 1 , y 2 , ..., y n " of the existing audio file is known, the gradient descent method can be adopted to adjust the parameters of the formula in the LSTM model so that the output vector is as close as possible to the actual vector. It is worth noting that W t , W C , W O in the above formula represent the connection weights between different nodes. b f , b i , b C and b o in the above formula represent preset variables in the calculation process. Adjust the values of the b f , b i , b C , and b o variables to achieve the purpose of training the LSTM model. After fitting a plurality of existing audio files of the audio sample set with the LSTM model, a file conversion model close to the music style corresponding to the audio sample set can be trained and output.
请参阅图4,图4是本申请实施例四提供的一种基于区块链的音乐发布方法的实现流程图。相对于图3对应的实施例,本实施例对S301细化后得到S401~S402,详述如下:Referring to FIG. 4, FIG. 4 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 4 of the present application. With respect to the embodiment corresponding to FIG. 3, in this embodiment, after S301 is refined, S401~S402 are obtained, which are as follows:
S401:获取所述用户的偏好设置。S401: Acquire a preference setting of the user.
在本申请实施例中,还可预设多个音频样本集,并通过获取用户的偏好设置来从多个音频样本集中选取与偏好设置对应的音频样本集。在预设多个音频样本集时,设置多个关键词,并将关键词与音频样本集建立对应关系,一般地,关键词与音乐类别相关,例如设置“古典音乐”关键词,则该关键词对应音频样本集下的多个现有音频文件与古典音乐相关。建立好对应关系后,获取用户的偏好设置,偏好设置应包含上述的多个关键词,获取方式包括但不限于向用户提供包含“古典音乐”、“爵士乐”和“迪斯科”等多个偏好设置选项,并获取用户的选择结果;从用户设备中获取收听率最高的音频文件的音乐类别,并将其作为该用户的偏好设置等。In the embodiment of the present application, a plurality of audio sample sets may also be preset, and an audio sample set corresponding to the preference setting is selected from a plurality of audio sample sets by acquiring a user's preference setting. When a plurality of audio sample sets are preset, multiple keywords are set, and the keywords are associated with the audio sample set. Generally, the keywords are related to music categories, for example, setting "classical music" keywords, then the key The plurality of existing audio files corresponding to the word corresponding audio sample set are related to classical music. After the correspondence is established, the user's preference is obtained, and the preference should include multiple keywords as described above, including but not limited to providing the user with multiple preferences including "classical music", "jazz" and "disco". Option, and obtain the user's selection result; obtain the music category of the audio file with the highest listening rate from the user equipment, and use it as the user's preference setting and the like.
S402:确定与所述偏好设置对应的所述音频样本集。S402: Determine the audio sample set corresponding to the preference setting.
偏好设置确定后,确定与其相同的关键词,并从数据库存储的多个音频样本集中查找与该关键词存在对应关系的音频样本集,以便将音频样本集内的多个现有音频文件与LSTM模型进行拟合,从而训练LSTM模型。After the preference is determined, the same keyword is determined, and the audio sample set corresponding to the keyword is searched from the plurality of audio sample sets stored in the database, so as to compare the plurality of existing audio files in the audio sample set with the LSTM. The model is fitted to train the LSTM model.
参阅图3,在步骤S302中:将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。Referring to FIG. 3, in step S302, the audio data is input to the file conversion model, and the output result of the file conversion model is converted into the uploaded file.
获取到经训练输出的文件转换模型后,将音频数据按照同样的音频特征提取方法提取出音频向量,输入文件转换模型,并将经文件转换模型计算后的输出参数集合为输出结果(输出向量)。由于音频特征提取是按照每个单位时间进行提取,故可将输出结果按照单位时间进行整合,转换为上传文件,上传文件可以实现如现有音频文件的正常运行及播放。After obtaining the file conversion model of the trained output, the audio data is extracted according to the same audio feature extraction method, the file conversion model is input, and the output parameters calculated by the file conversion model are set as output results (output vector). . Since the audio feature extraction is performed according to each unit time, the output result can be integrated according to the unit time and converted into an uploaded file, and the uploaded file can realize the normal operation and playback of the existing audio file.
通过图3所示实施例可知,在本申请实施例中,通过获取音频样本集,根据音频特征提取的原理,将音频样本集内的多个现有音频文件与长短期记忆网络LSTM模型进行拟合,将经多个现有音频文件拟合完毕后的长短期记忆网络LSTM模型作为文件转换模型进行输出,并将音频数据输入文件转换模型,最后将文件转换模型的输出结果整合为上传文件,可生成不同音乐风格的上传文件,提升了上传文件的多样性。As shown in the embodiment shown in FIG. 3, in the embodiment of the present application, by acquiring an audio sample set, according to the principle of audio feature extraction, multiple existing audio files in the audio sample set and the long- and short-term memory network LSTM model are proposed. The long-short-term memory network LSTM model after fitting a plurality of existing audio files is output as a file conversion model, and the audio data is input into a file conversion model, and finally the output of the file conversion model is integrated into an uploaded file. It can generate upload files of different music styles, which improves the diversity of uploaded files.
请参阅图5,图5是本申请实施例五提供的一种基于区块链的音乐发布方法的实现流程图。相对于图1对应的实施例,本实施例还包括:Referring to FIG. 5, FIG. 5 is a flowchart of implementing a blockchain-based music distribution method according to Embodiment 5 of the present application. With respect to the embodiment corresponding to FIG. 1, the embodiment further includes:
S501:启动以太坊节点。S501: Start the Ethereum node.
以太坊是指能够在区块链上实现智能合约的开源底层系统,在本申请实施例中,可利用以太坊网络实现智能合约的创建和运行。首先,以太坊网络是由多个以太坊节点连接构成,启动其中一个以太坊节点,在该以太坊节点中进行智能合约的创建。此外,由于区块链主要采用非对称加密技术,故该以太坊节点对应一个公钥和一个私钥,公钥指示该以太坊节点的账户地址,私钥用于对以太坊节点进行操作,以及后续对智能合约进行签名。Ethereum refers to an open source underlying system that can implement smart contracts on the blockchain. In the embodiment of the present application, the Ethereum network can be used to realize the creation and operation of smart contracts. First, the Ethereum network is composed of multiple Ethereum node connections, launching one of the Ethereum nodes, and creating a smart contract in the Ethereum node. In addition, since the blockchain mainly adopts asymmetric encryption technology, the Ethereum node corresponds to a public key and a private key, and the public key indicates the account address of the Ethereum node, and the private key is used to operate the Ethereum node, and Subsequent signature of the smart contract.
S502:在所述以太坊节点中创建所述智能合约。S502: Create the smart contract in the Ethereum node.
智能合约是传统的实体合约的计算机语言版本,通常以代码形式存在,其可被部署在共享账本上,在维持自身状态的同时,控制自身资产,并且可对接收到的外界信息或者外界资产进行回应。启动以太坊节点后,在该以太坊节点中创建智能合约,智能合约的机制可为步骤S103的内容,即在接收到待上传文件后,生成与待上传文件对应的标识量,当然,根据实际应用场景的需要,智能合约还可包括更多或更少的内容。值得一提的是,可在go-ethereum框架或testrpc框架下,利用solc智能合约编译器完成智能合约的编译。另一种方式是利用以太钱包,将智能合约对应的代码添加入以太钱包中,进行发布,从而取代繁琐的编译过程,提升智能合约的创建效率。A smart contract is a computer language version of a traditional physical contract, usually in the form of code, which can be deployed on a shared ledger, controls its own assets while maintaining its own state, and can perform external information or external assets received. Respond. After the Ethereum node is started, the smart contract is created in the Ethereum node, and the mechanism of the smart contract may be the content of step S103, that is, after receiving the file to be uploaded, the identifier corresponding to the file to be uploaded is generated, of course, according to the actual situation. Smart contracts can also include more or less content for the needs of the application scenario. It is worth mentioning that the smart contract can be compiled using the solc smart contract compiler under the go-ethereum framework or testrpc framework. Another way is to use the Ethernet wallet to add the code corresponding to the smart contract to the Ether wallet for publishing, thus replacing the cumbersome compilation process and improving the efficiency of creating smart contracts.
S503:将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。S503: Deploy the smart contract in an Ethereum network where the Ethereum node is located, and store the smart contract in the blockchain after the Ethereum network successfully verifies.
智能合约须在虚拟机内执行,以太坊虚拟机是以太坊中智能合约的运行环境。以太坊虚拟机内部被沙箱封装,完全隔离运行,也即以太坊虚拟机内部的代码不能接触到网络、文件系统或其它进程。在智能合约创建完成后,将智能合约的代码编译为字节码,并通过远程过程调用协议(Remote Procedure Call,RPC)接口,通过点对点的方式发送至以太坊网络的多个以太坊节点,最终每个以太坊节点均能接收到智能合约对应的字节码。接收成功后,以太坊节点将智能合约对应的字节码在以太坊节点自身的以太坊虚拟机中进行运算,得到运算结果。将以太坊网络中每个以太坊虚拟机的运算结果进行互相验证,验证的内容主要是智能合约的参与者(即以太坊节点)的私钥签名是否与账户地址匹配,若匹配,则验证成功,若不匹配,则验证失败。当以太坊网络中所有的以太坊节点都验证成功后,将智能合约写入区块链中进行存储,The smart contract must be executed in the virtual machine, and the Ethereum virtual machine is the operating environment of the smart contract in the Ethereum. The Ethereine virtual machine is internally packaged in a sandbox and is completely isolated. That is, the code inside the Ethereum virtual machine cannot be accessed by the network, file system or other processes. After the smart contract is created, the code of the smart contract is compiled into bytecode and passed through the remote procedure call protocol (Remote The Procedure Call (RPC) interface is sent to multiple Ethereum nodes in the Ethereum network in a point-to-point manner. Finally, each Ethereine node can receive the bytecode corresponding to the smart contract. After receiving successfully, the Ethereum node calculates the bytecode corresponding to the smart contract in the Ethereum node's own Ethereum virtual machine to obtain the operation result. The mutual authentication of each Ethereine virtual machine in the Ethereum network is verified. The content of the verification is mainly whether the private key signature of the participant of the smart contract (ie Ethereum node) matches the account address. If it matches, the verification succeeds. If it does not match, the verification fails. After all the Ethereum nodes in the Ethereum network are successfully verified, the smart contract is written into the blockchain for storage.
通过图5所示实施例可知,在本申请实施例中,通过启动以太坊网络中的一个以太坊节点,在以太坊节点中创建智能合约,并通过点对点的方式将所述智能合约部署在所述以太坊节点所在的以太坊网络中,最后经以太坊网络的所有以太坊节点验证成功后,将智能合约存储在区块链中,体现了在以太坊网络中的智能合约创建过程,通过以太坊网络的验证,保证了智能合约的公平性和可靠性。As shown in the embodiment shown in FIG. 5, in the embodiment of the present application, a smart contract is created in an Ethereum node by launching an Ethereum node in the Ethereum network, and the smart contract is deployed in a peer-to-peer manner. In the Ethereum network where the Ethereum node is located, after all the Ethereum nodes of the Ethereum network are successfully verified, the smart contract is stored in the blockchain, which embodies the smart contract creation process in the Ethereum network, through the ether. The verification of the network ensures the fairness and reliability of the smart contract.
对应于上文实施例所述的一种基于区块链的音乐发布方法,图7示出了本申请实施例提供的一种基于区块链的音乐发布装置的一个结构框图,参照图7,该音乐发布装置包括:Corresponding to a blockchain-based music distribution method described in the above embodiments, FIG. 7 is a structural block diagram of a blockchain-based music distribution apparatus provided by an embodiment of the present application. Referring to FIG. The music distribution device includes:
获取单元71,用于获取用户的音频数据;The obtaining unit 71 is configured to acquire audio data of the user;
第一生成单元72,用于对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;The first generating unit 72 is configured to perform conversion processing on the audio data to generate an upload file corresponding to the audio data;
第二生成单元73,用于执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;a second generating unit 73, configured to execute a preset smart contract in the blockchain to generate an uploading identifier corresponding to the uploaded file;
存储单元74,用于在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。a storage unit 74, configured to generate an update block in the blockchain, and store the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain Differentiating between the uploaded file and a plurality of existing files stored in the blockchain.
可选地,所述存储单元74,还包括:Optionally, the storage unit 74 further includes:
标识获取单元,用于获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对;An identifier obtaining unit, configured to acquire a plurality of existing identifiers corresponding to the plurality of existing files stored in the blockchain, and compare the uploaded identifiers with the plurality of existing identifiers ;
执行单元,用于若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。And an execution unit, configured to perform the operation of generating an update block in the blockchain if the upload identifier is different from the multiple existing identifiers.
可选地,所述第一生成单元73,包括:Optionally, the first generating unit 73 includes:
样本获取单元,用于获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出;a sample obtaining unit, configured to acquire an audio sample set, fit the audio sample set with a long-short-term memory network LSTM model, and output the fitted long-short-term memory network LSTM model as a file conversion model;
转换单元,用于将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。And a converting unit, configured to input the audio data into the file conversion model, and convert an output result of the file conversion model into the uploaded file.
可选地,所述样本获取单元,包括:Optionally, the sample obtaining unit includes:
偏好获取单元,用于获取所述用户的偏好设置;a preference acquiring unit, configured to acquire a preference setting of the user;
确定单元,用于确定与所述偏好设置对应的所述音频样本集。a determining unit, configured to determine the set of audio samples corresponding to the preference setting.
可选地,所述音乐发布装置,还包括:Optionally, the music distribution device further includes:
启动单元,用于启动以太坊节点;a startup unit for starting an Ethereum node;
创建单元,用于在所述以太坊节点中创建所述智能合约;Creating a unit for creating the smart contract in the Ethereum node;
部署单元,用于将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。a deployment unit, configured to deploy the smart contract in an Ethereum network in which the Ethereum node is located, and store the smart contract in the blockchain after the Ethereum network successfully authenticates.
图8是本申请实施例提供的终端设备的示意图。如图8所示,该实施例的终端设备8包括:处理器80以及存储器81,所述存储器81中存储有可在所述处理器80上运行的计算机可读指令82,例如基于区块链的音乐发布程序。所述处理器80执行所述计算机可读指令82时实现上述各个基于区块链的音乐发布方法实施例中的步骤,例如图1所示的步骤S101至S104。或者,所述处理器80执行所述计算机可读指令82时实现上述音乐发布装置实施例中各单元的功能,例如图7所示单元71至74的功能。FIG. 8 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in FIG. 8, the terminal device 8 of this embodiment includes a processor 80 and a memory 81 in which computer readable instructions 82 executable on the processor 80 are stored, for example, based on a blockchain. Music release program. The processor 80 executes the computer readable instructions 82 to implement the steps in the various blockchain-based music distribution method embodiments described above, such as steps S101 through S104 shown in FIG. Alternatively, when the processor 80 executes the computer readable instructions 82, the functions of the units in the above-described music distribution apparatus embodiment are implemented, such as the functions of the units 71 to 74 shown in FIG.
示例性的,所述计算机可读指令82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令82在所述终端设备8中的执行过程。例如,所述计算机可读指令82可以被分割成获取单元、第一生成单元、第二生成单元及存储单元,各单元具体功能如上所述。Illustratively, the computer readable instructions 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80, To complete this application. The one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the computer readable instructions 82 in the terminal device 8. For example, the computer readable instructions 82 may be partitioned into an acquisition unit, a first generation unit, a second generation unit, and a storage unit, each unit having a specific function as described above.
所述终端设备可包括,但不仅限于,处理器80、存储器81。本领域技术人员可以理解,图8仅仅是终端设备8的示例,并不构成对终端设备8的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。The terminal device may include, but is not limited to, a processor 80 and a memory 81. It will be understood by those skilled in the art that FIG. 8 is merely an example of the terminal device 8, and does not constitute a limitation on the terminal device 8, and may include more or less components than those illustrated, or combine some components, or different components. For example, the terminal device may further include an input/output device, a network access device, a bus, and the like.
所称处理器80可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 80 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
所述存储器81可以是所述终端设备8的内部存储单元,例如终端设备8的硬盘或内存。所述存储器81也可以是所述终端设备8的外部存储设备,例如所述终端设备8上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器81还可以既包括所述终端设备8的内部存储单元也包括外部存储设备。所述存储器81用于存储所述计算机可读指令以及所述终端设备所需的其他程序和数据。所述存储器81还可以用于暂时地存储已经输出或者将要输出的数据。The memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk provided on the terminal device 8, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is configured to store the computer readable instructions and other programs and data required by the terminal device. The memory 81 can also be used to temporarily store data that has been output or is about to be output.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents. The modifications and substitutions of the embodiments do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种基于区块链的音乐发布方法,其特征在于,包括:A blockchain-based music distribution method, comprising:
    获取用户的音频数据;Obtaining user's audio data;
    对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;Performing conversion processing on the audio data to generate an upload file corresponding to the audio data;
    执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;Executing a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file;
    在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。Generating an update block in the blockchain, and storing the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the upload file And a plurality of existing files stored in the blockchain.
  2. 如权利要求1所述的音乐发布方法,其特征在于,所述在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量之前,还包括:The music distribution method according to claim 1, wherein said generating an update block in said blockchain, and storing said upload file and said upload mark amount in said update block, Also includes:
    获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对;Obtaining, by the blockchain, a plurality of existing identifiers corresponding to the plurality of existing files, and comparing the uploaded identifiers with the plurality of existing identifiers;
    若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。If the upload identifier is different from the plurality of existing identifiers, performing the operation of generating an update block in the blockchain.
  3. 如权利要求1所述的音乐发布方法,其特征在于,所述对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件,包括:The music distribution method according to claim 1, wherein the converting the audio data to generate an upload file corresponding to the audio data comprises:
    获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出;Obtaining an audio sample set, fitting the audio sample set with a long-short-term memory network LSTM model, and outputting the fitted long-short-term memory network LSTM model as a file conversion model;
    将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。The audio data is input to the file conversion model, and an output result of the file conversion model is converted into the uploaded file.
  4. 如权利要求3所述的音乐发布方法,其特征在于,所述获取音频样本集,包括:The music distribution method according to claim 3, wherein the obtaining the audio sample set comprises:
    获取所述用户的偏好设置;Obtaining the user's preference settings;
    确定与所述偏好设置对应的所述音频样本集。The set of audio samples corresponding to the preference settings are determined.
  5. 如权利要求1所述的音乐发布方法,其特征在于,还包括:The music distribution method according to claim 1, further comprising:
    启动以太坊节点;Start the Ethereum node;
    在所述以太坊节点中创建所述智能合约;Creating the smart contract in the Ethereum node;
    将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。The smart contract is deployed in an Ethereum network in which the Ethereum node is located, and after the Ethereum network is successfully verified, the smart contract is stored in the blockchain.
  6. 一种基于区块链的音乐发布装置,其特征在于,包括:A music distribution device based on a blockchain, comprising:
    获取单元,用于获取用户的音频数据;An obtaining unit, configured to acquire audio data of a user;
    第一生成单元,用于对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;a first generating unit, configured to perform conversion processing on the audio data to generate an upload file corresponding to the audio data;
    第二生成单元,用于执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;a second generating unit, configured to execute a preset smart contract in the blockchain to generate an uploading identifier corresponding to the uploaded file;
    存储单元,用于在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。a storage unit, configured to generate an update block in the blockchain, and store the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain Distinguishing the upload file and a plurality of existing files stored in the blockchain.
  7. 如权利要求6所述的音乐发布装置,其特征在于,所述存储单元,还包括:The music distribution device according to claim 6, wherein the storage unit further comprises:
    标识获取单元,用于获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对;An identifier obtaining unit, configured to acquire a plurality of existing identifiers corresponding to the plurality of existing files stored in the blockchain, and compare the uploaded identifiers with the plurality of existing identifiers ;
    执行单元,用于若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。And an execution unit, configured to perform the operation of generating an update block in the blockchain if the upload identifier is different from the multiple existing identifiers.
  8. 如权利要求6所述的音乐发布装置,其特征在于,所述第一生成单元,包括:The music distribution device according to claim 6, wherein the first generating unit comprises:
    样本获取单元,用于获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出;a sample obtaining unit, configured to acquire an audio sample set, fit the audio sample set with a long-short-term memory network LSTM model, and output the fitted long-short-term memory network LSTM model as a file conversion model;
    转换单元,用于将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。And a converting unit, configured to input the audio data into the file conversion model, and convert an output result of the file conversion model into the uploaded file.
  9. 如权利要求8所述的音乐发布装置,其特征在于,所述样本获取单元,包括:The music distribution device according to claim 8, wherein the sample acquisition unit comprises:
    偏好获取单元,用于获取所述用户的偏好设置;a preference acquiring unit, configured to acquire a preference setting of the user;
    确定单元,用于确定与所述偏好设置对应的所述音频样本集。a determining unit, configured to determine the set of audio samples corresponding to the preference setting.
  10. 如权利要求6所述的音乐发布装置,其特征在于,还包括:The music distribution device according to claim 6, further comprising:
    启动单元,用于启动以太坊节点;a startup unit for starting an Ethereum node;
    创建单元,用于在所述以太坊节点中创建所述智能合约;Creating a unit for creating the smart contract in the Ethereum node;
    部署单元,用于将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。a deployment unit, configured to deploy the smart contract in an Ethereum network in which the Ethereum node is located, and store the smart contract in the blockchain after the Ethereum network successfully authenticates.
  11. 一种终端设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A terminal device, comprising: a memory and a processor, wherein the memory stores computer readable instructions executable on the processor, and the processor implements the following steps when the computer readable instructions are executed :
    获取用户的音频数据;Obtaining user's audio data;
    对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;Performing conversion processing on the audio data to generate an upload file corresponding to the audio data;
    执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;Executing a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file;
    在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。Generating an update block in the blockchain, and storing the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the upload file And a plurality of existing files stored in the blockchain.
  12. 根据权利要求11所述的终端设备,其特征在于,所述在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量之前,还包括:The terminal device according to claim 11, wherein said generating an update block in said blockchain, and storing said upload file and said upload identifier amount in said update block, include:
    获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对;Obtaining, by the blockchain, a plurality of existing identifiers corresponding to the plurality of existing files, and comparing the uploaded identifiers with the plurality of existing identifiers;
    若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。If the upload identifier is different from the plurality of existing identifiers, performing the operation of generating an update block in the blockchain.
  13. 根据权利要求11所述的终端设备,其特征在于,所述对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件,包括:The terminal device according to claim 11, wherein the converting the audio data to generate an upload file corresponding to the audio data comprises:
    获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出;Obtaining an audio sample set, fitting the audio sample set with a long-short-term memory network LSTM model, and outputting the fitted long-short-term memory network LSTM model as a file conversion model;
    将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。The audio data is input to the file conversion model, and an output result of the file conversion model is converted into the uploaded file.
  14. 根据权利要求13所述的终端设备,其特征在于,所述获取音频样本集,包括:The terminal device according to claim 13, wherein the acquiring the audio sample set comprises:
    获取所述用户的偏好设置;Obtaining the user's preference settings;
    确定与所述偏好设置对应的所述音频样本集。The set of audio samples corresponding to the preference settings are determined.
  15. 根据权利要求11所述的终端设备,其特征在于,还包括:The terminal device according to claim 11, further comprising:
    启动以太坊节点;Start the Ethereum node;
    在所述以太坊节点中创建所述智能合约;Creating the smart contract in the Ethereum node;
    将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。The smart contract is deployed in an Ethereum network in which the Ethereum node is located, and after the Ethereum network is successfully verified, the smart contract is stored in the blockchain.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by at least one processor, implement the following steps:
    获取用户的音频数据;Obtaining user's audio data;
    对所述音频数据进行转换处理,以生成与所述音频数据对应的上传文件;Performing conversion processing on the audio data to generate an upload file corresponding to the audio data;
    执行区块链中预设的智能合约,以生成与所述上传文件对应的上传标识量;Executing a smart contract preset in the blockchain to generate an upload identifier corresponding to the uploaded file;
    在所述区块链中生成更新区块,并在所述更新区块中存储所述上传文件和所述上传标识量,所述上传标识量被所述区块链用于区分所述上传文件和所述区块链中存储的多个现有文件。Generating an update block in the blockchain, and storing the upload file and the upload identifier in the update block, where the upload identifier is used by the blockchain to distinguish the upload file And a plurality of existing files stored in the blockchain.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时还实现如下步骤:The computer readable storage medium of claim 16, wherein the computer readable instructions are further executed by the at least one processor to:
    获取所述区块链存储的与所述多个现有文件对应的多个现有标识量,并将所述上传标识量与所述多个现有标识量进行比对;Obtaining, by the blockchain, a plurality of existing identifiers corresponding to the plurality of existing files, and comparing the uploaded identifiers with the plurality of existing identifiers;
    若所述上传标识量与所述多个现有标识量都不相同,则执行所述在所述区块链中生成更新区块的操作。If the upload identifier is different from the plurality of existing identifiers, performing the operation of generating an update block in the blockchain.
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:The computer readable storage medium of claim 16, wherein the computer readable instructions are executed by at least one processor to implement the following steps:
    获取音频样本集,将所述音频样本集与长短期记忆网络LSTM模型进行拟合,并将拟合完成的长短期记忆网络LSTM模型作为文件转换模型进行输出;Obtaining an audio sample set, fitting the audio sample set with a long-short-term memory network LSTM model, and outputting the fitted long-short-term memory network LSTM model as a file conversion model;
    将所述音频数据输入所述文件转换模型,并将所述文件转换模型的输出结果转换为所述上传文件。The audio data is input to the file conversion model, and an output result of the file conversion model is converted into the uploaded file.
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:The computer readable storage medium of claim 18, wherein the computer readable instructions are executed by at least one processor to implement the following steps:
    获取所述用户的偏好设置;Obtaining the user's preference settings;
    确定与所述偏好设置对应的所述音频样本集。The set of audio samples corresponding to the preference settings are determined.
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时还实现如下步骤:The computer readable storage medium of claim 16, wherein the computer readable instructions are further executed by the at least one processor to:
    启动以太坊节点;Start the Ethereum node;
    在所述以太坊节点中创建所述智能合约;Creating the smart contract in the Ethereum node;
    将所述智能合约部署在所述以太坊节点所在的以太坊网络中,并在所述以太坊网络验证成功后,在所述区块链中存储所述智能合约。The smart contract is deployed in an Ethereum network in which the Ethereum node is located, and after the Ethereum network is successfully verified, the smart contract is stored in the blockchain.
PCT/CN2018/097094 2018-04-10 2018-07-25 Music publishing method and device based on blockchain, terminal device and readable storage medium WO2019196249A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810316067.4 2018-04-10
CN201810316067.4A CN108833460B (en) 2018-04-10 2018-04-10 Music release method and device based on block chain and terminal equipment

Publications (1)

Publication Number Publication Date
WO2019196249A1 true WO2019196249A1 (en) 2019-10-17

Family

ID=64155440

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097094 WO2019196249A1 (en) 2018-04-10 2018-07-25 Music publishing method and device based on blockchain, terminal device and readable storage medium

Country Status (2)

Country Link
CN (1) CN108833460B (en)
WO (1) WO2019196249A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625780A (en) * 2020-01-15 2020-09-04 支付宝(杭州)信息技术有限公司 Block chain-based audio work authorization method, device and equipment
CN113496013A (en) * 2020-03-19 2021-10-12 顺丰科技有限公司 File management method, file management device, server and storage medium

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9918605B2 (en) 2015-04-09 2018-03-20 Irobot Corporation Wall following robot
CN109327473B (en) * 2018-12-03 2021-10-01 北京工业大学 Identity authentication system based on block chain technology
CN110046991B (en) 2018-12-12 2020-08-11 阿里巴巴集团控股有限公司 Data processing method and system based on intelligent contract of block chain
CN109933404B (en) * 2018-12-12 2020-05-12 阿里巴巴集团控股有限公司 Encoding and decoding method and system based on block chain intelligent contract
CN111782338B (en) 2018-12-12 2024-05-03 创新先进技术有限公司 Data processing method and system based on blockchain intelligent contract
CN110048846B (en) * 2018-12-12 2020-04-14 阿里巴巴集团控股有限公司 Signature verification method and system based on block chain intelligent contract
CN110035105B (en) * 2018-12-13 2021-09-21 创新先进技术有限公司 Screen recording evidence obtaining method and system based on block chain and electronic equipment
WO2019072310A2 (en) * 2018-12-29 2019-04-18 Alibaba Group Holding Limited System and method for implementing native contract on blockchain
US10733152B2 (en) 2018-12-29 2020-08-04 Alibaba Group Holding Limited System and method for implementing native contract on blockchain
WO2019120316A2 (en) 2019-03-26 2019-06-27 Alibaba Group Holding Limited System and method for implementing different types of blockchain contracts
CN111768756B (en) * 2020-06-24 2023-10-20 华人运通(上海)云计算科技有限公司 Information processing method, information processing device, vehicle and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016197055A1 (en) * 2015-06-04 2016-12-08 Chronicled, Inc. Open registry for identity of things
CN107330694A (en) * 2017-07-03 2017-11-07 重庆小犀智能科技有限公司 Copyright trading system and method for commerce based on block chain
CN107491946A (en) * 2017-07-10 2017-12-19 北京云知科技有限公司 It is a kind of to store virtual objects to the method, apparatus of block chain and electronic equipment
CN107622385A (en) * 2017-08-28 2018-01-23 南京邮电大学 A kind of copyright distributing method based on block chain intelligence contract

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160098723A1 (en) * 2014-10-01 2016-04-07 The Filing Cabinet, LLC System and method for block-chain verification of goods
CA2981952A1 (en) * 2015-04-06 2016-10-13 Bitmark, Inc. System and method for decentralized title recordation and authentication
US20170140408A1 (en) * 2015-11-16 2017-05-18 Bank Of America Corporation Transparent self-managing rewards program using blockchain and smart contracts
CN107145768B (en) * 2016-03-01 2021-02-12 华为技术有限公司 Copyright management method and system
CN107770115B (en) * 2016-08-15 2021-01-05 华为技术有限公司 Method and system for distributing digital content in a peer-to-peer network
WO2018120121A1 (en) * 2016-12-30 2018-07-05 深圳前海达闼云端智能科技有限公司 Block chain permission control method, device, and node apparatus
CN106874393A (en) * 2017-01-13 2017-06-20 北京众享比特科技有限公司 Synchronizing traffic data method and system, Database Systems based on block chain
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution
CN107086920A (en) * 2017-06-20 2017-08-22 无锡井通网络科技有限公司 Copyright based on block chain really weighs method
CN107464111B (en) * 2017-07-10 2021-01-29 北京云知科技有限公司 Block chain wallet address generation method based on audio, payment method and device and electronic equipment
CN107295002B (en) * 2017-07-12 2020-06-19 联动优势科技有限公司 Cloud data storage method and server
CN107516180A (en) * 2017-08-25 2017-12-26 迅鳐成都科技有限公司 A kind of system and method that storage transaction security and operating efficiency are improved based on block chain
CN107622096B (en) * 2017-08-31 2020-06-05 上海保险交易所股份有限公司 Asynchronous multi-party data interaction method based on block chain system and storage medium
CN107798650B (en) * 2017-09-18 2020-08-11 众安信息技术服务有限公司 Digital asset infringement judgment method and device based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016197055A1 (en) * 2015-06-04 2016-12-08 Chronicled, Inc. Open registry for identity of things
CN107330694A (en) * 2017-07-03 2017-11-07 重庆小犀智能科技有限公司 Copyright trading system and method for commerce based on block chain
CN107491946A (en) * 2017-07-10 2017-12-19 北京云知科技有限公司 It is a kind of to store virtual objects to the method, apparatus of block chain and electronic equipment
CN107622385A (en) * 2017-08-28 2018-01-23 南京邮电大学 A kind of copyright distributing method based on block chain intelligence contract

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625780A (en) * 2020-01-15 2020-09-04 支付宝(杭州)信息技术有限公司 Block chain-based audio work authorization method, device and equipment
CN111625780B (en) * 2020-01-15 2023-04-18 支付宝(杭州)信息技术有限公司 Block chain-based audio work authorization method, device and equipment
CN113496013A (en) * 2020-03-19 2021-10-12 顺丰科技有限公司 File management method, file management device, server and storage medium

Also Published As

Publication number Publication date
CN108833460B (en) 2021-05-25
CN108833460A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
WO2019196249A1 (en) Music publishing method and device based on blockchain, terminal device and readable storage medium
US10628485B2 (en) Blockchain-based music originality analysis method and apparatus
Zhang et al. Repocoder: Repository-level code completion through iterative retrieval and generation
WO2020015153A1 (en) Method and device for generating music for lyrics text, and computer-readable storage medium
JP7075393B2 (en) Systems and methods realized by blockchain
CN109885311A (en) A kind of generation method and equipment of application program
CN115396114A (en) Authorization method, device, equipment and system based on verifiable statement
CN107464111B (en) Block chain wallet address generation method based on audio, payment method and device and electronic equipment
CN112070608B (en) Information processing method, device, medium and electronic equipment
JPWO2019194267A1 (en) Blockchain system, registration terminal, approval terminal, smart contract registration method, and smart contract registration program
CN110324314A (en) User registering method and device, storage medium, electronic equipment
WO2020015410A1 (en) Method and device for sending award to work performer based on blockchain
TW201814505A (en) Thing machine
CN112488838A (en) Remote sensing data transaction incentive method based on intelligent contract
CN109977675A (en) A kind of open source software recognition methods and device
KR20180054497A (en) Electronic device and Method for certification on large data and large number of merged/devided data
US11652650B1 (en) Externally validated proof of work for appending a block record to a blockchain with a commitment database server
Dhiman et al. Analysis of blockchain secure models and approaches based on various services in multi-tenant environment
KR101376478B1 (en) Configuration Method for Finding Source Environment, Source search device and Source search system
JP4999472B2 (en) Information processing apparatus and calculation method
CN111291336A (en) Game registration method and device in game platform
CN114139216A (en) Data verification method and device, electronic equipment and storage medium
US20230095596A1 (en) Group management apparatus, group management method, and computer readable medium
KR20220166000A (en) Music server and method to provide music files
WO2022239647A1 (en) Signing system, and signing method

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: 18914329

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 21.01.2021.)

122 Ep: pct application non-entry in european phase

Ref document number: 18914329

Country of ref document: EP

Kind code of ref document: A1