CN112217737B - Opportunistic network resource dynamic allocation method based on service priority - Google Patents

Opportunistic network resource dynamic allocation method based on service priority Download PDF

Info

Publication number
CN112217737B
CN112217737B CN202011009694.7A CN202011009694A CN112217737B CN 112217737 B CN112217737 B CN 112217737B CN 202011009694 A CN202011009694 A CN 202011009694A CN 112217737 B CN112217737 B CN 112217737B
Authority
CN
China
Prior art keywords
node
service message
message
copies
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011009694.7A
Other languages
Chinese (zh)
Other versions
CN112217737A (en
Inventor
徐思雅
胡博
郭少勇
李钊
尚立
杨超
苑经纬
肖坤
李逸民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Electric Power Research Institute of State Grid Liaoning Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Electric Power Research Institute of State Grid Liaoning Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Beijing University of Posts and Telecommunications, Electric Power Research Institute of State Grid Liaoning Electric Power Co Ltd, Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd, Information and Telecommunication Branch of State Grid Liaoning Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202011009694.7A priority Critical patent/CN112217737B/en
Publication of CN112217737A publication Critical patent/CN112217737A/en
Application granted granted Critical
Publication of CN112217737B publication Critical patent/CN112217737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2458Modification of priorities while in transit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/805QOS or priority aware

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a dynamic allocation method of opportunity network resources based on service priority, which is applied to a current node carrying a service message in an opportunity network, wherein the service message comprises a target delay for sending the service message, the message size of the service message and an identifier of a target node, and the total number of nodes in the opportunity network, the average congestion degree of a social group of the current node, the size of a cache space of the current node and the initial priority of the service message are obtained; calculating the number of copies of the service message based on the target delay, the message size, the total number of the nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message; and acquiring a plurality of service message copies of the service message, and sending the acquired service message copies to the destination node with the identifier. The scheme can improve the service quality of the service to which the service message belongs.

Description

Opportunistic network resource dynamic allocation method based on service priority
Technical Field
The invention relates to the technical field of opportunistic networks, in particular to a method for dynamically allocating opportunistic network resources based on service priority.
Background
Opportunistic networks, also known as delay tolerant networks, are widely used in the fields of emergency rescue, smart cities, remote areas, wildlife monitoring, spatial communication, and the like. In addition, the cache space of the nodes in the opportunistic network is limited, and the nodes can move freely in the network, so that the cache space of the nodes and the opportunity of forwarding the service messages become the most critical network resources in the opportunistic network. In addition, the more the cache space of the node occupied by the Service message, that is, the larger the number of copies of the Service message, the greater the chance of forwarding the Service message, and the higher the Quality of Service (QoS) of the Service to which the Service message belongs. It can be seen that different network resource allocations, i.e. different number of copies of the service message, will bring different QoS to the service. Therefore, how to allocate network resources of the opportunistic network to meet QoS requirements of different services is essential for the opportunistic network.
The inventor finds that, in the process of implementing the present invention, in the current opportunistic network, the number of copies of the service message is often fixed, and accordingly, the network resources of the opportunistic network can be allocated according to the fixed number of copies, that is: and determining a plurality of fixed copies of the service messages, and sending each service message copy to a destination node. However, in a specific application, network states of the opportunistic network, such as the congestion degree of the network and the size of the cache space of the node, often change with the transfer-in and the transfer-out of the traffic messages. In contrast, the above-mentioned allocating network resources of the opportunistic network according to the fixed copy number easily causes that the allocated network resources are not suitable for the current network state, which causes forwarding delay and even failure of the service message, and service quality of the service to which the service message belongs is reduced.
Disclosure of Invention
The embodiment of the invention aims to provide a dynamic allocation method of opportunistic network resources based on service priority so as to achieve the effect of improving the service quality of the service to which a service message belongs. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for dynamically allocating opportunistic network resources based on service priority, which is applied to a current node carrying a service message in an opportunistic network, where the service message includes a target delay for sending the service message, a message size of the service message, and an identifier of a target node, and the method includes:
acquiring the total number of nodes in the opportunity network, the average congestion degree of a social group of the current node, the size of a cache space of the current node and the initial priority of the service message; the social group of the current node is a set of nodes which have been contacted by the current node within a specified time period; setting the initial priority of any service message based on the size relationship between the target delay and the delay interval of the service message; the delay interval is obtained by dividing the expected delay and the average delay of the current node when the current node transmits the message in the opportunity network according to the difference of the average congestion degrees of the social groups;
Calculating the number of copies of the service message based on the target delay, the message size, the total number of the nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message;
and acquiring a plurality of service message copies of the service message, and sending the acquired service message copies to the destination node with the identifier.
In a second aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the method for dynamically allocating opportunistic network resources based on service priority provided in the first aspect.
The embodiment of the invention has the following beneficial effects:
in the scheme provided by the embodiment of the invention, the total number of nodes in the opportunity network, the average congestion degree of the social group of the current node, the size of the cache space of the current node and the initial priority of the service message are acquired by the current node carrying the service message in the opportunity network; calculating the number of copies of the service message based on the target delay of sending the service message, the message size of the service message, the total number of nodes, the average congestion degree of a social group, the size of a cache space of the current node and the initial priority of the service message; therefore, a plurality of service message copies of the service message are obtained, and the obtained service message copies are sent to the target node, so that the resource allocation of the opportunistic network is realized. The social group of the current node is a set of nodes which have been contacted by the current node within a specified time period; setting the initial priority of the service message based on the size relation between the target delay and the delay interval; the delay interval is an interval obtained by dividing the expected delay and the average delay of the current node when the current node transmits the message in the opportunity network according to the difference of the average congestion degrees of the social groups. Therefore, the average congestion degree of the social group, the size of the cache space of the current node and the initial priority of the service message are equivalent to the network state of the network when the network resources are allocated. On the basis, the number of copies of the service message can be ensured to be obtained based on the network state of the opportunistic network, and correspondingly, a plurality of service message copies of the service message are obtained and sent to the target node, so that the network resource allocation of the opportunistic network can be ensured to be realized based on the network state of the opportunistic network, which is equivalent to the dynamic allocation of network resources according to the network state. Therefore, the scheme can realize dynamic allocation of the opportunistic network resources based on the service priority, thereby reducing the forwarding delay and even failure of the service message caused by the improper allocation of the network resources and the network state when the network resources are allocated, and improving the service quality of the service to which the service message belongs.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for dynamically allocating opportunistic network resources based on service priority according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 3 is a diagram illustrating a structure of a service message in a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 4 is an exemplary diagram of two-shot injection of an injection waiting algorithm in a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
Fig. 5 is a flowchart illustrating a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a relationship between a delivery rate and a cache space in an application effect example of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a relationship between delivery delay and buffer space in an application effect example of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 8 is a schematic diagram illustrating a relationship between a total delivery rate of an algorithm and a cache space in an application effect example of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 9 is a schematic diagram illustrating a relationship between an algorithm packet loss rate and a cache space in an application effect example of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present invention;
fig. 10 is a schematic diagram illustrating a relationship between an algorithm network overhead and a cache space in an application effect example of a method for dynamically allocating opportunistic network resources based on service priority according to another embodiment of the present 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.
For convenience of understanding, first, a method for dynamically allocating opportunistic network resources based on service priority according to an embodiment of the present invention is described below.
An embodiment of the present invention provides a method for dynamically allocating opportunistic network resources based on service priority, which can be applied to a current node carrying a service message in an opportunistic network, where the service message includes a target delay for sending the service message, a message size of the service message, and an identifier of a target node. Illustratively, the opportunistic network includes the following features from the first point to the sixth point:
the first point is as follows: the whole opportunistic network is a node set, N is set, N nodes exist in the node set, and each node moves in the network according to a random walk model. Any node in the opportunistic network can be generalized into the set indicated by equation 1-1: n ═ N i I is more than or equal to |0 and less than or equal to n } (1-1). Wherein n is i Representing the ith numbered node in the opportunistic network.
And a second point: each node may maintain its own existing state information and history information, which may be exchanged with each other when two nodes come into contact. No one node can obtain global information of the opportunistic network.
And a third point: definition set S i For all nodes, S, that node i has contacted during the past period of time T i A social group called ith node i, each node can evaluate the current network cache resource pressure through the average congestion degree of the social group of the node
A fourth point: assuming that the transmission radius of data transmission between nodes is the same, defined as R, node n i And another node n j Distance d at time t ij Satisfy d ij When R is less than or equal to R, the node n i And another node n j Can carry out data transmission, namely message transmission, and can see that the nodes in the opportunistic networkWhether messaging is enabled is influenced by the chance of contact between nodes.
And fifth, the method comprises the following steps: the size of the message to be transmitted is set as m, and after the node establishes connection, the message transmission is only effective if the message with the size of m is completely transmitted.
And a sixth point: each node has limited storage space and limited computational power.
As shown in fig. 1, an embodiment of the present invention provides a process of a method for dynamically allocating opportunistic network resources based on service priority, where the method includes the following steps:
s101, acquiring the total number of nodes in the opportunity network, the average congestion degree of a social group of the current node, the size of a cache space of the current node and the initial priority of a service message.
The social group of the current node is a set of nodes which have been contacted by the current node within a specified time period; setting the initial priority of any service message based on the size relationship between the target delay and the delay interval of the service message; the delay interval is obtained by dividing the expected delay and the average delay of the current node when the current node transmits the message in the opportunity network according to the difference of the average congestion degrees of the social groups.
For convenience of understanding and reasonable layout, the total number of nodes in the opportunistic network, the average congestion degree of the social group of the current node, the size of the cache space of the current node, and the acquisition mode of the initial priority of the service message are described in detail in the following in an optional embodiment.
S102, calculating the number of copies of the service message based on the target delay, the message size, the total number of the nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message.
The average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message are equivalent to the network state of the opportunistic network when the network resources are allocated. Based on this, it can be ensured that the number of copies of the service message is obtained based on the network state of the opportunistic network, and then a plurality of service message copies of the service message are subsequently obtained through step S103, and the obtained service message copies are sent to the destination node having the identifier of the destination node, so that it can be ensured that the network resource allocation of the opportunistic network is realized based on the network state of the opportunistic network, which is equivalent to performing dynamic allocation of network resources according to the network state. In addition, for convenience of understanding and reasonable layout, a specific manner for calculating the number of copies of the service message based on the target delay, the message size, the total number of nodes, the average congestion degree of the social group, the cache space size of the current node, and the initial priority of the service message is described in the following with an optional embodiment.
S103, acquiring a plurality of service message copies of the service message, and sending the acquired service message copies to a destination node with the identification of the destination node.
In a specific application, the plurality of service message copies of the service message are obtained, and the service message may be copied to obtain the plurality of service message copies of the copies. For example, the number of copies of the service message is 10, and the service message may be copied to obtain 10 copies of the service message. Furthermore, the manner of sending the acquired service message copy to the destination node having the identifier of the destination node may be various. For example, when the destination node can communicate with the current node, the acquired service message copy can be directly sent to the destination node. Or, for example, when the destination node and the current node cannot communicate, that is, the distance between the destination node and the current node is greater than the transmission radius R, the relay node of the current node may be determined, and the service message copy may be sent to the relay node, so that the relay node forwards the service message to the destination node. For ease of understanding and reasonable layout, a specific manner of sending a copy of the service message to the destination node by using the relay node is described in the following as an alternative embodiment.
In addition, the identifier of the destination node may be carried in the service message.
In the scheme provided by the embodiment of the invention, the average congestion degree of the social group, the size of the cache space of the current node and the initial priority of the service message are equivalent to the network state of the network when the network resources are allocated. On the basis, the number of copies of the service message can be ensured to be obtained based on the network state of the opportunistic network, and correspondingly, a plurality of service message copies of the service message are obtained and sent to the target node, so that the network resource allocation of the opportunistic network can be ensured to be realized based on the network state of the opportunistic network, which is equivalent to the dynamic allocation of network resources according to the network state. Therefore, the scheme can realize the dynamic allocation of the opportunistic network resources based on the service priority, thereby reducing the forwarding delay and even failure of the service message caused by the improper allocation of the network resources and the network state when the network resources are allocated, and improving the service quality of the service to which the service message belongs.
In an optional implementation manner, the obtaining of the total number of nodes in the opportunistic network may specifically include the following steps:
acquiring a specified number of meeting time intervals from the meeting time intervals recorded by the current node; any encountering time interval is a time interval which is encountered by the current node and a node except the current node in the opportunistic network;
Calculating an average time interval of the current node and nodes except the current node in the opportunity network, which are encountered, based on the specified number of encounter time intervals, and taking the average time interval as a first average time interval;
calculating an average time interval of every two encountered nodes in the current node and nodes except the current node in the opportunity network as a second average time interval based on the specified number of encountering time intervals;
inputting the first average time interval and the second average time interval into a network scale calculation formula to obtain the total number of nodes in the opportunity network; wherein, the network scale calculation formula is as follows:
Figure BDA0002697162530000071
where N is the total number of nodes in the opportunistic network, AT 01 Is firstAverage time interval, AT 12 Is the second average time interval.
Illustratively, a contact window K is set, i.e. a first average time interval is calculated by using formula 1-2 and a second average time interval is calculated by using the following formula 1-3 according to the history information of the kth node and the other K-1 nodes contacted by the node:
Figure BDA0002697162530000072
Figure BDA0002697162530000073
wherein, g k Is a sample weight, T 01,k Indicates the time, T, that the current node has elapsed while encountering another node 01,k-1 Representing the time that the current node encounters another two nodes in the opportunistic network different from the current node.
When the nodes in the opportunistic network move, the first average time interval and the second average time interval respectively satisfy the distribution indicated by the following formulas (1-4) and (1-5) with the expected contact time ETET:
Figure BDA0002697162530000074
Figure BDA0002697162530000075
and (3) forming the equations (1-4) and (1-5) into an equation system, and solving to obtain the network scale calculation formula.
In an optional implementation manner, the obtaining the average congestion degree of the social group of the current node may include the following steps:
obtaining the cache space occupancy rate of each node in the social group of the current node;
and performing average calculation on the acquired cache space occupancy rates of the nodes to obtain the average congestion degree of the social group of the current node.
For example, the space of a node can be divided into three occupancy states: micro-occupation, light occupation and heavy occupation. Setting br as the cache space occupancy, wherein br belongs to [0,1 ]. OL is a first cache space utilization rate threshold, OH is a second cache space utilization rate threshold, and OL is more than 0 and OH is less than 1. The state of the node occupied slightly can be expressed as MO, and the cache space occupancy rate satisfies br belonging to [0, OL ]; the node state of light occupation can be expressed as LO, and the cache space occupancy rate satisfies br belonging to [ OL, OH ]; the node status of heavy occupation can represent HO, and the cache space occupancy rate satisfies br epsilon [ OH,1 ].
Moreover, the nodes in the opportunistic network cannot acquire global network information. In this regard, the node may estimate the cache state of the network through the cache space usage rate of the node itself and the cache space usage rate of the node contact node. Set S i For all nodes that the ith node i encounters within the past period of time T, called the social group of the node i, each node may evaluate the current network cache state by the average congestion degree of the social group of the node. Wherein, the following formulas 1-6 can be adopted to define the average congestion degree SBR of the social group of the ith node i
Figure BDA0002697162530000081
|S i,j I is the number of nodes contained in the social group of the ith node br k And the cache space occupancy rate of the node k in the social group of the ith node.
In an optional implementation manner, the obtaining the initial priority of the service message may include the following steps:
inputting the length of the communication area of the current node and the length of the area covered by the opportunity network into an average delay formula to obtain average delay; wherein, the average delay formula is:
Figure BDA0002697162530000082
ED avg d is the length of the communication area of the current node, and Len is the length of the area covered by the opportunistic network;
Inputting the average delay and the total number of the nodes into an expected delay formula to obtain expected delay; wherein, the expected delay formula is:
Figure BDA0002697162530000091
ED exp in order to expect the time delay, i is the node serial number of the node in the opportunity network;
inputting the target delay of the service message into an initial priority mapping formula to obtain the initial priority of the service message; the initial priority mapping formula is set based on the size relationship between the target delay and the delay interval, and the initial priority mapping formula is as follows:
Figure BDA0002697162530000092
pri is the initial priority, ED hope For target delay, OL is a first cache space occupancy rate threshold, OH is a second cache space occupancy rate threshold, and OL is more than 0 and OH is less than 1; average congestion degree SBR of social group of node i i Is [ OL, OH]The desired delay of the opportunistic network is
Figure BDA0002697162530000093
The average delay of the opportunistic network is
Figure BDA0002697162530000094
Average congestion degree SBR of social group of node i i Is (OH, 1)]The desired delay of the opportunistic network is
Figure BDA0002697162530000095
Average delay of opportunistic networksIs composed of
Figure BDA0002697162530000096
In an optional implementation manner, the calculating the number of copies of the service message based on the target delay, the message size, the total number of nodes, the average congestion degree of the social group, the size of the cache space of the current node, and the initial priority of the service message may include the following steps:
Inputting the target delay and the total number of the nodes into a minimum copy number formula to obtain a minimum copy number; wherein, the minimum number formula of the copies is:
Figure BDA0002697162530000097
l is the minimum number of copies;
inputting a message copy number formula into the minimum copy number, the message size, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message to obtain the copy number of the service message; the formula of the number of the message copies is as follows:
Figure BDA0002697162530000101
L max the msgsize is the message size, and the bsize is the buffer space size of the current node.
As shown in fig. 2, another embodiment of the present invention provides a process of a method for dynamically allocating opportunistic network resources based on service priority, where the method includes the following steps:
s201, acquiring the total number of nodes in the opportunity network, the average congestion degree of a social group of the current node, the size of a cache space of the current node and the initial priority of a service message.
Wherein the service message may further include a timestamp indicating the time the service message entered the opportunistic network. The social group of the current node is a set of nodes which have been contacted by the current node within a specified time period; setting the initial priority of any service message based on the size relationship between the target delay and the delay interval of the service message; the delay interval is an interval obtained by dividing the expected delay and the average delay of the current node when the current node transmits the message in the opportunity network according to the difference of the average congestion degrees of the social groups.
The above S201 is a similar step to S101 of the embodiment of fig. 1 of the present invention, except that S201 defines that the service message further includes a timestamp indicating the time when the service message enters the opportunistic network. For the same parts, detailed description is omitted here, and the detailed description is given in the embodiment of fig. 1 of the present invention.
Illustratively, as shown in FIG. 3. The service message may be 32 bits, and the service message may specifically include the following 15 types of information: (1) target delay (delaygeal): if the current network can support the target delay, the algorithm will determine the minimum number of copies based on the target delay. (2) Target packet loss rate (lossgeal): if the service quality expected by the service is to be met, the target packet loss rate of the service needs to be greater than the packet loss rate of the current network. (3) maximum acceptance delay (DalayAccept): if the current network cannot support the target delay of the service, the number of copies can be determined according to the maximum accepted delay. (4) Maximum accepted packet loss ratio (lossmacept): the target packet loss rate and the maximum acceptable packet loss rate, and the target delay and the maximum acceptable delay form a service quality range of the service. If the opportunistic network is unable to support the quality of service requirement of the service, the service request can be denied. (5) Priority PriLevel: the service level that the user wants the network to provide is divided into three priority levels of H, M and L. (6) Acceptance degradation flag (DownFlag): indicating that a certain degradation of the quality of service can be performed when the network is congested, e.g. 1 as shown in fig. 3, indicating that degradation is possible. (7) Degradation flag (Down): when the network is congested, the degradation flag is set to 1, indicating that the message is degraded, e.g., set to 1 as shown in fig. 3. When the network is in a good state, the down is set to 0. (8) Maximum number of Copies of message (Copies): the larger the number of copies of the message is, the larger the cache space is occupied, and the more network resources are obtained. A pre-allocation of the number of copies of the message is required. (9) Current copy number of message (currcopies): representing the number of copies of the message that the current node owns. (10) Current number of hops (currforwardtimes): in the waiting step, the number of times the message is forwarded, e.g. 4 as shown in fig. 3, represents 4 times. (11) Maximum number of forwarding (ForwardTimes): in the waiting step, the number of times the message can be forwarded, e.g. 4 as shown in fig. 3, represents 4 times. (12) Message Size (Size): the data size of the traffic message. (13) Type (Type): the type of service represented by the service message, e.g., 2 as shown in fig. 3, represents type 2. (14) Business priority (Prilevel): the priority level of the service message, e.g., 2 as shown in fig. 3, represents priority 2. (15) Blank bits, which may be left without information or with information added, such as the added information "2" shown in fig. 3, represent blank two bits.
S202, calculating the number of copies of the service message based on the target delay, the message size, the total number of the nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message.
S203, acquiring a plurality of service message copies of the service message.
The steps S202 to S203 are the same as those S102 to S103 in the embodiment of fig. 1 of the present invention, and are not repeated herein, for details, see the description of the embodiment of fig. 1 of the present invention.
And S204, if the size of the cache space of the current node is larger than a preset capacity threshold, obtaining the remaining survival time of the service message in the opportunistic network based on the timestamp.
The size of the cache space of the current node is larger than the preset capacity threshold value, which indicates that the current node can receive the service message and deliver the service message. Also, since the time stamp indicates the time when the traffic message enters the opportunistic network, the remaining survival time of the traffic message in the opportunistic network can be obtained based on the time stamp so as to perform S205 using the remaining survival time. Wherein, the service message is usually set with a certain survival time in the opportunistic network, and when the remaining survival time is insufficient, the service message can not be delivered any more. For example, obtaining the remaining lifetime of the service message in the opportunistic network based on the timestamp may specifically be: calculating the interval duration between the current time and the timestamp of the service message; and subtracting the interval duration from the survival time of the service message to obtain the remaining survival time of the service message in the opportunity network.
S205, according to the preset delivery rule, a global delivery rate formula for calculating the global successful delivery rate of the service message is constructed.
Wherein, preset delivery rules include: and delivering a plurality of service message copies of the message copies sorted according to the initial priority by using a binary injection waiting routing algorithm in the remaining survival time.
S206, acquiring the priority of the service message when the delivery rate of the global delivery rate formula is maximized, taking the acquired priority as the dynamic priority of the service message, and sequencing a plurality of service message copies of the message copies according to the dynamic priority to obtain a service message queue.
For ease of understanding and reasonable layout, the manner in which the global delivery rate formula is constructed and the dynamic priority is obtained is specifically described below in alternative embodiments.
In an optional implementation manner, the constructing a delivery rate formula for calculating a global successful delivery rate of the service message according to the preset delivery rule may specifically include the following steps:
acquiring the number of nodes for receiving the service message copies and the passing delivery time interval for receiving the service message copies when delivering a plurality of service message copies of the message copies sorted according to the initial priority in the remaining survival time by using a binary injection waiting routing algorithm;
Inputting the number of nodes receiving the service message copies, the delivery time interval, the remaining survival time, the number of service message copies, the initial priority and the total number of the nodes into a remaining time delivery probability formula to obtain the probability of delivering the service message copies in the remaining survival time;
acquiring the delivered probability and undelivered probability of each service message copy in the acquired service message copies recorded by the current node;
aiming at each service message copy, inputting the probability of the service message copy being delivered in the remaining survival time and the probability of the service message copy being delivered into a message successful delivery rate formula to obtain the successful delivery rate of the service message copy;
aiming at each service message copy, calculating an accumulated value of a plurality of successful delivery rates of the service message copy under different remaining survival times by using the successful delivery rate of the service message copy to obtain a delivery rate formula for calculating the global successful delivery rate of the service message;
correspondingly, the obtaining of the priority of the service message when the delivery rate of the global delivery rate formula is maximized may specifically include the following steps as the dynamic priority of the service message:
Carrying out derivation processing on the global delivery rate formula to obtain a derivative of the global successful delivery rate of the service message, wherein the derivative is used as the dynamic priority of the service message;
wherein, the remaining time delivery probability formula is as follows:
Figure BDA0002697162530000131
wherein, for the ith node, P (RT) i ) Is the probability, lambda, that the traffic message of the node is delivered in the remaining survival time e Is an exponential distribution parameter, m i( T i ) Number of nodes receiving copies of service messages, d, for delivering several copies of service messages ordered according to an initial priority in remaining time of survival i (T i ) For a delivery time interval, C i Is the number of copies of the service message, W i To an initial priority, W d For weighting of traffic degradation, RT i The remaining survival time. And, the message successful delivery rate formula is:
P(i)=[1-P(T i )]P(RT i )+P(T i );
p (i) is the successful delivery rate of the message, P (T) i ) For service message copies T i The probability of having been delivered.
And, to calculate d i (T i ) Each node can maintainAn information that may include the node id, the list of deleted messages, and the time of generation of the delivery record. Only the source node that produced the delivery record can modify the time of generation of the delivery record and only if and when a new drop operation occurs in its buffer will the time of collection of the delivery record be modified. When two nodes with the same delivery record meet, a simple updating operation can be performed according to the generation time of the delivery record, for example, the generation time of the delivery record maintained by the two nodes is compared and updated to the generation time of the latest delivery record in the delivery records. Furthermore, the node may refuse to receive messages already in its deletion list, which avoids duplication of deletion operations. After a certain time, each node can calculate d of the node according to the generation time of the delivery record i (T i ). And, m i (T i ) The calculation of (c) may be derived from the dichotomy nature of the dichotomy injection latency routing algorithm. Illustratively, as shown in fig. 4. The transmission process of the message by the spray waiting routing algorithm is illustrated. The time at which the message is injected in half may be recorded throughout the transmission. Suppose the current copy number of message m is C m The initial number of copies is C, and then the height h of the tree shown in FIG. 4 can be obtained as shown in equation 4-1:
Figure BDA0002697162530000132
in fig. 4, the solid line represents the actual transmission process and the dashed line represents the estimated transmission process. Service message passing a certain time E (I) min ) Then sprayed into a binary tree, and m can be calculated using the following equation 4-2 i (T i ):
Figure BDA0002697162530000133
Where k is the initial injection of message m, h-1 is the number of injections experienced by message m as it passes through the tree of height h, t n For message m current injection time, t n Is the initial injection time of message m.
And S207, when the current node meets another node in the opportunity network and the other node does not have the identifier of the destination node, calculating a first evaluation index of forwarding quality when the current node sprays a service message queue to the destination node by using a binary spray waiting routing algorithm based on the congestion degree of the current node, the average congestion degree of a social group of the current node and the predicted contact probability between the current node and the destination node.
The forwarding quality evaluation formula is a formula capable of calculating the delivery success rate of delivering the service message from any node to a node different from the node.
And S208, inputting the congestion degree of the other node, the average congestion degree of the social group of the other node and the predicted contact probability between the other node and the destination node into a forwarding quality evaluation formula to obtain a second evaluation index of the forwarding quality when the other node is used as a relay node for forwarding the service message queue.
In an optional implementation manner, the forwarding quality evaluation formula may specifically be:
BP node(s,d) =sin[(π×br)/2]×SBR node ×P (s,d)
wherein, BP node(s,d) For forwarding the service message from node s to node D, br is the congestion level of node s, SBR node Average degree of congestion of social group, P, for node s (s,D) Is the predicted probability of contact between node s and node D;
P (s,D) updating the contact probability updating value, the contact probability attenuation value and the contact probability transmission value; wherein the contact probability update value is a value that obtains an increase in the contact probability based on the contacted probabilities of the two nodes; the contact probability attenuation value is a value about contact probability reduction obtained based on the fact that the node does not encounter another node within a preset time length; the contact probability transfer value is a value obtained on the basis of contact of two nodes with a third node with respect to an increase in contact probability.
Illustratively, the idea of the PRoPHET algorithm is adopted, the relay node is selected according to the predicted contact probability, and the selection of the relay node is combined with the idea of limiting the number of copies of the injection waiting route. The node with the larger delivery predicted value or the social group where the node is located is congested, and packet loss and delay can be caused by congestion. Therefore, the congestion degree of the node social group and the delivery prediction value of the node need to be considered together to select the relay node of the message. The ProPHET algorithm is a data prediction algorithm for time series, which is open source of Facebook.
The prediction of the probability of contact between two nodes is mainly divided into three parts: (1) updating of contact probability determined by direct contact of two nodes; (2) the node does not encounter the attenuation of the contact probability caused by another node for a long time; (3) the contact probability between two nodes is changed by the contact between the two nodes and the third node.
Specifically, the update policy is: in the idea of the priophot algorithm, it is considered that the two node contact probabilities that are frequently connected increase more and more at each encounter. Therefore, when two nodes are contacted, the contact prediction value is increased, and the specific increasing coefficient can be defined by a weight value lambda p And (6) determining. Node point i i and node j The contact probability P (i, j) after the encounter with j can be updated as follows:
Figure BDA0002697162530000151
in formula 4-3, P ini An initial constant value is represented which is,
Figure BDA0002697162530000152
representing the probability of contact before node i and node j meet. Attenuation strategy: the PRoPHET algorithm considers that if two nodes do not contact in a time interval, the contact probability of the two nodes in the future is smaller, so that the contact probability is attenuated by a certain coefficient. Node point i The probability of contact between i and node j may decay as follows 4-4:
Figure 1
in the formula 4-4, γ ∈ [0,1) is the attenuation coefficient, k κ is the number of blocks of time elapsed from the last contact to the current point in time.
The transmission strategy is as follows: the PRoPHET algorithm considers that if two nodes are in close contact with a third-party node, the probability that the message is successfully transferred between the two nodes is higher, so that the contact probability of the two nodes is increased. Setting nodes as shown in the formula i The contact between the i and the node sh is frequent, and the contact probability is P (i,s) Node of j j contacts the node s frequently with a contact probability P (j,s) Then node s may act as a third party pass-through node between nodes i and j. Node point i The probability of contact between i and node j may decay as follows 4-5: :
Figure BDA0002697162530000154
In the formula 4-5, β ∈ [0,1) β ∈ [0,1) is a transfer weight, and represents the degree of influence of the transferability of the third party on the predicted value of the contact probability.
Therefore, for the service message m, when the node holding the service message encounters other nodes, the congestion degree and the contact probability can be calculated according to the above formula to decide whether to transmit the service message to the encountering node.
S209, if the first evaluation index is smaller than the second evaluation index, determining another node as a relay node, and sending the service message queue to the relay node, so that the relay node sends the received service message queue to the destination node having the identifier of the destination node, otherwise, the current node waits for an encounter with another next node, and performs a step of an encounter between the current node and another node in the opportunistic network.
In this embodiment, a dynamic adjustment strategy is designed according to information such as the priority of the message, the number of copies of the message, and the network state, so as to ensure the quality of service of the high-priority service and ensure the best-effort transmission opportunity of the low-priority service. And based on the congestion degree of the nodes and a route forwarding strategy of delivery prediction, the injection nodes are filtered and selected in the injection step, so that the injection effectiveness is improved, and the invalid occupation of the network is avoided.
In an optional implementation manner, the above-mentioned relay node sends the received service message queue to the destination node having the identifier of the destination node, which may specifically include the following steps:
when the number of the messages in the received service message queue is larger than 1, the relay node utilizes a binary injection waiting routing algorithm to inject the service message queue to nodes except the relay node in the opportunistic network, so that the nodes receiving the service message queue as current nodes execute a step of obtaining the remaining survival time of the service messages in the opportunistic network based on the timestamp if the size of the cache space of the current nodes is larger than a preset capacity threshold value, and when the current nodes meet another node in the opportunistic network and the other node has the identification of a destination node, the received service message queue is sent to the node with the identification of the destination node;
when the number of the messages in the received service message queue is equal to 1, the relay node, as the current node, executes the step of obtaining the remaining survival time of the service message in the opportunistic network based on the timestamp if the size of the buffer space of the current node is larger than a preset capacity threshold value until the current node meets another node in the opportunistic network and the another node has the identifier of the destination node, and sends the received service message queue to the node having the identifier of the destination node.
In an optional implementation manner, before the delivery rate formula for calculating the global successful delivery rate of the service message is constructed according to the preset delivery rule, the method for dynamically allocating opportunistic network resources based on service priority provided by the embodiment of the present invention may further include the following steps:
if the size of the cache space of the current node is smaller than a preset capacity threshold, setting a degradation identifier for reducing the priority for the service message;
after obtaining the priority of the service message when the delivery rate of the delivery rate formula is maximized, the method for dynamically allocating opportunistic network resources based on the service priority provided by the embodiment of the invention may further include the following steps:
if the service message has the degradation identifier, degrading the priority of the service message when the delivery rate of the delivery rate formula is maximized to obtain the degraded priority;
correspondingly, the above step of using the obtained priority as the dynamic priority of the service message may specifically include the following steps:
and taking the degraded priority as the dynamic priority of the service message.
For example, to facilitate understanding, the alternative embodiment is integrated with the embodiment of fig. 2 and the alternative embodiment of fig. 2 of the present invention, and a flow shown in fig. 5 can be obtained. The starting step and the step of the application request are not shown in the embodiment of fig. 2 and the alternative embodiment of fig. 2, and specifically, the starting step and the step of the application request may be an application request for a user in an opportunistic network to send a service-carrying message by using a mobile terminal. The nodes in the opportunistic network receive the service request, and integrate the flows of the embodiment of fig. 2 and the alternative embodiment of fig. 2 of the present invention to realize a complete route planning and service message delivery flow.
Specifically, the following steps shown in fig. 5 are equivalent to step S201 in the embodiment of fig. 2 of the present invention, and are used to implement the calculation of the initial priority of the service:
calculating the network scale N of the network; social group congestion degree SBR;
calculating the optimal expected delay Ed opt (ii) a "message target delay ED hope < expected delay Ed opt Is there a "i.e. the message target delay ED hope Whether or not less than the desired delay Ed opt
If the priority is not less than the preset threshold, receiving the service request, mapping pri by the initial priority and mapping down flag by the degradation flag; if the target delay is smaller than the preset target delay, judging whether the target delay is increased, if so, receiving the service request, and performing the steps of mapping pri by the initial priority and mapping down flag by the degradation flag; if not, the application request may be denied for correspondence rather than service, and the flow shown in FIG. 5 may be executed for the next application request.
The following steps shown in fig. 5 correspond to steps S202 to S206 in the embodiment of fig. 2 of the present invention, and steps of an alternative embodiment corresponding to steps S202 to S206, and are used to implement dynamic adjustment of service priority: calculating the lowest copy number L of the message, the number Lmax of the message copies and the maximum forwarding times FT of the message; entering a node route; judging whether the node buffer area capacity is sufficient or not; if sufficient, carrying out dynamic priority sequencing in the nodes; if not, downgrading the downgrade to 1.
The following steps shown in fig. 5 correspond to steps S207 to S209 of the embodiment of fig. 2 of the present invention, and steps of an alternative embodiment corresponding to steps S207 to S209, and are used to implement relay node selection based on congestion level and delivery prediction:
the current node A meets the node B; judging whether the node B is a destination node of the message i or not; if yes, the message i is forwarded, namely the message i is forwarded to the node B, and the operation is finished; if not, let D be the destination node of message i, "BP (A, D) < BP (B, D)? "that is, whether the first quality evaluation index BP (a, D) of the node a is less than the second quality evaluation index BP (B, D) of the node B is determined; if not, the message i is not forwarded or injected, and the operation is finished; if less than "number of copies Ci > 1? "namely, whether the number Ci of copies is greater than 1 is judged; if the number Ci of the copies is not more than 1, forwarding the message i, and returning to the step of judging whether the buffer area capacity of the node is sufficient or not so as to execute the step of selecting the relay node based on the congestion degree and delivery prediction on the next message; and if the number Ci of the copies is more than 1, spraying the message i, and returning to the step of judging whether the buffer area capacity of the node is sufficient or not so as to execute the step of selecting the relay node based on the congestion degree and delivery prediction on the next message.
For convenience of understanding, an application effect of the method for dynamically allocating opportunistic network resources based on service priority provided by another embodiment of the present invention is exemplarily described. Specifically, the experimental simulation of the network can be established based on a simulation platform ONE, and the movement model of the node is a random walk model. The specific parameter settings of the nodes are shown in the following table 1-1.
Table 1-1 setting of simulation parameters:
simulation parameters Parameter value setting
Number of nodes 100
Simulation time (simulation) 24h
Message TTL 30min
Minimum rate of node 0.5m/s
Maximum rate of node 1m/s
Communication range of nodes 20m
Minimum number of copies L 8
Initial constant P ini 0.75
Attenuation weight gamma 0.97
Transfer weight beta 0.25
Message size range [100,300]kb
In the experiment, three types of services are defined for different requirements of different services on network performance: emergency traffic, data flow traffic, best effort traffic. For example, the type of the emergency service is defined as H, and the target delay is 800-; the type of the data stream service is M, and the target delay is 1200-1800 s; the type of best effort traffic is L with a target latency of 1800-. The ratio of the number of service messages generating the three types of services during network simulation is 1:3: 6. The method for dynamically allocating opportunistic network resources based on service priority provided by another embodiment of the present invention is referred to as a first algorithm. Experimental comparison algorithms there are an injection-waiting route pattern with congestion control without prioritization, referred to as the second algorithm, and a third quality of service strategy for prioritized routes, referred to as the third algorithm. The third method adapts to resource allocation in a dynamic environment, defines constraints for optimizing network range performance while meeting single class QoS constraints, but the used infection strategy has high resource consumption, scheduling information needs to be provided globally, and the third method does not adapt to the practical application of the opportunistic network. The simulation mainly verifies the performance of the algorithm under different network resources. Due to the characteristics of storage-carrying-forwarding of the opportunistic network, network resources of the opportunistic network are mainly cache spaces in the network, and when the cache spaces in the network are insufficient, network congestion can be caused and the service quality is influenced, so that the performance of a routing algorithm is mainly compared by comparing the routing conditions in different cache spaces in a simulation experiment. The specific comparison results are illustrated in fig. 6 to 10:
As shown in fig. 6 and 7. The three dotted lines represent delivery rates when the third algorithm processes H, M and the L-type service messages, respectively, the three solid lines represent delivery rates when the first algorithm processes H, M and the L-type service messages, respectively, and the dotted lines of the star symbols represent delivery rates when the second algorithm processes H, M and the L-type service messages, respectively. The horizontal coordinate is the size of the cache space, and is sequentially increased from left to right, which represents that the network resource condition is gradually sufficient. The ordinate in fig. 6 is the delivery rate of the message and the ordinate in fig. 7 is the transmission delay of the message. When the available resources are not able to achieve the desired performance for all messages, the desired behavior of the algorithm is to prioritize the packets in order of their QoS class importance. In this case, the first goal is to satisfy H type traffic messages, then M type traffic messages, then L type traffic messages. Thus, when node cache availability is low and congestion occurs, resources are reserved for applications of class H, and resources obtained by class M and class L should not exceed the minimum resources corresponding to their entire lifetime. Therefore, under the condition of insufficient network resources, the message delivery rates and transmission delays of different priorities are greatly different. In the case of insufficient network resources, the class H delivery rate of the first algorithm is higher than the class H delivery rate of the third algorithm, and the transmission delay is lower than the class H transmission delay of the third algorithm, because the third algorithm uses the infectious disease route, the flooding policy of the infectious disease route has a large demand on the network cache region, and when the network resources are insufficient, even if a large amount of network resources are allocated for the high-priority traffic, the delivery rate and the network delay are still inferior to the first algorithm for controlling the number of copies. Along with the increase of the node cache area, the increase of the H class tends to be gentle, the performances of the M class and the L class are gradually improved, and the performance stability of the M class is higher than that of the L class. It can be seen that in the case of sufficient network resources, although the class H delivery rate of the first algorithm is slightly lower than the class H delivery rate of the third algorithm, the class M delivery rate and the class L delivery rate of the first algorithm are much higher than the class-by-class message delivery rate of the third algorithm. The first pair of network resources has higher adaptability and flexibility. It can be seen that with the sufficiency of the network resources, the optimization of both the delivery rate and the delay of the first algorithm approaches to be stable, while the optimization of the delivery rate and the delay of the third algorithm still increases, which indicates that the third algorithm has a large demand for the network resources.
As shown in fig. 8. The overall delivery rates of the three algorithms at different buffer sizes are mainly compared. In the event of insufficient network resources, the overall delivery rate of the first and third prioritized algorithms is lower than the second non-prioritized algorithm. Because the occupation ratio of the H-type messages in the network is relatively small, when the network is congested, in order to ensure the service quality of the H-type messages, the resource allocation of the M-type and the L-type with a large occupation ratio is reduced, so that the overall delivery rate is relatively low. But as the network resource conditions are optimized, the overall delivery rate of the first and third algorithms approaches the second delivery rate that does not prioritize traffic. The first overall delivery rate is also better than that of the third algorithm because, in the case of more sufficient network resources, messages with lower priority in the first algorithm can also obtain sufficient network resources, while low priority traffic in the third algorithm can be optimized in terms of quality of service, but due to the flooding policy, the network resources that can be occupied are still insufficient.
As shown in fig. 9. When network resources are sufficient, the packet loss rate of all algorithms is gradually reduced. Third algorithm due to the use of the epidemic algorithm, the redundancy of messages in the network may still be high compared to the spray waiting routing algorithm, although the constraints imposed on the basis of the total buffer availability in the network are taken into account. The packet loss rate of the lower priority messages in the third algorithm is still relatively high even in the case of relatively sufficient network resources.
As shown in fig. 10. In the case of a relatively scarce network resource, the overhead of the whole network is relatively large. With the increase of the size of the cache space, the first algorithm of the patent has relatively low network overhead, in the first algorithm, the number of copies of the message in the whole network is already determined before the message enters the route, the social contact of the node is considered during the route, and the message is forwarded to the contact node only when the delivery capacity of the contact node is greater than that of the message sending node, so that the redundant forwarding times can be reduced, and the network overhead is reduced. The third algorithm uses an epidemic algorithm, and the redundancy of the message in the network is difficult to control, and although the limitation based on the availability of the total buffer in the network is considered, the excessive redundancy increases the forwarding tree of the message, thereby causing a large network overhead. The second algorithm limits the number of copies of the message, but does not select a relay node, so that unnecessary forwarding is performed, resulting in an increase in network overhead.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above methods for dynamic allocation of opportunistic network resources based on service priority.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the above embodiments of the method for dynamic allocation of opportunistic network resources based on traffic priority.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
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 computer storage medium and the application program embodiment, since they are 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.
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 (8)

1. A method for dynamically allocating opportunistic network resources based on service priority is applied to a current node carrying a service message in an opportunistic network, wherein the service message comprises a target delay for sending the service message, a message size of the service message and an identifier of a target node, and the method comprises the following steps:
acquiring the total number of nodes in the opportunity network, the average congestion degree of a social group of the current node, the size of a cache space of the current node and the initial priority of the service message; the social group of the current node is a set of nodes which have been contacted by the current node within a specified time period; setting the initial priority of any service message based on the size relationship between the target delay and the delay interval of the service message; the delay interval is obtained by dividing the expected delay and the average delay of the current node when the current node transmits the message in the opportunity network according to the difference of the average congestion degrees of the social groups;
Calculating the number of copies of the service message based on the target delay, the message size, the total number of the nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message;
acquiring a plurality of service message copies of the service message, and sending the acquired service message copies to a destination node with the identifier;
the acquiring the total number of nodes in the opportunistic network comprises:
acquiring a specified number of meeting time intervals from the meeting time intervals recorded by the current node; any meeting time interval is the time interval of meeting of the current node and a node except the current node in the opportunity network;
calculating an average time interval of the current node and nodes except the current node in the opportunity network, which is taken as a first average time interval, based on the specified number of encounter time intervals;
calculating an average time interval of every two nodes meeting in the current node and the nodes except the current node in the opportunity network as a second average time interval based on the specified number of meeting time intervals;
Inputting the first average time interval and the second average time interval into a network scale calculation formula to obtain the total number of nodes in the opportunity network; wherein, the network scale calculation formula is as follows:
Figure FDA0003621916030000011
the N is the total number of nodes in the opportunistic network, the AT 01 For the first average time interval, the AT 12 Is the second average time interval;
the calculating the number of copies of the service message based on the target delay, the message size, the total number of nodes, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message includes:
inputting the target delay and the total number of the nodes into a minimum copy number formula to obtain a minimum copy number; wherein the minimum number of copies formula is:
Figure FDA0003621916030000021
l is the minimum number of copies, ED exp For the expected delay, i is the node sequence number of the node in the opportunistic network, and ED hope Delaying the target;
inputting the minimum number of copies, the message size, the average congestion degree of the social group, the cache space size of the current node and the initial priority of the service message into a message copy number formula to obtain the number of copies of the service message; wherein, the message copy number formula is:
Figure FDA0003621916030000022
Said L max The number of message copies, the msgsize being the message size, the bsize being the buffer space size of the current node, the pri being the initial priority of the service message, and the SBR i Average congestion degree of social group of the ith node.
2. The method of claim 1, wherein obtaining the average congestion level of the social group of the current node comprises:
obtaining the cache space occupancy rate of each node in the social group of the current node;
and performing average calculation on the acquired cache space occupancy rates of the nodes to obtain the average congestion degree of the social group of the current node.
3. The method of claim 2, wherein the obtaining the initial priority of the service message comprises:
inputting the length of the communication area of the current node and the length of the area covered by the opportunity network into an average delay formula to obtain the average delay; wherein, the average delay formula is:
Figure FDA0003621916030000031
the ED avg D is the length of the communication area of the current node, and Len is the length of the area covered by the opportunistic network;
inputting the average delay and the total number of the nodes into an expected delay formula to obtain the expected delay; wherein the expected delay formula is:
Figure FDA0003621916030000032
The ED exp For the expected delay, the i is a node serial number of a node in the opportunity network;
inputting the target delay of the service message into an initial priority mapping formula to obtain the initial priority of the service message; the initial priority mapping formula is set based on the size relationship between target delay and a delay interval, and the initial priority mapping formula is as follows:
Figure FDA0003621916030000033
pri is the initial priority, ED hope For the target delay, the OL is a first cache space occupancy threshold, the OH is a second cache space occupancy threshold, and OL is greater than 0 and OH is less than 1; average congestion degree SBR of social group of node i i Is [ OL, OH]The desired delay of the opportunistic network is
Figure FDA0003621916030000034
The average delay of the opportunistic network is
Figure FDA0003621916030000035
Average congestion degree SBR of social group of node i i Is (OH, 1)]The desired delay of the opportunistic network is
Figure FDA0003621916030000036
The average delay of the opportunistic network is
Figure FDA0003621916030000037
4. The method of claim 1, wherein the traffic message further includes a timestamp indicating a time when the traffic message entered the opportunistic network;
the sending the acquired service message copy to the destination node with the identifier includes:
If the size of the cache space of the current node is larger than a preset capacity threshold, obtaining the remaining survival time of the service message in the opportunistic network based on the timestamp;
according to a preset delivery rule, a global delivery rate formula for calculating the global successful delivery rate of the service message is constructed; wherein the preset delivery rule comprises: delivering a plurality of service message copies of the message copies sorted according to the initial priority by using a binary injection waiting routing algorithm in the remaining survival time;
acquiring the priority of the service message when the delivery rate of the global delivery rate formula is maximized, taking the acquired priority as the dynamic priority of the service message, and sequencing a plurality of service message copies of the message copies according to the dynamic priority to obtain a service message queue;
when the current node meets another node in the opportunity network and the other node does not have the identification of the destination node, calculating a first evaluation index of forwarding quality when the traffic message queue is sprayed to the destination node from the current node by using a binary spray waiting routing algorithm based on the congestion degree of the current node, the average congestion degree of a social group of the current node and the predicted contact probability between the current node and the destination node; the forwarding quality evaluation formula is a formula capable of calculating the delivery success rate of delivering the service message from any node to a node different from the node;
Inputting the congestion degree of the other node, the average congestion degree of the social group of the other node and the predicted contact probability between the other node and the destination node into a forwarding quality evaluation formula to obtain a second evaluation index of the forwarding quality when the other node is used as a relay node for forwarding the service message queue;
and if the first evaluation index is smaller than the second evaluation index, determining the other node as a relay node, and sending the service message queue to the relay node so that the relay node sends the received service message queue to the destination node with the identification, otherwise, waiting for meeting with the next other node by the current node, and executing the step of meeting with the other node in the opportunistic network by the current node.
5. The method according to claim 4, wherein the constructing a delivery rate formula for calculating a global successful delivery rate of the service message according to a preset delivery rule comprises:
acquiring the number of nodes for receiving the service message copies and the passing delivery time interval for receiving the service message copies when the plurality of service message copies ordered according to the initial priority are delivered in the remaining survival time by using a binary injection waiting routing algorithm;
Inputting the number of the nodes receiving the service message copies, the delivery time interval, the remaining survival time, the number of the service message copies, the initial priority and the total number of the nodes into a remaining time delivery probability formula to obtain the probability of delivering the service message copies in the remaining survival time;
acquiring the delivered probability and undelivered probability of each service message copy in the acquired service message copies recorded by the current node;
aiming at each service message copy, inputting the probability of the service message copy being delivered in the remaining survival time and the probability of the service message copy being delivered into a message successful delivery rate formula to obtain the successful delivery rate of the service message copy;
aiming at each service message copy, calculating an accumulated value of a plurality of successful delivery rates of the service message copy under different remaining survival times by using the successful delivery rate of the service message copy to obtain a delivery rate formula for calculating the overall successful delivery rate of the service message;
the obtaining of the priority of the service message when the delivery rate of the global delivery rate formula is maximized, as the dynamic priority of the service message, includes:
Performing derivation processing on the global delivery rate formula to obtain a derivative of the global successful delivery rate of the service message, wherein the derivative is used as the dynamic priority of the service message;
wherein the remaining time delivery probability formula is:
Figure FDA0003621916030000051
wherein, the P (RT) i ) For the remaining time delivery probability, said λ e Is an exponential distribution parameter, said m i (T i ) The number of nodes receiving the service message copies when delivering a plurality of service message copies ordered according to the initial priority in the remaining survival time, d i (T i ) Is the delivery time interval, the i Is the number of message copies, said W i For the initial priority, the W d For weight of traffic degradation, the RT i For the remaining survival time, the n i (T i ) The number of nodes for receiving the service message copies when delivering a plurality of service message copies ordered according to the initial priority in the current survival time;
the message successful delivery rate formula is as follows:
P(i)=[1-P(T i )]P(RT i )+P(T i );
the P (i) is the successful delivery rate of the message, P (T) i ) For the service message copy T i The probability of having been delivered.
6. The method of claim 5, wherein the forwarding quality evaluation formula is:
BP node(s,D) =sin[(π×br)/2]×SBR node ×P (s,D)
The BP node(s,d) To a slave node sForwarding quality evaluation index for forwarding service message to node D, br being congestion degree of node s, SBR node Average degree of congestion of social group of the node s, P (s,D) Is the predicted probability of contact between the node s and the node D;
the P is (s,D) Updating the contact probability updating value, the contact probability attenuation value and the contact probability transmission value; wherein the contact probability update value is a value that obtains an increase in contact probability based on the contacted probabilities of two nodes; the contact probability attenuation value is a value about contact probability reduction obtained based on that the node does not encounter another node within a preset time length; the contact probability transfer value is a value obtained on the basis of contact of two nodes with a third node with respect to an increase in contact probability.
7. The method of claim 4, wherein the relay node sends the received traffic message queue to the destination node having the identification, comprising:
when the number of the messages in the received service message queue is greater than 1, the relay node sprays the service message queue to nodes except the relay node in the opportunistic network by using a binary spraying waiting routing algorithm, so that the node which receives the service message queue as a current node executes the step of obtaining the remaining survival time of the service message in the opportunistic network based on the timestamp if the size of the cache space of the current node is greater than a preset capacity threshold value until the current node meets another node in the opportunistic network and the another node has the identification of the destination node, and then sends the received service message queue to the node with the identification of the destination node;
When the number of the messages in the received service message queue is equal to 1, the relay node, as a current node, executes the step of obtaining the remaining survival time of the service message in the opportunistic network based on the timestamp if the size of the buffer space of the current node is larger than a preset capacity threshold until the current node meets another node in the opportunistic network and the another node has the identification of the destination node, and sends the received service message queue to the node having the identification of the destination node.
8. The method according to claim 4, wherein before said constructing a delivery rate formula for calculating a global successful delivery rate of the service message according to a preset delivery rule, the method further comprises:
if the size of the cache space of the current node is smaller than a preset capacity threshold, setting a degradation identifier for reducing the priority for the service message;
after the obtaining of the priority of the service message when the delivery rate of the delivery rate formula is maximized, the method further comprises:
if the service message has the degradation identifier, degrading the priority of the service message when the delivery rate of the delivery rate formula is maximized to obtain the degraded priority;
The taking the obtained priority as the dynamic priority of the service message includes:
and taking the degraded priority as the dynamic priority of the service message.
CN202011009694.7A 2020-09-23 2020-09-23 Opportunistic network resource dynamic allocation method based on service priority Active CN112217737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011009694.7A CN112217737B (en) 2020-09-23 2020-09-23 Opportunistic network resource dynamic allocation method based on service priority

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011009694.7A CN112217737B (en) 2020-09-23 2020-09-23 Opportunistic network resource dynamic allocation method based on service priority

Publications (2)

Publication Number Publication Date
CN112217737A CN112217737A (en) 2021-01-12
CN112217737B true CN112217737B (en) 2022-07-29

Family

ID=74052357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011009694.7A Active CN112217737B (en) 2020-09-23 2020-09-23 Opportunistic network resource dynamic allocation method based on service priority

Country Status (1)

Country Link
CN (1) CN112217737B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055459B (en) * 2021-03-09 2022-11-01 北京奇艺世纪科技有限公司 Log delivery method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808117A (en) * 2010-03-03 2010-08-18 清华大学 Method for construction and service of time tag business data for communication
CN108449270A (en) * 2018-03-21 2018-08-24 中南大学 Buffer memory management method priority-based in opportunistic network
CN108667746A (en) * 2018-04-03 2018-10-16 北京理工大学 A method of it is delayed in tolerant network in deep space and realizes service priority
CN111478859A (en) * 2020-04-03 2020-07-31 北京大学深圳研究生院 Message transmission method, node and storage medium in DTN (delay tolerant network)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103117957B (en) * 2013-02-04 2016-04-06 重庆邮电大学 The buffer memory management method of Effect-based operation number of copies and comprehensive effectiveness in opportunistic network
GB2551962A (en) * 2016-06-27 2018-01-10 Virtuosys Ltd Mobile wireless communnication unit and method for content transfer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808117A (en) * 2010-03-03 2010-08-18 清华大学 Method for construction and service of time tag business data for communication
CN108449270A (en) * 2018-03-21 2018-08-24 中南大学 Buffer memory management method priority-based in opportunistic network
CN108667746A (en) * 2018-04-03 2018-10-16 北京理工大学 A method of it is delayed in tolerant network in deep space and realizes service priority
CN111478859A (en) * 2020-04-03 2020-07-31 北京大学深圳研究生院 Message transmission method, node and storage medium in DTN (delay tolerant network)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Clustering Algorithm Based on Communication Overhead and Link Stability for Cloud-assisted Mobile Adhoc Networks;Kun Xiao等;《2019 15th International Wireless Communications & Mobile Computing Conference(IWCMC)》;20190722;第278-283页 *
自适应的机会网络消息副本调整策略;黄丹莉等;《长春工程学院学报(自然科学版)》;20161215;第17卷(第04期);第96-98页 *

Also Published As

Publication number Publication date
CN112217737A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN108093485B (en) Resource allocation method and device
Narawade et al. ACSRO: Adaptive cuckoo search based rate adjustment for optimized congestion avoidance and control in wireless sensor networks
CN112217737B (en) Opportunistic network resource dynamic allocation method based on service priority
Oida et al. An agent-based routing system for QoS guarantees
KR20120097092A (en) Social-community based dtn routing method
Lou et al. Boosting or hindering: AoI and throughput interrelation in routing-aware multi-hop wireless networks
CN110913430B (en) Active cooperative caching method and cache management device for files in wireless network
US20070127419A1 (en) Enforcing fairness in ad hoc mesh networks
US8169961B2 (en) Method for dynamically allocating resources in a network of station clusters
Oida et al. ARS: an efficient agent-based routing system for QoS guarantees
EP1478133B1 (en) Preemptive precedence scheduler for communications link bandwidth
CN109120523B (en) Multi-node path selection method and device, and cloud platform resource scheduling method and device
CN102549987B (en) A method for controlling the admission of a flow to a network and a network
CN113692058A (en) Spectrum resource evaluation set-based satellite optical network spectrum allocation method and system
Jain et al. A fuzzy logic based buffer management scheme with traffic differentiation support for delay tolerant networks
CN113840333A (en) Power grid resource allocation method and device, electronic equipment and storage medium
CN101119307A (en) Routing method
Jiao et al. DTN routing with back-pressure based replica distribution
JP2004336209A (en) Traffic distribution control apparatus, and traffic distribution control method
US11968124B2 (en) System and method for managing network traffic using fair-share principles
KR102081510B1 (en) Method of congestion control in information centric network based environment with delay tolerant networking, computer readable medium and device for performing the method
Nawaf et al. Internet transit access point placement and bandwidth allocation in wireless mesh networks
Hu et al. A packet scheduling method based on dynamic adjustment of service priority for electric power wireless communication network
CN106454937B (en) Distribution control method for mobile terminal cache space
CN112615798B (en) Bandwidth allocation method and device based on elephant flow reservation

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