CN110808974A - Data acquisition method and device, computer device and storage medium - Google Patents

Data acquisition method and device, computer device and storage medium Download PDF

Info

Publication number
CN110808974A
CN110808974A CN201911049446.2A CN201911049446A CN110808974A CN 110808974 A CN110808974 A CN 110808974A CN 201911049446 A CN201911049446 A CN 201911049446A CN 110808974 A CN110808974 A CN 110808974A
Authority
CN
China
Prior art keywords
data
target data
user
node
request
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911049446.2A
Other languages
Chinese (zh)
Inventor
黄晓波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201911049446.2A priority Critical patent/CN110808974A/en
Publication of CN110808974A publication Critical patent/CN110808974A/en
Pending legal-status Critical Current

Links

Images

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a data acquisition method, which comprises the following steps: receiving a data acquisition request of a data request user of a first node for target data, wherein the data acquisition request comprises a block chain account of the data request user and an identification code of the target data; judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user; if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data; connecting the second node; obtaining the target data from the second node over the connection. The invention also provides a data acquisition device, a computer device and a computer readable storage medium. The invention can improve the efficiency of data acquisition.

Description

Data acquisition method and device, computer device and storage medium
Technical Field
The invention relates to the technical field of computer networks, in particular to a data acquisition method and device, a computer device and a computer readable storage medium.
Background
At present, the Data acquisition method is mainly a centralized Data acquisition method, and an Internet Data Center (IDC for short) server is required to be used. For example, a data platform adopting a centralized data acquisition method is prone to storage bottleneck and authentication bottleneck in the data acquisition process, resulting in low data acquisition efficiency. And the IDC server needs higher operation cost and very large bandwidth cost when running, and the achieved data acquisition effect is limited, so that the data acquisition efficiency is low.
How to improve the efficiency of data acquisition becomes an urgent problem to be solved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data acquisition method and apparatus, a computer apparatus, and a computer-readable storage medium, which can acquire data into nodes with sufficient storage space according to storage information of the nodes, and improve the efficiency of data acquisition.
A first aspect of the present application provides a data acquisition method, including:
receiving a data acquisition request of a data request user of a first node for target data, wherein the data acquisition request comprises a block chain account of the data request user and an identification code of the target data;
judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data;
connecting the second node;
obtaining the target data from the second node over the connection.
In another possible implementation manner, the determining, according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user, whether the data requesting user has the right to acquire the target data includes:
acquiring the type of the target data recorded in the intelligent contract;
if the type of the target data is free data, the data request user has the acquisition permission of the target data;
if the type of the target data is payment data, judging whether purchase information of a block chain account of the data request user for the target data exists in the intelligent contract;
if the purchase information of the block chain account of the data request user for the target data exists in the intelligent contract, the data request user has the acquisition permission of the target data;
and if the purchase information of the block chain account of the data request user for the target data does not exist in the intelligent contract, the data request user does not have the acquisition permission of the target data.
In another possible implementation manner, the determining, according to the identification code of the target data, the second node in which the target data is stored includes:
selecting a third node from the routing table of the first node according to the identification code of the target data;
inquiring index information of the target data from the third node;
and determining the second node according to the index information of the target data.
In another possible implementation manner, if the data requesting user does not have the right to acquire the target data, the method further includes:
acquiring an electronic signature of the data request user;
requesting the pre-deployed blockchain to upload a blockchain account of the user and a preset blockchain account of a service party from a blockchain account of the data request user to the data of the first node according to the electronic signature to perform purchase transfer transaction;
and if the purchase transfer transaction is successful, writing purchase information of the data request user for the target data into the intelligent contract, so that the data request user has the acquisition authority of the target data.
In another possible implementation manner, before the receiving a data acquisition request of a data request user of the first node for target data, the method further includes:
and writing the type of the target data, the price of the target data and the block chain account of the data uploading user of the target data into the intelligent contract.
In another possible implementation manner, the writing the type of the target data, the price of the target data, and the block chain account of the data upload user of the target data into the intelligent contract includes:
receiving a data uploading request of the data uploading user for the target data, wherein the data uploading request comprises the type of the target data, the price of the target data and a block chain account of the data uploading user;
judging whether the related information of the target data exists in the intelligent contract or not;
and if the related information of the target data does not exist in the intelligent contract, writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
In another possible implementation manner, before the writing the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the intelligent contract, the method further includes:
requesting the pre-deployed blockchain to transfer from the blockchain account of the data uploading user to a preset blockchain account of the service party, and sending relevant information of the target data returned by responding to the request of transferring from the blockchain account of the data uploading user to the preset blockchain account of the service party to the pre-deployed blockchain to the data uploading user;
receiving an electronic signature of the data uploading user, wherein the electronic signature is obtained by encrypting the relevant information of the target data by the data uploading user through a key of the data uploading user;
sending the electronic signature of the data uploading user to the pre-deployed block chain, and receiving an uploading transfer transaction result returned by the pre-deployed block chain;
and judging whether the type of the target data, the price of the target data and the block chain account of the data uploading user are written into the intelligent contract or not according to the uploading transfer transaction result.
A second aspect of the application provides a computer arrangement comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing the data acquisition method.
A third aspect of the present application provides a data acquisition apparatus, applied to a first node, the apparatus including:
a receiving unit, configured to receive a data acquisition request for target data from a data requesting user of the first node, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data;
the judging unit is used for judging whether the data request user has the acquisition permission of the target data according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
the determining unit is used for determining a second node storing the target data according to the identification code of the target data if the data request user has the acquisition authority of the target data;
a connection unit for connecting the second node;
an obtaining unit configured to obtain the target data from the second node through the connection.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data acquisition method.
Receiving a data acquisition request of a data request user of the first node for target data, wherein the data acquisition request comprises a block chain account of the data request user and an identification code of the target data; judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user; if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data; connecting the second node; obtaining the target data from the second node over the connection. The invention can acquire the target data from the distributed system and improve the data acquisition efficiency.
Drawings
Fig. 1 is a flowchart of a data acquisition method according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of a data acquisition apparatus according to a preferred embodiment of the present invention.
FIG. 3 is a diagram of a computer device according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Preferably, the data acquisition method of the present invention is applied in one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing equipment. The computer device can be in man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The computer device may be a node constituting a CDN (Content Delivery Network), a DHT (Distributed Hash Table), or a block chain Network.
Example one
Fig. 1 is a flowchart of a data acquisition method according to an embodiment of the present invention. The data acquisition method is applied to a first node, and the first node comprises a Network Storage device (such as a guest playing cloud and a money making treasure), a router, an intelligent box, a Network Attached Storage (NAS), a personal computer, an intelligent television, an optical modem and the like.
Referring to fig. 1, the data acquisition method specifically includes the following steps:
101, receiving a data acquisition request of a data requesting user of the first node for target data, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data.
The target data may include video data, audio data, text data, and the like.
The data requesting user logs in at the first node through the blockchain account of the data requesting user, and may receive the data obtaining request for the target data, which is input by the data requesting user, where the data obtaining request may include the blockchain account of the data requesting user and the identification code of the target data.
The data requesting user may generate a private key and a public key via an Etherhouse (ETH) wallet. The public key of the data requesting user may be hashed to obtain the wallet address of the data requesting user, and the wallet address of the data requesting user may be used as the blockchain account of the data requesting user (i.e., the user name of the data requesting user). The transaction information and balance of the blockchain account of the data requesting user can be inquired through the blockchain account of the data requesting user. The private key may be used for the data requesting user to prove that the data requesting user is the owner of the blockchain account of the data requesting user.
The identification code of the target data is a credential that distinguishes the target data from other data. The identification code of the target data can be obtained by performing hash calculation on the keyword of the target data, and the hash calculation method of the identification code of the target data is the same as that of the block chain account of the data request user. Specifically, the hash calculation method used for generating the identification code of the target data and the hash calculation method used for generating the blockchain account of the data requesting user may be both SHA256, SHA384, SHA512, or the like.
And 102, judging whether the data request user has the acquisition authority of the target data according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user.
In an embodiment, the determining, according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user, whether the data requesting user has the right to acquire the target data includes:
acquiring the type of the target data recorded in the intelligent contract;
if the type of the target data is free data, the data request user has the acquisition permission of the target data;
if the type of the target data is payment data, judging whether purchase information of a block chain account of the data request user for the target data exists in the intelligent contract;
if the purchase information of the block chain account of the data request user for the target data exists in the intelligent contract, the data request user has the acquisition permission of the target data;
and if the purchase information of the block chain account of the data request user for the target data does not exist in the intelligent contract, the data request user does not have the acquisition permission of the target data.
For example, the type of the target data N is queried from a query interface of the intelligent contract, and if the target data N recorded in the queried intelligent contract is free data, the data request user a has the right to acquire the target data N. And if the target data N recorded in the inquired intelligent contract is the paid data, continuously judging whether the intelligent contract has purchase information of the data request user A for the target data N. And if the purchase information of the data request user A for the target data N exists in the intelligent contract, the data request user A has the acquisition authority of the target data N. And if the purchase information of the data request user A for the target data N does not exist in the intelligent contract, the data request user A does not have the acquisition authority of the target data N.
The smart contracts are logical code that can be run on the pre-deployed blockchain. Variables in the smart contract may store purchase information for the target data, and information related to the target data. The purchase information of the target data may include a blockchain account, a type of the target data, and the like. The related information of the target data may include a blockchain account, a type of the target data, a price of the target data, and the like.
103, if the data request user has the acquisition right of the target data, determining a second node storing the target data according to the identification code of the target data.
In a specific embodiment, the determining, according to the identification code of the target data, the second node storing the target data includes:
selecting a third node from the routing table of the first node according to the identification code of the target data;
inquiring index information of the target data from the third node;
and determining the second node according to the index information of the target data.
Each node has a unique node identification code, and the node identification code of each node can be obtained by performing hash calculation on an IP (Internet Protocol) address and/or a Media Access Control (MAC) address of the node. The hash calculation method of the node identification code of each node and the hash calculation method of the identification code of the target data may be the same. The routing table of the first node may include routing information of a plurality of nodes.
An exclusive or distance of the identification code of the target data and a node identification code of a node in the routing table of the first node may be calculated; selecting a plurality of nodes having a small exclusive or distance with the identification code of the target data from the routing table of the first node as the third node. And iteratively inquiring the index information of the target data from the third node until the index information of the target data is received, wherein the index information of the target data comprises the identification code of the target data (namely, the key in the key-value key value pair) and the routing information of the second node storing the target data (namely, the value in the key-value key value pair). The second node can be determined according to the index information of the target data, so that the first node can acquire the target data from the second node.
In another embodiment, if the data requesting user does not have the right to acquire the target data, the method may further include:
(1) and acquiring the electronic signature of the data request user.
The obtaining the electronic signature of the data requesting user may include:
requesting, from the pre-deployed blockchain, a transfer from a blockchain account of the data requesting user;
receiving purchase information of the target data returned by the pre-deployed blockchain in response to a request for transfer from a blockchain account of the data requesting user, wherein the pre-deployed blockchain generates the purchase information of the target data of the data requesting user according to the request for transfer from the blockchain account of the data requesting user;
sending purchase information of the data request user for the target data to the data request user;
and receiving an electronic signature of the data request user, wherein the electronic signature is obtained by encrypting the purchase information of the target data of the data request user by using the key of the data request user.
In another embodiment, before the obtaining the electronic signature of the data requesting user, the following operations may be further performed:
judging whether the balance of the block chain account of the data request user is greater than a first preset balance or not;
if the balance of the block chain account of the data request user is greater than a first preset balance, determining that the electronic signature of the data request user needs to be acquired;
and if the balance of the block chain account of the data request user is less than or equal to a first preset balance, determining that the electronic signature of the data request user does not need to be acquired, and sending a balance shortage reminder to the data request user.
(2) And requesting the pre-deployed blockchain according to the electronic signature to upload the blockchain account of the user and the preset blockchain account of the service party from the blockchain account of the data request user to the data of the first node for purchase transfer transaction.
The predetermined blockchain account of the service party may be stored in the intelligent contract. The pre-deployed blockchain may decrypt the electronic signature with the public key of the data requesting user to obtain the decrypted purchase information of the data requesting user for the target data.
And if the decrypted purchase information of the data request user for the target data is consistent with the generated purchase information of the data request user for the target data, the purchase transfer transaction is successful.
And if the decrypted purchase information of the data request user for the target data is inconsistent with the generated purchase information of the data request user for the target data, the purchase transfer transaction fails.
(3) And if the purchase transfer transaction is successful, writing purchase information of the data request user for the target data into the intelligent contract, so that the data request user has the acquisition authority of the target data.
Specifically, if the purchase transfer transaction is successful, writing the blockchain account of the data uploading user, the type of the target data and the blockchain account of the data requesting user into the intelligent contract, so that the purchase information of the data requesting user for the target data exists in the intelligent contract, that is, the data requesting user has the acquisition right of the target data.
104, connecting the second node.
In a specific embodiment, the second node may be connected through a TCP (Transmission Control Protocol) or a UDP (User Datagram Protocol).
For example, a TCP connection request is sent to the second node, an acknowledgement request returned by the second node in response to the TCP connection request is received, and an acknowledgement message is sent to the second node in response to the acknowledgement request of the second node, so that the first node and the second node are successfully connected.
105, obtaining said target data from said second node through said connection.
In a particular embodiment, a video data request may be sent to the second node over a TCP connection; and receiving video data returned by the second node through the TCP connection in response to the video data request.
In another embodiment, a text data request may be sent to the second node over a TCP connection; and receiving video data returned by the second node through the TCP connection in response to the text data request.
The bottleneck of uploading the target data and requesting the target data can be reduced by storing the target data in the second node in a distributed manner, the bottleneck in authentication can be reduced by judging whether the data requesting user has the acquisition authority of the target data according to an intelligent contract, the safety of a user account can be increased by a data purchasing mode of a block chain, and the operation and storage of a server for increasing the safety are reduced, so that the data acquisition efficiency is increased.
A data acquisition method according to a first embodiment receives a data acquisition request of a data requesting user of a first node for target data, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data; judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user; if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data; connecting the second node; obtaining the target data from the second node over the connection. The data acquisition method of the first embodiment can acquire the target data from the distributed system, and improves the data acquisition efficiency.
In another embodiment, before the receiving a data acquisition request for target data from a data requesting user of the first node, the data acquisition method may further include:
and writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
In a specific embodiment, the writing the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the intelligent contract includes:
receiving a data uploading request of the data uploading user for the target data, wherein the data uploading request comprises the type of the target data, the price of the target data and a block chain account of the data uploading user;
judging whether the related information of the target data exists in the intelligent contract or not;
and if the related information of the target data does not exist in the intelligent contract, writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
In another embodiment, before the writing the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the intelligent contract, the data obtaining method further includes:
requesting the pre-deployed blockchain to transfer from the blockchain account of the data uploading user to a preset blockchain account of the service party, and sending relevant information of the target data returned by responding to the request of transferring from the blockchain account of the data uploading user to the preset blockchain account of the service party to the pre-deployed blockchain to the data uploading user;
receiving an electronic signature of the data uploading user, wherein the electronic signature is obtained by encrypting the relevant information of the target data by the data uploading user through a key of the data uploading user;
sending the electronic signature of the data uploading user to the pre-deployed block chain, and receiving an uploading transfer transaction result returned by the pre-deployed block chain;
and judging whether the type of the target data, the price of the target data and the block chain account of the data uploading user are written into the intelligent contract or not according to the uploading transfer transaction result.
In another embodiment, the data acquisition method may further include:
receiving the target data uploaded by the data uploading user;
and transmitting the target data uploaded by the data uploading user to a third node, so that the third node stores the target data to the second node.
The third node may be a server dedicated to receiving the target data uploaded by the data uploading user, and has a higher data file processing capability than other nodes.
Example two
Fig. 2 is a block diagram of a preferred embodiment of a data acquisition device according to an embodiment of the present invention. The data acquisition apparatus 10 is applied to a first node, where the first node includes a guest cloud Network Storage device (such as a guest cloud and a money-making treasure), a client router, an intelligent box, a Network Attached Storage (NAS), a personal computer, an intelligent television, an optical modem, and the like.
As shown in fig. 2, the data acquisition apparatus 10 may include: a receiving unit 201, a judging unit 202, a determining unit 203, a connecting unit 204, and an acquiring unit 205.
A receiving unit 201, configured to receive a data acquisition request for target data from a data requesting user of the first node, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data.
The target data may include video data, audio data, text data, and the like.
The data requesting user logs in at the first node through the blockchain account of the data requesting user, and may receive the data obtaining request for the target data, which is input by the data requesting user, where the data obtaining request may include the blockchain account of the data requesting user and the identification code of the target data.
The data requesting user may generate a private key and a public key via an Etherhouse (ETH) wallet. The public key of the data requesting user may be hashed to obtain the wallet address of the data requesting user, and the wallet address of the data requesting user may be used as the blockchain account of the data requesting user (i.e., the user name of the data requesting user). The transaction information and balance of the blockchain account of the data requesting user can be inquired through the blockchain account of the data requesting user. The private key may be used for the data requesting user to prove that the data requesting user is the owner of the blockchain account of the data requesting user.
The identification code of the target data is a credential that distinguishes the target data from other data. The identification code of the target data can be obtained by performing hash calculation on the keyword of the target data, and the hash calculation method of the identification code of the target data is the same as that of the block chain account of the data request user. Specifically, the hash calculation method used for generating the identification code of the target data and the hash calculation method used for generating the blockchain account of the data requesting user may be both SHA256, SHA384, SHA512, or the like.
The determining unit 202 is configured to determine whether the data requesting user has the acquisition permission of the target data according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user.
In an embodiment, the determining, according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user, whether the data requesting user has the right to acquire the target data includes:
acquiring the type of the target data recorded in the intelligent contract;
if the type of the target data is free data, the data request user has the acquisition permission of the target data;
if the type of the target data is payment data, judging whether purchase information of a block chain account of the data request user for the target data exists in the intelligent contract;
if the purchase information of the block chain account of the data request user for the target data exists in the intelligent contract, the data request user has the acquisition permission of the target data;
and if the purchase information of the block chain account of the data request user for the target data does not exist in the intelligent contract, the data request user does not have the acquisition permission of the target data.
For example, the type of the target data N is queried from a query interface of the intelligent contract, and if the target data N recorded in the queried intelligent contract is free data, the data request user a has the right to acquire the target data N. And if the target data N recorded in the inquired intelligent contract is the paid data, continuously judging whether the intelligent contract has purchase information of the data request user A for the target data N. And if the purchase information of the data request user A for the target data N exists in the intelligent contract, the data request user A has the acquisition authority of the target data N. And if the purchase information of the data request user A for the target data N does not exist in the intelligent contract, the data request user A does not have the acquisition authority of the target data N.
The smart contracts are logical code that can be run on the pre-deployed blockchain. Variables in the smart contract may store purchase information for the target data, and information related to the target data. The purchase information of the target data may include a blockchain account, a type of the target data, and the like. The related information of the target data may include a blockchain account, a type of the target data, a price of the target data, and the like.
A determining unit 203, configured to determine, according to the identification code of the target data, a second node in which the target data is stored if the data requesting user has the acquisition permission of the target data.
In a specific embodiment, the determining, according to the identification code of the target data, the second node storing the target data includes:
selecting a third node from the routing table of the first node according to the identification code of the target data;
inquiring index information of the target data from the third node;
and determining the second node according to the index information of the target data.
Each node has a unique node identification code, and the node identification code of each node can be obtained by performing hash calculation on an IP (Internet Protocol) address and/or a Media Access Control (MAC) address of the node. The hash calculation method of the node identification code of each node and the hash calculation method of the identification code of the target data may be the same. The routing table of the first node may include routing information of a plurality of nodes.
An exclusive or distance of the identification code of the target data and a node identification code of a node in the routing table of the first node may be calculated; selecting a plurality of nodes having a small exclusive or distance with the identification code of the target data from the routing table of the first node as the third node. And iteratively inquiring the index information of the target data from the third node until the index information of the target data is received, wherein the index information of the target data comprises the identification code of the target data (namely, the key in the key-value key value pair) and the routing information of the second node storing the target data (namely, the value in the key-value key value pair). The second node can be determined according to the index information of the target data, so that the first node can acquire the target data from the second node.
In another embodiment, if the data requesting user does not have the right to acquire the target data, the method may further include:
(1) and acquiring the electronic signature of the data request user.
The obtaining the electronic signature of the data requesting user may include:
requesting, from the pre-deployed blockchain, a transfer from a blockchain account of the data requesting user;
receiving purchase information of the target data returned by the pre-deployed blockchain in response to a request for transfer from a blockchain account of the data requesting user, wherein the pre-deployed blockchain generates the purchase information of the target data of the data requesting user according to the request for transfer from the blockchain account of the data requesting user;
sending purchase information of the data request user for the target data to the data request user;
and receiving an electronic signature of the data request user, wherein the electronic signature is obtained by encrypting the purchase information of the target data of the data request user by using the key of the data request user.
In another embodiment, before the obtaining the electronic signature of the data requesting user, the following operations may be further performed:
judging whether the balance of the block chain account of the data request user is greater than a first preset balance or not;
if the balance of the block chain account of the data request user is greater than a first preset balance, determining that the electronic signature of the data request user needs to be acquired;
and if the balance of the block chain account of the data request user is less than or equal to a first preset balance, determining that the electronic signature of the data request user does not need to be acquired, and sending a balance shortage reminder to the data request user.
(2) And requesting the pre-deployed blockchain according to the electronic signature to upload the blockchain account of the user and the preset blockchain account of the service party from the blockchain account of the data request user to the data of the first node for purchase transfer transaction.
The predetermined blockchain account of the service party may be stored in the intelligent contract. The pre-deployed blockchain may decrypt the electronic signature with the public key of the data requesting user to obtain the decrypted purchase information of the data requesting user for the target data.
And if the decrypted purchase information of the data request user for the target data is consistent with the generated purchase information of the data request user for the target data, the purchase transfer transaction is successful.
And if the decrypted purchase information of the data request user for the target data is inconsistent with the generated purchase information of the data request user for the target data, the purchase transfer transaction fails.
(3) And if the purchase transfer transaction is successful, writing purchase information of the data request user for the target data into the intelligent contract, so that the data request user has the acquisition authority of the target data.
Specifically, if the purchase transfer transaction is successful, writing the blockchain account of the data uploading user, the type of the target data and the blockchain account of the data requesting user into the intelligent contract, so that the purchase information of the data requesting user for the target data exists in the intelligent contract, that is, the data requesting user has the acquisition right of the target data.
A connection unit 204, configured to connect the second node.
In a specific embodiment, the second node may be connected through a TCP (Transmission Control Protocol) or a UDP (User Datagram Protocol).
For example, a TCP connection request is sent to the second node, an acknowledgement request returned by the second node in response to the TCP connection request is received, and an acknowledgement message is sent to the second node in response to the acknowledgement request of the second node, so that the first node and the second node are successfully connected.
An obtaining unit 205, configured to obtain the target data from the second node through the connection.
In a particular embodiment, a video data request may be sent to the second node over a TCP connection; and receiving video data returned by the second node through the TCP connection in response to the video data request.
In another embodiment, a text data request may be sent to the second node over a TCP connection; and receiving video data returned by the second node through the TCP connection in response to the text data request.
The bottleneck of uploading the target data and requesting the target data can be reduced by storing the target data in the second node in a distributed manner, the bottleneck in authentication can be reduced by judging whether the data requesting user has the acquisition authority of the target data according to an intelligent contract, the security of a user account can be increased by a data purchasing mode of a block chain, and the operation and storage of a server for increasing the security are reduced, so that the data acquisition efficiency is increased.
The data acquiring device 10 according to the second embodiment receives a data acquiring request of a data requesting user of the first node for target data, where the data acquiring request includes a blockchain account of the data requesting user and an identification code of the target data; judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user; if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data; connecting the second node; obtaining the target data from the second node over the connection. The data acquisition apparatus 10 of the second embodiment can acquire target data from a distributed system, thereby improving the efficiency of data acquisition.
In another embodiment, the data acquisition apparatus further includes a writing unit, configured to write the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the smart contract before the receiving of the data acquisition request of the data requesting user of the first node for the target data.
In a specific embodiment, the writing the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the intelligent contract includes:
receiving a data uploading request of the data uploading user for the target data, wherein the data uploading request comprises the type of the target data, the price of the target data and a block chain account of the data uploading user;
judging whether the related information of the target data exists in the intelligent contract or not;
and if the related information of the target data does not exist in the intelligent contract, writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
In another embodiment, before the writing the type of the target data, the price of the target data, and the blockchain account of the data uploading user into the smart contract, the data obtaining device is further configured to:
requesting the pre-deployed blockchain to transfer from the blockchain account of the data uploading user to a preset blockchain account of the service party, and sending relevant information of the target data returned by responding to the request of transferring from the blockchain account of the data uploading user to the preset blockchain account of the service party to the pre-deployed blockchain to the data uploading user;
receiving an electronic signature of the data uploading user, wherein the electronic signature is obtained by encrypting the relevant information of the target data by the data uploading user through a key of the data uploading user;
sending the electronic signature of the data uploading user to the pre-deployed block chain, and receiving an uploading transfer transaction result returned by the pre-deployed block chain;
and judging whether the type of the target data, the price of the target data and the block chain account of the data uploading user are written into the intelligent contract or not according to the uploading transfer transaction result.
In another embodiment, the data acquisition device further includes a transmission unit, configured to receive the target data uploaded by the data uploading user; and transmitting the target data uploaded by the data uploading user to a third node, so that the third node stores the target data to the second node.
The third node may be a server dedicated to receiving the target data uploaded by the data uploading user, and has a higher data file processing capability than other nodes.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, which stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned data acquisition method embodiment, for example, 101-105 shown in fig. 1:
101, receiving a data acquisition request of a data request user of a first node for target data, wherein the data acquisition request comprises a blockchain account of the data request user and an identification code of the target data;
102, judging whether the data request user has the acquisition authority of the target data according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
103, if the data request user has the acquisition right of the target data, determining a second node storing the target data according to the identification code of the target data;
104, connecting the second node;
105, obtaining said target data from said second node through said connection.
Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units in the above-described device embodiments, for example, the unit 201 and 205 in fig. 2:
a receiving unit 201, configured to receive a data acquisition request for target data from a data requesting user of a first node, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data;
a determining unit 202, configured to determine whether the data requesting user has the right to acquire the target data according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user;
a determining unit 203, configured to determine, according to the identification code of the target data, a second node in which the target data is stored if the data requesting user has the acquisition permission of the target data;
a connection unit 204, configured to connect the second node;
an obtaining unit 205, configured to obtain the target data from the second node through the connection.
Example four
Fig. 3 is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device 1 comprises a memory 20, a processor 30, a bus 50 and a computer program 40, such as a data acquisition program, stored in the memory 20 and executable on the processor 30. The processor 30, when executing the computer program 40, implements the steps in the data obtaining method embodiments described above, such as 101-105 shown in fig. 1:
101, receiving a data acquisition request of a data request user of a first node for target data, wherein the data acquisition request comprises a blockchain account of the data request user and an identification code of the target data;
102, judging whether the data request user has the acquisition authority of the target data according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
103, if the data request user has the acquisition right of the target data, determining a second node storing the target data according to the identification code of the target data;
104, connecting the second node;
105, obtaining said target data from said second node through said connection.
Alternatively, the processor 30, when executing the computer program 40, implements the functions of the modules/units in the above device embodiments, for example, the unit 201 and 205 in fig. 2:
a receiving unit 201, configured to receive a data acquisition request for target data from a data requesting user of a first node, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data;
a determining unit 202, configured to determine whether the data requesting user has the right to acquire the target data according to an intelligent contract in a pre-deployed blockchain and a blockchain account of the data requesting user;
a determining unit 203, configured to determine, according to the identification code of the target data, a second node in which the target data is stored if the data requesting user has the acquisition permission of the target data;
a connection unit 204, configured to connect the second node;
an obtaining unit 205, configured to obtain the target data from the second node through the connection.
Illustratively, the computer program 40 may be partitioned into one or more modules/units that are stored in the memory 20 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 40 in the computer apparatus 1. For example, the computer program 40 may be divided into a receiving unit 201, a judging unit 202, a determining unit 203, a connecting unit 204, and an obtaining unit 205 in fig. 2, and the specific functions of each unit are shown in embodiment two.
The Computer device 1 may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, a palmtop Computer, a portable Computer, an intelligent router, an ore machine, and a network storage device.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor 30 may be any conventional processor or the like, the processor 30 being the control center of the computer device 1 and connecting the various parts of the whole computer device 1 with various interfaces and lines.
The memory 20 may be used for storing the computer program 40 and/or the module/unit, and the processor 30 implements various functions of the computer device 1 by running or executing the computer program and/or the module/unit stored in the memory 20 and calling data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the computer apparatus 1, and the like. In addition, the memory 20 may also include a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The bus 50 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 50 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
Further, the computer apparatus 1 may further include a network interface, which may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), and is generally used for establishing a communication connection between the computer apparatus 1 and other electronic devices.
Optionally, the computer device 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the computer device 1 and for displaying a visualized user interface.
It will be appreciated by a person skilled in the art that the schematic diagram 3 is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, and may comprise more or less components than those shown, or some components may be combined, or different components.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are, in whole or in part, generated upon loading and execution of the computer program instructions on a computer apparatus. The computer device may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one type of logical function division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a 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 stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data acquisition method is applied to a first node, and is characterized by comprising the following steps:
receiving a data acquisition request of a data request user of the first node for target data, wherein the data acquisition request comprises a blockchain account of the data request user and an identification code of the target data;
judging whether the data request user has the acquisition authority of the target data or not according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
if the data request user has the acquisition authority of the target data, determining a second node storing the target data according to the identification code of the target data;
connecting the second node;
obtaining the target data from the second node over the connection.
2. The method of claim 1, wherein the determining whether the data requesting user has the acquisition right of the target data according to the smart contract in the pre-deployed blockchain and the blockchain account of the data requesting user comprises:
acquiring the type of the target data recorded in the intelligent contract;
if the type of the target data is free data, the data request user has the acquisition permission of the target data;
if the type of the target data is payment data, judging whether purchase information of a block chain account of the data request user for the target data exists in the intelligent contract;
if the purchase information of the block chain account of the data request user for the target data exists in the intelligent contract, the data request user has the acquisition permission of the target data;
and if the purchase information of the block chain account of the data request user for the target data does not exist in the intelligent contract, the data request user does not have the acquisition permission of the target data.
3. The method of claim 1, wherein said determining a second node storing the target data based on the identification code of the target data comprises:
selecting a third node from the routing table of the first node according to the identification code of the target data;
inquiring index information of the target data from the third node;
and determining the second node according to the index information of the target data.
4. The method of claim 1, wherein if the data requesting user does not have access to the target data, the method further comprises:
acquiring an electronic signature of the data request user;
requesting the pre-deployed blockchain to upload a blockchain account of the user and a preset blockchain account of a service party from a blockchain account of the data request user to the data of the first node according to the electronic signature to perform purchase transfer transaction;
and if the purchase transfer transaction is successful, writing purchase information of the data request user for the target data into the intelligent contract, so that the data request user has the acquisition authority of the target data.
5. The method of any of claims 1-4, wherein prior to said receiving a data acquisition request for target data by a data requesting user of the first node, the method further comprises:
and writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
6. The method of claim 5, wherein the writing the type of the target data, the price of the target data, and the blockchain account of the data upload user to the smart contract comprises:
receiving a data uploading request of the data uploading user for the target data, wherein the data uploading request comprises the type of the target data, the price of the target data and a block chain account of the data uploading user;
judging whether the related information of the target data exists in the intelligent contract or not;
and if the related information of the target data does not exist in the intelligent contract, writing the type of the target data, the price of the target data and the block chain account of the data uploading user into the intelligent contract.
7. The method of claim 6, wherein prior to said writing the type of the target data, the price of the target data, and the blockchain account of the data upload user to the smart contract, the method further comprises:
requesting the pre-deployed blockchain to transfer from the blockchain account of the data uploading user to a preset blockchain account of the service party, and sending relevant information of the target data returned by responding to the request of transferring from the blockchain account of the data uploading user to the preset blockchain account of the service party to the pre-deployed blockchain to the data uploading user;
receiving an electronic signature of the data uploading user, wherein the electronic signature is obtained by encrypting the relevant information of the target data by the data uploading user through a key of the data uploading user;
sending the electronic signature of the data uploading user to the pre-deployed block chain, and receiving an uploading transfer transaction result returned by the pre-deployed block chain;
and judging whether the type of the target data, the price of the target data and the block chain account of the data uploading user are written into the intelligent contract or not according to the uploading transfer transaction result.
8. A computer arrangement comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing a data acquisition method as claimed in any one of claims 1 to 7.
9. A data acquisition apparatus, applied to a first node, the data acquisition apparatus comprising:
a receiving unit, configured to receive a data acquisition request for target data from a data requesting user of the first node, where the data acquisition request includes a blockchain account of the data requesting user and an identification code of the target data;
the judging unit is used for judging whether the data request user has the acquisition permission of the target data according to an intelligent contract in a pre-deployed block chain and a block chain account of the data request user;
the determining unit is used for determining a second node storing the target data according to the identification code of the target data if the data request user has the acquisition authority of the target data;
a connection unit for connecting the second node;
an obtaining unit configured to obtain the target data from the second node through the connection.
10. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the data acquisition method according to any one of claims 1 to 7.
CN201911049446.2A 2019-10-31 2019-10-31 Data acquisition method and device, computer device and storage medium Pending CN110808974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911049446.2A CN110808974A (en) 2019-10-31 2019-10-31 Data acquisition method and device, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911049446.2A CN110808974A (en) 2019-10-31 2019-10-31 Data acquisition method and device, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN110808974A true CN110808974A (en) 2020-02-18

Family

ID=69489698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911049446.2A Pending CN110808974A (en) 2019-10-31 2019-10-31 Data acquisition method and device, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN110808974A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523862A (en) * 2020-04-27 2020-08-11 广东电网有限责任公司培训与评价中心 Method for acquiring talent data and related equipment
CN112328663A (en) * 2020-11-24 2021-02-05 深圳市鹰硕技术有限公司 Data discovery method and system applied to big data
CN112668051A (en) * 2020-12-31 2021-04-16 北京聚云科技有限公司 Data acquisition method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845960A (en) * 2017-01-24 2017-06-13 上海亿账通区块链科技有限公司 Method for secure transactions and system based on block chain
CN107464117A (en) * 2017-08-04 2017-12-12 平安科技(深圳)有限公司 Data managing method and block catenary system based on block chain
CN108683626A (en) * 2018-03-15 2018-10-19 众安信息技术服务有限公司 A kind of data access control method and device
WO2019002671A1 (en) * 2017-06-29 2019-01-03 Nokia Technologies Oy Electronic health data access control
CN109492419A (en) * 2018-11-27 2019-03-19 众安信息技术服务有限公司 For obtaining the method, apparatus and storage medium of the data in block chain
CN109727033A (en) * 2018-12-29 2019-05-07 杭州趣链科技有限公司 A kind of Data Access Security control method based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845960A (en) * 2017-01-24 2017-06-13 上海亿账通区块链科技有限公司 Method for secure transactions and system based on block chain
WO2019002671A1 (en) * 2017-06-29 2019-01-03 Nokia Technologies Oy Electronic health data access control
CN107464117A (en) * 2017-08-04 2017-12-12 平安科技(深圳)有限公司 Data managing method and block catenary system based on block chain
CN108683626A (en) * 2018-03-15 2018-10-19 众安信息技术服务有限公司 A kind of data access control method and device
CN109492419A (en) * 2018-11-27 2019-03-19 众安信息技术服务有限公司 For obtaining the method, apparatus and storage medium of the data in block chain
CN109727033A (en) * 2018-12-29 2019-05-07 杭州趣链科技有限公司 A kind of Data Access Security control method based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨志宏: "《河南省科技金融创新发展研究》", 30 November 2017 *
欧阳丽炜: "智能合约:架构及进展", 《自动化学报》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523862A (en) * 2020-04-27 2020-08-11 广东电网有限责任公司培训与评价中心 Method for acquiring talent data and related equipment
CN111523862B (en) * 2020-04-27 2024-02-23 广东电网有限责任公司培训与评价中心 Method and related equipment for acquiring talent data
CN112328663A (en) * 2020-11-24 2021-02-05 深圳市鹰硕技术有限公司 Data discovery method and system applied to big data
CN112668051A (en) * 2020-12-31 2021-04-16 北京聚云科技有限公司 Data acquisition method and device

Similar Documents

Publication Publication Date Title
CN105282126B (en) Login authentication method, terminal and server
US11048690B2 (en) Contribution of multiparty data aggregation using distributed ledger technology
EP3391616B1 (en) Device management with tunneling
US8595806B1 (en) Techniques for providing remote computing services
US20130268679A1 (en) Information processing apparatus, information processing method, and program
CN111343048B (en) Pressure testing method and device, computer device and storage medium
JP2017207979A (en) Alteration detection system and alteration detection method
KR20170060004A (en) Establishing trust between two devices
CN110808974A (en) Data acquisition method and device, computer device and storage medium
EP3537684A1 (en) Apparatus, method, and program for managing data
CN109635581A (en) A kind of data processing method, equipment, system and storage medium
CN109565518A (en) Interchangeable content retrieval
CN107426266B (en) Data processing method and server
CN111222075A (en) Data transmission method based on multiple Webviews, server and storage medium
US10049222B1 (en) Establishing application trust levels using taint propagation
CN113642239A (en) Method and system for modeling federated learning
CN111291414A (en) Data storage method and device, computer device and storage medium
CN109871715B (en) Access method and device of distributed storage file and storage medium
CN112529402A (en) Task delegation method, system, device, equipment and storage medium
CN110692072A (en) NFC initiated proxy communication
CN110535977B (en) File distribution method and device, computer device and storage medium
CN107517256B (en) Information distribution method and device
JP6972417B2 (en) Mobile devices, systems, access methods, and programs
CN111147186B (en) Data transmission method and device, computer equipment and storage medium
CN112905990A (en) Access method, client, server and access system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200218

RJ01 Rejection of invention patent application after publication