CN107155197B - Distributed storage method and device based on multi-hop cooperation and electronic equipment - Google Patents
Distributed storage method and device based on multi-hop cooperation and electronic equipment Download PDFInfo
- Publication number
- CN107155197B CN107155197B CN201710398205.3A CN201710398205A CN107155197B CN 107155197 B CN107155197 B CN 107155197B CN 201710398205 A CN201710398205 A CN 201710398205A CN 107155197 B CN107155197 B CN 107155197B
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- corresponding relation
- communication
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000003860 storage Methods 0.000 title claims abstract description 47
- 230000006854 communication Effects 0.000 claims abstract description 179
- 238000004891 communication Methods 0.000 claims abstract description 178
- 239000012634 fragment Substances 0.000 claims abstract description 109
- 230000005540 biological transmission Effects 0.000 claims description 156
- 238000004422 calculation algorithm Methods 0.000 claims description 95
- 230000006378 damage Effects 0.000 claims description 35
- 238000004590 computer program Methods 0.000 claims description 7
- 238000011084 recovery Methods 0.000 claims description 3
- 230000000875 corresponding effect Effects 0.000 description 95
- 230000008569 process Effects 0.000 description 22
- 230000008439 repair process Effects 0.000 description 15
- 238000004364 calculation method Methods 0.000 description 14
- 238000009826 distribution Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 8
- 238000013467 fragmentation Methods 0.000 description 7
- 238000006062 fragmentation reaction Methods 0.000 description 7
- 238000005265 energy consumption Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 101100460704 Aspergillus sp. (strain MF297-2) notI gene Proteins 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 230000001066 destructive effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000001172 regenerating effect Effects 0.000 description 2
- 241000287196 Asthenes Species 0.000 description 1
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 235000014676 Phragmites communis Nutrition 0.000 description 1
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005315 distribution function Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/10—Flow control between communication endpoints
- H04W28/14—Flow control between communication endpoints using intermediate storage
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention provides a distributed storage method and device based on multi-hop cooperation and electronic equipment, wherein the distributed storage method based on the multi-hop cooperation comprises the following steps: when the nodes in the first node set fail, acquiring a predetermined threshold number; selecting all nodes capable of effectively communicating with the nodes in the first node set with the number larger than or equal to the threshold number from other nodes except the nodes in the first node set in the current cell as a second node set; selecting a cache node from the second node set according to the association degree of each node in the second node set and the current cell; and selecting the threshold number of nodes in the first node set within an effective communication range, and recovering the content fragments cached by the failed nodes to the cache nodes. By the method, the efficiency of the data to be forwarded during D2D communication can be improved, and the reliability of the communication can be improved.
Description
Technical Field
The present invention relates to the field of distributed storage technologies, and in particular, to a distributed storage method and apparatus based on multi-hop cooperation, and an electronic device.
Background
loT (Internet of Things) link users with limited storage capacity and computing power, and users can communicate with each other and share resources through loT. loT, the amount of data collected by the devices is large and diversified, and the buffering is considered as an effective solution for ensuring high information transmission quality under the premise. In the loT network architecture, cached information can be transmitted between mobile terminals or other intelligent devices through D2D (Device-to-Device communication), so as to reduce communication pressure of communication infrastructure, such as an AP (Access point) or a BS (Base Station), and can effectively improve utilization rate of spectrum and energy, reduce Access delay, and reduce backhaul loss.
In the actual loT communication process, the mobility of the user may cause the mobile device carried by the user to leave the current cell, which may cause the data cached in the mobile device to be invalid, in order to ensure the validity of the data in the D2D communication, in the prior art, a distributed storage method is adopted, data to be forwarded is grouped and randomly cached in a plurality of mobile devices (nodes), when a node among the nodes fails, one node is randomly selected to replace the failed node, and the data in the failed node is recovered to the randomly selected node through other non-failed nodes. However, a node is randomly selected to replace a failed node, the selected node has poor stability and is easy to fail, so that the data to be forwarded fails, and the existing distributed storage scheme has high loss rate of the data to be forwarded and poor communication reliability.
Disclosure of Invention
Embodiments of the present invention provide a distributed storage method and apparatus based on multi-hop cooperation, and an electronic device, so as to improve the efficiency of data to be forwarded when D2D is used for communication, and improve the reliability of communication. The specific technical scheme is as follows:
To achieve the above object, an embodiment of the present invention provides a distributed storage method based on multi-hop cooperation, including:
When a node in a first node set fails, acquiring a predetermined threshold number, wherein the first node set is a set of all nodes cached with content fragments in the current cell, the content fragments contain partial content of data to be forwarded, and the threshold number is the number of nodes required for recovering the content fragments cached by the failed node;
Selecting all nodes capable of effectively communicating with the nodes in the first node set with the number larger than or equal to the threshold number from other nodes except the nodes in the first node set in the current cell as a second node set;
Selecting a cache node from the second node set according to the association degree of each node in the second node set and the current cell;
And selecting the threshold number of nodes in the first node set within an effective communication range, and recovering the content fragments cached by the failed nodes to the cache nodes.
To achieve the above object, an embodiment of the present invention provides a distributed storage apparatus based on multi-hop cooperation, including:
A threshold number obtaining module, configured to obtain a predetermined threshold number when a node in a first node set fails, where the first node set is a set of all nodes in which content fragments are cached in the current cell, the content fragments include partial content of data to be forwarded, and the threshold number is a number of nodes required to recover the content fragments cached by the failed node;
a node set determining module, configured to select, as a second node set, all nodes that can effectively communicate with nodes in the first node set that are greater than or equal to the threshold number, from other nodes in the current cell except the nodes in the first node set;
A cache node determination module, configured to select a cache node from the second node set according to the association degree between each node in the second node set and the current cell;
And the content fragment recovery module is used for selecting the threshold number of nodes in the first node set in an effective communication range and recovering the content fragments cached by the failed nodes to the cache nodes.
In order to achieve the above object, an embodiment of the present invention provides an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the bus;
a memory for storing a computer program;
And the processor is used for realizing the distributed storage method based on the multi-hop cooperation when executing the program stored in the memory.
To achieve the above object, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the distributed storage method based on multi-hop cooperation.
According to the distributed storage method, the distributed storage device and the electronic equipment based on the multi-hop cooperation, when the nodes in the first node set fail, the predetermined threshold number is obtained; selecting all nodes which can effectively communicate with the nodes in the first node set with the number larger than or equal to the threshold value within an effective communication range from other nodes except the nodes in the first node set in the current cell as a second node set; selecting a cache node from the second node set according to the association degree of each node in the second node set and the current cell; and selecting the threshold number of nodes in the first node set within an effective communication range, and recovering the content fragments cached by the failed nodes to the cache nodes. The mobility of the user is fully considered, the efficiency of the data to be forwarded during the communication by using the D2D can be improved, and the reliability of the communication can be improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for selecting an original node of a storage content segment according to an embodiment of the present invention;
Fig. 2 is a flowchart illustrating a distributed storage method based on multi-hop cooperation according to an embodiment of the present invention;
Fig. 3 is a first location relationship diagram of a base communication device and a node sending a data request in a communication scenario according to an embodiment of the present invention;
Fig. 4 is a second location relationship diagram of a base communication device and a node sending a data request in a communication scenario according to an embodiment of the present invention;
Fig. 5 is a diagram illustrating a third location relationship between a base communication device and a node that sends a data request in a communication scenario according to an embodiment of the present invention;
fig. 6 is a diagram illustrating a fourth location relationship between a base communication device and a node that sends a data request in a communication scenario according to an embodiment of the present invention;
FIG. 7 is a graph of data transmission success probability for an embodiment of the present invention;
FIG. 8 is a graph of calculated time for an embodiment of the present invention;
FIG. 9 is a diagram illustrating a distributed storage apparatus based on multi-hop cooperation according to an embodiment of the present invention;
fig. 10 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the loT network architecture, a node in the current cell is said to be invalid if the node caches data to be forwarded, and the node cannot continue to provide data to be forwarded for the node in the current cell due to node movement, energy consumption, storage space and other reasons. For example, when a node in which data to be forwarded is cached leaves a current cell, the node may be disabled, and when the data to be forwarded is deleted or lost due to reasons such as storage space and energy consumption, the node may also be disabled.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for selecting an original node for content fragmentation according to an embodiment of the present invention, including:
S101, obtaining and calculating the number of groups of data to be forwarded and the number of thresholds according to the communication coverage of a base station in a current cell, the maximum communication radius of multi-hop cooperation, a first numerical value and a predetermined existence probability, wherein the first numerical value is the number of preset nodes caching the data to be forwarded, the existence probability is the probability that an eighth node is still in the current cell after the first time, the first time is any time, and the eighth node is any node in the current cell.
The current cell in the embodiment of the present invention refers to an area where communication is performed by applying the distributed storage method based on multi-hop cooperation in the embodiment of the present invention, and the current cell may be the same as or different from a communication range covered by the communication infrastructure equipment, and is not specifically limited herein. The first value is a preset value and is determined according to a specific redundant cache mode. For example, when EC (Erasure Codes) is used for distributed storage, in an EC 6/10 (4 nodes at most fail and the original file can still be restored) distributed storage environment, the first value is set to 10 or more.
The existence probability is calculated according to the association degree of the user and the current cell and the elapsed time, and the association degree of the root user and the current cell is positively correlated and negatively correlated with the time. The association degree of one node identifies the communication condition and social factors of the node and other nodes except the node in the current cell, the social factors are considered when the existence probability is calculated, and the obtained existence probability is more accurate. The multi-hop cooperation system calculates the number of the grouped parts and the threshold number according to the existence probability, fully considers the mobility of the user, and has higher reliability of the calculated number of the grouped parts and the threshold number.
Optionally, before S101, the method further includes:
Step one, acquiring social relations among users in a current cell, and determining the probability of each user leaving the current cell.
When social factors among users in the current cell are not considered, the probability of the users entering and exiting the current cell obeys a poisson process, the probability of a certain node leaving the current cell is expressed as mu, and the node in the scene meets an M/M/∞ queue model. When social factors among users are taken into consideration, the social relationship between node i (user i) and node j (user j) is represented as SijThen, the leaving rate of the user i from the current cell can be expressed as:Wherein u is the set of all nodes in the current cell. SijThe value range is not less than 0 and not more than SijLess than or equal to 1, setting according to the social association between the user i and the user j, wherein the closer the social association between the user i and the user j is, the closer SijThe larger the value of (c). For example, if there are L friends in the address book of user i, K friends in the address book of user J, and J identical friends in the address books of user i and user J, the social relationship between user i and user J may be represented aswherein K, L, J are all positive integers.
And step two, calculating the existence probability of the node corresponding to each user according to the probability of each user leaving the current cell.
The time T of stay of the node i in the current celliobey an exponential distributionThen the probability that node i is still present in the current cell after Δ time can be expressed as:
The multi-hop collaboration system may be an apparatus comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through a bus and complete mutual communication; the memory stores executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the distributed storage method based on the multi-hop cooperation.
The multi-hop cooperation system can also be an application program used for executing the distributed storage method based on the multi-hop cooperation during operation.
The multi-hop cooperation system may also be a storage medium applied to a terminal or a communication infrastructure for storing executable code for performing a distributed storage method based on multi-hop cooperation.
The multi-hop collaboration system may also be any combination of the above devices, applications, and storage media.
And S102, grouping the data to be forwarded according to the grouping number to obtain grouped data to be forwarded.
In the embodiment of the invention, in order to prevent the failure of the data to be forwarded, a distributed storage mode is adopted. Meanwhile, in order to save storage resources of each node, the multi-hop cooperation system does not adopt a method for directly storing a copy of the data to be forwarded, but divides the data to be forwarded into a plurality of data segments according to a preset algorithm. For example, the data to be forwarded is grouped by using an EC code (Erasure code) or other redundant storage Coding calculation method.
s103, encoding the grouped data to be forwarded to obtain a plurality of groups of content fragments.
The multi-hop cooperation system encodes the grouped data to be forwarded into a plurality of groups of content fragments according to the threshold number in a preset encoding mode, for example, when encoding is performed by using an erasure code algorithm, the grouped data to be forwarded is encoded into the content fragments with the number of the first numerical value.
And S104, selecting the nodes with the number of the first numerical value in the current cell as original nodes.
The multi-hop cooperation system uniformly selects nodes with a first numerical quantity in the current cell as original nodes of the cache content fragments. And selecting nodes with the first numerical quantity before the ranking of the residual quantity according to the residual quantity of the storage space of the nodes, or selecting the nodes with the first numerical quantity before the ranking of the communication range according to the multi-hop cooperative communication range as the original nodes. Of course, the nodes with the number of the first numerical values may also be randomly selected, which is not specifically limited herein, and the specific selection method may be set according to the actual communication situation.
And S105, caching the content fragments into the original nodes respectively to obtain a first node set.
The multi-hop cooperation system randomly and respectively caches each content fragment in each original node, and all nodes cached with the content fragment form a first node set. Each node in the first node set caches only one content fragment, because if two or more content fragments of the same data to be forwarded are cached in one node at the same time, when the node fails, the node may have a large influence on the reply of the data to be forwarded.
In the embodiment of the invention, the packet number and the threshold number are calculated according to the existence probability so as to encode the data to be forwarded into the multi-group content fragments, the mobility of users is considered, the efficiency of the data to be forwarded during communication by using D2D can be improved, and the reliability of the communication is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart of a distributed storage method based on multi-hop cooperation according to an embodiment of the present invention, where the method includes:
s201, when a node in a first node set fails, obtaining a predetermined threshold number, where the first node set is a set of all nodes in a current cell where content fragments are cached, the content fragments include part of content of data to be forwarded, and the threshold number is a number of nodes required for recovering the content fragments cached by the failed node.
In practical applications, a node (terminal) carried by a user may leave a current cell due to the mobility of the user, or the node may fail due to the exhaustion of power of the node, the active closing of the D2D communication function by the user, the cleaning of a storage space by the node, and the like. When the nodes in the first node set fail, the multi-hop cooperation system acquires the threshold number so as to facilitate the subsequent determination of the substitute nodes of the failed nodes. The threshold number is calculated according to the existence probability, the existence probability of a node identifies the probability that the node still exists in the current cell after time delta, the mobility of users is considered, and the reliability of communication is improved.
S202, selecting all nodes which can effectively communicate with the nodes in the first node set with the number larger than or equal to the threshold value in the effective communication range from other nodes except the nodes in the first node set in the current cell as a second node set.
the effective communication distance for D2D communication between two nodes is limited, and the effective communication distance for inter-device communication based on multi-hop cooperation is also limited, because as the number of hops increases (the number of data forwarding times increases), the factors such as the signaling load, delay and noise of data become unacceptable. And the multi-hop cooperation system selects all nodes capable of effectively communicating with the nodes with the content fragments cached in the number which is greater than or equal to the threshold value as a second node set according to the communication condition of each node in the current cell. Each node in the second node set is guaranteed to be able to successfully recover the content fragment on the failed node.
S203, selecting a cache node in the second node set according to the association degree of each node in the second node set and the current cell.
And the multi-hop cooperation system selects the node with the highest degree of association with the current cell in the second node set as the cache node. The association degree of a node identifies the communication condition and social factors of the node and other nodes except the node in the current cell, the association degree of the cache node and the current cell is high, the effectiveness of the content fragment stored in the cache node is higher, and the communication reliability is higher when the D2D is used for communication.
S204, selecting a threshold number of nodes in the first node set in an effective communication range, and recovering the content fragments cached by the nodes leaving the current cell to the cache nodes.
When the multi-hop cooperation system selects the threshold number of nodes in the first node set, the threshold number of nodes capable of effectively communicating with the cache node may be randomly selected from the first node set. The transmission cost of data transmission from each node in the first node set to the cache node can be calculated, and the node with the minimum transmission cost is selected from the front threshold number, so that the transmission cost is saved.
In the embodiment of the present invention, the threshold number is calculated according to the existence probability, and the existence probability of a node identifies the probability that the node still stays in the current cell after the first time. The cache nodes finally determined according to the threshold number replace failed nodes, so that the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved. And in addition, the cache node is determined to replace the failed node, the association degree of each node in the second node set and the current cell is considered, the condition of node failure is fully considered, the node failure rate of the determined cache node is low, the probability of successful data transmission is high, the efficiency of data to be forwarded during communication by using D2D is improved, and the reliability of communication is improved.
Optionally, in the embodiment of the present invention, selecting a cache node from the second node set according to the association degree between each node in the second node set and the current cell includes:
step one, respectively acquiring the number of effective communication links established between each node in the second node set and the node in the current cell, and taking the number as the centrality of the nodes in the second node set.
The multi-hop cooperation system determines the number of effective communication links which can be established between each node in the second node set and the node in the current cell according to the effective range of multi-hop cooperation of each node in the second node set and the probability of successful data transmission among the nodes, and takes the number of the effective communication links as the centrality of the corresponding node in the second node set. The effective communication link means that each hop of data transmission in the link meets physical constraints and social constraints, the physical constraints mean that the communication distance between nodes does not exceed the maximum transmission distance of the D2D communication, and the signal-to-noise ratio of the data transmission must be greater than a preset signal-to-noise ratio threshold. The social constraint means that the probability of successful data transmission between nodes is greater than a preset transmission success rate threshold.
And step two, selecting the node with the maximum centrality in the second node set as a cache node.
The direct D2D communication between the node i and the node j needs to satisfy that the distance between the node i and the node j cannot exceed the maximum communication distance of D2D communication, and the signal-to-noise ratio of data transmission must be greater than a preset signal-to-noise ratio threshold, and meanwhile, considering the mobility of users and the social relationship between users, the probability of successful data transmission of the communication link between the nodes is greater than a preset transmission success ratio threshold. And (5) transmitting. The snr threshold is any value consistent with embodiments of the present invention, such as 13dB or greater, or 14dB or greater. The transmission success rate threshold is any value consistent with an embodiment of the present invention, and is set to 0.5 or more, for example, 0.65 or more.
In the embodiment of the present invention, the number of the effective communication links is used as the centrality of the nodes in the second node set, and the higher the centrality is, the higher the probability that the node downloads the data to be forwarded from the cache node in the current cell is. The node with the maximum centrality is used as the cache node, the communication condition in the current cell is fully considered, and the utilization rate of the content fragments stored in the cache node is improved.
Optionally, in the embodiment of the present invention, selecting a cache node from the second node set according to the association degree between each node in the second node set and the current cell includes:
step one, acquiring and calculating transmission cost and transmission completion probability according to the size, effective communication time, transmission power and channel condition of data to be transmitted between two nodes capable of directly performing device-to-device communication of D2D, wherein the transmission completion probability identifies the probability that data transmission can be completed between two nodes in a current cell.
The channel conditions include the bandwidth, noise strength, transmission power, and channel gain of the channel. Considering the mobility of the user, when the node carried with the user directly performs D2D communication, the effective communication distance of D2D may be exceeded. The transmission completion probability is the probability that the transmission of the data to be transmitted can be completed between two adjacent nodes in the effective communication time. In the embodiment of the invention, the probability of node failure is fully considered through the transmission completion probability, and the probability of successful data transmission can be increased.
And step two, according to the transmission cost and the transmission completion probability, respectively taking each node in the first node set as a vertex and respectively taking each node in the second node set as another vertex to construct a bipartite graph.
The construction of the bipartite graph defines two end points of the transmission path, facilitates calculation and selection of subsequent transmission paths.
and step three, respectively determining a transmission path between each node in the first node set and each node in the second node set according to the transmission completion probability and a Dynamic Programming algorithm.
If the transmission completion probability between the adjacent nodes is larger than or equal to a preset transmission success threshold value, taking the transmission completion probability as the weight of the path between the adjacent nodes; if the transmission completion probability between adjacent nodes is smaller than the transmission success threshold, the weight of the path between the adjacent nodes is 0, wherein the transmission success threshold is any value according to the embodiment of the present invention, for example, set to 0.5 or more and 0.55 or more. And respectively determining a path with the maximum weight product between two nodes in the bipartite graph by using a DP (Dynamic Programming) algorithm as a transmission path between the two nodes.
When the transmission completion probability is smaller than the transmission success threshold, the weight is set to 0, so that the condition that the transmission completion probability of D2D transmission between individual nodes is low to influence the whole communication can be effectively avoided, the probability of data transmission success is improved, and the reliability of the communication is ensured.
And step four, respectively determining the weight of each transmission path according to the transmission cost, and obtaining the matching of the shortest path with the minimum sum of the weights through a maximum matching algorithm Kuhn-Munkres algorithm.
The transmission cost of data downloading by D2D and the transmission cost of data downloading from the BS are comprehensively utilized as the weights of the transmission paths, and the matching of the shortest path with the smallest sum of the weights is obtained through the KM algorithm Kuhn-Munkres algorithm, that is, the sum of the weights of the threshold number of paths with one node in the second node set as an end point is the smallest. Meanwhile, the transmission cost of downloading data by using the D2D and the transmission cost of downloading data from the BS are considered, the transmission cost is considered more comprehensively, and the energy consumption in the data transmission process can be saved.
And step five, selecting a cache node according to the matching of the shortest path with the minimum sum of the weights.
in the embodiment of the invention, the shortest path with the minimum weight of the edge is obtained by utilizing the Kuhn-Munkres algorithm to select the cache node, so that the transmission cost is minimized, the transmission energy consumption is saved, the condition of node failure is fully considered, and the reliability of communication is improved.
Optionally, in the embodiment of the present invention, selecting a cache node from the second node set according to the association degree between each node in the second node set and the current cell includes:
Step one, acquiring and calculating transmission cost and transmission completion probability according to the size, effective communication time, transmission power and channel condition of data needing to be transmitted between two nodes capable of directly performing D2D device-to-device communication.
Considering the mobility of the user, when the node carried with the user directly performs D2D communication, the effective communication distance of D2D may be exceeded. The transmission completion probability is the probability that the transmission of the data to be transmitted can be completed between two adjacent nodes in the effective communication time. In the embodiment of the invention, the probability of node failure is fully considered through the transmission completion probability, and the probability of successful data transmission can be increased.
And step two, determining the weight of the edge between the two nodes capable of directly carrying out D2D communication according to the existence probability and the transmission completion probability, wherein the weight of the edge identifies the probability that the transmission of the data required to be transmitted cannot be completed between the two nodes capable of directly carrying out D2D communication.
in the process of data transmission between two adjacent nodes, data transmission fails whether the communication distance between the two nodes exceeds the effective communication distance or whether a node which is away from the current cell exists in the two nodes. Therefore, in the embodiment of the invention, the existence probability and the transmission completion probability are simultaneously considered, the mobility of the user is fully considered, and the success rate of data transmission is improved.
And step three, respectively determining the shortest path between each node in the first node set and each node in the second node set according to a Dynamic Programming algorithm.
Of course, the Shortest path between each node in the first node set and each node in the second node set may be determined according to other path algorithms, such as Dijkstra Algorithm, Floyd Algorithm, and Shortest pathfast Algorithm.
And step four, respectively determining the mutual preference between each node in the first node set and each node in the second node set according to the shortest path, the existence probability, the transmission completion probability and the transmission cost.
during data transmission, the nodes in the second node set prefer the nodes with high transmission success rate, and the nodes in the first node set prefer the nodes with low transmission cost. Therefore, the preference degree of each node in the second node set to each node in the first node set is determined according to the existence probability of each node in each shortest path and the transmission completion probability among the nodes; and determining the preference degree of each node in the first node set to each node in the second set according to the transmission cost among the nodes in each shortest path. In the implementation of the invention, the mutual preference between each node in the first node set and each node in the second node set is determined according to different requirements of each node in the first node set and each node in the second node set, so that the preference is more accurate.
and step five, regarding each node in the second node set as a threshold number of nodes to obtain a third node set.
in the process of content fragment repair, a node replacing a failed node needs to download data from nodes of a threshold number of first node sets to recover content fragments, and therefore before a one-to-one correspondence relationship is established, each node in a second node set needs to be regarded as a threshold number of nodes to obtain a third node set.
And step six, establishing a one-to-one corresponding relation between each node in the third node set and each node in the first node set according to the preference degree through a preset algorithm.
If the nodes in the third node set are more than the nodes in the first node set, node deletion is required: and randomly deleting one node in the second node set, and regarding each node left in the second node set as a threshold number of nodes to obtain a new third node set. If the number of the nodes in the new third node set is still more than that of the nodes in the first node set, the node deleting process is repeated until the number of the nodes in the third node set is less than or equal to that of the nodes in the first node set. By adopting the method for deleting the nodes, the matched nodes in the second node set can be ensured to be matched with the nodes in the first node set with the threshold number.
And step seven, determining the cache nodes according to the one-to-one corresponding relation.
And selecting a node which accords with the matching rule from the second node set as a cache node according to the established one-to-one corresponding relation. The matching rule means that one node in the second node set corresponds to a node in the first node set with a threshold number in a one-to-one correspondence relationship. Selecting a node meeting the matching rule from the second node set as a cache node, and selecting a node meeting the matching rule from the second node set randomly as a cache node; or selecting the node with the minimum sum of transmission costs from the nodes meeting the matching rule as the cache node.
In the embodiment of the invention, by establishing the one-to-one corresponding relation, the transmission cost is reduced, the communication resource is saved, the successful probability of data downloading is improved, the effective rate of the data to be forwarded in the D2D communication is improved, and the reliability of the communication is improved.
optionally, in the embodiment of the present invention, establishing, according to the preference degree through a preset algorithm, a one-to-one correspondence between each node in the third node set and each node in the first node set includes:
And establishing a one-to-one corresponding relation between each node in the third node set and each node in the first node set through a distributed matching algorithm Gale-Shapley algorithm or a dynamic matching algorithm Roth and Vande Vate algorithm according to the preference degree.
In the embodiment of the invention, a one-to-one corresponding relation is established through a distributed matching algorithm Gale-Shapley algorithm (Gale-Shapley algorithm) or a dynamic matching algorithm Roth and Vande Vate algorithm, a method for determining the one-to-one corresponding relation is provided, and a premise is provided for determining the cache node according to the one-to-one corresponding relation.
optionally, in the embodiment of the present invention, a correspondence between each node in the to-be-selected node set and each node cached with the content fragment is established according to the preference degree through a Roth and Vande Vate algorithm, which includes:
And step A, acquiring an initial corresponding relation between each node in the third node set and each node in the first node set.
The initial correspondence is any correspondence according to the embodiment of the present invention, and the initial correspondence may be a one-to-one relationship established randomly, or may be a one-to-one relationship established by a Gale-sharey algorithm, a Kuhn-Munkres algorithm, or other resource optimal matching algorithms, where in the initial correspondence, an individual node may be regarded as a node matching the node itself one-to-one, and the preference degrees thereof are all zero.
Optionally, before step a, the method further includes:
And when the number of the nodes in the third node set is larger than that of the nodes in the first node set, selecting the nodes with the number the same as that of the nodes in the first node set from the third node set, and randomly establishing a one-to-one corresponding initial corresponding relation with the nodes in the first node set.
C (c is a positive integer) represents the number of nodes in the first node set, d represents the threshold number, and the nodes in the second node set are selected randomly(c/d rounding down) the nodes in the second set of nodes and apply thisall the nodes are regarded as d nodes which are used as preferred nodes, the preferred nodes are selected from the third node set, and the rest nodes are selected randomlyAnd each node establishes a corresponding relation with the nodes in the first node set.
In the embodiment of the invention, a specific method for establishing the initial corresponding relation is provided, and one-to-one correspondence between the nodes is ensured.
Step B, judging whether the node pairs in the initial corresponding relation meet preset conditions or not according to the preference degree, wherein, the node pair in the initial corresponding relation is two nodes which have established one-to-one correspondence between the first node set and the third node set, the preset condition means that the preference degree of the third node to the fourth node is higher than the preference degree of the third node to the first node, and the preference degree of the fourth node to the third node is higher than the preference degree of the fourth node to the fifth node, the first node and the fourth node are any nodes in the first node set, the third node and the fifth node are any nodes in the third node set, and the first node and the third node are nodes in the same node pair in the initial corresponding relation, the fourth node and the fifth node are nodes in the same node pair in the initial corresponding relation, and the node pair formed by the third node and the fourth node is called a destruction pair.
And C, outputting the initial corresponding relation as a one-to-one corresponding relation when all the node pairs in the initial corresponding relation do not meet the preset condition.
And D, acquiring a third node and a fourth node as a destruction pair set when the node pairs meeting the preset conditions exist in the initial corresponding relation.
And E, constructing a second corresponding relation according to the damage pair set on the basis of the initial corresponding relation.
On the basis of the initial corresponding relation, taking the damage pairs in the damage pair set as one-to-one nodes, and matching the nodes in the initial corresponding relation, which are in one-to-one correspondence with the nodes in the damage pairs, according to the preference degree: if the nodes corresponding to the nodes in the damage pair in a one-to-one manner in the initial corresponding relationship have a preference (namely the two nodes can carry out effective communication), the nodes are matched into new nodes corresponding to one-to-one manner; if there is no preference between the nodes corresponding to the nodes in the pair of the damaged nodes in the initial correspondence (i.e. the two nodes cannot perform effective communication), the two nodes are taken as separate nodes (the nodes are considered to be matched with the nodes themselves) to obtain a second correspondence. In the embodiment of the invention, the nodes which can not carry out effective communication are not matched, so that the data transmission failure caused by the failure of a communication link is prevented.
and F, judging whether the node pairs in the second corresponding relation meet preset conditions or not according to the preference degree.
And G, outputting the second corresponding relation as a one-to-one corresponding relation when all the node pairs in the second corresponding relation do not meet the preset condition.
And H, judging whether the node in the node pair meeting the preset condition in the second corresponding relation exists in the damage pair set or not when the node pair meeting the preset condition exists in the second corresponding relation.
And step I, when the nodes in the node pairs meeting the preset conditions in the second corresponding relationship do not exist in the damage pair set, selecting any damage pair in the second corresponding relationship as a new node pair, and updating the second corresponding relationship.
And step J, judging whether the node pairs in the second corresponding relation meet preset conditions or not according to the preference degree.
and K, outputting the second corresponding relation as a one-to-one corresponding relation when the node pairs in the second corresponding relation do not meet the preset condition.
and step L, selecting any damaged pair in the second corresponding relation as a new node pair when the node pair meeting the preset condition exists in the second corresponding relation, updating the second corresponding relation, and returning to the step J to continue executing.
Step M, when a sixth node in a node pair meeting a preset condition in a second corresponding relationship exists in a destruction pair set, selecting a seventh node in the node pair meeting the preset condition in the second corresponding relationship, and updating the second corresponding relationship according to a node pair formed by the sixth node and the seventh node, wherein the preference degree of the seventh node to the sixth node is greater than the preference degree of the node in the destruction pair set to the sixth node, the sixth node is a node in the first node set, and the seventh node is a node in the third node set; or the seventh node is a node in the first set of nodes and the sixth node is a node in the third set of nodes.
And step N, adding the seventh node into the destruction pair set, and returning to the step F to continue executing.
In the embodiment of the invention, specific implementation steps of the Roth and Vande Vate algorithm are given, the establishment of a one-to-one corresponding relation is ensured, and energy can be saved on the basis of ensuring effective data transmission.
the encoding scheme in the present invention is any distributed encoding scheme consistent with the embodiments of the present invention. Among many distributed encoding schemes, erasure codes are commonly used. The erasure codes have different coding schemes (such as Reed code and fountain code) according to different requirements, but all have the same coding parameters, which can be expressed as (n, k)f,df) I.e. the data f to be forwarded is divided into kfThe part (in group) is encoded into a first value n parts, the first value n parts exist on n original nodes, and the size of the content fragment stored on each node isαf. When a node requests data f to be forwarded, the node can connect any k of n original nodesfa node to obtain f, each original node transmitting a size alphafThe content of (1). When the original node fails, a new cache node needs to be selected and connected with a threshold number dfThe existing original nodes/cache nodes are used for repairing the content fragments of the f cached on the failed nodes, and the content size transmitted by each original node/cache node is betaf. The following describes a specific embodiment of the distributed storage method based on multi-hop cooperation and encoding by using erasure codes in detail by taking erasure codes as an example.
The effective communication radius at a base communication device (e.g., AP or BS) is Rcellin a single cell scenario, the set of all nodes isThe set of all cached popular content nodes is H,For all popular content (including at least data to be forwarded) cached in the current cell. Denote the set of n nodes storing the data to be forwarded f as HfRequest node set for request f is RfAnd defineis the set of all contents stored on the h-th cache node.
In an actual communication scenario, the time at which a node requests data is typically random and subject to independent distribution. Denote the average arrival rate of node requests by W, let WjFor the instant when the jth request occurs, i.e.: wjequal to the total time of j request intervals (exponential distribution). Thus, Wjobeying the Irish distribution, namely:Therefore, the probability of j requests occurring by a node within Δ time is:
The popularity of the data obeys Zipf distribution, so the probability that the data with the i-th popularity ranking is requested can be expressed asWhere γ represents the distribution of the relative popularity of the data. A larger value of γ indicates a more concentrated distribution, i.e. a more popular data is requested a greater number of times by the node.Is composed ofThe number of the elements in (B).
Define the set of failed nodes after delta time asThe set of data that needs to be repaired can be represented asAt this time, to-be-forwarded data f, the number of the non-invalidated nodes caching the content fragment of f is represented as xfthe combination of the non-invalidated nodes cached with the content fragment of f sharesIn this case, the set of non-invalidated nodes cached with the content fragment of f may be represented as:
When a node caching the streaming data fails, a new node needs to be found to replace the failed node to cache the streaming data. Taking the node caching the content fragment of the data f to be forwarded as an example, in the process of repairing the content fragment of f,needs to select dfA node with f content fragments cached and downloading the content fragments with the size of beta from each selected nodefThe data of (1). Representing a set of candidate nodes that can become new cache nodes asWherein,The nodes in (1) may not cache any popular data, and may cache other popular data except f.
By usingRepresents the probability of repairing the content fragment of f in the failed node l to the node i, and
Wherein,
By usingRepresents the probability that node i downloads data from node h during intra-repair, and
Wherein,
According to the communication characteristics of multi-hop cooperation, the content can be transmitted through a hop at most when the D2D communication is carried out, and the content can be transmitted through the A hopWhen the content fragment indicating repair f is generated, a transmission path from node h to node i (including a transmitting/receiving node and a relay node)) And is andWherein,set of relay nodes selected during transmission from node h to node i when content fragmentation is denoted repair f, and whenWhen, it means that data is directly transmitted from node h to node i; when in usethe transmission path of the data is represented as follows: h → r1→…→rq→i。
In practical application scenarios, the physical communication condition that the D2D communication is directly performed between the node i and the node j is considered, that is, the distance between the node i and the node j must not exceed Dmaxand the SNR of the data transmission must be greater than a preset SNR thresholdConsidering the mobility of users and the social relationship among users, the probability that the communication link between the nodes successfully transmits data is greater than a preset transmission success rate threshold thetamin. WhereinThe value of (c) is any value consistent with an embodiment of the present invention, for example, set to 13dB or more, 14dB or more. Thetaminthe value of (b) is any value in accordance with the embodiments of the present invention, for example, set to 0.5 or more, 0.65 or more.
Therefore, when repairing the content fragment of f, the set of next hop nodes that node i can effectively communicate is represented as:
In the repair process, the probability that the node i can download data from the node h successfully is represented as:
i.e. when there is at least one feasible transmission path from node h to the new cache node i,So thatThen
Thus, node i is successfully connected to dfThe probability that each node repairs the content fragment of f is as follows:
the distance between the node i and the node j is less than dmaxTime T ofijObedience parameter is τijIs an exponential distribution having a probability distribution function ofWhen the node i transmits data with the size of M to the node j, the successful transmission probability is as follows:
Is calculated to obtain
Wherein, B is the channel bandwidth,As intensity of noise, Pi,jTransmission power, g, for a transmission link from node i to node ji,jthe channel gain between node i and node j obeys rayleigh distribution.
In the process of content fragment repair, the size of content transmitted to a new cache node by each node caching content fragments of f is betaffrom the above equation (2), when the content is repaired in a fragmented manner, the transmission size of the node i to the node j is βfThe probability of success of the data of (1) is:
Then node h transmits a transmission size of β to node i through multi-hop cooperationfThe probability of data success is:
Wherein,
To representthe number of the elements in the (A) is,To representThe jth element in (a).
simultaneously transmitting data beta from the node a to the node b in the process of content fragmentation repairfThe transmission cost of (a) is expressed as:
Wherein,Pa,bTransmission power of a transmission link for node a to node b, ga,bobeying Rayleigh distributions, g, for the channel gain between node a and node ba,bObeying a mean value of gammaa,bIndex distribution of (1), ga,b~Exp(γa,b). However, the above costIs difficult to calculate to obtain a closed-form solution, and therefore, the problem relaxation is performed using its lower boundary, i.e., it is
D selected when repairing content fragment of f with representation node ifA node set cached with f content fragments:
Thus, node i selects d fromfThe repair link can be successfully downloaded to a size of betafthe data probability of (c) is:
The probability that the node i can succeed in the content fragment of f can be finally expressed as:
when a node i downloads data f to be forwarded from a node with content fragments of f stored therein, k needs to be selectedfA node with f content fragments cached and downloading the content fragments with the size of alpha from each selected nodefThe data of (1). Similar to the above process of repairing the content fragment of f, node a downloads the content fragment of size α from node bfThe cost of the data of (a) is:
The probability that the node i downloads the content fragment of f from the node h is represented as:
Wherein,
by usingWhen f is downloaded, the transmission path from node h to node i is shown, then
Wherein,representing the set of relay nodes selected during the transmission from node h to node i when node i downloads f.
When downloading the data f to be forwarded, the set of next hop nodes which can effectively communicate with the node i is represented as:
in the content downloading process, the probability that the node i can successfully download data from the node h is represented as:
that is, when there is at least one feasible transmission path from node h to node i:
So that
then
Node i successfully connects to kfthe probability of downloading f by each node is as follows:
From the above equation (2), when the data to be forwarded is downloaded, the node i transmits the data α to the node jfThe probability of success is:
therefore, node h transmits a size α to node i through multi-hop cooperationfThe probability of success of the data of (1) is:
Wherein,To representthe number of the elements in the (A) is,To representThe jth element in (a).
by usingindicates k selected when node i downloads ffA buffer is provided with fNode set of capacity fragmentation:
thus, node i selects k fromfAll links can be successfully downloaded with the size of alphafThe probability of the data of (a) is:
The probability that node i can successfully download f can be finally expressed as:
The invention aims to maximize the successful downloading probability of the data f to be forwarded and the successful content fragmentation probability of f repair. When considering all cached popular content in the current cell, the average probability of successful content fragmentation repair is:
is a new cache node. Aggregating popular contentis represented asPopular content obeys Zipf distribution, thenThe probability of being requested, and being requested j times in total by all nodes within a delta time can be expressed asWherein, PrΔ(x) Representing the probability of a node generating x requests within the interval delta,Representing the likelihood of the rank r of content being requested, the average probability of success for downloading popular content may be expressed as:
Thus, the objective optimization function can be expressed as:
Referring to fig. 3 to 6, the effective communication radius at a base communication device (e.g., AP or BS) is Rcellthe effective communication range of the base communication device is taken as the current cell in the single-cell scenario of (2). For a distance O from the center of the cell1Has a distance of x (x is more than or equal to 0 and less than or equal to R)cell) Wherein the position of the node is O2Effective communication radius of multi-hop cooperation is AdmaxA is the maximum effective forwarding number of multi-hop cooperation, dmaxThe maximum effective communication distance of D2D communication. The following situation exists in the overlapping area of the communication range of the multi-hop cooperation of the node and the current cell.
When Ad is shown in FIG. 3max≥Rcelland Admax-RcellWhen x, the area of the overlap region can be expressed as:Wherein S iscom(x) Is the area of the overlap region.
when Ad is shown in FIG. 4max<RcellAnd R iscell-Admaxwhen x, the area of the overlap region can be expressed as: scom(x)=π·(Admax)2Wherein S iscom(x) Is the area of the overlap region.
when Ad is shown in FIG. 5max<RcellAnd R iscell-Admax<x≤RcellWhen, the area of the overlap region can be expressed as:
wherein S iscom(x) Is the area of the overlap region.
When R is shown in FIG. 6cell<AdmaxAnd Admax-Rcell<x≤RcellWhen, the area of the overlap region can be expressed as:
wherein S iscom(x) Is the area of the overlap region.
in order to ensure the validity of data to be forwarded in a scene, it is required to ensure that when the overlapping area between the multi-hop cooperative communication range of the node and the current cell is minimum, at least a threshold number of nodes cached with content fragments can still perform effective communication with the node. That is, when nodes obey random distribution in the scene, it is necessary to satisfy that there is a random distribution in the overlapping rangeThe nodes to which the data is to be forwarded are cached.
Considering the social relationship among users, the probability that each node leaves the current cell is different, so for node i, after Δ time, the number of nodes caching data to be forwarded existing in the effective communication range can be represented as:Wherein p ish(Δ) is the probability that node h still exists in the current cell after Δ time, which is obtained from the above equation (1). HfAnd caching the set of nodes to be forwarded within the effective communication range of the node i at the moment.
Order toK is obtained through a first preset algorithmfAnd dfWherein R isfIs a collection of nodes requesting data to be forwarded.
Optionally, the first preset algorithm includes:
First, initialize k'f。
byk 'initialization'fWherein
Second step, according to the current k'fcalculating kfand df。
When MDS (Maximum Distance Separable) coding scheme is applied, kf=k'f,df=kf。
when MSR (Minimum Storage Regenerating) coding scheme is applied, whenWhen the temperature of the water is higher than the set temperature,df=2kf-1 ═ n-1; when in useWhen k isf=k'f,df=2k'f-1。
When MBR (Minimum Bandwidth Regenerating) coding scheme is applied, kf=k'f,df=n-1。
Thirdly, according to the current kfand dfCalculating alphafand betaf。
When MDS coding schemes are appliedWhen is αf=βf=f/kf。
When the MSR coding scheme is applied, whendf≥2kfat-1 time, αf=f/kf,
When the MBR coding scheme is applied,
And fourthly, determining a set of nodes which can successfully transmit the content fragments of the data f to be forwarded to the node i in the effective communication range.
in the content downloading process (downloading the data f to be forwarded), for any request node i, the number of nodes (enabling to successfully transmit the content fragment of f) with the node i in the hop A (including all the situations less than or equal to the hop A) is increasedNumber of collaborators) is represented as kf,itherefore, after the Δ time, the number of nodes, which buffer the content fragments of f, that can be connected to the requesting node i with the distance x from the center of the cell in the reliable communication range is:
Therefore, k'fMinimum of requesting nodes equal to fI.e. update(if any requesting node cannot connect to any node caching content fragments of f, thenlet the requesting node download f from the base station, irrespective of it)。
fifthly, if the updated k'fLess than kflet updated post-k'fIs initialized k'fReturning to the second step for continuous execution, and if the updated k'fGreater than or equal to kfThen output kfand df。
According to k of the outputfAnd dfand encoding the data f to be forwarded into n groups of content fragments by using erasure codes, and storing the n groups of content fragments in a distributed manner into n nodes.
In the embodiment of the invention, k is calculatedfAnd dfIn the process, the mobility of the nodes and the social contact among the nodes are considered, so that the probability of failure of the node which caches the content fragment of f before the node requesting f downloads f is reduced.
When the node in which the content fragment of f is cached fails, content fragment repair is required, that is, a new cache node is used to replace the failed node. In order to ensure the stability and reliability of the data f to be forwarded, the newly selected cache node cannot store the content fragment of f, that is: the new cache node i selected must satisfywherein,For the set of all the nodes it is,Is the set of all nodes that have cached content slices of f. This is because if a plurality of content fragments of f are cached in the same node, if the node fails, stability and reliability of f will be greatly affected.
In addition, on the premise of allowing multi-hop data transmission, when A-hop data transmission is allowed at most, the newly selected cache nodeit must satisfy: is present at least dfAnd the node with the content fragment of f can transmit the data in f to the new cache node through an effective link within the A hop.
therefore, when repairing the content fragment of f on a failed node, the set of new nodes to be selected is:
when in usewhen a plurality of nodes exist, a new cache node can be selected according to the centrality of the node in the current cell, wherein the centrality of the node is the number of effective communication links which can be established between the node and other nodes under the condition that physical factors and social associations are considered simultaneously.
In thatAnd selecting the node with the maximum centrality as a new cache node, namely:
When a plurality of feasible transmission paths exist between the node caching the content fragment of the data to be forwarded and a new caching node, the path with the minimum transmission cost is selected.
In the embodiment of the invention, the number of the effective communication links is used as the centrality of the node caching the content fragments of the data to be forwarded, and the higher the centrality is, the higher the probability that the node downloads the data to be forwarded from the caching node in the current cell is. The node with the maximum centrality is used as the cache node, the communication condition in the current cell is fully considered, and the utilization rate of the content fragments stored in the cache node is improved.
In the embodiment of the invention, in order to solve the problem of selecting the multi-hop cooperative transmission path, a centralized matching algorithm can be adopted for optimization, and a bipartite graph is used for matching. Since the content download process and the content fragment repair process are only the definition of the weight of the edge and the number of edges successfully matched by D2D in data transmission are different, and other mathematical processes are the same, the content fragment repair process is taken as an example.
step one, constructing a bipartite graph.
The two node sets of the bipartite graph are respectively a first node set of all nodes cached with content fragments in the current celland a second set of all nodes capable of effective communication with nodes in the first set of nodes greater than or equal to a threshold number(can at least sum with any node i inIs communicatively connected via active links within a hop, i.e. a)。
And step two, assigning a weight to the bipartite graph edge.
In the constructed bipartite graph, the weight value of an edge between a node i and a node j is the transmission cost w of the node i for transmitting data to the node j through multi-hop cooperationij。
To determine wijFirst, a transmission path of multi-hop cooperation between the node i and the node j is determined. Constructing a weighted graph G, wherein the weighted graph G comprises all nodes in the current cell, an edge exists between any two nodes, and the weight value of the edge between the node a and the node b is represented as Zablet us order(Probability of success of the data in the f transmitted from the node a to the node b in the content fragmentation repair), if the weight of the edge between the node a and the node bLet the weight z of the edge between node a and node bab0. Then according to the weight of the edge between any usersFinding the optimal path between the node i and the node j by adopting a Dynamic Programming algorithmSo thatThe product of the weights of all edges in the list is the largest.
After determining the transmission path between the node i and the node j at the two ends of the bipartite graph, changing the weight of the edge of the node i and the node j into the weight of the edge of the node jWherein,to be the success probability of transmitting data in f from node to node i via multi-hop cooperation,the transmission cost for node h to transmit data in f to node i through D2D multi-hop cooperation,Representing the cost of node i to acquire the data in f from the BS. And finishing the construction of the bipartite graph.
And step three, obtaining the matching of the sum of the minimum weights by adopting a KM algorithm (Kuhn-Munkres algorithm).
To obtain a matching correspondence of the sum of the minimum weightsThe node in (4) as a new cache node.
In the embodiment of the invention, the optimal path between the nodes is determined according to the probability of data success, the communication can be ensured to be achieved, the total transmission cost is taken as the weight of the edge between the two end points of the bipartite graph, the KM algorithm is adopted to obtain the matching of the sum of the minimum weights, and then the new cache node is determined, and the transmission cost can be reduced.
In order to solve the problem of selecting the multi-hop cooperative transmission path, the embodiment of the invention also provides a distributed matching algorithm.
Step one, establishing the matching of the nodes in the first node set and the nodes in the third node set.
For the content fragment repair process, a first set of nodes is represented asThe cache nodes to be selected need to be connected for repairing content fragmentsfa node cached with f content fragments, therefore, the matching between the cache node to be selected and the node cached with f content fragments is 1-dfThe matching problem of (2). Therefore, each node in the second set of nodes is extended to dfObtaining a third node setSo that the match becomes a 1-1 match. Accordingly, during the downloading of the content,To treat each data requesting node as kfThe set of the individual nodes is then selected,Is a collection of nodes cached with content fragments. As for the content fragment repair process,Also for the content download process, the selection of the multi-hop cooperative transmission path may equivalently be based onAnd1-1 matching problem between.
we define a matching function Φ:AndSo that
Is a setThe (c) th element of (a),is a setThe (c) th element of (a),Φ is a one-to-one stable match.
For arbitraryNode pointIt is desirable to be able to obtain data efficiently and reliably, i.e., with a high success rate of data transmission. For arbitraryNode pointIt is desirable to be able to save energy as much as possible, i.e. to have a low transmission cost.
taking the process of repairing the content fragment of f as an example, the following steps are performedToThe complete multi-hop transmission path is shown asThen the process of the first step is carried out,Obtained according to the following steps:
the weight value of the edge between any two nodes in the current cell, node i and node j is expressed asWherein p isi(Δ) is the probability that node i is still present in the current cell after the Δ time has elapsed,And transmitting the data in the f to the node j by the node i in the content fragment repairing process.
According to the weight z between nodesijObtained by adopting a Dynamic Programming algorithmtooptimal path therebetweenthe sum of the weights of each hop edge in the path is minimized.
Is obtained fromToComplete transmission path ofafter that time, the user can use the device,to pairThe preference of (c) can be measured as:
to representThe number of the elements in the (A) is,Representing a paththe ith user in (1). By combining matricesIs arranged according toarranged in descending order to obtainNode pair in (2)A list of preferences of the nodes in (1). Accordingly, the method can be used for solving the problems that,to pairthe preference level of (c) may be expressed as:
And when the content fragment of f is repaired, the node a transmits the data in f to the node b at the transmission cost of one hop. Also by combining matricesare arranged in descending order to obtainNode pair in (2)A list of preferences of the nodes in (1).
Is obtained byIntermediate node andafter the inter-node preference, the inter-node preference can be obtained by the Gale-Shapley algorithm (the Gale-Shapley algorithm )Intermediate node andAnd (4) stably matching the middle nodes one to serve as one-to-one corresponding relation.
Is of course obtainedIntermediate node andafter the mutual preference of the middle nodes, the mutual preference can be obtained through the Roth and Vande Vate algorithmIntermediate node andAnd (4) stably matching the middle nodes one to serve as one-to-one corresponding relation.
the Roth and Vande Vate algorithm is applied, and the blocking pair is defined first. For collectionsnode i and set inFor node j in (1), if φ (i) ≠ j (φ (i) represents the object that node i currently matches), and node i prefers node j over φ (i), and node j prefers node i over φ (j) (φ (j) represents the object that node j currently matches), then node i and node j constitute a pair of corruptions.
In the Roth and Vande Vate algorithm, any node can match itself, and the preference for itself is 0. If one matchesThere is no destructive pair, then the match is madeIs stable.
will be assembledand collectionsThe initial match between is expressed asmi,njRespectively represent collectionsThe ith node and set inThe jth node in (1).
step one, judgingWhether it is stable.
Let q be 0.
if it is notIs not stable, determinesOne pair of destruction pairs (m)q,nq) Then a new match is formed based on the pairs of corruptionsSo thatLet A (q) be (m)q,nq)。
If it is notIs stable, then outputthe algorithm ends.
Step two, whenis not stable, thenIn search of all pairs of breakages (m)q+1,nq+1)
step three, ifTo all pairs of destruction (m)q+1,nq+1) In other words, there is one destruction pair (m)q+1,nq+1) Wherein m isq+1is contained in A (q), then from all pairs of disruptions (m, n)q+1) In (1), n is selectedq+1The object to be optimized is mq+1And constitute a destruction pair (m)q+1,nq+1) To obtain a new matching setso thatlet A (q +1) be A (q) U { n }q+1};
1) If atM inq+1If not matched, then A (q +1) will not be includedIn the pair of
2) If atM inq+1Is matched, then in A (q +1), there may beDestruction pair of (m)q+2,nq+2) And satisfyAnd m is contained in A (q +1)q+2And nq+2Then n is selected from all the punctured pairsq+2So that m isq+2Is nq+2the most preferred partner. M is to beq+2And nq+2matching to obtain a new matching set
Repeating the process of the third step until a match is obtainedr > q, such thatis not present in the set A (r), thennamely stable matching.
Step four, ifTo all pairs of destruction (m)q+1,nq+1) In other words, mq+1Are not included in A (q), but there is one destruction pair (m)q+1,nq+1) Wherein n isq+1Is included in a (q), then the roles of M and N are exchanged and the steps in step three are repeated.
Step five, ifAll pairs of destruction (m)q+1,nq+1) Chinese character of (1)If none of the elements is present in A (q), then selecting an arbitrary pair of disruptions (m)q+1,nq+1) To formAnd defines a (q +1) ═ a (q) { U { m }q+1,nq+1}. Therefore, A (q +1) includes A (q) and does not include A (q)the destruction pair in (1). This process is repeated untilThere is no destructive pair, i.e. a stable match is achieved.
In the embodiment of the invention, one-to-one stable matching can be obtained by a centralized KM algorithm or by using a distributed Gale-Shapley algorithm and a Roth and Vande Vate algorithm. When the KM algorithm and the Gale-Shapley algorithm are adopted, if any one node fails, all nodes need to be matched again, unstable matching pairs are eliminated by adopting the Roth and Vande Vate algorithm in each iteration, and finally a stable matching set is obtained.
Referring to fig. 7, fig. 7 is a graph illustrating a probability of success of data transmission according to an embodiment of the present invention. Wherein, the curve 701 is a curve adopting a KM algorithm, the curve 702 is a curve adopting a Gale-Shapley algorithm, and the curve 703 is a curve adopting a Roth and Vande Vate algorithm. The horizontal axis represents run time in seconds and the vertical axis represents the probability of successful data transmission. It can be seen that the success rate of data transmission using the KM algorithm is slightly higher than that using the Gale-Shapley algorithm and the Roth and Vande Vate algorithm.
Referring to fig. 8, fig. 8 is a graph of calculated time for an embodiment of the present invention. Wherein, the curve 801 is a curve using KM algorithm, the curve 802 is a curve using Gale-Shapley algorithm, and the curve 803 is a curve using Roth and Vande Vate algorithm. The horizontal axis represents the unit of operating time in seconds, and the vertical axis represents the unit of computing time in seconds. With the increase of the running time, the calculation time of the three algorithms is increased in a step manner, because the number of the nodes leaving the current cell begins to increase with the increase of the time, the calculation degree becomes complicated, and when the number of the nodes leaving the current cell per second is stable after a period of time, the calculation time also tends to be stable relatively. As can be seen from FIG. 8, the computation time of Roth and Vande Vate algorithm is significantly less than that of KM algorithm and Gale-Shapley algorithm, and the computation complexity is lower.
Referring to fig. 9, fig. 9 is a schematic diagram of a distributed storage apparatus based on multi-hop cooperation according to an embodiment of the present invention, including:
A threshold number obtaining module 901, configured to obtain a predetermined threshold number when a node in a first node set fails, where the first node set is a set of all nodes in a current cell where content fragments are cached, the content fragments include part of content of data to be forwarded, and the threshold number is a number of nodes required to recover the content fragments cached by the failed node.
A node set determining module 902, configured to select, from other nodes in the current cell except for the nodes in the first node set, all nodes that can effectively communicate with the nodes in the first node set that are greater than or equal to the threshold number, as a second node set.
A cache node determining module 903, configured to select a cache node from the second node set according to the association degree between each node in the second node set and the current cell.
And a content fragment recovery module 904, configured to select a threshold number of nodes in the first node set in an effective communication range, and recover the content fragments cached by the failed nodes to the cache nodes.
in the embodiment of the present invention, the threshold number is calculated according to the existence probability, and the existence probability of a node identifies the probability that the node still stays in the current cell after the first time. The cache nodes finally determined according to the threshold number replace failed nodes, so that the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved. And the cache node is determined to replace the failed node, the association degree of each node in the second node set and the current cell is considered, the condition of node failure is fully considered, the failure rate of the determined cache node is low, the probability of successful data transmission is high, the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved.
optionally, in this embodiment of the present invention, the distributed storage apparatus based on multi-hop cooperation further includes:
and the numerical value calculation module is used for acquiring and calculating the number of the grouped data to be forwarded and the threshold number according to the communication coverage of the base station in the current cell, the maximum communication radius of multi-hop cooperation, a first numerical value and a predetermined existence probability, wherein the first numerical value is the number of preset nodes caching the data to be forwarded, the existence probability is the probability that an eighth node is still in the current cell after the first time, the first time is any time, and the eighth node is any node in the current cell.
And the data grouping module is used for grouping the data to be forwarded according to the grouping number to obtain the grouped data to be forwarded.
and the data coding module is used for coding the grouped data to be forwarded according to the threshold quantity to obtain multiple groups of content fragments.
And the original node selection module is used for selecting the nodes with the number of the first numerical values in the current cell as the original nodes.
And the cache configuration module is used for caching the content fragments into the original nodes respectively.
In the embodiment of the invention, the packet number and the threshold number are calculated according to the existence probability so as to encode the data to be forwarded into the multi-group content fragments, the mobility of users is considered, the efficiency of the data to be forwarded during communication by using D2D can be improved, and the reliability of the communication is improved.
optionally, in this embodiment of the present invention, the distributed storage apparatus based on multi-hop cooperation further includes:
and the leaving probability determining module is used for acquiring the social relationship among the users in the current cell and determining the probability of each user leaving the current cell.
And the existence probability calculation module is used for calculating the existence probability of the node corresponding to each user according to the probability of each user leaving the current cell.
In the embodiment of the invention, a specific calculation method of the existence probability is provided, the mobility of the user is considered, the calculated existence probability is accurate, the efficiency of the data to be forwarded during the communication by using the D2D can be improved, and the reliability of the communication is improved.
Optionally, in this embodiment of the present invention, the cache node determining module 903 includes:
And the centrality degree calculation operator module is used for respectively acquiring the number of effective communication links established between each node in the second node set and the node in the current cell, and the number is used as the centrality degree of the node in the second node set.
And the first cache node selection submodule selects the node with the maximum centrality in the second node set as the cache node.
In the embodiment of the present invention, the number of the effective communication links is used as the centrality of the nodes in the second node set, and the higher the centrality is, the higher the probability that the node in the current cell downloads the data to be forwarded from the cache node is. The node with the maximum centrality is used as the cache node, the communication condition in the current cell is fully considered, and the utilization rate of the content fragments stored in the cache node is improved.
Optionally, in this embodiment of the present invention, the cache node determining module 903 includes:
and the first cost calculation submodule is used for acquiring and calculating the transmission cost and the transmission completion probability according to the size, the effective communication time, the transmission power and the channel condition of data needing to be transmitted between two nodes capable of directly carrying out D2D device-to-device communication, wherein the transmission completion probability identifies the probability that data transmission can be completed between the two nodes in the current cell.
And the bipartite graph constructing submodule is used for constructing the bipartite graph by respectively taking each node in the first node set as a vertex and each node in the second node set as another vertex according to the transmission cost and the transmission completion probability.
And the first path calculation submodule is used for respectively determining a transmission path between each node in the first node set and each node in the second node set according to the transmission completion probability and a Dynamic Programming algorithm.
And the KM algorithm submodule is used for respectively determining the weight of each transmission path according to the transmission cost, and obtaining the matching of the shortest path with the minimum sum of the weights through a maximum matching algorithm Kuhn-Munkres algorithm.
And the second cache node selection submodule is used for selecting the cache node according to the matching of the shortest path with the minimum sum of the weights.
In the embodiment of the invention, the shortest path with the minimum weight of the edge is obtained by utilizing the Kuhn-Munkres algorithm to select the cache node, so that the transmission cost is minimized, the transmission energy consumption is saved, the condition of node failure is fully considered, and the reliability of communication is improved.
optionally, in this embodiment of the present invention, the cache node determining module 903 includes:
And the second cost calculation submodule is used for acquiring and calculating the transmission cost and the transmission completion probability according to the size, the effective communication time, the transmission power and the channel condition of data needing to be transmitted between two nodes capable of directly carrying out D2D device-to-device communication.
And the weight calculation submodule is used for determining the weight of an edge between two nodes capable of directly carrying out D2D communication according to the existence probability and the transmission completion probability, wherein the weight of the edge identifies the probability that the transmission of the data needing to be transmitted cannot be completed between the two nodes capable of directly carrying out D2D communication.
And the second path calculation submodule is used for respectively determining the shortest path between each node in the first node set and each node in the second node set according to a Dynamic Programming algorithm.
And the preference degree determining submodule is used for respectively determining the mutual preference degree between each node in the first node set and each node in the second node set according to the shortest path, the existence probability, the transmission completion probability and the transmission cost.
And the third node set acquisition submodule is used for regarding each node in the second node set as a threshold number of nodes to obtain a third node set.
And the one-to-one corresponding relation establishing submodule is used for establishing one-to-one corresponding relation between each node in the third node set and each node in the first node set through a preset algorithm according to the preference degree.
And the third cache node selection submodule is used for determining cache nodes according to the one-to-one corresponding relation.
In the embodiment of the invention, by establishing the one-to-one corresponding relation, the transmission cost is reduced, the communication resource is saved, the successful probability of data downloading is improved, the effective rate of the data to be forwarded in the D2D communication is improved, and the reliability of the communication is improved.
Optionally, in the embodiment of the present invention, the sub-modules are established according to the preference degree through a preset algorithm in a one-to-one correspondence relationship, and specifically configured to:
And establishing a one-to-one corresponding relation between each node in the third node set and each node in the first node set through a distributed matching algorithm Gale-Shapley algorithm or a dynamic matching algorithm Roth and Vande Vate algorithm according to the preference degree.
In the embodiment of the invention, a one-to-one corresponding relation is established through a distributed matching algorithm Gale-Shapley algorithm (Gale-Shapley algorithm) or a dynamic matching algorithm Roth and Vande Vate algorithm, a method for determining the one-to-one corresponding relation is provided, and a premise is provided for determining the cache node according to the one-to-one corresponding relation.
optionally, in this embodiment of the present invention, the one-to-one correspondence establishing sub-module includes:
and the initial corresponding relation acquisition unit is used for acquiring the initial corresponding relation between each node in the third node set and each node in the first node set.
a preset condition first judging unit for judging whether the node pairs in the initial corresponding relation satisfy the preset condition according to the preference degree, wherein, the node pair in the initial corresponding relation is two nodes which have established one-to-one correspondence between the first node set and the third node set, the preset condition means that the preference degree of the third node to the fourth node is higher than the preference degree of the third node to the first node, and the preference degree of the fourth node to the third node is higher than the preference degree of the fourth node to the fifth node, the first node and the fourth node are any nodes in the first node set, the third node and the fifth node are any nodes in the third node set, and the first node and the third node are nodes in the same node pair in the initial corresponding relation, the fourth node and the fifth node are nodes in the same node pair in the initial corresponding relation, and the node pair formed by the third node and the fourth node is called a destruction pair.
And the first output unit is used for outputting the initial corresponding relation as a one-to-one corresponding relation when all the node pairs in the initial corresponding relation do not meet the preset condition.
And the broken pair determining unit is used for acquiring the third node and the fourth node as a broken pair set when the node pair meeting the preset condition exists in the initial corresponding relation.
And the second corresponding relation determining unit is used for constructing a second corresponding relation according to the damage pair set on the basis of the initial corresponding relation.
And the second judgment unit of the preset condition is used for judging whether the node pairs in the second corresponding relation meet the preset condition or not according to the preference degree.
And the second output unit is used for outputting the second corresponding relation as a one-to-one corresponding relation when all the node pairs in the second corresponding relation do not meet the preset condition.
And the broken and exchanged pair judging unit is used for judging whether the node in the node pair meeting the preset condition in the second corresponding relationship exists in the damaged pair set or not when the node pair meeting the preset condition exists in the second corresponding relationship.
And the second corresponding relation first updating unit is used for selecting any damaged pair in the second corresponding relation as a new node pair to update the second corresponding relation when the nodes in the node pairs meeting the preset conditions in the second corresponding relation do not exist in the damaged pair set.
And the preset condition third judging unit is used for judging whether the node pairs in the second corresponding relation meet the preset condition or not according to the preference degree.
And the third output unit is used for outputting the second corresponding relation as a one-to-one corresponding relation when the node pairs in the second corresponding relation do not meet the preset condition.
And the second corresponding relation second updating unit is used for selecting any damaged pair in the second corresponding relation as a new node pair when the node pair meeting the preset condition exists in the second corresponding relation, updating the second corresponding relation and returning to the preset condition third judging unit for continuous execution.
A second correspondence relationship third updating unit, configured to select a seventh node from the node pair satisfying the preset condition in the second correspondence relationship when a sixth node in the node pair satisfying the preset condition in the second correspondence relationship exists in the destruction pair set, and update the second correspondence relationship according to a node pair formed by the sixth node and the seventh node, where a preference degree of the seventh node for the sixth node is greater than a preference degree of the node in the destruction pair set for the sixth node, the sixth node is a node in the first node set, and the seventh node is a node in the third node set; or the seventh node is a node in the first set of nodes and the sixth node is a node in the third set of nodes.
And the return execution unit is used for adding the seventh node into the destruction pair set and returning the preset condition to the second judgment unit for continuing execution.
In the embodiment of the invention, specific implementation steps of the Roth and Vande Vate algorithm are given, the establishment of a one-to-one corresponding relation is ensured, and energy can be saved on the basis of ensuring effective data transmission.
Referring to fig. 10, fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention, including:
A processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 communicate with each other via the communication bus 1004,
a memory 1003 for storing a computer program;
The processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
when a node in a first node set fails, acquiring a predetermined threshold number, wherein the first node set is a set of all nodes cached with content fragments in a current cell, the content fragments contain partial content of data to be forwarded, and the threshold number is the number of nodes required for recovering the content fragments cached by the failed node;
Selecting all nodes which can effectively communicate with the nodes in the first node set with the number larger than or equal to the threshold value number from other nodes except the nodes in the first node set in the current cell as a second node set;
Selecting cache nodes in the second node set according to the association degree of each node in the second node set and the current cell;
And in the effective communication range, selecting a threshold number of nodes in the first node set, and recovering the content fragments cached by the failed nodes to the cache nodes.
the communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In the electronic device according to the embodiment of the present invention, the threshold number is calculated according to the existence probability, and the existence probability of a node indicates the probability that the node still stays in the current cell after the first time. The cache nodes finally determined according to the threshold number replace failed nodes, so that the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved. And the cache node is determined to replace the failed node, the association degree of each node in the second node set and the current cell is considered, the condition of node failure is fully considered, the failure rate of the determined cache node is low, the probability of successful data transmission is high, the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved.
the embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above-mentioned distributed storage methods based on multi-hop cooperation.
in the storage medium according to the embodiment of the present invention, the threshold number is calculated according to the existence probability, and the existence probability of a node identifies the probability that the node still stays in the current cell after the first time. The cache nodes finally determined according to the threshold number replace failed nodes, so that the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved. And the cache node is determined to replace the failed node, the association degree of each node in the second node set and the current cell is considered, the condition of node failure is fully considered, the failure rate of the determined cache node is low, the probability of successful data transmission is high, the efficiency of data to be forwarded during communication by using the D2D is improved, and the reliability of communication is improved.
For the apparatus/electronic device/storage medium embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
the above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (7)
1. A distributed storage method based on multi-hop cooperation is characterized by comprising the following steps:
When a node in a first node set fails, acquiring a predetermined threshold number, wherein the first node set is a set of all nodes cached with content fragments in a current cell, the content fragments contain partial content of data to be forwarded, and the threshold number is the number of nodes required for recovering the content fragments cached by the failed node;
Selecting all nodes capable of effectively communicating with the nodes in the first node set with the number larger than or equal to the threshold number from other nodes except the nodes in the first node set in the current cell as a second node set;
Acquiring and calculating the transmission cost and the transmission completion probability according to the size, effective communication time, transmission power and channel condition of data to be transmitted between two nodes capable of directly carrying out device-to-device D2D communication;
Determining a weight of an edge between two nodes capable of directly performing D2D communication according to an existence probability and the transmission completion probability, wherein the weight identifies the probability that the transmission of the data needing to be transmitted cannot be completed between the two nodes capable of directly performing D2D communication;
Respectively determining the shortest path between each node in the first node set and each node in the second node set according to a Dynamic Programming algorithm;
determining the mutual preference between each node in the first node set and each node in the second node set according to the shortest path, the existence probability, the transmission completion probability and the transmission cost;
regarding each node in the second node set as the threshold number of nodes to obtain a third node set;
Establishing a one-to-one corresponding relation between each node in the third node set and each node in the first node set according to the preference degree through a preset algorithm;
Determining the cache node according to the one-to-one corresponding relation;
And selecting the threshold number of nodes in the first node set within an effective communication range, and recovering the content fragments cached by the failed nodes to the cache nodes.
2. The method of claim 1, wherein prior to said obtaining a predetermined threshold number when a node in the first set of nodes fails, the method further comprises:
Acquiring and calculating the number of grouped data to be forwarded and the threshold number according to the communication coverage of a base station in the current cell, the maximum communication radius of multi-hop cooperation, a first numerical value and a predetermined existence probability, wherein the first numerical value is the number of preset nodes caching the data to be forwarded, the existence probability is the probability that an eighth node is still in the current cell after a first time, the first time is any time, and the eighth node is any node in the current cell;
Grouping the data to be forwarded according to the grouping number to obtain grouped data to be forwarded;
Coding the grouped data to be forwarded according to the threshold number to obtain a plurality of groups of content fragments;
Selecting the nodes with the number of the first numerical values in the current cell as original nodes;
And respectively caching the content fragments into the original nodes.
3. The method according to claim 1, wherein the establishing a one-to-one correspondence between each node in the third set of nodes and each node in the first set of nodes according to the preference degree through a preset algorithm comprises:
and establishing the one-to-one corresponding relation between each node in the third node set and each node in the first node set through a distributed matching algorithm Gale-Shapley algorithm or a dynamic matching algorithm Roth and Vande Vate algorithm according to the preference degree.
4. The method according to claim 3, wherein said establishing said one-to-one correspondence between each node in said third set of nodes and each node in said first set of nodes according to said preference by means of a distributed matching algorithm Gale-sharey algorithm or a dynamic matching algorithm Roth and Vande Vate algorithm comprises:
Step A, acquiring an initial corresponding relation between each node in the third node set and each node in the first node set;
Step B, judging whether the node pairs in the initial corresponding relation meet preset conditions or not according to the preference degrees, wherein the node pairs in the initial corresponding relation are two nodes which are established to be in one-to-one correspondence between the first node set and the third node set, the preset conditions mean that the preference degree of the third node to the fourth node is higher than the preference degree of the third node to the first node, the preference degree of the fourth node to the third node is higher than the preference degree of the fourth node to the fifth node, the first node and the fourth node are any nodes in the first node set, the third node and the fifth node are any nodes in the third node set, the first node and the third node are nodes in the same node pair in the initial corresponding relation, and the fourth node and the fifth node are nodes in the same node pair in the initial corresponding relation, a node pair formed by the third node and the fourth node is called a destruction pair;
Step C, when all node pairs in the initial corresponding relation do not meet the preset condition, outputting the initial corresponding relation as the one-to-one corresponding relation;
Step D, when the node pairs meeting the preset condition exist in the initial corresponding relation, acquiring the third node and the fourth node as a destruction pair set;
step E, on the basis of the initial corresponding relationship, constructing a second corresponding relationship according to the damage pair set;
Step F, judging whether the node pairs in the second corresponding relation meet the preset conditions or not according to the preference degree;
Step G, when all the node pairs in the second corresponding relation do not meet the preset condition, outputting the second corresponding relation as the one-to-one corresponding relation;
Step H, when the node pairs meeting the preset condition exist in the second corresponding relation, judging whether the nodes in the node pairs meeting the preset condition exist in the damage pair set or not;
Step I, when the nodes in the node pairs which meet the preset conditions in the second corresponding relationship do not exist in the damage pair set, selecting any damage pair in the second corresponding relationship as a new node pair, and updating the second corresponding relationship;
step J, judging whether the node pairs in the second corresponding relation meet the preset conditions or not according to the preference degrees;
Step K, when the node pairs in the second corresponding relation do not meet the preset condition, outputting the second corresponding relation as the one-to-one corresponding relation;
Step L, when node pairs meeting the preset conditions exist in the second corresponding relationship, selecting any damaged pair in the second corresponding relationship to serve as a new node pair, updating the second corresponding relationship, and returning to the step J to continue execution;
Step M, when a sixth node in the node pair which satisfies the preset condition in the second corresponding relationship exists in the damage pair set, selecting a seventh node in the node pair which satisfies the preset condition in the second corresponding relationship, and updating the second corresponding relationship according to a node pair formed by the sixth node and the seventh node, wherein the preference degree of the seventh node for the sixth node is greater than the preference degree of the sixth node in the damage pair set, the sixth node is a node in the first node set, and the seventh node is a node in the third node set; or the seventh node is a node in the first set of nodes and the sixth node is a node in the third set of nodes;
And step N, adding the seventh node into the destruction pair set, and returning to the step F to continue execution.
5. the method of claim 4, wherein prior to said obtaining the initial correspondence between each node in the third set of nodes and each node in the first set of nodes, the method further comprises:
When the number of the nodes in the third node set is larger than that of the nodes in the first node set, selecting the nodes with the same number as that of the nodes in the first node set from the third node set, and randomly establishing one-to-one corresponding initial corresponding relation with the nodes in the first node set.
6. A distributed storage apparatus based on multi-hop cooperation, comprising:
a threshold number obtaining module, configured to obtain a predetermined threshold number when a node in a first node set fails, where the first node set is a set of all nodes in a current cell in which content fragments are cached, the content fragments include partial content of data to be forwarded, and the threshold number is a number of nodes required to recover the content fragments cached by the failed node;
A node set determining module, configured to select, as a second node set, all nodes that can effectively communicate with nodes in the first node set that are greater than or equal to the threshold number, from other nodes in the current cell except the nodes in the first node set;
A cache node determination module, configured to obtain and calculate the transmission cost and the transmission completion probability according to the size, effective communication time, transmission power, and channel condition of data that needs to be transmitted between two nodes that can directly perform device-to-device D2D communication; determining a weight of an edge between two nodes capable of directly performing D2D communication according to an existence probability and the transmission completion probability, wherein the weight identifies the probability that the transmission of the data needing to be transmitted cannot be completed between the two nodes capable of directly performing D2D communication; respectively determining the shortest path between each node in the first node set and each node in the second node set according to a Dynamic Programming algorithm; determining the mutual preference between each node in the first node set and each node in the second node set according to the shortest path, the existence probability, the transmission completion probability and the transmission cost; regarding each node in the second node set as the threshold number of nodes to obtain a third node set; establishing a one-to-one corresponding relation between each node in the third node set and each node in the first node set according to the preference degree through a preset algorithm; determining the cache node according to the one-to-one corresponding relation;
and the content fragment recovery module is used for selecting the threshold number of nodes in the first node set in an effective communication range and recovering the content fragments cached by the failed nodes to the cache nodes.
7. an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the bus,
A memory for storing a computer program;
A processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710398205.3A CN107155197B (en) | 2017-05-31 | 2017-05-31 | Distributed storage method and device based on multi-hop cooperation and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710398205.3A CN107155197B (en) | 2017-05-31 | 2017-05-31 | Distributed storage method and device based on multi-hop cooperation and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107155197A CN107155197A (en) | 2017-09-12 |
CN107155197B true CN107155197B (en) | 2019-12-13 |
Family
ID=59794915
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710398205.3A Active CN107155197B (en) | 2017-05-31 | 2017-05-31 | Distributed storage method and device based on multi-hop cooperation and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107155197B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109561128B (en) * | 2017-09-27 | 2022-05-20 | 北京国双科技有限公司 | Data transmission method and device |
CN111176840B (en) * | 2019-12-20 | 2023-11-28 | 青岛海尔科技有限公司 | Distribution optimization method and device for distributed tasks, storage medium and electronic device |
CN111431743B (en) * | 2020-03-18 | 2021-03-02 | 中南大学 | Data analysis-based method and system for constructing edge resource pool in large-scale WiFi system |
CN113543067B (en) * | 2021-06-07 | 2023-10-20 | 北京邮电大学 | Data issuing method and device based on vehicle-mounted network |
CN114327284B (en) * | 2021-12-30 | 2023-02-03 | 河北建筑工程学院 | Data processing method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101951556A (en) * | 2010-09-28 | 2011-01-19 | 湖南大学 | Wireless sensor network data distribution method based on network coding |
CN106230953A (en) * | 2016-08-05 | 2016-12-14 | 北京邮电大学 | A kind of D2D communication means based on distributed storage and device |
-
2017
- 2017-05-31 CN CN201710398205.3A patent/CN107155197B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101951556A (en) * | 2010-09-28 | 2011-01-19 | 湖南大学 | Wireless sensor network data distribution method based on network coding |
CN106230953A (en) * | 2016-08-05 | 2016-12-14 | 北京邮电大学 | A kind of D2D communication means based on distributed storage and device |
Non-Patent Citations (1)
Title |
---|
面向分布式缓存系统的无线资源管理:动机、挑战与方法;王莉,冯志勇,张平;《万方数据》;20170418;第2-5节 * |
Also Published As
Publication number | Publication date |
---|---|
CN107155197A (en) | 2017-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107155197B (en) | Distributed storage method and device based on multi-hop cooperation and electronic equipment | |
Sengupta et al. | Learning distributed caching strategies in small cell networks | |
CN111340277B (en) | Popularity prediction model and prediction method based on federal learning in fog wireless access network | |
CN106230953B (en) | A kind of D2D communication means and device based on distributed storage | |
CN111641891B (en) | Task peer-to-peer unloading method and device in multi-access edge computing system | |
KR101795484B1 (en) | Apparatus and method for transmitting data using fountain code in wireless communication system | |
CN103781115B (en) | Distributed base station buffer replacing method based on transmission cost in a kind of cellular network | |
CN109743713B (en) | Resource allocation method and device for electric power Internet of things system | |
CN111953547B (en) | Heterogeneous base station overlapping grouping and resource allocation method and device based on service | |
CN108616845B (en) | D2D grouping multi-target caching method based on social content and system and device thereof | |
CN116155728B (en) | Computing unloading and resource optimizing method in ultra-dense network | |
CN108777853A (en) | A kind of network edge caching method and system based on D2D | |
CN108810139B (en) | Monte Carlo tree search-assisted wireless caching method | |
CN105245592A (en) | Mobile network base station cache content placing method based on nearby cache cooperation | |
CN111770546A (en) | Q learning-based random network coding strategy for delay tolerant network | |
JP7282895B2 (en) | Data retransmission decoding method, device, system and communication device | |
CN106255228B (en) | Method for establishing network connection, terminal equipment and node equipment | |
US9635528B2 (en) | Server, data caching method, and communication system | |
US9967774B2 (en) | Compression method featuring dynamic coding for wireless communication in wireless networks | |
CN115189908A (en) | Random attack survivability evaluation method based on network digital twin | |
CN113490239B (en) | Heterogeneous wireless link concurrent transmission control method based on adaptive network coding | |
CN106686399A (en) | Intra-network video buffering method based on combined buffering architecture | |
Ma et al. | Socially aware distributed caching in device-to-device communication networks | |
CN109561129B (en) | Cooperative computing unloading method based on optical fiber-wireless network | |
WO2016188406A1 (en) | System and method of header compression for online network codes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |