WO2017000094A1 - Data storage method, device and system - Google Patents

Data storage method, device and system Download PDF

Info

Publication number
WO2017000094A1
WO2017000094A1 PCT/CN2015/082581 CN2015082581W WO2017000094A1 WO 2017000094 A1 WO2017000094 A1 WO 2017000094A1 CN 2015082581 W CN2015082581 W CN 2015082581W WO 2017000094 A1 WO2017000094 A1 WO 2017000094A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
storage nodes
node
data
nodes
Prior art date
Application number
PCT/CN2015/082581
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 华为技术有限公司
Priority to PCT/CN2015/082581 priority Critical patent/WO2017000094A1/en
Priority to CN201580001239.3A priority patent/CN107113323B/en
Publication of WO2017000094A1 publication Critical patent/WO2017000094A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • Embodiments of the present invention relate to the field of computers, and in particular, to a data storage method, apparatus, and system.
  • SSDs Solid State Drives
  • HDDs Hard Disk Drives
  • storage nodes can be deployed at different locations on the network. To fully utilize the speed of the distributed storage network, the data is divided into multiple data blocks and stored in different storage nodes. To achieve parallel access to multiple storage nodes.
  • data is generally divided into data blocks of the same size in a distributed storage network, and corresponding storage nodes are selected for random data blocks or based on a minimum delay policy, and then the data blocks are stored in different storage nodes.
  • corresponding storage nodes are selected for random data blocks or based on a minimum delay policy, and then the data blocks are stored in different storage nodes.
  • data blocks are equally divided, and storage nodes or minimum delay strategies are randomly selected for data blocks. It has been unable to meet the needs of practical applications, and further optimization of distributed storage methods is needed.
  • embodiments of the present invention provide a data storage method, apparatus, and system, which implement optimization of a distributed storage method.
  • an embodiment of the present invention provides a data storage method for storing a data distribution of a source node to be stored in a distributed storage system, including: the source node determining N from the distributed storage system.
  • Storage nodes where N is a positive integer greater than 1; the source node obtains Bandwidth information of each of the N storage nodes, the bandwidth information of each of the N storage nodes is the each of the N storage nodes to the The transmission bandwidth of the data transmission path of the source node; the source node is the one of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes
  • Each storage node allocates corresponding data to be stored; the source node sends data to be stored allocated by each of the N storage nodes to the N storage nodes Each storage node is described.
  • the source node is configured according to the data to be stored and the bandwidth information of each of the N storage nodes.
  • Each of the N storage nodes is configured to allocate corresponding data to be stored, and the source node respectively allocates corresponding data to be stored to the J storage nodes of the N storage nodes, where
  • the size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N.
  • j is a positive integer increasing from 1 to J one by one.
  • the source node determines, from the distributed storage system, N storage nodes, including: Determining, by the source node, power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where a positive integer greater than or equal to N; the source node selects the N storage nodes from the M storage nodes according to power consumption information of the M storage nodes.
  • the source node determines, from the distributed storage system, N storage nodes, including: Determining the delay information of the M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N; and the source node is based on the delay information of the M storage nodes from the M
  • the N storage nodes are selected among the storage nodes.
  • the source node according to the delay information of the M storage nodes, from the M Selecting the N storage nodes from the storage nodes, the source node selecting, from the M storage nodes, the N storage nodes that meet the first condition, wherein the delay meets the first condition:
  • the delay of the p+1th storage node is less than or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes, where p is 1 is incremented by one to a positive integer of N-1. .
  • the source node selects, from the M storage nodes, a delay that satisfies the first condition Storage nodes, comprising: said source node as a first one of said N storage nodes as said first storage node of said M storage nodes; said source node being removed from said M storage nodes
  • the remaining N-1 storage nodes are sequentially determined in the order from 2 to N in the storage nodes other than the first storage node, wherein each of the remaining N-1 storage nodes The delay meets the first condition.
  • the source node, the first storage node of the M storage nodes is used as the a first storage node of the N storage nodes, comprising: the source node selecting a storage node from the M storage nodes according to the delay information, or the bandwidth information, or the power consumption information The first storage node.
  • the source node removes the first storage node from the M storage nodes When determining the xth storage node in the outer storage node, if the source node determines at least two candidate storage nodes that satisfy the first condition, the source node further transmits the bandwidth according to the delay, or the transmission bandwidth The power consumption selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
  • an embodiment of the present invention provides a computing device readable medium, including a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performs the first aspect or the first Aspect of any of the possible implementations of the method.
  • an embodiment of the present invention provides a data storage device, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer to execute an instruction, and the processor and the memory pass the bus Connecting, when the data storage device is in operation, the processor executing the computer-executed instructions stored by the memory to cause the data storage device to perform the first aspect or any of the possible implementations of the first aspect The method described.
  • the embodiment of the present invention provides a data storage method, where the data of the source node to be stored is distributed to the distributed storage system, including: the source node acquiring the distributed storage system.
  • Power consumption information of M storage nodes the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than 1; Determining, by the source node, N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M; Determining the stored data, assigning each of the N storage nodes a corresponding data to be stored; the source node assigns each of the N storage nodes to the storage node The stored data is sent to each of the N storage nodes.
  • the source node determines, according to the power consumption information of the M storage nodes, the N storage nodes from the M storage nodes, including: The source node acquires delay information of the M storage nodes; the source node selects, from the M storage nodes, an alternative storage node that meets a first condition, wherein the delay satisfies the first condition
  • the delay of the p+1th storage node is less than or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes, the p A positive integer that is incremented from 1 to N-1; the source node selects the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
  • the source node according to the power consumption information of the M storage nodes, from the M Determining N storage nodes among the storage nodes, comprising: the source node using a first storage node of the M storage nodes as a first storage node of the N storage nodes;
  • the power consumption information sequentially determines the remaining N-1 storage nodes from the candidate storage nodes in order from the 2nd to the Nth.
  • the source node, the first storage node of the M storage nodes is used as the a first storage node of the N storage nodes, the source node selects, as the first storage node, a storage node with the smallest transmission power consumption from the M storage nodes; or the source node Among the M storage nodes having the smallest delay among the M storage nodes, the storage node with the smallest transmission power consumption is selected as the first storage node.
  • the source node determines, according to the power consumption information, from the candidate storage node The xth storage node, where x is a positive integer greater than 1, the source node selects, from the candidate storage nodes satisfying the first condition, a storage node having the smallest transmission power consumption as the xth storage node; or And the source node selects, as the xth storage node, the storage node with the smallest transmission power consumption among the at least two storage nodes with the largest delay among the candidate storage nodes that satisfy the first condition.
  • the fourth possible implementation manner of the fourth aspect further comprising: the source node acquiring the each of the N storage nodes The bandwidth information of the storage node, the bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node
  • the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node according to the data to be stored and the The bandwidth information of each of the N storage nodes is allocated to the storage node to be stored for the storage node.
  • the source node is configured according to the data to be stored and the N storage nodes
  • the bandwidth information of each storage node is allocated to the storage node of the N storage nodes, where the data is to be stored, including: the source node is J of the N storage nodes.
  • the storage node allocates corresponding data to be stored, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node.
  • J is a positive integer greater than 1 and less than or equal to N
  • j is a positive integer increasing from 1 to J one by one.
  • an embodiment of the present invention provides a computing device readable medium, including a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performs the fourth aspect or the fourth Aspect of any of the possible implementations of the method.
  • an embodiment of the present invention provides a data storage device, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer to execute an instruction, and the processor and the memory pass the bus Connecting, when the data storage device is in operation, the processor executing the computer-executed instructions stored by the memory to cause the data storage device to perform any of the possible implementations of the fourth aspect or the fourth aspect The method described.
  • the embodiment of the present invention provides a data storage device, configured to store data to be stored in a distributed storage system, including: a determining unit, configured to determine N storages from the distributed storage system. a node, where N is a positive integer greater than 1; an obtaining unit, configured to acquire bandwidth information of each of the N storage nodes, and bandwidth information of each of the N storage nodes a transmission bandwidth of a data transmission path of the storage node to the source node of each of the N storage nodes; an allocation unit, configured to use, according to the data to be stored, and the N storage nodes Describe the bandwidth information of each storage node, for the N storages Each of the storage nodes in the node allocates corresponding data to be stored; the sending unit is configured to send, to the N, data to be stored allocated by each of the N storage nodes Each of the storage nodes in the storage node.
  • the allocating unit is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, Allocating corresponding data to be stored to each of the N storage nodes
  • the: the allocation unit is configured to respectively allocate corresponding storage to be saved to the J storage nodes of the N storage nodes Data, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is greater than 1 and less than or equal to A positive integer of N, which is a positive integer that increases from 1 to J one by one.
  • the acquiring unit is further configured to acquire M storage nodes in the distributed storage system Power consumption information, which is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than or equal to N;
  • the determining unit is used to Determining the N storage nodes by the distributed storage system includes: the determining unit, configured to select the N storage nodes from the M storage nodes according to power consumption information of the M storage nodes.
  • the acquiring unit is further configured to acquire M storage nodes in the distributed storage system, in a third possible implementation manner of the seventh aspect, Delay information, M is a positive integer greater than or equal to N; the determining unit is configured to determine N storage nodes from the distributed storage system, and the determining unit is configured to use a delay according to the M storage nodes Information, selecting the N storage nodes from the M storage nodes.
  • the determining unit is configured to: according to the delay information of the M storage nodes, Selecting the N storage nodes from the M storage nodes, the determining unit is configured to select, from the M storage nodes, N storage nodes that satisfy a first condition, wherein the delay satisfies A condition is: the delay of the p+1th storage node is less than or equal to the sum of the sum of the data download time of the previous p storage nodes and the delay of the first storage node of the N storage nodes,
  • the p is a positive integer that increases from 1 to N-1. .
  • the determining unit is configured to select a delay from the M storage nodes to satisfy the first condition N storage nodes, including: the determining unit is configured to use the M storage nodes a first storage node as the first one of the N storage nodes; the determining unit is configured to remove the storage node other than the first storage node from the M storage nodes according to The sequence of N determines the remaining N-1 storage nodes in turn, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
  • the determining unit is configured to use the first storage node of the M storage nodes as The first storage node of the N storage nodes, the determining unit, configured to select, according to the delay information, or the bandwidth information, or the power consumption information, from the M storage nodes A storage node acts as the first storage node.
  • the storage node other than the first storage node is removed from the M storage nodes
  • the determining unit determines at least two candidate storage nodes that satisfy the first condition
  • the determining unit is further configured to use a delay, or a transmission bandwidth, or transmit
  • the power consumption selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
  • the embodiment of the present invention provides a data storage system, comprising the data storage device and the plurality of storage nodes according to any one of the seventh aspect or the seventh aspect, for using the data
  • the data distribution of the storage device is stored in N storage nodes of the plurality of storage nodes, where N is a positive integer greater than one.
  • an embodiment of the present invention provides a data storage device, configured to store data to be stored in a distributed storage system, including: an acquiring unit, configured to acquire M devices in the distributed storage system.
  • the power consumption information of the storage node wherein the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than 1; and the determining unit is configured to The power consumption information of the M storage nodes, determining N storage nodes from the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M; and an allocation unit, configured to be used according to the to-be-stored Data, each of the N storage nodes is allocated corresponding data to be stored; and a sending unit is configured to allocate the data to be stored to each of the N storage nodes Sended to each of the N storage nodes.
  • the acquiring unit is further configured to acquire delay information of the M storage nodes
  • the determining unit is configured to use, according to the M Determining the power consumption information of the node, determining N storage nodes from the M storage nodes, including: the determining unit, configured to select, from the M storage nodes, an alternate storage node that meets a first condition with a delay, wherein The delay satisfies the first condition that the delay of the p+1th storage node is less than or equal to the sum of the data download times of the previous p storage nodes and the first storage node of the N storage nodes. a sum of delays, wherein p is a positive integer increasing from 1 to N-1; the determining unit is configured to select from the candidate storage nodes according to power consumption information of the candidate storage node N storage nodes are described.
  • the determining unit is configured to use, according to the power consumption information of the M storage nodes, Determining N storage nodes among the M storage nodes, comprising: the determining unit configured to use a first storage node of the M storage nodes as a first storage node of the N storage nodes; The determining unit is configured to sequentially determine the remaining N-1 storage nodes from the candidate storage nodes in order from the 2nd to the Nth according to the power consumption information.
  • the determining unit is configured to use the first storage node of the M storage nodes as The first storage node of the N storage nodes, the determining unit is configured to select, from the M storage nodes, a storage node with the smallest transmission power consumption as the first storage node; or Among the M storage nodes having the smallest delay among the M storage nodes, the storage node with the smallest transmission power consumption is selected as the first storage node.
  • the determining unit is configured to use the power storage information from the candidate storage node When the xth storage node is determined, wherein x is a positive integer greater than 1, the determining unit is configured to select, from the candidate storage nodes that satisfy the first condition, a storage node with the smallest transmission power consumption as the xth The storage node; or, from the at least two storage nodes having the largest delay among the candidate storage nodes satisfying the first condition, selecting the storage node with the smallest transmission power consumption as the xth storage node.
  • the obtaining unit is further configured to acquire each of the N storage nodes
  • the bandwidth information of the storage node, the bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node
  • the allocation unit is configured to give the N storages according to the data to be stored Each storage node in the node allocates corresponding data to be stored, including: the allocation unit is configured to use, according to the data to be stored, and bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored.
  • the allocating unit is configured to use the data to be stored and the N storage nodes All the storage nodes of the N storage nodes are allocated corresponding data to be stored, including: the allocation unit is used for the N storage nodes
  • the J storage nodes are allocated corresponding data to be stored, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positive with the transmission bandwidth of the jth storage node Correlation, the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
  • the embodiment of the present invention provides a data storage system, comprising the data storage device and the plurality of storage nodes according to any of the possible implementations of the ninth aspect or the ninth aspect,
  • the data distribution of the storage device is stored in N storage nodes of the plurality of storage nodes, where N is a positive integer greater than one.
  • a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access.
  • Time has realized the rational use of resources.
  • the storage power consumption of the storage node is taken into consideration, and the storage node that transmits the power consumption is preferentially selected, thereby reducing the power consumption of the data access.
  • FIG. 1 is a block diagram of an exemplary networked environment of a distributed data storage system
  • FIG. 2 is an exemplary flowchart of a data storage method according to an embodiment of the present invention.
  • FIG. 3 is an exemplary flowchart of a data storage method according to an embodiment of the invention.
  • FIG. 4 is a schematic diagram showing the logical structure of a data storage device according to an embodiment of the invention.
  • FIG. 5 is a schematic diagram showing the logical structure of a data storage device according to an embodiment of the invention.
  • FIG. 6 is a schematic diagram showing the hardware structure of a data storage device according to an embodiment of the invention.
  • FIG. 1 shows an exemplary networked environment block diagram of a distributed data storage system 100 that includes a source node 102 and a plurality of storage nodes 104, a source node 102 and a storage node 104, and a storage node 104 between the switching devices 106. Interconnected, the various components of the entire system 100 are connected to each other through a network, wherein the network may be the Internet, an intranet, a local area network (LANs), a wide area network (WLANs), a storage area network (SANs), or other connection means, or a combination of the above networks. .
  • LANs local area network
  • WLANs wide area network
  • SANs storage area network
  • source node 102 When source node 102 is to distribute data 108 across a plurality of storage nodes 104, source node 102 segments data 108 and sends the data blocks to corresponding storage nodes 104.
  • the data 108 is divided into five data blocks, but the embodiment of the present invention does not limit the data. In the specific implementation, the data 108 can be divided into more or less data blocks.
  • the source node 102 selects five storage nodes 104 from the plurality of storage nodes 104 connected thereto as the target storage node 104, and transmits the five data blocks to the five target storage nodes 104 for storage.
  • FIG. 1 is only for the participants of the distributed storage and their interrelationships for the purposes of the following discussion.
  • the depicted distributed data storage system 100 is greatly simplified, and the system 100 can have more or fewer components, which are not limited by the embodiments of the present invention.
  • a distributed storage system 100 in accordance with an embodiment of the present invention is shown in FIG.
  • the data 108 for distributing the source node 102 is distributed to N storage nodes 104 in the distributed storage system 100, where N is a positive integer greater than one.
  • the source node 102 determines N storage nodes 104 from the distributed storage system 100, where N is a positive integer greater than one.
  • the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 acquires the distributed storage.
  • the power consumption information of the M storage nodes 104 in the storage system 100, the power consumption information is the transmission power consumption of each of the M storage nodes 104 to the source node 102, where M is greater than or equal to A positive integer of N; the source node 102 selects the N storage nodes 104 from the M storage nodes 104 according to power consumption information of the M storage nodes 104.
  • the transmission power consumption refers to the power consumption required for the transmission of the data block of the unit size from the corresponding storage node 104 to the source node 102.
  • the M storage nodes 104 are storage nodes 104 connected to the source node 102. It should be understood that the connection here means that the network topology implements the interconnection between the source node 102 and the M storage nodes 104, and the connection is not only Limited to direct connection, there may be one or more (including two) switching devices 106 between the source node 102 and the storage node 104.
  • the M storage nodes 104 may be all storage nodes 104 connected to the source node 102.
  • the M storage nodes 104 may also be portions of the storage nodes 104 of all of the storage nodes 104 connected to the source node 102.
  • the M storage nodes 104 are storage nodes 104 that satisfy the actual needs of the source node 102, such as load and delay, and can be actually used by the source node 102.
  • the transmission delay of the data transmission path to the source node 102 is greater than a certain threshold, or the load condition is greater than a certain threshold, or the transmission power consumption of the data transmission path to the source node 102 is greater than a certain threshold, or
  • the storage node 104 whose number of hops of the data transmission path of the source node 102 is greater than a certain threshold, can be considered as the storage node 104 that cannot be actually used by the source node 102.
  • the number of hops of the data transmission path reflects the power consumption of the data transmission path when the data transmission path is transmitted. The more hops, the greater the transmission power consumption.
  • the hop count of the path of the storage node 104 to the source node 102 may be used to reflect the transmission power consumption of the data transmission path of the storage node 104 to the source node 102.
  • the transmission power of the data transmission path is not only related to the hop count, but also related to the processing time of the data, the longer the processing time of the data, or the longer the waiting time of the data in the cache, consumes more energy.
  • the transmission delay of the data transmission path of the storage node 104 to the source node 102 may also be used to reflect the transmission power consumption of the corresponding storage node 104 to the source node 102.
  • the transmission power consumption can be expressed in various forms, and can be represented by the hop count of the data transmission path, or by the transmission delay of the data transmission path, or actual statistics can be performed.
  • the embodiments of the present invention are merely illustrative, and do not limit the expression of transmission power consumption, and allow other alternative expressions of transmission power consumption.
  • the source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 stores the M storages.
  • the node 104 respectively sends a query request; the source node 102 receives a receipt message from each of the M storage nodes 104, and each of the receipt messages includes power consumption information of the corresponding storage node 104.
  • the return message can be used to record the routing device that passes through the transmission process from the storage node 104 to the source node 102. number.
  • the source node 102 can send a query request to all of the storage nodes 104 connected to the source node 102, and only the M storage nodes 104 that can actually satisfy the storage requirements of the source node 102 send a return message to the source node 102. .
  • the storage node 104 that cannot satisfy the storage requirements of the source node 102 may not respond to the storage resource request of the source node 102 or send a reject message to the source node 102.
  • the transmission delay of the data transmission path to the source node 102 is greater than a certain threshold, or the load condition is greater than a certain threshold, or the transmission power consumption of the data transmission path to the source node 102 is greater than a certain threshold, or to the source
  • the storage node 104 whose hop count of the data transmission path of the node 102 is greater than a certain threshold may not respond to the storage resource request of the source node 102 or send a reject message.
  • the system 100 further includes a management server (not shown), and the management server is configured to maintain node information of the M storage nodes 104, where the node information includes work. Consumption information.
  • the source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 sends a query request to the management server; and the source node 102 receives the return message from the management server.
  • the receipt message includes power consumption information of each of the M storage nodes 104.
  • the management server may perform real-time statistics and update on the transmission power consumption of the data transmission path of the storage node 104 to the source node 102.
  • the management server may be an SDN controller, and the type of the management server may be in various implementation forms, which is not limited by the embodiment of the present invention.
  • the source node 102 includes a database.
  • the database stores node information of each of the M storage nodes 104, the node information including power consumption information.
  • the source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 acquires each of the M storage nodes 104 from the database. Power consumption information.
  • the node information of the destination node 104 connected to the source node 102 may be placed in the database in the source node 102 when the system is initialized.
  • the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 acquires M in the distributed storage system 100.
  • the delay information of the storage node 104, M is a positive integer greater than or equal to N; the source node 102 selects the N from the M storage nodes 104 according to the delay information of the M storage nodes 104.
  • Storage node 104 storage node 104.
  • the delay information of each of the M storage nodes 104 is that the source node 102 sends a data access request time to each of the storage nodes 104 to the first data packet of each storage node 104.
  • the time between the time of sending to the source node 102 includes the access delay of each of the storage nodes 104 and the transmission delay of the data transmission path of each of the storage nodes 104 to the source node 102.
  • the access delay of the storage node 104 is the time between the source node 102 issuing an access request to the storage node 104 transmitting the first data packet of the data block.
  • the access delay may include a setup time of the link between the source node 102 and the storage node 104 and a preparation time before the storage node 104 sends the data block.
  • the delay is composed of multiple parts, and specifically may include a first delay that the source node 102 sends an access request to the storage node 104 to the storage node 104, and the storage node 104 reads the stored data.
  • the second latency of the fastest primary storage device is ready, and the third delay that the storage node 104 sends the first data packet to the source node 102 to receive the first data packet.
  • a part of the delay may be omitted, and a part of the delay represents the overall delay, which is not limited by the embodiment of the present invention, as long as the delay is to a certain extent.
  • the source node 102 may obtain the query in the distributed storage system 100 by sending a query request to the storage node 104, or by sending a query request to the management server, or storing the delay information in a local database. Delay information of the M storage nodes 104,
  • the specific implementation process is the same as the method for obtaining power consumption information, and details are not described herein again.
  • the setup time of the link of the source node 102 with the storage node 104, the preparation time before the storage node 104 sends the data block, and the transmission delay of the data transmission path of the storage node 104 to the source node 102 can be monitored and recorded by the management server.
  • the source node 102 sends a query request to the management server, and the delay message carried by the management server to the source node 102 carries the delay information.
  • a time record field may also be added to the communication message between the source node 102 and the storage node 104 for recording the time required to establish the link and the transmission time of the data transmission path of the storage node 104 to the source node 102. Delay.
  • the management server can detect the transmission delay of the data transmission path by using an Operation Administration and Maintenance (OAM) feature of the data transmission path. It is also possible for the management server to determine the transmission delay of the data transmission path by the empirical value of the recorded transmission delay.
  • OAM Operation Administration and Maintenance
  • the source node 102 further acquires bandwidth information of each of the N storage nodes 104, and the bandwidth information of each of the N storage nodes 104 is the N The transmission bandwidth of each of the storage nodes 104 to the data transmission path of the source node 102.
  • the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 according to bandwidth information of the M storage nodes 104.
  • the N storage nodes 104 are selected from the M storage nodes 104.
  • the transmission bandwidth is a bandwidth reserved by the system for the data transmission path of each of the N storage nodes 104 to the source node 102, and the actual data transmission is performed by the data transmission path. Average transmission bandwidth.
  • the source node 102 may obtain the query request in the distributed storage system 100 by sending a query request to the storage node 104, or by sending a query request to the management server, or storing the bandwidth information in a local database.
  • the specific implementation process of the bandwidth information of the M storage nodes 104 is the same as the method for obtaining the power consumption information, and details are not described herein again.
  • the source node 102 determines the N storage nodes 104 from the M storage nodes 104 according to at least one of the transmission power consumption, the delay, and the transmission bandwidth of the storage node 104.
  • the source node 102 determines N storage nodes from the distributed storage system 100 104.
  • the source node 102 selects the N storage nodes 104 with the smallest delay from the M storage nodes 104, or selects the transmission function from the L storage nodes 104 with the smallest delay among the M storage nodes 104.
  • N storage nodes 104 that consume the least or the largest transmission bandwidth, where L is a positive integer greater than N.
  • the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 selects, from the M storage nodes 104, N storage nodes 104 that have the lowest transmission power consumption, or N storage nodes 104 with the smallest delay or the largest transmission bandwidth are selected from the L storage nodes 104 with the least power consumption transmitted from the M storage nodes 104, where L is a positive integer greater than N.
  • the source node 102 determines the N storage nodes 104 from the distributed storage system 100, including: the source node 102 selects the N storage nodes 104 with the largest transmission bandwidth from the M storage nodes 104, or Among the L storage nodes 104 having the largest transmission bandwidth among the M storage nodes 104, N storage nodes 104 with the smallest transmission power consumption or the smallest delay are selected, where L is a positive integer greater than N.
  • the source node 102 selects the N storage nodes 104 from the M storage nodes 104 according to the delay information of the M storage nodes 104, including: The source node 102 selects, from the M storage nodes 104, the N storage nodes 104 that satisfy the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than Or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes 104, where p is a positive integer that is incremented from 1 to N-1. .
  • the data download time of one storage node 104 is the ratio between the corresponding data size K to be stored allocated by the storage node 104 and the transmission bandwidth B of the data transmission path of the storage node 104 to the source node 102.
  • the source node 102 uses a first storage node of the M storage nodes 104 as a first storage node among the N storage nodes 104; the source node 102 from the M The storage node 104 removes the remaining N-1 storage nodes 104 in order from 2 to N in the storage node 104 other than the first storage node, wherein the remaining N-1 storages The delay of each of the storage nodes 104 in the node 104 satisfies the first condition.
  • one storage node 104 is selected as the p+1th storage node from the storage node 104 that satisfies the following conditions. :
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node 104
  • B i is used to represent the i th storage node 104
  • the transmission bandwidth, L p+1 is used to represent the delay of the p+1th target node.
  • the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, including: The source node 102 selects one storage node 104 from the M storage nodes 104 as the first storage node according to the delay information, or the bandwidth information, or the power consumption information.
  • the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the plurality of storage nodes 104.
  • the storage node 104 with the smallest sum of the delay and the data block download time is selected as the first storage node, that is, the content is satisfied.
  • the storage node 104 having the smallest value serves as the first storage node.
  • L is the delay of the storage node 104
  • K is the data block size allocated to the storage node 104
  • B is the transmission bandwidth of the storage node 104.
  • the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes.
  • the storage node 104 having the smallest delay is selected, or the storage node 104 having the largest transmission bandwidth or the smallest transmission power consumption is selected as the first storage node from among the L storage nodes 104 having the smallest delay among the M storage nodes 104.
  • L is a positive integer greater than one.
  • the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes. 104 selects the storage node 104 with the smallest transmission power consumption, or selects the largest transmission bandwidth or the longest delay among the L storage nodes 104 that have the least power consumption from the M storage nodes 104.
  • the small storage node 104 acts as a first storage node, where L is a positive integer greater than one.
  • the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes. 104, the storage node 104 having the largest transmission bandwidth is selected, or the storage node 104 having the smallest delay or the smallest transmission power consumption is selected as the first storage node from among the L storage nodes 104 having the largest transmission bandwidth among the M storage nodes 104.
  • L is a positive integer greater than one.
  • the basis for the source node 102 to determine the first storage node from the M storage nodes 104 is various, and the embodiments of the present invention are merely examples and are not limited thereto.
  • the source node 102 when the source node 102 removes the xth storage node 104 from the storage node 104 except the first storage node, the The source node determines at least two candidate storage nodes 104 that satisfy the first condition, the source node further according to a delay, or a transmission bandwidth, or transmitting power consumption from at least two satisfying the first condition
  • One of the candidate storage nodes 104 is selected as the xth storage node 104, where x is greater than or equal to 2 and less than or equal to N.
  • the source node 102 selects the storage node 104 with the largest delay from the at least two candidate storage nodes 104 that satisfy the first condition, or from the at least two candidate storage nodes 104 that satisfy the first condition.
  • the storage node 104 having the largest transmission bandwidth or the smallest transmission power consumption is selected among the L largest storage nodes 104 as the xth storage node 104, where L is a positive integer greater than 1.
  • the source node 102 selects the storage node 104 having the largest transmission bandwidth from the at least two candidate storage nodes 104 that satisfy the first condition, or from at least two candidate storage nodes 104 that satisfy the first condition.
  • the storage node 104 having the largest transmission bandwidth is selected as the xth storage node 104, where L is a positive integer greater than 1.
  • the source node 102 selects the storage node 104 that has the lowest transmission power consumption from the at least two candidate storage nodes 104 that satisfy the first condition, or from the at least two candidate storage nodes 104 that satisfy the first condition.
  • the storage node 104 having the smallest transmission power consumption the storage node 104 having the largest delay or the largest transmission bandwidth is selected as the xth storage node 104, where L is a positive integer greater than one.
  • source node 102 determines that the basis of the xth storage node 104 is diverse, and the embodiments of the present invention are merely examples and are not limited thereto.
  • the source node 102 gives the N storage nodes 104 according to the data to be stored. Each storage node 104 allocates corresponding data to be stored.
  • the source node 102 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including: The source node 102 divides the data into N equal-sized data blocks and allocates one data block for each storage node 104. It will be appreciated that the data may not be equally evenly divided into N equal-sized data blocks because of the minimum partitioning unit of the data, and embodiments of the present invention allow for adjustments to the data blocks on a uniform basis.
  • the source node 102 divides the data into N data blocks, and sorts the N data blocks according to the data, and the source node 102 allocates the data blocks to the corresponding storage nodes 104, thereby ensuring the data blocks. In order, when accessing data in the future, it can be accessed according to the order of the data blocks.
  • the source node 102 acquires a buffer size of each of the N storage nodes 104, and the buffer is a corresponding storage node 104 for receiving data.
  • the storage node 104 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including: the source node 102 will store the node 104 A data block of an integer multiple of the buffer size is allocated to the corresponding storage node 104.
  • the source node 102 may allocate a data block of a buffer size of the corresponding storage node 104 to the corresponding storage node 104.
  • the source node 102 if the source node 102 allocates a data block of L size of the buffer size of the corresponding storage node 104 to the corresponding storage node 104, the source node 102 splits the data block into L sizes. A sub-block of buffer size, and respectively send L sub-blocks to a corresponding storage node 104, where L is a positive integer greater than one.
  • the source node 102 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including:
  • the source node 102 is the each of the N storage nodes 104 according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104. Assign the corresponding data to be stored.
  • the source node 102 is the each of the N storage nodes 104 according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104.
  • Allocating corresponding data to be stored includes: the source node 102 respectively assigns corresponding data to be stored to the J storage nodes of the N storage nodes 104, wherein the The size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, j is a positive integer that increments from 1 to J one by one.
  • the source node is the first N-1 according to the transmission bandwidth of the first N-1 storage nodes.
  • Each storage node in the storage node allocates a data block, and the size of the data to be stored allocated by each storage node is positively correlated with the transmission bandwidth of the storage node, and the remaining data is allocated to the Nth storage node.
  • the source node 102 allocates a data block to each of the N storage nodes 104 according to the transmission bandwidth of each of the N storage nodes 104, and the size of the data block. It is positively related to the transmission bandwidth.
  • each storage node 104 can be allocated a data block according to a transmission bandwidth ratio, and the allocation is as follows:
  • K i is the data block size allocated by the i th storage node 104
  • B i is the transmission bandwidth of the i th storage node 104
  • K is the size of the entire data.
  • the positive proportional relationship in Equation 1 is only a specific implementation of the positive correlation relationship. In the specific implementation process, the actual data block size can be adjusted on the basis of Equation 1. It should be understood that the positive proportional relationship of Equation 1 is not an absolute proportional relationship because of the limitation of the minimum division unit of data. Embodiments of the present invention allow adjustment of the data block size on the basis of Equation 1.
  • the source node 102 can also set the data block size K 0 of the unit bandwidth allocation, and the allocation basis can be as follows:
  • K i is the data block size allocated for the i th storage node 104
  • B i is the transmission bandwidth of the i th storage node 104
  • K 0 is the data block size allocated for the unit bandwidth.
  • the embodiment of the present invention allows the data block size of the storage node 104 to have other constraint relationship with the transmission bandwidth of the storage node 104.
  • the source node 102 determines the N storage nodes 104 one by one from the M storage nodes 104, and the source node 102 determines the jth storage. After storing the node, and before the source node 102 determines the j+1th storage node from the M storage nodes 104, allocate a data block for the jth storage node, where j is a positive integer greater than 0 and less than N .
  • the source node 102 is configured according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104.
  • Each of the N storage nodes 104 allocates corresponding data to be stored, including: the source node 102 transmits the size and the transmission of the jth storage node before determining the j+1th storage node.
  • a data block whose bandwidth is positively correlated is allocated to the jth storage node, j is a positive integer increasing from 1 to N-1, and the j+1th storage node is a next node of the jth storage node;
  • the source node 102 assigns the remainder of the data to the Nth storage node 104.
  • the source node 102 determines the N storage nodes 104 from the M storage nodes 104, and assigns a corresponding correspondence to each of the N storage nodes 104 according to the data to be stored.
  • the data to be stored including:
  • Step A The source node 102 determines the first storage node from the M storage nodes 104, and allocates a data block to the first storage node according to the transmission bandwidth of the first storage node.
  • the source node 102 allocates a data block to the first storage node according to the transmission bandwidth of the first storage node, and includes: the source node 102, the data whose size is positively correlated with the transmission bandwidth of the first storage node.
  • a block is allocated to the first storage node.
  • the data block size, B 1 is the transmission bandwidth of the first storage node
  • K 0 is the data block size allocated by the unit bandwidth.
  • Step B The source node 102 determines the j+1th storage node from the M storage nodes 104 according to the transmission power consumption, and the delay of the j+1th storage node is not greater than the previous j storage nodes. The download time of the data block and the delay of the first storage node. Perform step C.
  • the initial value of j is 1.
  • a storage node 104 is selected as the j+1th storage node according to the transmission power consumption from the storage node 104 that satisfies the following conditions:
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node 104
  • B i is used to represent the i th storage node 104
  • the transmission bandwidth, L j+1 is used to represent the delay of the j+1th target node.
  • the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node in the storage node 104 that has not been selected is determined to have the smallest transmission power consumption as the j+1th storage node.
  • the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node with the smallest transmission power is determined as the jth among the L storage nodes 104 having the largest delay among the storage nodes 104 that have not been selected. +1 storage node, where L is a positive integer greater than one.
  • the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node with the largest delay is determined among the L storage nodes 104 that have the least power consumption in the storage node 104 that has not been selected.
  • the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node that determines the transmission bandwidth is the largest among the L storage nodes 104 that have the least power consumption in the storage node 104 that has not been selected. +1 storage node, where L is a positive integer greater than one.
  • the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node that determines the transmission power consumption is the least in the L storage nodes 104 that have the largest transmission bandwidth among the storage nodes 104 that have not been selected. +1 storage node, where L is a positive integer greater than one.
  • the source node 102 determines the basis of the j+1th storage node from the M storage nodes 104 according to the transmission power consumption.
  • the embodiments of the present invention are merely examples and are not limited thereto. .
  • Step C Determine whether the following conditions are met:
  • K is the size of the remainder of the data
  • B j+1 is the transmission bandwidth of the j+1th storage node
  • K 0 is the data block size allocated by the unit bandwidth.
  • the source node 102 transmits data to be stored to the storage node 104 of the N storage nodes 104 to the storage node 104 of the N storage nodes 104.
  • the maximum delay allowed by the storage node 104 is sequentially determined by predicting the data block access time. According to the delay, selecting the appropriate storage node 104 can effectively utilize the resources of the distributed network, and can comprehensively consider the delay of the storage node 104 on the basis of ensuring the continuous download of the data block, without having to select the delay each time.
  • the small storage node 104 implements load balancing of the distributed network.
  • the download time of the data block is continuous, and the download time of the final data access is:
  • an access request is sent to the storage node 104 storing the data block, where the access request instructs the first storage node to immediately send a data block, indicating the j+1th storage. Node waiting
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node 104
  • B i is used to represent the i th storage node 104
  • the transmission bandwidth, L j+1 is used to represent the delay of the j+1th target node, and j is a positive integer greater than 1.
  • the node information further includes a size of a remaining storage space of the corresponding storage node 104, and the source node 102 allocates a data block to the corresponding storage node 104 within a range of the remaining storage space size, and the size of the allocated data block. It is not larger than the size of the remaining storage space of the corresponding storage node 104.
  • a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access.
  • Time has realized the rational use of resources.
  • FIG. 2 is an exemplary flowchart of a data storage method 200 according to an embodiment of the present invention.
  • the method 200 is applied to a distributed storage system for storing data of a source node to be stored in a distributed storage system, as shown in FIG.
  • method 200 includes:
  • the source node determines N storage nodes from the distributed storage system, where N is a positive integer greater than 1.
  • the source node acquires bandwidth information of each storage node of the N storage nodes, where bandwidth information of each of the N storage nodes is the one of the N storage nodes.
  • the transmission bandwidth is a bandwidth reserved by the system for each of the N storage nodes to a data transmission path of the source node, and is an average transmission bandwidth of the data transmission path for actual data transmission. .
  • the source node determines N storage nodes from the distributed storage system, including: the source node, according to bandwidth information of the M storage nodes, from the M The N storage nodes are selected among the storage nodes.
  • the source node determines N storage nodes from the distributed storage system, including: the source node acquires M storage nodes in the distributed storage system. Power consumption information, the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than or equal to N; the source node is according to the M The power consumption information of the storage node is selected from the M storage nodes.
  • the source node determines N storage nodes from the distributed storage system, including: the source node acquires M storage nodes in the distributed storage system.
  • the delay information, M is a positive integer greater than or equal to N; the source node selects the N storage nodes from the M storage nodes according to the delay information of the M storage nodes.
  • the source node selects the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, including: the source node. And selecting, by the M storage nodes, the N storage nodes that meet the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or equal to the previous p storage nodes.
  • the sum of the sum of the data download times and the delay of the first one of the N storage nodes, the p being a positive integer increasing from 1 to N-1. .
  • the source node sequentially determines the p+1th storage node from the M storage nodes, selecting one storage node as the p+1th storage node from the storage nodes satisfying the following conditions:
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node
  • B i is used to represent the transmission bandwidth of the i th storage node
  • L p+1 is used to represent the delay of the p+1th target node.
  • the source node selects, from the M storage nodes, the N storage nodes that meet the first condition, and the source node includes the M storage nodes. a first storage node as a first one of the N storage nodes; the source node removes from the M storage nodes a storage node other than the first storage node according to from 2 to N
  • the remaining N-1 storage nodes are sequentially determined in sequence, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node according to the delay information, or the bandwidth information. Or the power consumption information selects one storage node from the M storage nodes as the first storage node.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a delay from the plurality of storage nodes.
  • the storage node with the smallest sum of data block download times serves as the first storage node, that is, satisfies
  • the storage node with the smallest value is the first storage node.
  • L is the delay of the storage node
  • K is the data block size allocated to the storage node
  • B is the transmission bandwidth of the storage node.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects a delay from the M storage nodes.
  • the smallest storage node, or a storage node having the largest transmission bandwidth or the smallest transmission power consumption, is selected as the first storage node from among the L storage nodes having the smallest delay among the M storage nodes, where L is a positive integer greater than 1.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a transmission function from the M storage nodes.
  • the storage node with the smallest consumption, or the storage node with the smallest transmission bandwidth or the smallest delay among the L storage nodes with the smallest transmission power among the M storage nodes, is the first storage node, where L is a positive integer greater than 1. .
  • the source node uses the first storage node of the M storage nodes as the N
  • the first storage node of the storage nodes includes: the source node selects a storage node with the largest transmission bandwidth from the M storage nodes, or selects one of the L storage nodes with the largest transmission bandwidth among the M storage nodes.
  • a storage node having a minimum delay or a minimum transmission power consumption is used as the first storage node, where L is a positive integer greater than one.
  • the source node determines the xth storage node from the storage nodes other than the first storage node from the M storage nodes, if the source node determines at least two that satisfy the first condition An alternate storage node, wherein the source node further selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node according to a delay, or a transmission bandwidth, or a transmission power consumption, wherein , x is greater than or equal to 2 and less than or equal to N.
  • the source node selects the storage node with the largest delay from the at least two candidate storage nodes that satisfy the first condition, or the L with the largest delay from the at least two candidate storage nodes that satisfy the first condition.
  • a storage node having the largest transmission bandwidth or the smallest transmission power consumption is selected as the xth storage node, where L is a positive integer greater than 1.
  • the source node selects the storage node with the largest transmission bandwidth from the at least two candidate storage nodes that satisfy the first condition, or the transmission bandwidth from the at least two candidate storage nodes that satisfy the first condition.
  • the L storage nodes a storage node having the largest delay or the smallest transmission power consumption is selected as the xth storage node, where L is a positive integer greater than 1.
  • the source node selects a storage node with the smallest transmission power consumption from at least two candidate storage nodes that satisfy the first condition, or transmits power consumption from at least two candidate storage nodes that satisfy the first condition.
  • a storage node having the largest delay or the largest transmission bandwidth is selected as the xth storage node, where L is a positive integer greater than 1.
  • the source node determines the basis of the xth storage node to be various, and the embodiment of the present invention is merely an example and is not limited thereto.
  • the method for the source node to obtain the power consumption information, or the delay information, or the bandwidth information of each of the N storage nodes is described in the system embodiment of FIG. 1 , and details are not described herein again.
  • S206 The source node allocates, according to the data to be stored and the bandwidth information of each of the N storage nodes, the corresponding storage node to each of the N storage nodes. Stored data.
  • the source node is configured as the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes.
  • Each of the storage nodes is configured to allocate corresponding data to be stored, including: the source node respectively assigns corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storages
  • the size of the data to be stored allocated by the jth storage node in the node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a slave 1 increments one by one to a positive integer of J.
  • the source node allocates a data block to each of the N storage nodes according to a transmission bandwidth of each of the N storage nodes, and the size of the data block is positively related to the transmission bandwidth. relationship.
  • each storage node can be allocated a data block according to the bandwidth ratio, and the allocation basis is as follows:
  • K i is the data block size allocated by the i th storage node
  • B i is the transmission bandwidth of the i th storage node
  • K is the size of the entire data.
  • the proportional relationship in Equation 11 is only a specific implementation of the positive correlation. In the specific implementation process, the actual data block size can be adjusted on the basis of Equation 1. It should be understood that the positive proportional relationship of Equation 1 is not an absolute proportional relationship because of the limitation of the minimum division unit of data. Embodiments of the present invention allow adjustment of the data block size on the basis of Equation 1.
  • the source node can also set the data block size K 0 of the unit bandwidth allocation, and the allocation basis can be as follows:
  • K i is the data block size allocated for the i th storage node
  • B i is the transmission bandwidth of the i th storage node
  • K 0 is the data block size allocated for the unit bandwidth
  • the source node determines the N storage nodes one by one from the M storage nodes, and the source node is configured according to the data to be stored and the N The bandwidth information of each of the storage nodes is allocated to the storage node of the N storage nodes, and the data is to be stored, including: the source node is determined After the jth storage node, before determining the j+1th storage node, a data block whose size is positively correlated with the transmission bandwidth of the jth storage node is allocated to the jth storage node, j is a slave 1 is incremented one by one to a positive integer of N-1, the j+1th storage node is the next node of the jth storage node; the source node assigns the remaining portion of the data to the Nth storage node.
  • the source node determines N storage nodes from the distributed storage system, and according to the data to be stored and the bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored, including:
  • Step A The source node determines a first storage node from the M storage nodes, and allocates a data block to the first storage node according to a transmission bandwidth of the first storage node.
  • the allocating a data block to the first storage node according to the transmission bandwidth of the first storage node includes: the data node allocation that the source node has a positive correlation with the transmission bandwidth of the first storage node.
  • the data block size, B 1 is the transmission bandwidth of the first storage node
  • K 0 is the data block size allocated by the unit bandwidth.
  • Step B The source node determines the j+1th storage node from the M storage nodes, and the delay of the j+1th storage node is not greater than the download time of the data block of the first j storage nodes and the first The sum of the delays of the storage nodes. Perform step C.
  • the initial value of j is 1.
  • the source node determines the j+1th storage node
  • one of the storage nodes that satisfies the following condition is selected as the j+1th storage node:
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node
  • B i is used to represent the transmission bandwidth of the i th storage node
  • L j+1 is used to represent the time delay of the j+1th target node.
  • the source node satisfies the condition of the formula 13 from the M storage nodes, and has not yet been selected.
  • the method for determining the j+1th storage node in the storage node has been described above, and details are not described herein again.
  • Step C Determine whether the following conditions are met:
  • K is the size of the remainder of the data
  • B j+1 is the transmission bandwidth of the j+1th storage node
  • K 0 is the data block size allocated by the unit bandwidth.
  • the source node sends, to the storage node, the data to be stored allocated by the storage node of the N storage nodes to the storage node.
  • a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access.
  • Time has realized the rational use of resources.
  • FIG. 3 is an exemplary flowchart of a data storage method 300.
  • the method 300 is applied to a distributed storage system for storing data of a source node to be stored in a distributed storage system, as shown in FIG.
  • method 300 includes:
  • the source node acquires power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission function of each of the M storage nodes to the source node. Consumption, where M is a positive integer greater than one.
  • the transmission power consumption refers to the power consumption required for the transmission of the data block of the unit size from the corresponding storage node to the source node.
  • the number of hops of the data transmission path reflects the power consumption of the data transmission path when the data is transmitted. The more the number, the greater the transmission power consumption.
  • the hop count of the path from the storage node to the source node may be used to reflect the transmission power consumption of the data transmission path from the storage node to the source node.
  • the transmission power of the data transmission path is not only related to the hop count, but also related to the processing time of the data, the longer the processing time of the data, or the longer the waiting time of the data in the cache, consumes more energy.
  • the transmission delay of the data transmission path from the storage node to the source node may also be used to reflect the transmission power consumption of the corresponding storage node to the source node.
  • the transmission power consumption can be expressed in various forms, and the hop count of the data transmission path can be used. It can also be represented by the transmission delay of the data transmission path, and the actual statistics can also be performed.
  • the embodiment of the present invention is merely an example, and does not limit the expression of the transmission power consumption, and allows other transmission power consumption. Alternative expression.
  • the method for the source node to obtain the power consumption information of the M storage nodes in the distributed storage system is described in the system embodiment of FIG. 1 and will not be further described herein.
  • the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M.
  • the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including: the source node from the M Selecting N storage nodes with the smallest transmission power consumption among the storage nodes, or selecting the N storage nodes with the smallest delay or the largest transmission bandwidth among the L storage nodes with the smallest power consumption among the M storage nodes, wherein L Is a positive integer greater than N.
  • the source node determines, according to the power consumption information of the M storage nodes, the N storage nodes from the M storage nodes, where the source node obtains the delay of the M storage nodes.
  • the source node selects, from the M storage nodes, an alternate storage node that meets the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or a sum equal to a sum of a sum of data download times of the first p storage nodes and a delay of the first one of the N storage nodes, where p is a positive integer that is incremented from 1 to N-1;
  • the source node selects the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
  • the storage node that satisfies the following condition is used as the candidate storage node of the p+1th storage node:
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node
  • B i is used to represent the transmission bandwidth of the i th storage node
  • L p+1 is used to represent the delay of the p+1th target node.
  • the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including: the source node. a first storage node of the M storage nodes as a first storage node of the N storage nodes; the source node according to the power consumption information in order from 2nd to Nth The remaining N-1 storage nodes are determined in turn from the candidate storage nodes.
  • the method 300 further includes: the source node acquiring bandwidth information of each of the N storage nodes, where the N storage nodes are The bandwidth information of each storage node is the transmission bandwidth of the data transmission path of each of the N storage nodes to the source node.
  • the transmission bandwidth is a bandwidth reserved by the system for each of the N storage nodes to a data transmission path of the source node, and is an average transmission bandwidth of the data transmission path for actual data transmission. .
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node according to the delay information, or The bandwidth information, or the power consumption information, selects one storage node from the M storage nodes as the first storage node.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a delay from the plurality of storage nodes.
  • the storage node with the smallest sum of data block download times serves as the first storage node, that is, satisfies
  • the storage node with the smallest value is the first storage node.
  • L is the delay of the storage node
  • K is the data block size allocated to the storage node
  • B is the transmission bandwidth of the storage node.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects a delay from the M storage nodes.
  • the smallest storage node, or a storage node having the largest transmission bandwidth or the smallest transmission power consumption, is selected as the first storage node from among the L storage nodes having the smallest delay among the M storage nodes, where L is a positive integer greater than 1.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a transmission function from the M storage nodes.
  • the storage node with the smallest consumption, or the storage node with the smallest transmission bandwidth or the smallest delay among the L storage nodes with the smallest transmission power among the M storage nodes, is the first storage node, where L is a positive integer greater than 1. .
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects from the M storage nodes. a storage node having the largest transmission bandwidth, or a storage node having the smallest delay or the smallest transmission power consumption among the L storage nodes having the largest transmission bandwidth among the M storage nodes, wherein L is greater than 1 Integer.
  • the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects from the M storage nodes.
  • a storage node having the smallest transmission power consumption as the first storage node; or the source node selecting, as the storage node having the smallest transmission power consumption, from at least two storage nodes having the smallest delay among the M storage nodes The first storage node is described.
  • the source node determines the xth storage node from the candidate storage node according to the power consumption information, where x is a positive integer greater than 1, and the source node satisfies the first Selecting, from a candidate storage node of a condition, a storage node having the smallest transmission power consumption as the xth storage node; or, the source node is at least two storages having the largest delay from the candidate storage node satisfying the first condition In the node, the storage node with the smallest transmission power consumption is selected as the xth storage node.
  • the source node determines the xth storage node from the candidate storage node according to the power consumption information, where x is a positive integer greater than 1, and the source node satisfies the first Among the L storage nodes with the smallest transmission power consumption in the candidate storage node of one condition, the storage node with the largest delay or the largest transmission bandwidth is selected as the xth storage node, where L is a positive integer greater than 1.
  • S306 The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored.
  • the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node divides the data into N equal sizes. Data block and assign a block of data to each storage node. It will be appreciated that the data may not be equally evenly divided into N equal-sized data blocks because of the minimum partitioning unit of the data, and embodiments of the present invention allow for adjustments to the data blocks on a uniform basis.
  • the source node divides the data into N data blocks, and sorts the N data blocks according to the data, and the source node allocates the data blocks to the corresponding storage nodes, thereby ensuring the order of the data blocks, and the future. Access to data can be accessed in the order of the data blocks.
  • the source node acquires a buffer size of each of the N storage nodes, where the buffer is a corresponding storage node for receiving the number.
  • the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node will store the buffer size integer of the storage node.
  • a data block of multiple size is allocated to the corresponding storage node.
  • the source node may allocate a data block of a buffer size of the corresponding storage node to the corresponding storage node.
  • the source node if the source node allocates a data block of L size of the buffer size of the corresponding storage node to the corresponding storage node, the source node splits the data block into L sizes of the buffer size. Sub-blocks, and respectively send L sub-blocks to corresponding storage nodes, where L is a positive integer greater than one.
  • the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. .
  • the source node is the N storages according to the data to be stored and the bandwidth information of each of the N storage nodes.
  • Each of the storage nodes in the node allocates corresponding data to be stored, including: the source node allocates corresponding data to be stored to the J storage nodes of the N storage nodes, where the J
  • the size of the data to be stored allocated by the jth storage node in the storage node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is A positive integer that increments from 1 to J.
  • the source node allocates corresponding storage to be stored to each of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes.
  • the specific implementation process of the data is described in the system embodiment part of FIG. 1, and details are not described herein again.
  • the source node determines the N storage nodes one by one from the M storage nodes, after the source node determines the jth storage node, and in the The source node allocates a data block for the jth storage node before determining the j+1th storage node from the M storage nodes, where j is a positive integer greater than 0 and less than N.
  • the source node is the N storages according to the data to be stored and the bandwidth information of each of the N storage nodes.
  • Each of the storage nodes in the node allocates corresponding data to be stored, including: a source node Before determining the j+1th storage node, a data block whose size is positively correlated with the transmission bandwidth of the jth storage node is allocated to the jth storage node, and j is incremented from 1 to N-1 A positive integer, the j+1th storage node is the next node of the jth storage node; the source node allocates the remaining portion of the data to the Nth storage node.
  • the source node determines the N storage nodes from the M storage nodes according to the transmission power consumption, and allocates data blocks for each of the N storage nodes, including:
  • Step A The source node determines a first storage node from the M storage nodes according to the transmission power consumption, and allocates a data block to the first storage node.
  • the source node selecting, from the M storage nodes, the storage node with the smallest transmission power consumption as The first storage node.
  • the source node determines, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, that: the source node selects, from the L storage nodes with the smallest delay of the M storage nodes.
  • the storage node with the smallest transmission power consumption is referred to as the first storage node, where L is a positive integer greater than one.
  • determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption where the source node is the L storage nodes with the largest transmission bandwidth from the M storage nodes.
  • the storage node with the smallest transmission power consumption is selected as the first storage node, where L is a positive integer greater than 1.
  • the determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, where the source node has the least L storage node from the M storage nodes The storage node with the largest transmission bandwidth or the smallest delay is selected as the first storage node, where L is a positive integer greater than 1.
  • the source node determines the basis of the first storage node from the M storage nodes according to the transmission power consumption.
  • the embodiments of the present invention are merely examples and are not limited thereto.
  • the allocating the data block to the first storage node by the source node includes: the source node allocating the data block to the first storage node according to the transmission bandwidth of the first storage node.
  • the source node allocates a data block whose size is positively related to the transmission bandwidth of the first storage node to the first storage node.
  • the data block size, B 1 is the transmission bandwidth of the first storage node
  • K 0 is the data block size allocated by the unit bandwidth.
  • Step B The source node determines, according to the transmission power consumption, a j+1th storage node from the M storage nodes, where the delay of the j+1th storage node is not greater than that of the previous j storage nodes. The sum of the download time of the block and the delay of the first storage node. Perform step C.
  • the initial value of j is 1.
  • the candidate storage node of the j+1th storage node is determined according to the following conditions:
  • L 1 is used to represent the time delay of the first storage node
  • K i is used to represent the data block size allocated for the i th storage node
  • B i is used to represent the transmission bandwidth of the i th storage node
  • L j+1 is used to represent the time delay of the j+1th target node.
  • the source node satisfies the condition of Equation 17 from the M storage nodes, and the node that has determined that the transmission power consumption is the smallest among the storage nodes that have not been selected is the j+1th storage node.
  • the source node satisfies the condition of the formula 17 from the M storage nodes, and the node with the smallest transmission power is determined as the j+1th storage among the L storage nodes with the largest delay among the storage nodes that have not yet been selected.
  • L is a positive integer greater than one.
  • the source node satisfies the condition of the formula 17 from the M storage nodes, and the node with the smallest transmission power is determined as the j+1th storage among the L storage nodes with the largest transmission bandwidth among the storage nodes that have not yet been selected.
  • L is a positive integer greater than one.
  • the source node satisfies the condition of the formula 9 from the M storage nodes, and the node with the smallest delay or the largest transmission bandwidth is determined as the jth among the L storage nodes with the smallest transmission power among the storage nodes that have not yet been selected.
  • the source node determines the basis of the j+1th storage node from the M storage nodes according to the transmission power consumption.
  • the embodiments of the present invention are merely examples and are not limited thereto.
  • Step C Determine whether the following conditions are met:
  • the final value of j is N-1.
  • K is the size of the remainder of the data
  • B j+1 is the transmission bandwidth of the j+1th storage node
  • K 0 is the data block size allocated by the unit bandwidth
  • the source node sends, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
  • determining the storage node for storing data according to the transmission power consumption is prioritized by selecting a storage node with a smaller transmission power consumption, thereby reducing energy consumption when the source node accesses data.
  • FIG. 4 is a schematic diagram showing the logical structure of a data storage device 400 according to an embodiment of the present invention.
  • the device 400 is applied to a distributed storage system for storing data to be stored in the device 400 in a distributed storage system, such as As shown in FIG. 4, the apparatus 400 includes a determining unit 402, an obtaining unit 404, an allocating unit 406, and a transmitting unit 408.
  • a determining unit 402 configured to determine N storage nodes from the distributed storage system, where N is a positive integer greater than one;
  • An obtaining unit 404 configured to acquire bandwidth information of each of the N storage nodes, where bandwidth information of each of the N storage nodes is the one of the N storage nodes The transmission bandwidth of the data transmission path from each storage node to the source node;
  • the allocating unit 406 is configured to allocate a corresponding one of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. Data to be stored;
  • the sending unit 408 is configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
  • the allocating unit 406 is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, the each of the N storage nodes.
  • the storage node allocates corresponding data to be stored, including: the allocating unit 406 is configured to respectively allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storage nodes are The size of the data to be stored allocated by the jth storage node and the jth The transmission bandwidth of the storage node is in a positive correlation, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
  • the obtaining unit 404 is further configured to acquire power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is each storage node of the M storage nodes.
  • the transmission power consumption of the source node, M is a positive integer greater than or equal to N;
  • the determining unit 402 is configured to determine N storage nodes from the distributed storage system, and the determining unit 402 is configured to use the M
  • the power consumption information of the storage node is selected from the M storage nodes.
  • the obtaining unit 404 is further configured to acquire delay information of M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N; the determining unit 402 is configured to use the distribution Determining, by the storage system, the N storage nodes, the determining unit 402, configured to select the N storage nodes from the M storage nodes according to the delay information of the M storage nodes.
  • the determining unit 402 is configured to select the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, where the determining unit 402 is configured to use the The M storage nodes select the N storage nodes that satisfy the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or equal to the data of the previous p storage nodes.
  • the sum of the sum of the download times and the delay of the first one of the N storage nodes, the p being a positive integer increasing from 1 to N-1. .
  • the determining unit 402 is configured to select, from the M storage nodes, the N storage nodes that satisfy the first condition, wherein the determining unit 402 is configured to use the first one of the M storage nodes. a storage node as the first storage node of the N storage nodes; the determining unit 402 is configured to remove the storage nodes other than the first storage node from the M storage nodes according to from 2 to N The sequence sequentially determines the remaining N-1 storage nodes, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
  • the determining unit 402 is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the determining unit 402 is configured to use the The delay information, or the bandwidth information, or the power consumption information, selects one storage node from the M storage nodes as the first storage node.
  • the determining unit 402 when determining the xth storage node from the storage nodes except the first storage node from the M storage nodes, if the determining unit 402 determines that at least two of the first conditions are met Alternative storage nodes, the determining unit 402 is further configured to transmit according to time delay or The bandwidth, or the transmission power consumption, selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
  • the embodiment of the present invention corresponds to the method embodiment of FIG. 2, and the feature description of the embodiment of FIG. 2 is applicable to the embodiment of the present invention, and details are not described herein again.
  • a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access.
  • Time has realized the rational use of resources.
  • FIG. 5 is a schematic diagram of a logical structure of a data storage device 500.
  • the device 500 is applied to a distributed storage system for storing data to be stored in the device 500 in a distributed storage system.
  • the apparatus 500 includes an acquisition unit 502, a determination unit 504, an allocation unit 506, and a transmission unit 508.
  • the obtaining unit 502 is configured to acquire power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission function of each of the M storage nodes to the source node Consumption, where M is a positive integer greater than one;
  • a determining unit 504 configured to determine N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M;
  • the allocating unit 506 is configured to allocate corresponding data to be stored to each of the N storage nodes according to the data to be stored;
  • the sending unit 508 is configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
  • the obtaining unit 502 is further configured to acquire delay information of the M storage nodes, where the determining unit 504 is configured to use, according to the power consumption information of the M storage nodes, the M storage nodes.
  • Determining N storage nodes including: the determining unit 504 is configured to select, from the M storage nodes, an candidate storage node that meets a first condition with a delay, wherein the delay satisfies the first condition: p
  • the delay of the +1 storage node is less than or equal to the sum of the sum of the data download time of the previous p storage nodes and the delay of the first storage node of the N storage nodes, where p is one by one
  • the positive unit is incremented to N-1; the determining unit 504 is configured to select the N storage nodes from the candidate storage nodes according to the power consumption information of the candidate storage node.
  • the determining unit 504 is configured to determine N storage nodes from the M storage nodes according to the power consumption information of the M storage nodes, where the determining unit 504 is configured to use the M
  • the first storage node among the storage nodes is the first one of the N storage nodes a storage node; the determining unit 504 is configured to sequentially determine remaining N-1 storage nodes from the candidate storage nodes according to the power consumption information in order from 2nd to Nth.
  • the determining unit 504 is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the determining unit 504 is configured to use the Selecting, from the M storage nodes, a storage node having the smallest transmission power consumption as the first storage node; or selecting, from the at least two storage nodes having the smallest delay among the M storage nodes, the storage with the smallest transmission power consumption The node acts as the first storage node.
  • the determining unit 504 is configured to determine, according to the power consumption information, the xth storage node from the candidate storage node, where x is a positive integer greater than 1, and the determining unit 504 is used by Selecting, from the candidate storage nodes satisfying the first condition, a storage node having the smallest transmission power consumption as the xth storage node; or selecting at least two of the candidate storage nodes satisfying the first condition to have the largest delay Among the storage nodes, the storage node with the smallest transmission power consumption is selected as the xth storage node.
  • the obtaining unit 502 is further configured to acquire bandwidth information of each of the N storage nodes, where bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node; the allocation unit 506 is configured to: according to the data to be stored, to the N storage nodes Each storage node allocates corresponding data to be stored, including: the allocating unit 506 is configured to: according to the data to be stored and the bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored.
  • the allocating unit 506 is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, the each of the N storage nodes.
  • the storage node allocates corresponding data to be stored, including: the allocating unit 506 is configured to allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storage nodes are The size of the data to be stored allocated by the jth storage node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is incremented from 1 to 1 A positive integer to J.
  • the embodiment of the present invention corresponds to the method embodiment of FIG. 3, and the feature description of the embodiment of FIG. 3 is applicable to the embodiment of the present invention, and details are not described herein again.
  • the storage node for storing data is determined according to the transmission power consumption, and the storage node with less transmission power consumption is selected, thereby reducing the source node access.
  • FIG. 6 is a schematic diagram showing the hardware structure of a data storage device 600 according to an embodiment of the invention.
  • data storage device 600 includes a processor 602, a memory 604, an input/output interface 606, a communication interface 608, and a bus 610.
  • the processor 602, the memory 604, the input/output interface 606, and the communication interface 608 implement a communication connection with each other through the bus 610.
  • the processor 602 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the memory 604 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
  • Memory 604 can store operating systems and other applications.
  • the program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 604 and executed by the processor 602.
  • the input/output interface 606 is for receiving input data and information, and outputting data such as operation results.
  • Communication interface 608 implements communication between data storage device 600 and other devices or communication networks using transceivers such as, but not limited to, transceivers.
  • Bus 610 can include a path for communicating information between various components of data storage device 600, such as processor 602, memory 604, input/output interface 606, and communication interface 608.
  • meter data storage device 600 shown in FIG. 6 only shows the processor 602, the memory 604, the input/output interface 606, the communication interface 608, and the bus 610, in a specific implementation process, those skilled in the art It should be understood that data storage device 600 also includes other devices necessary to achieve proper operation. Also, those skilled in the art will appreciate that data storage device 600 may also include hardware devices that implement other additional functions, depending on the particular needs. Moreover, those skilled in the art will appreciate that data storage device 600 may also only include the components necessary to implement embodiments of the present invention without necessarily including all of the devices shown in FIG.
  • FIG. 6 and the above description are applicable to various data storage devices and systems provided by the embodiments of the present invention, and are suitable for performing various data storage methods provided by the embodiments of the present invention.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division, and may be implemented in another manner, for example, multiple modules or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of hardware plus software function modules.
  • the above-described integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium.
  • the software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform some of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like. The medium of the code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data storage method, device and system, which are used for storing data to be stored of a source node in a distributed storage system in a distributed manner. The method comprises: determining N storage nodes from the distributed storage system (S202); acquiring bandwidth information about each storage node in the N storage nodes (S204), wherein the bandwidth information about each storage node is a transmission bandwidth of a data transmission path from each storage node to the source node; according to the data to be stored and the bandwidth information about each storage node, allocating corresponding data to be stored to each storage node (S206); and sending the data to be stored allocated to each storage node to each storage node (S208). According to the transmission bandwidth, a data block size is allocated to each storage node, and a larger data block is allocated to a storage node with a large transmission bandwidth, so as to improve the efficiency of data transmission, and shorten the access time of data, thereby achieving the rational utilization of resources.

Description

一种数据存储方法、装置和系统Data storage method, device and system 技术领域Technical field
本发明实施例涉及计算机领域,尤其涉及一种数据存储方法、装置和系统。Embodiments of the present invention relate to the field of computers, and in particular, to a data storage method, apparatus, and system.
背景技术Background technique
存储速度在过去几年中有了显著的提高,例如现今主流的固态硬盘(Solid State Drive,SSD)能够提供比传统硬盘存储(Hard Disk Drive,HDD)的接入速度有10倍以上的提升。但相比存储,近几年来网络速度的提升也是达到10倍之多,直到今日,存储速度仍一直落后于网络传输速度。Storage speeds have improved dramatically over the past few years. For example, today's mainstream Solid State Drives (SSDs) offer up to 10 times more access speeds than traditional Hard Disk Drives (HDDs). However, compared with storage, the speed of the network has increased by 10 times in recent years. Until today, the storage speed has still lagged behind the network transmission speed.
随着信息和数据的爆炸性增长,对存储容量的需求也达到了前所未有的高度。传统存储系统和存储网络在面对如今这种超大容量的需求时显得力不从心,即便能够满足需求,但是其高昂的造价也成为了壁垒。With the explosive growth of information and data, the demand for storage capacity has reached an unprecedented height. Traditional storage systems and storage networks are not able to meet the demands of today's ultra-large capacity. Even if they can meet the demand, their high cost has become a barrier.
随着分布式数据架构应用于云存储系统中,存储节点可以部署在网络的不同位置,为了充分利用分布式存储网络的速度,数据被分为多个数据块,并存储在不同的存储节点中,从而实现对多个存储节点的并行访存。As a distributed data architecture is applied to a cloud storage system, storage nodes can be deployed at different locations on the network. To fully utilize the speed of the distributed storage network, the data is divided into multiple data blocks and stored in different storage nodes. To achieve parallel access to multiple storage nodes.
现有技术中,在分布式存储网络中一般将数据分为大小相同的数据块,并为数据块随机或者基于最小时延策略选择对应的存储节点,然后将数据块存储于不同的存储节点。随着存储规模的快速增长,为了应对网络流量的高速增长,大量高耗能器件的数量也随之增长,现有技术中均分数据块,以及为数据块随机选取存储节点或最小时延策略已经无法满足实际应用的需求,需要对分布式存储方法进行进一步的优化。In the prior art, data is generally divided into data blocks of the same size in a distributed storage network, and corresponding storage nodes are selected for random data blocks or based on a minimum delay policy, and then the data blocks are stored in different storage nodes. With the rapid growth of storage scale, in order to cope with the rapid growth of network traffic, the number of high-energy-consuming devices has also increased. In the prior art, data blocks are equally divided, and storage nodes or minimum delay strategies are randomly selected for data blocks. It has been unable to meet the needs of practical applications, and further optimization of distributed storage methods is needed.
发明内容Summary of the invention
有鉴于此,本发明实施例提供了一种数据存储方法、装置和系统,实现了分布式存储方法的优化。In view of this, embodiments of the present invention provide a data storage method, apparatus, and system, which implement optimization of a distributed storage method.
第一方面,本发明实施例提供了一种数据存储方法,用于将源节点的待存储的数据分布存储到分布式存储系统中,包括:所述源节点从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数;所述源节点获取 所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据;所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。In a first aspect, an embodiment of the present invention provides a data storage method for storing a data distribution of a source node to be stored in a distributed storage system, including: the source node determining N from the distributed storage system. Storage nodes, where N is a positive integer greater than 1; the source node obtains Bandwidth information of each of the N storage nodes, the bandwidth information of each of the N storage nodes is the each of the N storage nodes to the The transmission bandwidth of the data transmission path of the source node; the source node is the one of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes Each storage node allocates corresponding data to be stored; the source node sends data to be stored allocated by each of the N storage nodes to the N storage nodes Each storage node is described.
结合第一方面,在第一方面第一种可能的实现方式中,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述源节点为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。With reference to the first aspect, in a first possible implementation manner of the first aspect, the source node is configured according to the data to be stored and the bandwidth information of each of the N storage nodes. Each of the N storage nodes is configured to allocate corresponding data to be stored, and the source node respectively allocates corresponding data to be stored to the J storage nodes of the N storage nodes, where The size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N. , j is a positive integer increasing from 1 to J one by one.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第二种可能的实现方式中,所述源节点从所述分布式存储系统确定N个存储节点,包括:所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。With reference to the first aspect, or any one of the foregoing possible implementation manners, in the second possible implementation manner of the first aspect, the source node determines, from the distributed storage system, N storage nodes, including: Determining, by the source node, power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where a positive integer greater than or equal to N; the source node selects the N storage nodes from the M storage nodes according to power consumption information of the M storage nodes.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第三种可能的实现方式中,所述源节点从所述分布式存储系统确定N个存储节点,包括:所述源节点获取所述分布式存储系统中的M个存储节点的时延信息,M为大于等于N的正整数;所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。With reference to the first aspect, or any one of the foregoing possible implementation manners, in a third possible implementation manner of the first aspect, the source node determines, from the distributed storage system, N storage nodes, including: Determining the delay information of the M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N; and the source node is based on the delay information of the M storage nodes from the M The N storage nodes are selected among the storage nodes.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第四种可能的实现方式中,所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从 1逐一递增到N-1的正整数。.With reference to the first aspect, or any one of the foregoing possible implementation manners, in the fourth possible implementation manner of the first aspect, the source node, according to the delay information of the M storage nodes, from the M Selecting the N storage nodes from the storage nodes, the source node selecting, from the M storage nodes, the N storage nodes that meet the first condition, wherein the delay meets the first condition: The delay of the p+1th storage node is less than or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes, where p is 1 is incremented by one to a positive integer of N-1. .
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第五种可能的实现方式中,所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。With reference to the first aspect, or any one of the foregoing possible implementation manners, in the fifth possible implementation manner of the first aspect, the source node selects, from the M storage nodes, a delay that satisfies the first condition Storage nodes, comprising: said source node as a first one of said N storage nodes as said first storage node of said M storage nodes; said source node being removed from said M storage nodes The remaining N-1 storage nodes are sequentially determined in the order from 2 to N in the storage nodes other than the first storage node, wherein each of the remaining N-1 storage nodes The delay meets the first condition.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第六种可能的实现方式中,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述源节点根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。With reference to the first aspect, or any one of the foregoing possible implementation manners, in the sixth possible implementation manner of the first aspect, the source node, the first storage node of the M storage nodes is used as the a first storage node of the N storage nodes, comprising: the source node selecting a storage node from the M storage nodes according to the delay information, or the bandwidth information, or the power consumption information The first storage node.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第七种可能的实现方式中,在所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述源节点确定了满足所述第一条件的至少两个备选存储节点,所述源节点进一步根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。With reference to the first aspect, or any one of the foregoing possible implementation manners, in the seventh possible implementation manner of the first aspect, the source node removes the first storage node from the M storage nodes When determining the xth storage node in the outer storage node, if the source node determines at least two candidate storage nodes that satisfy the first condition, the source node further transmits the bandwidth according to the delay, or the transmission bandwidth The power consumption selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
第二方面,本发明实施例提供了一种计算设备可读介质,包括计算设备执行指令,当计算设备的处理器执行所述计算设备执行指令时,所述计算设备执行第一方面或第一方面任一种可能的实现方式所述的方法。In a second aspect, an embodiment of the present invention provides a computing device readable medium, including a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performs the first aspect or the first Aspect of any of the possible implementations of the method.
第三方面,本发明实施例提供了一种数据存储装置,包括:处理器、存储器、总线和通信接口;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据存储装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述数据存储装置执行第一方面或第一方面任一种可能的实现方式所述的方法。In a third aspect, an embodiment of the present invention provides a data storage device, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer to execute an instruction, and the processor and the memory pass the bus Connecting, when the data storage device is in operation, the processor executing the computer-executed instructions stored by the memory to cause the data storage device to perform the first aspect or any of the possible implementations of the first aspect The method described.
第四方面,本发明实施例提供了一种数据存储方法,用于将源节点的待存储的数据分布存储到分布式存储系统中,包括:所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数; 所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数;所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据;所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。In a fourth aspect, the embodiment of the present invention provides a data storage method, where the data of the source node to be stored is distributed to the distributed storage system, including: the source node acquiring the distributed storage system. Power consumption information of M storage nodes, the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than 1; Determining, by the source node, N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M; Determining the stored data, assigning each of the N storage nodes a corresponding data to be stored; the source node assigns each of the N storage nodes to the storage node The stored data is sent to each of the N storage nodes.
结合第四方面,在第四方面第一种可能的实现方式中,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述源节点获取所述M个存储节点的时延信息;所述源节点从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;所述源节点根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the source node determines, according to the power consumption information of the M storage nodes, the N storage nodes from the M storage nodes, including: The source node acquires delay information of the M storage nodes; the source node selects, from the M storage nodes, an alternative storage node that meets a first condition, wherein the delay satisfies the first condition The delay of the p+1th storage node is less than or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes, the p A positive integer that is incremented from 1 to N-1; the source node selects the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第二种可能的实现方式中,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述源节点根据所述功耗信息按照从第2到第N的顺序依次从所述备选存储节点中确定剩下的N-1个存储节点。With reference to the fourth aspect, or any one of the foregoing possible implementation manners, in the second possible implementation manner of the fourth aspect, the source node, according to the power consumption information of the M storage nodes, from the M Determining N storage nodes among the storage nodes, comprising: the source node using a first storage node of the M storage nodes as a first storage node of the N storage nodes; The power consumption information sequentially determines the remaining N-1 storage nodes from the candidate storage nodes in order from the 2nd to the Nth.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第三种可能的实现方式中,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述源节点从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,所述源节点从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。With reference to the fourth aspect, or any one of the foregoing possible implementation manners of the fourth aspect, in the third possible implementation manner, the source node, the first storage node of the M storage nodes is used as the a first storage node of the N storage nodes, the source node selects, as the first storage node, a storage node with the smallest transmission power consumption from the M storage nodes; or the source node Among the M storage nodes having the smallest delay among the M storage nodes, the storage node with the smallest transmission power consumption is selected as the first storage node.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第四种可能的实现方式中,在所述源节点根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,所述源节点从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,所述源节点从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。 With reference to the fourth aspect, or any one of the foregoing possible implementation manners of the fourth aspect, in the fourth possible implementation manner of the fourth aspect, the source node determines, according to the power consumption information, from the candidate storage node The xth storage node, where x is a positive integer greater than 1, the source node selects, from the candidate storage nodes satisfying the first condition, a storage node having the smallest transmission power consumption as the xth storage node; or And the source node selects, as the xth storage node, the storage node with the smallest transmission power consumption among the at least two storage nodes with the largest delay among the candidate storage nodes that satisfy the first condition.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第五种可能的实现方式中,还包括:所述源节点获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。With reference to the fourth aspect, or any one of the foregoing possible implementation manners, the fourth possible implementation manner of the fourth aspect, further comprising: the source node acquiring the each of the N storage nodes The bandwidth information of the storage node, the bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node according to the data to be stored and the The bandwidth information of each of the N storage nodes is allocated to the storage node to be stored for the storage node.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第六种可能的实现方式中,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述源节点为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。With reference to the fourth aspect, or any one of the foregoing possible implementation manners of the fourth aspect, in the sixth possible implementation manner of the fourth aspect, the source node is configured according to the data to be stored and the N storage nodes The bandwidth information of each storage node is allocated to the storage node of the N storage nodes, where the data is to be stored, including: the source node is J of the N storage nodes. The storage node allocates corresponding data to be stored, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node. J is a positive integer greater than 1 and less than or equal to N, and j is a positive integer increasing from 1 to J one by one.
第五方面,本发明实施例提供了一种计算设备可读介质,包括计算设备执行指令,当计算设备的处理器执行所述计算设备执行指令时,所述计算设备执行第四方面或第四方面任一种可能的实现方式所述的方法。In a fifth aspect, an embodiment of the present invention provides a computing device readable medium, including a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performs the fourth aspect or the fourth Aspect of any of the possible implementations of the method.
第六方面,本发明实施例提供了一种数据存储装置,包括:处理器、存储器、总线和通信接口;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据存储装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述数据存储装置执行第四方面或第四方面任一种可能的实现方式所述的方法。In a sixth aspect, an embodiment of the present invention provides a data storage device, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer to execute an instruction, and the processor and the memory pass the bus Connecting, when the data storage device is in operation, the processor executing the computer-executed instructions stored by the memory to cause the data storage device to perform any of the possible implementations of the fourth aspect or the fourth aspect The method described.
第七方面,本发明实施例提供了一种数据存储装置,用于将待存储的数据分布存储到分布式存储系统中,包括:确定单元,用于从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数;获取单元,用于获取所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;分配单元,用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储 节点中的所述每个存储节点分配对应的待存储的数据;发送单元,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。In a seventh aspect, the embodiment of the present invention provides a data storage device, configured to store data to be stored in a distributed storage system, including: a determining unit, configured to determine N storages from the distributed storage system. a node, where N is a positive integer greater than 1; an obtaining unit, configured to acquire bandwidth information of each of the N storage nodes, and bandwidth information of each of the N storage nodes a transmission bandwidth of a data transmission path of the storage node to the source node of each of the N storage nodes; an allocation unit, configured to use, according to the data to be stored, and the N storage nodes Describe the bandwidth information of each storage node, for the N storages Each of the storage nodes in the node allocates corresponding data to be stored; the sending unit is configured to send, to the N, data to be stored allocated by each of the N storage nodes Each of the storage nodes in the storage node.
结合第七方面,在第七方面第一种可能的实现方式中,所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述分配单元用于为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。With reference to the seventh aspect, in a first possible implementation manner of the seventh aspect, the allocating unit is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, Allocating corresponding data to be stored to each of the N storage nodes, the: the allocation unit is configured to respectively allocate corresponding storage to be saved to the J storage nodes of the N storage nodes Data, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is greater than 1 and less than or equal to A positive integer of N, which is a positive integer that increases from 1 to J one by one.
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第二种可能的实现方式中,所述获取单元还用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;所述确定单元用于从所述分布式存储系统确定N个存储节点包括:所述确定单元用于根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。With reference to the seventh aspect, or any one of the foregoing possible implementation manners of the seventh aspect, in the second possible implementation manner of the seventh aspect, the acquiring unit is further configured to acquire M storage nodes in the distributed storage system Power consumption information, which is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than or equal to N; the determining unit is used to Determining the N storage nodes by the distributed storage system includes: the determining unit, configured to select the N storage nodes from the M storage nodes according to power consumption information of the M storage nodes.
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第三种可能的实现方式中,所述获取单元还用于获取所述分布式存储系统中的M个存储节点的时延信息,M为大于等于N的正整数;所述确定单元用于从所述分布式存储系统确定N个存储节点包括:所述确定单元用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。With reference to the seventh aspect, or any one of the foregoing possible implementation manners, the acquiring unit is further configured to acquire M storage nodes in the distributed storage system, in a third possible implementation manner of the seventh aspect, Delay information, M is a positive integer greater than or equal to N; the determining unit is configured to determine N storage nodes from the distributed storage system, and the determining unit is configured to use a delay according to the M storage nodes Information, selecting the N storage nodes from the M storage nodes.
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第四种可能的实现方式中,所述确定单元用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:所述确定单元用于从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。.With reference to the seventh aspect, or any one of the foregoing possible implementation manners of the seventh aspect, in the fourth possible implementation manner of the seventh aspect, the determining unit is configured to: according to the delay information of the M storage nodes, Selecting the N storage nodes from the M storage nodes, the determining unit is configured to select, from the M storage nodes, N storage nodes that satisfy a first condition, wherein the delay satisfies A condition is: the delay of the p+1th storage node is less than or equal to the sum of the sum of the data download time of the previous p storage nodes and the delay of the first storage node of the N storage nodes, The p is a positive integer that increases from 1 to N-1. .
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第五种可能的实现方式中,所述确定单元用于从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:所述确定单元用于将所述M个存储节点 中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述确定单元用于从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。With reference to the seventh aspect, or any one of the foregoing possible implementation manners of the seventh aspect, in the fifth possible implementation manner of the seventh aspect, the determining unit is configured to select a delay from the M storage nodes to satisfy the first condition N storage nodes, including: the determining unit is configured to use the M storage nodes a first storage node as the first one of the N storage nodes; the determining unit is configured to remove the storage node other than the first storage node from the M storage nodes according to The sequence of N determines the remaining N-1 storage nodes in turn, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第六种可能的实现方式中,所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述确定单元用于根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。With reference to the seventh aspect, or any one of the foregoing possible implementation manners of the seventh aspect, in the sixth possible implementation manner of the seventh aspect, the determining unit is configured to use the first storage node of the M storage nodes as The first storage node of the N storage nodes, the determining unit, configured to select, according to the delay information, or the bandwidth information, or the power consumption information, from the M storage nodes A storage node acts as the first storage node.
结合第七方面或第七方面以上任一种可能的实现方式,在第七方面第七种可能的实现方式中,在从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述确定单元确定了满足所述第一条件的至少两个备选存储节点,所述所述确定单元还用于根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。With reference to the seventh aspect, or any one of the foregoing possible implementation manners of the seventh aspect, in the seventh possible implementation manner of the seventh aspect, the storage node other than the first storage node is removed from the M storage nodes When determining the xth storage node, if the determining unit determines at least two candidate storage nodes that satisfy the first condition, the determining unit is further configured to use a delay, or a transmission bandwidth, or transmit The power consumption selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
第八方面,本发明实施例提供了一种数据存储系统,包含如第七方面或第七方面任一种可能的实现方式所述的数据存储装置和多个存储节点,用于将所述数据存储装置的数据分布存储于所述多个存储节点中的N个存储节点,其中N为大于1的正整数。The eighth aspect, the embodiment of the present invention provides a data storage system, comprising the data storage device and the plurality of storage nodes according to any one of the seventh aspect or the seventh aspect, for using the data The data distribution of the storage device is stored in N storage nodes of the plurality of storage nodes, where N is a positive integer greater than one.
第九方面,本发明实施例提供了一种数据存储装置,用于将待存储的数据分布存储到分布式存储系统中,包括:获取单元,用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数;确定单元,用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数;分配单元,用于根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据;发送单元,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。According to a ninth aspect, an embodiment of the present invention provides a data storage device, configured to store data to be stored in a distributed storage system, including: an acquiring unit, configured to acquire M devices in the distributed storage system. The power consumption information of the storage node, wherein the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than 1; and the determining unit is configured to The power consumption information of the M storage nodes, determining N storage nodes from the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M; and an allocation unit, configured to be used according to the to-be-stored Data, each of the N storage nodes is allocated corresponding data to be stored; and a sending unit is configured to allocate the data to be stored to each of the N storage nodes Sended to each of the N storage nodes.
结合第九方面,在第九方面第一种可能的实现方式中,所述获取单元还用于获取所述M个存储节点的时延信息;所述确定单元用于根据所述M个 存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述确定单元用于从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;所述确定单元用于根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。With reference to the ninth aspect, in a first possible implementation manner of the ninth aspect, the acquiring unit is further configured to acquire delay information of the M storage nodes, and the determining unit is configured to use, according to the M Determining the power consumption information of the node, determining N storage nodes from the M storage nodes, including: the determining unit, configured to select, from the M storage nodes, an alternate storage node that meets a first condition with a delay, wherein The delay satisfies the first condition that the delay of the p+1th storage node is less than or equal to the sum of the data download times of the previous p storage nodes and the first storage node of the N storage nodes. a sum of delays, wherein p is a positive integer increasing from 1 to N-1; the determining unit is configured to select from the candidate storage nodes according to power consumption information of the candidate storage node N storage nodes are described.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第二种可能的实现方式中,所述确定单元用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述确定单元用于根据所述功耗信息按照从第2到第N的顺序依次从所述备选存储节点中确定剩下的N-1个存储节点。With reference to the ninth aspect, or any one of the possible implementation manners of the ninth aspect, in the second possible implementation manner of the ninth aspect, the determining unit is configured to use, according to the power consumption information of the M storage nodes, Determining N storage nodes among the M storage nodes, comprising: the determining unit configured to use a first storage node of the M storage nodes as a first storage node of the N storage nodes; The determining unit is configured to sequentially determine the remaining N-1 storage nodes from the candidate storage nodes in order from the 2nd to the Nth according to the power consumption information.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第三种可能的实现方式中,所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述确定单元用于从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。With reference to the ninth aspect, or any one of the possible implementation manners of the ninth aspect, in the third possible implementation manner of the ninth aspect, the determining unit is configured to use the first storage node of the M storage nodes as The first storage node of the N storage nodes, the determining unit is configured to select, from the M storage nodes, a storage node with the smallest transmission power consumption as the first storage node; or Among the M storage nodes having the smallest delay among the M storage nodes, the storage node with the smallest transmission power consumption is selected as the first storage node.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第四种可能的实现方式中,在所述确定单元用于根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,所述确定单元用于从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。With reference to the ninth aspect, or any one of the foregoing possible implementation manners of the ninth aspect, in the fourth possible implementation manner of the ninth aspect, the determining unit is configured to use the power storage information from the candidate storage node When the xth storage node is determined, wherein x is a positive integer greater than 1, the determining unit is configured to select, from the candidate storage nodes that satisfy the first condition, a storage node with the smallest transmission power consumption as the xth The storage node; or, from the at least two storage nodes having the largest delay among the candidate storage nodes satisfying the first condition, selecting the storage node with the smallest transmission power consumption as the xth storage node.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第五种可能的实现方式中,所述获取单元还用于获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;所述分配单元用于根据所述待存储的数据,给所述N个存储 节点中的每个存储节点分配对应的待存储的数据,包括:所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。With reference to the ninth aspect, or any one of the foregoing possible implementation manners of the ninth aspect, the obtaining unit is further configured to acquire each of the N storage nodes The bandwidth information of the storage node, the bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node The allocation unit is configured to give the N storages according to the data to be stored Each storage node in the node allocates corresponding data to be stored, including: the allocation unit is configured to use, according to the data to be stored, and bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第六种可能的实现方式中,所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述分配单元用于为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。With reference to the ninth aspect, or any one of the foregoing possible implementation manners of the ninth aspect, in the sixth possible implementation manner of the ninth aspect, the allocating unit is configured to use the data to be stored and the N storage nodes All the storage nodes of the N storage nodes are allocated corresponding data to be stored, including: the allocation unit is used for the N storage nodes The J storage nodes are allocated corresponding data to be stored, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes is positive with the transmission bandwidth of the jth storage node Correlation, the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
第十方面,本发明实施例提供了一种数据存储系统,包含如第九方面或第九方面任一种可能的实现方式所述的数据存储装置和多个存储节点,用于将所述数据存储装置的数据分布存储于所述多个存储节点中的N个存储节点,其中N为大于1的正整数。A tenth aspect, the embodiment of the present invention provides a data storage system, comprising the data storage device and the plurality of storage nodes according to any of the possible implementations of the ninth aspect or the ninth aspect, The data distribution of the storage device is stored in N storage nodes of the plurality of storage nodes, where N is a positive integer greater than one.
根据本发明实施例公开的技术方案,根据传输带宽为每一个存储节点分配数据块大小,为传输带宽大的存储节点分配的较大的数据块,从而提高了数据传输效率,缩短了数据的访问时间,实现了资源的合理利用。进一步的,选取存储节点的时候考虑到存储节点的传输功耗,优先选取传输功耗的存储节点,从而降低了数据访问的功耗。According to the technical solution disclosed in the embodiment of the present invention, a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access. Time has realized the rational use of resources. Further, when the storage node is selected, the storage power consumption of the storage node is taken into consideration, and the storage node that transmits the power consumption is preferentially selected, thereby reducing the power consumption of the data access.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为分布式数据存储系统的示例性联网环境框图;1 is a block diagram of an exemplary networked environment of a distributed data storage system;
图2为依据本发明一实施例的数据存储方法的示范性流程图;2 is an exemplary flowchart of a data storage method according to an embodiment of the present invention;
图3为依据本发明一实施例的数据存储方法的示范性流程图;FIG. 3 is an exemplary flowchart of a data storage method according to an embodiment of the invention; FIG.
图4为依据本发明一实施例的数据存储装置的逻辑结构示意图;4 is a schematic diagram showing the logical structure of a data storage device according to an embodiment of the invention;
图5为依据本发明一实施例的数据存储装置的逻辑结构示意图; FIG. 5 is a schematic diagram showing the logical structure of a data storage device according to an embodiment of the invention; FIG.
图6为依据本发明一实施例的数据存储装置硬件结构示意图。FIG. 6 is a schematic diagram showing the hardware structure of a data storage device according to an embodiment of the invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1示出了分布式数据存储系统100的示例性联网环境框图,系统100包含源节点102和多个存储节点104,源节点102和存储节点104,以及存储节点104之间通过交换设备106进行互联,整个系统100的各个组件通过网络相互连接,其中,网络可以是因特网、内联网、局域网(LANs)、广域网络(WLANs)、存储区域网络(SANs)或其他连接方式,或者以上网络的组合。1 shows an exemplary networked environment block diagram of a distributed data storage system 100 that includes a source node 102 and a plurality of storage nodes 104, a source node 102 and a storage node 104, and a storage node 104 between the switching devices 106. Interconnected, the various components of the entire system 100 are connected to each other through a network, wherein the network may be the Internet, an intranet, a local area network (LANs), a wide area network (WLANs), a storage area network (SANs), or other connection means, or a combination of the above networks. .
当源节点102要将数据108分布存储在多个存储节点104时,源节点102将数据108进行分块,并将数据块发送给对应的存储节点104。为了描述方便,在本实施例中,数据108被分为5个数据块,但本发明实施例并不对此进行限定,具体实现的时候,可以将数据108分为更多或者更少的数据块;源节点102从与其连接的多个存储节点104中选取5个存储节点104作为目标存储节点104,并将5个数据块分别发送给5个目标存储节点104进行存储。When source node 102 is to distribute data 108 across a plurality of storage nodes 104, source node 102 segments data 108 and sends the data blocks to corresponding storage nodes 104. For the convenience of description, in the embodiment, the data 108 is divided into five data blocks, but the embodiment of the present invention does not limit the data. In the specific implementation, the data 108 can be divided into more or less data blocks. The source node 102 selects five storage nodes 104 from the plurality of storage nodes 104 connected thereto as the target storage node 104, and transmits the five data blocks to the five target storage nodes 104 for storage.
图1仅是为以下讨论目的而引出分布式存储的参与者以及它们的相互关系。因此,所描绘的分布式数据存储系统100被大大地简化,系统100可以拥有更多或者更少的组件,本发明实施例并不对此进行限定。Figure 1 is only for the participants of the distributed storage and their interrelationships for the purposes of the following discussion. Thus, the depicted distributed data storage system 100 is greatly simplified, and the system 100 can have more or fewer components, which are not limited by the embodiments of the present invention.
根据本发明一实施例的分布式存储系统100如图1所示。用于将源节点102的数据108分布存储到分布式存储系统100中的N个存储节点104,其中N为大于1的正整数。A distributed storage system 100 in accordance with an embodiment of the present invention is shown in FIG. The data 108 for distributing the source node 102 is distributed to N storage nodes 104 in the distributed storage system 100, where N is a positive integer greater than one.
所述源节点102从所述分布式存储系统100确定N个存储节点104,其中,N为大于1的正整数。The source node 102 determines N storage nodes 104 from the distributed storage system 100, where N is a positive integer greater than one.
在本发明实施例的一种实施方式中,所述源节点102从所述分布式存储系统100确定N个存储节点104,包括:所述源节点102获取所述分布式存 储系统100中的M个存储节点104的功耗信息,所述功耗信息为所述M个存储节点104中的每个存储节点104到所述源节点102的传输功耗,M为大于等于N的正整数;所述源节点102根据所述M个存储节点104的功耗信息,从所述M个存储节点104中选择所述N个存储节点104。In an implementation manner of the embodiment of the present invention, the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 acquires the distributed storage. The power consumption information of the M storage nodes 104 in the storage system 100, the power consumption information is the transmission power consumption of each of the M storage nodes 104 to the source node 102, where M is greater than or equal to A positive integer of N; the source node 102 selects the N storage nodes 104 from the M storage nodes 104 according to power consumption information of the M storage nodes 104.
其中,传输功耗是指单位大小的数据块从对应的存储节点104到源节点102传输需要的功耗。The transmission power consumption refers to the power consumption required for the transmission of the data block of the unit size from the corresponding storage node 104 to the source node 102.
所述M个存储节点104为与源节点102连接的存储节点104,应了解,此处的连接是指网络拓扑实现了源节点102和所述M个存储节点104之间的互联,连接并不仅限于直连,源节点102和存储节点104之间可以有一个或多个(包括两个)交换设备106。The M storage nodes 104 are storage nodes 104 connected to the source node 102. It should be understood that the connection here means that the network topology implements the interconnection between the source node 102 and the M storage nodes 104, and the connection is not only Limited to direct connection, there may be one or more (including two) switching devices 106 between the source node 102 and the storage node 104.
应了解,所述M个存储节点104可以是与源节点102连接的全部存储节点104。所述M个存储节点104也可以是与源节点102连接的全部的存储节点104中的部分的存储节点104。例如,所述M个存储节点104是负载和时延等情况满足源节点102实际需求,且可实际供源节点102使用的存储节点104。具体而言,到源节点102的数据传输路径的传输时延大于某一阈值,或者负载情况大于某一阈值,或者到源节点102的数据传输路径的传输功耗大于某一阈值,或者到所述源节点102的数据传输路径的跳数大于某一阈值的存储节点104,可以被认为是不能被源节点102实际使用的存储节点104。It should be appreciated that the M storage nodes 104 may be all storage nodes 104 connected to the source node 102. The M storage nodes 104 may also be portions of the storage nodes 104 of all of the storage nodes 104 connected to the source node 102. For example, the M storage nodes 104 are storage nodes 104 that satisfy the actual needs of the source node 102, such as load and delay, and can be actually used by the source node 102. Specifically, the transmission delay of the data transmission path to the source node 102 is greater than a certain threshold, or the load condition is greater than a certain threshold, or the transmission power consumption of the data transmission path to the source node 102 is greater than a certain threshold, or The storage node 104, whose number of hops of the data transmission path of the source node 102 is greater than a certain threshold, can be considered as the storage node 104 that cannot be actually used by the source node 102.
因为数据传输的主要传输功耗是由经由的交换设备处理数据产生的功耗,数据传输路径的跳数,即经由的交换设备的个数,反应了数据该数据传输路径传输时的功耗,跳数越多,传输功耗越大。在具体实现过程中,可以用存储节点104到源节点102的路径的跳数来反映存储节点104到源节点102的数据传输路径的传输功耗。Since the main transmission power consumption of data transmission is the power consumption generated by processing data through the switching device, the number of hops of the data transmission path, that is, the number of switching devices that pass through, reflects the power consumption of the data transmission path when the data transmission path is transmitted. The more hops, the greater the transmission power consumption. In a specific implementation process, the hop count of the path of the storage node 104 to the source node 102 may be used to reflect the transmission power consumption of the data transmission path of the storage node 104 to the source node 102.
因为数据传输路径的传输功耗不但和跳数有关,也和数据的处理时间有关,对数据的处理时间越长,或者数据在缓存中的等待时间越长,也会消耗更多的能源。在具体实现过程中,也可以用存储节点104到源节点102的数据传输路径的传输时延来反映对应的存储节点104到源节点102的传输功耗。Because the transmission power of the data transmission path is not only related to the hop count, but also related to the processing time of the data, the longer the processing time of the data, or the longer the waiting time of the data in the cache, consumes more energy. In a specific implementation process, the transmission delay of the data transmission path of the storage node 104 to the source node 102 may also be used to reflect the transmission power consumption of the corresponding storage node 104 to the source node 102.
应了解,传输功耗的表现形式多种多样,可以用数据传输路径的跳数来表示,也可以用数据传输路径的传输时延来表示,也可以进行实际的统计, 本发明实施例仅仅是进行了举例说明,并不对传输功耗的表现形式进行限定,允许传输功耗的其他替代表现方式。It should be understood that the transmission power consumption can be expressed in various forms, and can be represented by the hop count of the data transmission path, or by the transmission delay of the data transmission path, or actual statistics can be performed. The embodiments of the present invention are merely illustrative, and do not limit the expression of transmission power consumption, and allow other alternative expressions of transmission power consumption.
在本发明实施例的一种具体的实施方式中,所述源节点102获取所述分布式存储系统100中的M个存储节点104的功耗信息,包括:源节点102向所述M个存储节点104分别发送查询请求;所述源节点102接收来自所述M个存储节点104中每一个存储节点104的回执消息,每一个所述回执消息包含对应的存储节点104的功耗信息。In a specific implementation manner of the embodiment of the present invention, the source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 stores the M storages. The node 104 respectively sends a query request; the source node 102 receives a receipt message from each of the M storage nodes 104, and each of the receipt messages includes power consumption information of the corresponding storage node 104.
例如,如果用存储节点104到所述源节点102的数据传输路径的跳数来表述传输功耗,可以用回执报文记录从存储节点104到源节点102传输过程中,经过的路由设备的个数。For example, if the transmission power consumption is expressed by the hop count of the data transmission path of the storage node 104 to the source node 102, the return message can be used to record the routing device that passes through the transmission process from the storage node 104 to the source node 102. number.
在具体实现方式中,源节点102可以向与源节点102连接的所有的存储节点104发送查询请求,只有能够实际满足源节点102的存储需求的M个存储节点104会向源节点102发送回执消息。不能满足源节点102的存储需求的存储节点104可以不响应源节点102的存储资源请求或者向源节点102发送拒绝消息。例如,到源节点102的数据传输路径的传输时延大于某一阈值,或者负载情况大于某一阈值,或者到源节点102的数据传输路径的传输功耗大于某一阈值,或者到所述源节点102的数据传输路径的跳数大于某一阈值的存储节点104,可以不响应源节点102的存储资源请求或发送拒绝消息。In a specific implementation, the source node 102 can send a query request to all of the storage nodes 104 connected to the source node 102, and only the M storage nodes 104 that can actually satisfy the storage requirements of the source node 102 send a return message to the source node 102. . The storage node 104 that cannot satisfy the storage requirements of the source node 102 may not respond to the storage resource request of the source node 102 or send a reject message to the source node 102. For example, the transmission delay of the data transmission path to the source node 102 is greater than a certain threshold, or the load condition is greater than a certain threshold, or the transmission power consumption of the data transmission path to the source node 102 is greater than a certain threshold, or to the source The storage node 104 whose hop count of the data transmission path of the node 102 is greater than a certain threshold may not respond to the storage resource request of the source node 102 or send a reject message.
在本发明实施例的一种具体的实施方式中,系统100还包含管理服务器(未示出),所述管理服务器用于维护所述M个存储节点104的节点信息,所述节点信息包含功耗信息。所述源节点102获取所述分布式存储系统100中的M个存储节点104的功耗信息,包括:源节点102向管理服务器发送查询请求;源节点102接收来自所述管理服务器的回执消息,所述回执消息包含所述M个存储节点104中每一个存储节点104的功耗信息。In a specific implementation manner of the embodiment of the present invention, the system 100 further includes a management server (not shown), and the management server is configured to maintain node information of the M storage nodes 104, where the node information includes work. Consumption information. The source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 sends a query request to the management server; and the source node 102 receives the return message from the management server. The receipt message includes power consumption information of each of the M storage nodes 104.
在具体实现过程中,可以由管理服务器进行存储节点104到源节点102的数据传输路径的传输功耗进行实时统计和更新。In a specific implementation process, the management server may perform real-time statistics and update on the transmission power consumption of the data transmission path of the storage node 104 to the source node 102.
例如,在软件定义网络(Software Defined Networking,SDN)中,管理服务器可以为SDN控制器,管理服务器的种类可以有多种实现形式,本发明实施例并不对此进行限定。For example, in a Software Defined Networking (SDN), the management server may be an SDN controller, and the type of the management server may be in various implementation forms, which is not limited by the embodiment of the present invention.
在本发明实施例的一种具体的实施方式中,源节点102包含一个数据库, 所述数据库保存了所述M个存储节点104中每一个存储节点104的节点信息,所述节点信息包含功耗信息。所述源节点102获取所述分布式存储系统100中的M个存储节点104的功耗信息,包括:源节点102从所述数据库中获取所述M个存储节点104中每一个存储节点104的功耗信息。In a specific implementation manner of the embodiment of the present invention, the source node 102 includes a database. The database stores node information of each of the M storage nodes 104, the node information including power consumption information. The source node 102 acquires power consumption information of the M storage nodes 104 in the distributed storage system 100, including: the source node 102 acquires each of the M storage nodes 104 from the database. Power consumption information.
具体实现过程中,可以在系统初始化的时候,在源节点102中的数据库中放入与源节点102连接的目的节点104的节点信息。In the specific implementation process, the node information of the destination node 104 connected to the source node 102 may be placed in the database in the source node 102 when the system is initialized.
在本发明实施例的一种实施方式中,所述源节点102从所述分布式存储系统100确定N个存储节点104,包括:所述源节点102获取所述分布式存储系统100中的M个存储节点104的时延信息,M为大于等于N的正整数;所述源节点102根据所述M个存储节点104的时延信息,从所述M个存储节点104中选择所述N个存储节点104。In an implementation manner of the embodiment of the present invention, the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 acquires M in the distributed storage system 100. The delay information of the storage node 104, M is a positive integer greater than or equal to N; the source node 102 selects the N from the M storage nodes 104 according to the delay information of the M storage nodes 104. Storage node 104.
所述M个存储节点104中每一个存储节点104的时延信息为源节点102向所述每个存储节点104发送数据访问请求时刻到所述每个存储节点104将数据的第一个数据包发送至所述源节点102时刻之间的时间,包含所述每一个存储节点104的接入时延和所述每一个存储节点104到源节点102的数据传输路径的传输时延。存储节点104的接入时延为源节点102发出访问请求到该存储节点104发送出数据块的第一个数据包之间的时间。具体的,接入时延可以包括源节点102与存储节点104的链接的建立时间和存储节点104发送数据块前的准备时间。The delay information of each of the M storage nodes 104 is that the source node 102 sends a data access request time to each of the storage nodes 104 to the first data packet of each storage node 104. The time between the time of sending to the source node 102 includes the access delay of each of the storage nodes 104 and the transmission delay of the data transmission path of each of the storage nodes 104 to the source node 102. The access delay of the storage node 104 is the time between the source node 102 issuing an access request to the storage node 104 transmitting the first data packet of the data block. Specifically, the access delay may include a setup time of the link between the source node 102 and the storage node 104 and a preparation time before the storage node 104 sends the data block.
应了解,该时延是由多个部分组成,具体可以包含源节点102向存储节点104发出访问请求到存储节点104接收到该访问请求的第一时延,存储节点104将存储的数据读入最快的一级存储设备准备就绪的第二时延,以及存储节点104发出第一个数据包到源节点102接收到该第一个数据包的第三时延。在具体实现过程中,因为不同阶段的时延大小不同,可以忽略部分时延,用时延的某一部分代表总体时延,本发明实施例并不对此进行限定,只要该时延在一定程度上,体现出源节点102向所述每个存储节点104发送数据访问请求的第一时刻到所述每个存储节点104将数据的第一个数据包发送至所述源节点102的第二时刻之间的时间间隔即可。It should be understood that the delay is composed of multiple parts, and specifically may include a first delay that the source node 102 sends an access request to the storage node 104 to the storage node 104, and the storage node 104 reads the stored data. The second latency of the fastest primary storage device is ready, and the third delay that the storage node 104 sends the first data packet to the source node 102 to receive the first data packet. In a specific implementation process, because the delays of different phases are different, a part of the delay may be omitted, and a part of the delay represents the overall delay, which is not limited by the embodiment of the present invention, as long as the delay is to a certain extent. Representing a first time when the source node 102 sends a data access request to each of the storage nodes 104 to a second time when each of the storage nodes 104 sends the first data packet of data to the source node 102 The time interval is OK.
在具体实现过程中,所述源节点102可以通过向存储节点104发送查询请求,或者通过向管理服务器发送查询请求,或者在本地数据库存储该时延信息,以获取所述分布式存储系统100中的M个存储节点104的时延信息, 其具体实现过程与获取功耗信息的方法相同,在此不再赘述。In a specific implementation process, the source node 102 may obtain the query in the distributed storage system 100 by sending a query request to the storage node 104, or by sending a query request to the management server, or storing the delay information in a local database. Delay information of the M storage nodes 104, The specific implementation process is the same as the method for obtaining power consumption information, and details are not described herein again.
例如,可以由管理服务器监控并记录源节点102与存储节点104的链接的建立时间、存储节点104发送数据块前的准备时间以及存储节点104到所述源节点102的数据传输路径的传输时延。源节点102向管理服务器发送查询请求,管理服务器给源节点102发送的回执消息里携带该时延信息。也可以在源节点102与存储节点104之间的通讯报文中加入时间记录字段,用于记录建立链路所需要的时间,及存储节点104到所述源节点102的数据传输路径的传输时延。For example, the setup time of the link of the source node 102 with the storage node 104, the preparation time before the storage node 104 sends the data block, and the transmission delay of the data transmission path of the storage node 104 to the source node 102 can be monitored and recorded by the management server. . The source node 102 sends a query request to the management server, and the delay message carried by the management server to the source node 102 carries the delay information. A time record field may also be added to the communication message between the source node 102 and the storage node 104 for recording the time required to establish the link and the transmission time of the data transmission path of the storage node 104 to the source node 102. Delay.
在具体实现过程中,可以由管理服务器通过数据传输路径的操作管理维护(Operation Administration and Maintenance,OAM)特性,探测该数据传输路径的传输时延。也可以由管理服务器通过记录的传输时延的经验值对数据传输路径的传输时延进行确定。In a specific implementation process, the management server can detect the transmission delay of the data transmission path by using an Operation Administration and Maintenance (OAM) feature of the data transmission path. It is also possible for the management server to determine the transmission delay of the data transmission path by the empirical value of the recorded transmission delay.
所述源节点102还获取所述N个存储节点104中的所述每个存储节点104的带宽信息,所述N个存储节点104中的所述每个存储节点104的带宽信息为所述N个存储节点104中的所述每个存储节点104到所述源节点102的数据传输路径的传输带宽。The source node 102 further acquires bandwidth information of each of the N storage nodes 104, and the bandwidth information of each of the N storage nodes 104 is the N The transmission bandwidth of each of the storage nodes 104 to the data transmission path of the source node 102.
在本发明实施例的一种实施方式中,所述源节点102从所述分布式存储系统100确定N个存储节点104,包括:所述源节点102根据所述M个存储节点104的带宽信息,从所述M个存储节点104中选择所述N个存储节点104。In an implementation manner of the embodiment of the present invention, the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 according to bandwidth information of the M storage nodes 104. The N storage nodes 104 are selected from the M storage nodes 104.
具体的,该传输带宽为系统为所述N个存储节点104中的所述每个存储节点104到所述源节点102的数据传输路径预留的带宽,是该数据传输路径进行实际数据传输的平均传输带宽。Specifically, the transmission bandwidth is a bandwidth reserved by the system for the data transmission path of each of the N storage nodes 104 to the source node 102, and the actual data transmission is performed by the data transmission path. Average transmission bandwidth.
在具体实现过程中,所述源节点102可以通过向存储节点104发送查询请求,或者通过向管理服务器发送查询请求,或者在本地数据库存储该带宽信息,以获取所述分布式存储系统100中的M个存储节点104的带宽信息,其具体实现过程与获取功耗信息的方法相同,在此不再赘述。In a specific implementation process, the source node 102 may obtain the query request in the distributed storage system 100 by sending a query request to the storage node 104, or by sending a query request to the management server, or storing the bandwidth information in a local database. The specific implementation process of the bandwidth information of the M storage nodes 104 is the same as the method for obtaining the power consumption information, and details are not described herein again.
应了解,在具体实现的过程中,源节点102根据存储节点104的传输功耗、时延和传输带宽中至少一个,从所述M个存储节点104中确定所述N个存储节点104。It should be understood that, in a specific implementation process, the source node 102 determines the N storage nodes 104 from the M storage nodes 104 according to at least one of the transmission power consumption, the delay, and the transmission bandwidth of the storage node 104.
例如,所述源节点102从所述分布式存储系统100确定N个存储节点 104,包括:源节点102从所述M个存储节点104中选取时延最小的N个存储节点104,或者从所述M个存储节点104中时延最小的L个存储节点104中选取传输功耗最小或传输带宽最大的N个存储节点104,其中L为大于N的正整数。For example, the source node 102 determines N storage nodes from the distributed storage system 100 104. The source node 102 selects the N storage nodes 104 with the smallest delay from the M storage nodes 104, or selects the transmission function from the L storage nodes 104 with the smallest delay among the M storage nodes 104. N storage nodes 104 that consume the least or the largest transmission bandwidth, where L is a positive integer greater than N.
再例如,所述源节点102从所述分布式存储系统100确定N个存储节点104,包括:源节点102从所述M个存储节点104中选取传输功耗最小的N个存储节点104,或者从所述M个存储节点104中传输功耗最小的L个存储节点104中选取时延最小或传输带宽最大的N个存储节点104,其中L为大于N的正整数。For another example, the source node 102 determines N storage nodes 104 from the distributed storage system 100, including: the source node 102 selects, from the M storage nodes 104, N storage nodes 104 that have the lowest transmission power consumption, or N storage nodes 104 with the smallest delay or the largest transmission bandwidth are selected from the L storage nodes 104 with the least power consumption transmitted from the M storage nodes 104, where L is a positive integer greater than N.
再例如,所述源节点102从所述分布式存储系统100确定N个存储节点104,包括:源节点102从所述M个存储节点104中选取传输带宽最大的N个存储节点104,或者从所述M个存储节点104中传输带宽最大的L个存储节点104中选取传输功耗最小或时延最小的N个存储节点104,其中L为大于N的正整数。For example, the source node 102 determines the N storage nodes 104 from the distributed storage system 100, including: the source node 102 selects the N storage nodes 104 with the largest transmission bandwidth from the M storage nodes 104, or Among the L storage nodes 104 having the largest transmission bandwidth among the M storage nodes 104, N storage nodes 104 with the smallest transmission power consumption or the smallest delay are selected, where L is a positive integer greater than N.
应了解,本发明实施例仅仅是对存储节点104的选择依据作出举例说明,并不对此进行限定。It should be understood that the embodiments of the present invention are merely illustrative of the selection basis of the storage node 104, and are not limited thereto.
在本发明实施例的一种实施方式中,所述源节点102根据所述M个存储节点104的时延信息,从所述M个存储节点104中选择所述N个存储节点104,包括:所述源节点102从所述M个存储节点104选择时延满足第一条件的N个存储节点104,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点104中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。In an implementation manner of the embodiment of the present invention, the source node 102 selects the N storage nodes 104 from the M storage nodes 104 according to the delay information of the M storage nodes 104, including: The source node 102 selects, from the M storage nodes 104, the N storage nodes 104 that satisfy the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than Or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes 104, where p is a positive integer that is incremented from 1 to N-1. .
其中,一个存储节点104的数据下载时间为该存储节点104分配到的对应的待存储的数据大小K与该存储节点104到源节点102的数据传输路径的传输带宽B之间的比值。The data download time of one storage node 104 is the ratio between the corresponding data size K to be stored allocated by the storage node 104 and the transmission bandwidth B of the data transmission path of the storage node 104 to the source node 102.
在具体实现过程中,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点;所述源节点102从所述M个存储节点104除去所述第一存储节点之外的存储节点104中按照从2到N的顺序依次确定剩下的N-1个存储节点104,其中,所述剩下的N-1个存储节点104中的每个存储节点104的时延满足所述第一条件。 In a specific implementation process, the source node 102 uses a first storage node of the M storage nodes 104 as a first storage node among the N storage nodes 104; the source node 102 from the M The storage node 104 removes the remaining N-1 storage nodes 104 in order from 2 to N in the storage node 104 other than the first storage node, wherein the remaining N-1 storages The delay of each of the storage nodes 104 in the node 104 satisfies the first condition.
具体而言,源节点102从所述M个存储节点104中依次确定第p+1个存储节点时,从满足以下条件的存储节点104中,选取一个存储节点104当做第p+1个存储节点:Specifically, when the source node 102 sequentially determines the p+1th storage node from the M storage nodes 104, one storage node 104 is selected as the p+1th storage node from the storage node 104 that satisfies the following conditions. :
Figure PCTCN2015082581-appb-000001
       (式1)
Figure PCTCN2015082581-appb-000001
(Formula 1)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点104分配的数据块大小,Bi用于表示第i个存储节点104的所述传输带宽,Lp+1用于表示第p+1个目标节点的所述时延。Wherein L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node 104, and B i is used to represent the i th storage node 104 The transmission bandwidth, L p+1 , is used to represent the delay of the p+1th target node.
在本发明实施例的一种实现方式中,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点,包括:所述源节点102根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点104中选择一个存储节点104作为所述第一存储节点。In an implementation manner of the embodiment of the present invention, the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, including: The source node 102 selects one storage node 104 from the M storage nodes 104 as the first storage node according to the delay information, or the bandwidth information, or the power consumption information.
例如,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点,包括:源节点102从所述多个存储节点104中选取时延和数据块下载时间之和最小的存储节点104作为第一存储节点,即满足For example, the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the plurality of storage nodes 104. The storage node 104 with the smallest sum of the delay and the data block download time is selected as the first storage node, that is, the content is satisfied.
Figure PCTCN2015082581-appb-000002
       (式2)
Figure PCTCN2015082581-appb-000002
(Formula 2)
值最小的的存储节点104作为第一存储节点。其中,L为该存储节点104的时延,K为分配给该存储节点104的数据块大小,B为该存储节点104的传输带宽。The storage node 104 having the smallest value serves as the first storage node. Where L is the delay of the storage node 104, K is the data block size allocated to the storage node 104, and B is the transmission bandwidth of the storage node 104.
再例如,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点,包括:源节点102从所述M个存储节点104中选择时延最小的存储节点104,或者从所述M个存储节点104中时延最小的L个存储节点104中选择传输带宽最大或传输功耗最小的存储节点104作为第一存储节点,其中L为大于1的正整数。For another example, the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes. The storage node 104 having the smallest delay is selected, or the storage node 104 having the largest transmission bandwidth or the smallest transmission power consumption is selected as the first storage node from among the L storage nodes 104 having the smallest delay among the M storage nodes 104. Where L is a positive integer greater than one.
再例如,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点,包括:源节点102从所述M个存储节点104中选取传输功耗最小的存储节点104,或者从所述M个存储节点104中传输功耗最小的L个存储节点104中选择传输带宽最大或时延最 小的存储节点104作为第一存储节点,其中L为大于1的正整数。For another example, the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes. 104 selects the storage node 104 with the smallest transmission power consumption, or selects the largest transmission bandwidth or the longest delay among the L storage nodes 104 that have the least power consumption from the M storage nodes 104. The small storage node 104 acts as a first storage node, where L is a positive integer greater than one.
再例如,所述源节点102将所述M个存储节点104中的第一存储节点作为所述N个存储节点104中的第1个存储节点,包括:源节点102从所述M个存储节点104中选取传输带宽最大的存储节点104,或者从所述M个存储节点104中传输带宽最大的L个存储节点104中选择时延最小或传输功耗最小的存储节点104作为第一存储节点,其中L为大于1的正整数。For another example, the source node 102 uses the first storage node of the M storage nodes 104 as the first storage node of the N storage nodes 104, and includes: the source node 102 from the M storage nodes. 104, the storage node 104 having the largest transmission bandwidth is selected, or the storage node 104 having the smallest delay or the smallest transmission power consumption is selected as the first storage node from among the L storage nodes 104 having the largest transmission bandwidth among the M storage nodes 104. Where L is a positive integer greater than one.
应了解,所述源节点102从所述M个存储节点104中确定第一存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the basis for the source node 102 to determine the first storage node from the M storage nodes 104 is various, and the embodiments of the present invention are merely examples and are not limited thereto.
在本发明实施例的一种实现方式中,在所述源节点102从所述M个存储节点104除去所述第一存储节点之外的存储节点104中确定第x个存储节点104时,若所述源节点确定了满足所述第一条件的至少两个备选存储节点104,所述源节点进一步根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点104中选择一个存储节点104作为第x个存储节点104,其中,x大于等于2且小于等于N。In an implementation manner of the embodiment of the present invention, when the source node 102 removes the xth storage node 104 from the storage node 104 except the first storage node, the The source node determines at least two candidate storage nodes 104 that satisfy the first condition, the source node further according to a delay, or a transmission bandwidth, or transmitting power consumption from at least two satisfying the first condition One of the candidate storage nodes 104 is selected as the xth storage node 104, where x is greater than or equal to 2 and less than or equal to N.
例如,源节点102从满足所述第一条件的至少两个备选存储节点104中选择时延最大的存储节点104,或者从满足所述第一条件的至少两个备选存储节点104中时延最大的L个存储节点104中选择传输带宽最大或传输功耗最小的存储节点104作为第x个存储节点104,其中L为大于1的正整数。For example, the source node 102 selects the storage node 104 with the largest delay from the at least two candidate storage nodes 104 that satisfy the first condition, or from the at least two candidate storage nodes 104 that satisfy the first condition. The storage node 104 having the largest transmission bandwidth or the smallest transmission power consumption is selected among the L largest storage nodes 104 as the xth storage node 104, where L is a positive integer greater than 1.
再例如,源节点102从满足所述第一条件的至少两个备选存储节点104中选择传输带宽最大的存储节点104,或者从满足所述第一条件的至少两个备选存储节点104中传输带宽最大的L个存储节点104中选择时延最大或传输功耗最小的存储节点104作为第x个存储节点104,其中L为大于1的正整数。For another example, the source node 102 selects the storage node 104 having the largest transmission bandwidth from the at least two candidate storage nodes 104 that satisfy the first condition, or from at least two candidate storage nodes 104 that satisfy the first condition. Among the L storage nodes 104 having the largest transmission bandwidth, the storage node 104 having the largest delay or the smallest transmission power consumption is selected as the xth storage node 104, where L is a positive integer greater than 1.
再例如,源节点102从满足所述第一条件的至少两个备选存储节点104中选择传输功耗最小的存储节点104,或者从满足所述第一条件的至少两个备选存储节点104中传输功耗最小的L个存储节点104中选择时延最大或传输带宽最大的存储节点104作为第x个存储节点104,其中L为大于1的正整数。For another example, the source node 102 selects the storage node 104 that has the lowest transmission power consumption from the at least two candidate storage nodes 104 that satisfy the first condition, or from the at least two candidate storage nodes 104 that satisfy the first condition. Among the L storage nodes 104 having the smallest transmission power consumption, the storage node 104 having the largest delay or the largest transmission bandwidth is selected as the xth storage node 104, where L is a positive integer greater than one.
应了解,所述源节点102确定第x个存储节点104的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the source node 102 determines that the basis of the xth storage node 104 is diverse, and the embodiments of the present invention are merely examples and are not limited thereto.
所述源节点102根据所述待存储的数据,给所述N个存储节点104中的 每个存储节点104分配对应的待存储的数据。The source node 102 gives the N storage nodes 104 according to the data to be stored. Each storage node 104 allocates corresponding data to be stored.
在本发明实施例的一种实现方式中,所述源节点102根据所述待存储的数据,给所述N个存储节点104中的每个存储节点104分配对应的待存储的数据,包括:源节点102将数据均分为N个大小相等的数据块,并为每一个存储节点104分配一个数据块。应了解,因为受到数据的最小分割单位的限制,数据可能无法绝对的均分为N个大小相等的数据块,本发明实施例允许允许在均分的基础上对数据块做出调整。In an implementation manner of the embodiment of the present invention, the source node 102 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including: The source node 102 divides the data into N equal-sized data blocks and allocates one data block for each storage node 104. It will be appreciated that the data may not be equally evenly divided into N equal-sized data blocks because of the minimum partitioning unit of the data, and embodiments of the present invention allow for adjustments to the data blocks on a uniform basis.
进一步的,源节点102将数据分割为N个数据块,并对所述N个数据块根据所述数据进行排序,源节点102将数据块分配给对应的存储节点104,从而保证了数据块的顺序,将来访问数据的时候可以根据数据块的顺序进行访问。Further, the source node 102 divides the data into N data blocks, and sorts the N data blocks according to the data, and the source node 102 allocates the data blocks to the corresponding storage nodes 104, thereby ensuring the data blocks. In order, when accessing data in the future, it can be accessed according to the order of the data blocks.
在本发明实施例的一种实现方式中,所述源节点102获取所述N个存储节点104中每个存储节点104的缓冲区大小,所述缓冲区为对应的存储节点104用于接收数据的存储设备;所述源节点102根据所述待存储的数据,给所述N个存储节点104中的每个存储节点104分配对应的待存储的数据,包括:源节点102将存储节点104的缓冲区大小整数倍大小的数据块分配给对应的存储节点104。具体的,源节点102可以将对应的存储节点104的缓冲区大小的数据块分配给对应的存储节点104。In an implementation manner of the embodiment of the present invention, the source node 102 acquires a buffer size of each of the N storage nodes 104, and the buffer is a corresponding storage node 104 for receiving data. The storage node 104 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including: the source node 102 will store the node 104 A data block of an integer multiple of the buffer size is allocated to the corresponding storage node 104. Specifically, the source node 102 may allocate a data block of a buffer size of the corresponding storage node 104 to the corresponding storage node 104.
具体实现过程中,如果源节点102将对应的存储节点104的缓冲区大小的L倍大小的数据块分配给对应的存储节点104,则源节点102将该数据块拆分为L个大小为该缓冲区大小的子数据块,并分别将L个子数据块发送给对应的存储节点104,其中,L为大于1的正整数。In the specific implementation process, if the source node 102 allocates a data block of L size of the buffer size of the corresponding storage node 104 to the corresponding storage node 104, the source node 102 splits the data block into L sizes. A sub-block of buffer size, and respectively send L sub-blocks to a corresponding storage node 104, where L is a positive integer greater than one.
在本发明实施例的一种实现方式中,所述源节点102根据所述待存储的数据,给所述N个存储节点104中的每个存储节点104分配对应的待存储的数据,包括:所述源节点102根据所述待存储的数据以及所述N个存储节点104中的所述每个存储节点104的带宽信息,为所述N个存储节点104中的所述每个存储节点104分配对应的待存储的数据。In an implementation manner of the embodiment of the present invention, the source node 102 allocates corresponding data to be stored to each of the N storage nodes 104 according to the data to be stored, including: The source node 102 is the each of the N storage nodes 104 according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104. Assign the corresponding data to be stored.
所述源节点102根据所述待存储的数据以及所述N个存储节点104中的所述每个存储节点104的带宽信息,为所述N个存储节点104中的所述每个存储节点104分配对应的待存储的数据,包括:所述源节点102为所述N个存储节点104中的J个存储节点分别分配对应的待存储的数据,其中,所述 J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。The source node 102 is the each of the N storage nodes 104 according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104. Allocating corresponding data to be stored includes: the source node 102 respectively assigns corresponding data to be stored to the J storage nodes of the N storage nodes 104, wherein the The size of the data to be stored allocated by the jth storage node of the J storage nodes is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, j is a positive integer that increments from 1 to J one by one.
例如,在J等于N-1的时候,在具体实现过程中,对于前N-1个存储节点,源节点根据所述前N-1个存储节点的传输带宽,为所述前N-1个存储节点中每一个存储节点分配数据块,每个存储节点分配到的待存储的数据的大小与所述该存储节点的传输带宽呈正相关关系,并把剩余的数据分配给第N个存储节点。For example, when J is equal to N-1, in the specific implementation process, for the first N-1 storage nodes, the source node is the first N-1 according to the transmission bandwidth of the first N-1 storage nodes. Each storage node in the storage node allocates a data block, and the size of the data to be stored allocated by each storage node is positively correlated with the transmission bandwidth of the storage node, and the remaining data is allocated to the Nth storage node.
例如,在具体实现过程中,源节点102根据所述N个存储节点104中每一个存储节点104的传输带宽为所述N个存储节点104中每一个存储节点104分配数据块,数据块的大小与传输带宽成正相关关系。具体实现时,可以按照传输带宽比例为每一个存储节点104分配数据块,分配依据如下所示:For example, in a specific implementation process, the source node 102 allocates a data block to each of the N storage nodes 104 according to the transmission bandwidth of each of the N storage nodes 104, and the size of the data block. It is positively related to the transmission bandwidth. In a specific implementation, each storage node 104 can be allocated a data block according to a transmission bandwidth ratio, and the allocation is as follows:
Figure PCTCN2015082581-appb-000003
       (式3)
Figure PCTCN2015082581-appb-000003
(Formula 3)
其中Ki为第i个存储节点104分配的数据块大小,Bi为第i个存储节点104的传输带宽,K为整个数据的大小。应了解,式1中的正比例关系仅仅是正相关关系的一种具体实现,在具体实现过程中,实际的数据块大小可以在式1的基础上进行调整。应了解,因为受到数据的最小分割单位的限制,式1的正比例关系并不是绝对的正比例关系,本发明实施例允许在式1的基础上对数据块大小进行调整。Where K i is the data block size allocated by the i th storage node 104, B i is the transmission bandwidth of the i th storage node 104, and K is the size of the entire data. It should be understood that the positive proportional relationship in Equation 1 is only a specific implementation of the positive correlation relationship. In the specific implementation process, the actual data block size can be adjusted on the basis of Equation 1. It should be understood that the positive proportional relationship of Equation 1 is not an absolute proportional relationship because of the limitation of the minimum division unit of data. Embodiments of the present invention allow adjustment of the data block size on the basis of Equation 1.
再例如,源节点102还可以设定单位带宽分配的数据块大小K0,分配依据可以如下所示:For another example, the source node 102 can also set the data block size K 0 of the unit bandwidth allocation, and the allocation basis can be as follows:
Ki=Bi·K0          (式4)K i =B i ·K 0 (Equation 4)
其中Ki是为第i个存储节点104分配的数据块大小,Bi为第i个存储节点104的传输带宽,K0为单位带宽分配的数据块大小。Where K i is the data block size allocated for the i th storage node 104, B i is the transmission bandwidth of the i th storage node 104, and K 0 is the data block size allocated for the unit bandwidth.
应了解,以上仅仅是举例说明,本发明实施例并不限于此,本发明实施例允许存储节点104的数据块大小与该存储节点104的传输带宽有其他约束关系。It should be understood that the above is merely an example, and the embodiment of the present invention is not limited thereto. The embodiment of the present invention allows the data block size of the storage node 104 to have other constraint relationship with the transmission bandwidth of the storage node 104.
在本发明实施例的一种实现方式中,所述源节点102从所述M个存储节点104中逐一确定所述N个存储节点104,所述源节点102在确定第j个存 储节点后,并在所述源节点102从所述M个存储节点104中确定第j+1个存储节点前,为第j个存储节点分配数据块,其中j为大于0小于N的正整数。In an implementation manner of the embodiment of the present invention, the source node 102 determines the N storage nodes 104 one by one from the M storage nodes 104, and the source node 102 determines the jth storage. After storing the node, and before the source node 102 determines the j+1th storage node from the M storage nodes 104, allocate a data block for the jth storage node, where j is a positive integer greater than 0 and less than N .
在本发明实施例的一种具体的实现方式中,所述源节点102根据所述待存储的数据以及所述N个存储节点104中的所述每个存储节点104的带宽信息,为所述N个存储节点104中的所述每个存储节点104分配对应的待存储的数据,包括:源节点102在确定第j+1个存储节点之前,将大小与第j个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第j个存储节点,j为从1逐一递增到N-1的正整数,第j+1个存储节点为第j个存储节点的下一个节点;所述源节点102将所述数据的剩余部分分配给第N个存储节点104。In a specific implementation manner of the embodiment of the present invention, the source node 102 is configured according to the data to be stored and the bandwidth information of each of the storage nodes 104 in the N storage nodes 104. Each of the N storage nodes 104 allocates corresponding data to be stored, including: the source node 102 transmits the size and the transmission of the jth storage node before determining the j+1th storage node. a data block whose bandwidth is positively correlated is allocated to the jth storage node, j is a positive integer increasing from 1 to N-1, and the j+1th storage node is a next node of the jth storage node; The source node 102 assigns the remainder of the data to the Nth storage node 104.
优选的,源节点102从所述M个存储节点104中确定所述N个存储节点104,并根据所述待存储的数据,给所述N个存储节点104中的每个存储节点104分配对应的待存储的数据,包括:Preferably, the source node 102 determines the N storage nodes 104 from the M storage nodes 104, and assigns a corresponding correspondence to each of the N storage nodes 104 according to the data to be stored. The data to be stored, including:
步骤A:源节点102从所述M个存储节点104中确定第1个存储节点,并根据第1个存储节点的传输带宽为第1个存储节点分配数据块。Step A: The source node 102 determines the first storage node from the M storage nodes 104, and allocates a data block to the first storage node according to the transmission bandwidth of the first storage node.
其中,所述源节点102根据第1个存储节点的传输带宽为第1个存储节点分配数据块包括:所述源节点102将大小与第1个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第1个存储节点。例如,源节点102可以设定单位带宽分配的数据块大小K0,分配依据K1=B1·K0为第1个存储节点分配数据块,其中,K1是为第1个存储节点分配的数据块大小,B1为第1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。The source node 102 allocates a data block to the first storage node according to the transmission bandwidth of the first storage node, and includes: the source node 102, the data whose size is positively correlated with the transmission bandwidth of the first storage node. A block is allocated to the first storage node. For example, the source node 102 can set the data block size K 0 of the unit bandwidth allocation, and allocate the data block according to K 1 =B 1 ·K 0 for the first storage node, where K 1 is allocated for the first storage node. The data block size, B 1 is the transmission bandwidth of the first storage node, and K 0 is the data block size allocated by the unit bandwidth.
步骤B:源节点102根据所述传输功耗,从所述M个存储节点104中确定第j+1个存储节点,所述第j+1个存储节点的时延不大于前j个存储节点的数据块的下载时间与第1个存储节点的时延之和。执行步骤C。Step B: The source node 102 determines the j+1th storage node from the M storage nodes 104 according to the transmission power consumption, and the delay of the j+1th storage node is not greater than the previous j storage nodes. The download time of the data block and the delay of the first storage node. Perform step C.
其中,j的初始值为1。Wherein, the initial value of j is 1.
具体而言,源节点102确定第j+1个存储节点时,从满足以下条件的存储节点104中,根据所述传输功耗选取一个存储节点104当做第j+1个存储节点:Specifically, when the source node 102 determines the j+1th storage node, a storage node 104 is selected as the j+1th storage node according to the transmission power consumption from the storage node 104 that satisfies the following conditions:
Figure PCTCN2015082581-appb-000004
        (式5)
Figure PCTCN2015082581-appb-000004
(Formula 5)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点104分配的数据块大小,Bi用于表示第i个存储节点104的所述传输带宽,Lj+1用于表示第j+1个目标节点的所述时延。Wherein L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node 104, and B i is used to represent the i th storage node 104 The transmission bandwidth, L j+1 is used to represent the delay of the j+1th target node.
可选的,源节点102从所述M个存储节点104中满足式5条件,且尚未被选择的存储节点104中确定传输功耗最小的节点作为第j+1个存储节点。Optionally, the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node in the storage node 104 that has not been selected is determined to have the smallest transmission power consumption as the j+1th storage node.
可选的,源节点102从所述M个存储节点104中满足式5条件,且尚未被选择的存储节点104中时延最大的L个存储节点104中确定传输功耗最小的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node with the smallest transmission power is determined as the jth among the L storage nodes 104 having the largest delay among the storage nodes 104 that have not been selected. +1 storage node, where L is a positive integer greater than one.
可选的,源节点102从所述M个存储节点104中满足式5条件,且尚未被选择的存储节点104中传输功耗最小的L个存储节点104中确定时延最大的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node with the largest delay is determined among the L storage nodes 104 that have the least power consumption in the storage node 104 that has not been selected. +1 storage node, where L is a positive integer greater than one.
可选的,源节点102从所述M个存储节点104中满足式5条件,且尚未被选择的存储节点104中传输功耗最小的L个存储节点104中确定传输带宽最大的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node that determines the transmission bandwidth is the largest among the L storage nodes 104 that have the least power consumption in the storage node 104 that has not been selected. +1 storage node, where L is a positive integer greater than one.
可选的,源节点102从所述M个存储节点104中满足式5条件,且尚未被选择的存储节点104中传输带宽最大的L个存储节点104中确定传输功耗最小的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node 102 satisfies the condition of the formula 5 from the M storage nodes 104, and the node that determines the transmission power consumption is the least in the L storage nodes 104 that have the largest transmission bandwidth among the storage nodes 104 that have not been selected. +1 storage node, where L is a positive integer greater than one.
应了解,源节点102根据所述传输功耗,从所述M个存储节点104中确定第j+1个存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the source node 102 determines the basis of the j+1th storage node from the M storage nodes 104 according to the transmission power consumption. The embodiments of the present invention are merely examples and are not limited thereto. .
步骤C:判断是否满足以下条件:Step C: Determine whether the following conditions are met:
K剩余>Bj+1·K0        (式6)K remaining >B j+1 ·K 0 (Equation 6)
如果满足条件,则将Kj+1=Bj+1·K0大小的数据块分配给第j+1个存储节点,并将j递增1,返回执行步骤B;如果不满足条件,则将Kj+1=K剩余大小的数据块分配给第j+1个存储节点,并结束分配流程,j的最终值为N-1。其中,K剩余为数据的剩余部分的大小,Bj+1为第j+1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。If the condition is met, the data block of size K j+1 =B j+1 ·K 0 is allocated to the j+1th storage node, and j is incremented by 1, and the execution returns to step B; if the condition is not met, The data block of K j+1 =K remaining size is allocated to the j+1th storage node, and the allocation process is ended, and the final value of j is N-1. Where K is the size of the remainder of the data, B j+1 is the transmission bandwidth of the j+1th storage node, and K 0 is the data block size allocated by the unit bandwidth.
所述源节点102将所述N个存储节点104中的所述每个存储节点104分配到的待存储的数据发送给所述N个存储节点104中的所述每个存储节点104。The source node 102 transmits data to be stored to the storage node 104 of the N storage nodes 104 to the storage node 104 of the N storage nodes 104.
通过对数据块访问时间的预测,依次确定存储节点104允许的最大时延, 并根据这一时延选取合适的存储节点104,可以有效的利用分布式网络的资源,可以在保证数据块下载连续的基础上,综合考虑存储节点104的时延,不必每次都选择时延较小的存储节点104,实现了分布式网络的负载均衡。The maximum delay allowed by the storage node 104 is sequentially determined by predicting the data block access time. According to the delay, selecting the appropriate storage node 104 can effectively utilize the resources of the distributed network, and can comprehensively consider the delay of the storage node 104 on the basis of ensuring the continuous download of the data block, without having to select the delay each time. The small storage node 104 implements load balancing of the distributed network.
根据上述流程的数据存储方案,确定了源节点102访问该数据时,数据块的下载时间是连续的,且最终数据访问的下载时间为:According to the data storage scheme of the above process, when the source node 102 accesses the data, the download time of the data block is continuous, and the download time of the final data access is:
Figure PCTCN2015082581-appb-000005
        (式7)
Figure PCTCN2015082581-appb-000005
(Formula 7)
可选的,当源节点102要访问所述数据时,会给存储数据块的存储节点104发送访问请求,所述访问请求指示第1个存储节点立即发送数据块,指示第j+1个存储节点等待到Optionally, when the source node 102 wants to access the data, an access request is sent to the storage node 104 storing the data block, where the access request instructs the first storage node to immediately send a data block, indicating the j+1th storage. Node waiting
Figure PCTCN2015082581-appb-000006
           (式8)
Figure PCTCN2015082581-appb-000006
(Equation 8)
时刻向源节点102发送存储的数据块,从而保证了数据块下载过程的连续,且保证了数据块的下载顺序,且因为数据块不会提前到达,从而节省了源节点102的缓存。其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点104分配的数据块大小,Bi用于表示第i个存储节点104的所述传输带宽,Lj+1用于表示第j+1个目标节点的所述时延,j为大于1的正整数。The stored data blocks are transmitted to the source node 102 at all times, thereby ensuring the continuation of the data block downloading process, and ensuring the download order of the data blocks, and saving the source node 102's cache because the data blocks are not arrived in advance. Wherein L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node 104, and B i is used to represent the i th storage node 104 The transmission bandwidth, L j+1 is used to represent the delay of the j+1th target node, and j is a positive integer greater than 1.
可选的,节点信息里还包含对应的存储节点104的剩余存储空间大小,源节点102在所述剩余存储空间大小的范围内为该对应的存储节点104分配数据块,分配的数据块的大小不大于对应存储节点104的剩余存储空间的大小。Optionally, the node information further includes a size of a remaining storage space of the corresponding storage node 104, and the source node 102 allocates a data block to the corresponding storage node 104 within a range of the remaining storage space size, and the size of the allocated data block. It is not larger than the size of the remaining storage space of the corresponding storage node 104.
根据本发明实施例公开的技术方案,根据传输带宽为每一个存储节点分配数据块大小,为传输带宽大的存储节点分配的较大的数据块,从而提高了数据传输效率,缩短了数据的访问时间,实现了资源的合理利用。且选取存储节点的时候考虑到存储节点的传输功耗,优先选取传输功耗低的存储节点,从而降低了数据访问的功耗。According to the technical solution disclosed in the embodiment of the present invention, a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access. Time has realized the rational use of resources. When the storage node is selected, the storage power consumption of the storage node is taken into consideration, and the storage node with low transmission power consumption is preferentially selected, thereby reducing the power consumption of data access.
图2为依据本发明一实施例的数据存储方法200的示范性流程图,方法200应用于分布式存储系统,用于将源节点的待存储的数据分布存储到分布式存储系统中,如图2所示,方法200包括: FIG. 2 is an exemplary flowchart of a data storage method 200 according to an embodiment of the present invention. The method 200 is applied to a distributed storage system for storing data of a source node to be stored in a distributed storage system, as shown in FIG. As shown in Figure 2, method 200 includes:
S202:所述源节点从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数。S202: The source node determines N storage nodes from the distributed storage system, where N is a positive integer greater than 1.
S204:所述源节点获取所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽。S204: The source node acquires bandwidth information of each storage node of the N storage nodes, where bandwidth information of each of the N storage nodes is the one of the N storage nodes. The transmission bandwidth of the data transmission path from each storage node to the source node.
具体的,该传输带宽为系统为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径预留的带宽,是该数据传输路径进行实际数据传输的平均传输带宽。Specifically, the transmission bandwidth is a bandwidth reserved by the system for each of the N storage nodes to a data transmission path of the source node, and is an average transmission bandwidth of the data transmission path for actual data transmission. .
在本发明实施例的一种实现方式中,所述源节点从所述分布式存储系统确定N个存储节点,包括:所述源节点根据所述M个存储节点的带宽信息,从所述M个存储节点中选择所述N个存储节点。In an implementation manner of the embodiment of the present invention, the source node determines N storage nodes from the distributed storage system, including: the source node, according to bandwidth information of the M storage nodes, from the M The N storage nodes are selected among the storage nodes.
在本发明实施例的另一种实现方式中,所述源节点从所述分布式存储系统确定N个存储节点,包括:所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。In another implementation manner of the embodiment of the present invention, the source node determines N storage nodes from the distributed storage system, including: the source node acquires M storage nodes in the distributed storage system. Power consumption information, the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, where M is a positive integer greater than or equal to N; the source node is according to the M The power consumption information of the storage node is selected from the M storage nodes.
在本发明实施例的再一种实现方式中,所述源节点从所述分布式存储系统确定N个存储节点,包括:所述源节点获取所述分布式存储系统中的M个存储节点的时延信息,M为大于等于N的正整数;所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。所述时延的具体含义在图1系统实施例部分已有描述,在此不再赘述。In a further implementation of the embodiment of the present invention, the source node determines N storage nodes from the distributed storage system, including: the source node acquires M storage nodes in the distributed storage system. The delay information, M is a positive integer greater than or equal to N; the source node selects the N storage nodes from the M storage nodes according to the delay information of the M storage nodes. The specific meaning of the delay is described in the system embodiment of FIG. 1, and details are not described herein again.
在本发明实施例的一种实现方式中,所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。.In an implementation manner of the embodiment of the present invention, the source node selects the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, including: the source node. And selecting, by the M storage nodes, the N storage nodes that meet the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or equal to the previous p storage nodes. The sum of the sum of the data download times and the delay of the first one of the N storage nodes, the p being a positive integer increasing from 1 to N-1. .
具体而言,源节点从所述M个存储节点中依次确定第p+1个存储节点时,从满足以下条件的存储节点中,选取一个存储节点当做第p+1个存储节点:Specifically, when the source node sequentially determines the p+1th storage node from the M storage nodes, selecting one storage node as the p+1th storage node from the storage nodes satisfying the following conditions:
Figure PCTCN2015082581-appb-000007
            (式9)
Figure PCTCN2015082581-appb-000007
(Equation 9)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点分配的数据块大小,Bi用于表示第i个存储节点的所述传输带宽,Lp+1用于表示第p+1个目标节点的所述时延。Wherein, L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node, and B i is used to represent the transmission bandwidth of the i th storage node. , L p+1 is used to represent the delay of the p+1th target node.
在本发明实施例的一种实现方式中,所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。In an implementation manner of the embodiment of the present invention, the source node selects, from the M storage nodes, the N storage nodes that meet the first condition, and the source node includes the M storage nodes. a first storage node as a first one of the N storage nodes; the source node removes from the M storage nodes a storage node other than the first storage node according to from 2 to N The remaining N-1 storage nodes are sequentially determined in sequence, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述源节点根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。The source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node according to the delay information, or the bandwidth information. Or the power consumption information selects one storage node from the M storage nodes as the first storage node.
例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述多个存储节点中选取时延和数据块下载时间之和最小的存储节点作为第一存储节点,即满足For example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a delay from the plurality of storage nodes. The storage node with the smallest sum of data block download times serves as the first storage node, that is, satisfies
Figure PCTCN2015082581-appb-000008
       (式10)
Figure PCTCN2015082581-appb-000008
(Formula 10)
值最小的的存储节点作为第一存储节点。其中,L为该存储节点的时延,K为分配给该存储节点的数据块大小,B为该存储节点的传输带宽。The storage node with the smallest value is the first storage node. Where L is the delay of the storage node, K is the data block size allocated to the storage node, and B is the transmission bandwidth of the storage node.
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选择时延最小的存储节点,或者从所述M个存储节点中时延最小的L个存储节点中选择传输带宽最大或传输功耗最小的存储节点作为第一存储节点,其中L为大于1的正整数。For another example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects a delay from the M storage nodes. The smallest storage node, or a storage node having the largest transmission bandwidth or the smallest transmission power consumption, is selected as the first storage node from among the L storage nodes having the smallest delay among the M storage nodes, where L is a positive integer greater than 1.
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选取传输功耗最小的存储节点,或者从所述M个存储节点中传输功耗最小的L个存储节点中选择传输带宽最大或时延最小的存储节点作为第一存储节点,其中L为大于1的正整数。For example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a transmission function from the M storage nodes. The storage node with the smallest consumption, or the storage node with the smallest transmission bandwidth or the smallest delay among the L storage nodes with the smallest transmission power among the M storage nodes, is the first storage node, where L is a positive integer greater than 1. .
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N 个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选取传输带宽最大的存储节点,或者从所述M个存储节点中传输带宽最大的L个存储节点中选择时延最小或传输功耗最小的存储节点作为第一存储节点,其中L为大于1的正整数。For another example, the source node uses the first storage node of the M storage nodes as the N The first storage node of the storage nodes includes: the source node selects a storage node with the largest transmission bandwidth from the M storage nodes, or selects one of the L storage nodes with the largest transmission bandwidth among the M storage nodes. A storage node having a minimum delay or a minimum transmission power consumption is used as the first storage node, where L is a positive integer greater than one.
应了解,所述源节点从所述M个存储节点中确定第一存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the basis for determining the first storage node from the M storage nodes is various, and the embodiments of the present invention are merely examples and are not limited thereto.
在所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述源节点确定了满足所述第一条件的至少两个备选存储节点,所述源节点进一步根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。When the source node determines the xth storage node from the storage nodes other than the first storage node from the M storage nodes, if the source node determines at least two that satisfy the first condition An alternate storage node, wherein the source node further selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node according to a delay, or a transmission bandwidth, or a transmission power consumption, wherein , x is greater than or equal to 2 and less than or equal to N.
例如,源节点从满足所述第一条件的至少两个备选存储节点中选择时延最大的存储节点,或者从满足所述第一条件的至少两个备选存储节点中时延最大的L个存储节点中选择传输带宽最大或传输功耗最小的存储节点作为第x个存储节点,其中L为大于1的正整数。For example, the source node selects the storage node with the largest delay from the at least two candidate storage nodes that satisfy the first condition, or the L with the largest delay from the at least two candidate storage nodes that satisfy the first condition. Among the storage nodes, a storage node having the largest transmission bandwidth or the smallest transmission power consumption is selected as the xth storage node, where L is a positive integer greater than 1.
再例如,源节点从满足所述第一条件的至少两个备选存储节点中选择传输带宽最大的存储节点,或者从满足所述第一条件的至少两个备选存储节点中传输带宽最大的L个存储节点中选择时延最大或传输功耗最小的存储节点作为第x个存储节点,其中L为大于1的正整数。For another example, the source node selects the storage node with the largest transmission bandwidth from the at least two candidate storage nodes that satisfy the first condition, or the transmission bandwidth from the at least two candidate storage nodes that satisfy the first condition. Among the L storage nodes, a storage node having the largest delay or the smallest transmission power consumption is selected as the xth storage node, where L is a positive integer greater than 1.
再例如,源节点从满足所述第一条件的至少两个备选存储节点中选择传输功耗最小的存储节点,或者从满足所述第一条件的至少两个备选存储节点中传输功耗最小的L个存储节点中选择时延最大或传输带宽最大的存储节点作为第x个存储节点,其中L为大于1的正整数。For another example, the source node selects a storage node with the smallest transmission power consumption from at least two candidate storage nodes that satisfy the first condition, or transmits power consumption from at least two candidate storage nodes that satisfy the first condition. Among the smallest L storage nodes, a storage node having the largest delay or the largest transmission bandwidth is selected as the xth storage node, where L is a positive integer greater than 1.
应了解,所述源节点确定第x个存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the source node determines the basis of the xth storage node to be various, and the embodiment of the present invention is merely an example and is not limited thereto.
所述源节点获取所述N个存储节点中每个存储节点的功耗信息,或时延信息,或带宽信息的方法在图1系统实施例部分已有描述,在此不再赘述。The method for the source node to obtain the power consumption information, or the delay information, or the bandwidth information of each of the N storage nodes is described in the system embodiment of FIG. 1 , and details are not described herein again.
S206所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。 S206: The source node allocates, according to the data to be stored and the bandwidth information of each of the N storage nodes, the corresponding storage node to each of the N storage nodes. Stored data.
在本发明实施例的一种实现方式中,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述源节点为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。In an implementation manner of the embodiment of the present invention, the source node is configured as the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. Each of the storage nodes is configured to allocate corresponding data to be stored, including: the source node respectively assigns corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storages The size of the data to be stored allocated by the jth storage node in the node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a slave 1 increments one by one to a positive integer of J.
例如,在具体实现过程中,源节点根据所述N个存储节点中每一个存储节点的传输带宽为所述N个存储节点中每一个存储节点分配数据块,数据块的大小与传输带宽成正相关关系。具体实现时,可以按照带宽比例为每一个存储节点分配数据块,分配依据如下所示:For example, in a specific implementation process, the source node allocates a data block to each of the N storage nodes according to a transmission bandwidth of each of the N storage nodes, and the size of the data block is positively related to the transmission bandwidth. relationship. In the specific implementation, each storage node can be allocated a data block according to the bandwidth ratio, and the allocation basis is as follows:
Figure PCTCN2015082581-appb-000009
        (式11)
Figure PCTCN2015082581-appb-000009
(Formula 11)
其中Ki为第i个存储节点分配的数据块大小,Bi为第i个存储节点的传输带宽,K为整个数据的大小。应了解,式11中的正比例关系仅仅是正相关关系的一种具体实现,在具体实现过程中,实际的数据块大小可以在式1的基础上进行调整。应了解,因为受到数据的最小分割单位的限制,式1的正比例关系并不是绝对的正比例关系,本发明实施例允许在式1的基础上对数据块大小进行调整。Where K i is the data block size allocated by the i th storage node, B i is the transmission bandwidth of the i th storage node, and K is the size of the entire data. It should be understood that the proportional relationship in Equation 11 is only a specific implementation of the positive correlation. In the specific implementation process, the actual data block size can be adjusted on the basis of Equation 1. It should be understood that the positive proportional relationship of Equation 1 is not an absolute proportional relationship because of the limitation of the minimum division unit of data. Embodiments of the present invention allow adjustment of the data block size on the basis of Equation 1.
再例如,源节点还可以设定单位带宽分配的数据块大小K0,分配依据可以如下所示:For another example, the source node can also set the data block size K 0 of the unit bandwidth allocation, and the allocation basis can be as follows:
Ki=Bi·K0        (式12)K i =B i ·K 0 (Equation 12)
其中Ki是为第i个存储节点分配的数据块大小,Bi为第i个存储节点的传输带宽,K0为单位带宽分配的数据块大小。Where K i is the data block size allocated for the i th storage node, B i is the transmission bandwidth of the i th storage node, and K 0 is the data block size allocated for the unit bandwidth.
应了解,以上仅仅是举例说明,本发明实施例并不限于此,本发明实施例允许存储节点的数据块大小与该存储节点的传输带宽有其他约束关系。It should be understood that the above is only an example, and the embodiment of the present invention is not limited thereto. The embodiment of the present invention allows the data block size of the storage node to have other constraint relationship with the transmission bandwidth of the storage node.
在本发明实施例的一种具体的实现方式中,所述源节点从所述M个存储节点中逐一确定所述N个存储节点,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述源节点在确定 第j个存储节点后,在确定第j+1个存储节点之前,将大小与第j个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第j个存储节点,j为从1逐一递增到N-1的正整数,第j+1个存储节点为第j个存储节点的下一个节点;所述源节点将所述数据的剩余部分分配给第N个存储节点。In a specific implementation manner of the embodiment of the present invention, the source node determines the N storage nodes one by one from the M storage nodes, and the source node is configured according to the data to be stored and the N The bandwidth information of each of the storage nodes is allocated to the storage node of the N storage nodes, and the data is to be stored, including: the source node is determined After the jth storage node, before determining the j+1th storage node, a data block whose size is positively correlated with the transmission bandwidth of the jth storage node is allocated to the jth storage node, j is a slave 1 is incremented one by one to a positive integer of N-1, the j+1th storage node is the next node of the jth storage node; the source node assigns the remaining portion of the data to the Nth storage node.
优选的,所述源节点从所述分布式存储系统确定N个存储节点,并根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:Preferably, the source node determines N storage nodes from the distributed storage system, and according to the data to be stored and the bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored, including:
步骤A:源节点从所述M个存储节点中确定第1个存储节点,并根据第1个存储节点的传输带宽为第1个存储节点分配数据块。Step A: The source node determines a first storage node from the M storage nodes, and allocates a data block to the first storage node according to a transmission bandwidth of the first storage node.
其中,所述源节点根据第1个存储节点的传输带宽为第1个存储节点分配数据块包括:所述源节点将大小与第1个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第1个存储节点。例如,源节点可以设定单位带宽分配的数据块大小K0,分配依据K1=B1·K0为第1个存储节点分配数据块,其中,K1是为第1个存储节点分配的数据块大小,B1为第1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。The allocating a data block to the first storage node according to the transmission bandwidth of the first storage node includes: the data node allocation that the source node has a positive correlation with the transmission bandwidth of the first storage node. Give the first storage node. For example, the source node may set the data block size K 0 of the unit bandwidth allocation, and allocate the data block according to K 1 =B 1 ·K 0 for the first storage node, where K 1 is allocated for the first storage node. The data block size, B 1 is the transmission bandwidth of the first storage node, and K 0 is the data block size allocated by the unit bandwidth.
源节点从所述M个存储节点中确定第1个存储节点的方法上文已有描述,在此不再赘述。The method for the source node to determine the first storage node from the M storage nodes has been described above, and details are not described herein again.
步骤B:源节点从所述M个存储节点中确定第j+1个存储节点,所述第j+1个存储节点的时延不大于前j个存储节点的数据块的下载时间与第1个存储节点的时延之和。执行步骤C。Step B: The source node determines the j+1th storage node from the M storage nodes, and the delay of the j+1th storage node is not greater than the download time of the data block of the first j storage nodes and the first The sum of the delays of the storage nodes. Perform step C.
其中,j的初始值为1。Wherein, the initial value of j is 1.
具体而言,源节点确定第j+1个存储节点时,从满足以下条件的存储节点中,选取一个存储节点当做第j+1个存储节点:Specifically, when the source node determines the j+1th storage node, one of the storage nodes that satisfies the following condition is selected as the j+1th storage node:
Figure PCTCN2015082581-appb-000010
        (式13)
Figure PCTCN2015082581-appb-000010
(Formula 13)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点分配的数据块大小,Bi用于表示第i个存储节点的所述传输带宽,Lj+1用于表示第j+1个目标节点的所述时延。Wherein, L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node, and B i is used to represent the transmission bandwidth of the i th storage node. , L j+1 is used to represent the time delay of the j+1th target node.
可选的,源节点从所述M个存储节点中满足式13条件,且尚未被选择 的存储节点中确定第j+1个存储节点的方法在上文已有描述,在此不再赘述。Optionally, the source node satisfies the condition of the formula 13 from the M storage nodes, and has not yet been selected. The method for determining the j+1th storage node in the storage node has been described above, and details are not described herein again.
步骤C:判断是否满足以下条件:Step C: Determine whether the following conditions are met:
K剩余>Bj+1·K0         (式14)K remaining >B j+1 ·K 0 (Equation 14)
如果满足条件,则将Kj+1=Bj+1·K0大小的数据块分配给第j+1个存储节点,并将j递增1,返回执行步骤B;如果不满足条件,则将Kj+1=K剩余大小的数据块分配给第j+1个存储节,并结束分配流程,j的最终值为N-1。If the condition is met, the data block of size K j+1 =B j+1 ·K 0 is allocated to the j+1th storage node, and j is incremented by 1, and the execution returns to step B; if the condition is not met, The data block of K j+1 =K remaining size is allocated to the j+1th storage section, and the allocation process is ended, and the final value of j is N-1.
其中,K剩余为数据的剩余部分的大小,Bj+1为第j+1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。Where K is the size of the remainder of the data, B j+1 is the transmission bandwidth of the j+1th storage node, and K 0 is the data block size allocated by the unit bandwidth.
S208所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。S208: The source node sends, to the storage node, the data to be stored allocated by the storage node of the N storage nodes to the storage node.
根据本发明实施例公开的技术方案,根据传输带宽为每一个存储节点分配数据块大小,为传输带宽大的存储节点分配的较大的数据块,从而提高了数据传输效率,缩短了数据的访问时间,实现了资源的合理利用。According to the technical solution disclosed in the embodiment of the present invention, a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access. Time has realized the rational use of resources.
图3为依据本发明一实施例的数据存储方法300的示范性流程图,方法300应用于分布式存储系统,用于将源节点的待存储的数据分布存储到分布式存储系统中,如图3所示,方法300包括:FIG. 3 is an exemplary flowchart of a data storage method 300. The method 300 is applied to a distributed storage system for storing data of a source node to be stored in a distributed storage system, as shown in FIG. As shown in Figure 3, method 300 includes:
S302:所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数。S302: The source node acquires power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission function of each of the M storage nodes to the source node. Consumption, where M is a positive integer greater than one.
其中,传输功耗是指单位大小的数据块从对应的存储节点到源节点传输需要的功耗。The transmission power consumption refers to the power consumption required for the transmission of the data block of the unit size from the corresponding storage node to the source node.
因为数据传输的主要功耗是由经由的交换设备处理数据产生的功耗,数据传输路径的跳数,即经由的交换设备的个数,反应了数据该数据传输路径传输时的功耗,跳数越多,传输功耗越大。在具体实现过程中,可以用存储节点到源节点的路径的跳数来反映存储节点到源节点的数据传输路径的传输功耗。Since the main power consumption of data transmission is the power consumption generated by processing data through the switching device, the number of hops of the data transmission path, that is, the number of switching devices that pass through, reflects the power consumption of the data transmission path when the data is transmitted. The more the number, the greater the transmission power consumption. In a specific implementation process, the hop count of the path from the storage node to the source node may be used to reflect the transmission power consumption of the data transmission path from the storage node to the source node.
因为数据传输路径的传输功耗不但和跳数有关,也和数据的处理时间有关,对数据的处理时间越长,或者数据在缓存中的等待时间越长,也会消耗更多的能源。在具体实现过程中,也可以用存储节点到源节点的数据传输路径的传输时延来反映对应的存储节点到源节点的传输功耗。Because the transmission power of the data transmission path is not only related to the hop count, but also related to the processing time of the data, the longer the processing time of the data, or the longer the waiting time of the data in the cache, consumes more energy. In a specific implementation process, the transmission delay of the data transmission path from the storage node to the source node may also be used to reflect the transmission power consumption of the corresponding storage node to the source node.
应了解,传输功耗的表现形式多种多样,可以用数据传输路径的跳数来 表示,也可以用数据传输路径的传输时延来表示,也可以进行实际的统计,本发明实施例仅仅是进行了举例说明,并不对传输功耗的表现形式进行限定,允许传输功耗的其他替代表现方式。It should be understood that the transmission power consumption can be expressed in various forms, and the hop count of the data transmission path can be used. It can also be represented by the transmission delay of the data transmission path, and the actual statistics can also be performed. The embodiment of the present invention is merely an example, and does not limit the expression of the transmission power consumption, and allows other transmission power consumption. Alternative expression.
所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息的方法在图1系统实施例已有描述,在此不再赘述。The method for the source node to obtain the power consumption information of the M storage nodes in the distributed storage system is described in the system embodiment of FIG. 1 and will not be further described herein.
S304:所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数。S304: The source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M.
在本发明实施例的一种实现方式中,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:源节点从所述M个存储节点中选取传输功耗最小的N个存储节点,或者从所述M个存储节点中传输功耗最小的L个存储节点中选取时延最小或传输带宽最大的N个存储节点,其中L为大于N的正整数。In an implementation manner of the embodiment of the present invention, the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including: the source node from the M Selecting N storage nodes with the smallest transmission power consumption among the storage nodes, or selecting the N storage nodes with the smallest delay or the largest transmission bandwidth among the L storage nodes with the smallest power consumption among the M storage nodes, wherein L Is a positive integer greater than N.
可选的,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述源节点获取所述M个存储节点的时延信息;所述源节点从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;所述源节点根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。Optionally, the source node determines, according to the power consumption information of the M storage nodes, the N storage nodes from the M storage nodes, where the source node obtains the delay of the M storage nodes. The source node selects, from the M storage nodes, an alternate storage node that meets the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or a sum equal to a sum of a sum of data download times of the first p storage nodes and a delay of the first one of the N storage nodes, where p is a positive integer that is incremented from 1 to N-1; The source node selects the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
具体而言,源节点从所述M个存储节点中依次确定第p+1个存储节点时,将满足以下条件的存储节点作为第p+1个存储节点的备选存储节点:Specifically, when the source node sequentially determines the p+1th storage node from the M storage nodes, the storage node that satisfies the following condition is used as the candidate storage node of the p+1th storage node:
Figure PCTCN2015082581-appb-000011
          (式15)
Figure PCTCN2015082581-appb-000011
(Equation 15)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点分配的数据块大小,Bi用于表示第i个存储节点的所述传输带宽,Lp+1用于表示第p+1个目标节点的所述时延。Wherein, L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node, and B i is used to represent the transmission bandwidth of the i th storage node. , L p+1 is used to represent the delay of the p+1th target node.
在本发明实施例的一种具体的实现方式中,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述源节点根据所述功耗信息按照从第2到第N的顺序 依次从所述备选存储节点中确定剩下的N-1个存储节点。In a specific implementation manner of the embodiment of the present invention, the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including: the source node. a first storage node of the M storage nodes as a first storage node of the N storage nodes; the source node according to the power consumption information in order from 2nd to Nth The remaining N-1 storage nodes are determined in turn from the candidate storage nodes.
在本发明实施例的一种实现方式中,方法300还包括:所述源节点获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽。In an implementation manner of the embodiment of the present invention, the method 300 further includes: the source node acquiring bandwidth information of each of the N storage nodes, where the N storage nodes are The bandwidth information of each storage node is the transmission bandwidth of the data transmission path of each of the N storage nodes to the source node.
具体的,该传输带宽为系统为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径预留的带宽,是该数据传输路径进行实际数据传输的平均传输带宽。Specifically, the transmission bandwidth is a bandwidth reserved by the system for each of the N storage nodes to a data transmission path of the source node, and is an average transmission bandwidth of the data transmission path for actual data transmission. .
可选的,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述源节点根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。Optionally, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node according to the delay information, or The bandwidth information, or the power consumption information, selects one storage node from the M storage nodes as the first storage node.
例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述多个存储节点中选取时延和数据块下载时间之和最小的存储节点作为第一存储节点,即满足For example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a delay from the plurality of storage nodes. The storage node with the smallest sum of data block download times serves as the first storage node, that is, satisfies
Figure PCTCN2015082581-appb-000012
         (式16)
Figure PCTCN2015082581-appb-000012
(Formula 16)
值最小的的存储节点作为第一存储节点。其中,L为该存储节点的时延,K为分配给该存储节点的数据块大小,B为该存储节点的传输带宽。The storage node with the smallest value is the first storage node. Where L is the delay of the storage node, K is the data block size allocated to the storage node, and B is the transmission bandwidth of the storage node.
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选择时延最小的存储节点,或者从所述M个存储节点中时延最小的L个存储节点中选择传输带宽最大或传输功耗最小的存储节点作为第一存储节点,其中L为大于1的正整数。For another example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects a delay from the M storage nodes. The smallest storage node, or a storage node having the largest transmission bandwidth or the smallest transmission power consumption, is selected as the first storage node from among the L storage nodes having the smallest delay among the M storage nodes, where L is a positive integer greater than 1.
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选取传输功耗最小的存储节点,或者从所述M个存储节点中传输功耗最小的L个存储节点中选择传输带宽最大或时延最小的存储节点作为第一存储节点,其中L为大于1的正整数。For example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects a transmission function from the M storage nodes. The storage node with the smallest consumption, or the storage node with the smallest transmission bandwidth or the smallest delay among the L storage nodes with the smallest transmission power among the M storage nodes, is the first storage node, where L is a positive integer greater than 1. .
再例如,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:源节点从所述M个存储节点中选取 传输带宽最大的存储节点,或者从所述M个存储节点中传输带宽最大的L个存储节点中选择时延最小或传输功耗最小的存储节点作为第一存储节点,其中L为大于1的正整数。For example, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and includes: the source node selects from the M storage nodes. a storage node having the largest transmission bandwidth, or a storage node having the smallest delay or the smallest transmission power consumption among the L storage nodes having the largest transmission bandwidth among the M storage nodes, wherein L is greater than 1 Integer.
优选的,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述源节点从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,所述源节点从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。Preferably, the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the source node selects from the M storage nodes. a storage node having the smallest transmission power consumption as the first storage node; or the source node selecting, as the storage node having the smallest transmission power consumption, from at least two storage nodes having the smallest delay among the M storage nodes The first storage node is described.
应了解,所述源节点从所述M个存储节点中确定第一存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the basis for determining the first storage node from the M storage nodes is various, and the embodiments of the present invention are merely examples and are not limited thereto.
可选的,在所述源节点根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,所述源节点从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,所述源节点从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。Optionally, when the source node determines the xth storage node from the candidate storage node according to the power consumption information, where x is a positive integer greater than 1, and the source node satisfies the first Selecting, from a candidate storage node of a condition, a storage node having the smallest transmission power consumption as the xth storage node; or, the source node is at least two storages having the largest delay from the candidate storage node satisfying the first condition In the node, the storage node with the smallest transmission power consumption is selected as the xth storage node.
可选的,在所述源节点根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,所述源节点从满足所述第一条件的备选存储节点中传输功耗最小的L个存储节点中,选择时延最大或传输带宽最大的存储节点作为第x个存储节点,其中L为大于1的正整数。Optionally, when the source node determines the xth storage node from the candidate storage node according to the power consumption information, where x is a positive integer greater than 1, and the source node satisfies the first Among the L storage nodes with the smallest transmission power consumption in the candidate storage node of one condition, the storage node with the largest delay or the largest transmission bandwidth is selected as the xth storage node, where L is a positive integer greater than 1.
S306:所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据。S306: The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored.
可选的,所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:源节点将数据均分为N个大小相等的数据块,并为每一个存储节点分配一个数据块。应了解,因为受到数据的最小分割单位的限制,数据可能无法绝对的均分为N个大小相等的数据块,本发明实施例允许允许在均分的基础上对数据块做出调整。Optionally, the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node divides the data into N equal sizes. Data block and assign a block of data to each storage node. It will be appreciated that the data may not be equally evenly divided into N equal-sized data blocks because of the minimum partitioning unit of the data, and embodiments of the present invention allow for adjustments to the data blocks on a uniform basis.
进一步的,源节点将数据分割为N个数据块,并对所述N个数据块根据所述数据进行排序,源节点将数据块分配给对应的存储节点,从而保证了数据块的顺序,将来访问数据的时候可以根据数据块的顺序进行访问。Further, the source node divides the data into N data blocks, and sorts the N data blocks according to the data, and the source node allocates the data blocks to the corresponding storage nodes, thereby ensuring the order of the data blocks, and the future. Access to data can be accessed in the order of the data blocks.
在本发明实施例的一种实现方式中,所述源节点获取所述N个存储节点中每个存储节点的缓冲区大小,所述缓冲区为对应的存储节点用于接收数 据的存储设备;所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:源节点将存储节点的缓冲区大小整数倍大小的数据块分配给对应的存储节点。具体的,源节点可以将对应的存储节点的缓冲区大小的数据块分配给对应的存储节点。In an implementation manner of the embodiment of the present invention, the source node acquires a buffer size of each of the N storage nodes, where the buffer is a corresponding storage node for receiving the number. According to the storage device, the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node will store the buffer size integer of the storage node. A data block of multiple size is allocated to the corresponding storage node. Specifically, the source node may allocate a data block of a buffer size of the corresponding storage node to the corresponding storage node.
具体实现过程中,如果源节点将对应的存储节点的缓冲区大小的L倍大小的数据块分配给对应的存储节点,则源节点将该数据块拆分为L个大小为该缓冲区大小的子数据块,并分别将L个子数据块发送给对应的存储节点,其中,L为大于1的正整数。In the specific implementation process, if the source node allocates a data block of L size of the buffer size of the corresponding storage node to the corresponding storage node, the source node splits the data block into L sizes of the buffer size. Sub-blocks, and respectively send L sub-blocks to corresponding storage nodes, where L is a positive integer greater than one.
在本发明实施例的另一种实现方式中,所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。In another implementation manner of the embodiment of the present invention, the source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. .
在本发明实施例的一种具体的实现方式中,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述源节点为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。In a specific implementation manner of the embodiment of the present invention, the source node is the N storages according to the data to be stored and the bandwidth information of each of the N storage nodes. Each of the storage nodes in the node allocates corresponding data to be stored, including: the source node allocates corresponding data to be stored to the J storage nodes of the N storage nodes, where the J The size of the data to be stored allocated by the jth storage node in the storage node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is A positive integer that increments from 1 to J.
所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据的具体实现过程在图1系统实施例部分已有描述,在此不再赘述。And the source node allocates corresponding storage to be stored to each of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. The specific implementation process of the data is described in the system embodiment part of FIG. 1, and details are not described herein again.
在本发明实施例的一种实现方式中,所述源节点从所述M个存储节点中逐一确定所述N个存储节点,所述源节点在确定第j个存储节点后,并在所述源节点从所述M个存储节点中确定第j+1个存储节点前,为第j个存储节点分配数据块,其中j为大于0小于N的正整数。In an implementation manner of the embodiment of the present invention, the source node determines the N storage nodes one by one from the M storage nodes, after the source node determines the jth storage node, and in the The source node allocates a data block for the jth storage node before determining the j+1th storage node from the M storage nodes, where j is a positive integer greater than 0 and less than N.
在本发明实施例的一种具体的实现方式中,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:源节点 在确定第j+1个存储节点之前,将大小与第j个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第j个存储节点,j为从1逐一递增到N-1的正整数,第j+1个存储节点为第j个存储节点的下一个节点;所述源节点将所述数据的剩余部分分配给第N个存储节点。In a specific implementation manner of the embodiment of the present invention, the source node is the N storages according to the data to be stored and the bandwidth information of each of the N storage nodes. Each of the storage nodes in the node allocates corresponding data to be stored, including: a source node Before determining the j+1th storage node, a data block whose size is positively correlated with the transmission bandwidth of the jth storage node is allocated to the jth storage node, and j is incremented from 1 to N-1 A positive integer, the j+1th storage node is the next node of the jth storage node; the source node allocates the remaining portion of the data to the Nth storage node.
优选的,所述源节点根据所述传输功耗从所述M个存储节点中确定所述N个存储节点,并为所述N个存储节点中每一个存储节点分配数据块包括:Preferably, the source node determines the N storage nodes from the M storage nodes according to the transmission power consumption, and allocates data blocks for each of the N storage nodes, including:
步骤A:源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点,并为第1个存储节点分配数据块。Step A: The source node determines a first storage node from the M storage nodes according to the transmission power consumption, and allocates a data block to the first storage node.
可选的,源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点包括:源节点从所述M个存储节点中选取所述传输功耗最小的存储节点作为第1个存储节点。Optionally, determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, the source node selecting, from the M storage nodes, the storage node with the smallest transmission power consumption as The first storage node.
可选的,源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点包括:源节点从所述M个存储节点的时延最小的L个存储节点中选取所述传输功耗最小的存储节点作为第1个存储节点,其中L为大于1的正整数。Optionally, determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, that: the source node selects, from the L storage nodes with the smallest delay of the M storage nodes. The storage node with the smallest transmission power consumption is referred to as the first storage node, where L is a positive integer greater than one.
可选的,源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点包括:源节点从所述M个存储节点的所述传输带宽最大的L个存储节点中选取传输功耗最小的存储节点作为第1个存储节点,其中L为大于1的正整数。Optionally, determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, where the source node is the L storage nodes with the largest transmission bandwidth from the M storage nodes. The storage node with the smallest transmission power consumption is selected as the first storage node, where L is a positive integer greater than 1.
可选的,源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点包括:源节点从所述M个存储节点的所述传输功耗最小的L个存储节点中选取所述传输带宽最大或时延最小的存储节点作为第1个存储节点,其中L为大于1的正整数。Optionally, the determining, by the source node, the first storage node from the M storage nodes according to the transmission power consumption, where the source node has the least L storage node from the M storage nodes The storage node with the largest transmission bandwidth or the smallest delay is selected as the first storage node, where L is a positive integer greater than 1.
应了解,源节点根据所述传输功耗,从所述M个存储节点中确定第1个存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the source node determines the basis of the first storage node from the M storage nodes according to the transmission power consumption. The embodiments of the present invention are merely examples and are not limited thereto.
可选的,源节点为第1个存储节点分配数据块包括:所述源节点根据第1个存储节点的传输带宽为第1个存储节点分配数据块。具体实现过程中,所述源节点将大小与第1个存储节点的所述传输带宽呈正相关关系的数据块分配给所述第1个存储节点。例如,源节点可以设定单位带宽分配的数据 块大小K0,分配依据K1=B1·K0为第1个存储节点分配数据块,其中,K1是为第1个存储节点分配的数据块大小,B1为第1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。Optionally, the allocating the data block to the first storage node by the source node includes: the source node allocating the data block to the first storage node according to the transmission bandwidth of the first storage node. In a specific implementation process, the source node allocates a data block whose size is positively related to the transmission bandwidth of the first storage node to the first storage node. For example, the source node may set the data block size K 0 of the unit bandwidth allocation, and allocate the data block according to K 1 =B 1 ·K 0 for the first storage node, where K 1 is allocated for the first storage node. The data block size, B 1 is the transmission bandwidth of the first storage node, and K 0 is the data block size allocated by the unit bandwidth.
步骤B:源节点根据所述传输功耗,从所述M个存储节点中确定第j+1个存储节点,所述第j+1个存储节点的时延不大于前j个存储节点的数据块的下载时间与第1个存储节点的时延之和。执行步骤C。Step B: The source node determines, according to the transmission power consumption, a j+1th storage node from the M storage nodes, where the delay of the j+1th storage node is not greater than that of the previous j storage nodes. The sum of the download time of the block and the delay of the first storage node. Perform step C.
其中,j的初始值为1。Wherein, the initial value of j is 1.
具体而言,源节点确定第j+1个存储节点时,根据以下条件确定第j+1个存储节点的备选存储节点:Specifically, when the source node determines the j+1th storage node, the candidate storage node of the j+1th storage node is determined according to the following conditions:
Figure PCTCN2015082581-appb-000013
       (式17)
Figure PCTCN2015082581-appb-000013
(Equation 17)
其中,L1用于表示第1个存储节点的所述时延,Ki用于表示为第i个存储节点分配的数据块大小,Bi用于表示第i个存储节点的所述传输带宽,Lj+1用于表示第j+1个目标节点的所述时延。Wherein, L 1 is used to represent the time delay of the first storage node, K i is used to represent the data block size allocated for the i th storage node, and B i is used to represent the transmission bandwidth of the i th storage node. , L j+1 is used to represent the time delay of the j+1th target node.
可选的,源节点从所述M个存储节点中满足式17条件,且尚未被选择的存储节点中确定传输功耗最小的节点作为第j+1个存储节点。Optionally, the source node satisfies the condition of Equation 17 from the M storage nodes, and the node that has determined that the transmission power consumption is the smallest among the storage nodes that have not been selected is the j+1th storage node.
可选的,源节点从所述M个存储节点中满足式17条件,且尚未被选择的存储节点中时延最大的L个存储节点中确定传输功耗最小的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node satisfies the condition of the formula 17 from the M storage nodes, and the node with the smallest transmission power is determined as the j+1th storage among the L storage nodes with the largest delay among the storage nodes that have not yet been selected. Node, where L is a positive integer greater than one.
可选的,源节点从所述M个存储节点中满足式17条件,且尚未被选择的存储节点中传输带宽最大的L个存储节点中确定传输功耗最小的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node satisfies the condition of the formula 17 from the M storage nodes, and the node with the smallest transmission power is determined as the j+1th storage among the L storage nodes with the largest transmission bandwidth among the storage nodes that have not yet been selected. Node, where L is a positive integer greater than one.
可选的,源节点从所述M个存储节点中满足式9条件,且尚未被选择的存储节点中传输功耗最小的L个存储节点中确定时延最大或传输带宽最大的节点作为第j+1个存储节点,其中L为大于1的正整数。Optionally, the source node satisfies the condition of the formula 9 from the M storage nodes, and the node with the smallest delay or the largest transmission bandwidth is determined as the jth among the L storage nodes with the smallest transmission power among the storage nodes that have not yet been selected. +1 storage node, where L is a positive integer greater than one.
应了解,源节点根据所述传输功耗,从所述M个存储节点中确定第j+1个存储节点的依据多种多样,本发明实施例仅仅是举例说明,并不对此进行限定。It should be understood that the source node determines the basis of the j+1th storage node from the M storage nodes according to the transmission power consumption. The embodiments of the present invention are merely examples and are not limited thereto.
步骤C:判断是否满足以下条件:Step C: Determine whether the following conditions are met:
Figure PCTCN2015082581-appb-000014
Figure PCTCN2015082581-appb-000014
如果满足条件,则将
Figure PCTCN2015082581-appb-000015
大小的数据块分配给第j+1个存储节点,并将j递增1,返回执行步骤B;如果不满足条件,则将Kj+1=K剩余大小的数据块分配给第j+1个存储节点,并结束分配流程,j的最终值为N-1。其中,其中,K剩余为数据的剩余部分的大小,
Figure PCTCN2015082581-appb-000016
为按照理论应该分配给第j+1个存储节点的数据块大小。
If the conditions are met, then
Figure PCTCN2015082581-appb-000015
The size data block is allocated to the j+1th storage node, and j is incremented by 1, and the execution step B is returned; if the condition is not satisfied, the data block of the remaining size of K j+1 =K is allocated to the j+1th Store the node and end the allocation process. The final value of j is N-1. Where K is the size of the remainder of the data,
Figure PCTCN2015082581-appb-000016
The size of the data block that should be allocated to the j+1th storage node according to the theory.
可选的,
Figure PCTCN2015082581-appb-000017
其中,Bj+1为第j+1个存储节点的传输带宽,K0为单位带宽分配的数据块大小。
Optional,
Figure PCTCN2015082581-appb-000017
Where B j+1 is the transmission bandwidth of the j+1th storage node, and K 0 is the data block size allocated by the unit bandwidth.
S308:所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。S308: The source node sends, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
根据本发明实施例公开的技术方案,根据传输功耗确定确定用于存储数据的存储节点,优先于选择传输功耗较小的存储节点,从而减小了源节点访问数据时的能耗。According to the technical solution disclosed in the embodiment of the present invention, determining the storage node for storing data according to the transmission power consumption is prioritized by selecting a storage node with a smaller transmission power consumption, thereby reducing energy consumption when the source node accesses data.
图4为依据本发明一实施例的数据存储装置400的逻辑结构示意图,所述装置400应用于分布式存储系统,用于将装置400的待存储的数据分布存储到分布式存储系统中,如图4所示,装置400包括确定单元402、获取单元404、分配单元406和发送单元408。FIG. 4 is a schematic diagram showing the logical structure of a data storage device 400 according to an embodiment of the present invention. The device 400 is applied to a distributed storage system for storing data to be stored in the device 400 in a distributed storage system, such as As shown in FIG. 4, the apparatus 400 includes a determining unit 402, an obtaining unit 404, an allocating unit 406, and a transmitting unit 408.
确定单元402,用于从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数;a determining unit 402, configured to determine N storage nodes from the distributed storage system, where N is a positive integer greater than one;
获取单元404,用于获取所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;An obtaining unit 404, configured to acquire bandwidth information of each of the N storage nodes, where bandwidth information of each of the N storage nodes is the one of the N storage nodes The transmission bandwidth of the data transmission path from each storage node to the source node;
分配单元406,用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据;The allocating unit 406 is configured to allocate a corresponding one of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. Data to be stored;
发送单元408,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。The sending unit 408 is configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
可选的,所述分配单元406用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述分配单元406用于为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个 存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。Optionally, the allocating unit 406 is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, the each of the N storage nodes. The storage node allocates corresponding data to be stored, including: the allocating unit 406 is configured to respectively allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storage nodes are The size of the data to be stored allocated by the jth storage node and the jth The transmission bandwidth of the storage node is in a positive correlation, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
可选的,所述获取单元404还用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;所述确定单元402用于从所述分布式存储系统确定N个存储节点包括:所述确定单元402用于根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。Optionally, the obtaining unit 404 is further configured to acquire power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is each storage node of the M storage nodes. The transmission power consumption of the source node, M is a positive integer greater than or equal to N; the determining unit 402 is configured to determine N storage nodes from the distributed storage system, and the determining unit 402 is configured to use the M The power consumption information of the storage node is selected from the M storage nodes.
可选的,所述获取单元404还用于获取所述分布式存储系统中的M个存储节点的时延信息,M为大于等于N的正整数;所述确定单元402用于从所述分布式存储系统确定N个存储节点包括:所述确定单元402用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。Optionally, the obtaining unit 404 is further configured to acquire delay information of M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N; the determining unit 402 is configured to use the distribution Determining, by the storage system, the N storage nodes, the determining unit 402, configured to select the N storage nodes from the M storage nodes according to the delay information of the M storage nodes.
可选的,所述确定单元402用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:所述确定单元402用于从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。.Optionally, the determining unit 402 is configured to select the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, where the determining unit 402 is configured to use the The M storage nodes select the N storage nodes that satisfy the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or equal to the data of the previous p storage nodes. The sum of the sum of the download times and the delay of the first one of the N storage nodes, the p being a positive integer increasing from 1 to N-1. .
可选的,所述确定单元402用于从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:所述确定单元402用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;所述确定单元402用于从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。Optionally, the determining unit 402 is configured to select, from the M storage nodes, the N storage nodes that satisfy the first condition, wherein the determining unit 402 is configured to use the first one of the M storage nodes. a storage node as the first storage node of the N storage nodes; the determining unit 402 is configured to remove the storage nodes other than the first storage node from the M storage nodes according to from 2 to N The sequence sequentially determines the remaining N-1 storage nodes, wherein the delay of each of the remaining N-1 storage nodes satisfies the first condition.
可选的,所述确定单元402用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述确定单元402用于根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。Optionally, the determining unit 402 is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the determining unit 402 is configured to use the The delay information, or the bandwidth information, or the power consumption information, selects one storage node from the M storage nodes as the first storage node.
可选的,在从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述确定单元402确定了满足所述第一条件的至少两个备选存储节点,所述所述确定单元402还用于根据时延,或者传输 带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。Optionally, when determining the xth storage node from the storage nodes except the first storage node from the M storage nodes, if the determining unit 402 determines that at least two of the first conditions are met Alternative storage nodes, the determining unit 402 is further configured to transmit according to time delay or The bandwidth, or the transmission power consumption, selects one storage node from the at least two candidate storage nodes that satisfy the first condition as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
本发明实施例与图2的方法实施例相对应,图2实施例部分的特征描述,适用于本发明实施例,在此不再赘述。The embodiment of the present invention corresponds to the method embodiment of FIG. 2, and the feature description of the embodiment of FIG. 2 is applicable to the embodiment of the present invention, and details are not described herein again.
根据本发明实施例公开的技术方案,根据传输带宽为每一个存储节点分配数据块大小,为传输带宽大的存储节点分配的较大的数据块,从而提高了数据传输效率,缩短了数据的访问时间,实现了资源的合理利用。According to the technical solution disclosed in the embodiment of the present invention, a data block size is allocated for each storage node according to a transmission bandwidth, and a large data block is allocated to a storage node with a large transmission bandwidth, thereby improving data transmission efficiency and shortening data access. Time has realized the rational use of resources.
图5为依据本发明一实施例的数据存储装置500的逻辑结构示意图,所述装置500应用于分布式存储系统,用于将装置500的将待存储的数据分布存储到分布式存储系统中,如图5所示,装置500包括获取单元502、确定单元504、分配单元506和发送单元508。FIG. 5 is a schematic diagram of a logical structure of a data storage device 500. The device 500 is applied to a distributed storage system for storing data to be stored in the device 500 in a distributed storage system. As shown in FIG. 5, the apparatus 500 includes an acquisition unit 502, a determination unit 504, an allocation unit 506, and a transmission unit 508.
获取单元502,用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数;The obtaining unit 502 is configured to acquire power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission function of each of the M storage nodes to the source node Consumption, where M is a positive integer greater than one;
确定单元504,用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数;a determining unit 504, configured to determine N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M;
分配单元506,用于根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据;The allocating unit 506 is configured to allocate corresponding data to be stored to each of the N storage nodes according to the data to be stored;
发送单元508,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。The sending unit 508 is configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
可选的,所述获取单元502还用于获取所述M个存储节点的时延信息;所述确定单元504用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述确定单元504用于从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;所述确定单元504用于根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。Optionally, the obtaining unit 502 is further configured to acquire delay information of the M storage nodes, where the determining unit 504 is configured to use, according to the power consumption information of the M storage nodes, the M storage nodes. Determining N storage nodes, including: the determining unit 504 is configured to select, from the M storage nodes, an candidate storage node that meets a first condition with a delay, wherein the delay satisfies the first condition: p The delay of the +1 storage node is less than or equal to the sum of the sum of the data download time of the previous p storage nodes and the delay of the first storage node of the N storage nodes, where p is one by one The positive unit is incremented to N-1; the determining unit 504 is configured to select the N storage nodes from the candidate storage nodes according to the power consumption information of the candidate storage node.
可选的,所述确定单元504用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:所述确定单元504用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存 储节点;所述确定单元504用于根据所述功耗信息按照从第2到第N的顺序依次从所述备选存储节点中确定剩下的N-1个存储节点。Optionally, the determining unit 504 is configured to determine N storage nodes from the M storage nodes according to the power consumption information of the M storage nodes, where the determining unit 504 is configured to use the M The first storage node among the storage nodes is the first one of the N storage nodes a storage node; the determining unit 504 is configured to sequentially determine remaining N-1 storage nodes from the candidate storage nodes according to the power consumption information in order from 2nd to Nth.
可选的,所述确定单元504用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:所述确定单元504用于从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。Optionally, the determining unit 504 is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, and the determining unit 504 is configured to use the Selecting, from the M storage nodes, a storage node having the smallest transmission power consumption as the first storage node; or selecting, from the at least two storage nodes having the smallest delay among the M storage nodes, the storage with the smallest transmission power consumption The node acts as the first storage node.
可选的,在所述确定单元504用于根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,所述确定单元504用于从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。Optionally, when the determining unit 504 is configured to determine, according to the power consumption information, the xth storage node from the candidate storage node, where x is a positive integer greater than 1, and the determining unit 504 is used by Selecting, from the candidate storage nodes satisfying the first condition, a storage node having the smallest transmission power consumption as the xth storage node; or selecting at least two of the candidate storage nodes satisfying the first condition to have the largest delay Among the storage nodes, the storage node with the smallest transmission power consumption is selected as the xth storage node.
可选的,所述获取单元502还用于获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;所述分配单元506用于根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:所述分配单元506用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。Optionally, the obtaining unit 502 is further configured to acquire bandwidth information of each of the N storage nodes, where bandwidth information of each of the N storage nodes is a transmission bandwidth of the data transmission path of each of the N storage nodes to the source node; the allocation unit 506 is configured to: according to the data to be stored, to the N storage nodes Each storage node allocates corresponding data to be stored, including: the allocating unit 506 is configured to: according to the data to be stored and the bandwidth information of each of the N storage nodes, Each of the N storage nodes allocates corresponding data to be stored.
可选的,所述分配单元506用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:所述分配单元506用于为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。Optionally, the allocating unit 506 is configured to use, according to the data to be stored, and the bandwidth information of each of the N storage nodes, the each of the N storage nodes. The storage node allocates corresponding data to be stored, including: the allocating unit 506 is configured to allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the J storage nodes are The size of the data to be stored allocated by the jth storage node is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is incremented from 1 to 1 A positive integer to J.
本发明实施例与图3的方法实施例相对应,图3实施例部分的特征描述,适用于本发明实施例,在此不再赘述。The embodiment of the present invention corresponds to the method embodiment of FIG. 3, and the feature description of the embodiment of FIG. 3 is applicable to the embodiment of the present invention, and details are not described herein again.
根据本发明实施例公开的技术方案,根据传输功耗确定确定用于存储数据的存储节点,优先于选择传输功耗较小的存储节点,从而减小了源节点访 问数据时的能耗。According to the technical solution disclosed in the embodiment of the present invention, the storage node for storing data is determined according to the transmission power consumption, and the storage node with less transmission power consumption is selected, thereby reducing the source node access. The energy consumption when asking for data.
图6是依据本发明一实施例的数据存储设备600的硬件结构示意图。如图6所示,数据存储设备600包括处理器602、存储器604、输入/输出接口606、通信接口608和总线610。其中,处理器602、存储器604、输入/输出接口606和通信接口608通过总线610实现彼此之间的通信连接。FIG. 6 is a schematic diagram showing the hardware structure of a data storage device 600 according to an embodiment of the invention. As shown in FIG. 6, data storage device 600 includes a processor 602, a memory 604, an input/output interface 606, a communication interface 608, and a bus 610. Among them, the processor 602, the memory 604, the input/output interface 606, and the communication interface 608 implement a communication connection with each other through the bus 610.
处理器602可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application SQecific Integrated Circuit,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现本发明实施例所提供的技术方案。The processor 602 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs. The technical solution provided by the embodiment of the present invention is implemented.
存储器604可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器604可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明实施例提供的技术方案的程序代码保存在存储器604中,并由处理器602来执行。The memory 604 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). Memory 604 can store operating systems and other applications. When the technical solution provided by the embodiment of the present invention is implemented by software or firmware, the program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 604 and executed by the processor 602.
输入/输出接口606用于接收输入的数据和信息,输出操作结果等数据。The input/output interface 606 is for receiving input data and information, and outputting data such as operation results.
通信接口608使用例如但不限于收发器一类的收发装置,来实现数据存储设备600与其他设备或通信网络之间的通信。 Communication interface 608 implements communication between data storage device 600 and other devices or communication networks using transceivers such as, but not limited to, transceivers.
总线610可包括一通路,在数据存储设备600各个部件(例如处理器602、存储器604、输入/输出接口606和通信接口608)之间传送信息。Bus 610 can include a path for communicating information between various components of data storage device 600, such as processor 602, memory 604, input/output interface 606, and communication interface 608.
应注意,尽管图6所示的计数据存储设备600仅仅示出了处理器602、存储器604、输入/输出接口606、通信接口608以及总线610,但是在具体实现过程中,本领域的技术人员应当明白,数据存储设备600还包含实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当明白,数据存储设备600还可包含实现其他附加功能的硬件器件。此外,本领域的技术人员应当明白,数据存储设备600也可仅仅包含实现本发明实施例所必须的器件,而不必包含图6中所示的全部器件。It should be noted that although the meter data storage device 600 shown in FIG. 6 only shows the processor 602, the memory 604, the input/output interface 606, the communication interface 608, and the bus 610, in a specific implementation process, those skilled in the art It should be understood that data storage device 600 also includes other devices necessary to achieve proper operation. Also, those skilled in the art will appreciate that data storage device 600 may also include hardware devices that implement other additional functions, depending on the particular needs. Moreover, those skilled in the art will appreciate that data storage device 600 may also only include the components necessary to implement embodiments of the present invention without necessarily including all of the devices shown in FIG.
图6所示的硬件结构以及上述描述适用于本发明实施例所提供的各种数据存储设备和系统,适用于执行本发明实施例所提供的各种数据存储方法。 The hardware structure shown in FIG. 6 and the above description are applicable to various data storage devices and systems provided by the embodiments of the present invention, and are suitable for performing various data storage methods provided by the embodiments of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and may be implemented in another manner, for example, multiple modules or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software function modules.
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:移动硬盘、只读存储器(英文:Read-Only Memory,简称ROM)、随机存取存储器(英文:Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform some of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like. The medium of the code.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the technical scope of the embodiments of the present invention.

Claims (36)

  1. 一种数据存储方法,其特征在于,用于将源节点的待存储的数据分布存储到分布式存储系统中,包括:A data storage method, which is configured to store a data distribution of a source node to be stored in a distributed storage system, including:
    所述源节点从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数;The source node determines N storage nodes from the distributed storage system, where N is a positive integer greater than one;
    所述源节点获取所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;The source node acquires bandwidth information of each of the N storage nodes, and the bandwidth information of each of the N storage nodes is the each of the N storage nodes. a transmission bandwidth of a data transmission path of the storage node to the source node;
    所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据;And the source node allocates corresponding storage to be stored to each of the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. The data;
    所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。The source node sends data to be stored allocated to each of the N storage nodes to the storage node of the N storage nodes.
  2. 根据权利要求1所述的方法,其特征在于,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:The method according to claim 1, wherein the source node is the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. Each storage node in the storage allocates corresponding data to be stored, including:
    所述源节点为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。The source node respectively allocates corresponding data to be stored to the J storage nodes of the N storage nodes, wherein the size of the data to be stored allocated by the jth storage node of the J storage nodes A positive correlation is performed with a transmission bandwidth of the jth storage node, where J is a positive integer greater than 1 and less than or equal to N, and j is a positive integer increasing from 1 to J one by one.
  3. 根据权利要求1或2所述的方法,其特征在于,所述源节点从所述分布式存储系统确定N个存储节点,包括:The method according to claim 1 or 2, wherein the source node determines N storage nodes from the distributed storage system, including:
    所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;The source node acquires power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, M is a positive integer greater than or equal to N;
    所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。The source node selects the N storage nodes from the M storage nodes according to power consumption information of the M storage nodes.
  4. 根据权利要求1或2所述的方法,其特征在于,所述源节点从所述分布式存储系统确定N个存储节点,包括:The method according to claim 1 or 2, wherein the source node determines N storage nodes from the distributed storage system, including:
    所述源节点获取所述分布式存储系统中的M个存储节点的时延信息, M为大于等于N的正整数;Obtaining, by the source node, delay information of M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N;
    所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。The source node selects the N storage nodes from the M storage nodes according to delay information of the M storage nodes.
  5. 根据权利要求4所述的方法,其特征在于,所述源节点根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:The method according to claim 4, wherein the source node selects the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, including:
    所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。.The source node selects, from the M storage nodes, the N storage nodes that meet the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or equal to the previous The sum of the sum of the data download times of the p storage nodes and the delay of the first storage node of the N storage nodes, the p being a positive integer increasing from 1 to N-1. .
  6. 根据权利要求5所述的方法,其特征在于,所述源节点从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:The method according to claim 5, wherein the source node selects, from the M storage nodes, the N storage nodes that satisfy the first condition, including:
    所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;The source node uses a first storage node of the M storage nodes as a first storage node of the N storage nodes;
    所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。The source node sequentially removes the remaining N-1 storage nodes from the storage nodes other than the first storage node from the M storage nodes in order from 2 to N, wherein the remaining The delay of each of the N-1 storage nodes satisfies the first condition.
  7. 根据权利要求6所述的方法,其特征在于,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:The method according to claim 6, wherein the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, including:
    所述源节点根据所述时延信息,或者所述带宽信息,或者所述功耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。The source node selects one storage node from the M storage nodes as the first storage node according to the delay information, or the bandwidth information, or the power consumption information.
  8. 根据权利要求6所述的方法,其特征在于,在所述源节点从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述源节点确定了满足所述第一条件的至少两个备选存储节点,所述源节点进一步根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。The method according to claim 6, wherein when the source node determines the xth storage node from the storage nodes other than the first storage node from the M storage nodes, if the source The node determines at least two candidate storage nodes that satisfy the first condition, the source node further converting the bandwidth according to the delay, or transmitting power consumption from at least two candidate storage nodes that satisfy the first condition A storage node is selected as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
  9. 一种计算设备可读介质,其特征在于,包括计算设备执行指令,当计算设备的处理器执行所述计算设备执行指令时,所述计算设备执行权利要求1-8任一项所述的方法。 A computing device readable medium, comprising: a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performing the method of any of claims 1-8 .
  10. 一种数据存储装置,其特征在于,包括:处理器、存储器、总线和通信接口;A data storage device, comprising: a processor, a memory, a bus, and a communication interface;
    所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据存储装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述数据存储装置执行权利要求1-8任一项所述的方法。The memory is configured to store a computer execution instruction, the processor is coupled to the memory via the bus, and when the data storage device is in operation, the processor executes the computer-executed instruction stored in the memory to The data storage device is caused to perform the method of any of claims 1-8.
  11. 一种数据存储方法,其特征在于,用于将源节点的待存储的数据分布存储到分布式存储系统中,包括:A data storage method, which is configured to store a data distribution of a source node to be stored in a distributed storage system, including:
    所述源节点获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数;The source node acquires power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission power consumption of each of the M storage nodes to the source node, Where M is a positive integer greater than one;
    所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数;Determining, by the source node, N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M;
    所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据;The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored;
    所述源节点将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。The source node sends data to be stored allocated to each of the N storage nodes to the storage node of the N storage nodes.
  12. 根据权利要求11所述的方法,其特征在于,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:The method according to claim 11, wherein the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including:
    所述源节点获取所述M个存储节点的时延信息;所述源节点从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;The source node acquires delay information of the M storage nodes; the source node selects, from the M storage nodes, an alternative storage node that meets a first condition, wherein the delay satisfies the first condition The delay of the p+1th storage node is less than or equal to the sum of the sum of the data download times of the previous p storage nodes and the delay of the first storage node of the N storage nodes, the p a positive integer that is incremented from 1 to N-1;
    所述源节点根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。The source node selects the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
  13. 根据权利要求12所述的方法,其特征在于,所述源节点根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:The method according to claim 12, wherein the source node determines N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including:
    所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储 节点中的第1个存储节点;The source node uses the first storage node of the M storage nodes as the N storage The first storage node in the node;
    所述源节点根据所述功耗信息按照从第2到第N的顺序依次从所述备选存储节点中确定剩下的N-1个存储节点。The source node sequentially determines the remaining N-1 storage nodes from the candidate storage nodes in order from the second to the Nth according to the power consumption information.
  14. 根据权利要求13所述的方法,其特征在于,所述源节点将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:The method according to claim 13, wherein the source node uses the first storage node of the M storage nodes as the first storage node of the N storage nodes, including:
    所述源节点从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,The source node selects, as the first storage node, a storage node with the smallest transmission power consumption from the M storage nodes; or
    所述源节点从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。The source node selects, as the first storage node, a storage node with the smallest transmission power consumption from at least two storage nodes with the smallest delay among the M storage nodes.
  15. 根据权利要求13所述的方法,其特征在于,在所述源节点根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,The method according to claim 13, wherein when the source node determines the xth storage node from the candidate storage nodes according to the power consumption information, wherein x is a positive integer greater than one,
    所述源节点从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,The source node selects, as the xth storage node, a storage node with the smallest transmission power consumption from the candidate storage nodes that satisfy the first condition; or
    所述源节点从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。The source node selects, as the xth storage node, a storage node with the smallest transmission power consumption among the at least two storage nodes with the largest delay among the candidate storage nodes satisfying the first condition.
  16. 根据权利要求11-15任一项所述的方法,其特征在于,还包括:The method of any of claims 11-15, further comprising:
    所述源节点获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;The source node acquires bandwidth information of each of the N storage nodes, and the bandwidth information of each of the N storage nodes is the one of the N storage nodes. Transmitting a transmission bandwidth of a data transmission path of each storage node to the source node;
    所述源节点根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。The source node allocates corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the source node according to the data to be stored and the N The bandwidth information of each of the storage nodes is allocated to each of the N storage nodes by a corresponding data to be stored.
  17. 根据权利要求16所述的方法,其特征在于,所述源节点根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:The method according to claim 16, wherein the source node is the N storage nodes according to the data to be stored and the bandwidth information of each of the N storage nodes. Each storage node in the storage allocates corresponding data to be stored, including:
    所述源节点为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据 的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。The source node allocates corresponding data to be stored to the J storage nodes of the N storage nodes, where the data to be stored is allocated by the jth storage node of the J storage nodes The size is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
  18. 一种计算设备可读介质,其特征在于,包括计算设备执行指令,当计算设备的处理器执行所述计算设备执行指令时,所述计算设备执行权利要求11-17任一项所述的方法。A computing device readable medium, comprising: a computing device executing instructions, when the processor of the computing device executes the computing device to execute an instruction, the computing device performing the method of any of claims 11-17 .
  19. 一种数据存储装置,其特征在于,包括:处理器、存储器、总线和通信接口;A data storage device, comprising: a processor, a memory, a bus, and a communication interface;
    所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据存储装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述数据存储装置执行权利要求11-17任一项所述的方法。The memory is configured to store a computer execution instruction, the processor is coupled to the memory via the bus, and when the data storage device is in operation, the processor executes the computer-executed instruction stored in the memory to The data storage device is caused to perform the method of any of claims 11-17.
  20. 一种数据存储装置,其特征在于,用于将待存储的数据分布存储到分布式存储系统中,包括:A data storage device, configured to store data to be stored in a distributed storage system, including:
    确定单元,用于从所述分布式存储系统确定N个存储节点,其中,N为大于1的正整数;a determining unit, configured to determine N storage nodes from the distributed storage system, where N is a positive integer greater than one;
    获取单元,用于获取所述N个存储节点中每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;An acquiring unit, configured to acquire bandwidth information of each of the N storage nodes, where bandwidth information of each of the N storage nodes is the foregoing one of the N storage nodes The transmission bandwidth of the data transmission path from the storage node to the source node;
    分配单元,用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据;An allocating unit, configured to allocate, according to the data to be stored and the bandwidth information of each of the N storage nodes, the corresponding storage node to each of the N storage nodes Stored data;
    发送单元,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。And a sending unit, configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
  21. 根据权利要求20所述的装置,其特征在于,所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:The device according to claim 20, wherein the allocating unit is configured to use the N data according to the data to be stored and the bandwidth information of each of the N storage nodes. Each of the storage nodes in the storage node allocates corresponding data to be stored, including:
    所述分配单元用于为所述N个存储节点中的J个存储节点分别分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。 The allocation unit is configured to respectively allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the data to be stored is allocated by the jth storage node of the J storage nodes The size is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
  22. 根据权利要求20或21所述的装置,其特征在于,所述获取单元还用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,M为大于等于N的正整数;The device according to claim 20 or 21, wherein the obtaining unit is further configured to acquire power consumption information of M storage nodes in the distributed storage system, where the power consumption information is the M a transmission power consumption of each storage node in the storage node to the source node, where M is a positive integer greater than or equal to N;
    所述确定单元用于从所述分布式存储系统确定N个存储节点包括:所述确定单元用于根据所述M个存储节点的功耗信息,从所述M个存储节点中选择所述N个存储节点。Determining, by the determining unit, the N storage nodes from the distributed storage system, the determining unit, configured to select the N from the M storage nodes according to power consumption information of the M storage nodes Storage nodes.
  23. 根据权利要求20或21所述的装置,其特征在于,所述获取单元还用于获取所述分布式存储系统中的M个存储节点的时延信息,M为大于等于N的正整数;The apparatus according to claim 20 or 21, wherein the obtaining unit is further configured to acquire delay information of M storage nodes in the distributed storage system, where M is a positive integer greater than or equal to N;
    所述确定单元用于从所述分布式存储系统确定N个存储节点包括:所述确定单元用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点。Determining, by the determining unit, the N storage nodes from the distributed storage system, the determining unit, configured to select the N from the M storage nodes according to delay information of the M storage nodes Storage nodes.
  24. 根据权利要求23所述的装置,其特征在于,所述确定单元用于根据所述M个存储节点的时延信息,从所述M个存储节点中选择所述N个存储节点,包括:The device according to claim 23, wherein the determining unit is configured to select the N storage nodes from the M storage nodes according to the delay information of the M storage nodes, including:
    所述确定单元用于从所述M个存储节点选择时延满足第一条件的N个存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数。.The determining unit is configured to select, from the M storage nodes, the N storage nodes that satisfy the first condition, wherein the delay satisfies the first condition: the delay of the p+1th storage node is less than or A sum equal to a sum of a sum of data download times of the first p storage nodes and a delay of the first one of the N storage nodes, wherein p is a positive integer that is incremented from 1 to N-1. .
  25. 根据权利要求24所述的装置,其特征在于,所述确定单元用于从所述M个存储节点选择时延满足第一条件的N个存储节点,包括:The device according to claim 24, wherein the determining unit is configured to select, from the M storage nodes, N storage nodes that satisfy a first condition, including:
    所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;The determining unit is configured to use a first storage node of the M storage nodes as a first storage node of the N storage nodes;
    所述确定单元用于从所述M个存储节点除去所述第一存储节点之外的存储节点中按照从2到N的顺序依次确定剩下的N-1个存储节点,其中,所述剩下的N-1个存储节点中的每个存储节点的时延满足所述第一条件。The determining unit is configured to sequentially remove the remaining N-1 storage nodes from the storage nodes other than the first storage node from the M storage nodes in order from 2 to N, wherein the remaining The delay of each of the N-1 storage nodes below satisfies the first condition.
  26. 根据权利要求25所述的装置,其特征在于,所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:The device according to claim 25, wherein the determining unit is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, including:
    所述确定单元用于根据所述时延信息,或者所述带宽信息,或者所述功 耗信息从所述M个存储节点中选择一个存储节点作为所述第一存储节点。The determining unit is configured to use the delay information, or the bandwidth information, or the work The consumption information selects one storage node from the M storage nodes as the first storage node.
  27. 根据权利要求25所述的装置,其特征在于,在从所述M个存储节点除去所述第一存储节点之外的存储节点中确定第x个存储节点时,若所述确定单元确定了满足所述第一条件的至少两个备选存储节点,所述所述确定单元还用于根据时延,或者传输带宽,或者传输功耗从满足所述第一条件的至少两个备选存储节点中选择一个存储节点作为第x个存储节点,其中,x大于等于2且小于等于N。The apparatus according to claim 25, wherein when the xth storage node is determined from the storage nodes other than the first storage node from the M storage nodes, if the determining unit determines that the content is satisfied At least two candidate storage nodes of the first condition, the determining unit is further configured to: according to a delay, or transmit bandwidth, or transmit power consumption from at least two candidate storage nodes that satisfy the first condition A storage node is selected as the xth storage node, where x is greater than or equal to 2 and less than or equal to N.
  28. 一种数据存储系统,其特征在于,包含如权利要求20-27任一项所述的数据存储装置和多个存储节点,用于将所述数据存储装置的数据分布存储于所述多个存储节点中的N个存储节点,其中N为大于1的正整数。A data storage system comprising the data storage device of any one of claims 20-27 and a plurality of storage nodes for storing data distribution of the data storage device in the plurality of storages N storage nodes in a node, where N is a positive integer greater than one.
  29. 一种数据存储装置,其特征在于,用于将待存储的数据分布存储到分布式存储系统中,包括:A data storage device, configured to store data to be stored in a distributed storage system, including:
    获取单元,用于获取所述分布式存储系统中的M个存储节点的功耗信息,所述功耗信息为所述M个存储节点中的每个存储节点到所述源节点的传输功耗,其中M为大于1的正整数;And an obtaining unit, configured to acquire power consumption information of the M storage nodes in the distributed storage system, where the power consumption information is a transmission power consumption of each of the M storage nodes to the source node Where M is a positive integer greater than one;
    确定单元,用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,其中,N为大于1并且小于等于M的正整数;a determining unit, configured to determine N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, where N is a positive integer greater than 1 and less than or equal to M;
    分配单元,用于根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据;An allocating unit, configured to allocate, according to the data to be stored, a corresponding data to be stored to each of the N storage nodes;
    发送单元,用于将所述N个存储节点中的所述每个存储节点分配到的待存储的数据发送给所述N个存储节点中的所述每个存储节点。And a sending unit, configured to send, to the storage node, the data to be stored to which the storage node is allocated to each of the N storage nodes.
  30. 根据权利要求29所述的装置,其特征在于,所述获取单元还用于获取所述M个存储节点的时延信息;The apparatus according to claim 29, wherein the obtaining unit is further configured to acquire delay information of the M storage nodes;
    所述确定单元用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:The determining unit is configured to determine N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including:
    所述确定单元用于从所述M个存储节点选择时延满足第一条件的备选存储节点,其中,所述时延满足第一条件为:第p+1个存储节点的时延小于或等于前p个存储节点的数据下载时间的和值与所述N个存储节点中的第1个存储节点的时延之和,所述p为从1逐一递增到N-1的正整数;The determining unit is configured to select, from the M storage nodes, an candidate storage node that meets a first condition, wherein the delay meets the first condition: a delay of the p+1th storage node is less than or a sum equal to a sum of a sum of data download times of the first p storage nodes and a delay of the first one of the N storage nodes, where p is a positive integer that is incremented from 1 to N-1;
    所述确定单元用于根据所述备选存储节点的功耗信息,从所述备选存储节点中选择所述N个存储节点。 The determining unit is configured to select the N storage nodes from the candidate storage nodes according to power consumption information of the candidate storage node.
  31. 根据权利要求30所述的装置,其特征在于,所述确定单元用于根据所述M个存储节点的功耗信息,从所述M个存储节点中确定N个存储节点,包括:The device according to claim 30, wherein the determining unit is configured to determine N storage nodes from the M storage nodes according to power consumption information of the M storage nodes, including:
    所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点;The determining unit is configured to use a first storage node of the M storage nodes as a first storage node of the N storage nodes;
    所述确定单元用于根据所述功耗信息按照从第2到第N的顺序依次从所述备选存储节点中确定剩下的N-1个存储节点。The determining unit is configured to sequentially determine remaining N-1 storage nodes from the candidate storage nodes according to the power consumption information in order from the second to the Nth.
  32. 根据权利要求31所述的装置,其特征在于,所述确定单元用于将所述M个存储节点中的第一存储节点作为所述N个存储节点中的第1个存储节点,包括:The device according to claim 31, wherein the determining unit is configured to use the first storage node of the M storage nodes as the first storage node of the N storage nodes, including:
    所述确定单元用于从所述M个存储节点中选择传输功耗最小的存储节点作为所述第一存储节点;或者,The determining unit is configured to select, as the first storage node, a storage node with the smallest transmission power consumption from the M storage nodes; or
    从所述M个存储节点中时延最小的至少两个存储节点中,选择传输功耗最小的存储节点作为所述第一存储节点。And selecting, from the at least two storage nodes with the smallest delay among the M storage nodes, a storage node with the smallest transmission power consumption as the first storage node.
  33. 根据权利要求31所述的装置,其特征在于,在所述确定单元用于根据所述功耗信息从所述备选存储节点中确定第x个存储节点时,其中,x为大于1的正整数,The apparatus according to claim 31, wherein said determining unit is configured to determine an xth storage node from said candidate storage node based on said power consumption information, wherein x is greater than 1 Integer,
    所述确定单元用于从满足所述第一条件的备选存储节点中选择传输功耗最小的存储节点作为第x个存储节点;或者,The determining unit is configured to select, from the candidate storage nodes that satisfy the first condition, a storage node with the smallest transmission power consumption as the xth storage node; or
    从满足所述第一条件的备选存储节点中时延最大的至少两个存储节点中,选择传输功耗最小的存储节点作为第x个存储节点。Among the at least two storage nodes having the largest delay among the candidate storage nodes satisfying the first condition, the storage node with the smallest transmission power consumption is selected as the xth storage node.
  34. 根据权利要求29-33任一项所述的装置,其特征在于,所述获取单元还用于获取所述N个存储节点中的所述每个存储节点的带宽信息,所述N个存储节点中的所述每个存储节点的带宽信息为所述N个存储节点中的所述每个存储节点到所述源节点的数据传输路径的传输带宽;The device according to any one of claims 29 to 33, wherein the obtaining unit is further configured to acquire bandwidth information of each of the N storage nodes, the N storage nodes The bandwidth information of each of the storage nodes is a transmission bandwidth of a data transmission path of each of the N storage nodes to the source node;
    所述分配单元用于根据所述待存储的数据,给所述N个存储节点中的每个存储节点分配对应的待存储的数据,包括:所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据。The allocating unit is configured to allocate corresponding data to be stored to each of the N storage nodes according to the data to be stored, including: the allocating unit is configured to use the data to be stored according to the data to be stored And bandwidth information of each of the N storage nodes, and each of the N storage nodes is allocated corresponding data to be stored.
  35. 根据权利要求34所述的装置,其特征在于,所述分配单元用于根据所述待存储的数据以及所述N个存储节点中的所述每个存储节点的带宽 信息,为所述N个存储节点中的所述每个存储节点分配对应的待存储的数据,包括:The apparatus according to claim 34, wherein the allocating unit is configured to use, according to the data to be stored, and the bandwidth of each of the N storage nodes And allocating corresponding data to be stored to each of the N storage nodes, including:
    所述分配单元用于为所述N个存储节点中的J个存储节点分配对应的待存储的数据,其中,所述J个存储节点中的第j个存储节点分配到的待存储的数据的大小与所述第j个存储节点的传输带宽呈正相关关系,所述J为大于1小于等于N的正整数,所述j为从1逐一递增到J的正整数。The allocating unit is configured to allocate corresponding data to be stored to the J storage nodes of the N storage nodes, where the data of the data to be stored allocated by the jth storage node of the J storage nodes is The size is positively correlated with the transmission bandwidth of the jth storage node, and the J is a positive integer greater than 1 and less than or equal to N, and the j is a positive integer increasing from 1 to J one by one.
  36. 一种数据存储系统,其特征在于,包含如权利要求29-35任一项所述的数据存储装置和多个存储节点,用于将所述数据存储装置的数据分布存储于所述多个存储节点中的N个存储节点,其中N为大于1的正整数。 A data storage system comprising the data storage device of any one of claims 29-35 and a plurality of storage nodes for storing data distribution of the data storage device in the plurality of storages N storage nodes in a node, where N is a positive integer greater than one.
PCT/CN2015/082581 2015-06-27 2015-06-27 Data storage method, device and system WO2017000094A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/082581 WO2017000094A1 (en) 2015-06-27 2015-06-27 Data storage method, device and system
CN201580001239.3A CN107113323B (en) 2015-06-27 2015-06-27 Data storage method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/082581 WO2017000094A1 (en) 2015-06-27 2015-06-27 Data storage method, device and system

Publications (1)

Publication Number Publication Date
WO2017000094A1 true WO2017000094A1 (en) 2017-01-05

Family

ID=57607489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082581 WO2017000094A1 (en) 2015-06-27 2015-06-27 Data storage method, device and system

Country Status (2)

Country Link
CN (1) CN107113323B (en)
WO (1) WO2017000094A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768926A (en) * 2019-01-10 2019-05-17 维沃移动通信有限公司 A kind of data processing method, terminal device and computer readable storage medium
CN109831391A (en) * 2018-12-29 2019-05-31 华为技术有限公司 Flow control method, storage device and system in distributed storage system
CN111399748A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Data placement method and device and computer readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569213A (en) * 2018-05-18 2019-12-13 北京果仁宝软件技术有限责任公司 File access method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645038A (en) * 2009-05-20 2010-02-10 中国科学院声学研究所 Data storage method based on Peterson network storage structure
CN101674233A (en) * 2008-09-12 2010-03-17 中国科学院声学研究所 Peterson graph-based storage network structure and data read-write method thereof
US20110231490A1 (en) * 2010-03-16 2011-09-22 Brother Kogyo Kabushiki Kaisha Information communications system, node device, method of communicating contents, computer readable recording medium storing a program
CN102387179A (en) * 2010-09-02 2012-03-21 联想(北京)有限公司 Distributed file system and nodes, saving method and saving control method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674233A (en) * 2008-09-12 2010-03-17 中国科学院声学研究所 Peterson graph-based storage network structure and data read-write method thereof
CN101645038A (en) * 2009-05-20 2010-02-10 中国科学院声学研究所 Data storage method based on Peterson network storage structure
US20110231490A1 (en) * 2010-03-16 2011-09-22 Brother Kogyo Kabushiki Kaisha Information communications system, node device, method of communicating contents, computer readable recording medium storing a program
CN102387179A (en) * 2010-09-02 2012-03-21 联想(北京)有限公司 Distributed file system and nodes, saving method and saving control method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831391A (en) * 2018-12-29 2019-05-31 华为技术有限公司 Flow control method, storage device and system in distributed storage system
CN109831391B (en) * 2018-12-29 2022-05-13 华为云计算技术有限公司 Flow control method, storage device and system in distributed storage system
CN111399748A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Data placement method and device and computer readable storage medium
CN111399748B (en) * 2019-01-02 2023-09-05 中国移动通信有限公司研究院 Data placement method, device and computer readable storage medium
CN109768926A (en) * 2019-01-10 2019-05-17 维沃移动通信有限公司 A kind of data processing method, terminal device and computer readable storage medium
CN109768926B (en) * 2019-01-10 2021-07-20 维沃移动通信有限公司 Data processing method, terminal equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN107113323B (en) 2020-02-21
CN107113323A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
WO2017084393A1 (en) Content distribution method, virtual server management method, cloud platform and system
EP3053055B1 (en) System and method for joint dynamic forwarding and caching in content distribution networks
WO2017000094A1 (en) Data storage method, device and system
WO2019072162A1 (en) Virtual network mapping method, device and storage medium
US8989037B2 (en) System for performing data cut-through
WO2014061481A1 (en) Data transfer device and data transfer system using adaptive compression algorithm
KR20200017589A (en) Cloud server for offloading task of mobile node and therefor method in wireless communication system
JPWO2018220708A1 (en) Resource allocation system, management device, method and program
CN116360972A (en) Resource management method, device and resource management platform
JP6972714B2 (en) Data acquisition programs, equipment, and methods
WO2016082320A1 (en) Hybrid heterogeneous host system, resource configuration method and task scheduling method
WO2017045640A1 (en) Associated stream bandwidth scheduling method and apparatus in data center
CN111866438B (en) User experience driven transcoding and multicast routing method and device for multi-party video conference
WO2014101502A1 (en) Memory access processing method based on memory chip interconnection, memory chip, and system
CN111194090B (en) Edge calculation-oriented multi-strategy channel allocation method
CN104219163A (en) Load balancing method for node dynamic forward based on dynamic replication method and virtual node method
US11941445B2 (en) RLC channel management for low memory 5G devices
JP2004046372A (en) Distributed system, resource allocation method, program, and recording medium with which resource allocation program is recorded
US10091116B2 (en) Service chain construction method and server apparatus
Ma et al. Improved efficient queue resource reallocation strategy for traffic dynamics on scale-free networks
KR102610846B1 (en) Apparatus and method for distributed storage having a high performance
US10516596B2 (en) Information processing apparatus, method and non-transitory computer-readable storage medium
Alharbi et al. Optimizing jobs' completion time in cloud systems during virtual machine placement
KR102579474B1 (en) Method and apparatus for network load balancing
CN115208769B (en) Ring communication method suitable for Dragon topology

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

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

Country of ref document: EP

Kind code of ref document: A1