Cache management method based on node strength social relation prediction
Through prediction of node strength and weakness of social relationships and evaluation of message value, the cache management of opportunistic networks is optimized, which solves the problem of redundant copies occupying resources and message discarding, and improves message delivery rate and network performance.
Patent Information
- Application Number
- CN202410645537.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-10
AI Technical Summary
In opportunistic networks, redundant copies occupy a large amount of resources, resulting in network performance degradation when cache space is insufficient, and message paths cannot be fed back, resulting in resource waste and message discarding.
A cache management method based on node strong and weak social relationship prediction. By establishing a node social relationship model, a social relationship change prediction model and a message value quantification model, nodes are divided into strong social relationships and weak social relationships, and messages are evaluated based on the social attributes of the message destination node. value, and allocate messages to protected queues, restricted deletion queues, and deletable queues to optimize cache space usage.
Maximize the use of limited cache resources, reduce message discarding, improve message delivery rate, reduce network load, and rationally allocate cache resources.
Smart Images

Figure CN118631772A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of opportunistic network routing algorithms, and in particular to a cache management method based on prediction of strong and weak social relationships of nodes. Background Art
[0002] The concept of opportunistic network originated from Delay Tolerant Network (DTN) and Mobile Ad Hoc Network (MANET). Initially, its main goal was to send deep space exploration data to ground receiving stations and proposed a series of protocols and solutions. Later, it formed a complete architecture in the integration and development of various mobile ad hoc networks. In the absence of fixed infrastructure to assist communication, mobile portable devices transmit data within the communication range of each other. The connection opportunity of devices in motion is precious, and data transmission cannot be directed. Data is stored, carried and forwarded to reach the destination node.
[0003] The intermittent connectivity of opportunistic networks means that after successfully forwarding and delivering a message, the relay nodes on the message path cannot provide feedback on the message forwarding results along a reliable path like in traditional networks. Nodes that store copies are still waiting to meet the destination node until the message life cycle ends and are forced to discard the message. This successfully processed message still occupies valuable connection opportunities and network resources such as cache, resulting in a waste of resources. Restricted flooding strategies such as multi-copy allocation and single-copy replication in opportunistic networks have been effectively applied in research, but redundant copies occupy a large amount of resources. Once the cache space is insufficient, network performance will be degraded. The introduction of the cache management algorithm solves the problem of resource contention between newly generated messages and carried messages when the cache is insufficient. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a cache management method based on the prediction of strong and weak social relationships of nodes in view of the defects in the prior art.
[0005] The technical solution adopted by the present invention to solve its technical problem is:
[0006] The present invention provides a cache management method based on the prediction of strong and weak social relationships of nodes. In an opportunistic network, the social relationships of nodes are divided according to the contact frequency of nodes, the strong and weak social sets of nodes are periodically counted, the change rate of strong and weak social relationships of nodes is predicted, the social stability of nodes is judged, and the value of messages is evaluated according to the social attributes shown by the destination node of the message, and the messages are sequentially allocated to the protected queue, the restricted deletion queue, and the deletable cache queue, and the cache is managed according to the type of cache queue and the value of the message. The method comprises the following steps:
[0007] S1. Establish a node social relationship model and divide the node social relationships into strong social relationships and weak social relationships according to the historical encounter frequency threshold of the nodes;
[0008] S2. Establish a social relationship change prediction model, periodically count the nodes that meet, and assign them to a strong social relationship node set and a weak social relationship node set according to the divided social relationships. Calculate the change of nodes in two adjacent time window sets, calculate the change rate and make a prediction;
[0009] S3. Establish a message value quantification model. The social attributes of the message destination node are the basis for classifying message types. Messages with strong social relationships as the destination node are defined as special messages, and messages with weak social relationships as the destination node are defined as general messages. The value of the message is calculated based on the message storage time, number of hops, and remaining survival time.
[0010] S4. Establish a multi-level message queue model, and logically divide the node's message queue into protected cache queue FCQ, restricted deletion cache queue SCQ, and discardable message cache queue TCQ. And distribute messages to different queues according to their value ranking. When nodes meet, messages in the discardable message cache queue are deleted first and new messages are received. Newly received messages are placed in the protected cache queue.
[0011] Furthermore, the method for constructing a social relationship model in step S1 of the present invention is:
[0012] The strong social relationship node set SR represents the node v a A set of nodes that frequently meet. These nodes have similar social behaviors, which are reflected in the frequency of contact. They are measured using Prophet's encounter probability calculation formula and a strong social relationship threshold is set for distinction. The calculation formula is:
[0013] SR a,b =P (a,b)old +(1- (a,b)old )·P init -P th
[0014] Where P init ∈[0,1] represents the initialization constant, P (a,b) is the initial probability of encounter. th The threshold value for determining whether to establish an intimate relationship is an initialization constant.
[0015] Encounter probability value P (a,b) It will gradually decay over time, thereby reducing the intimacy between nodes, calculated as follows:
[0016]
[0017] Where γ is the attenuation coefficient, k represents the time interval window experienced by the two nodes from the last moment to the current moment, and SR a Represents node v a A collection of strong social relationship nodes.
[0018] WC a For node v a The weak social node set is calculated as follows:
[0019] WC a =E v -SR a
[0020] Where E v Indicates the combination of nodes that met within the most recent window period.
[0021] Furthermore, the calculation formula of the social relationship change prediction model in step S2 of the present invention is:
[0022] Strong social relationship change rate It refers to the node v in the kth time period compared to the k-1th time period. i The change in the set of nodes with strong social relationships is calculated as follows:
[0023]
[0024] in Represents the node v counted in the kth time period i A collection of strong social nodes, Indicates the node v in the k-1th time period i A collection of nodes that maintain strong social relationships.
[0025] Strong social relationship prediction change rate Reflect node v i The stability of strong social relationships is calculated as follows:
[0026]
[0027] Among them, α represents the proportion of the change rate of the node's strong social relationship to the predicted node social change, and its value range is [0,1].
[0028] Weak social relationship change rate It means that in the kth time period, the weak node v is compared with the k-1 time period. i The change in the number of social relationship nodes is calculated as follows:
[0029]
[0030] Represents the statistics of node v in the kth time period i A collection of people with weak social ties.
[0031] Weak social relationship prediction change rate Represents node v i The weak social relationship stability is calculated as follows:
[0032]
[0033] The weighting factor β represents the influence ratio of the actual value and observed value of the change rate of weak social relations of nodes on the prediction result, and its value range is [0,1].
[0034] Furthermore, the quantitative calculation formula for estimating the message value in step S3 of the present invention is:
[0035] General message quantization value NMQ md Refers to node v i With message m d The message value of the destination node with weak social relationship is calculated as follows:
[0036]
[0037] Among them mh op is the number of hops that the node has passed, m ttl is the remaining survival time of the message, m keep The time from when the message is received to when it is stored in the cache. Can be regarded as message m d The destination node is a label of a weak social relationship, which indicates the probability that the destination node still belongs to a weak social relationship in the next time period.
[0038] Special Message Quantization Value SMQ md Refers to the message m d The value of messages with strong social attribute relationships at the destination node is calculated as follows:
[0039]
[0040] in Can be regarded as message m d The destination node is a label of a strong social relationship, indicating the probability that the destination node still belongs to a strong social relationship in the next time period.
[0041] Furthermore, the calculation formula for the space size of the node message multi-level queue division in step S4 of the present invention is:
[0042] The cache queue of discardable messages indicates the available space size of the node in a communication process, which discards low-value messages and receives new messages in comparison with the value of the messages to be received. The size of the space is represented by Buff3 and is calculated as follows:
[0043]
[0044] Where E cur Indicates the current remaining energy value of the node, E ini is the initial value of energy, and BuffSize is the initial cache size.
[0045] The protected cache queue indicates that high-value messages and messages that have just entered the queue are protected from being deleted immediately. The size of the space is represented by Buff1 and is calculated as follows:
[0046]
[0047] The result of the calculation may be a non-integer, so it is rounded up.
[0048] The cache queue with restricted deletion means that after the discardable cache space is exhausted during a communication connection, the queue that attempts to receive new messages adopts the restriction strategy. The size of the space is represented by Buff2 and is calculated as follows:
[0049] Buff2 = BuffSize - Buff3 - Buff1
[0050] The beneficial effects of the present invention are as follows: the cache management method based on the change of the strong and weak social relationship of the node of the present invention predicts the change of the strong and weak social relationship of the node by dividing the period, comprehensively considers the social characteristics and message attributes of the node, determines the value of each message carried, and divides the cache space based on this and distributes the messages to different queues according to the value. The complete cache space is logically divided into three-level queues with their own characteristics, and the reception and discarding amount of each message transmission process of the control node is controlled, and the limited cache resources are used to the maximum extent possible to deliver more valuable messages, reduce the random discarding of messages due to insufficient cache resources, reasonably allocate cache resources, reduce network load, and improve message delivery rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0052] Figure 1 It is a flow chart of a cache management algorithm based on prediction of changes in strong and weak social relationships of nodes according to an embodiment of the present invention.
[0053] Figure 2It is a logic diagram of node cache queue division and receiving new messages of the present invention.
[0054] Figure 3 It is a flow chart of the message discarding algorithm when the node cache overflows according to the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0056] like Figure 1 — Figure 3 As shown, an embodiment of the present invention is a cache management method based on the prediction of changes in the strength and weakness of social relationships of nodes. By collecting the encounter situations of nodes in each time window, analyzing the changes in the strength and weakness of social relationships of nodes, and predicting the change rate using a weighted moving average method. Define a method for quantifying the value of messages, divide messages into general messages and special messages according to the strength and weakness of the social relationships of the message destination nodes, and use different quantification methods. Divide the cache queue of the node into three levels of queues, namely a protected queue, a restricted deletion queue, and a discardable message queue. Use the node's energy and the rate of change of weak social relationships to dynamically adjust and optimize the size of cache queues at each level. New messages received are logically placed in the protected queue, and the size of the discardable message queue is reduced. The method comprises the following steps:
[0057] S1. Establish a node social relationship model, divide the node's social relationship into strong social relationship and weak social relationship according to the node's historical encounter frequency threshold, and add the node to the corresponding social relationship set;
[0058] S2. Establish a social relationship change prediction model, periodically count the encounters of nodes during movement, calculate the changes in strong and weak social relationships in two adjacent time windows, and use weighted calculation of historical observations to make predictions;
[0059] S3. Establish a message value quantification model, classify different message types according to the social tags of the node and the message destination node, and calculate the value of the message according to message attributes such as message storage time, number of hops and remaining survival time;
[0060] S4. Establish a multi-level queue model for messages, and store the messages carried by the nodes in the protected cache queue FCQ, the restricted deletion cache queue SCQ, and the discardable message cache queue TCQ in order of value. After the cache overflows, messages with lower value than the to-be-received messages are preferentially selected from the discardable message cache queue and discarded until enough cache is released to receive new messages. If the discardable message cache queue is insufficient, compare it with the message with the highest value in the restricted deletion cache queue to determine whether to receive it;
[0061] The method for establishing the node social relationship model in step S1 is:
[0062] The strong social relationship node set SR represents the node v a A set of nodes that frequently meet each other. These nodes have similar social behaviors. The calculation formula is:
[0063] SR a,b =P (a,b)old +(1- (a,b)old )·P init -P th
[0064] Where P init ∈[0,1] represents the initialization constant, P (a,b) is the initial probability of encounter. th The threshold value for determining whether to establish an intimate relationship is an initialization constant.
[0065] Encounter probability value P (a,b) It will gradually decay over time, thereby reducing the intimacy between nodes, calculated as follows:
[0066]
[0067] Where γ is the attenuation coefficient, k represents the time interval window experienced by the two nodes from the last moment to the current moment, and SR a Represents node v a A collection of strong social relationship nodes.
[0068] WC a For node v a The weak social node set is calculated as follows:
[0069] WC a =E v -SR a
[0070] Where E v Indicates the combination of nodes that met within the most recent window period.
[0071] The calculation method of the social relationship change prediction model in step S2 is:
[0072] Strong social relationship change rate It refers to the node v in the kth time period compared to the k-1th time period. i The change of the strong social node set is calculated as follows:
[0073]
[0074] in Represents the node v counted in the kth time period i A collection of strong social nodes, Indicates the node v in the k-1th time period i A collection of strong social nodes.
[0075] Strong social relationship prediction change rate Reflect node v i The stability of strong social relationships is calculated as follows:
[0076]
[0077] Among them, α represents the proportion of the change rate of the node's strong social relationship to the predicted node social change, and its value range is [0,1].
[0078] Weak social relationship change rate It means that in the kth time period, the weak node v is compared with the k-1 time period. i The change in the number of social relationship nodes is calculated as follows:
[0079]
[0080] Represents the statistics of node v in the kth time period i A collection of people with weak social ties.
[0081] Weak social relationship prediction change rate Represents node v i The weak social relationship stability is calculated as follows:
[0082]
[0083] The weighting factor β represents the influence ratio of the actual value and observed value of the change rate of weak social relations of nodes on the prediction results, and its value range is [0,1].
[0084] The message value quantification calculation method in step S3 is:
[0085] Generally the message refers to the node v i With message m dThe destination node has a weak social relationship with the message, and the quantitative value is the symbolic quantization value NMQ md The calculation method is as follows:
[0086]
[0087] Among them mh op is the number of hops that the node has passed, m ttl is the remaining survival time of the message, m keep The time from when the message is received to when it is stored in the cache. Can be regarded as message m d The destination node is a label of a weak social relationship, which indicates the probability that the destination node still belongs to a weak social relationship in the next time period.
[0088] Special messages refer to messages that are related to the message m d The destination node has a strong social attribute relationship. The quantitative value is symbolized by SMQ. md The calculation method is as follows:
[0089]
[0090] in Can be regarded as message m d The destination node is a label of a strong social relationship, indicating the probability that the destination node still belongs to a strong social relationship in the next time period.
[0091] The message multi-level queue model division method in step S4 is:
[0092] The cache queue of discardable messages indicates the available space size of the node used to discard low-value messages and release enough space to receive new messages in a communication process, compared with the value of the messages to be received. The size of the space is represented by Buff3 and is calculated as follows:
[0093]
[0094] Where E cur Indicates the current remaining energy value of the node, E ini is the initial value of energy, and BuffSize is the initial cache size.
[0095] The protected cache queue indicates that high-value messages and messages that have just entered the queue are protected from being deleted immediately. The size of the space is represented by Buff1 and is calculated as follows:
[0096]
[0097] The result of the calculation may be a non-integer, so it is rounded up.
[0098] The cache queue with restricted deletion means that after the discardable cache space is exhausted during a communication connection, the queue that attempts to receive new messages adopts the restriction strategy. The size of the space is represented by Buff2 and is calculated as follows:
[0099] Buff2 = BuffSize - Buff3 - Buff1
[0100] like Figure 3 As shown, the embodiment of the present invention is based on the cache management method for predicting the change of strong and weak social relationships of nodes. The specific process is: when receiving a new message, first determine whether the destination node of the message is itself. If it is, receive it directly. If there is insufficient space, continuously discard messages with low value to release enough cache space. If the destination node is not itself, it is necessary to compare the value of the message to be received with the value of the message in the discardable space in the cache in turn, delete messages with a value lower than the value of the message to be received until enough cache is released to receive the message, and place the message in the protected cache space, otherwise the message will not be received. When the discardable cache space is exhausted, it is necessary to compare with the highest value of the message in the cache that is restricted for deletion. If the requirements are met, the message with the lowest value in the protected cache space is discarded until enough cache space is released to receive new messages.
[0101] In summary, the present invention discloses a cache management method based on the prediction of changes in strong and weak social relationships of nodes, focusing on the social attribute characteristics of nodes and the historical encounters of nodes, and defining the strong and weak social relationships of nodes. It is divided into multiple time windows and the node set encountered by the node in each window period is counted, and the strong and weak social relationships of the nodes that have been divided are classified, and the change rate of the strong and weak social relationships of the nodes is calculated, and the change rate of the strong and weak social relationships of the nodes in the next window is predicted by weighted moving average. The change rate of the strong and weak social relationships of the nodes reflects to a certain extent the stability of the dynamic construction of the social circle of the nodes and the active connection ability of the nodes in the network. The social attributes between nodes are mapped to messages, divided into general messages and ordinary messages, and the value of the messages is quantified and saved in different cache queues according to the inherent attributes of the messages such as the number of hops experienced by the messages, the remaining survival time and the storage time, and the social tags of the destination nodes of the messages. When the cache overflows, the value of the messages to be received is compared, and the queue that can discard the messages is selected for message discarding selection until the new messages can be accommodated. Compared with the algorithms proposed in recent years such as NBAPR, SSDrop, PRREI and NPBMT, the method of the present invention has performance advantages. While maintaining a high delivery rate, it effectively reduces the network load rate.
[0102] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A cache management method based on prediction of changes in strong and weak social relationships of nodes, characterized in that: In an opportunistic network, by periodically counting the historical encounter sets of nodes, predicting the changes in the strength of the social relationships of the nodes, calculating the preservation value of the messages and placing them in a dynamically divided cache queue according to the value, when the node cache overflows, the cache is managed by this method, which includes the following steps: S1. Establish a node social relationship model and divide the node social relationships into strong social relationships and weak social relationships according to the historical encounter frequency threshold of the nodes; S2. Establish a social relationship change prediction model, periodically count the nodes that meet, calculate the changes in social relationships in two adjacent time windows, and use the weighted average method to predict the social relationship change rate; S3. Establish a message value quantification model. The social relationship with the message destination node is the basis for classifying message types, and the value of the message is evaluated based on the message storage time, number of hops, and remaining survival time. S4. Establish a multi-level message queue model, and logically divide the node's message queue into a protected cache queue, a restricted deletion cache queue, and a discardable message cache queue. And distribute the messages to different queues in turn according to their value ranking.
2. The cache management method based on prediction of changes in strong and weak social relationships of nodes according to claim 1 is characterized in that: The method for establishing the social model in step S1 is: The social relations of nodes in the opportunity network can be calculated based on the intimacy of the contact frequency between nodes, and the relations can be divided into strong social relations and weak social relations according to the threshold. The strong social relation node set SR is based on the intimacy SR between nodes. a,b Judgment, node v a and node v b When encountering, calculate SR a,b , when SR a,b When >0, the two nodes establish a strong social relationship, and the calculation formula is: SR a,b =P (a,b)old +(1-P (a,b)old )·P init -P th Where P init ∈[0,1] represents the initialization constant, which is the initial probability value of encounter. th The threshold value for determining whether to establish an intimate relationship is an initialization constant. The social relationship of nodes changes dynamically over time. If nodes do not meet for a period of time, and the intimacy of nodes may break down over time, the intimacy decay is calculated as follows: Where γ is the attenuation coefficient, k represents the time interval window experienced by the two nodes from the last moment to the current moment, and SR a Represents the set of strong social relationship nodes of node a, SR b Represents the set of strong social relationship nodes of node b. The weak social node set is denoted as WC a , calculated as follows: toilet a =E v -SR a Where E v Indicates the combination of nodes that met within the most recent window period.
3. The cache management method based on prediction of changes in strong and weak social relationships of nodes according to claim 1 is characterized in that: The social relationship change prediction calculation method in step S2 is: Strong social relationship change rate It refers to the node v i The change in the number of nodes in the social circle in the kth time period compared to the k-1th time period is calculated as follows: Represents the node v counted in the kth time period i Social circle collection, Represents the node v counted in the k-1th time period i Social circle collection. Strong social relationship prediction change rate It refers to the change of the strong social relationship of the node in the next time window, reflecting the stability of the strong social relationship set. The calculation method is as follows: The weighting factor α represents the influence of the change rate of the strong social relationship of the node on the prediction calculation result, and its value range is [0,1]. Weak social relationship change rate It refers to the node v i The change in the number of weak social relationship nodes encountered in the kth time period compared to the k-1 time windows. The calculation formula is as follows: Represents the statistics of node v in the kth time period i A collection of people with weak social ties. Weak social relationship prediction change rate Represents node v i The degree to which the number of nodes in the weak social relationship set is kept stable in the next cycle is calculated as follows: Among them, the weighting factor β represents the influence ratio of the actual value and observed value of the change rate of the node weak social relationship on the prediction result, and its value range is [0,1].
4. The cache management method for predicting changes in strong and weak social relationships of nodes according to claim 1 is characterized in that: The message value quantification method in step S3 is: General message quantization value Refers to node v i With message m d The message value of the destination node with weak social relationship is calculated as follows: Where m hop is the number of hops that the node has passed, m ttl is the remaining survival time of the message, m keep The time from when the message is received to when it is stored in the cache. Can be regarded as message m d The destination node is a label of a weak social relationship, which indicates the probability that the destination node still belongs to a weak social relationship in the next time period. Special message quantization value Refers to the message m d The value of messages with strong social attribute relationships at the destination node is calculated as follows: in Can be regarded as message m d The destination node is a label of a strong social relationship, indicating the probability that the destination node still belongs to a strong social relationship in the next time period.
5. The cache management method for predicting changes in strong and weak social relationships of nodes according to claim 1 is characterized in that: In step S4, the message queue is logically divided into a protected cache queue, a restricted deletion cache queue, and a discardable message cache queue. The calculation method for the queue division is: The cache queue for discardable messages indicates the available space for a node to receive new messages during a communication process. The space size is represented by Buff3 and is calculated as follows: Among them, Buff3. Represents the remaining energy ratio of the node, where E cur Indicates the current remaining energy value of the node, E ini is the initial value of energy, and BuffSize is the initial cache size. The protected cache queue indicates that high-value messages and messages that have just entered the queue are protected from being deleted immediately. The size of the space is represented by Buff1 and is calculated as follows: The result may be a non-integer, so it is rounded up. The restricted deletion cache queue means that during a communication connection, after the discardable cache space is exhausted, the queue that receives new messages under restriction conditions is used up. The space size Buff2 is calculated as follows: Buff2=BuffSize-Buff3-Buff1.
