Wireless body area network resource allocation method and device based on hybrid access mechanism
By adopting a hybrid access mechanism in wireless body area networks and optimizing resource allocation based on node priorities and data characteristics, the problem of heterogeneous node data transmission requirements is solved, and efficient channel resource utilization and low-latency transmission are achieved.
Patent Information
- Application Number
- CN202210275248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-21
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing wireless body area network resource allocation solutions cannot effectively meet the urgent data transmission needs of heterogeneous nodes, resulting in competition conflicts between nodes and reduced data real-time performance, and high time complexity, affecting transmission delay.
Adopt a resource allocation method based on a hybrid access mechanism, divide node priorities based on data characteristics, perform backoff differentiated channel competition, adaptively divide superframe competition stages, determine the number of non-competition time slots based on transmission utility, and determine based on priority Transmission order, optimize node data sending.
It reduces competition and conflicts between nodes, improves channel resource utilization, maximizes node transmission throughput, and improves the real-time and effectiveness of data transmission.
Smart Images

Figure CN114828278B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless body area network, and in particular to a method and device for allocating resources of a wireless body area network based on a hybrid access mechanism. Background Art
[0002] Wireless body area network is a sensor network that takes the human body as the research subject and is mainly used for human health monitoring. The body area network consists of a coordinator and multiple wearable or implantable sensor nodes, each of which collects a type of vital signs, such as body temperature, respiratory rate, blood sugar, blood pressure, etc., and then sends the collected data to the coordinator, which then forwards it to the remote control center for processing and analysis.
[0003] Since the data types and sampling rates of sensor nodes are heterogeneous, and the throughput, latency and other performance requirements of emergency data are higher than those of ordinary data, it is particularly important to allocate the most appropriate access mode for nodes of different urgency under limited channel resources. In recent years, many scholars have devoted themselves to studying the resource allocation problem in body area networks, that is, how to meet the performance requirements of heterogeneous nodes, reduce competition conflicts between nodes, and improve the effectiveness of resource allocation and the utilization of time slots.
[0004] Resource allocation in wireless body area networks is an important part of this field, which mainly includes issues such as access scheme allocation, superframe design, and priority mapping. At present, most of the resource allocation schemes proposed by many scholars adopt non-competitive time slot allocation schemes. This single-type access scheme cannot ensure the full transmission of urgent data and low latency requirements. In addition, scholars have not considered the accumulation of old data caused by long-term unsent data, which reduces the real-time and effectiveness of the data. Most existing schemes use greedy algorithms for solution, which has too large a time complexity and will increase the delay of node transmission. Summary of the invention
[0005] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the object of the present invention is to provide a method and device for allocating resources in a wireless body area network based on a hybrid access mechanism.
[0006] The technical solution adopted by the present invention is:
[0007] A method for allocating resources in a wireless body area network based on a hybrid access mechanism comprises the following steps:
[0008] Divide the priority of nodes according to data characteristics, and divide the types of nodes according to the priority; the types of nodes include emergency nodes and ordinary nodes;
[0009] Determine whether to send new data or old data based on changes in the data cache;
[0010] Perform backoff differentiated channel contention based on node priority;
[0011] Adaptively divide the superframe contention phase according to the channel status;
[0012] Determine the number of node time slots in the non-contention phase according to the node transmission utility;
[0013] The node transmission order in the non-competition phase is determined according to the node's transmission priority.
[0014] Further, the data features include a timeout rate, a sampling rate deviation, and a vital sign deviation of a node;
[0015] The priority of nodes is divided according to data characteristics, and the type of nodes is divided according to the priority, including:
[0016] Calculate the priority P of each node based on the timeout rate, sampling rate deviation and vital sign deviation i ;
[0017] According to the priority P i and the preset threshold value to divide the nodes into emergency nodes and ordinary nodes;
[0018] Among them, the priority P i The calculation formula is as follows:
[0019]
[0020] In the formula, is the percentage of packets in the node cache queue that will time out for the next frame, is the deviation between the current sampling rate and the maximum and minimum sampling rates, It is the deviation between the current vital sign and the maximum and minimum vital signs, and ω1+ω2+ω3=1.
[0021] Further, the determining whether to send new data or old data according to the data cache change includes:
[0022] A1, determine whether the node fails to successfully send all data in two consecutive frames. If not, the node starts sending old data from the head of the cache queue; if so, go to step A2;
[0023] A2. The accumulation level of data packets in the computing node cache queue A i ;
[0024] A3. Compare the accumulation degree of the node's current frame with the accumulation degree of the previous frame. If the accumulation degree becomes better, the node starts sending old data from the head of the cache queue; if the accumulation degree becomes worse, the node starts sending new data from the tail of the cache queue.
[0025] Furthermore, the stacking degree A i The calculation formula is as follows:
[0026]
[0027] Among them, a is the number of superframes that the data packet has passed from the time it was generated to the present. is the number of packets with age a in the cache queue of node i, is the number of all packets in the cache queue of node i, t life Is the lifetime of the data packet.
[0028] Further, performing backoff differentiated channel contention according to node priority includes:
[0029] B1. Calculate the initial fixed backoff value of node competition according to the priority of the node;
[0030] B2. If a conflict occurs when a node backs off, a backoff value is randomly selected from the preset backoff value range for backoff;
[0031] B3. If no conflict occurs after the node backs off, two channel idle detections are performed. If both detections are idle, the channel competition is successful. Otherwise, it is determined that the channel conflicts at this time, and the process returns to step B2.
[0032] B4. After the emergency node successfully competes for the channel, it sends all data information; after the ordinary node successfully competes for the channel, it only sends the node information for the coordinator to allocate non-competition time slots.
[0033] Furthermore, the step of adaptively dividing the superframe contention phase according to the channel state includes:
[0034] C1, the emergency node competes for channels and sends data in the early stage of the contention phase;
[0035] C2, the ordinary node detects whether the channel is idle. If it detects that the channel is idle for four consecutive CSMA time slots, it is determined that the emergency node has completed data transmission, and the channel is divided into the competition stage of ordinary nodes;
[0036] C3. If it is detected that the channel is occupied by an emergency node, wait until the data is sent and return to step C2;
[0037] C4. If the first contention conflict is detected in the channel, return to step C2;
[0038] C5: If the second contention conflict is detected in the channel, it is necessary to detect that the channel is idle for eight consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into the contention stage of ordinary nodes;
[0039] C6. If the third or more contention conflicts are detected on the channel, it is necessary to detect that the channel is idle for sixteen consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into the contention stage for ordinary nodes.
[0040] Further, determining the number of node time slots in the non-contention phase according to the node transmission utility includes:
[0041] Calculate the initial number of allocated time slots for each node based on the amount of data that the node needs to send in the current frame;
[0042] Determine whether the number of time slots that can be allocated by the coordinator can meet the sum of the number of time slots required by all nodes; if so, this time slot allocation scheme is the best allocation scheme;
[0043] If it cannot be satisfied, the difference ΔN between the number of allocable time slots and the required number of time slots is calculated, and the quotient α and remainder β of the difference ΔN and the number of nodes n are calculated;
[0044] Reduce the number of initially allocated time slots of all nodes by α time slots;
[0045] Calculate the transmission utility of the nodes at this time, select β nodes with the smallest transmission utility, and reduce the number of time slots of the selected nodes by one. The time slot allocation plan at this time is the final suboptimal time slot allocation plan.
[0046] Furthermore, the calculation formula of the transmission utility U is as follows:
[0047] U=P×R×Γ
[0048] Among them, P is the node priority; R is the node reliability factor; Γ is the node traffic factor.
[0049] Further, determining the node transmission order in the non-competition phase according to the node transmission priority includes:
[0050] Calculate the transmission priority of each node based on the node's priority and age status;
[0051] Get the transmission order of nodes according to the transmission priority;
[0052] The calculation formula for transmission priority is as follows:
[0053] S=P×A
[0054] Among them, P is the priority of the node; A is the age state of the node to send the data packet.
[0055] Another technical solution adopted by the present invention is:
[0056] A wireless body area network resource allocation device based on a hybrid access mechanism, comprising:
[0057] at least one processor;
[0058] at least one memory for storing at least one program;
[0059] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0060] The beneficial effects of the present invention are as follows: the present invention provides a wireless body area network channel resource allocation scheme based on a hybrid access mechanism, which is suitable for scenarios where nodes send a large amount of data, can reduce competition conflicts between nodes, improve the utilization rate of channel resources, and maximize the throughput of node transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0062] Figure 1 is a topology diagram of a wireless body area network in an embodiment of the present invention;
[0063] Figure 2 is a superframe structure diagram of communication between a node and a coordinator in an embodiment of the present invention;
[0064] Figure 3 It is a flow chart of a method for allocating resources of a wireless body area network based on a hybrid access mechanism in an embodiment of the present invention;
[0065] Figure 4 is a result diagram of a node determining the new and old types of sent data in an embodiment of the present invention;
[0066] Figure 5 is a flow chart of a method for a node to select a backoff value to compete for a channel in an embodiment of the present invention;
[0067] Figure 6 It is a diagram of an allocation scheme for nodes to send data in a non-competition phase in an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0069] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0070] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0071] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0072] This embodiment provides a method for allocating resources in a wireless body area network based on a hybrid access mechanism, comprising the following steps:
[0073] S101. Divide node priorities and node types according to data features.
[0074] The step S101 specifically includes the following steps:
[0075] S1011. Calculate the node priority according to the timeout rate, sampling rate deviation, and vital sign deviation of each node. The priority calculation formula of node i is:
[0076]
[0077] in, is the percentage of packets in the node cache queue that will time out for the next frame, is the deviation between the current sampling rate and the maximum and minimum sampling rates, is the deviation between the current vital signs and the maximum and minimum vital signs, and ω1+ω2+ω3=1;
[0078] S1012. Then, the nodes are divided into emergency nodes and common nodes according to the priority: nodes with a priority greater than or equal to 0.75 are divided into emergency nodes, and nodes with a priority less than 0.75 are divided into common nodes.
[0079] S102: Determine the new and old types of the sent data according to the data cache change.
[0080] The step S102 specifically includes the following steps:
[0081] S1021, determine whether the node fails to successfully send all data in two consecutive frames. If not, the node starts sending old data from the head of the cache queue; if so, execute the next step:
[0082] S1022: Compute the accumulation state A of the data packets in the cache queue of node i i , the calculation formula is:
[0083]
[0084] Among them, a is the number of superframes that the data packet has passed from the time it was generated to the present. is the number of packets with age a in the cache queue of node i, is the number of all packets in the cache queue of node i, t life is the lifetime of the data packet;
[0085] S1023. Compare the accumulation degree of the node's current frame with the accumulation degree of the previous frame. If the accumulation degree becomes better, the node starts sending old data from the head of the cache queue; if the accumulation degree becomes worse, the node starts sending new data from the tail of the cache queue.
[0086] S103: Perform backoff to avoid differentiated channel contention according to node priority.
[0087] The step S103 specifically includes the following steps:
[0088] S1031. Calculate the initial fixed backoff value of node competition according to the node priority, and the calculation formula is:
[0089]
[0090] S1032. If a conflict occurs when a node backs off, the number of conflicts k is increased by one, and a backoff value is randomly selected again, and the selection range is: in The maximum value of k is three. If k is greater than three, the channel competition fails;
[0091] S1033, if no conflict occurs after the node backoff ends, perform two channel idle detections, if both detections are idle, the channel competition is successful; if not, the channel conflict occurs at this time, and execute step S1032;
[0092] S1034. After the emergency node successfully competes for the channel, it sends all data information; after the ordinary node successfully competes for the channel, it only sends node information for the coordinator to allocate non-competitive time slots, including: priority, reliability factor, amount of data to be sent in the current frame, and queue data sending direction, etc.
[0093] S104: Adaptively divide the superframe contention phase according to the channel status.
[0094] The step S104 specifically includes the following steps:
[0095] S1041, the emergency node competes for the channel and sends data in the early stage of the contention phase;
[0096] S1042, the ordinary node detects whether the channel is idle. If it detects that the channel is idle for four consecutive CSMA time slots, it is determined that the emergency node has completed data transmission, and the channel is divided into a contention stage for ordinary nodes;
[0097] S1043, if it is detected that the channel is occupied by an emergency node, wait until the data is sent and restart the detection of the CSMA time slot, that is, execute step S1042;
[0098] S1044: If it is detected that the channel has a first contention conflict, execute step S1042;
[0099] S1045, if it is detected that the second contention conflict occurs in the channel, it is necessary to detect that the channel is idle for eight consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into a contention stage for ordinary nodes;
[0100] S1046: If the third or more contention conflicts are detected on the channel, it is necessary to detect that the channel is idle for sixteen consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into the contention stage for ordinary nodes.
[0101] S105. Determine the number of node time slots in the non-contention phase according to the node transmission utility.
[0102] The step S105 specifically includes the following steps:
[0103] S1051. Calculate the number of time slots required for each node i according to the amount of data that needs to be sent in the current frame and use it as the initial allocation time slot number N. i ′, the calculation formula is:
[0104]
[0105] in, is the total traffic that node i needs to send, M slot is the maximum traffic that can be sent in a time slot, N i ′ is the number of time slots allocated to node i;
[0106] S1052, judging whether the number of allocatable time slots of the coordinator can satisfy the sum of the number of time slots required by all nodes; if so, the time slot number allocation scheme is the best allocation scheme;
[0107] S1053. If the requirement cannot be met, the difference ΔN between the number of allocable time slots and the required number of time slots is calculated, and the quotient and remainder of the difference ΔN and the number of nodes n are calculated. The calculation formula is:
[0108]
[0109] β=ΔN-α×n
[0110] S1054, then reduce the number of initially allocated time slots of all nodes by α time slots;
[0111] S1055, calculate the transmission utility of the nodes at this time, select β nodes with the smallest utility, and reduce their time slots by one. The time slot allocation scheme at this time is the final suboptimal time slot allocation scheme;
[0112] As an optional implementation, in step S1055, the transmission utility U of node i is composed of three factors: node priority P i , node reliability factor R i and node traffic factor Γ i ;
[0113] The reliability factor is composed of the ratio of the number of data packets successfully sent by the node to the number of times the data packets are sent, and the calculation formula is:
[0114]
[0115] Where j is the number of times the data packet is transmitted, c is the maximum number of times the data packet is retransmitted, is the number of data packets successfully sent by node i, is the number of packets successfully sent by node i after retransmission j times, is the number of data packets that failed to be retransmitted;
[0116] The traffic factor is divided into two cases: (1) the number of time slots N allocated to the node i Satisfy the required number of time slots N i′: Γ is defined as the ratio of the traffic sent by the node in the last time slot to the maximum traffic that can be sent in the entire time slot; (2) the number of time slots allocated to the node N i Does not meet the required number of time slots N i ′:Γ is defined as the ratio of the traffic sent by the node to the total traffic it needs to send in the allocated time slot, and the calculation formula is:
[0117]
[0118] The node transmission utility U is calculated using the node priority, reliability factor and traffic factor i :
[0119] U i =P i ×R i ×Γ i
[0120] Node transmission utility U i It represents the weighted value of the node in terms of priority, reliability, and traffic volume. i The larger the value is, the greater the transmission utility of the node is in the currently allocated time slot, that is, the node has the best weighted effect in terms of priority, reliability, and traffic volume.
[0121] S106. Determine the node transmission order in the non-competition phase according to the node transmission priority.
[0122] The step S106 specifically includes the following steps:
[0123] S1061. Calculate the transmission priority of each node according to the node priority and age status;
[0124] S1062. Then sort them from large to small to obtain the node transmission order.
[0125] As an optional implementation, in step S1061, the node transmission priority S is calculated using the node transmission priority formula. i :
[0126] S i =P i ×A i
[0127] Among them, i is the node number, P i is the node priority; A i is the age state of the node to send a packet.
[0128] Node transmission priority S i Represents the weighted value of the node in terms of priority and age status, S iThe maximum indicates that the node's transmission priority is the most urgent in the currently allocated time slot, that is, the weighted effect of the node in terms of priority and age status is the most severe.
[0129] The above method is explained in detail below with reference to specific embodiments and drawings.
[0130] This embodiment discloses a method for allocating resources in a wireless body area network based on a hybrid access mechanism, wherein the wireless body area network is composed of a number of sensor nodes and a coordinator, which can be seen in Figure 1 The communication between the coordinator and the sensor nodes is based on a superframe as a time unit. The superframe consists of beacon 1 (B1), emergency node competition part (EAP), ordinary node competition part (RAP), beacon 2 (B2), non-competitive part (CFP) and inactive period (Inactive). Emergency nodes transmit data in the emergency node competition part, and ordinary nodes send node information in the ordinary node competition part and transmit data in the non-competitive part. The structure diagram of the superframe can be found in Figure 2 ; The coordinator can use this method to allocate channel resources to sensor nodes and communicate, such as Figure 3 As shown, the method comprises the following steps:
[0131] S1. Divide node priority P according to data characteristics i and node type, i is the node number:
[0132] S1.1. Calculate the node priority P based on the node's timeout rate, sampling rate deviation, and vital sign deviation i , the calculation formula is like Figure 1 As shown, the node set is S = {S1, S2, S3, S4, S5, S6, S7, S8}, and it is assumed that the priority set calculated by the node is P = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}.
[0133] S1.2, then divide the nodes into emergency nodes and ordinary nodes according to the priority. The priority of S7 and S8 nodes is greater than 0.75, so S7 and S8 are emergency nodes, and other nodes are ordinary nodes. The types of nodes are shown in Table 1.
[0134] Table 1
[0135]
[0136] S2. Determine the new and old types of the sent data according to the data cache changes. The result of the new and old types of the sent data is shown in the figure below. Figure 4 As shown:
[0137] S2.1, assuming that only S4 and S6 among the common nodes fail to successfully send all data for two consecutive frames, then the other nodes start sending old data from the head of the cache queue;
[0138] S2.2, calculate the accumulation level of data packets in the node cache queue. Assume that the accumulation level of S4 is The accumulation degree of S6 is
[0139] S2.3, compare the accumulation degree of the current frame of S4 and S6 with the accumulation degree of the previous frame. Assume that the accumulation degree of the previous frame of S4 is The accumulation level of this frame is better than that of the previous frame, so S4 starts sending old data from the head of the cache queue; assuming that the accumulation level of the previous frame of S6 is The accumulation level of this frame is lower than that of the previous frame, so S6 starts sending new data from the end of the buffer queue.
[0140] S3. Perform backoff based on node priority to avoid differentiated channel contention. The flowchart of the method is as follows: Figure 5 As shown:
[0141] S3.1. Calculate the initial fixed backoff value of node competition. The results are shown in Table 2.
[0142] Table 2
[0143]
[0144]
[0145] S3.2. The initial fixed backoff values selected by the eight nodes will not conflict with each other, so the nodes will compete for the channel in order from small to large backoff values. After successfully competing for the channel, step S3.4 will be executed.
[0146] S3.4. After the emergency nodes S7 and S8 successfully compete for the channel, they send all data information; after the ordinary nodes {S1, S2, S3, S4, S5, S6} successfully compete for the channel, they only send node information for the coordinator to allocate non-competitive time slots, including: priority, reliability factor, amount of data to be sent in the current frame, and queue data sending direction, etc.
[0147] S4, adaptively divide the superframe competition phase according to the channel status:
[0148] S4.1, emergency nodes S7 and S8 respectively retreat three CSMA time slots and one CSMA time slot to compete for the channel. S8 first competes for the channel and sends data; after S7 waits for S8 to complete the transmission, it retreats two CSMA time slots and sends data.
[0149] S4.2. The ordinary node detects whether the channel is idle. If it detects that the channel is idle for four consecutive CSMA time slots, it is determined that the emergency node has completed data transmission, and the channel is divided into the competition stage for ordinary nodes.
[0150] S4.3, when the common node detects the second CSMA time slot, it finds that the channel is occupied by S8, then waits for S8 to send data, and restarts the channel detection, that is, executes step S4.2. After detecting two more CSMA time slots, the channel is occupied by S7, then waits for S7 to send data, and restarts the channel detection, that is, executes step S4.2. Until it detects that the channel is idle for four consecutive CSMA time slots, the channel is divided into the contention stage of common nodes.
[0151] S5. Determine the number of node time slots in the non-competition phase according to the node transmission utility:
[0152] S5.1. Calculate the number of initial allocated time slots N for each node i based on the amount of data that the ordinary node needs to send in this frame. i ′. Assume that the maximum traffic that can be sent in a time slot is M slot is 10. At this time, the amount of data that the ordinary node needs to send and the number of initially allocated time slots are shown in Table 3.
[0153] Table 3
[0154] node <![CDATA[S1]]> <![CDATA[S2]]> <![CDATA[S3]]> <![CDATA[S4]]> <![CDATA[S5]]> <![CDATA[S6]]> Data volume 50 45 40 35 30 25 Initially allocated time slots 5 5 4 4 3 3
[0155] S5.2. Assuming that the number of time slots that can be allocated by the coordinator is 20, the sum of the number of time slots required by all nodes is 24. The number of time slots that can be allocated by the coordinator cannot meet the sum of the number of time slots required by all nodes, and step S5.3 is executed.
[0156] S5.3. Calculate the difference ΔN between the number of allocatable time slots and the number of required time slots as 4, and calculate the quotient and remainder of the time slot number difference ΔN and the number of nodes n:
[0157]
[0158] β=ΔN-α×n=4,
[0159] At this time, α is 0, and the process goes directly to step S5.5.
[0160] S5.5. Calculate the transmission utility of the nodes at this time and select the four nodes with the smallest utility. Assuming that the reliability factors of the nodes are the same, the transmission utility of the six nodes is U = {0.2, 0.15, 0.4, 0.25, 0.6, 0.35}, and the four nodes with the smallest utility are {S1, S2, S4, S6}. Reduce the initial allocation of time slots of these four nodes by one. The time slot allocation scheme at this time is the final suboptimal time slot allocation scheme. The allocation results are shown in Table 4. The allocation scheme for sending data is shown in Figure 6 shown.
[0161] Table 4
[0162] node <![CDATA[S1]]> <![CDATA[S2]]> <![CDATA[S3]]> <![CDATA[S4]]> <![CDATA[S5]]> <![CDATA[S6]]> Initially allocated time slots 5 5 4 4 3 3 Final number of allocated time slots 4 5 4 3 3 2
[0163] S6. Determine the node transmission order in the non-competition phase according to the node transmission priority:
[0164] S6.1. Calculate the transmission priority of each node. Assume that the lifespan of a data packet is five superframes, and the data packets to be sent by the six nodes are all newly generated data in this frame, that is, the age status is 0.2. The transmission priority of the node is S = {0.04, 0.06, 0.08, 0.1, 0.12, 0.14}.
[0165] S6.2. Then sort them from large to small to obtain the node transmission order {S1, S2, S3, S4, S4, S6}.
[0166] In summary, the method of this embodiment has the following advantages and beneficial effects compared with the prior art:
[0167] (1) The method of the present invention determines the new and old types of the transmitted data according to the degree of accumulation of data in the node cache queue, thereby improving the real-time and effectiveness of data transmission. The existing method follows the first-in-first-out principle of the queue when sending data. If the node fails to complete the transmission of all data for a long time, it will cause the accumulation of old data and the continuous transmission of old data. If incomplete data transmission occurs for two consecutive frames, the method of the present invention will determine whether to send only new data and discard all old data by judging the changes in the data cache, thereby improving the real-time and effectiveness of data transmission.
[0168] (2) The present invention adaptively divides the contention phase by detecting the channel status based on ordinary data, and reasonably allocates the length of the contention phase. Most existing methods use a fixed length to divide the contention phase between emergency nodes and ordinary nodes. This fixed length contention phase cannot adapt to the changing needs of emergency nodes. If the contention phase of the emergency node is too long, it will cause channel waste, and if it is too short, it will cause the emergency data to be incompletely sent. The present invention detects the channel through ordinary nodes, determines whether the emergency node has completed all data transmission, and thus reasonably allocates the length of the contention phase of the superframe, greatly improving the utilization rate of the channel.
[0169] (3) The method of the present invention allocates time slots to nodes according to their transmission utility and allocates transmission order to nodes according to their transmission priority, which can reduce time complexity and computational complexity as much as possible. According to the different business volume requirements of each node, the limited number of time slots can be allocated to nodes with higher utilization; at the same time, the transmission order is allocated according to the age status of the data, so that nodes with greater latency can complete data transmission earlier, achieving high throughput and low latency.
[0170] This embodiment also provides a wireless body area network resource allocation device based on a hybrid access mechanism, including:
[0171] at least one processor;
[0172] at least one memory for storing at least one program;
[0173] When the at least one program is executed by the at least one processor, the at least one processor implements Figure 3 The method shown.
[0174] A wireless body area network resource allocation device based on a hybrid access mechanism in this embodiment can execute a wireless body area network resource allocation method based on a hybrid access mechanism provided by the method embodiment of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.
[0175] The present application also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 3 The method shown.
[0176] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0177] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0179] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0180] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0181] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0182] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0183] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0184] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for allocating resources in a wireless body area network based on a hybrid access mechanism, characterized in that: The following steps are involved: Divide the priority of nodes according to data characteristics, and divide the types of nodes according to the priority; the types of nodes include emergency nodes and ordinary nodes; Determine whether to send new data or old data based on changes in the data cache; Perform backoff differentiated channel contention based on node priority; Adaptively divide the superframe contention phase according to the channel status; Determine the number of node time slots in the non-contention phase according to the node transmission utility; Determine the node transmission order in the non-competition phase according to the node transmission priority; The data features include the timeout rate, sampling rate deviation and vital sign deviation of the node; The priority of nodes is divided according to data characteristics, and the type of nodes is divided according to the priority, including: Calculate the priority P of each node based on the timeout rate, sampling rate deviation and vital sign deviation i ; According to the priority P i and the preset threshold value to divide the nodes into emergency nodes and ordinary nodes; Among them, the priority P i The calculation formula is as follows: In the formula, is the percentage of packets in the node cache queue that will time out for the next frame, is the deviation between the current sampling rate and the maximum and minimum sampling rates, is the deviation between the current vital signs and the maximum and minimum vital signs, and ω1+ω2+ω3=1; The determining of sending new data or old data according to the change of the data cache includes: A1, determine whether the node fails to successfully send all data in two consecutive frames. If not, the node starts sending old data from the head of the cache queue; if so, go to step A2; A2. The accumulation level of data packets in the computing node cache queue A i ; A3. Compare the accumulation degree of the node's current frame with the accumulation degree of the previous frame. If the accumulation degree becomes better, the node starts sending old data from the head of the cache queue; if the accumulation degree becomes worse, the node starts sending new data from the tail of the cache queue; The stacking degree A i The calculation formula is as follows: Among them, a is the number of superframes that the data packet has passed from the time it was generated to the present. is the number of packets with age a in the cache queue of node i, is the number of all packets in the cache queue of node i, t life is the lifetime of the data packet; The step of performing backoff differentiated channel contention according to the priority of the node includes: B1. Calculate the initial fixed backoff value of node competition according to the node priority. The calculation formula is: B2. If a conflict occurs when a node backs off, the number of conflicts k is increased once, and a new backoff value is randomly selected within the range of: in The maximum value of k is three. If k is greater than three, the channel competition fails; B3. If no conflict occurs after the node backs off, two channel idle detections are performed. If both detections are idle, the channel competition is successful. Otherwise, it is determined that the channel conflicts at this time, and the execution returns to step B2. B4. After the emergency node successfully competes for the channel, it sends all data information; after the ordinary node successfully competes for the channel, it only sends node information for the coordinator to allocate non-competition time slots; The step of adaptively dividing the superframe contention phase according to the channel state comprises: C1, the emergency node competes for channels and sends data in the early stage of the contention phase; C2, the ordinary node detects whether the channel is idle. If it detects that the channel is idle for four consecutive CSMA time slots, it is determined that the emergency node has completed data transmission, and the channel is divided into the competition stage of ordinary nodes; C3. If it is detected that the channel is occupied by an emergency node, wait until the data is sent and return to step C2; C4. If the first contention conflict is detected in the channel, return to step C2; C5: If the second contention conflict is detected in the channel, it is necessary to detect that the channel is idle for eight consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into the contention stage of ordinary nodes; C6: If the third or more contention conflicts are detected on the channel, it is necessary to detect that the channel is idle for sixteen consecutive CSMA time slots to determine that the emergency node has completed data transmission, and the channel is divided into the contention stage of ordinary nodes; The step of determining the number of node time slots in the non-contention phase according to the node transmission utility includes: According to the amount of data that the node needs to send in the current frame, the number of time slots required for each node i is calculated and used as the initial allocation time slot number N i ′, the calculation formula is: in, is the total traffic that node i needs to send, M slot is the maximum traffic that can be sent in a time slot, N i ′ is the number of time slots allocated to node i; Determine whether the number of time slots that can be allocated by the coordinator can meet the sum of the number of time slots required by all nodes; if so, this time slot allocation scheme is the best allocation scheme; If it cannot be satisfied, the difference ΔN between the number of allocable time slots and the required number of time slots is calculated, and the quotient α and remainder β of the difference ΔN and the number of nodes n are calculated. The calculation formula is: β=ΔN-α×n Reduce the number of initially allocated time slots of all nodes by α time slots; Calculate the transmission utility of the node at this time, select β nodes with the smallest transmission utility, and reduce the number of time slots of the selected nodes by one. The time slot allocation scheme at this time is the final suboptimal time slot allocation scheme; the transmission utility U of node i is composed of three factors: node priority P i , node reliability factor R i and node traffic factor Γ i Among them, reliability The factor is composed of the ratio of the number of packets successfully sent by the node to the number of times the packet is sent, and the calculation formula is: Where j is the number of times the data packet is transmitted, c is the maximum number of times the data packet is retransmitted, is the number of data packets successfully sent by node i, is the number of packets successfully sent by node i after retransmission j times, is the number of data packets that failed to be retransmitted; the traffic factor is divided into two cases: (1) the number of time slots N allocated to the node i Satisfy the required number of time slots N i ′: Γ is defined as the ratio of the traffic sent by the node in the last time slot to the maximum traffic that can be sent in the entire time slot; (2) the number of time slots allocated to the node N i Does not meet the required number of time slots N i ′:Γ is defined as the ratio of the traffic sent by the node to the total traffic it needs to send in the allocated time slot, and the calculation formula is: The calculation formula of the transmission utility U is as follows: U=P×R×Γ Where P is the node priority; R is the node reliability factor; Γ is the node traffic factor; The step of determining the node transmission order in the non-competition phase according to the node transmission priority includes: Calculate the transmission priority of each node based on the node's priority and age status; Get the transmission order of nodes according to the transmission priority; The calculation formula for transmission priority is as follows: S=P×A Among them, P is the priority of the node; A is the age state of the node to send the data packet.
2. A wireless body area network resource allocation device based on a hybrid access mechanism, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method of claim 1.
Citation Information
Cited By
Load-aware adaptive multiple access method in sensor network
CN116017561A
An Adaptive Multiple Access Method with Load Awareness in Sensor Networks
CN116017561B
