Disclosure of Invention
The invention provides a decentralized content interaction method and system, which are used for solving the problem of how to realize decentralized content interaction among different mechanisms.
In order to solve the above problem, according to an aspect of the present invention, there is provided a decentralized content interaction method, comprising:
establishing and issuing an acquisition request at a first server; wherein the obtaining request comprises: acquiring the name of the content, the quantity of the acquired content, the quantity of the push service resources and the valid period of the acquisition request;
locking service resources corresponding to the number of the pushed service resources;
creating a push request at a second server and issuing the push request; wherein the push request comprises: the name of the push content, the quantity of the acquisition service resource and the valid period of the push request;
locking the content corresponding to the number of the pushed contents;
and determining that the acquisition request and the push request meet a preset matching strategy, and performing content interaction between an initiating mechanism of the acquisition request and an initiating mechanism of the push request to generate an interaction certificate and store the interaction certificate in the block chain.
Preferably, wherein the method further comprises:
and before issuing, carrying out validity verification on the acquisition request and the push request.
Preferably, the determining that the acquisition request and the push request satisfy a preset matching policy includes:
and determining that the name of the acquired content and the number of the acquired content in the acquisition request are respectively consistent with the name of the pushed content and the number of the pushed content of the pushing request, wherein the number of the pushed service resources meets the requirement of acquiring the number of the service resources, and the acquisition request and the pushing request are both in an effective state, and determining that the acquisition request and the pushing request meet a preset matching strategy.
Preferably, the content interaction between the initiator of the acquisition request and the initiator of the push request, the generation of the interaction credential and the storage in the blockchain, includes:
locking the acquisition request, receiving service resources which are sent by an initiating mechanism of the acquisition request and correspond to the quantity of the pushed service resources, generating a first interaction certificate and storing the first interaction certificate in the block chain;
locking the push request, sending the service resources corresponding to the quantity of the acquired service resources and the acquisition request to an initiating mechanism of the push request, acquiring the content corresponding to the quantity of the push content, generating a second interactive certificate and storing the second interactive certificate in the block chain;
sending the content corresponding to the number of the acquired content to the initiating mechanism of the acquisition request, generating a third interactive certificate and storing the third interactive certificate in the block chain;
the first transaction voucher, the second transaction voucher and the third transaction voucher form a combined interaction voucher, and the combined interaction voucher is stored in the block chain to complete content interaction; wherein the combined interaction credential comprises: and acquiring a joint signature of the initiating mechanism of the request and the initiating mechanism of the push request.
Preferably, wherein the method further comprises:
canceling the acquisition request when the content interaction is not completed within the validity period of the acquisition request;
and canceling the push request when the content interaction is not completed within the validity period of the push request.
Preferably, wherein the method further comprises:
and performing identity authentication on the initiating mechanism of the acquisition request and the initiating mechanism of the pushing request.
According to another aspect of the present invention, there is provided a decentralized content interaction system, characterized in that the system comprises:
the acquisition request issuing module is used for creating and issuing an acquisition request on a first server; wherein the obtaining request comprises: acquiring the name of the content, the quantity of the acquired content, the quantity of the push service resources and the valid period of the acquisition request;
a first locking module, configured to lock a service resource corresponding to the number of the pushed service resources;
the push request issuing module is used for creating and issuing a push request at the second server; wherein the push request comprises: the name of the push content, the quantity of the acquisition service resource and the valid period of the push request;
the second locking module is used for locking the content corresponding to the quantity of the pushed content;
and the content interaction module is used for determining that the acquisition request and the push request meet a preset matching strategy, and the initiating mechanism of the acquisition request and the initiating mechanism of the push request carry out content interaction to generate an interaction certificate and store the interaction certificate in the block chain.
Preferably, wherein the system further comprises:
and the validity verifying module is used for verifying the validity of the acquisition request and the push request before issuing.
Preferably, the determining, by the content interaction module, that the acquisition request and the push request satisfy a preset matching policy includes:
and determining that the name of the acquired content and the number of the acquired content in the acquisition request are respectively consistent with the name of the pushed content and the number of the pushed content of the pushing request, wherein the number of the pushed service resources meets the requirement of acquiring the number of the service resources, and the acquisition request and the pushing request are both in an effective state, and determining that the acquisition request and the pushing request meet a preset matching strategy.
Preferably, the content interaction module, which obtains the request initiating mechanism and the push request initiating mechanism to perform content interaction, generates the interaction credential and stores the interaction credential in the blockchain, includes:
locking the acquisition request, receiving service resources which are sent by an initiating mechanism of the acquisition request and correspond to the quantity of the pushed service resources, generating a first interaction certificate and storing the first interaction certificate in the block chain;
locking the push request, sending the service resources corresponding to the quantity of the acquired service resources and the acquisition request to an initiating mechanism of the push request, acquiring the content corresponding to the quantity of the push content, generating a second interactive certificate and storing the second interactive certificate in the block chain;
sending the content corresponding to the number of the acquired content to the initiating mechanism of the acquisition request, generating a third interactive certificate and storing the third interactive certificate in the block chain;
the first transaction voucher, the second transaction voucher and the third transaction voucher form a combined interaction voucher, and the combined interaction voucher is stored in the block chain to complete content interaction; wherein the combined interaction credential comprises: and acquiring a joint signature of the initiating mechanism of the request and the initiating mechanism of the push request.
Preferably, wherein the system further comprises:
the first canceling module is used for canceling the acquisition request when the content interaction is not completed within the validity period of the acquisition request; and the second canceling module is used for canceling the push request when the content interaction is not completed within the validity period of the push request.
Preferably, wherein the system further comprises:
and the identity authentication module is used for authenticating the identity of the initiating mechanism of the acquisition request and the initiating mechanism of the pushing request.
The invention provides a decentralized content interaction method and a decentralized content interaction system, wherein the decentralized content interaction method comprises the following steps: establishing and issuing an acquisition request at a first server; locking service resources corresponding to the number of the pushed service resources; creating a push request at a second server and issuing the push request; locking the content corresponding to the number of the pushed contents; and determining that the acquisition request and the push request meet a preset matching strategy, and performing content interaction by an initiating mechanism of the acquisition request and an initiating mechanism of the push request to generate an interaction certificate and store the interaction certificate in the block chain. According to the invention, the requirements of two different mechanisms which cannot be directly interacted are matched through the intermediate mechanism, so that content interaction is completed, and the requirements of different mechanisms are met; meanwhile, the corresponding interaction certificate is generated and stored in the block chain, and due to the fact that distributed accounting and storage are used, centralized hardware or management mechanisms do not exist, any nodes are equal, changing difficulty is high, and stability and safety of content interaction are guaranteed.
Detailed Description
The exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, however, the present invention may be embodied in many different forms and is not limited to the embodiments described herein, which are provided for complete and complete disclosure of the present invention and to fully convey the scope of the present invention to those skilled in the art. The terminology used in the exemplary embodiments illustrated in the accompanying drawings is not intended to be limiting of the invention. In the drawings, the same units/elements are denoted by the same reference numerals.
Unless otherwise defined, terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense.
FIG. 1 is a flow diagram of a decentralized content interaction method 100 according to an embodiment of the present invention. As shown in fig. 1, the decentralized content interaction method provided by the embodiment of the present invention matches the requirements of two different mechanisms that cannot be directly interacted with each other through an intermediary mechanism, completes content interaction, and meets the requirements of different mechanisms; meanwhile, the corresponding interaction certificate is generated and stored in the block chain, and due to the fact that distributed accounting and storage are used, centralized hardware or management mechanisms do not exist, any nodes are equal, changing difficulty is high, and stability and safety of content interaction are guaranteed. The decentralized content interaction method provided by the embodiment of the invention starts from step 101, and an acquisition request is created and issued on a first server in step 101; wherein the obtaining request comprises: the name of the acquisition content, the number of the push service resources, and the expiration date of the acquisition request.
In step 102, a service resource corresponding to the number of pushed service resources is locked.
In the embodiment of the present invention, the obtaining request may be a purchase request, and the name of the obtained content may be a physical or virtual article, such as a bitcoin, a movie name, or an investment gold bar; the push service resource may be a physical or virtual item, such as currency or a fixed asset.
For example, the originating entity of the fetch request creates and issues the fetch request at the first server. Wherein, the obtaining request comprises: the name of the acquired content is Bitcoin (BTC), the quantity is 1, the quantity of the pushing service resources, namely the purchase price is 10000 RMB, and the validity period of the request is 3 days. Then, after the acquisition request is issued, the first server locks service resources, namely 10000 rmb, of the initiating mechanism of the acquisition request, which correspond to the number of the push service resources, until the content interaction is completed or the acquisition request is cancelled.
In addition, remarks such as a server where the opposite user is located or a content quantity requirement of the opposite user may be set in the acquisition request.
In step 103, a push request is created and issued at the second server; wherein the push request comprises: the name of the push content, the number of push contents, the number of acquisition service resources, and the expiration date of the push request.
In step 104, content corresponding to the number of pushed content is locked.
In the embodiment of the present invention, the push request may be a sale request, and the name of the push content may be a physical or virtual article, such as a bitcoin, a movie name, or an investment gold bar; the acquisition service resource may be a physical or virtual item, such as currency or a fixed asset.
For example, the initiating mechanism of the push request creates and issues the push request at the second server. Wherein, the push request includes: the name of the push content is bitcoin, the number of the push content is 1, the number of the obtained service resources is 8000 Hongkong coins, and the validity period of the request is 3 days. Then, after the push request is issued, the second server locks the content of the initiating mechanism of the push request, which corresponds to the number of the push content, namely 1 bitcoin, until the content interaction is completed or the acquisition request is cancelled.
In addition, remarks, such as the server where the opposite user is located or the quantity requirement of the service resources of the opposite user, may also be set in the acquisition request.
Preferably, wherein the method further comprises:
and before issuing, carrying out validity verification on the acquisition request and the push request.
In the embodiment of the invention, the created acquisition request and the created push request both need to be validated in terms of validity; wherein, if the validity verification passes, the verification is issued; and if the validity verification fails, feeding back a validity verification failure message to prompt the initiating mechanism to modify.
In step 105, it is determined that the acquisition request and the push request satisfy a preset matching policy, and the initiating mechanism of the acquisition request and the initiating mechanism of the push request perform content interaction, generate an interaction credential, and store the interaction credential in the blockchain.
Preferably, the determining that the acquisition request and the push request satisfy a preset matching policy includes:
and determining that the name of the acquired content and the number of the acquired content in the acquisition request are respectively consistent with the name of the pushed content and the number of the pushed content of the pushing request, wherein the number of the pushed service resources meets the requirement of acquiring the number of the service resources, and the acquisition request and the pushing request are both in an effective state, and determining that the acquisition request and the pushing request meet a preset matching strategy.
Preferably, the content interaction between the initiator of the acquisition request and the initiator of the push request, the generation of the interaction credential and the storage in the blockchain, includes:
locking the acquisition request, receiving service resources which are sent by an initiating mechanism of the acquisition request and correspond to the quantity of the pushed service resources, generating a first interaction certificate and storing the first interaction certificate in the block chain;
locking the push request, sending the service resources corresponding to the quantity of the acquired service resources and the acquisition request to an initiating mechanism of the push request, acquiring the content corresponding to the quantity of the push content, generating a second interactive certificate and storing the second interactive certificate in the block chain;
sending the content corresponding to the number of the acquired content to the initiating mechanism of the acquisition request, generating a third interactive certificate and storing the third interactive certificate in the block chain;
the first transaction voucher, the second transaction voucher and the third transaction voucher form a combined interaction voucher, and the combined interaction voucher is stored in the block chain to complete content interaction; wherein the combined interaction credential comprises: and acquiring a joint signature of the initiating mechanism of the request and the initiating mechanism of the push request.
And storing the acquired transaction certificate jointly signed by the initiator of the acquisition request and the initiator of the push request into the blockchain network as a transaction record, permanently storing the transaction certificate in the blockchain network in a way of being not falsifiable so as to ensure the legal transaction record, updating account values of the initiator of the acquisition request and the initiator of the push request after the consensus is achieved in the blockchain network, and finishing the content interaction.
Preferably, wherein the method further comprises:
canceling the acquisition request when the content interaction is not completed within the validity period of the acquisition request;
and canceling the push request when the content interaction is not completed within the validity period of the push request.
Preferably, wherein the method further comprises: and performing identity authentication on the initiating mechanism of the acquisition request and the initiating mechanism of the pushing request.
In one transaction, if only the initiating entity issues the acquisition request, a suitable target entity meeting the requirements may be selected, and then the transaction is completed through the process shown in steps 101-105.
In one transaction, if only the target entity issues the push request, the appropriate initiating entity meeting the requirement may be selected, and then the transaction is completed through the process shown in steps 101 and 105.
The following specifically exemplifies embodiments of the present invention
In an embodiment of the present invention, implementing decentralized content interaction comprises: the initiating user A wants to buy 1 bit coin by using 45000 RMB in the exchange 1, and the target user B wants to sell 1 bit coin in the exchange 2, with the selling price of 5000 Hongyuan. Since currently the two legal currencies are not supported on a single digital exchange, and users a and B are on different exchanges, the content interaction of initiating user a and target user B is achieved and satisfied through the mediation of intermediary user C, which is implemented with decentralization.
Figure 2 is a system overview block diagram of decentralized asset exchange, according to an embodiment of the present invention. As shown in fig. 2, a common user a is in an exchange 1 as an initiating node, a common user B is in an exchange 2 as a target node, and the two parties perform identity authentication, content interaction, transaction credential generation, and the like through an intermediate user node and store the authentication, the content interaction, the transaction credential, and the like in a blockchain.
Fig. 3 is a flow diagram of a method 300 of decentralized asset exchange, according to an embodiment of the invention. As shown in fig. 3, in an embodiment of the present invention, implementing decentralized asset exchange begins at step 301, where an initiating user a creates a purchase requisition at exchange 1 and issues at step 301. Wherein, the purchase application includes: the name of the acquired content is bitcoin, the number of the acquired content is 1, the purchase price is 45000 RMB, and the valid period of the application is 3 days.
The purchase request can also be added with remark information, for example, the exchange of the remark receiving user is exchange 2, the number of bitcoins owned by the receiving user is more than 1, the commission charge and the like.
For the purchase application meeting the requirement, initiating a user A to complete content interaction in a matching way; for the unsatisfactory purchase request, the initiating user a needs to cancel or reissue the request after modification.
At step 302, the exchange 1 where the initiating user A is located locks the 45000 RMB asset in the initiating user A account according to the purchase request until the transaction is completed or cancelled.
After the purchase fund in the account of the initiating user A is locked, if the transaction is completed within the specified time, the provided currency is sent to the intermediate user and is not returned to the initiating user; if the transaction is not completed, the transaction is cancelled, and the cancelled transaction can be reissued and suspended.
At step 303, target user B creates a sale application at exchange 2 and issues it. Wherein the sale application comprises: the name of the push content is bitcoin, the number is 1, the selling price is 50000 port coin, and the valid period of the application is 3 days.
Remark information can be added in the sale application, for example, the exchange of the remark receiving user is the exchange 1, and the asset owned by the receiving user is larger than 50000 port currency.
For the purchase application meeting the requirement, initiating a user B to complete content interaction in a matching way; for an unsatisfactory purchase request, the initiating user B needs to revoke or revise and reissue the purchase request. In step 304, the exchange 2 where the target user B is located locks 1 bitcoin in the account of the target user B according to the sale application until the transaction is completed or cancelled.
After the sale assets in the account of the initiating user B are locked, if the transaction is completed within the specified time, the provided sale assets are sent to the intermediate user and are not returned to the initiating user; if the transaction is not completed, the transaction is cancelled, and the cancelled transaction can be reissued and suspended.
In step 305, it is determined that the purchase request and the sale request meet a preset matching strategy, content interaction is performed, and an interaction certificate is generated and stored in a block chain. Wherein the intermediary user has an account with both exchange 1 and exchange 2, and can satisfy both requests.
Fig. 4 is a flow diagram of a method 400 of content interaction according to an embodiment of the invention. As shown in fig. 4, the method specifically includes the following steps:
step 401, determining that the purchase request and the push request satisfy a preset matching strategy. Specifically, the method comprises the following steps: determining that the name of the acquired content and the number of the acquired content in the purchase application are respectively consistent with the name of the pushed content of the sale application and the number of the pushed content, wherein the number of the pushed service resources meets the requirement of acquiring the number of the service resources, and the acquisition request and the pushing request are both in an effective state, and determining that the acquisition request and the pushing request meet a preset matching strategy.
At step 402, the intermediary user agrees through exchange 1 and exchange 2. Therefore, the node has safety, openness and reliability, and can complete the registration of the intermediate node.
In step 403, the intermediary user confirms the suspension order of the initiating user at the exchange 1, locks the suspension order, receives 45000CNY of the initiating user, generates the first interaction certificate, and stores the first interaction certificate in the blockchain. At this point, the originating user's hang ticket will no longer be acknowledged by other users, which acknowledgement requires that the BTC balance of the intermediate user be sufficient, such as greater than 1 BTC.
The confirmed bill-hanging must be completed within the specified time, otherwise the bill-hanging will be hung again, the intermediate user will be punished, and the corresponding interactive certificate is generated after the bill-hanging transaction is completed, and the interactive certificate is the transaction record which is stored in the block chain and can not be tampered.
At step 404, the intermediary user purchases 1BTC from the target user at exchange 2 using 50000HKD and confirms the user hang-up information at exchange 1 in response to the target user selling the application notes.
Step 405, the target user receives 1BTC sent by the intermediate user, confirms that the remark requirement is met, completes the transaction in a matching way, receives 50000HKD, sends 1BTC to the intermediate user, generates a second interactive certificate and stores the second interactive certificate in the block chain; and after the transaction is completed, the corresponding second interaction certificate generated is stored in the block chain to become a transaction record which can not be tampered, so that the validity of the transaction process is ensured.
Step 406, the intermediary user receives 1BTC, sends 1BTC to the initiating user at the exchange 1, and generates a third interaction credential to store in the blockchain.
Step 407, configuring the first transaction voucher, the second transaction voucher, and the third transaction voucher as a combined interaction voucher, and storing the combined interaction voucher in the block chain to complete content interaction. The method comprises the steps that an interactive certificate of an initiating user and a target user subjected to joint signature is stored in a blockchain network through an intermediate user to serve as a transaction record, the interactive certificate which cannot be tampered (the tampering needs high-amount workload certification and cannot be achieved) is permanently stored in the blockchain network to ensure the legal transaction record, after the common identification is achieved in the blockchain network, account values of the initiating user and the target user are updated, and the exchange transaction is completed.
FIG. 5 is a block diagram of a decentralized content interaction system 500 according to an embodiment of the present invention. As shown in FIG. 5, the decentralized content interaction system 500 provided by the embodiment of the present invention includes: the system comprises an acquisition request issuing module 501, a first locking module 502, a push request issuing module 503, a second locking module 504 and a content interaction module 505.
Preferably, the obtaining request issuing module 501 is configured to create and issue a obtaining request at a first server; wherein the obtaining request comprises: the name of the acquisition content, the number of the push service resources, and the expiration date of the acquisition request.
Preferably, the first locking module 502 is configured to lock a service resource corresponding to the number of the push service resources.
Preferably, the push request issuing module 503 is configured to create and issue a push request at a second server; wherein the push request comprises: the name of the push content, the number of push contents, the number of acquisition service resources, and the expiration date of the push request.
Preferably, the second locking module 504 is configured to lock the content corresponding to the number of the pushed contents.
Preferably, the content interaction module 505 is configured to determine that the acquisition request and the push request satisfy a preset matching policy, perform content interaction between an initiating mechanism of the acquisition request and an initiating mechanism of the push request, generate an interaction credential, and store the interaction credential in the blockchain.
Preferably, the determining, by the content interaction module 505, that the obtaining request and the pushing request satisfy a preset matching policy includes: and determining that the name of the acquired content and the number of the acquired content in the acquisition request are respectively consistent with the name of the pushed content and the number of the pushed content of the pushing request, wherein the number of the pushed service resources meets the requirement of acquiring the number of the service resources, and the acquisition request and the pushing request are both in an effective state, and determining that the acquisition request and the pushing request meet a preset matching strategy.
Preferably, the content interaction module 505, which obtains the initiating mechanism of the request and the initiating mechanism of the push request to perform content interaction, generates the interaction credential and stores the interaction credential in the blockchain, includes: locking the acquisition request, receiving service resources which are sent by an initiating mechanism of the acquisition request and correspond to the quantity of the pushed service resources, generating a first interaction certificate and storing the first interaction certificate in the block chain; locking the push request, sending the service resources corresponding to the quantity of the acquired service resources and the acquisition request to an initiating mechanism of the push request, acquiring the content corresponding to the quantity of the push content, generating a second interactive certificate and storing the second interactive certificate in the block chain; sending the content corresponding to the number of the acquired content to the initiating mechanism of the acquisition request, generating a third interactive certificate and storing the third interactive certificate in the block chain; the first transaction voucher, the second transaction voucher and the third transaction voucher form a combined interaction voucher, and the combined interaction voucher is stored in the block chain to complete content interaction; wherein the combined interaction credential comprises: and acquiring a joint signature of the initiating mechanism of the request and the initiating mechanism of the push request.
Preferably, wherein the system further comprises: and the validity verifying module is used for verifying the validity of the acquisition request and the push request before issuing.
Preferably, wherein the system further comprises: the first canceling module is used for canceling the acquisition request when the content interaction is not completed within the validity period of the acquisition request; and the second canceling module is used for canceling the push request when the content interaction is not completed within the validity period of the push request.
Preferably, wherein the system further comprises: and the identity authentication module is used for authenticating the identity of the initiating mechanism of the acquisition request and the initiating mechanism of the pushing request.
The decentralized content interaction system 500 according to the embodiment of the present invention corresponds to the decentralized content interaction method 100 according to another embodiment of the present invention, and is not described herein again.
The invention has been described with reference to a few embodiments. However, other embodiments of the invention than the one disclosed above are equally possible within the scope of the invention, as would be apparent to a person skilled in the art from the appended patent claims.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a/an/the [ device, component, etc ]" are to be interpreted openly as referring to at least one instance of said device, component, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated.