Data transmission method and device based on hybrid MAC protocol
By grouping nodes according to their priorities and setting cluster heads in wireless communication, and using a combination of CSMA/CA and TDMA protocols, the problems of resource waste and insignificant throughput improvement in the existing technology are solved, and efficient data transmission and stability are achieved. sexual enhancement.
Patent Information
- Application Number
- CN202211202663.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-09-29
AI Technical Summary
The existing CSMA/CA and TDMA hybrid protocols frequently use the TDMA protocol when there are many nodes, resulting in waste of resources and insignificant improvement in throughput, and cannot effectively avoid collisions between nodes.
By grouping nodes according to priority, nodes within the group compete for transmission through the CSMA/CA protocol, and transmission between groups is through the TDMA protocol. Cluster heads are set on the node set to negotiate slot length and priority to reduce conflicts and empty spaces. time slots to improve time slot utilization.
It effectively improves channel resource utilization and data transmission stability, avoids the limitations of existing technologies, reduces the probability of collisions between nodes, and improves throughput and transmission performance.
Smart Images

Figure CN115529675B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a data transmission method, apparatus, computer equipment and storage medium based on a hybrid MAC protocol. Background Art
[0002] A wireless ad hoc network is a temporary multi-hop autonomous system composed of a group of mobile nodes with wireless transceivers. It can self-organize nodes to communicate in a point-to-point manner and has routing functions. The existence of nodes makes the network topology change dynamically and communicates through multi-hop routing. However, there are still many problems in reality. For example, in the process of communication, a channel can only be occupied by one node at the same time. But sometimes many nodes need to communicate at the same time, so the concept of multiple access is added to the channel. Each node has its own unique address, so that multiple nodes can use a channel to transmit data at the same time. This is multi-access transmission. Because the quality of the multi-access transmission protocol determines the throughput and delay of channel transmission, the multi-access transmission protocol has become the key point of channel transmission. At present, the types of multi-access access include non-competitive (scheduling) protocols, competitive protocols, and hybrid protocols. Among them, the non-competitive protocol is to stagger the transmission time of different nodes in an orderly manner through artificial scheduling, so as to avoid multiple nodes accessing the same channel at the same time and ensure that data can be transmitted in an orderly manner. Non-competitive protocols are divided into fixed allocation and on-demand allocation. Common fixed allocation methods include TDMA (time division multiplexing) and FDMA (frequency division multiplexing). A competitive protocol means that when multiple nodes need to use a channel at the same time, a fair competition is conducted to determine which node can use the channel in that time period. Other nodes will use the same method to compete fairly again in the next time period to determine the right to use the channel. Common competitive protocols include ALOHA protocol, slotted ALOHA protocol, CSMA protocol, etc. Hybrid protocols are a combination of competitive and scheduling protocols, which can combine the advantages of both types. For example, the classic CSMA / TDMA hybrid can reasonably use different types of protocols according to the number of nodes that need to transmit data in the same time period. When there are more nodes, the TDMA method is used to reduce the number of collisions and improve the efficiency of data transmission; when there are fewer nodes, the CSMA method is used to make more full use of time slots to achieve the effect of increasing throughput.
[0003] However, in the existing technology, there is a hybrid protocol, that is, according to the degree of congestion of data transmission, the system can select two working modes, CSMA and TDMA. First, the system transmits through the CSMA working mode. While transmitting data, the system will count the degree of congestion. When the degree of congestion reaches a certain threshold, the TDMA working mode is used for transmission. After a period of transmission, when the degree of congestion is less than another threshold, the CSMA working mode is restarted for transmission. In the existing technology, the CSMA / CA and TDMA hybrid protocol transmits data through the CSMA / CA mode most of the time. Only when the number of nodes is large in the same period of time will the TDMA mode be used for transmission. When the number of data nodes that need to be transmitted is reduced to a certain threshold, the CSMA / CA mode will be used for data transmission. This method has certain limitations, that is, although it can effectively improve the throughput when the number of nodes is small, when the number of nodes is large, the TDMA protocol will be frequently used, resulting in excessive resource occupation and waste of resources, and the throughput improvement effect is not obvious enough. Summary of the invention
[0004] Based on this, it is necessary to provide a data transmission method, device, computer equipment and storage medium based on a hybrid MAC protocol that can improve channel resource utilization and the stability and accuracy of data transmission in order to address the above technical problems.
[0005] A data transmission method based on a hybrid MAC protocol, the method comprising:
[0006] Get multiple nodes with data to be transmitted;
[0007] Nodes are grouped according to the priority of nodes to be transmitted to obtain multiple node sets; data is transmitted between the node sets through the TDMA protocol;
[0008] The pre-set conflict threshold is used to judge the number of conflicts among nodes in the node set during data transmission, and the communication time of the node set is calculated according to the judgment result. The time slice of appropriate length is allocated according to the communication time required by the node set.
[0009] A cluster head is set on each node set, and the time slot length and priority of the node are set according to the cluster head. The time slot length and priority of the node are used to compete for data transmission through the CSMA / CA protocol within the time slice.
[0010] In one embodiment, a preset conflict threshold is used to determine the number of conflicts between nodes in a node set during data transmission, and a communication time of the node set is calculated according to the determination result, including:
[0011] The number of conflicts among nodes in the node set during data transmission is judged by using the preset conflict threshold. When the number of conflicts reaches the set conflict threshold within a period of time, multi-layer clustering is started to obtain multiple node subsets. Data is transmitted between the node subsets through the TDMA protocol.
[0012] If the number of conflicts does not reach the conflict threshold, the communication time of the node set is calculated.
[0013] In one embodiment, multi-layer clustering means that the nodes in the cluster are automatically divided into several small groups again, and each small group generates a cluster head to manage the transmission status of the nodes in the small group.
[0014] In one embodiment, setting the time slot length and priority of the node according to the cluster head includes:
[0015] The cluster head allocates time slots of corresponding sizes to each node in the group according to the time required for each node to transmit data, and allocates the required time slot length on demand, and arranges the nodes that need to transmit data according to priority, and negotiates nodes of different levels of priority to compete within the set time slots.
[0016] In one of the embodiments, a cluster head replacement is set on each node set. The cluster head replacement can select a time slot of appropriate length according to its own size. When the cluster head cannot work normally, the cluster head replacement will replace the cluster head to allocate time slots for nodes in the group.
[0017] A data transmission device based on a hybrid MAC protocol, the device comprising:
[0018] The node aggregation module is used to obtain multiple nodes to be transmitted data; group the nodes according to the priority of the nodes to be transmitted data to obtain multiple node sets; and transmit data between the node sets through the TDMA protocol;
[0019] A time slice allocation module is used to judge the number of conflicts among nodes in a node set during data transmission using a preset conflict threshold, calculate the communication time of the node set according to the judgment result, and allocate a time slice of appropriate length according to the communication time required by the node set;
[0020] The data transmission module is used to set the cluster head on each node set, set the time slot length and priority of the node according to the cluster head, and use the time slot length and priority of the node to compete for data transmission in the time slice through the CSMA / CA protocol.
[0021] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] Get multiple nodes with data to be transmitted;
[0023] Nodes are grouped according to the priority of nodes to be transmitted to obtain multiple node sets; data is transmitted between the node sets through the TDMA protocol;
[0024] The pre-set conflict threshold is used to judge the number of conflicts among nodes in the node set during data transmission, and the communication time of the node set is calculated according to the judgment result. The time slice of appropriate length is allocated according to the communication time required by the node set.
[0025] A cluster head is set on each node set, and the time slot length and priority of the node are set according to the cluster head. The time slot length and priority of the node are used to compete for data transmission through the CSMA / CA protocol within the time slice.
[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0027] Get multiple nodes with data to be transmitted;
[0028] Nodes are grouped according to the priority of nodes to be transmitted to obtain multiple node sets; data is transmitted between the node sets through the TDMA protocol;
[0029] The pre-set conflict threshold is used to judge the number of conflicts among nodes in the node set during data transmission, and the communication time of the node set is calculated according to the judgment result. The time slice of appropriate length is allocated according to the communication time required by the node set.
[0030] A cluster head is set on each node set, and the time slot length and priority of the node are set according to the cluster head. The time slot length and priority of the node are used to compete for data transmission through the CSMA / CA protocol within the time slice.
[0031] The above-mentioned data transmission method, device, computer equipment and storage medium based on the hybrid MAC protocol, the present application arranges and groups nodes by priority, the nodes in the group compete for data transmission by CSMA / CA, and the groups transmit data by TDMA, which not only effectively improves the utilization rate of time slots and avoids the waste of channel resources, but also avoids the limitations of the existing CSMA / CA and TDMA hybrid protocol, that is, there is no need to worry about the probability of collision between nodes when there are many nodes, and can well solve the problems that cannot be solved by the existing technology, and by setting a cluster head on the node set, the cluster head can supervise the data volume of each group of nodes and negotiate to allocate a suitable time slot length to each group, greatly reducing the probability of empty time slots, improving the utilization rate of time slots, and increasing throughput. At the same time, the cluster head can manage itself, and each cluster head allocates the required time slot length on demand, further improving the utilization rate of time slots and throughput. The cluster head can also manage the node priority sequence in the cluster, arrange the nodes from high to low according to priority and classify them, set nodes of different levels to compete only at the set time, give priority to the transmission of data of nodes with high levels, and reduce the probability of collision, thereby greatly improving the transmission performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a flow chart of a data transmission method based on a hybrid MAC protocol in an embodiment;
[0033] Figure 2 is a schematic diagram of a node grouping model in one embodiment;
[0034] Figure 3 A schematic diagram of a MAC protocol based on a mixture of TDMA and CSMA in one embodiment;
[0035] Figure 4 A schematic diagram of related information within a cluster head control group in one embodiment;
[0036] Figure 5 A schematic diagram of a cluster head arranging priorities of nodes within a group in one embodiment;
[0037] Figure 6 A schematic diagram of a working method of replacing a cluster head with an abnormal cluster head in one embodiment;
[0038] Figure 7 A schematic diagram of a group cluster head controlling nodes within a cluster in one embodiment;
[0039] Figure 8 A schematic diagram of a conflict node distribution algorithm in one embodiment;
[0040] Fig. 9is a structural block diagram of a data transmission device based on a hybrid MAC protocol in one embodiment;
[0041] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] In one embodiment, Figure 1 As shown, a data transmission method based on a hybrid MAC protocol is provided, comprising the following steps:
[0044] Step 102, obtaining a plurality of nodes to be transmitted data; grouping the nodes according to the priorities of the nodes to be transmitted data to obtain a plurality of node sets; and performing data transmission between the node sets through the TDMA protocol.
[0045] like Figure 2 As shown in the figure, when multiple nodes need to transmit data at the same time, nodes with similar priorities are first grouped, and the nodes in each group are regarded as a whole. Each whole is transmitted to the receiving point through the TDMA protocol. Data is transmitted between node sets through the TDMA protocol, which reduces the probability of collision between nodes when there are many nodes.
[0046] Step 104, using a preset conflict threshold to determine the number of conflicts among nodes in the node set during data transmission, calculating the communication time of the node set based on the determination result, and allocating a time slice of appropriate length corresponding to the communication time required by the node set.
[0047] The pre-set conflict threshold is used to judge the number of conflicts among nodes in the node set during data transmission. When the number of conflicts reaches the set conflict threshold within a period of time, multi-layer clustering is started to obtain multiple node subsets. If the number of conflicts does not reach the conflict threshold, the communication time of the node set is calculated.
[0048] The nodes in the node set compete for data transmission through CSMA / CA, and the node sets transmit data through TDMA. This not only effectively improves the utilization of time slots and avoids the waste of channel resources, but also avoids the limitations of the existing CSMA / CA and TDMA hybrid protocol, and enables as many high-priority nodes as possible to transmit data first in a reliable manner. Secondly, when the number of nodes is large, the time slots can be fully utilized and the collisions between nodes can be reduced, thereby improving throughput and reducing latency. That is, when there are many nodes, there is no need to worry about the probability of collisions between nodes, which can well solve the problems that cannot be solved by existing technologies.
[0049] Step 106, a cluster head is set on each node set, the time slot length and priority of the node are set according to the cluster head, and the time slot length and priority of the node are used to compete for data transmission in the time slice through the CSMA / CA protocol.
[0050] A cluster head is set on the node set. The cluster head can supervise the data volume of each group of nodes and negotiate to allocate a suitable time slot length to each group, which greatly reduces the probability of empty time slots, improves time slot utilization, and increases throughput. At the same time, the cluster head can manage itself. Each cluster head allocates the time slot length it needs on demand, further improving time slot utilization and throughput. The cluster head can also manage the node priority sequence within the cluster, arranging the nodes from high to low priority and dividing them into levels, setting nodes of different levels to compete only at the set time, giving priority to transmitting data from nodes with high levels, and reducing the probability of collisions, greatly improving transmission performance.
[0051] like Figure 4 As shown in the figure, using cluster heads to negotiate time slots can not only detect the size of the data sent by each node in the group to allocate time slots of corresponding size to each node, but also manage the time slots required by the cluster head itself, and allocate appropriate time slot lengths by detecting its own size. Compared with the traditional random allocation of time slots or artificial pre-allocation of time slots, it greatly improves the system's adaptability and time slot utilization. Figure 5 As shown in the figure, the cluster head prioritizes the nodes in the group and divides them by level. For example, if group 1 is set as the highest-level group, the 6 highest-level nodes in the large group will be divided into group 1. Group 2 is the second-priority group. Except for group 1, the remaining 6 highest-level nodes will be divided into group 2. According to this rule, the nodes are divided into corresponding groups in turn. It is stipulated that nodes of different levels compete in the corresponding time slots in the group. This not only reduces the degree of competition between nodes during data transmission, improves the success rate of data transmission and the utilization rate of time slots, but also ensures that nodes with higher priority can give priority to data transmission, improving the usability of the system.
[0052] In the above-mentioned data transmission method based on the hybrid MAC protocol, the present application arranges and groups the nodes by priority, and the nodes in the group compete for data transmission by CSMA / CA, and the groups transmit data by TDMA, which not only effectively improves the utilization rate of the time slot and avoids the waste of channel resources, but also avoids the limitations of the existing CSMA / CA and TDMA hybrid protocol, that is, when there are many nodes, there is no need to worry about the probability of collision between nodes, which can well solve the problems that cannot be solved by the existing technology, and by setting the cluster head on the node set, the cluster head can supervise the data volume of each group of nodes, and negotiate to allocate a suitable time slot length to each group, greatly reducing the probability of empty time slots, improving the utilization rate of time slots, and increasing throughput. At the same time, the cluster head can manage itself, and each cluster head allocates the required time slot length on demand, further improving the utilization rate of time slots and throughput. The cluster head can also manage the node priority sequence in the cluster, arrange the nodes from high to low according to priority and classify them, set nodes of different levels to compete only at the set time, and give priority to the transmission of data of nodes with high levels, while reducing the probability of collision, greatly improving the transmission performance.
[0053] In one embodiment, a preset conflict threshold is used to determine the number of conflicts between nodes in a node set during data transmission, and a communication time of the node set is calculated according to the determination result, including:
[0054] The number of conflicts among nodes in the node set during data transmission is judged by using the preset conflict threshold. When the number of conflicts reaches the set conflict threshold within a period of time, multi-layer clustering is started to obtain multiple node subsets. Data is transmitted between the node subsets through the TDMA protocol.
[0055] If the number of conflicts does not reach the conflict threshold, the communication time of the node set is calculated.
[0056] In one embodiment, multi-layer clustering means that the nodes in the cluster are automatically divided into several small groups again, and each small group generates a cluster head to manage the transmission status of the nodes in the small group.
[0057] In a specific embodiment, Figure 7As shown in the figure, when multiple nodes transmit simultaneously, when there are too many nodes that need to transmit in the same time period and the number of conflicts reaches the pre-set threshold, multi-layer clustering will be started, and the cluster head will automatically divide the nodes in the cluster into several small groups again, and each small group will generate a cluster head to manage the node transmission of the small group. The cluster head of the large group can control and coordinate the status of each small group. The system can adaptively select the corresponding mode for data transmission according to the actual number of nodes. This multi-level clustering method can reduce the scenario of mutual collision when there are too many nodes in the group, and each small group after clustering will also have a separate cluster head to assist in completing the time slot allocation of the group, which enhances the system transmission performance and optimizes the stability of the system transmission. Grouping again when the group has already been grouped can further reduce the probability of collision by reducing the number of competitions and improve the success rate of data transmission.
[0058] In one embodiment, setting the time slot length and priority of the node according to the cluster head includes:
[0059] The cluster head allocates time slots of corresponding sizes to each node in the group according to the time required for each node to transmit data, and allocates the required time slot length on demand, and arranges the nodes that need to transmit data according to priority, and negotiates nodes of different levels of priority to compete within the set time slots.
[0060] In one of the embodiments, a cluster head replacement is set on each node set. The cluster head replacement can select a time slot of appropriate length according to its own size. When the cluster head cannot work normally, the cluster head replacement will replace the cluster head to allocate time slots for nodes in the group.
[0061] like Figure 6 As shown in the figure, the working state of the cluster head is sometimes unstable. For example, the cluster head cannot receive the size of the data transmitted by the nodes in the group, resulting in the inability to allocate the time slot length. Therefore, a cluster head replacement is set after the cluster head, and the cluster head replacement can also select a time slot of appropriate length according to its own size. When the cluster head cannot work normally, the cluster head replacement replaces the work of the cluster head to allocate the time slots of the nodes in the group, which enhances the system's adaptability and ensures that the system can send and receive data more stably.
[0062] In one embodiment, Figure 8 As shown in the figure, when the conflict reaches a certain threshold, a distributed algorithm is used. The nodes that need to send data do not need to be controlled by the cluster head. After internal negotiation, they send data in the adjusted order. In this way, when there are too many nodes and congestion occurs, there is no need for readjustment by the cluster head. The conflicting nodes can self-adjust and resend the data.
[0063] In a specific embodiment, when the conflict reaches a certain threshold, the system can automatically determine which method to use. First, multi-layer clustering is started, and then the clustering results are judged. When the system judges that the clustering method has problems such as high bit error rate and low channel occupancy, it automatically changes to a distributed algorithm to retransmit information.
[0064] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0065] In one embodiment, Fig. 9 As shown, a data transmission device based on a hybrid MAC protocol is provided, including: a node aggregation module 902, a time slice allocation module 904 and a data transmission module 906, wherein:
[0066] The node aggregation module 902 is used to obtain multiple nodes to transmit data; group the nodes according to the priority of the nodes to transmit data to obtain multiple node sets; and transmit data between the node sets through the TDMA protocol;
[0067] The time slice allocation module 904 is used to judge the number of conflicts among nodes in the node set during data transmission using a preset conflict threshold, calculate the communication time of the node set according to the judgment result, and allocate a time slice of appropriate length according to the communication time required by the node set;
[0068] The data transmission module 906 is used to set a cluster head on each node set, set the time slot length and priority of the node according to the cluster head, and use the time slot length and priority of the node to compete for data transmission in the time slice through the CSMA / CA protocol.
[0069] In one embodiment, the time slice allocation module 904 is further used to use a preset conflict threshold to determine the number of conflicts between nodes in the node set during data transmission, and calculate the communication time of the node set according to the determination result, including:
[0070] The number of conflicts among nodes in the node set during data transmission is judged by using the preset conflict threshold. When the number of conflicts reaches the set conflict threshold within a period of time, multi-layer clustering is started to obtain multiple node subsets. Data is transmitted between the node subsets through the TDMA protocol.
[0071] If the number of conflicts does not reach the conflict threshold, the communication time of the node set is calculated.
[0072] In one embodiment, multi-layer clustering means that the nodes in the cluster are automatically divided into several small groups again, and each small group generates a cluster head to manage the transmission status of the nodes in the small group.
[0073] In one embodiment, the data transmission module 906 is further used to set the time slot length and priority of the node according to the cluster head, including:
[0074] The cluster head allocates time slots of corresponding sizes to each node in the group according to the time required for each node to transmit data, and allocates the required time slot length on demand, and arranges the nodes that need to transmit data according to priority, and negotiates nodes of different levels of priority to compete within the set time slots.
[0075] In one of the embodiments, a cluster head replacement is set on each node set. The cluster head replacement can select a time slot of appropriate length according to its own size. When the cluster head cannot work normally, the cluster head replacement will replace the cluster head to allocate time slots for nodes in the group.
[0076] For the specific definition of the data transmission device based on the hybrid MAC protocol, please refer to the definition of the data transmission method based on the hybrid MAC protocol above, which will not be repeated here. Each module in the above-mentioned data transmission device based on the hybrid MAC protocol can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0077] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data transmission method based on a hybrid MAC protocol is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0078] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0080] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0081] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data transmission method based on a hybrid MAC protocol, characterized in that: The method comprises: Get multiple nodes with data to be transmitted; Nodes are grouped according to the priorities of the nodes to be transmitted, and nodes with similar priorities are grouped to obtain multiple node sets; data is transmitted between the node sets through the TDMA protocol; The number of conflicts among nodes in the node set during data transmission is judged by using a preset conflict threshold, the communication time of the node set is calculated according to the judgment result, and the time slice of the required length is allocated according to the communication time required by the node set; A cluster head is set on each node set, a time slot length and a priority of a node are set according to the cluster head, and the time slot length and the priority of the node are used to compete for data transmission in the time slice by means of a CSMA / CA protocol; The number of conflicts among nodes in the node set during data transmission is judged by using a preset conflict threshold, and the communication time of the node set is calculated according to the judgment result, including: The number of conflicts among nodes in the node set during data transmission is judged by using a preset conflict threshold, and after the number of conflicts reaches the set conflict threshold within a period of time, multi-layer clustering is started to obtain multiple node subsets; data transmission is performed between the node subsets using a TDMA protocol; If the number of conflicts does not reach the conflict threshold, the communication time of the node set is calculated.
2. The method according to claim 1, characterized in that The multi-layer clustering means that the nodes in the cluster are automatically divided into several groups again, and each group generates a cluster head to manage the transmission status of the nodes in the group.
3. The method according to claim 1, characterized in that The time slot length and priority of the node are set according to the cluster head, including: The cluster head allocates time slots of corresponding sizes to each node in the group according to the time required for each node to transmit data and allocates the time slot length required by itself on demand, and arranges the nodes that need to transmit data according to priority, and negotiates nodes of different levels of priority to compete within the set time slots.
4. The method according to claim 2, characterized in that: The method further comprises: A cluster head replacement is set on each node set. The cluster head replacement can select the time slot of the required length according to its own size. When the cluster head cannot work normally, the cluster head replacement will replace the cluster head to allocate time slots for the nodes in the group.
5. A data transmission device based on a hybrid MAC protocol, characterized in that: The device comprises: A node aggregation module is used to obtain multiple nodes to be transmitted data; group the nodes according to the priorities of the nodes to be transmitted data, group the nodes with similar priorities, and obtain multiple node sets; the node sets transmit data through the TDMA protocol; A time slice allocation module is used to judge the number of conflicts among nodes in the node set during data transmission by using a preset conflict threshold, calculate the communication time of the node set according to the judgment result, and allocate a time slice of a required length corresponding to the communication time required by the node set; judge the number of conflicts among nodes in the node set during data transmission by using a preset conflict threshold, and calculate the communication time of the node set according to the judgment result, including: judging the number of conflicts among nodes in the node set during data transmission by using a preset conflict threshold, starting multi-layer clustering after the number of conflicts reaches the set conflict threshold within a period of time to obtain multiple node subsets; data transmission is performed between the node subsets by using the TDMA protocol; if the number of conflicts does not reach the conflict threshold, calculating the communication time of the node set; The data transmission module is used to set a cluster head on each node set, set the time slot length and priority of the node according to the cluster head, and use the time slot length and priority of the node to compete for data transmission in the time slice through the CSMA / CA protocol.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Communication resource allocation method of wireless sensor network
CN103415018A
Cluster MAC protocol implementation method based on link duration time in vehicle-mounted self-organizing network
CN103873485A
Method and system for optimizing access to wireless sensor network channel
CN104320858A
Multi-mode time slot allocation method and system based on LoRa star ad hoc network
CN114980340A
Slot assignment method and apparatus based on partition
US20150117257A1
