CN112398909B - Data exchange method, device, equipment and computer readable storage medium - Google Patents

Data exchange method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112398909B
CN112398909B CN202011130496.6A CN202011130496A CN112398909B CN 112398909 B CN112398909 B CN 112398909B CN 202011130496 A CN202011130496 A CN 202011130496A CN 112398909 B CN112398909 B CN 112398909B
Authority
CN
China
Prior art keywords
data
data exchange
exchange
party
node
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.)
Active
Application number
CN202011130496.6A
Other languages
Chinese (zh)
Other versions
CN112398909A (en
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 Zhigan District Blockchain Technology Co ltd
Original Assignee
Shenzhen Zhigan District Blockchain 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 Zhigan District Blockchain Technology Co ltd filed Critical Shenzhen Zhigan District Blockchain Technology Co ltd
Priority to CN202011130496.6A priority Critical patent/CN112398909B/en
Publication of CN112398909A publication Critical patent/CN112398909A/en
Application granted granted Critical
Publication of CN112398909B publication Critical patent/CN112398909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Abstract

The invention discloses a data exchange method, which comprises the following steps: when receiving the data exchange instruction, downloading a data exchange task corresponding to the data exchange instruction from the main chain; running a data acquisition contract in a data exchange task, and determining a first data exchange party and a second data exchange party outside a data exchange system; receiving first exchange data uploaded by a first data exchange party through a scheduling node, and receiving second exchange data uploaded by a second data exchange party; an interface of a target node is acquired so that a first data exchange party downloads second exchange data from the target node, and the second data exchange party downloads the first exchange data from the target node. The invention also discloses a data exchange device, equipment and a computer readable storage medium. The invention realizes data exchange by the nodes through arranging the data exchange system consisting of various nodes in the blockchain, and realizes data exchange under the condition of not influencing the main chain storage space and the authentication expense.

Description

Data exchange method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data security, and in particular, to a data exchange method, apparatus, device, and computer readable storage medium.
Background
In a blockchain-based data exchange system, data exchange between a user's business system and a blockchain backbone, and the process of exchanging data between user systems via the blockchain backbone are typically implemented via a blockchain smart contract.
However, the blockchain is a relatively closed environment, and it is known that a mechanism of writing information outside the chain into the blockchain is called a predictor, but after writing information outside the chain into the blockchain, if the predictor is directly used for data exchange, not only the potential safety hazard of data transmission can be caused, but also the authentication expense and the storage space of the blockchain can be increased, and these problems can affect the normal operation of the blockchain, but also the data exchange between the service system and the blockchain.
Disclosure of Invention
The invention mainly aims to provide a data exchange method, a device, equipment and a computer readable storage medium, which aim to solve the technical problems of low data exchange efficiency and limitation existing in the prior art that data exchange is directly carried out through a block chain.
In addition, to achieve the above object, the present invention also provides a data exchange method, including the steps of:
when a data exchange instruction is received, downloading a data exchange task corresponding to the data exchange instruction from the main chain;
running a data acquisition contract in the data exchange task, and determining a first data exchange party and a second data exchange party outside the data exchange system;
receiving, by the scheduling node, first exchange data uploaded by the first data exchange party, and receiving second exchange data uploaded by the second data exchange party;
and acquiring an interface of the target node so that the first data exchange party downloads the second exchange data from the target node, and the second data exchange party downloads the first exchange data from the target node.
Optionally, the data exchange system further includes a source node, and when receiving a data exchange instruction, the step of downloading, from the main chain, a data exchange task corresponding to the data exchange instruction includes:
when a data exchange instruction is received, creating a data exchange task containing a data acquisition contract in the scheduling node or the source node;
After the data exchange task is established, uploading the data exchange task to the main chain;
and when a downloading instruction sent by the source node is detected, downloading the data exchange task from the main chain.
Optionally, after the step of downloading the data exchange task corresponding to the data exchange instruction from the main chain when the data exchange instruction is received, the method includes:
when detecting that a target data exchange party logs in the scheduling node, receiving a data exchange request sent by the target data exchange party;
the step of running the data acquisition contract in the data exchange task and determining the first data exchange party and the second data exchange party outside the data exchange system comprises the following steps:
operating a data acquisition contract in the data exchange task to acquire a storage path of the target data exchange party and a transmission path corresponding to the data exchange request;
and screening a first data exchange party and a second data exchange party from the target data exchange parties according to the storage path and the sending path.
Optionally, the step of screening the first data exchange party and the second data exchange party from the target data exchange party according to the storage path and the transmission path includes:
And screening out the same target paths in the storage path and the transmission path, and taking the target paths as target data exchange parties corresponding to the storage path and the target paths as target data exchange parties corresponding to the transmission path as first data exchange parties and second data exchange parties respectively.
Optionally, the data exchange system further includes a proxy node, and the step of receiving, by the scheduling node, the first exchange data uploaded by the first data exchange party, and after the step of uploading the second exchange data by the second data exchange party, includes:
transmitting the first exchange data and the second exchange data from the scheduling node to the target node if a network channel between the scheduling node and the target node is in an open state;
and if the network channel is in a closed state, transmitting the first exchange data and the second exchange data from the scheduling node to the proxy node, and transmitting the first exchange data and the second exchange data to the target node through the proxy node.
Optionally, the step of obtaining the interface of the target node, so that the first data exchange party downloads the second exchange data from the target node, and the step of the second data exchange party downloading the first exchange data from the target node includes:
When a first data exchange party is detected to log in the target node, downloading the second exchange data to the first data exchange party through an interface of the target node;
and when the second data exchange party is detected to log in the target node, downloading the first exchange data to the second data exchange party through an interface of the target node.
Optionally, after the step of executing the data acquisition contract in the data exchange task to determine the first data exchange party and the second data exchange party outside the data exchange system, the method includes:
if the network channel between the scheduling node and the target node is in a closed state, uploading the first exchange data and the second exchange data to the main chain;
downloading the first exchange data and the second exchange data to the target node when the first data exchange party and the second data exchange party are detected to log in the target node;
and sending the first exchange data to the second data exchange party through the interface of the target node, and sending the second exchange data to the first data exchange party through the interface of the target node.
In addition, to achieve the above object, the present invention also provides a data exchange apparatus applied to a data exchange system including a scheduling node, a target node, and a main chain, the data exchange apparatus comprising:
the task downloading module is used for downloading a data exchange task corresponding to the data exchange instruction from the main chain when the data exchange instruction is received;
the contract operation module is used for operating the data acquisition contract in the data exchange task and determining a first data exchange party and a second data exchange party outside the data exchange system;
the switching data receiving module is used for receiving the first switching data uploaded by the first data exchange party through the scheduling node, and the second switching data uploaded by the second data exchange party;
a switched data downloading module for acquiring the interface of the target node to enable the first data exchange party to download the second switched data from the target node, and the second data exchange party to download the first switched data from the target node
In addition, to achieve the above object, the present invention also provides a data exchange device, including: the data exchange device comprises a memory, a processor and a data exchange program stored in the memory and capable of running on the processor, wherein the data exchange program realizes the steps of the data exchange method when being executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data exchange program which, when executed by a processor, implements the steps of the data exchange method as described above.
The embodiment of the invention provides a data exchange method, a device, equipment and a computer readable storage medium. When a data exchange instruction is received, downloading a data exchange task corresponding to the data exchange instruction from the main chain, wherein the data exchange task comprises a data acquisition contract, operating the data acquisition contract, and confirming a first data exchange party and a second data exchange party which are required to exchange data outside the data exchange system.
Drawings
Fig. 1 is a schematic hardware structure of an implementation manner of a data exchange device according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of the data exchange method of the present invention;
FIG. 3 is a flow chart of a second embodiment of the data exchange method of the present invention;
FIG. 4 is a flow chart of a third embodiment of the data exchange method of the present invention;
fig. 5 is a schematic diagram of functional modules of an embodiment of the data exchange device of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The data exchange terminal (called terminal, equipment or terminal equipment) of the embodiment of the invention can be a PC (personal computer), and can also be mobile terminal equipment with data processing functions such as a smart phone, a tablet personal computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on. Among other sensors, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile terminal is stationary, and the mobile terminal can be used for recognizing the gesture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which are not described herein.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a data exchange program may be included in the memory 1005, which is a computer-readable storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a data exchange program stored in the memory 1005, which when executed by the processor, implements the operations in the data exchange method provided by the embodiments described below.
Based on the hardware structure of the device, the embodiment of the data exchange method is provided.
Referring to fig. 2, in a first embodiment of the data exchange method of the present invention, the data exchange method includes:
and step S10, when a data exchange instruction is received, downloading a data exchange task corresponding to the data exchange instruction from the main chain.
The data exchange method in this embodiment is an improvement of the traditional scheme of performing data exchange through a blockchain backbone, by adding VDE (Virtual Dedicated Ecosystems, virtual private ecosystem) nodes in the blockchain backbone, that is, scheduling nodes and target nodes in this embodiment, the backbone in this embodiment is the blockchain backbone, if data to be exchanged in the blockchain is transmitted through the backbone, it is clear that the storage space of too many blockchains is occupied, so that the data exchange efficiency of the blockchain is reduced.
And step S20, running a data acquisition contract in the data exchange task, and determining a first data exchange party and a second data exchange party outside the data exchange system.
The scheduling node can be known to create a data exchange task by itself, the created data exchange task is uploaded to the main chain together with the carrying data acquisition contract, when the data exchange system receives a data exchange instruction, the data exchange task carrying the data acquisition contract is downloaded from the main chain, the first data exchange party and the second data exchange party which need to exchange data outside the data exchange system can be determined by operating the data acquisition contract, the data acquisition contract can be known to be a program which is acknowledged by a plurality of data exchange parties and is operated in the data exchange system, specifically, the data exchange party which performs data exchange and acknowledges the data acquisition contract can log in the scheduling node, and the exchanged data can be uploaded to the scheduling node.
Step S30, receiving, by the scheduling node, the first exchange data uploaded by the first data exchange party, and receiving the second exchange data uploaded by the second data exchange party.
It is known that two parties performing data exchange, namely a first data exchange party and a second data exchange party, can log in a scheduling node to upload data to be exchanged to the scheduling node, and after the scheduling node receives data to be exchanged uploaded by the first data exchange party and the second data exchange party, the data to be exchanged can be firstly encrypted to ensure the safety of subsequent data transmission.
Step S40, obtaining an interface of the target node, so that the first data exchange party downloads the second exchange data from the target node, and the second data exchange party downloads the first exchange data from the target node.
The first data exchange party and the second data exchange party in this embodiment can log in the target node, download the data to be exchanged transmitted from the scheduling node, and confirm the data to be exchanged to be downloaded through the label of the data to be exchanged, thereby implementing that the first data exchange party downloads the second data to be exchanged from the target node, and the second data exchange party downloads the first data to be exchanged from the target node.
Specifically, the step of refining in the step S10 includes:
step a1, when receiving a data exchange instruction, creating a data exchange task containing a data acquisition contract in the scheduling node or the source node.
And a step a2, uploading the data exchange task to the main chain after the data exchange task is established.
And a step a3 of downloading the data exchange task from the main chain when the downloading instruction sent by the source node is detected.
The source node and the scheduling node can each create a data exchange task containing a data acquisition contract, when the source node or the scheduling node receives a request for establishing the data exchange task, one data exchange task is created in the scheduling node or the source node and stored in a data exchange task table, then the data acquisition contract is installed in the scheduling node or the source node, the data acquisition contract is stored in the contract table, after the data exchange task is created, the data exchange program can generate a task uplink request, then the data exchange task can be sent from the data exchange task table to the upper link queue table and wait for uploading to the main link, and the data exchange task needing uploading to the main link at the same time can be more than one data exchange task needing to be uploaded to the main link in the upper link queue table, so that the data exchange task needing uploading to the main link in the upper link queue table can need to be queued and the source node can download the data exchange task just uploaded from the main link.
Specifically, the steps following step S10 include:
and b1, when the target data exchange party is detected to log in the scheduling node, receiving a data exchange request sent by the target data exchange party.
Specifically, the step of refining in step S20 includes:
and b2, running a data acquisition contract in the data exchange task to acquire a storage path of the target data exchange party and a transmission path corresponding to the data exchange request.
And b3, screening the first data exchange party and the second data exchange party from the target data exchange parties according to the storage path and the sending path.
The target data exchange party in this embodiment is any party requesting data exchange, when detecting that the target data exchange party logs in the scheduling node in an account number and password manner, the target data exchange party receives a data exchange request sent by the target data exchange party, and knowing that before the target data exchange party sends out the data exchange request, the scheduling node or the source node needs to create a task exchange instruction containing a data acquisition contract in advance, and when running the data acquisition contract, the data exchange program can acquire a storage path of the target data exchange party logging in the scheduling node, because of the data exchange involved, at least two target data exchange parties needing to exchange data and log in the scheduling node exist, and knowing that the data exchange request sent by the target data exchange party carries a sending path, the sending path in this embodiment can be understood as a destination, that is, the present embodiment provides a specific application scenario where data to be exchanged needs to be sent, where the storage path of company a is X, the storage path of company B is Y, company a logs on the scheduling node and sends a data exchange request, the data exchange request carries data A1 that company a needs to exchange and the storage path X of company a, and company B logs on the scheduling node and sends a data exchange request, the data exchange request carries data B1 that company B needs to exchange and the storage path Y of company B, by acquiring the storage paths of company a and company B, and the sending path carried by the data exchange request, the data exchange program can screen out a first data exchange party and a second data exchange party that perform data exchange from the target data exchange party, specifically, if the storage paths and the sending paths of the two data exchange parties are opposite to each other, i.e. company a has a storage path equal to that of company B, and company a has a transmission path equal to that of company B, then company a and company B are the first data exchange party and the second data exchange party, respectively.
Specifically, the step of refining in the step b3 includes:
and c1, screening out the same target paths in the storage path and the transmission path, and taking the target paths as target data exchange parties corresponding to the storage path and the target paths as target data exchange parties corresponding to the transmission path as first data exchange parties and second data exchange parties respectively.
In this embodiment, a specific application scenario is given, where the storage path of company a is X, the storage path of company B is Y, company a logs in the scheduling node and sends a data exchange request, where the data exchange request carries data A1 that needs to be exchanged by company a and a storage path X of company a, and company B logs in the scheduling node and sends a data exchange request, where the data exchange request carries data B1 that needs to be exchanged by company B and a storage path Y of company B, in this embodiment, the target paths are X and Y, and taking the target path X as an example, when X is the storage path, the corresponding target data exchange party is company a, and when X is the sending path, the corresponding target data exchange party is company B, and then company a and company B are respectively the first data exchange party and the second data exchange party.
Specifically, the steps following step S20 include:
and d1, if a network channel between the scheduling node and the target node is in a closed state, uploading the first exchange data and the second exchange data to the main chain.
And d2, when the first data exchange party and the second data exchange party are detected to log in the target node, downloading the first exchange data and the second exchange data to the target node.
Step d3, the first exchange data is sent to the second data exchange party through the interface of the target node, and the second exchange data is sent to the first data exchange party through the interface of the target node.
It is known that a network channel between the scheduling node and the target node may be closed, for example, a network signal is poor due to network fluctuation occurring between the nodes, and in this case, the switching data received by the scheduling node cannot be normally transmitted, where the first switching data and the second switching data may be transmitted through the main chain, specifically, the data switching program uploads the first switching data and the second switching data to the main chain, then, when the data switching program detects that the first data switching party and the second data switching party log on the target node, the first switching data and the second switching data are downloaded to the target node, and finally, the first switching data are transmitted to the second data switching party through an interface of the target node, and the second switching data are transmitted to the first data switching party, so as to complete data switching.
In this embodiment, the data exchange system includes a scheduling node, a target node and a main chain, when a data exchange instruction is received, a data exchange task corresponding to the data exchange instruction is downloaded from the main chain, the data exchange task includes a data acquisition contract, the data acquisition contract is operated, a first data exchange party and a second data exchange party which are required to exchange data outside the data exchange system are confirmed, the scheduling node receives first exchange data uploaded by the first data exchange party, the second data exchange party uploads second exchange data, the uploaded first exchange data and second exchange data are transmitted to the target node, finally, the first data exchange party can download second exchange data from the target node through an interface of the target node, the second data exchange party can download the first exchange data from the target node, so that data exchange between the first data exchange party and the second data exchange party is completed, the data exchange between the first data exchange party and the second data exchange party does not pass through a block chain, the potential safety hazard of data transmission is eliminated, the authentication expense of the block chain and the storage space is reduced, and the data exchange efficiency is improved.
Further, referring to fig. 3, a second embodiment of the data exchange method of the present invention is proposed on the basis of the above-described embodiment of the present invention.
This embodiment is a step subsequent to step S30 in the first embodiment, and differs from the above-described embodiment of the present invention in that:
and step S50, if the network channel between the scheduling node and the target node is in an open state, transmitting the first exchange data and the second exchange data from the scheduling node to the target node.
Step S60, if the network channel is in a closed state, transmitting the first exchange data and the second exchange data from the scheduling node to the proxy node, and transmitting the first exchange data and the second exchange data to the target node through the proxy node.
The data exchange system in this embodiment is known to be suitable for a case that data transmission is not performed by using a main chain, specifically, the scheduling node or the source node creates a data exchange task, and data acquisition contracts in the data exchange task are operated, so that after the data acquisition contracts are acquired from the outside of the data exchange system, the data security transmission program determines whether the network channel between the scheduling node and the target node is in an open state or a closed state, if the network channel between the scheduling node and the target node is in an open state, the data exchange program transmits the first exchange data and the second exchange data from the scheduling node to the proxy node, and transmits the first exchange data and the second exchange data to the target node through the proxy node, wherein the open state refers to a state that the network channel between the scheduling node and the target node is in a closed state, and the open state refers to a state that the network channel between the scheduling node and the target node is in a communication state, and the proxy node is a communication state, and the communication state between the proxy node and the target node is not in a communication state, and the communication state can be performed between the node and the target node.
In this embodiment, the data to be exchanged may be exchanged through each node in the data exchange system instead of the main chain, so that the data exchange is realized without affecting the normal operation of the main chain.
Further, referring to fig. 4, a third embodiment of the data exchange method of the present invention is proposed on the basis of the above-described embodiment of the present invention.
This embodiment is a step of refining step S40 in the first embodiment, and is different from the above-described embodiment of the present invention in that:
step S41, when detecting that a first data exchange party logs in the target node, downloading the second exchange data to the first data exchange party through an interface of the target node.
And step S42, when the second data exchange party is detected to log in the target node, the first exchange data is downloaded to the second data exchange party through an interface of the target node.
It is known that the first data exchange party and the second data exchange party log in the scheduling node, upload the first exchange data and the second exchange data to be exchanged, and the first exchange data and the second exchange data uploaded to the scheduling node can be transmitted through the main chain, or can be transmitted through the proxy node without the main chain, and the first exchange data and the second exchange data are transmitted to the target node, then the first data exchange party and the second data exchange party log in the target node again, download the first exchange data and the second exchange data through the interface of the target node, determine that the first exchange data is downloaded to the second data exchange party through the storage path and the transmission path, and the second exchange data is downloaded to the first data exchange party.
In the embodiment, the scheduling node and the target node are sequentially logged in, so that accurate and efficient data exchange is realized.
In addition, referring to fig. 5, an embodiment of the present invention further proposes a data exchange device, which is applied to a data exchange system, where the data exchange system includes a scheduling node, a target node, and a main chain, and the data exchange device includes:
the task downloading module 10 is configured to download, when receiving a data exchange instruction, a data exchange task corresponding to the data exchange instruction from the main chain;
a contract running module 20, configured to run a data acquisition contract in the data exchange task, and determine a first data exchange party and a second data exchange party outside the data exchange system;
a switching data receiving module 30, configured to receive, by using the scheduling node, first switching data uploaded by the first data exchange party, and second switching data uploaded by the second data exchange party;
and a switched data downloading module 40, configured to obtain an interface of the target node, so that the first data exchange party downloads the second switched data from the target node, and the second data exchange party downloads the first switched data from the target node.
Optionally, the task downloading module 10 includes the steps of:
a task creation unit configured to create a data exchange task including a data acquisition contract in the scheduling node or the source node when a data exchange instruction is received;
the task uploading unit is used for uploading the data exchange task to the main chain after the data exchange task is established;
and the task downloading unit is used for downloading the data exchange task from the main chain when detecting the downloading instruction sent by the source node.
Optionally, the data exchange device further includes:
the request receiving module is used for receiving a data exchange request sent by a target data exchange party when the target data exchange party is detected to log in the scheduling node;
the contract execution module 20 includes:
the path acquisition module is used for running a data acquisition contract in the data exchange task and acquiring a storage path of the target data exchange party and a transmission path corresponding to the data exchange request;
and the screening module is used for screening the first data exchange party and the second data exchange party from the target data exchange parties according to the storage path and the sending path.
Optionally, the screening module includes:
and the path screening unit is used for screening out the same target path in the storage path and the sending path, taking the target path as a target data exchange party corresponding to the storage path, and taking the target path as a target data exchange party corresponding to the sending path, and respectively taking the target path as a first data exchange party and a second data exchange party.
Optionally, the data exchange device further includes:
a first data transmission module, configured to transmit the first exchange data and the second exchange data from the scheduling node to the target node if a network channel between the scheduling node and the target node is in an open state;
and the second data transmission module is used for transmitting the first exchange data and the second exchange data from the scheduling node to the proxy node if the network channel is in a closed state, and transmitting the first exchange data and the second exchange data to the target node through the proxy node.
Optionally, the exchange data download module 40 includes:
a first data downloading unit, configured to download the second exchange data to a first data exchange party through an interface of the target node when it is detected that the first data exchange party logs in the target node;
And the second data downloading unit is used for downloading the first exchange data to the second data exchange party through the interface of the target node when the second data exchange party is detected to log in the target node.
Optionally, the data exchange device further includes:
a data uploading module, configured to upload the first exchange data and the second exchange data to the main chain if a network channel between the scheduling node and the target node is in a closed state;
a data downloading module, configured to, when detecting that the first data exchange party and the second data exchange party log in the target node, download the first exchange data and the second exchange data to the target node;
and the data sending module is used for sending the first exchange data to the second data exchange party through the interface of the target node and sending the second exchange data to the first data exchange party through the interface of the target node.
In addition, the embodiment of the present invention also proposes a computer-readable storage medium, on which a data exchange program is stored, which when executed by a processor, implements the operations in the data exchange method provided in the above embodiment.
The methods performed by the program modules may refer to various embodiments of the methods according to the present invention, and are not described herein.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity/operation/object from another entity/operation/object without necessarily requiring or implying any actual such relationship or order between such entities/operations/objects; the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The apparatus embodiments described above are merely illustrative, in which the units illustrated as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the data exchange method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A data exchange method, wherein the data exchange method is applied to a data exchange system, the data exchange system comprises a scheduling node, a target node and a main chain, and the data exchange method comprises the following steps:
when a data exchange instruction is received, downloading a data exchange task corresponding to the data exchange instruction from the main chain;
running a data acquisition contract in the data exchange task, and determining a first data exchange party and a second data exchange party outside the data exchange system;
receiving, by the scheduling node, first exchange data uploaded by the first data exchange party, and receiving second exchange data uploaded by the second data exchange party;
and acquiring an interface of the target node so that the first data exchange party downloads the second exchange data from the target node, and the second data exchange party downloads the first exchange data from the target node.
2. The data exchange method as claimed in claim 1, wherein the data exchange system further comprises a source node, and the step of downloading the data exchange task corresponding to the data exchange instruction from the main chain when the data exchange instruction is received comprises:
When a data exchange instruction is received, creating a data exchange task containing a data acquisition contract in the scheduling node or the source node;
after the data exchange task is established, uploading the data exchange task to the main chain;
and when a downloading instruction sent by the source node is detected, downloading the data exchange task from the main chain.
3. The data exchange method according to claim 2, wherein after the step of downloading the data exchange task corresponding to the data exchange instruction from the main chain when the data exchange instruction is received, the method comprises:
when detecting that a target data exchange party logs in the scheduling node, receiving a data exchange request sent by the target data exchange party;
the step of running the data acquisition contract in the data exchange task and determining the first data exchange party and the second data exchange party outside the data exchange system comprises the following steps:
operating a data acquisition contract in the data exchange task to acquire a storage path of the target data exchange party and a transmission path corresponding to the data exchange request;
and screening a first data exchange party and a second data exchange party from the target data exchange parties according to the storage path and the sending path.
4. The data exchange method of claim 3, wherein the step of screening the first data exchange party and the second data exchange party from the target data exchange party based on the storage path and the transmission path comprises:
and screening out the same target paths in the storage path and the transmission path, and taking the target paths as target data exchange parties corresponding to the storage path and the target paths as target data exchange parties corresponding to the transmission path as first data exchange parties and second data exchange parties respectively.
5. The data exchange method as claimed in claim 1, wherein the data exchange system further comprises a proxy node, and the step of receiving, by the scheduling node, the first exchange data uploaded by the first data exchange party, and the second exchange data uploaded by the second data exchange party, comprises:
transmitting the first exchange data and the second exchange data from the scheduling node to the target node if a network channel between the scheduling node and the target node is in an open state;
and if the network channel is in a closed state, transmitting the first exchange data and the second exchange data from the scheduling node to the proxy node, and transmitting the first exchange data and the second exchange data to the target node through the proxy node.
6. The data exchange method of claim 1, wherein the step of obtaining the interface of the target node to enable the first data exchange party to download the second exchange data from the target node, the second data exchange party downloading the first exchange data from the target node comprises:
when a first data exchange party is detected to log in the target node, downloading the second exchange data to the first data exchange party through an interface of the target node;
and when the second data exchange party is detected to log in the target node, downloading the first exchange data to the second data exchange party through an interface of the target node.
7. The data exchange method of claim 1, wherein after the step of executing the data acquisition contract in the data exchange task to determine the first data exchange party and the second data exchange party outside the data exchange system, comprising:
if the network channel between the scheduling node and the target node is in a closed state, uploading the first exchange data and the second exchange data to the main chain;
downloading the first exchange data and the second exchange data to the target node when the first data exchange party and the second data exchange party are detected to log in the target node;
And sending the first exchange data to the second data exchange party through the interface of the target node, and sending the second exchange data to the first data exchange party through the interface of the target node.
8. A data switching device for use in a data switching system, the data switching system including a scheduling node, a destination node, and a backbone, the data switching device comprising:
the task downloading module is used for downloading a data exchange task corresponding to the data exchange instruction from the main chain when the data exchange instruction is received;
the contract operation module is used for operating the data acquisition contract in the data exchange task and determining a first data exchange party and a second data exchange party outside the data exchange system;
the switching data receiving module is used for receiving the first switching data uploaded by the first data exchange party through the scheduling node, and the second switching data uploaded by the second data exchange party;
and the exchange data downloading module is used for acquiring the interface of the target node so that the first data exchange party downloads the second exchange data from the target node, and the second data exchange party downloads the first exchange data from the target node.
9. A data switching device, the data switching device comprising: memory, a processor and a data exchange program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the data exchange method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a data exchange program which, when executed by a processor, implements the steps of the data exchange method according to any of claims 1 to 7.
CN202011130496.6A 2020-10-20 2020-10-20 Data exchange method, device, equipment and computer readable storage medium Active CN112398909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011130496.6A CN112398909B (en) 2020-10-20 2020-10-20 Data exchange method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011130496.6A CN112398909B (en) 2020-10-20 2020-10-20 Data exchange method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112398909A CN112398909A (en) 2021-02-23
CN112398909B true CN112398909B (en) 2023-06-27

Family

ID=74596577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011130496.6A Active CN112398909B (en) 2020-10-20 2020-10-20 Data exchange method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112398909B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107947940A (en) * 2017-11-29 2018-04-20 树根互联技术有限公司 A kind of method and device of data exchange
CN108280765A (en) * 2018-02-26 2018-07-13 深圳智乾区块链科技有限公司 The value control method, apparatus and computer readable storage medium of block chain
CN110825797A (en) * 2019-10-25 2020-02-21 烨链(上海)科技有限公司 Data exchange method and device
CN110889137A (en) * 2019-11-21 2020-03-17 云南群林科技有限公司 Data exchange method based on block chain
CN111198846A (en) * 2018-11-19 2020-05-26 中思博安科技(北京)有限公司 Data exchange method and device based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11204939B2 (en) * 2018-07-18 2021-12-21 Bank Of America Corporation Data manifest as a blockchain service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107947940A (en) * 2017-11-29 2018-04-20 树根互联技术有限公司 A kind of method and device of data exchange
CN108280765A (en) * 2018-02-26 2018-07-13 深圳智乾区块链科技有限公司 The value control method, apparatus and computer readable storage medium of block chain
CN111198846A (en) * 2018-11-19 2020-05-26 中思博安科技(北京)有限公司 Data exchange method and device based on block chain
CN110825797A (en) * 2019-10-25 2020-02-21 烨链(上海)科技有限公司 Data exchange method and device
CN110889137A (en) * 2019-11-21 2020-03-17 云南群林科技有限公司 Data exchange method based on block chain

Also Published As

Publication number Publication date
CN112398909A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
US20160253664A1 (en) Attestation by proxy
US9590848B2 (en) Cloud based virtual mobile device
CN108595203B (en) Application function execution method, mobile terminal and computer readable storage medium
EP2757738A2 (en) Communication management system, relay device, communication control system, communication system, communication method, and carrier means storing comunication control program
CN109905380B (en) Node control method and related device in distributed system
WO2015027849A1 (en) Methods, devices, and systems for correlating terminals
US20180205568A1 (en) Method and device for searching for and controlling controllees in smart home system
CN115756881A (en) Data processing method, device, equipment and storage medium based on SDK
CN111371676A (en) Customer service function access method and related device
US20150142937A1 (en) Method and system for remote equipment data installation
CN112398909B (en) Data exchange method, device, equipment and computer readable storage medium
CN107463395B (en) Component calling method and device
CN112491792B (en) Data secure transmission method, device, equipment and readable storage medium
KR20180050001A (en) Firmware upgrade system and method for IoT
US20180063251A1 (en) System and method for remotely accessing a computing device
CN111339196B (en) Data processing method and system based on block chain and computer readable storage medium
EP3114573B1 (en) Apparatus and method for improving loading time in electronic device
CN107800577B (en) Device configuration method and device for mobile terminal
CN111599446A (en) Management method of medical display equipment and related equipment
CN112306858A (en) Test method and device and electronic equipment
US20230010098A1 (en) Network access via device identifier
KR20120132046A (en) Method for registering of lectures by using relay server, and system thereof
CN114697216A (en) Upgrading method and device for passive optical network equipment and readable storage medium
CN113886047A (en) Task processing method and device
CN116916371A (en) Single-station verification processing method, device, equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant