WO2020168666A1 - Data deployment method based on dht network, node device, data deployment system and storage medium - Google Patents

Data deployment method based on dht network, node device, data deployment system and storage medium Download PDF

Info

Publication number
WO2020168666A1
WO2020168666A1 PCT/CN2019/093045 CN2019093045W WO2020168666A1 WO 2020168666 A1 WO2020168666 A1 WO 2020168666A1 CN 2019093045 W CN2019093045 W CN 2019093045W WO 2020168666 A1 WO2020168666 A1 WO 2020168666A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node device
deployment
request
deployed
Prior art date
Application number
PCT/CN2019/093045
Other languages
French (fr)
Chinese (zh)
Inventor
王立新
Original Assignee
深圳市网心科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市网心科技有限公司 filed Critical 深圳市网心科技有限公司
Publication of WO2020168666A1 publication Critical patent/WO2020168666A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Definitions

  • the present invention relates to the field of communication technology, and in particular to a data deployment method, node equipment, data deployment system and storage medium based on a DHT network.
  • Storage systems such as P2P based on Distributed Hash Table (DHT) technology have high scalability and can support large-scale data storage.
  • DHT Distributed Hash Table
  • a piece of continuous data is divided into several blocks and stored in one or more nodes of the system.
  • Each node can send data to the node in the routing information of the DHT network. Due to the disorder of data deployment between nodes, the node equipment bandwidth resources and storage resources are wasted, and it is easy to cause data storms.
  • the main purpose of the present invention is to provide a data deployment method, node equipment, data deployment system and storage medium based on a DHT network, aiming to solve the technical problem of disordered data deployment in the existing DHT network.
  • the present invention provides a data deployment method based on a DHT network, which is applied to a first node device, the first node device stores pre-deployed data, and the data deployment method includes: sending a first data notification to the second node Device, wherein the first node device and the second node device are in communication connection, the first data notification includes information about the first pre-deployed data pre-deployed by the first node device on the second node device, and the first node device A piece of pre-deployed data is all or part of the pre-deployed data; it is detected whether a first data request is received, and the first data request is sent to the second node device in response to the first data notification
  • the first node device, the first data request includes information that the second node device requests the first node device to deploy the first requested deployment data to be deployed on the second node device, and the first requested deployment data is the first All or part of the data of a pre-deployed data; if the first data request is received, the first requested deployment
  • the data deployment method before the sending the first data notification to the second node device, the data deployment method further includes: obtaining node information of the second node device, wherein the node information includes address information.
  • the data deployment method further includes: detecting whether the data deployment of the second node device is received Feedback; if the deployment feedback of the second node device is received, a second data notification is sent to the third node device, so that the third node device responds to the second data notification to the first node device And the second node device to issue a second data request, where the second data notification includes information about the second pre-deployment data pre-deployed on the third node device by the first node device and the second node device Information about the third pre-deployment data that is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first request for deployment data All data or part of the data; detecting whether a second data request is received, the second data request includes the information of the second request deployment data that the third node device requests the
  • the present invention also provides a data deployment method based on a DHT network, which is applied to a second node device, and the second node device is in communication connection with the first node device.
  • the data deployment method includes: detecting whether to receive To the first data notification, the first data notification is sent to the second node device after the first node device receives the pre-deployed data, wherein the first data notification includes that the first node device is pre-deployed in Information about the first pre-deployment data of the second node device, where the first pre-deployment data is all or part of the pre-deployment data; determine whether to respond to the first data notification;
  • the first data notification is to send a first data request to the first node device, and the first data request includes the first request deployment of the second node device to the first node device to deploy to the second node device Data information, so that the first node device sends the first requested deployment data to the second node device in response to the first data request, wherein the first requested
  • determining whether it is necessary to respond to the first data notification includes: determining whether the second node device stores first pre-deployment data; if the second node device does not store the first pre-deployment data, determining all Whether the storage space of the second node device is greater than the set threshold; if the storage space of the second node device is greater than the set threshold, it is determined that the first data notification needs to be responded to.
  • determining whether the second node device needs to respond to the first data notification includes: determining whether the storage space of the second node device is greater than a set threshold; if the storage space of the second node device is greater than a set threshold, Threshold, it is determined whether the second node device stores the first pre-deployment data; if the second node device does not store the first pre-deployment data, it is determined that the first data notification needs to be responded to.
  • the second node device is in communication connection with the third node device
  • the data deployment method further includes: detecting whether a second data request is received, and the second data request is the third node device responding to the second The data notification is sent to the two-node device and the first node device; wherein the second data notification includes the information of the second pre-deployment data pre-deployed on the third node device by the first node device and the second Information about the third pre-deployment data that the node device is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first requested deployment All data or part of the data; the second data request includes the third node device's request to the first node device to be deployed on the third node device's second request to deploy data and the third node device's request to the second node device Information about the third requested deployment data deployed on the third node device, the second
  • the present invention provides a data deployment method based on a DHT network, which is applied to a data deployment system.
  • the data deployment system includes a first node device and a second node device communicatively connected with the first node device.
  • the first node device stores pre-deployed data
  • the data deployment method includes: the first node device sends a first data notification to the second node device, wherein the first data notification includes the first node
  • the device is pre-deployed in the information of the first pre-deployment data of the second node device, the first pre-deployment data is all or part of the pre-deployment data; the second node device determines whether it needs to respond to the The first data notification; if it is necessary to respond to the first data notification, the second node device sends a first data request to the first node device, and the first data request includes the second node device to the first
  • the node device requests information about the first requested deployment data that is deployed on the second node device, where the first requested deployment data is all or part of the first pre-deployed data; the first node device detects whether it has received The first data request; if the first data request is received, the first request deployment data is sent to the second node device in response to the
  • the data deployment system further includes a third node device, the third node device is in communication connection with the first node device and the second node device, and in response to the first data request, the third node device
  • the data deployment method further includes: whether the first node device receives the data deployment feedback of the second node device; if the second node device is received Device deployment feedback, a second data notification is sent to the third node device, where the second data notification includes information about the second pre-deployment data pre-deployed by the first node device on the third node device Information and information of the third pre-deployment data that the second node device is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is The first request to deploy all the data or part of the data; the third node device determines whether it needs to respond to the second data notification;
  • the second requested deployment data includes all or part of the second pre-deployed data
  • the third requested deployment data is all of the third pre-deployed data Data or part of data
  • the first node device and the second node device detect whether a second data request is received; if the first node device and the second node device receive the second data request, Then, the first node device sends the second request deployment data to the third node device in response to the second data request, and the second node device sends the third request to the third node device in response to the second data request.
  • the deployment data is sent to the third node device.
  • the present invention provides a node device, the node device includes: a memory, the memory is used to store a computer executable data deployment method program; and a processor, the processor calls the data deployment method During the program, execute the aforementioned data deployment method.
  • the present invention provides a data deployment system based on a DHT network.
  • the data deployment system includes: a first node device and a second node device communicatively connected to the first node device; wherein, the first node
  • the device includes a memory for storing a computer-executable data deployment method program; and a processor that executes the aforementioned data deployment method when the processor invokes the data deployment method program.
  • the present invention provides a storage medium on which a data deployment method program is stored, and the data deployment method program can be executed by one or more processors to implement the aforementioned data deployment method.
  • the present invention provides a data deployment method, node device, data deployment system and storage medium based on DHT network.
  • the first node device of the data deployment system stores pre-deployed data through the first node
  • the device sends a data notification to a second node device that is in communication with the first node device, and the second node device can respond to the data notification sent by the first node device to pull the data required by the second node device from the first node device, where:
  • There is at least one second node device and the data in the second node device is uniformly deployed and distributed by the first node device, so that the bandwidth of the second node device can be efficiently used, and the disordered deployment of data between the second node devices can avoid data storm.
  • FIG. 1 is a flowchart of the steps of a data deployment method based on a DHT network provided by the first embodiment of the present invention
  • FIG. 2A is a structural frame diagram of a data deployment system based on a DHT network provided by the second embodiment of the present invention
  • 2B is a schematic diagram of data deployment between node devices of a data deployment system based on a DHT network provided by the second embodiment of the present invention
  • 3A is a flowchart of steps of a method for data deployment based on a DHT network provided by a modified embodiment of the first embodiment of the present invention
  • 3B is a flowchart of steps of a method for data deployment based on a DHT network provided by another modified embodiment of the first embodiment of the present invention
  • FIG. 4 is a flow chart of the steps of a method for data deployment based on a DHT network provided by the third embodiment of the present invention.
  • FIG. 5A is a step flow chart of a specific implementation manner of step S22 in FIG. 4;
  • FIG. 5B is a flowchart of another specific implementation manner of step S22 in FIG. 4;
  • FIG. 6 is a flowchart of steps of a data deployment method based on a DHT network provided by the fourth embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a node device provided by five embodiments of the present invention.
  • the present invention provides a data deployment method, node equipment, data deployment system and storage medium based on a DHT network, wherein a first node device of the data deployment system stores pre-deployed data, and a data notification is sent to the first node device through the first node device.
  • the second node device to which the node device is communicatively connected can respond to the data notification sent by the first node device to pull the data required by the second node device from the first node device, wherein there is at least one second node device,
  • the data in the second node device is uniformly deployed and distributed by the first node device, so that the bandwidth of the second node device can be efficiently used, and the data storm caused by the disorderly deployment of data between the second node devices can be avoided.
  • the first node device may notify the third node device to pull data from the first node device and the second node device in an orderly manner, thereby speeding up the speed of data pulling and deployment.
  • the present invention provides a DHT network-based data deployment method, which is applied to the first node device 10 of the DHT network-based data deployment system 100.
  • the DHT network-based data deployment system 100 includes a first node device 10 A node device 10, a second node device 20 communicatively connected with the first node device 10, wherein the first node device 10 stores pre-deployed data, and the first node device 10 may be one or more, and the second node device 20 It can also be one or more, which is not limited here.
  • the data deployment method includes steps S11-S14.
  • Step S11 Send a first data notification to the second node device, where the first node device and the second node device are in communication connection, and the first data notification includes that the first node device is pre-deployed in the second node device.
  • the pre-deployed data is uploaded to the designated storage location of the first node device 10 by the user through a terminal device such as a mobile phone or a personal computer, or it may be pre-pulled by the first node device from the data server and stored in the designated storage location. data.
  • the pre-deployed data can be data pieces or complete data.
  • the first node device 10 receives the pre-deployment data, it generates or updates the pre-deployment data task list, and deploys the pre-deployment data according to the pre-deployment data task list.
  • the first node device 10 stores pre-deployed data A, B, C, and D.
  • the first node device 10 When deploying pre-deployed data, the first node device 10 sends a first data notification to the second node device 20.
  • the first node device 10 and the second node device 20 are communicatively connected via a DHT network, and the first data notification includes information about the first pre-deployment data that the first node device 10 is pre-deployed to the second node device 20, and the first pre-deployment data
  • the deployment data is all or part of the pre-deployment data.
  • the first node device 10 stores pre-deployed data A, B, C, and D.
  • the first node device 10 sends a first data notification to the second node device 20 to inform the second node 20 that the first node device 10 pre-sends deployment data A, B to the second node device 20 , C, D.
  • Step S12 Detect whether a first data request is received.
  • the first data request is sent by the second node device to the first node device in response to the first data notification, and the first data request includes the The second node device requests the first node device for information about the first requested deployment data deployed on the second node device, where the first requested deployment data is all or part of the first pre-deployed data.
  • the first node device 10 detects whether a first data request is received.
  • the first data request is sent to the first node device by the second node device 20 in response to the first data notification, and the first data request includes the second node device 20
  • a request is made to the first node device 10 for the information of the first requested deployment data deployed on the second node device 20 and the size of the first requested deployment data.
  • the first requested deployment data may be all or part of the first pre-deployed data. .
  • Step S13 If the first data request is received, send the first requested deployment data to the second node device in response to the first data request.
  • the first node device 10 receives the first data request of the second node device 10 in response to the first data information, the first node device 10 responds to the first data request and sends the first requested deployment data to the second node device 20, The deployment of the pre-deployment data on the second node device 20 has been completed.
  • the second node device 20 responds to the first data notification and sends a first data request to the first node device 10, if the second node device 20 has pre-deployed data A and B already stored.
  • the first node device 10 is requested to send the pre-deployment data C and D to the second node device 20 to complete the deployment of the pre-deployment data A, B, C, and D on the second node device 20.
  • the first node device 10 is requested to send the pre-deployment data D to the second node device 20 to complete the deployment of the pre-deployment data A, B, C, and D on the second node device 20.
  • the data deployment method before step S11, the data deployment method further includes step S10.
  • Step S10 Obtain node information of the second node device, where the node information includes address information.
  • the first node device 10 updates the routing information table, and the routing information table records the corresponding node of each node device in the DHT network Information
  • the node information includes at least address information or IP addresses corresponding to each node device, and the first node device 10 can accurately find each node device in the DHT network through the node information.
  • the respective node devices may be one or more second node devices 20 or other node devices other than the second node devices 20.
  • the first node device 10 obtains node information of at least one second node device 20 in the DHT network to send a first data notification to the second node device 20 to inform the second node 20 that the first node
  • the device 10 sends deployment data A, B, C, and D to the second node device 20 in advance.
  • the data deployment method further includes steps S14-S17.
  • step S14 detecting whether the data deployment feedback of the second node device is received.
  • the first node device 10 detects whether the data deployment feedback of the second node device 20 is received.
  • the data deployment feedback is sent to the first node device 10 after the second node device 20 completes the storage of the first request data, and the first node device 10 After receiving the data deployment feedback of the second node device 20, the data information stored in the second node device 20 can be learned, and the data information stored in the second node device 20 can be recorded.
  • Step S15 If the data deployment feedback of the second node device is received, a second data notification is sent to the third node device, so that the third node device responds to the second data notification to the first node device And the second node device to issue a second data request, where the second data notification includes information about the second pre-deployment data pre-deployed on the third node device by the first node device and the second node device Information about the third pre-deployment data that is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first request for deployment data All or part of the data.
  • the first node device 10 receives the data deployment feedback of the second node device 20, it sends a second data notification to the third node device 30, and the third node device 30 interacts with the first node device 10 and the second node device 30.
  • the device 20 is in communication connection, so that the third node device 30 responds to the second data notification and sends a second data request to the first node device 10 and the second node device 20.
  • the second data notification includes information about the second pre-deployment data that the first node device 10 is pre-deployed on the third node device 30 and information about the third pre-deployment data that the second node device 20 is pre-deployed on the third node device 30.
  • the size of the second requested deployment data and the size of the third requested deployment data, the second pre-deployed data is all or part of the pre-deployed data, and the third pre-deployed data is all or part of the first requested deployment data .
  • the third node device 30 may be one or more, which is not limited here.
  • Step S16 Detect whether a second data request is received, and the second data request includes information that the third node device requests the first node device to deploy the second request to deploy data on the third node device, and the third node device sends the second data request to the first node device.
  • the second-node device requests information about the third-requested deployment data to be deployed on the third-node device, where the second-requested deployment data includes all or part of the second pre-deployment data, and the third requested deployment data is the third pre-deployment data. All or part of the deployment data.
  • the first node device 10 detects whether a second data request is received.
  • the second data request includes information about the second request deployment data that the third node device 30 requests to be deployed on the third node device 30 and the third node device 30.
  • the node device 30 requests the second node device 20 for information about the third requested deployment data deployed on the third node device 30, where the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment The data is all or part of the third pre-deployed data.
  • the third node device 30 sends a second data request to the first node device 10 and the second electronic device 20 in response to the second data notification.
  • the third node device 20 has pre-deployed data A already stored.
  • the first node device 10 and the second node device 20 are requested to send the pre-deployed data B, C, and D to the third node device 30 to complete the pre-deployed data A, B, C, and D. Deployment of the device 20 at the third node.
  • the third node device 20 has pre-deployed data A and B already stored.
  • the first node device 10 and the second node device 20 are requested to send the pre-deployment data C and D to the third node device 30 to complete the pre-deployment data A, B, C, and D in the first Deployment of the three-node device 20.
  • Step S17 If the second data request is received, send the second requested deployment data to the third node device in response to the second data request.
  • the first node device 10 receives the second data request, it responds to the second data request and sends the second requested deployment data to the third node device 30 to complete the deployment of the pre-deployment data in the third node device 30.
  • Figure 4 is a DHT-based data deployment method provided by the present invention, applied to a data deployment system, the data deployment system includes a first node device and a second node device communicatively connected with the first node device, so The data deployment method includes steps S21-S25.
  • Step S21 Send a first data notification to the second node device, where the first data notification includes information about the first pre-deployed data that the first node device is pre-deployed on the second node device, and The first pre-deployment data is all or part of the pre-deployment data.
  • the first node device 10 stores pre-deployment data.
  • the first node device 10 pre-deploys the pre-deployment data, it sends a first data notification to the second node device 20, where the first data notification includes the first node device 10 Information about the first pre-deployment data pre-deployed in the second node device 20, where the first pre-deployment data is all or part of the pre-deployment data.
  • Step S22 The second node device determines whether it needs to respond to the first data notification.
  • step S22 specifically includes steps S221a-S223a.
  • Step S221a The second node device judges whether the second node device stores first pre-deployment data.
  • the second node device 20 compares the first pre-deployed data information of the first node device 10 pre-deployed to the second node device in the first data notification and the data information stored by the second node device 20 itself, thereby determining the second Whether the node device stores the first pre-deployment data.
  • Step S222a If the second node device does not store the first pre-deployment data, determine whether the storage space of the second node device is greater than a set threshold.
  • the second node device 20 determines that it has stored the first pre-deployment data, it will feed back the stored feedback of the second node device 20 to the first node device 10 and end the data deployment method flow.
  • Step S223a If the storage space of the second node device is greater than the set threshold, it is determined that the first data notification needs to be responded to.
  • step S22 specifically includes steps S221b-S223b.
  • Step S221b The second node device determines whether the storage space of the second node device is greater than a set threshold.
  • Step S222b If the storage space of the second node device is greater than the set threshold, determine whether the second node device stores the first pre-deployment data.
  • the second node device 20 determines that its storage space is less than or equal to the set threshold, it will feed back to the first node device 10 that the storage space of the second node device 20 is insufficient, and end the data deployment method flow.
  • the second node device 20 If it is determined that the storage space of the second node device 20 is greater than the set threshold, then it is determined whether the second node device 20 stores the first pre-deployment data.
  • Step S223b If the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
  • Step S23 If it is necessary to respond to the first data notification, the second node device sends a first data request to the first node device, and the first data request includes the second node device requesting the first node device Information about the first requested deployment data deployed on the second node device, wherein the first requested deployment data is all or part of the first pre-deployed data.
  • Step S24 The first node device detects whether the first data request is received.
  • Step S25 If the first data request is received, send the first requested deployment data to the second node device in response to the first data request.
  • the data deployment method before step S21, the data deployment method further includes:
  • the first node device obtains node information of the second node device, where the node information includes address information.
  • This step is the same as step S10 in FIG. 3B, and will not be repeated here.
  • the data deployment system 100 further includes a third node device 30, and the third node device 30 is in communication connection with the first node device 10 and the second node device 20 as shown in FIG. 2A.
  • the data deployment method further includes:
  • the first node device receives the data deployment feedback of the second node device
  • a second data notification is sent to the third node device, where the second data notification includes that the first node device is pre-deployed to the third node Information of the second pre-deployment data of the device and information of the third pre-deployment data of the second node device pre-deployed on the third node device, where the second pre-deployment data is all or part of the pre-deployed data Data, the third pre-deployed data is all or part of the data of the first requested deployment data;
  • a second data request is sent to the first node device and the second node device, and the second data request includes the third node device requesting the first node device to deploy on the third node device.
  • the first node device and the second node device detect whether a second data request is received
  • the first node device sends the second requested deployment data to the second data request in response to the second data request.
  • determining whether the third node device needs to respond to the second data notification includes:
  • the storage space of the third node device is greater than the set threshold, determining whether the third node device stores third pre-deployment data, and the second pre-deployment data includes the third pre-deployment data;
  • the third node device does not store third pre-deployment data, it is determined that the second data notification needs to be responded to.
  • determining whether the third node device needs to respond to the second data notification includes:
  • the second node device does not store the third pre-deployment data, determining that the storage space of the third node device is greater than a set threshold
  • the present invention also provides a data deployment method based on the DHT network, which is applied to the second node device 20 of the data deployment system, and the second node device 20 is in communication connection with the first node device 10.
  • the data deployment method includes steps S40-S42.
  • Step S40 Detect whether a first data notification is received, the first data notification is sent by the first node to the second node device, and the first data notification includes that the first node device is pre-deployed in the Information about the first pre-deployment data of the second node device, where the first pre-deployment data is all or part of the pre-deployment data.
  • Step S41 Determine whether to respond to the first data notification.
  • the determining whether to respond to the first data notification specifically includes:
  • the second node device does not store the first pre-deployment data, determining whether the storage space of the second node device is greater than a set threshold;
  • the storage space of the second node device is greater than the set threshold, it is determined that a response to the first data notification is required.
  • the second node device 20 compares the first pre-deployed data information of the first node device 10 pre-deployed to the second node device in the first data notification and the data information stored by the second node device 20 itself, thereby It is determined whether the second node device 20 stores the first pre-deployment data.
  • the second node device 20 determines that it has stored the first pre-deployment data, it will feed back the stored feedback of the second node device 20 to the first node device 10 and end the data deployment method flow.
  • the storage space of the second node device is greater than the set threshold, it is determined that a response to the first data notification is required.
  • the determining whether to respond to the first data notification specifically includes:
  • the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
  • the second node device 20 determines that its own storage space is less than or equal to the set threshold, it will feed back the insufficient storage space of the second node device 20 to the first node device 10, and end the data deployment method flow.
  • the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
  • Step S42 If it is necessary to respond to the first data notification, send a first data request to the first node device, and the first data request includes the second node device requesting the first node device to deploy to the second node device. Information about the first requested deployment data of the node device, so that the first node device sends the first requested deployment data to the second node device in response to the first data request, where the first requested deployment data is all Describe all or part of the first pre-deployed data.
  • the data deployment system 100 further includes a third node device 30, and the third node device 30 is in communication connection with the first node device 10 and the second node device 20 as shown in FIG. 2A.
  • the data deployment method further includes:
  • the second data notification includes all The information of the second pre-deployment data that the first node device is pre-deployed on the third node device and the information of the third pre-deployment data that the second node device is pre-deployed on the third node device, the second pre-deployment data
  • the deployment data is all or part of the pre-deployed data
  • the third pre-deployment data is all or part of the data in the first request for deployment
  • the second data request includes information that the third node device requests the first node device to deploy the second request to deploy data on the third node device, and the third node device requests the second node device to deploy the first data deployed on the third node device. 3. Information about the requested deployment data, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data;
  • the third requested deployment data is sent to the third node device in response to the second data request.
  • the second node device 20 detects whether a second data request is received, and the second data request is sent by the third node device 30 to the second node device 20 and the first node device 10 in response to the second data notification.
  • the second data notification is that after the first node device 10 receives the deployment feedback that the second node device 20 completes the first requested data deployment, it obtains the node information of the third node device 30 in the DHT network and sends it to the third node device. Node device 30 sends.
  • the second data notification includes information about the second pre-deployment data pre-deployed by the first node device 10 on the third node device 30 and information about the third pre-deployment data pre-deployed by the second node device 20 on the third node device 30,
  • the second pre-deployment data is all or part of the pre-deployment data
  • the third pre-deployment data is all or part of the data of the first deployment data request.
  • the second data request includes information that the third node device 30 requests the first node device 10 to be deployed on the third node device 30 and the third node device 30 requests the second node device 20 to be deployed on the third node.
  • the third requested deployment data information of the device 30, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data.
  • the third requested deployment data is sent to the third node device in response to the second data request.
  • the first node device 10 includes a memory 101, a processor 101 and a bus 103.
  • the memory 101 is connected to the processor 102 through a bus 103.
  • the memory 101 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 101 may be an internal storage unit of the terminal device 10 in some embodiments, such as a hard disk of the node device. In other embodiments, the memory 101 may also be an external storage device of the node device, such as a plug-in hard disk equipped with the node device, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, Flash Card, etc. Further, the memory 101 may also include both an internal storage unit of the node device and an external storage device. The memory 101 can be used not only to store application software and various data installed in the node device, such as computer-readable program codes.
  • the memory 101 stores a computer executable program corresponding to the data deployment method, so that when the processor 102 invokes the computer-executable data deployment method program, the first node device 10 can execute the data deployment method.
  • the processor 102 may be a central processing unit (Central Processing Unit) in some embodiments.
  • Central Processing Unit CPU
  • controller a controller
  • microcontroller a microprocessor
  • other data processing chips are used to run program codes or process data stored in the memory 101, such as executing computer-readable programs.
  • the bus 103 may be a peripheral component interconnection standard (peripheral Component interconnect (PCI for short) bus or extended industry standard architecture (EISA for short) bus, etc.
  • PCI peripheral Component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc.
  • the second node device 20 and the third node device 30 may also have the same structure as the first node device 10, that is, have a memory and a processor.
  • the memory stores a computer executable program corresponding to the data deployment method, so that when the processor invokes the computer executable data deployment method program, the node device can execute the data deployment method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed are a data deployment method based on a DHT network, a node device, a data deployment system and a storage medium. A first node device stores predeployed data. The data deployment method comprises: sending a first data notification to a second node device; detecting whether a first data request is received, wherein the first data request is sent to the first node device by the second node device in response to the first data notification; and if the first data request is received, sending first request deployment data to the second node device in response to the first data request. Data in a second node device is uniformly deployed and distributed by means of a first node device, such that the bandwidth of the second node device can be efficiently utilized, and a data storm caused by disordered deployment of the data in the second node device is avoided.

Description

一种基于DHT网络的数据部署方法、节点设备、数据部署系统及存储介质A data deployment method, node equipment, data deployment system and storage medium based on DHT network 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种基于DHT网络的数据部署方法、节点设备、数据部署系统以及存储介质。The present invention relates to the field of communication technology, and in particular to a data deployment method, node equipment, data deployment system and storage medium based on a DHT network.
背景技术Background technique
随着网络的发展,信息呈现爆炸性增长,基于分布式哈希表(Distributed Hash Table;DHT) 技术的点对点(P2P) 等类型的存储系统拥有很高的扩展性,能够支持大规模的数据存储。With the development of the network, information has exploded. Storage systems such as P2P based on Distributed Hash Table (DHT) technology have high scalability and can support large-scale data storage.
在P2P 等类型的存储系统中,一段连续的数据被分割成若干块,存放在系统的一个或多个节点中。每一节点均可向在该DHT网络的路由信息中的节点发送数据,由于节点间数据部署的无序性,造成了节点设备带宽资源、存储资源的浪费,同时容易造成数据风暴。In P2P and other types of storage systems, a piece of continuous data is divided into several blocks and stored in one or more nodes of the system. Each node can send data to the node in the routing information of the DHT network. Due to the disorder of data deployment between nodes, the node equipment bandwidth resources and storage resources are wasted, and it is easy to cause data storms.
因此,如何实现节点设备之间数据的有序、快速部署是本领域技术人员亟待解决的技术问题。Therefore, how to realize the orderly and rapid deployment of data between node devices is a technical problem to be solved urgently by those skilled in the art.
技术问题technical problem
本发明的主要目的在于提供一种基于DHT网络的数据部署方法、节点设备、数据部署系统以及存储介质,旨在解决现有DHT网络中数据部署无序的技术问题。The main purpose of the present invention is to provide a data deployment method, node equipment, data deployment system and storage medium based on a DHT network, aiming to solve the technical problem of disordered data deployment in the existing DHT network.
技术解决方案Technical solutions
本发明提供一种基于DHT网络的数据部署方法,应用于第一节点设备,所述第一节点设备存储有预部署数据,所述数据部署方法包括:发送第一数据通知给所述第二节点设备,其中,第一节点设备和第二节点设备通信连接,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;检测是否接收到第一数据请求,所述第一数据请求为所述第二节点设备响应所述第一数据通知发送给所述第一节点设备,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据;若接收到所述第一数据请求,则响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备。The present invention provides a data deployment method based on a DHT network, which is applied to a first node device, the first node device stores pre-deployed data, and the data deployment method includes: sending a first data notification to the second node Device, wherein the first node device and the second node device are in communication connection, the first data notification includes information about the first pre-deployed data pre-deployed by the first node device on the second node device, and the first node device A piece of pre-deployed data is all or part of the pre-deployed data; it is detected whether a first data request is received, and the first data request is sent to the second node device in response to the first data notification The first node device, the first data request includes information that the second node device requests the first node device to deploy the first requested deployment data to be deployed on the second node device, and the first requested deployment data is the first All or part of the data of a pre-deployed data; if the first data request is received, the first requested deployment data is sent to the second node device in response to the first data request.
优选地,在所述发送第一数据通知给所述第二节点设备之前,所述数据部署方法还包括:获取第二节点设备的节点信息,其中所述节点信息包括地址信息。Preferably, before the sending the first data notification to the second node device, the data deployment method further includes: obtaining node information of the second node device, wherein the node information includes address information.
优选地,在响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备之后,所述数据部署方法还包括:检测是否接收到所述第二节点设备的数据部署反馈;若接收到所述第二节点设备的部署反馈,则发送第二数据通知给所述第三节点设备,以使第三节点设备响应所述第二数据通知,向所述第一节点设备和所述第二节点设备发出第二数据请求,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;检测是否接收到第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;若接收到所述第二数据请求,响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备。Preferably, after sending the first requested deployment data to the second node device in response to the first data request, the data deployment method further includes: detecting whether the data deployment of the second node device is received Feedback; if the deployment feedback of the second node device is received, a second data notification is sent to the third node device, so that the third node device responds to the second data notification to the first node device And the second node device to issue a second data request, where the second data notification includes information about the second pre-deployment data pre-deployed on the third node device by the first node device and the second node device Information about the third pre-deployment data that is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first request for deployment data All data or part of the data; detecting whether a second data request is received, the second data request includes the information of the second request deployment data that the third node device requests the first node device to be deployed on the third node device, and the third node The device requests the second node device for information about the third requested deployment data deployed on the third node device, where the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is All or part of the data of the third pre-deployment data; if the second data request is received, the second data request for deployment is sent to the third node device in response to the second data request.
为实现上述目的,本发明还提供一种基于DHT网络的数据部署方法,应用于第二节点设备,所述第二节点设备与第一节点设备通信连接,所述数据部署方法包括:检测是否接收到第一数据通知,所述第一数据通知为第一节点设备接收到预部署数据后,向所述第二节点设备发送,其中所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;判断是否需响应所述第一数据通知;若需响应所述第一数据通知,则向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,以使第一节点设备响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据。To achieve the above objective, the present invention also provides a data deployment method based on a DHT network, which is applied to a second node device, and the second node device is in communication connection with the first node device. The data deployment method includes: detecting whether to receive To the first data notification, the first data notification is sent to the second node device after the first node device receives the pre-deployed data, wherein the first data notification includes that the first node device is pre-deployed in Information about the first pre-deployment data of the second node device, where the first pre-deployment data is all or part of the pre-deployment data; determine whether to respond to the first data notification; The first data notification is to send a first data request to the first node device, and the first data request includes the first request deployment of the second node device to the first node device to deploy to the second node device Data information, so that the first node device sends the first requested deployment data to the second node device in response to the first data request, wherein the first requested deployment data is the data of the first pre-deployed data All or part of the data.
优选地,判断是否需响应所述第一数据通知包括:判断所述第二节点设备是否存储有第一预部署数据;若所述第二节点设备未存储有第一预部署数据,则判断所述第二节点设备的存储空间是否大于设定阈值;若所述第二节点设备的存储空间大于设置阈值,则判断需响应所述第一数据通知。Preferably, determining whether it is necessary to respond to the first data notification includes: determining whether the second node device stores first pre-deployment data; if the second node device does not store the first pre-deployment data, determining all Whether the storage space of the second node device is greater than the set threshold; if the storage space of the second node device is greater than the set threshold, it is determined that the first data notification needs to be responded to.
优选地,所述第二节点设备判断是否需响应所述第一数据通知包括:判断所述第二节点设备的存储空间是否大于设定阈值;若所述第二节点设备的存储空间大于设定阈值,则判断所述第二节点设备是否存储有第一预部署数据;若所述第二节点设备未存储有第一预部署数据,则判断需响应所述第一数据通知。Preferably, determining whether the second node device needs to respond to the first data notification includes: determining whether the storage space of the second node device is greater than a set threshold; if the storage space of the second node device is greater than a set threshold, Threshold, it is determined whether the second node device stores the first pre-deployment data; if the second node device does not store the first pre-deployment data, it is determined that the first data notification needs to be responded to.
优选地,所述第二节点设备与第三节点设备通信连接,所述数据部署方法还包括:检测是否接收到第二数据请求,所述第二数据请求为所述第三节点设备响应第二数据通知向所述二节点设备和第一节点设备发送;其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据。若接收到所述第二数据请求,则响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。Preferably, the second node device is in communication connection with the third node device, and the data deployment method further includes: detecting whether a second data request is received, and the second data request is the third node device responding to the second The data notification is sent to the two-node device and the first node device; wherein the second data notification includes the information of the second pre-deployment data pre-deployed on the third node device by the first node device and the second Information about the third pre-deployment data that the node device is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first requested deployment All data or part of the data; the second data request includes the third node device's request to the first node device to be deployed on the third node device's second request to deploy data and the third node device's request to the second node device Information about the third requested deployment data deployed on the third node device, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data part of data. If the second data request is received, the third requested deployment data is sent to the third node device in response to the second data request.
为实现上述目的,本发明提供一种基于DHT网络的数据部署方法,应用于数据部署系统,所述数据部署系统包括第一节点设备和与第一节点设备通信连接的第二节点设备,所述第一节点设备存储有预部署数据,所述数据部署方法包括:所述第一节点设备发送第一数据通知给所述第二节点设备,其中,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;所述第二节点设备判断是否需响应所述第一数据通知;若需响应所述第一数据通知,则第二节点设备向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据;第一节点设备检测是否接收到所述第一数据请求;若接收到所述第一数据请求,则响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备。To achieve the above objective, the present invention provides a data deployment method based on a DHT network, which is applied to a data deployment system. The data deployment system includes a first node device and a second node device communicatively connected with the first node device. The first node device stores pre-deployed data, and the data deployment method includes: the first node device sends a first data notification to the second node device, wherein the first data notification includes the first node The device is pre-deployed in the information of the first pre-deployment data of the second node device, the first pre-deployment data is all or part of the pre-deployment data; the second node device determines whether it needs to respond to the The first data notification; if it is necessary to respond to the first data notification, the second node device sends a first data request to the first node device, and the first data request includes the second node device to the first The node device requests information about the first requested deployment data that is deployed on the second node device, where the first requested deployment data is all or part of the first pre-deployed data; the first node device detects whether it has received The first data request; if the first data request is received, the first request deployment data is sent to the second node device in response to the first data request.
优选地,所述数据部署系统还包括第三节点设备,所述第三节点设备与所述第一节点设备和所述第二节点设备通信连接,在响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备之后,所述数据部署方法还包括:所述第一节点设备是否接收到所述第二节点设备的数据部署反馈;若接收到所述第二节点设备的部署反馈,则发送第二数据通知给所述第三节点设备,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;所述第三节点设备判断是否需响应所述第二数据通知;若需响应所述第二数据通知,则向所述第一节点设备和第二节点设备发出第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;所述第一节点设备和所述第二节点设备检测是否接收到第二数据请求;若所述第一节点设备和所述第二节点设备接收到所述第二数据请求,则所述第一节点设备响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备,所述第二节点设备响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。Preferably, the data deployment system further includes a third node device, the third node device is in communication connection with the first node device and the second node device, and in response to the first data request, the third node device After a request for deployment data is sent to the second node device, the data deployment method further includes: whether the first node device receives the data deployment feedback of the second node device; if the second node device is received Device deployment feedback, a second data notification is sent to the third node device, where the second data notification includes information about the second pre-deployment data pre-deployed by the first node device on the third node device Information and information of the third pre-deployment data that the second node device is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is The first request to deploy all the data or part of the data; the third node device determines whether it needs to respond to the second data notification; if it needs to respond to the second data notification, then the first node device and the second node device The node device sends a second data request, and the second data request includes information that the third node device requests the first node device to be deployed on the third node device and the third node device requests the second node device to deploy data. Information about the third requested deployment data deployed on the third node device, where the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all of the third pre-deployed data Data or part of data; the first node device and the second node device detect whether a second data request is received; if the first node device and the second node device receive the second data request, Then, the first node device sends the second request deployment data to the third node device in response to the second data request, and the second node device sends the third request to the third node device in response to the second data request. The deployment data is sent to the third node device.
为实现上述目的,本发明提供一种节点设备,所述节点设备包括:存储器,所述存储器用于储存计算机可执行的数据部署方法程序;以及处理器,所述处理器调用所述数据部署方法程序时,执行前述数据部署方法。To achieve the above objective, the present invention provides a node device, the node device includes: a memory, the memory is used to store a computer executable data deployment method program; and a processor, the processor calls the data deployment method During the program, execute the aforementioned data deployment method.
为实现上述目的,本发明提供一种基于DHT网络的数据部署系统,所述数据部署系统包括:第一节点设备以及与第一节点设备通信连接的第二节点设备;其中,所述第一节点设备包括,存储器,所述存储器用于储存计算机可执行的数据部署方法程序;以及处理器,所述处理器调用所述数据部署方法程序时,执行前述的数据部署方法。To achieve the above objective, the present invention provides a data deployment system based on a DHT network. The data deployment system includes: a first node device and a second node device communicatively connected to the first node device; wherein, the first node The device includes a memory for storing a computer-executable data deployment method program; and a processor that executes the aforementioned data deployment method when the processor invokes the data deployment method program.
为实现上述目的,本发明提供一种存储介质,所述存储介质上存储有数据部署方法程序,所述数据部署方法程序可被一个或者多个处理器执行,以实现前述的数据部署方法。In order to achieve the foregoing objective, the present invention provides a storage medium on which a data deployment method program is stored, and the data deployment method program can be executed by one or more processors to implement the aforementioned data deployment method.
有益效果Beneficial effect
与现有设计相比,本发明所提供一种基于DHT网络的数据部署方法、节点设备、数据部署系统以及存储介质其中,数据部署系统的第一节点设备储存有预部署数据,通过第一节点设备发送数据通知给与第一节点设备通信连接的第二节点设备,第二节点设备可响应第一节点设备发出的数据通知,向第一节点设备拉取第二节点设备所需数据,其中,第二节点设备至少为一个,第二节点设备中的数据通过第一节点设备统一部署分配,从而可以高效利用第二节点设备的带宽,避免了第二节点设备之间数据的无序部署引起数据风暴。Compared with the existing design, the present invention provides a data deployment method, node device, data deployment system and storage medium based on DHT network. Among them, the first node device of the data deployment system stores pre-deployed data through the first node The device sends a data notification to a second node device that is in communication with the first node device, and the second node device can respond to the data notification sent by the first node device to pull the data required by the second node device from the first node device, where: There is at least one second node device, and the data in the second node device is uniformly deployed and distributed by the first node device, so that the bandwidth of the second node device can be efficiently used, and the disordered deployment of data between the second node devices can avoid data storm.
附图说明Description of the drawings
图1为本发明第一实施例所提供的一种基于DHT网络的数据部署方法的步骤流程图;FIG. 1 is a flowchart of the steps of a data deployment method based on a DHT network provided by the first embodiment of the present invention;
图2A为本发明第二实施例所提供的一种基于DHT网络的数据部署系统的结构框架图;2A is a structural frame diagram of a data deployment system based on a DHT network provided by the second embodiment of the present invention;
图2B为本发明第二实施例所提供的一种基于DHT网络的数据部署系统的节点设备之间的数据部署的示意图;2B is a schematic diagram of data deployment between node devices of a data deployment system based on a DHT network provided by the second embodiment of the present invention;
图3A为本发明第一实施例的一个变形实施例所提供的一种基于DHT网络的数据部署方法的步骤流程图;3A is a flowchart of steps of a method for data deployment based on a DHT network provided by a modified embodiment of the first embodiment of the present invention;
图3B为本发明第一实施例的另一个变形实施例所提供的一种基于DHT网络的数据部署方法的步骤流程图;3B is a flowchart of steps of a method for data deployment based on a DHT network provided by another modified embodiment of the first embodiment of the present invention;
图4为本发明第三实施例所提供的一种基于DHT网络的数据部署方法的步骤流程图;4 is a flow chart of the steps of a method for data deployment based on a DHT network provided by the third embodiment of the present invention;
图5A为图4中步骤S22的一个具体实施方式步骤流程图;FIG. 5A is a step flow chart of a specific implementation manner of step S22 in FIG. 4;
图5B为图4中步骤S22的另一个具体实施方式步骤流程图;FIG. 5B is a flowchart of another specific implementation manner of step S22 in FIG. 4;
图6为本发明第四实施例所提供的一种基于DHT网络的数据部署方法的步骤流程图;6 is a flowchart of steps of a data deployment method based on a DHT network provided by the fourth embodiment of the present invention;
图7为本发明五实施例所提供的一种节点设备的结构框图。FIG. 7 is a structural block diagram of a node device provided by five embodiments of the present invention.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the invention
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, without having to use To describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than the content illustrated or described herein. In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to the clearly listed Those steps or units may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
需要说明的是,在本发明中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。It should be noted that the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Therefore, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on what can be achieved by a person of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist. , Is not within the protection scope of the present invention.
本发明提供一种基于DHT网络的数据部署方法、节点设备、数据部署系统以及存储介质,其中数据部署系统的第一节点设备储存有预部署数据,通过第一节点设备发送数据通知给与第一节点设备通信连接的第二节点设备,第二节点设备可响应第一节点设备发出的数据通知,向第一节点设备拉取第二节点设备所需数据,其中,第二节点设备至少为一个,第二节点设备中的数据通过第一节点设备统一部署分配,从而可以高效利用第二节点设备的带宽,避免了第二节点设备之间数据的无序部署引起数据风暴。The present invention provides a data deployment method, node equipment, data deployment system and storage medium based on a DHT network, wherein a first node device of the data deployment system stores pre-deployed data, and a data notification is sent to the first node device through the first node device. The second node device to which the node device is communicatively connected, the second node device can respond to the data notification sent by the first node device to pull the data required by the second node device from the first node device, wherein there is at least one second node device, The data in the second node device is uniformly deployed and distributed by the first node device, so that the bandwidth of the second node device can be efficiently used, and the data storm caused by the disorderly deployment of data between the second node devices can be avoided.
进一步,第二节点设备数据部署成功后,第一节点设备可以通知第三节点设备从第一节点设备和第二节点设备有序拉取数据,从而可以加快数据拉取及部署的速度。Further, after the data of the second node device is successfully deployed, the first node device may notify the third node device to pull data from the first node device and the second node device in an orderly manner, thereby speeding up the speed of data pulling and deployment.
请参阅图1以及图2A,本发明提供的一种基于DHT网络的数据部署方法,应用于基于DHT网络的数据部署系统100的第一节点设备10,该基于DHT网络的数据部署系统100包括第一节点设备10,与第一节点设备10通信连接的第二节点设备20,其中第一节点设备10存储有预部署数据,且第一节点设备10可以是一个或多个,第二节点设备20也可以是一个或多个,在此不做限定。1 and 2A, the present invention provides a DHT network-based data deployment method, which is applied to the first node device 10 of the DHT network-based data deployment system 100. The DHT network-based data deployment system 100 includes a first node device 10 A node device 10, a second node device 20 communicatively connected with the first node device 10, wherein the first node device 10 stores pre-deployed data, and the first node device 10 may be one or more, and the second node device 20 It can also be one or more, which is not limited here.
请参阅图1,该数据部署方法包括步骤S11-S14。Please refer to Figure 1. The data deployment method includes steps S11-S14.
步骤S11:发送第一数据通知给所述第二节点设备,其中,第一节点设备和第二节点设备通信连接,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据。Step S11: Send a first data notification to the second node device, where the first node device and the second node device are in communication connection, and the first data notification includes that the first node device is pre-deployed in the second node device. Information about the first pre-deployment data of the node device, where the first pre-deployment data is all or part of the pre-deployment data.
具体地,预部署数据为用户通过手机或个人电脑等终端设备上传至第一节点设备10的指定存储位置,也可以是所述第一节点设备从数据服务器预先拉取并存储于指定存储位置的数据。该预部署数据可以是数据片或完整数据。第一节点设备10接收到预部署数据时,生成或更新预部署数据任务列表,并按预部署数据任务列表进行预部署数据的部署。Specifically, the pre-deployed data is uploaded to the designated storage location of the first node device 10 by the user through a terminal device such as a mobile phone or a personal computer, or it may be pre-pulled by the first node device from the data server and stored in the designated storage location. data. The pre-deployed data can be data pieces or complete data. When the first node device 10 receives the pre-deployment data, it generates or updates the pre-deployment data task list, and deploys the pre-deployment data according to the pre-deployment data task list.
如图2B所示,第一节点设备10存储有预部署数据A、B、C、D。As shown in FIG. 2B, the first node device 10 stores pre-deployed data A, B, C, and D.
在进行预部署数据的部署时,第一节点设备10发送第一数据通知给第二节点设备20。其中,第一节点设备10和第二节点设备20通过DHT网络通信连接,该第一数据通知包括第一节点设备10预部署于第二节点设备20的第一预部署数据的信息,第一预部署数据为预部署数据的全部数据或部分数据。When deploying pre-deployed data, the first node device 10 sends a first data notification to the second node device 20. Wherein, the first node device 10 and the second node device 20 are communicatively connected via a DHT network, and the first data notification includes information about the first pre-deployment data that the first node device 10 is pre-deployed to the second node device 20, and the first pre-deployment data The deployment data is all or part of the pre-deployment data.
如图2B所示,第一节点设备10存储有预部署数据A、B、C、D。As shown in FIG. 2B, the first node device 10 stores pre-deployed data A, B, C, and D.
在进行预部署数据的部署时,第一节点设备10向第二节点设备20发送第一数据通知,以告知第二节点20第一节点设备10预向第二节点设备20发送部署数据A、B、C、D。During the deployment of pre-deployment data, the first node device 10 sends a first data notification to the second node device 20 to inform the second node 20 that the first node device 10 pre-sends deployment data A, B to the second node device 20 , C, D.
步骤S12:检测是否接收到第一数据请求,所述第一数据请求为所述第二节点设备响应所述第一数据通知发送给所述第一节点设备,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据。Step S12: Detect whether a first data request is received. The first data request is sent by the second node device to the first node device in response to the first data notification, and the first data request includes the The second node device requests the first node device for information about the first requested deployment data deployed on the second node device, where the first requested deployment data is all or part of the first pre-deployed data.
第一节点设备10检测是否接收到第一数据请求,该第一数据请求为第二节点设备20响应第一数据通知发送给第一节点设备,该第一数据请求中,包括第二节点设备20向第一节点设备10请求部署于第二节点设备20的第一请求部署数据的信息以及第一请求部署数据的大小,该第一请求部署数据可以是第一预部署数据的全部数据或部分数据。The first node device 10 detects whether a first data request is received. The first data request is sent to the first node device by the second node device 20 in response to the first data notification, and the first data request includes the second node device 20 A request is made to the first node device 10 for the information of the first requested deployment data deployed on the second node device 20 and the size of the first requested deployment data. The first requested deployment data may be all or part of the first pre-deployed data. .
步骤S13:若接收到所述第一数据请求,则响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备。Step S13: If the first data request is received, send the first requested deployment data to the second node device in response to the first data request.
若第一节点设备10接收到第二节点设备10响应第一数据信息的第一数据请求,则第一节点设备10响应第一数据请求,将第一请求部署数据发送给第二节点设备20,已完成预部署数据在第二节点设备20的部署。If the first node device 10 receives the first data request of the second node device 10 in response to the first data information, the first node device 10 responds to the first data request and sends the first requested deployment data to the second node device 20, The deployment of the pre-deployment data on the second node device 20 has been completed.
如图2B所示,第二节点设备20响应第一数据通知,向第一节点设备10发出第一数据请求,若该第二节点设备20中已经存储有预部署数据A、B。则发出的第一数据请求中,请求第一节点设备10向第二节点设备20发送预部署数据C、D,以完成预部署数据A、B、C、D在第二节点设备20的部署。As shown in FIG. 2B, the second node device 20 responds to the first data notification and sends a first data request to the first node device 10, if the second node device 20 has pre-deployed data A and B already stored. In the first data request issued, the first node device 10 is requested to send the pre-deployment data C and D to the second node device 20 to complete the deployment of the pre-deployment data A, B, C, and D on the second node device 20.
若该第二节点设备20中已经存储有预部署数据A、B、C。则发出的第一数据请求中,请求第一节点设备10向第二节点设备20发送预部署数据D,以完成预部署数据A、B、C、D在第二节点设备20的部署。If the second node device 20 has pre-deployed data A, B, and C already stored. In the first data request issued, the first node device 10 is requested to send the pre-deployment data D to the second node device 20 to complete the deployment of the pre-deployment data A, B, C, and D on the second node device 20.
请参阅图3A,在部分实施例中,在步骤S11之前,该数据部署方法还包括步骤S10。Referring to FIG. 3A, in some embodiments, before step S11, the data deployment method further includes step S10.
步骤S10:获取第二节点设备的节点信息,其中,所述节点信息包括地址信息。Step S10: Obtain node information of the second node device, where the node information includes address information.
具体地,DHT网络中,第二节点设备20与第一节点设备10建立通信连接时,第一节点设备10更新路由信息表,路由信息表中记录了该DHT网络中各节点设备的对应的节点信息,该节点信息至少包括各节点设备对应的地址信息或IP地址,第一节点设备10通过节点信息可以准确找到在该DHT网络中的各个节点设备。该各个节点设备可以是一个或多个第二节点设备20或第二节点设备20之外的其他节点设备。Specifically, in the DHT network, when the second node device 20 establishes a communication connection with the first node device 10, the first node device 10 updates the routing information table, and the routing information table records the corresponding node of each node device in the DHT network Information, the node information includes at least address information or IP addresses corresponding to each node device, and the first node device 10 can accurately find each node device in the DHT network through the node information. The respective node devices may be one or more second node devices 20 or other node devices other than the second node devices 20.
如图2B所示,第一节点设备10获取处于DHT网络中的至少一个第二节点设备20的节点信息,以向该第二节点设备20发送第一数据通知,告知第二节点20第一节点设备10预向第二节点设备20发送部署数据A、B、C、D。As shown in FIG. 2B, the first node device 10 obtains node information of at least one second node device 20 in the DHT network to send a first data notification to the second node device 20 to inform the second node 20 that the first node The device 10 sends deployment data A, B, C, and D to the second node device 20 in advance.
请参阅图3B,在部分实施例中,在步骤S13之后,该数据部署方法还包括步骤S14-S17。Referring to FIG. 3B, in some embodiments, after step S13, the data deployment method further includes steps S14-S17.
其中,步骤S14:检测是否接收到第二节点设备的数据部署反馈。Wherein, step S14: detecting whether the data deployment feedback of the second node device is received.
第一节点设备10检测是否接收到第二节点设备20的数据部署反馈,该数据部署反馈为第二节点设备20完成第一请求数据储存后,向第一节点设备10发送,第一节点设备10接收到第二节点设备20的数据部署反馈后,可获知第二节点设备20内所存储的数据信息,并记录第二节点设备20所存储的数据信息。The first node device 10 detects whether the data deployment feedback of the second node device 20 is received. The data deployment feedback is sent to the first node device 10 after the second node device 20 completes the storage of the first request data, and the first node device 10 After receiving the data deployment feedback of the second node device 20, the data information stored in the second node device 20 can be learned, and the data information stored in the second node device 20 can be recorded.
步骤S15:若接收到第二节点设备的数据部署反馈,则发送第二数据通知给所述第三节点设备,以使第三节点设备响应所述第二数据通知,向所述第一节点设备和所述第二节点设备发出第二数据请求,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据。Step S15: If the data deployment feedback of the second node device is received, a second data notification is sent to the third node device, so that the third node device responds to the second data notification to the first node device And the second node device to issue a second data request, where the second data notification includes information about the second pre-deployment data pre-deployed on the third node device by the first node device and the second node device Information about the third pre-deployment data that is pre-deployed on the third node device, the second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is the first request for deployment data All or part of the data.
具体地,若第一节点设备10接收到第二节点设备20的数据部署反馈,则发送第二数据通知给第三节点设备30,该第三节点设备30与第一节点设备10和第二节点设备20通信连接,以使第三节点设备30响应第二数据通知,向第一节点设备10和所述第二节点设备20发出第二数据请求。Specifically, if the first node device 10 receives the data deployment feedback of the second node device 20, it sends a second data notification to the third node device 30, and the third node device 30 interacts with the first node device 10 and the second node device 30. The device 20 is in communication connection, so that the third node device 30 responds to the second data notification and sends a second data request to the first node device 10 and the second node device 20.
其中,第二数据通知包括第一节点设备10预部署于第三节点设备30的第二预部署数据的信息以及第二节点设备20预部署于第三节点设备30的第三预部署数据的信息、第二请求部署数据的大小以及第三请求部署数据的大小,第二预部署数据为预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据。The second data notification includes information about the second pre-deployment data that the first node device 10 is pre-deployed on the third node device 30 and information about the third pre-deployment data that the second node device 20 is pre-deployed on the third node device 30. , The size of the second requested deployment data and the size of the third requested deployment data, the second pre-deployed data is all or part of the pre-deployed data, and the third pre-deployed data is all or part of the first requested deployment data .
该第三节点设备30可以是一个或多个,在此不做限定。The third node device 30 may be one or more, which is not limited here.
步骤S16:检测是否接收到第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据。Step S16: Detect whether a second data request is received, and the second data request includes information that the third node device requests the first node device to deploy the second request to deploy data on the third node device, and the third node device sends the second data request to the first node device. The second-node device requests information about the third-requested deployment data to be deployed on the third-node device, where the second-requested deployment data includes all or part of the second pre-deployment data, and the third requested deployment data is the third pre-deployment data. All or part of the deployment data.
第一节点设备10检测是否接收到第二数据请求,该第二数据请求包括第三节点设备30向第一节点设备10请求部署于第三节点设备30的第二请求部署数据的信息以及第三节点设备30向第二节点设备20请求部署于第三节点设备30的第三请求部署数据的信息,其中,第二请求部署数据包括第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据。The first node device 10 detects whether a second data request is received. The second data request includes information about the second request deployment data that the third node device 30 requests to be deployed on the third node device 30 and the third node device 30. The node device 30 requests the second node device 20 for information about the third requested deployment data deployed on the third node device 30, where the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment The data is all or part of the third pre-deployed data.
如图2B所示,第三节点设备30响应第二数据通知,向第一节点设备10和第二电子设备20发出第二数据请求。As shown in FIG. 2B, the third node device 30 sends a second data request to the first node device 10 and the second electronic device 20 in response to the second data notification.
若该第三节点设备20中已经存储有预部署数据A。则发出的第二数据请求中,请求第一节点设备10和第二节点设备20向第三节点设备30和发送预部署数据B、C、D,以完成预部署数据A、B、C、D在第三节点设备20的部署。If the third node device 20 has pre-deployed data A already stored. In the second data request issued, the first node device 10 and the second node device 20 are requested to send the pre-deployed data B, C, and D to the third node device 30 to complete the pre-deployed data A, B, C, and D. Deployment of the device 20 at the third node.
若该第三节点设备20中已经存储有预部署数据A、B。则发出的第二数据请求中,请求第一节点设备10和第二节点设备20向第三节点设备30和发送预部署数据C、D,以完成预部署数据A、B、C、D在第三节点设备20的部署。If the third node device 20 has pre-deployed data A and B already stored. In the second data request issued, the first node device 10 and the second node device 20 are requested to send the pre-deployment data C and D to the third node device 30 to complete the pre-deployment data A, B, C, and D in the first Deployment of the three-node device 20.
步骤S17:若接收到所述第二数据请求,响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备。Step S17: If the second data request is received, send the second requested deployment data to the third node device in response to the second data request.
若第一节点设备10接收到第二数据请求,则响应第二数据请求将第二请求部署数据发送给第三节点设备30,以完成预部署数据在第三节点设备30的部署。If the first node device 10 receives the second data request, it responds to the second data request and sends the second requested deployment data to the third node device 30 to complete the deployment of the pre-deployment data in the third node device 30.
请参阅图4,图4为本发明提供的一种基于DHT的数据部署方法,应用于数据部署系统,数据部署系统包括第一节点设备和与第一节点设备通信连接的第二节点设备,所述数据部署方法包括步骤S21-S25。Please refer to Figure 4, Figure 4 is a DHT-based data deployment method provided by the present invention, applied to a data deployment system, the data deployment system includes a first node device and a second node device communicatively connected with the first node device, so The data deployment method includes steps S21-S25.
步骤S21:发送第一数据通知给所述第二节点设备,其中,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据。Step S21: Send a first data notification to the second node device, where the first data notification includes information about the first pre-deployed data that the first node device is pre-deployed on the second node device, and The first pre-deployment data is all or part of the pre-deployment data.
第一节点设备10存储有预部署数据,第一节点设备10预将该预部署数据进行部署时,发送第一数据通知给第二节点设备20,其中,第一数据通知包括第一节点设备10预部署于第二节点设备20的第一预部署数据的信息,第一预部署数据为预部署数据的全部数据或部分数据。The first node device 10 stores pre-deployment data. When the first node device 10 pre-deploys the pre-deployment data, it sends a first data notification to the second node device 20, where the first data notification includes the first node device 10 Information about the first pre-deployment data pre-deployed in the second node device 20, where the first pre-deployment data is all or part of the pre-deployment data.
步骤S22:所述第二节点设备判断是否需响应所述第一数据通知。Step S22: The second node device determines whether it needs to respond to the first data notification.
请参阅图5A,在部分实施例中,步骤S22具体包括步骤S221a-S223a。Referring to FIG. 5A, in some embodiments, step S22 specifically includes steps S221a-S223a.
步骤S221a:所述第二节点设备判断所述第二节点设备是否存储有第一预部署数据。Step S221a: The second node device judges whether the second node device stores first pre-deployment data.
第二节点设备20通过对比第一数据通知中第一节点设备10预部署于所述第二节点设备的第一预部署数据信息和第二节点设备20自身存储的数据信息,从而判断出第二节点设备是否存储有第一预部署数据。The second node device 20 compares the first pre-deployed data information of the first node device 10 pre-deployed to the second node device in the first data notification and the data information stored by the second node device 20 itself, thereby determining the second Whether the node device stores the first pre-deployment data.
步骤S222a:若所述第二节点设备未存储有第一预部署数据,则判断所述第二节点设备的存储空间是否大于设定阈值。Step S222a: If the second node device does not store the first pre-deployment data, determine whether the storage space of the second node device is greater than a set threshold.
若第二节点设备20判断自身已经存储有第一预部署数据,则向第一节点设备10反馈该第二节点设备20已经储存的反馈,并结束该数据部署方法流程。If the second node device 20 determines that it has stored the first pre-deployment data, it will feed back the stored feedback of the second node device 20 to the first node device 10 and end the data deployment method flow.
若判断自身未存储有第一预部署数据,则判断第二节点设备20的存储空间是否大于设定阈值。If it is determined that the first pre-deployment data is not stored by itself, it is determined whether the storage space of the second node device 20 is greater than the set threshold.
步骤S223a:若所述第二节点设备的存储空间大于设置阈值,则判断需响应所述第一数据通知。Step S223a: If the storage space of the second node device is greater than the set threshold, it is determined that the first data notification needs to be responded to.
请参阅图5B,在部分实施例中,步骤S22具体包括步骤S221b-S223b。Referring to Fig. 5B, in some embodiments, step S22 specifically includes steps S221b-S223b.
步骤S221b:所述第二节点设备判断所述第二节点设备的存储空间是否大于设定阈值。Step S221b: The second node device determines whether the storage space of the second node device is greater than a set threshold.
步骤S222b:若所述第二节点设备的存储空间大于设定阈值,则判断所述第二节点设备是否存储有第一预部署数据。Step S222b: If the storage space of the second node device is greater than the set threshold, determine whether the second node device stores the first pre-deployment data.
若第二节点设备20判断自身存储空间小于或等于设定阈值,则向第一节点设备10反馈该第二节点设备20储存空间不足,并结束该数据部署方法流程。If the second node device 20 determines that its storage space is less than or equal to the set threshold, it will feed back to the first node device 10 that the storage space of the second node device 20 is insufficient, and end the data deployment method flow.
若判判断第二节点设备20的存储空间大于设定阈值,则判断第二节点设备20是否存储有第一预部署数据。If it is determined that the storage space of the second node device 20 is greater than the set threshold, then it is determined whether the second node device 20 stores the first pre-deployment data.
步骤S223b:若所述第二节点设备未存储有第一预部署数据,则判断需响应所述第一数据通知。Step S223b: If the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
步骤S23:若需响应所述第一数据通知,则第二节点设备向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据。Step S23: If it is necessary to respond to the first data notification, the second node device sends a first data request to the first node device, and the first data request includes the second node device requesting the first node device Information about the first requested deployment data deployed on the second node device, wherein the first requested deployment data is all or part of the first pre-deployed data.
步骤S24:第一节点设备检测是否接收到所述第一数据请求。Step S24: The first node device detects whether the first data request is received.
步骤S25:若接收到所述第一数据请求,则响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备。Step S25: If the first data request is received, send the first requested deployment data to the second node device in response to the first data request.
在部分实施例中,步骤S21之前,所述数据部署方法还包括:。In some embodiments, before step S21, the data deployment method further includes:
第一节点设备获取第二节点设备的节点信息,其中,所述节点信息包括地址信息。The first node device obtains node information of the second node device, where the node information includes address information.
该步骤与图3B中的步骤S10相同,在此不做赘述。This step is the same as step S10 in FIG. 3B, and will not be repeated here.
部分是实施例中,数据部署系统100还包括第三节点设备30,第三节点设备30与第一节点设备10和第二节点设备20通信连接如图2A所示。In some embodiments, the data deployment system 100 further includes a third node device 30, and the third node device 30 is in communication connection with the first node device 10 and the second node device 20 as shown in FIG. 2A.
在步骤S25之后,所述数据部署方法还包括:After step S25, the data deployment method further includes:
所述第一节点设备是否接收到所述第二节点设备的数据部署反馈;Whether the first node device receives the data deployment feedback of the second node device;
若接收到所述第二节点设备的部署反馈,则发送第二数据通知给所述第三节点设备,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;If the deployment feedback of the second node device is received, a second data notification is sent to the third node device, where the second data notification includes that the first node device is pre-deployed to the third node Information of the second pre-deployment data of the device and information of the third pre-deployment data of the second node device pre-deployed on the third node device, where the second pre-deployment data is all or part of the pre-deployed data Data, the third pre-deployed data is all or part of the data of the first requested deployment data;
所述第三节点设备判断是否需响应所述第二数据通知;Determining whether the third node device needs to respond to the second data notification;
若需响应所述第二数据通知,则向所述第一节点设备和第二节点设备发出第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;If it is necessary to respond to the second data notification, a second data request is sent to the first node device and the second node device, and the second data request includes the third node device requesting the first node device to deploy on the third node device. Information about the second deployment data requested by the node device and information about the third deployment data requested by the third node device to be deployed on the third node device from the second node device, wherein the second deployment data requested includes the second pre-deployment All data or part of the data, the third requested deployment data is all or part of the third pre-deployed data;
所述第一节点设备和所述第二节点设备检测是否接收到第二数据请求;The first node device and the second node device detect whether a second data request is received;
若所述第一节点设备和所述第二节点设备接收到所述第二数据请求,则所述第一节点设备响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备,所述第二节点设备响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。If the first node device and the second node device receive the second data request, the first node device sends the second requested deployment data to the second data request in response to the second data request. A three-node device, where the second node device sends the third requested deployment data to the third node device in response to the second data request.
在部分实施例中,所述第三节点设备判断是否需响应所述第二数据通知包括:In some embodiments, determining whether the third node device needs to respond to the second data notification includes:
所述第三节点设备判断所述第三节点设备的存储空间是否大于设定阈值;Judging by the third node device whether the storage space of the third node device is greater than a set threshold;
若所述第三节点设备的存储空间大于设定阈值,则判断所述第三节点设备是否存储有第三预部署数据,所述第二预部署数据包括所述第三预部署数据;If the storage space of the third node device is greater than the set threshold, determining whether the third node device stores third pre-deployment data, and the second pre-deployment data includes the third pre-deployment data;
若所述第三节点设备未存储有第三预部署数据,则判断需响应所述第二数据通知。If the third node device does not store third pre-deployment data, it is determined that the second data notification needs to be responded to.
在部分实施例中,所述第三节点设备判断是否需响应所述第二数据通知包括:In some embodiments, determining whether the third node device needs to respond to the second data notification includes:
所述第三节点设备判断所述第三节点设备是否存储有第三预部署数据,所述第二预部署数据包括所述第三预部署数据;Determining, by the third node device, whether the third node device stores third pre-deployment data, and the second pre-deployment data includes the third pre-deployment data;
若所述第二节点设备未存储所述第三预部署数据,则判断所述第三节点设备的存储空间大于设定阈值;If the second node device does not store the third pre-deployment data, determining that the storage space of the third node device is greater than a set threshold;
若所述第三节点设备的存储空间大于设定阈值,则判断需响应所述第二数据通知。If the storage space of the third node device is greater than the set threshold, it is determined that a response to the second data notification is required.
本发明还提供的一种基于DHT网络的数据部署方法,应用于数据部署系统的第二节点设备20,该第二节点设备20与第一节点设备10通信连接。The present invention also provides a data deployment method based on the DHT network, which is applied to the second node device 20 of the data deployment system, and the second node device 20 is in communication connection with the first node device 10.
请参阅图6,该数据部署方法包括步骤S40-S42。Please refer to Fig. 6, the data deployment method includes steps S40-S42.
步骤S40:检测是否接收到第一数据通知,所述第一数据通知为第一节点向所述第二节点设备发送,其中所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据。Step S40: Detect whether a first data notification is received, the first data notification is sent by the first node to the second node device, and the first data notification includes that the first node device is pre-deployed in the Information about the first pre-deployment data of the second node device, where the first pre-deployment data is all or part of the pre-deployment data.
步骤S41:判断是否需响应所述第一数据通知。Step S41: Determine whether to respond to the first data notification.
在部分实施例中,所述判断是否需响应所述第一数据通知,具体包括:In some embodiments, the determining whether to respond to the first data notification specifically includes:
所述第二节点设备判断所述第二节点设备是否存储有第一预部署数据;Determining, by the second node device, whether the second node device stores first pre-deployment data;
若所述第二节点设备未存储有第一预部署数据,则判断所述第二节点设备的存储空间是否大于设定阈值;If the second node device does not store the first pre-deployment data, determining whether the storage space of the second node device is greater than a set threshold;
若所述第二节点设备的存储空间大于设置阈值,则判断需响应所述第一数据通知。If the storage space of the second node device is greater than the set threshold, it is determined that a response to the first data notification is required.
示例性地,第二节点设备20通过对比第一数据通知中第一节点设备10预部署于所述第二节点设备的第一预部署数据信息和第二节点设备20自身存储的数据信息,从而判断出第二节点设备20是否存储有第一预部署数据。Exemplarily, the second node device 20 compares the first pre-deployed data information of the first node device 10 pre-deployed to the second node device in the first data notification and the data information stored by the second node device 20 itself, thereby It is determined whether the second node device 20 stores the first pre-deployment data.
若第二节点设备20判断自身已经存储有第一预部署数据,则向第一节点设备10反馈该第二节点设备20已经储存的反馈,并结束该数据部署方法流程。If the second node device 20 determines that it has stored the first pre-deployment data, it will feed back the stored feedback of the second node device 20 to the first node device 10 and end the data deployment method flow.
若判断自身未存储有第一预部署数据,则判断第二节点设备20的存储空间是否大于设定阈值。If it is determined that the first pre-deployment data is not stored by itself, it is determined whether the storage space of the second node device 20 is greater than the set threshold.
若所述第二节点设备的存储空间大于设置阈值,则判断需响应所述第一数据通知。If the storage space of the second node device is greater than the set threshold, it is determined that a response to the first data notification is required.
在部分实施例中,所述判断是否需响应所述第一数据通知,具体包括:In some embodiments, the determining whether to respond to the first data notification specifically includes:
所述第二节点设备判断所述第二节点设备的存储空间是否大于设定阈值;Determining, by the second node device, whether the storage space of the second node device is greater than a set threshold;
若所述第二节点设备的存储空间大于设定阈值,则判断所述第二节点设备是否存储有第一预部署数据;If the storage space of the second node device is greater than the set threshold, determining whether the second node device stores the first pre-deployment data;
若所述第二节点设备未存储有第一预部署数据,则判断需响应所述第一数据通知。If the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
示例性地,若第二节点设备20判断自身存储空间小于或等于设定阈值,则向第一节点设备10反馈该第二节点设备20储存空间不足,并结束该数据部署方法流程。Exemplarily, if the second node device 20 determines that its own storage space is less than or equal to the set threshold, it will feed back the insufficient storage space of the second node device 20 to the first node device 10, and end the data deployment method flow.
若判判断第二节点设备20的存储空间大于设定阈值,则判断第二节点设备20是否存储有第一预部署数据;If it is determined that the storage space of the second node device 20 is greater than the set threshold, then it is determined whether the second node device 20 stores the first pre-deployed data;
若所述第二节点设备未存储有第一预部署数据,则判断需响应所述第一数据通知。If the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
步骤S42:若需响应所述第一数据通知,则向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,以使第一节点设备响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据。Step S42: If it is necessary to respond to the first data notification, send a first data request to the first node device, and the first data request includes the second node device requesting the first node device to deploy to the second node device. Information about the first requested deployment data of the node device, so that the first node device sends the first requested deployment data to the second node device in response to the first data request, where the first requested deployment data is all Describe all or part of the first pre-deployed data.
部分是实施例中,数据部署系统100还包括第三节点设备30,第三节点设备30与第一节点设备10和第二节点设备20通信连接如图2A所示。In some embodiments, the data deployment system 100 further includes a third node device 30, and the third node device 30 is in communication connection with the first node device 10 and the second node device 20 as shown in FIG. 2A.
在步骤S42之后,所述数据部署方法还包括:After step S42, the data deployment method further includes:
检测是否接收到第二数据请求,所述第二数据请求为所述第三节点设备响应第二数据通知向所述二节点设备和第一节点设备发送;其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;It is detected whether a second data request is received, and the second data request is sent by the third node device to the second node device and the first node device in response to the second data notification; wherein, the second data notification includes all The information of the second pre-deployment data that the first node device is pre-deployed on the third node device and the information of the third pre-deployment data that the second node device is pre-deployed on the third node device, the second pre-deployment data The deployment data is all or part of the pre-deployed data, and the third pre-deployment data is all or part of the data in the first request for deployment;
所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;The second data request includes information that the third node device requests the first node device to deploy the second request to deploy data on the third node device, and the third node device requests the second node device to deploy the first data deployed on the third node device. 3. Information about the requested deployment data, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data;
若接收到所述第二数据请求,则响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。If the second data request is received, the third requested deployment data is sent to the third node device in response to the second data request.
示例性地,第二节点设备20检测是否接收到第二数据请求,该第二数据请求为第三节点设备30响应第二数据通知向第二节点设备20和第一节点设备10发送。其中,第二数据通知为第一节点设备10接收到第二节点设备20完成第一请求数据部署的部署反馈后,获取处于该DHT网络中的第三节点设备30的节点信息,并向第三节点设备30发送。该第二数据通知包括第一节点设备10预部署于第三节点设备30的第二预部署数据的信息以及第二节点设备20预部署于第三节点设备30的第三预部署数据的信息,第二预部署数据为预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据。Exemplarily, the second node device 20 detects whether a second data request is received, and the second data request is sent by the third node device 30 to the second node device 20 and the first node device 10 in response to the second data notification. The second data notification is that after the first node device 10 receives the deployment feedback that the second node device 20 completes the first requested data deployment, it obtains the node information of the third node device 30 in the DHT network and sends it to the third node device. Node device 30 sends. The second data notification includes information about the second pre-deployment data pre-deployed by the first node device 10 on the third node device 30 and information about the third pre-deployment data pre-deployed by the second node device 20 on the third node device 30, The second pre-deployment data is all or part of the pre-deployment data, and the third pre-deployment data is all or part of the data of the first deployment data request.
第二数据请求包括第三节点设备30向第一节点设备10请求部署于第三节点设备30的第二请求部署数据的信息以及第三节点设备30向第二节点设备20请求部署于第三节点设备30的第三请求部署数据的信息,第二请求部署数据包括第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据。The second data request includes information that the third node device 30 requests the first node device 10 to be deployed on the third node device 30 and the third node device 30 requests the second node device 20 to be deployed on the third node. The third requested deployment data information of the device 30, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data.
若接收到所述第二数据请求,则响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。If the second data request is received, the third requested deployment data is sent to the third node device in response to the second data request.
请参阅图7,在部分实施例中,第一节点设备10包括存储器101、处理器101以及总线103。其中存储器101通过总线103与处理器102连接。Referring to FIG. 7, in some embodiments, the first node device 10 includes a memory 101, a processor 101 and a bus 103. The memory 101 is connected to the processor 102 through a bus 103.
存储器101至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器101在一些实施例中可以是终端设备10的内部存储单元,例如节点设备的硬盘。存储器101在另一些实施例中也可以是节点设备的外部存储设备,例如节点设备配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,存储器101还可以既包括节点设备的内部存储单元也包括外部存储设备。存储器101不仅可以用于存储安装于节点设备的应用软件及各类数据,例如计算机可读程序的代码等。The memory 101 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 101 may be an internal storage unit of the terminal device 10 in some embodiments, such as a hard disk of the node device. In other embodiments, the memory 101 may also be an external storage device of the node device, such as a plug-in hard disk equipped with the node device, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, Flash Card, etc. Further, the memory 101 may also include both an internal storage unit of the node device and an external storage device. The memory 101 can be used not only to store application software and various data installed in the node device, such as computer-readable program codes.
如,存储器101存储有数据部署方法对应的计算机可执行程序,以在处理器102调用该计算机可执行的数据部署方法程序时,可以使第一节点设备10执行该数据部署方法。For example, the memory 101 stores a computer executable program corresponding to the data deployment method, so that when the processor 102 invokes the computer-executable data deployment method program, the first node device 10 can execute the data deployment method.
处理器102在一些实施例中可以是一中央处理器(Central Processing Unit, CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器101中存储的程序代码或处理数据,例如执行计算机可读程序等。The processor 102 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips are used to run program codes or process data stored in the memory 101, such as executing computer-readable programs.
总线103可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。The bus 103 may be a peripheral component interconnection standard (peripheral Component interconnect (PCI for short) bus or extended industry standard architecture (EISA for short) bus, etc. The bus can be divided into address bus, data bus, control bus, etc.
可以理解第二节点设备20和第三节点设备30也可以具有第一节点设备10相同的结构,即具有存储器和处理器。其中存储器存储有数据部署方法对应的计算机可执行程序,以在处理器调用该计算机可执行的数据部署方法程序时,可以使节点设备执行该数据部署方法。It can be understood that the second node device 20 and the third node device 30 may also have the same structure as the first node device 10, that is, have a memory and a processor. The memory stores a computer executable program corresponding to the data deployment method, so that when the processor invokes the computer executable data deployment method program, the node device can execute the data deployment method.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and do not limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of the present invention.
 To

Claims (10)

  1. 一种基于DHT网络的数据部署方法,应用于第一节点设备,所述第一节点设备存储有预部署数据,其特征在于,所述数据部署方法包括:A data deployment method based on a DHT network is applied to a first node device, and the first node device stores pre-deployed data, wherein the data deployment method includes:
    发送第一数据通知给所述第二节点设备,其中,第一节点设备和第二节点设备通信连接,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;Send a first data notification to the second node device, where the first node device and the second node device are in communication connection, and the first data notification includes the pre-deployment of the first node device on the second node device Information about the first pre-deployment data, where the first pre-deployment data is all or part of the pre-deployment data;
    检测是否接收到第一数据请求,所述第一数据请求为所述第二节点设备响应所述第一数据通知发送给所述第一节点设备,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据;Detect whether a first data request is received, the first data request is sent to the first node device by the second node device in response to the first data notification, and the first data request includes the second node The device requests the first node device for information on the first requested deployment data deployed on the second node device, where the first requested deployment data is all or part of the first pre-deployed data;
    若接收到所述第一数据请求,则响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备。If the first data request is received, the first request deployment data is sent to the second node device in response to the first data request.
  2. 如权利要求1所述的数据部署方法,其特征在于:在所述发送第一数据通知给所述第二节点设备之前,所述数据部署方法还包括:获取第二节点设备的节点信息,其中所述节点信息包括地址信息。The data deployment method according to claim 1, wherein before the sending the first data notification to the second node device, the data deployment method further comprises: obtaining node information of the second node device, wherein The node information includes address information.
  3. 如权利要求1或2所述的数据部署方法,其特征在于:在响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备之后,所述数据部署方法还包括:The data deployment method according to claim 1 or 2, wherein after sending the first requested deployment data to the second node device in response to the first data request, the data deployment method further comprises :
    检测是否接收到所述第二节点设备的数据部署反馈;Detecting whether the data deployment feedback of the second node device is received;
    若接收到所述第二节点设备的部署反馈,则发送第二数据通知给所述第三节点设备,以使第三节点设备响应所述第二数据通知,向所述第一节点设备和所述第二节点设备发出第二数据请求,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;If the deployment feedback of the second node device is received, a second data notification is sent to the third node device, so that the third node device responds to the second data notification and sends a notification to the first node device and all nodes. The second node device sends a second data request, where the second data notification includes information about the second pre-deployment data of the first node device pre-deployed on the third node device and the second node device pre-deployment Information about the third pre-deployed data on the third node device, the second pre-deployed data is all or part of the pre-deployed data, and the third pre-deployed data is all the data of the first requested deployment data Or part of the data;
    检测是否接收到第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;Detect whether a second data request is received, and the second data request includes information that the third node device requests the first node device to be deployed on the third node device, and the third node device sends the second node device to the second node device. Information about the third requested deployment data requested to be deployed on the third node device, where the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is the third pre-deployed data All or part of the data;
    若接收到所述第二数据请求,响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备。If the second data request is received, the second request deployment data is sent to the third node device in response to the second data request.
  4. 一种基于DHT网络的数据部署方法,应用于第二节点设备,所述第二节点设备与第一节点设备通信连接,其特征在于,所述数据部署方法包括:A data deployment method based on a DHT network is applied to a second node device, and the second node device is in a communication connection with a first node device, wherein the data deployment method includes:
    检测是否接收到第一数据通知,所述第一数据通知为所述第一节点设备向所述第二节点设备发送,其中所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;It is detected whether a first data notification is received, the first data notification is sent by the first node device to the second node device, and the first data notification includes that the first node device is pre-deployed in the Information about the first pre-deployment data of the second node device, where the first pre-deployment data is all or part of the pre-deployment data;
    判断是否需响应所述第一数据通知;Determine whether to respond to the first data notification;
    若需响应所述第一数据通知,则向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,以使第一节点设备响应所述第一数据请求将第一请求部署数据发送给所述第二节点设备,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据。If it needs to respond to the first data notification, send a first data request to the first node device, and the first data request includes the second node device requesting the first node device to deploy on the second node device. First request deployment data information, so that the first node device sends the first request deployment data to the second node device in response to the first data request, wherein the first request deployment data is the first All or part of the pre-deployed data.
  5. 如权利要求4所述的数据部署方法,其特征在于:判断是否需响应所述第一数据通知包括:The data deployment method according to claim 4, wherein: determining whether to respond to the first data notification comprises:
    判断所述第二节点设备是否存储有第一预部署数据;Determining whether the second node device stores first pre-deployment data;
    若所述第二节点设备未存储有第一预部署数据,则判断所述第二节点设备的存储空间是否大于设定阈值;If the second node device does not store the first pre-deployment data, determining whether the storage space of the second node device is greater than a set threshold;
    若所述第二节点设备的存储空间大于设置阈值,则判断需响应所述第一数据通知。If the storage space of the second node device is greater than the set threshold, it is determined that a response to the first data notification is required.
  6. 如权利要求4所述的数据部署方法,其特征在于:判断是否需响应所述第一数据通知包括:The data deployment method according to claim 4, wherein: determining whether to respond to the first data notification comprises:
    判断所述第二节点设备的存储空间是否大于设定阈值;Judging whether the storage space of the second node device is greater than a set threshold;
    若所述第二节点设备的存储空间大于设定阈值,则判断所述第二节点设备是否存储有第一预部署数据;If the storage space of the second node device is greater than the set threshold, determining whether the second node device stores the first pre-deployment data;
    若所述第二节点设备未存储有第一预部署数据,则判断需响应所述第一数据通知。If the second node device does not store the first pre-deployment data, it is determined that a response to the first data notification is required.
  7. 如权利要求4所述的数据部署方法,所述第二节点设备与第三节点设备通信连接,其特征在于,所述数据部署方法还包括:The data deployment method according to claim 4, wherein the second node device is in communication connection with the third node device, wherein the data deployment method further comprises:
    检测是否接收到第二数据请求,所述第二数据请求为所述第三节点设备响应第二数据通知向所述二节点设备和第一节点设备发送;其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;It is detected whether a second data request is received, and the second data request is sent by the third node device to the second node device and the first node device in response to the second data notification; wherein, the second data notification includes all The information of the second pre-deployment data that the first node device is pre-deployed on the third node device and the information of the third pre-deployment data that the second node device is pre-deployed on the third node device, the second pre-deployment data The deployment data is all or part of the pre-deployed data, and the third pre-deployment data is all or part of the data in the first request for deployment;
    所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据。The second data request includes information that the third node device requests the first node device to deploy the second request to deploy data on the third node device, and the third node device requests the second node device to deploy the first data deployed on the third node device. Three requests for information about deployment data, the second requested deployment data includes all or part of the second pre-deployed data, and the third requested deployment data is all or part of the third pre-deployed data.
    若接收到所述第二数据请求,则响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。If the second data request is received, the third requested deployment data is sent to the third node device in response to the second data request.
  8. 一种基于DHT网络的数据部署方法,应用于数据部署系统,所述数据部署系统包括第一节点设备和与第一节点设备通信连接的第二节点设备,所述第一节点设备存储有预部署数据,其特征在于,所述数据部署方法包括:A data deployment method based on a DHT network is applied to a data deployment system. The data deployment system includes a first node device and a second node device communicatively connected with the first node device, and the first node device stores pre-deployment Data, characterized in that the data deployment method includes:
    所述第一节点设备发送第一数据通知给所述第二节点设备,其中,所述第一数据通知包括所述第一节点设备预部署于所述第二节点设备的第一预部署数据的信息,所述第一预部署数据为所述预部署数据的全部数据或部分数据;The first node device sends a first data notification to the second node device, where the first data notification includes information about the first pre-deployment data pre-deployed by the first node device on the second node device Information, the first pre-deployment data is all or part of the pre-deployment data;
    所述第二节点设备判断是否需响应所述第一数据通知;Determining whether the second node device needs to respond to the first data notification;
    若需响应所述第一数据通知,则第二节点设备向所述第一节点设备发出第一数据请求,所述第一数据请求包括所述第二节点设备向第一节点设备请求部署于第二节点设备的第一请求部署数据的信息,其中,所述第一请求部署数据为所述第一预部署数据的全部数据或部分数据;If it is necessary to respond to the first data notification, the second node device sends a first data request to the first node device, and the first data request includes the second node device requesting the first node device to deploy on the first node device. Information about the first deployment data request of the two-node device, where the first deployment data request is all or part of the first pre-deployment data;
    第一节点设备检测是否接收到所述第一数据请求;The first node device detects whether the first data request is received;
    若接收到所述第一数据请求,则响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备。If the first data request is received, sending the first requested deployment data to the second node device in response to the first data request.
  9. 如权利要求8所述的数据部署方法,其特征在于:所述数据部署系统还包括第三节点设备,所述第三节点设备与所述第一节点设备和所述第二节点设备通信连接,在响应所述第一数据请求将所述第一请求部署数据发送给所述第二节点设备之后,所述数据部署方法还包括:8. The data deployment method according to claim 8, wherein the data deployment system further comprises a third node device, and the third node device is in communication connection with the first node device and the second node device, After sending the first requested deployment data to the second node device in response to the first data request, the data deployment method further includes:
    所述第一节点设备是否接收到所述第二节点设备的数据部署反馈;Whether the first node device receives the data deployment feedback of the second node device;
    若接收到所述第二节点设备的部署反馈,则发送第二数据通知给所述第三节点设备,其中,所述第二数据通知包括所述第一节点设备预部署于所述第三节点设备的第二预部署数据的信息以及第二节点设备预部署于所述第三节点设备的第三预部署数据的信息,所述第二预部署数据为所述预部署数据的全部数据或部分数据,第三预部署数据为第一请求部署数据的全部数据或部分数据;If the deployment feedback of the second node device is received, a second data notification is sent to the third node device, where the second data notification includes that the first node device is pre-deployed to the third node Information of the second pre-deployment data of the device and information of the third pre-deployment data of the second node device pre-deployed on the third node device, where the second pre-deployment data is all or part of the pre-deployed data Data, the third pre-deployed data is all or part of the data of the first requested deployment data;
    所述第三节点设备判断是否需响应所述第二数据通知;Determining whether the third node device needs to respond to the second data notification;
    若需响应所述第二数据通知,则向所述第一节点设备和第二节点设备发出第二数据请求,所述第二数据请求包括第三节点设备向第一节点设备请求部署于第三节点设备的第二请求部署数据的信息以及第三节点设备向第二节点设备请求部署于第三节点设备的第三请求部署数据的信息,其中,第二请求部署数据包括所述第二预部署数据的全部数据或部分数据,第三请求部署数据为第三预部署数据的全部数据或部分数据;If it is necessary to respond to the second data notification, a second data request is sent to the first node device and the second node device, and the second data request includes the third node device requesting the first node device to deploy on the third node device. Information about the second deployment data requested by the node device and information about the third deployment data requested by the third node device to be deployed on the third node device from the second node device, wherein the second deployment data requested includes the second pre-deployment All data or part of the data, the third requested deployment data is all or part of the third pre-deployed data;
    所述第一节点设备和所述第二节点设备检测是否接收到第二数据请求;The first node device and the second node device detect whether a second data request is received;
    若所述第一节点设备和所述第二节点设备接收到所述第二数据请求,则所述第一节点设备响应所述第二数据请求将所述第二请求部署数据发送给所述第三节点设备,所述第二节点设备响应所述第二数据请求将所述第三请求部署数据发送给所述第三节点设备。If the first node device and the second node device receive the second data request, the first node device sends the second requested deployment data to the second data request in response to the second data request. A three-node device, where the second node device sends the third requested deployment data to the third node device in response to the second data request.
  10. 一种节点设备,其特征在于,所述节点设备包括:A node device, characterized in that the node device includes:
    存储器,所述存储器用于储存计算机可执行的数据部署方法程序;以及A memory for storing a computer-executable data deployment method program; and
    处理器,所述处理器调用所述数据部署方法程序时,执行如权利要求1-7任意一项所述的数据部署方法。The processor, when the processor invokes the data deployment method program, executes the data deployment method according to any one of claims 1-7.
    11. 一种基于DHT网络的数据部署系统,其特征在于,所述数据部署系统包括:11. A data deployment system based on a DHT network, characterized in that the data deployment system includes:
    第一节点设备以及与第一节点设备通信连接的第二节点设备;A first node device and a second node device communicatively connected with the first node device;
    其中,所述第一节点设备包括,存储器,所述存储器用于储存计算机可执行的数据部署方法程序;以及Wherein, the first node device includes a memory, and the memory is used to store a computer-executable data deployment method program; and
    处理器,所述处理器调用所述数据部署方法程序时,执行如权利要求1-7任意一项所述的数据部署方法。The processor, when the processor invokes the data deployment method program, executes the data deployment method according to any one of claims 1-7.
    12. 一种存储介质,其特征在于:所述存储介质上存储有数据部署方法程序,所述数据部署方法程序可被一个或者多个处理器执行,以实现如权利要求1-9中任一项所述的数据部署方法。12. A storage medium, characterized in that: a data deployment method program is stored on the storage medium, and the data deployment method program can be executed by one or more processors to implement any one of claims 1-9 The data deployment method described in the item.
PCT/CN2019/093045 2019-02-22 2019-06-26 Data deployment method based on dht network, node device, data deployment system and storage medium WO2020168666A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910133954.2 2019-02-22
CN201910133954.2A CN109885533A (en) 2019-02-22 2019-02-22 A kind of data deployment method based on DHT network, node device, data deployment system and storage medium

Publications (1)

Publication Number Publication Date
WO2020168666A1 true WO2020168666A1 (en) 2020-08-27

Family

ID=66928873

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093045 WO2020168666A1 (en) 2019-02-22 2019-06-26 Data deployment method based on dht network, node device, data deployment system and storage medium

Country Status (2)

Country Link
CN (1) CN109885533A (en)
WO (1) WO2020168666A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885533A (en) * 2019-02-22 2019-06-14 深圳市网心科技有限公司 A kind of data deployment method based on DHT network, node device, data deployment system and storage medium
CN112130931B (en) * 2020-09-27 2023-01-06 联想(北京)有限公司 Application deployment method, node, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161610A (en) * 2016-06-29 2016-11-23 华为技术有限公司 A kind of method and system of distributed storage
WO2017203488A1 (en) * 2016-05-26 2017-11-30 Theo Kanter Distributed data collection in wireless sensor networks in which a first node can publish itself as collector or sensor data towards the other nodes
CN107453994A (en) * 2016-05-30 2017-12-08 北京信威通信技术股份有限公司 Data transmission method and device based on DHT networks
CN109885533A (en) * 2019-02-22 2019-06-14 深圳市网心科技有限公司 A kind of data deployment method based on DHT network, node device, data deployment system and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100559870C (en) * 2006-09-21 2009-11-11 中国科学技术大学 Video on-demand system and this system realize the method that data are disposed
CN101527739A (en) * 2009-05-05 2009-09-09 杭州华三通信技术有限公司 Storage method and device
CN103905916A (en) * 2012-12-25 2014-07-02 中国科学院声学研究所 Region-oriented set top box P2P-Vod system and data pre-deployment method
MY184239A (en) * 2013-04-16 2021-03-29 Mimos Berhad A system and method of fault tolerance for distributed applications in a virtualized environment
CN107783728B (en) * 2016-08-31 2021-07-23 百度在线网络技术(北京)有限公司 Data storage method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017203488A1 (en) * 2016-05-26 2017-11-30 Theo Kanter Distributed data collection in wireless sensor networks in which a first node can publish itself as collector or sensor data towards the other nodes
CN107453994A (en) * 2016-05-30 2017-12-08 北京信威通信技术股份有限公司 Data transmission method and device based on DHT networks
CN106161610A (en) * 2016-06-29 2016-11-23 华为技术有限公司 A kind of method and system of distributed storage
CN109885533A (en) * 2019-02-22 2019-06-14 深圳市网心科技有限公司 A kind of data deployment method based on DHT network, node device, data deployment system and storage medium

Also Published As

Publication number Publication date
CN109885533A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
TWI727467B (en) Trustworthiness verification method, system, device and equipment of alliance chain
JP2019054525A5 (en)
US20140250158A1 (en) Method and device for obtaining file
WO2019227427A1 (en) File download method, device and apparatus/terminal/server
WO2017101186A1 (en) Method for establishing wireless connection for application of user equipment
CN104378435A (en) Method for transmitting file between browser of computing device and mobile terminal
WO2020168666A1 (en) Data deployment method based on dht network, node device, data deployment system and storage medium
WO2014179950A1 (en) File uploading method, client, and server
CN104376090A (en) Screen synchronization equipment of browser in computing equipment and mobile terminal
CN104394208A (en) File transmission method and server
US7953822B2 (en) Method of and apparatus for downloading data
CN113434249A (en) Mirror image synchronization method and device, docker host and storage medium
WO2023131058A1 (en) System and method for scheduling resource service application in digital middle office of enterprise
WO2023165226A1 (en) Application resource backup method and apparatus, electronic device, and storage medium
CN104486371A (en) Equipment and method for downloading file on batch
CN113934545A (en) Video data scheduling method, system, electronic equipment and readable medium
WO2022105365A1 (en) Device control method and system, electronic device, and storage medium
CN103827830A (en) System and method for preventing single-point bottleneck in a transactional middleware machine environment
WO2018068655A1 (en) License management method and system
CN113821333A (en) Android application program migration method and device
CN111930542A (en) Data acquisition method and device, electronic equipment and computer readable storage medium
WO2023207087A1 (en) Optimal-link selection method and apparatus for blockchain, and electronic device
WO2018127013A1 (en) Method and device for concurrent transmission of stream data
CN113852522B (en) Camera binding and unbinding method based on multiple platforms
CN113285920B (en) Service access method, device, equipment and storage medium

Legal Events

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

Ref document number: 19916164

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916164

Country of ref document: EP

Kind code of ref document: A1