Distributed communication resource allocation method and system based on Latin square matrix
By adopting a distributed communication resource allocation method based on Latin square matrix in mobile ad hoc networks, the problem that traditional resource allocation strategies cannot adapt to the rapid changes in network topology and high computing complexity is solved, and efficient and reliable resource allocation is achieved.
Patent Information
- Application Number
- CN202510379539.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-24
AI Technical Summary
In mobile ad hoc networks, especially in multi-hop network environments, traditional resource allocation strategies cannot adapt to the rapid changes in network topology, dynamic resource allocation strategies have large signaling overhead and are prone to conflicts, and the existing random sequence generation algorithm has high computational complexity and spatial complexity.
The distributed communication resource allocation method based on Latin square matrix is adopted, and by generating standard Latin square matrix and index identification mapping matrix, the generation of time-frequency resource priority sequences is optimized, the algorithm complexity is reduced, while maintaining the randomness and statistical fairness of priority sequences.
It realizes efficient and reliable distributed communication resource allocation, reduces the time complexity and spatial complexity of the algorithm, improves the system's response speed and resource utilization, and ensures the fairness and efficiency of resource allocation.
Smart Images

Figure CN120201556A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of mobile ad hoc network communication, and in particular, to a distributed communication resource allocation method and system based on Latin squares. Background Art
[0002] In a mobile ad hoc network, resource allocation is a complex and critical issue, especially in a multi-hop network environment. Although traditional static resource allocation strategies are simple, they cannot adapt to the rapid changes in network topology, resulting in low resource utilization. Although dynamic resource allocation strategies can flexibly adjust resources according to network requirements, they need to coordinate frequently with neighbor nodes, increasing signaling overhead and latency, and are prone to data transmission conflicts. Especially in a distributed network, the resource coordination process between nodes requires efficient and reliable communication means, and existing random access or control access mechanisms either cannot avoid conflicts or require complex signaling interactions, making it difficult to be efficiently implemented in resource-constrained wireless nodes. In addition, in dynamic resource allocation strategies, nodes need to generate a priority sequence for each resource block to ensure the fairness and efficiency of resource allocation. However, existing random sequence generation algorithms (such as the shuffling algorithm) can achieve an equiprobable random permutation, but their computational complexity and space complexity are relatively high, making it difficult to be quickly executed in resource-constrained wireless nodes. Especially when the number of network nodes is large, each node needs to generate a random sequence containing all node IDs for each resource block, which not only takes time but also occupies a large amount of storage space, further limiting the practicality of the algorithm. How to reduce the computational complexity and space complexity of the algorithm while ensuring the fairness and randomness of resource allocation has become a key problem in distributed multi-hop network resource allocation. Summary of the Invention
[0003] The embodiments of the present invention provide a distributed communication resource allocation method and system based on Latin squares, which aim to solve the problems that in a mobile ad hoc network, especially in a multi-hop network environment, traditional resource allocation strategies cannot adapt to the rapid changes in network topology, dynamic resource allocation strategies have large signaling overhead and are prone to conflicts, and existing random sequence generation algorithms have high computational complexity and space complexity. The present invention reduces the algorithm complexity by optimizing the generation method of the time-frequency resource priority sequence, while maintaining the randomness and statistical fairness of the priority sequence, and realizes efficient and reliable distributed communication resource allocation.
[0004] To achieve the above object, in a first aspect, the present invention provides a distributed communication resource allocation method based on a Latin square, including: obtaining network parameters to initialize the node identifier, frame structure, and resource allocation period of communication nodes, generating a standard Latin square and an index identifier mapping matrix; sending control messages according to the frame structure period, the control messages including node clock signals, device status, and neighbor node information, and receiving the control messages of other nodes to complete network synchronization; constructing a network topology based on the control messages, the network topology including neighbor node information and distance information; calculating a first time-frequency resource block number according to the current frame count and an initial value, and using the standard Latin square to determine the node priority index sequence of each time-frequency resource block; calculating a second time-frequency resource block number according to the current frame count and the initial value, and using the index identifier mapping matrix to generate a mapping relationship between node indexes and identifiers; combining the node priority index sequence and the mapping relationship sequence to generate a node priority sequence based on identifiers; generating a list of nodes and their two-hop neighbors based on the network topology, and comparing the node priority sequence based on identifiers to determine the ownership of the right to use time-frequency resource blocks.
[0005] In a second aspect, the present invention provides a distributed communication resource allocation system based on a Latin square, including: a matrix generation module, a network synchronization module, a construction module, an index sequence determination module, a mapping relationship generation module, a priority sequence generation module, and a right-of-use determination module. The matrix generation module is used to obtain network parameters to initialize the node identifier, frame structure, and resource allocation period of communication nodes, and generate a standard Latin square and an index identifier mapping matrix. The network synchronization module is used to send control messages according to the frame structure period, the control messages including node clock signals, device status, and neighbor node information, and receive the control messages of other nodes to complete network synchronization. The construction module is used to construct a network topology based on the control messages, the network topology including neighbor node information and distance information. The index sequence determination module is used to calculate a first time-frequency resource block number according to the current frame count and an initial value, and use the standard Latin square to determine the node priority index sequence of each time-frequency resource block. The mapping relationship generation module is used to calculate a second time-frequency resource block number according to the current frame count and the initial value, and use the index identifier mapping matrix to generate a mapping relationship between node indexes and identifiers. The priority sequence generation module is used to combine the node priority index sequence and the mapping relationship sequence to generate a node priority sequence based on identifiers. The right-of-use determination module is used to generate a list of nodes and their two-hop neighbors based on the network topology, and compare the node priority sequence based on identifiers to determine the ownership of the right to use time-frequency resource blocks.
[0006] In a third aspect, the present invention provides an electronic device, including: at least one processor; and
[0007] A memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the distributed communication resource allocation method based on Latin square as described above.
[0008] In a fourth aspect, the present invention provides a computer-readable storage medium, including a computer program and instructions, which, when the computer program or the instructions are run on a computer, cause the computer to execute the distributed communication resource allocation method based on Latin square as described above.
[0009] Compared with the prior art, the distributed communication resource allocation method and system based on Latin square according to the present invention have the following beneficial effects:
[0010] 1. By introducing a Latin square to generate a node priority index sequence, the present invention is more concise and efficient in generating the Latin square compared with traditional random sequence generation algorithms such as the shuffling algorithm, greatly reducing the time complexity and space complexity of the algorithm; especially in resource-constrained wireless nodes, this simplification is particularly important, enabling the algorithm to complete the calculation of resource allocation in a shorter time and improving the response speed and efficiency of the system.
[0011] 2. The present invention adopts a distributed adaptive orthogonal resource pre-allocation strategy, pre-allocating available transmission resources according to the two-hop neighbor situation of nodes to achieve two-hop outer reuse of transmission resources; this strategy can more flexibly adapt to the dynamic changes of the network topology, avoid waste of resources, and improve the overall resource utilization rate.
[0012] 3. The node priority index sequence generated by the Latin square has a certain statistical randomness, and combined with the index identification mapping matrix, the randomness of the priority sequence can be maintained; this randomness ensures the fairness of resource allocation and avoids the situation where some nodes occupy resources for a long time or the resource allocation is uneven.
[0013] 4. The present invention mainly relies on local computing during the resource allocation process, reducing the signaling interaction between nodes; this not only reduces the signaling overhead and delay, but also improves the reliability and stability of the system; especially in a distributed network, the simplified signaling interaction makes the resource allocation process more efficient.
[0014] 5. The present invention can well adapt to the dynamic changes of the network topology. By periodically updating the neighbor node information and the resource allocation period, the system can timely adjust the resource allocation strategy to ensure the effective utilization of resources; this adaptability enables the method of the present invention to exhibit good performance in various complex network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic flowchart of a distributed communication resource allocation method based on a Latin square in the first embodiment of the present invention;
[0016] Figure 2 It is a schematic structural diagram of a distributed communication resource allocation system based on a Latin square in the second embodiment of the present invention;
[0017] Figure 3 It is a schematic structural diagram of an electronic device in the third embodiment of the present invention;
[0018] Figure 4 It is a schematic flowchart of the existing logic for dynamic access control;
[0019] Figure 5 It is a schematic structural diagram of the available transmission resources evenly divided into multiple units in two dimensions of time and frequency in a specific embodiment of the present invention;
[0020] Figure 6 It is a schematic flowchart of the working process of distributed adaptive ODMA in a specific embodiment of the present invention;
[0021] Figure 7 It is a schematic flowchart of a distributed communication resource allocation method based on a Latin square in a specific embodiment of the present invention. Detailed implementation manners
[0022] The following further elaborates on the embodiments of the present invention in conjunction with the accompanying drawings and examples. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention, rather than limiting the embodiments of the present invention. Additionally, it should be noted that for the sake of description, only parts related to the embodiments of the present invention are shown in the accompanying drawings, rather than all the structures.
[0023] For the convenience of understanding, first, the main implementation concepts of each embodiment of the present invention are briefly described.
[0024] A channel generally refers to a medium for transmitting information along a certain direction. A channel can be a specific frequency region of an electromagnetic signal, called a frequency band; or it can be a specific segment of a signal, called a frame. Channel sharing means that the same channel is used by multiple users simultaneously and is ensured to be interference-free. Channel sharing can improve the utilization rate of channel resources. The basic technologies for realizing channel sharing mainly include:
[0025] (1) Frequency Division Multiple Access (FDMA): The channel frequency band is divided into several narrower non-overlapping frequency bands (called sub-bands), and each sub-band is assigned to a user exclusively (called an address). This is the basic technology for analog carrier communication, microwave communication, and satellite communication.
[0026] (2) Time Division Multiple Access (TDMA): The channel frame is divided into several non-overlapping time slots, and each time slot is assigned to a user as a dedicated address. This is the basic technology for digital data communication and the second-generation mobile communication.
[0027] (3) Code Division Multiple Access (CDMA): If the addresses of each user are neither the specified signal sub-bands nor the time slots, but a set of orthogonal coding structures (code patterns) of the signals, these user signals can also be transmitted simultaneously on the same channel without interfering with each other.
[0028] (4) Space Division Multiple Access (SDMA): Using technical means to divide the space into several non-overlapping regions, and different users are distinguished by different regions. In mobile communication, the basic technology that can achieve space division is the adaptive array antenna.
[0029] The commonly used channel resource allocation methods are also multiple access control, which can be divided into two categories according to the implementation methods: static allocation and dynamic allocation:
[0030] Static allocation: Such as traditional FDM or TDM. If there are N users, the bandwidth or time is divided into N parts, and each user statically occupies one. The advantage of this allocation method is simple implementation and small data transmission delay; the disadvantages are low channel utilization rate, waste of resources when some users have no data transmission requirements, and inability to effectively handle burst data.
[0031] Dynamic allocation: Allocate available channel resources on demand, and can be further divided into two categories according to different strategies: random access and controlled access:
[0032] (1) Random access means contention. As long as a user has data, it seizes the channel and sends the data. After a conflict occurs, measures are taken to resolve the conflict. Random access is suitable for networks with light loads and has low efficiency when the load is heavy. Commonly used random access protocols include ALOHA, CSMA, access control protocols based on virtual carrier sensing (802.11 MAC), and various improvements of these basic random access protocols.
[0033] (2) Controlled access means that the sending station must first obtain the right to send and then send the data, so there will be no conflict. Controlled access can achieve high channel utilization rate in networks with heavy loads, and mainly has two methods: round-robin and reservation.
[0034] For static allocation classes, since the transmission time is pre-allocated, it is required to take the full network system parameters as input. For example, the typical static multiple access TDMA protocol makes its transmission time arrangement according to the maximum number of users in the network. For a network with N users, the frame length used by this protocol can be N time slots, and each user is assigned a unique time slot. Since each user can uniquely access a time slot in each frame, there is no collision problem for any type of packet, and the channel access delay is affected by the frame length.
[0035] For dynamic allocation classes, the problem of allocating transmission time slots to users is called the transmission time arrangement problem. The key points and advantages are to improve resource utilization by allocating available channels on demand. In mobile communication systems (cellular networks), it is studied how the base station coordinates, controls, and allocates available channel resources to support the uplink and downlink communications between the mobile station and the base station, and how to perform resource coordination, control, and allocation between cells to support cell handover, roaming, and inter-cell communications of the mobile station. In mobile ad hoc networks, it is studied how to utilize the multi-hop network topology of mobile ad hoc networks for spatial reuse of bandwidth. Different users can use the same resources simultaneously as long as they are far enough apart and do not interfere with each other. Consider the problem of arranging broadcast transmission time in a single-channel mobile ad hoc network using omnidirectional antennas. At this time, the conflict-free broadcast transmission time arrangement requires that the distance between any two simultaneously transmitting users must be at least equal to three hops.
[0036] As described above, static allocation classes cannot adapt to the dynamic changes of user requirements and cannot fully utilize the transmission resources of the system. Dynamic allocation classes can adapt to the dynamic changes of user requirements, but need to solve the problems of resource conflict and resource reuse.
[0037] There are two ideas for existing distributed mesh structure dynamic allocation classes to solve the problems of resource conflict and resource reuse: one is random contention access, allowing resource conflicts to occur, and offsetting the impact of resource conflicts through certain compensation measures; the other is controlled access, as Figure 4 shown, pre-allocate resources through polling or reservation to avoid resource conflicts. Regardless of which idea, generally a special process of resource coordination through control signaling is required, and in order to ensure the effectiveness and reliability of this resource coordination process, signaling interaction generally uses low-speed and high-reliability communication means.
[0038] The existing distributed adaptive orthogonal resource pre-allocation algorithm periodically statistically averages and allocates the available transmission resources within two hops of the node. During the allocation process of each cycle, each node needs to generate a sorting sequence Seq(n) containing all the preset node IDs for each available service resource block locally according to the maximum number of nodes in the network. This sequence represents the priority order of the corresponding node to use this service resource block.
[0039] The classic algorithm for generating a random permutation of a sequence is the Shuffle Algorithm, which originated from the need to shuffle cards in card games. Taking the shuffling of a deck of playing cards as an example, there are 54 cards in total, and they have 54! permutation ways. The shuffle algorithm requires generating one of the 54! permutation results with equal probability each time. Typical algorithms include draw-and-shuffle, Fisher-Yates algorithm, Knuth-Durstenfeld algorithm, Inside-Out algorithm, etc. Among them, the Knuth-Durstenfeld algorithm is the best shuffle algorithm.
[0040] Knuth and Durstenfeld improved the algorithm based on Fisher et al. Each time, a random number is taken from the unprocessed array, then this number is swapped with the number at the end of the unprocessed array, and the number at the swapped position is defined as the first number of the processed array. This is an in-place disordering algorithm, and the time complexity of the algorithm is also improved from O(n 2 ) of the Fisher algorithm to O(n), but the disadvantage of this algorithm is that the length n of the array must be known and the original array is modified. The main steps of this algorithm are as follows:
[0041] (1) Create an array arr with size n, store the values from 1 to n respectively, and define i = n - 1;
[0042] (2) Generate a random integer x such that x ∈ [0, i];
[0043] (3) Take out the number at index x of arr, that is, take out the random number arr[x], and then swap the last element of arr with the taken-out random number arr[x];
[0044] (4) Update the value of i, let i = i - 1;
[0045] (5) If i > 0, then repeat the above three steps (steps (2)-(4)) until the stop condition is met or i < 0.
[0046] According to the above algorithm implementation steps, it is easy to give the following proof:
[0047] (1) For any element arr[j] in the array with length n, the probability of being in the (n - 1)-th position (the last position) after shuffling is That is, the random integer x for the first swap is x = j;
[0048] (2) The probability of being in the (n - 2)-th position is That is, the random integer x for the second swap is x = j;
[0049] (3) And so on, the probability at the n - kth position is That is, the random integer x for the (n - k)th swap is j;
[0050] (4) In summary, for any element in the array, the probability of it appearing at any position in the sorted array is That is, the algorithm can generate one of all permutation results with equal probability.
[0051] As described above, for a network that can accommodate up to 100 nodes, if the available transmission resource blocks in each resource allocation period are set to 100, the duration of each time - frequency resource block is 1 ms, and each resource allocation period is 0.1 s. Then according to the above rules, each node needs to generate 100 pseudo - random sequences of length 100 based on the unified seed of the whole network every 0.1 s. Therefore, the way of generating these pseudo - random sequences determines the computational complexity of the distributed adaptive orthogonal resource pre - allocation algorithm, and at the same time, the random characteristics of these pseudo - random sequences determine the statistical fairness of resource pre - allocation. Implementing this algorithm in resource - constrained wireless network nodes requires simplifying the generation method of the time - frequency resource block priority sequence, reducing the time complexity and space complexity of the algorithm, and maintaining the random characteristics of the pseudo - random sequences.
[0052] The inventor, by discovering the technical defects described in the background art as above, provides a distributed communication resource allocation method and system based on Latin squares, aiming to solve the problems in mobile ad - hoc networks, especially in multi - hop network environments, where traditional resource allocation strategies cannot adapt to rapid changes in network topology, dynamic resource allocation strategies have high signaling overhead and are prone to conflicts, and existing random sequence generation algorithms have high computational complexity and space complexity. The present invention optimizes the generation method of the time - frequency resource priority sequence, reduces the algorithm complexity, and at the same time maintains the randomness and statistical fairness of the priority sequence, realizing efficient and reliable distributed communication resource allocation.
[0053] Embodiment 1, Figure 1 is a flowchart of a distributed communication resource allocation method based on Latin squares in Embodiment 1 of the present invention. As Figure 1 shown, Embodiment 1 provides a distributed communication resource allocation method based on Latin squares, including:
[0054] Step S100, obtain network parameters to initialize the node identifier, frame structure, and resource allocation period of the communication node, and generate a standard Latin square and an index - identifier mapping matrix;
[0055] Specifically, the present invention first obtains network parameters, including key information such as the node identifier of the communication node, the frame structure, and the resource allocation period. Based on this information, the system generates a standard Latin square and an index identifier mapping matrix. The standard Latin square is used to determine the node priority index sequence of each time-frequency resource block subsequently, while the index identifier mapping matrix is used to establish the mapping relationship between the node index and the identifier.
[0056] Step S200, send a control message according to the frame structure period, the control message includes a node clock signal, a device state, and neighbor node information, and receive the control messages of other nodes to complete network synchronization;
[0057] Specifically, the present invention realizes network synchronization by periodically sending control messages. These control messages are generated periodically based on the frame structure and contain key data such as the node clock signal, the device state, and neighbor node information. The node determines the sending period according to the frame structure parameters and extracts the node identifier to generate a control signal. By sending these control messages, the node can communicate with other nodes and receive similar messages sent by other nodes. Through this process, the node can judge the integrity of the neighbor node information, and in the case of complete information, obtain the control signal through the receiving end, thereby completing network synchronization.
[0058] Step S300, construct a network topology based on the control message, the network topology includes neighbor node information and distance information;
[0059] Specifically, the control message includes the node clock signal, the device state, and neighbor node information, which are crucial for constructing the network topology. The network topology is a graph structure that describes the connection relationship between nodes in the network, and it includes the identifiers of neighbor nodes and the distance information between them. By processing these control messages, the node can obtain detailed information about its surrounding neighbor nodes and construct the structure diagram of the entire network accordingly. This step is a key link in the resource allocation process because the network topology not only reflects the physical connection relationship between nodes but also directly affects the subsequent resource block allocation strategy. By constructing an accurate network topology, the system can more precisely determine which nodes are neighbors of each other and the distance between them, thereby providing a reliable basis for subsequent resource allocation.
[0060] Step S400, calculate the number of the first time-frequency resource block according to the current frame count and the initial value, and use the standard Latin square to determine the node priority index sequence of each time-frequency resource block;
[0061] Specifically, first, according to the current frame count and a preset initial value, the number of the first time-frequency resource block is calculated. This number changes dynamically, ensuring the timeliness and fairness of resource allocation. Subsequently, using the standard Latin square generated in step S100, the present invention determines a node priority index sequence for each time-frequency resource block. A standard Latin square is a matrix with a specific structure, where each row and each column contain all integers from 1 to n, and each integer appears only once. This property makes the priority index sequence generated based on the Latin square both random and ensures that the priorities of each node on different resource blocks are equally probable. Through this step, the present invention can, while ensuring the fairness and randomness of resource allocation, greatly simplify the generation process of the priority sequence, reduce the computational complexity and space complexity of the algorithm, and provide an efficient and reliable basis for subsequent resource allocation.
[0062] Step S500, calculate the number of the second time-frequency resource block according to the current frame count and the initial value, and generate a mapping relationship between the node index and the identifier using the index identifier mapping matrix;
[0063] Specifically, according to the current frame count and a preset initial value, the system calculates the number of the second time-frequency resource block. This number is different from the number of the first time-frequency resource block calculated in step S400 and is used to determine different resource allocation links. Subsequently, using the index identifier mapping matrix generated in step S100, the system generates a mapping relationship between the node index and the identifier for each time-frequency resource block. This mapping relationship changes dynamically based on the number of the time-frequency resource block, ensuring the flexibility and fairness of resource allocation. Through the index identifier mapping matrix, the system can convert the node index into the corresponding node identifier, thereby realizing the unique identification of the node in the resource allocation process. This step not only simplifies the logic of resource allocation but also improves the efficiency and accuracy of resource allocation, providing key information for subsequent determination of the ownership of the right to use the time-frequency resource block.
[0064] Step S600, combine the node priority index sequence and the mapping relationship sequence to generate an identifier-based node priority sequence;
[0065] Specifically, step S600 is a step of combining the node priority index sequence generated in step S400 with the mapping relationship sequence of node index and identifier generated in step S500 to generate a priority sequence based on node identifiers. In step S400, the node priority index sequence of each time-frequency resource block is determined by a standard Latin square, and this sequence represents the priority order of each node index when using the current time-frequency resource block. In step S500, the mapping relationship between node index and identifier is generated through an index identifier mapping matrix, that is, each node index corresponds to a unique node identifier. In a network, assume that nodes A, B, C, and D are nodes in a certain subnet, and the node priority index sequence and the mapping relationship between node index and identifier for a certain time-frequency resource block RB1 have been generated through steps S400 and S500 respectively. Assume that the node priority index sequence is [A, B, C, D] (indicating that the index priority of node A is the highest), and the mapping relationship between node index and identifier is {A: 1, B: 2, C: 3, D: 4} (indicating that the index of node A is 1, the index of node B is 2, and so on). In step S600, these two sequences are combined, that is, each index in the node priority index sequence is replaced with its corresponding node identifier, thereby generating a priority sequence based on node identifiers [1, 2, 3, 4]. This sequence represents the priority order of nodes A, B, C, and D when using the time-frequency resource block RB1, providing a basis for subsequent resource allocation decisions.
[0066] Step S700, based on the network topology, generate a list of nodes and their two-hop neighbors, and compare the node priority sequence based on identifiers to determine the ownership of the right to use the time-frequency resource block;
[0067] Specifically, based on the network topology constructed in step S300, the system first generates a list that includes the nodes themselves and their two-hop neighbors. This list details the topological relationships of each node and its surrounding neighbors in the network, including distance information between nodes. Subsequently, the node priority sequence based on identifiers generated in step S600 is used to compare with the list of nodes and their two-hop neighbors. Through this comparison process, the system can determine which node has the highest priority on each time-frequency resource block, that is, which node has the right to use the resource block for data transmission. This step ensures the fairness and efficiency of resource allocation because the node with the highest priority will obtain the resource usage right first, and the resource allocation is based on the local topological information of the nodes, avoiding the complexity and latency of global coordination. Through this innovative method, the present invention realizes efficient resource allocation in a distributed multi-hop network.
[0068] In this embodiment, step S100 includes:
[0069] Step S101: Obtain the node identifier and frame structure parameters of the communication node, and extract the resource allocation period;
[0070] Specifically, the present invention first obtains and initializes network parameters. The system collects the node identifier of the communication node (i.e., the unique identifier of each node in the network) and the frame structure parameters (such as the length of the frame, the number of time slots, etc.), and extracts the resource allocation period (i.e., the time interval for the system to allocate resources). For example, in a network with 10 nodes, each node has a unique ID (such as 0 to 9), the frame structure is set to include 10 time slots per frame, and the resource allocation period is 1 second. The system first obtains these parameters and then initializes according to these parameters to prepare for the subsequent resource allocation process.
[0071] Step S102: Construct a standard Latin square according to the resource allocation period and the node identifier;
[0072] Specifically, a standard Latin square is a special matrix in which each row and each column contain all integers from 1 to n, and each integer appears only once. In the present invention, n represents the maximum number of nodes that can be accommodated in the network or subnet, and this value is set to the smallest prime number that meets the requirements. For example, in a network with 11 nodes, an 11×11 standard Latin square LS(11,11) can be constructed. The construction process is based on the resource allocation period and the node identifier, and is generated by a specific algorithm (such as arranging the elements in ascending order and then connecting the head and tail, and then offsetting each row). This square matrix will be used to determine the node priority index sequence of each time-frequency resource block in the subsequent steps to ensure the fairness and randomness of resource allocation. By constructing a standard Latin square, the present invention provides an efficient and simple method for generating a priority sequence for resource allocation, reducing the computational complexity and space complexity of the algorithm.
[0073] Step S103: Generate an index identifier mapping matrix through the standard Latin square and the frame structure parameters;
[0074] Specifically, the index identifier mapping matrix is a special matrix used to establish the mapping relationship between the node index and the node identifier. The size of this matrix is (N maxNode -1)×N maxNode , where N maxNode is the maximum number of nodes that can be accommodated in the network or subnet, and this value is a prime number. Each row of the matrix represents a specific mapping relationship, and the element in the m-th row and the n-th column is {m(n - 1) mod N maxNode}。For example, in a network with 11 nodes, a 10×11 index identification mapping matrix can be generated. The first column of this matrix is all zeros, and the remaining columns form a special Latin square. By combining the standard Latin square and frame structure parameters (such as the length of the frame, the number of time slots, etc.), the system can flexibly generate an index identification mapping matrix suitable for different network environments and requirements. This step provides a basis for generating the mapping relationship between node indexes and identifications in the subsequent steps, ensuring the accuracy and efficiency of resource allocation.
[0075] In this embodiment, the step S200 includes:
[0076] Step S201, obtaining the cycle value of the frame structure parameter and extracting the control signal generated by the node identification;
[0077] Specifically, the frame structure parameters usually include key information such as the length of the frame and the number of time slots. These information are crucial for determining the transmission cycle of the control message. The cycle value determines the frequency at which the node sends the control message, ensuring that each node in the network can maintain synchronization. At the same time, the node identification is the unique identification of each node in the network, used to distinguish different nodes. By extracting the node identification, the system can accurately identify and control the behavior of each node. When generating the control signal, the system combines the frame structure parameters and the node identification to generate a control message containing the node clock signal, device status, and neighbor node information. For example, in a network with 10 nodes, each node has a unique ID (such as 0 to 9), the frame structure is set to include 10 time slots per frame, and the resource allocation cycle is 1 second. The system will determine that each node sends a control message every 0.1 second and includes its own clock signal, device status, and the collected neighbor node information in the message.
[0078] Step S202, judging whether the neighbor node information is complete according to the clock signal and the device status information;
[0079] Specifically, the clock signal is the timing reference inside the node, which is used to ensure the time synchronization of each node. The device status information reflects the current operating status of the node, such as whether it is online and whether the power is sufficient. The neighbor node information contains key data such as the identifiers, positions of other nodes around the node, and their connection status with the current node. After receiving the control message, the system first checks whether the neighbor node information in the message is complete, that is, whether it contains all the necessary information, such as the identifiers and distances of neighbor nodes. For example, in a network consisting of 10 nodes, each node includes its own information and the information of the neighbor nodes it can detect when sending a control message. After receiving these messages, the receiving node checks whether the message contains the complete information of all neighbor nodes. If the information is complete, it indicates that the network topology information is up-to-date and can be used for subsequent network synchronization and resource allocation processes; if the information is incomplete, it may be necessary to resend the control message or perform additional information interaction to ensure the accuracy and integrity of the network topology.
[0080] Step S203, if the neighbor node information is complete, obtain the control signal through the receiving end to complete network synchronization;
[0081] Specifically, when the system receives a control message sent by other nodes, it will first check whether the neighbor node information contained in the message is complete. This neighbor node information is crucial for constructing an accurate network topology and subsequent resource allocation. If the neighbor node information is complete, that is, it contains all the necessary information (such as the identifiers, positions, and connection status of neighbor nodes), the system considers the network topology to be up-to-date and can obtain these control signals through the receiving end to complete network synchronization. For example, in a network consisting of 10 nodes, each node will regularly send control messages containing its own clock signal, device status, and information about the surrounding neighbor nodes. When a node receives a control message from another node and confirms that the neighbor node information in the message is complete and correct, it will use this information to update its network topology view and obtain the control signal through the receiving end, thereby completing network synchronization with other nodes.
[0082] In this embodiment, the step S300 includes:
[0083] Step S301, obtain the neighbor node information and the distance information in the control message, and construct a network topology;
[0084] Specifically, after receiving these control messages, the system extracts the neighbor node information therein, including key data such as the identifiers, locations, and distances from the current node of the neighbor nodes. Based on this information, the system can construct the structure diagram of the entire network, i.e., the network topology. The network topology is a graphical representation that describes the connection relationships between nodes in the network. It visually shows which nodes are neighbors of each other and their relative positional relationships.
[0085] Step S302, extract the connection relationships between nodes according to the network topology to form node communication paths;
[0086] Specifically, by extracting the node connection relationships in the network topology, the system can clarify which nodes are neighbors of each other and their direct communication paths.
[0087] Step S303, if the node communication path is interrupted, re-obtain the neighbor node distance information to supplement the network topology;
[0088] Specifically, during the process of constructing the network topology, if the system finds that the communication paths between some nodes are interrupted, that is, some nodes cannot communicate directly or indirectly through other nodes, then these interrupted communication paths will affect the effective allocation of resources and the smooth transmission of data. To solve this problem, the system will re-obtain the neighbor node distance information of these interrupted nodes and supplement and improve the network topology accordingly.
[0089] In this embodiment, the step S400 includes:
[0090] Step S401, obtain the counting information of the current frame count, and calculate the first time-frequency resource number in combination with a preset initial value;
[0091] Specifically, the main purpose of this step is to calculate the number of the first time-frequency resource block in the current frame through certain mathematical operations based on the current frame count (i.e., the position information in time) and the preset initial value. This number is subsequently used to determine the node priority index sequence of each time-frequency resource block, thereby affecting the resource allocation. Assume that the current frame count is F, the preset initial value is I0, and the maximum number of nodes that the network or subnet can accommodate is N maxNode . According to the formula I rb (I freqChnl ,I slot )=(I rb0 +I freqChnnl ×L subF +I slot )modN maxNode , where I rb0I0 is the initial value of the number of the current sub-frame time-frequency resource block and can be calculated. For the first time-frequency resource block (assuming in the first frequency-domain channel and the first time slot), its number I rb (0,0) can be calculated by substituting I0 into the formula and considering the influence of the current frame count F. In this way, each node can determine its priority index sequence on different time-frequency resource blocks based on the calculated first time-frequency resource number and in combination with the standard Latin square, providing a basis for subsequent resource allocation.
[0092] Step S402: Based on the number of the first time-frequency resource block, use the standard Latin square to generate a node priority index sequence for each time-frequency resource block;
[0093] Specifically, first, according to the number of the first time-frequency resource block, use the pre-generated standard Latin square to assign a node priority index sequence to each time-frequency resource block. This sequence determines the priority order of each node on the current time-frequency resource block. Assume the maximum number of nodes N in the network maxNode is 11, and the standard Latin square LS(11,11) has been constructed according to the rules. Assume the number of the first time-frequency resource block is I rb , then according to the definition of the Latin square, select the I rb -th row in LS(11,11) as the node priority index sequence of the current time-frequency resource block. For example, if I rb =3, then select the 3rd row [2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1] of LS(11,11) as the node priority index sequence of the current time-frequency resource block. This means that the node with node index 2 has the highest priority on the current time-frequency resource block, the node with node index 3 has the second highest priority, and so on, until the node with node index 1 has the lowest priority. Through this process, each time-frequency resource block is assigned a node priority index sequence based on the Latin square, providing a basis for subsequent resource allocation.
[0094] In this embodiment, the step S500 includes:
[0095] Step S501: Obtain the count information of the current frame count, and calculate the second time-frequency resource number in combination with the preset initial value;
[0096] Specifically, the node first obtains the count information of the current frame, that is, the position of the current frame in the network resource allocation cycle, and then combines the preset initial value to obtain the second time-frequency resource number through a specific calculation method. This number is subsequently used to determine the mapping relationship between the node index and the node identifier. Assume the maximum number of nodes N in the network maxNode is 11, the current frame count is F, and the preset initial value is According to the formula where is the initial value of the number of the current sub-frame time-frequency resource block and can be calculated. To calculate the second time-frequency resource number, a similar formula can be used, but with a different initial value (This initial value can be different from I0 used when calculating the first time-frequency resource number to distinguish the uses of the two resource numbers). For example, assume where the offset is a fixed constant used to distinguish the two resource numbers. Then, substitute the current frame count F, the frequency-domain channel index I freqChnl and the time slot index I slot into the formula to calculate the second time-frequency resource number. This number will be used in the subsequent steps to generate the mapping relationship between the node index and the identifier through the index-identifier mapping matrix, and further determine the identifier of the node on a specific time-frequency resource block.
[0097] Step S502: Based on the second time-frequency resource number, use the index-identifier mapping matrix to generate the mapping relationship between the node index and the identifier;
[0098] Specifically, the node first calculates the second time-frequency resource number according to Step S501, and uses the pre-constructed index-identifier mapping matrix to generate the mapping relationship between the node index and the node identifier on the current time-frequency resource block. Assume that the maximum number of nodes N in the network maxNode is 11, and the index-identifier mapping matrix M Index→Id (10, 11) has been constructed according to the rules. Assume that the second time-frequency resource number is then according to the definition of the mapping matrix, select M Index→Id (10, 11) at the (assuming that it is still within the valid range after taking the modulo of 11), then select the 5th row [0, 5, 10, 4, 9, 3, 8, 2, 7, 1, 6] of M Index→Id (10, 11) as the mapping relationship. This means that the node with node index 0 corresponds to node identifier 5 on the current time-frequency resource block, the node with node index 1 corresponds to node identifier 10, and so on. Through this process, each time-frequency resource block is assigned a mapping relationship between the node index and the identifier, providing a basis for subsequent determination of the priority of the node on a specific time-frequency resource block.
[0099] In this embodiment, the step S700 includes:
[0100] Step S701: Obtain the node information in the network topology and generate a list of the node itself, its one-hop neighbors, and its two-hop neighbors;
[0101] Specifically, in a network topology, the one-hop neighbors of a node refer to the nodes directly adjacent to that node, while the two-hop neighbors refer to the nodes indirectly connected to that node through one-hop neighbors. This step is crucial for implementing distributed communication resource allocation because it enables nodes to understand the surrounding network environment and provides a basis for subsequent resource allocation decisions. Assume that the network is divided into multiple time-frequency resource blocks, and each node has a unique identifier (such as I dnode ). In step S701, node A will first obtain its own identifier information, and then through control message interaction, obtain the identifier information of its one-hop neighbors (such as nodes B and C) and two-hop neighbors (such as node D, which is indirectly connected to node A through node B). Finally, node A will generate a list that contains the identifier and related information of node A itself, its one-hop neighbors (nodes B and C), and two-hop neighbors (node D). This list will be used in subsequent steps to compare with the identifier-based node priority sequence to determine the ownership of the right to use each time-frequency resource block, thereby achieving distributed and adaptive communication resource allocation.
[0102] Step S702: For each of the time-frequency resource blocks, query the sequence positions of the nodes in the list in the identifier-based priority sequence;
[0103] Specifically, a priority sequence based on node identifiers has been generated, which represents the priority order of each node to use the current time-frequency resource block. In step S702, for each time-frequency resource block, the node will query the position (i.e., the sequence position) of each node in its two-hop neighbor list in this priority sequence. In a network, assume that nodes A, B, C, and D are nodes in a certain subnet, and node A has generated its two-hop neighbor list (including node A itself, nodes B and C as one-hop neighbors, and node D as a two-hop neighbor). In step S702, for a specific time-frequency resource block RB1, node A will query the identifier-based priority sequence to find the positions of nodes A, B, C, and D in this sequence.
[0104] Step S703: If the sequence position of a certain node is the most pre-order within the two-hop neighbor range, determine that this node obtains the ownership of the right to use this time-frequency resource block;
[0105] Specifically, for each time-frequency resource block, the node queries the position (i.e., the sequence bit) of each node in its two-hop neighbor list in the identity-based priority sequence. According to the rule in step S703, if the sequence bit of a certain node is the most forward within its two-hop neighbor range, that is, its priority is the highest, then this node will obtain the right to use this time-frequency resource block. Assume that nodes A, B, C, and D are nodes in a certain subnet, and node A has generated its two-hop neighbor list (including node A itself, node B and node C as one-hop neighbors, and node D as a two-hop neighbor). In step S702, node A queries the priority sequence for a certain time-frequency resource block RB1 and determines the positions of nodes A, B, C, and D in this sequence. Assume that the sequence bit of node A is the most forward, indicating that its priority is the highest. According to step S703, node A will thus obtain the right to use time-frequency resource block RB1. This process ensures the fairness of resource allocation because each node has the opportunity to obtain the right to use the resource block according to its priority, and at the same time improves the resource utilization efficiency because the resource block can be allocated to the node that currently most needs to transmit data.
[0106] In a specific embodiment, assume that the network or subnet evenly divides the available transmission resources into multiple units in the time-frequency two dimensions, and then divides the "superframe-frame-subframe-RB" structure in units of time-frequency resource block RB, as Figure 5 shown. Among them, the frequency domain is divided into N chnl channels, the time domain is divided into multiple equal-length time slots (slot), and the time-frequency two-dimensional size of (1×1) slot×chnl is defined as the smallest schedulable transmission resource of the time-frequency resource block RB. It is agreed that all consecutive L subF time slots on all frequency domain channels are a subframe, it is agreed that all consecutive L frame subframes on all frequency domain channels are a frame, it is agreed that all consecutive L supF time frames on all frequency domain channels are a superframe, and the number of time-frequency resource blocks RB in the time frame structure represents the size of the corresponding structure:
[0107] The size of a subframe is N rbPerSubF =(L subF ×N chnl ) slot×chnl ;
[0108] The size of a time frame is N rbPerFrame =(L subF ·L frame ×N chnl ) slot×chnl ;
[0109] The size of a superframe is N rbPerSupF =(L subF ·L frame ·LsupF ×N chnl ) slot×chnl .
[0110] Assume that node and network identifiers are represented by consecutive non-negative integers, N maxNode Indicates the maximum number of nodes that a network or subnet can accommodate. In principle, the maximum number of nodes that a network or subnet can accommodate is set to the minimum prime number that meets the requirements; I dnode Indicates the node identifier, usually I dnode =0 indicates the minimum node ID in the network, and I dnode =N maxNode -1 is the maximum node ID that can be accommodated in the network.
[0111] For multi-hop networks (networks with a maximum number of hops exceeding 3), because static TDMA does not reuse spatial dimensions, there is a certain waste of available transmission resources and it cannot adapt well to rapid changes in network topology. At this time, it is possible to consider pre-allocating available transmission resources based on the two-hop neighbors of the node, realize the reuse of transmission resources beyond two hops, and improve resource utilization, that is, to realize distributed adaptive ODMA.
[0112] The core idea of distributed adaptive ODMA is: according to the local topology information known by the node, the priority of the node in each transmission resource block in the local topology is determined by a preset algorithm, and the node with the highest priority obtains the right to use the resource, thereby realizing a certain degree of spatial reuse of the transmission resources and achieving a distributed adaptive ODMA effect. The adaptive here mainly means that this resource allocation algorithm can adapt to the changes in the topology; and the distributed means that the main process of resource allocation is completed through local calculations of each node, and no unified control node is required for coordination.
[0113] like Figure 6 As shown, the detailed process of distributed adaptive ODMA is as follows:
[0114] The network node calculates the node and network index according to the agreed mapping rules based on its own configured and unique node and network identifiers in the entire network, which are used for node and network priority sorting in the resource allocation process.
[0115] Network nodes establish node-centric local topology information through interaction in the signaling network, which mainly refers to the node's one-hop neighbor and two-hop neighbor lists N[2].
[0116] The maximum number of nodes in the known subnet is N maxNode , Node Identifier I dnode and the node index I corresponding to the node identifier node, each node generates a pseudo-random sequence containing all preset node indexes for each available service resource block n according to the same rule, such as a pseudo-random sequence with a unified seed as the input, and then determines the sorting sequence Seq(n) containing the node identifiers according to the correspondence between the node indexes and the node identifiers, indicating the priority order for the corresponding node to use this service resource block.
[0117] The node queries the positions of the nodes in its two-hop neighbor list N[2] in the sorting sequence Seq(n), and determines that the node with the earliest position (i.e., representing the highest priority) obtains the right to use the service resource block n.
[0118] The prerequisite for the distributed adaptive ODMA multiple access strategy is:
[0119] Full network synchronization, which can be achieved through a distributed synchronization algorithm;
[0120] The node knows its two-hop neighbor information, which can be obtained through information interaction in the signaling network;
[0121] The node uses a unified random sequence generator, which can be guaranteed through a predefined method;
[0122] The node uses the unified time information as the input of the random sequence generator.
[0123] Under the above-mentioned prerequisite conditions, any node in the network only needs to perform local operations to obtain the resource allocation situation of the current resource allocation cycle, ensuring the distributed characteristics of the algorithm. In addition, the resource allocation is carried out periodically, and the node updates its two-hop neighbor information through the signaling network in each cycle, which can well adapt to the dynamic changes of the network topology and ensure the adaptive characteristics of the algorithm.
[0124] Numbering of the time-frequency resource blocks of the priority sequence: The network or subnet numbers the available time-frequency resource blocks in subframe periods, and the numbering order is first in the time domain and then in the frequency domain. The numbering of the time-frequency resource blocks increases sequentially based on the specified initial value and then performs mod N maxNode Operation. For example, if the initial value of the numbering of the time-frequency resource blocks in the current subframe is I rb0 , then the index I freqChnl of the I slot th time-frequency resource block on the frequency domain channel I rb (I freqChnl ,I slot ) is:
[0125] I rb (I freqChnl ,I slot )=(I rb0 +I freqChnnl ×L subF +Islot ) mod N maxNode (1)
[0126] Among them, the initial value of the number of the current sub-frame time-frequency resource block is:
[0127]
[0128] Among them,
[0129] I freqChnl ∈ [0, N chnl - 1],
[0130] I frame ∈ [0, L supF - 1],
[0131] I subF ∈ [0, L frame - 1],
[0132] I subnet represents the current subnet index.
[0133] Define a rule for constructing a Latin Square: arrange all the elements in ascending order, and then connect the head and the tail to form a ring composed of all the elements. Each row in the matrix is an offset of this ring. For example, the i-th row is the ring shifted left by i bits (index starting from 0).
[0134] Define the Latin Square constructed according to the above rule as the standard Latin Square, and denote the standard Latin Square as LS(n, n). On this basis, the matrix constructed by selecting m rows is denoted as:
[0135]
[0136] Equation (4) gives the construction process of the standard Latin Square LS(11, 11) with n = 11 and the matrix LS(4, 11)[0, 5, 8, 9].
[0137]
[0138] Construct a standard Latin Square of N maxNode × N maxNode , denoted as LS(N maxNode , N maxNode ), and use any row of this square as the priority sequence for available time-frequency resource allocation. There are N maxNode available priority sequences. Among them, the priority sequence with index x is denoted as LS(1, N maxNode )[x], which is the x-th row of the Latin Square LS(N maxNode , N maxNode ).
[0139] Mapping of time-frequency resource block numbers to priority sequences: After numbering the available time-frequency resource blocks in subframe periods according to the above rules, map the user priorities of each time-frequency resource block to the priority sequence LS(1,N maxNode )[I rb , and this sequence determines the priority order for each node to use this time-frequency resource block, with the sequence priorities arranged from high to low. It should be noted that at this time, the elements of each priority sequence represent the node index I node , rather than the node identifier I dnode , that is, the priority sorting sequence of node indices is obtained through the above operations.
[0140] If the current subnet multiplexes the time-frequency resources of other subnets, numbering and mapping of time-frequency resource blocks are performed according to similar rules, where the initial value of the time-frequency resource block numbering is:
[0141] I rb0 =[(I frame ×L frame +I subF )×(N rbPerSubF -1)+I subnet modN maxNode (6)
[0142] where I subnet represents the corresponding subnet index of the reusable subnet resources.
[0143] Numbering of time-frequency resource blocks for node index and identifier mapping: The mapping from node index I node to node identifier I dnode changes with the time-frequency resource block, that is, the mapping relationship between the node index and the identifier is determined by the number of the time-frequency resource block and the index identifier mapping matrix M Index→Id (N maxNode -1,N maxNode ). Given the node index I node , the network or subnet first numbers the available time-frequency resource blocks in subframe periods, with the numbering order being time domain first and then frequency domain, and the number of the time-frequency resource block increases sequentially based on the specified initial value, and then performs the mod(N maxNode -1) operation. For example, if the initial value of the number of the current subframe time-frequency resource block is then the index freqChnl of the I slot -th time-frequency resource block on the frequency domain channel I is:
[0144]
[0145] Among them, the initial value of the number of the current subframe time-frequency resource block is:
[0146]
[0147] Among them,
[0148] I freqChnl ∈ [0, N chnl -1],
[0149] I frame ∈ [0, L supF -1],
[0150] I subF ∈ [0, L frame -1],
[0151] I subnet represents the current subnet index.
[0152] The mapping relationship between the index and the identifier: the node index I node to the node identifier I dnode is variable and is determined based on an index identifier mapping matrix. It is known that the maximum number of on-network nodes in the network is N maxNode , and this value is a prime number. Then the index identifier mapping matrix is defined as a matrix of (N maxNode -1) × N maxNode , denoted as M Index→Id (N maxNode -1, N maxNode ). The element in the m-th row and n-th column of this matrix is {m(n - 1) mod N maxNode}], where m ∈ [1, N maxNode , n ∈ [1, N maxNode . The matrix composed of the i-th, j-th, and k-th rows of this matrix is denoted as M Index→Id (3, N maxNode ).
[0153]
[0154] Equation (9) gives the index identifier mapping matrix M maxNode = 11, M Index→Id (10, 11). This mapping matrix consists of the first column of all zeros and a special Latin square. Denote the n × n Latin square as L atin (n, n). Then there is equation (10).
[0155] M Index→Id (10, 11) = [0 (10×1) ∣ Latin(10, 10)] (10)
[0156] Priority sorting of node identifiers: At any time-frequency resource block in a resource allocation period, define the index I of the node node and the node identifier I dnode has a one-to-one mapping relationship. During the resource allocation process, the priority sequence of the time-frequency resource block RB gives the priority order of the node indexes that can use this time-frequency resource to transmit data. Each node index Inode in this process represents a unique node identifier Idnode. After obtaining the priority sorting sequence of the node indexes, in order to determine the node that obtains the right to use the time-frequency resource block, it is necessary to determine the priority sorting sequence of the node identifiers according to the priority sorting sequence of the node indexes and the mapping relationship between the node indexes and the node identifiers.
[0157] After numbering the available time-frequency resource blocks in subframe periods according to the above rules, map the user priorities of each time-frequency resource block to the corresponding index identifier mapping sequence The position and element value of any element in this sequence form a data pair, representing the mapping relationship from the node index to the node identifier, and are used to determine the node index I of the current time-frequency resource block node and the node identifier I dnode corresponding relationship.
[0158] Therefore, after knowing the priority sorting sequence of the node indexes and the above corresponding relationship, the priority sorting sequence of the node identifiers of the current time-frequency resource block can be obtained, and then the node identifier I that obtains the right to use the current time-frequency resource block can be determined dnode .
[0159] To sum up, the main workflow of the distributed communication resource allocation method based on Latin square in the present invention in a resource allocation period is as Figure 7 shown:
[0160] (1) Parameter initialization. When the device is powered on, initialize the device according to the configured network parameters, and determine the node identifier, frame structure, resource allocation period, standard Latin square, index identifier mapping matrix, etc. according to the network parameters
[0161] (2) Network and frame synchronization. The node periodically or quasi-periodically sends control messages through the signaling channel or other agreed ways. This message at least includes the node's own clock signal, device status information, neighbor information, etc. At the same time, receive and process the control messages sent by other nodes, complete network synchronization and frame synchronization, and interact and synchronize the control information related to resource allocation
[0162] (3) Network topology establishment. Nodes collect and process control messages sent by other nodes, including clock signals, device status information, neighbor information, etc., maintain network and frame synchronization, establish and maintain a network topology containing neighbor domain information, and this network topology includes at least information such as neighbor node identifiers and neighbor node distances.
[0163] (4) Determination of the node priority sequence based on indexes. Nodes first calculate the time-frequency resource block numbers for priority sequence generation in the current period according to information such as frame count and initial value, and then determine the node priority sequence for each time-frequency resource block according to the generated numbers and a standard Latin square. This sequence is the sorting sequence of all network node indexes, representing the priority order of nodes using the current time-frequency resource blocks from high to low.
[0164] (5) Mapping between node indexes and identifiers. Nodes first calculate the time-frequency resource block numbers for node index and identifier mapping in the current period according to information such as frame count and initial value, and determine the mapping relationship between node indexes and node identifiers for each time-frequency resource block according to the generated numbers and a known mapping matrix of indexes and identifiers. This mapping relationship is identified by a sequence, and the data formed by the position and element value of any element in this sequence represents the mapping relationship from node index to node identifier.
[0165] (6) Determination of the node priority sequence based on identifiers. Nodes determine the node priority sequence based on identifiers for each time-frequency resource block according to the node priority sequence based on indexes and the mapping relationship between indexes and identifiers of the available time-frequency resource blocks in the current period.
[0166] (7) Determination of the right to use time-frequency resource blocks. Nodes first generate a two-hop neighbor list based on the established network topology. This list includes the node itself, the node's one-hop neighbors, and the node's strict two-hop neighbors and their related information. Then, query the positions of the nodes in this list in the priority sequence based on identifiers corresponding to each time-frequency resource block, and determine that the node at the top of the list obtains the right to use the corresponding time-frequency resource block.
[0167] (8) End of resource allocation for this period. Nodes use the corresponding time-frequency resource blocks to transmit data according to the allocation results in the current resource allocation period.
[0168] Based on the above content, it can be seen that the present invention optimizes the generation method of the priority sequence of time-frequency resources, reduces the algorithm complexity while ensuring a certain statistical randomness of the sequence, and maintains the randomness of the priority sequence through the mapping between node indexes and identifiers, realizing the statistical fairness of resource pre-allocation:
[0169] (1) Determination of the node priority sequence based on the index: The node determines the node priority sequence of each time-frequency resource block according to information such as frame count, initial value, etc. and the standard Latin square. This sequence is the sorting sequence of all network node indexes, representing the priority order of nodes using the current time-frequency resource block from high to low;
[0170] (2) Mapping between node index and identifier: The node determines the mapping relationship between the node index and the node identifier of each time-frequency resource block according to information such as frame count, initial value, etc. and the known mapping matrix of index and identifier. This mapping relationship is identified by a sequence, and the data formed by the position and element value of any element in this sequence represents the mapping relationship from node index to node identifier;
[0171] (3) Determination of the node priority sequence based on the identifier: The node determines the node priority sequence based on the identifier of each time-frequency resource block according to the node priority sequence based on the index and the mapping relationship between index and identifier of the currently available time-frequency resource block in the current period.
[0172] Embodiment 2, Figure 2 is a schematic structural diagram of a distributed communication resource allocation system based on a Latin square in Embodiment 2 of the present invention, as Figure 2As shown in the figure, Embodiment 2 provides a distributed communication resource allocation system based on a Latin square, including: a generation matrix module 201, a network synchronization module 202, a construction module 203, a determination index sequence module 204, a generation mapping relationship module 205, a generation priority sequence module 206, and a determination of the right of use attribution module 207. The generation matrix module 201 is used to obtain network parameters to initialize the node identifier, frame structure, and resource allocation period of the communication node, and generate a standard Latin square and an index identifier mapping matrix. The network synchronization module 202 is used to send control messages according to the frame structure period, where the control messages include node clock signals, device status, and neighbor node information, and receive the control messages of other nodes to complete network synchronization. The construction module 203 is used to construct a network topology based on the control messages, where the network topology includes neighbor node information and distance information. The determination index sequence module 204 is used to calculate the first time-frequency resource block number according to the current frame count and the initial value, and use the standard Latin square to determine the node priority index sequence of each time-frequency resource block. The generation mapping relationship module 205 is used to calculate the second time-frequency resource block number according to the current frame count and the initial value, and use the index identifier mapping matrix to generate the mapping relationship between the node index and the identifier. The generation priority sequence module 206 is used to combine the node priority index sequence and the mapping relationship sequence to generate a node priority sequence based on the identifier. The determination of the right of use attribution module 207 is used to generate a list of nodes and their two-hop neighbors based on the network topology, and compare the node priority sequence based on the identifier to determine the right of use attribution of the time-frequency resource block.
[0173] In this embodiment, the generation matrix module 201 includes: a first extraction unit, a first construction unit, and a first generation unit. The first extraction unit is used to obtain the node identifier and frame structure parameters of the communication node, and extract the resource allocation period. The first construction unit is used to construct a standard Latin square according to the resource allocation period and the node identifier. The first generation unit is used to generate an index identifier mapping matrix through the standard Latin square and the frame structure parameters.
[0174] In this embodiment, the network synchronization module 202 includes: a second extraction unit, a judgment unit, and an acquisition unit. The second extraction unit is used to obtain the frame structure parameters to determine the period value, and extract the node identifier to generate a control signal. The judgment unit is used to judge whether the neighbor node information is complete according to the clock signal and the device status information. The acquisition unit is used to complete network synchronization by obtaining the control signal through the receiving end if the neighbor node information is complete.
[0175] In this embodiment, the building module 203 includes: a second building unit, a forming unit, and a third obtaining unit. The second building unit is configured to obtain the neighbor node information and the distance information in the control message and build a network topology. The forming unit is configured to extract the connection relationship between nodes according to the network topology and form a node communication path. The third obtaining unit is configured to, if the node communication path is interrupted, re-obtain the neighbor node distance information to supplement the network topology.
[0176] In this embodiment, the determining index sequence module 204 includes: a first calculating unit and a second generating unit. The first calculating unit is configured to obtain the counting information of the current frame count and calculate the first time-frequency resource number in combination with a preset initial value. The second generating unit is configured to generate a node priority index sequence for each time-frequency resource block based on the first time-frequency resource block number by using the standard Latin square.
[0177] In this embodiment, the generating mapping relationship module 205 includes: a second calculating unit and a third generating unit. The second calculating unit is configured to obtain the counting information of the current frame count and calculate the second time-frequency resource number in combination with a preset initial value. The third generating unit is configured to generate a mapping relationship between a node index and an identifier based on the second time-frequency resource number by using the index identifier mapping matrix.
[0178] In this embodiment, the determining usage right attribution module 207 includes: a fourth generating unit, a querying unit, and a determining unit. The fourth generating unit is configured to obtain the node information in the network topology and generate a list of the node itself, its one-hop neighbors, and its two-hop neighbors. The querying unit is configured to query the sequence position of the node in the list in the identifier-based priority sequence for each time-frequency resource block. The determining unit is configured to, if the sequence position of a certain node is the most pre-order within the two-hop neighbor range, determine that the node obtains the usage right attribution of the time-frequency resource block.
[0179] All the various change modes and specific examples of the distributed communication resource allocation method based on a Latin square provided in the first embodiment are equally applicable to the distributed communication resource allocation system based on a Latin square provided in this embodiment. Through the foregoing detailed description of a distributed communication resource allocation method based on a Latin square, those skilled in the art can clearly know the implementation manner of the distributed communication resource allocation system based on a Latin square in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail herein.
[0180] Embodiment Three Figure 3 is a schematic structural diagram of an electronic device in the third embodiment of the present invention, as Figure 3As shown, Embodiment 3 further provides an electronic device 300, which may include: a processor 301 and a memory 302.
[0181] The memory 302 is used to store programs; the memory 302 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviation: RAM), such as a static random access memory (English: static random-access memory, abbreviation: SRAM), a double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviation: DDR SDRAM), etc.; the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory). The memory 302 is used to store computer programs (such as application programs and functional modules for implementing the above method), computer instructions, etc. The above computer programs, computer instructions, etc. may be partitioned and stored in one or more memories 302. And the above computer programs, computer instructions, data, etc. may be called by the processor 301.
[0182] The above computer programs, computer instructions, etc. may be partitioned and stored in one or more memories 302. And the above computer programs, computer data, etc. may be called by the processor 301.
[0183] The processor 301 is used to execute the computer programs stored in the memory 302 to implement each step in the method involved in the above embodiment. For specific details, please refer to the relevant descriptions in the previous method embodiments.
[0184] The processor 301 and the memory 302 may be independent structures or integrated structures. When the processor 301 and the memory 302 are independent structures, the memory 302 and the processor 301 may be coupled and connected through a bus 303.
[0185] The electronic device in this embodiment may execute the technical solutions in the above method, and the specific implementation process and technical principle are the same, so details are not described here again.
[0186] Embodiment 4 further provides a computer-readable storage medium, including a computer program and instructions. When the computer program or instructions run on a computer, the computer is enabled to execute the distributed communication resource allocation method based on a Latin square according to any embodiment of the present invention.
[0187] Computer-readable storage media include: various media such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0188] This embodiment also provides a computer program product, which includes: a computer program. The computer program is stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to execute the solution provided in any of the above embodiments.
[0189] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the disclosure of the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in the present invention can be achieved. No limitation is imposed herein.
[0190] Note that the above is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments only. Without departing from the concept of the present invention, it can also include more other equivalent embodiments, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A distributed communication resource allocation method based on Latin square, characterized in that: include: Obtain the node identification, frame structure and resource allocation cycle of the network parameter initialization communication node, and generate a standard Latin square matrix and index identification mapping matrix; Send control messages according to the frame structure periodically, the control messages including node clock signals, device status and neighbor node information, and receive the control messages from other nodes to complete network synchronization; Building a network topology based on the control message, wherein the network topology includes neighbor node information and distance information; Calculate the first time-frequency resource block number according to the current frame count and the initial value, and determine the node priority index sequence of each time-frequency resource block using the standard Latin square; Calculate the second time-frequency resource block number according to the current frame count and the initial value, and use the index identifier mapping matrix to generate a mapping relationship between node index and identifier; Combining the node priority index sequence with the mapping relationship sequence to generate an identifier-based node priority sequence; Based on the network topology, a list of nodes and their two-hop neighbors is generated, and the node priority sequence based on the identifier is compared to determine the ownership of the use right of the time-frequency resource block.
2. The distributed communication resource allocation method based on Latin square as claimed in claim 1, characterized in that: The obtaining of the node identification, frame structure and resource allocation cycle of the network parameter initialization communication node and the generation of the standard Latin square and index identification mapping matrix comprises: Obtain the node identification and frame structure parameters of the communication node and extract the resource allocation period; Constructing a standard Latin square according to the resource allocation cycle and the node identifier; An index identification mapping matrix is generated using the standard Latin square and the frame structure parameters.
3. The distributed communication resource allocation method based on Latin square as claimed in claim 2, characterized in that: The sending of control messages according to the frame structure period, wherein the control messages include node clock signals, device status, and neighbor node information, and receiving the control messages from other nodes to complete network synchronization includes: Acquire the frame structure parameter to determine the period value, extract the node identifier to generate a control signal; Determine whether the neighbor node information is complete based on the clock signal and device status information; If the neighbor node information is complete, the control signal is obtained by the receiving end to complete network synchronization.
4. The distributed communication resource allocation method based on Latin square as claimed in claim 1, characterized in that: The network topology constructed based on the control message, wherein the network topology includes neighbor node information and distance information, includes: Obtaining the neighbor node information and the distance information in the control message to construct a network topology; Extracting the connection relationship between nodes according to the network topology to form a node communication path; If the node communication path is interrupted, the neighbor node distance information is re-acquired to supplement the network topology.
5. The distributed communication resource allocation method based on Latin square according to claim 1, characterized in that: The step of calculating the first time-frequency resource block number according to the current frame count and the initial value, and determining the node priority index sequence of each time-frequency resource block using the standard Latin square comprises: Obtaining the count information of the current frame count, and calculating the first time-frequency resource number in combination with a preset initial value; Based on the first time-frequency resource block number, the standard Latin square is used to generate a node priority index sequence for each time-frequency resource block.
6. The distributed communication resource allocation method based on Latin square as claimed in claim 5, characterized in that: The calculating the second time-frequency resource block number according to the current frame count and the initial value, and using the index identifier mapping matrix to generate a mapping relationship between a node index and an identifier includes: Obtaining the count information of the current frame count, and calculating the second time-frequency resource number in combination with a preset initial value; Based on the second time-frequency resource number, the index identifier mapping matrix is used to generate a mapping relationship between node index and identifier.
7. The distributed communication resource allocation method based on Latin square as claimed in claim 1, characterized in that: The generating of a list of nodes and their two-hop neighbors based on the network topology and comparing the node priority sequence based on the identifier to determine the ownership of the use right of the time-frequency resource block includes: Get node information in the network topology and generate a list of the node itself and its one-hop and two-hop neighbors; For each of the time-frequency resource blocks, query the sequence position of the node in the list in the identifier-based priority sequence; If the sequence position of a certain node is the first in the two-hop neighbor range, it is determined that the node obtains the right to use the time-frequency resource block.
8. A distributed communication resource allocation system based on Latin square, characterized in that: include: A matrix generation module is used to obtain the node identification, frame structure and resource allocation cycle of the network parameter initialization communication node, and generate a standard Latin square matrix and an index identification mapping matrix; A network synchronization module is used to send control messages according to the frame structure period, wherein the control messages include node clock signals, device status and neighbor node information, and receive the control messages from other nodes to complete network synchronization; A construction module, configured to construct a network topology based on the control message, wherein the network topology includes neighbor node information and distance information; An index sequence determination module is used to calculate the first time-frequency resource block number according to the current frame count and the initial value, and determine the node priority index sequence of each time-frequency resource block using the standard Latin square; A mapping relationship generating module is used to calculate the second time-frequency resource block number according to the current frame count and the initial value, and use the index identifier mapping matrix to generate a mapping relationship between the node index and the identifier; A priority sequence generation module, used to combine the node priority index sequence with the mapping relationship sequence to generate an identifier-based node priority sequence; The module for determining ownership of usage rights is used to generate a list of nodes and their two-hop neighbors based on the network topology, and to determine ownership of the usage rights of the time-frequency resource blocks by comparing the node priority sequence based on the identifier.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the Latin square-based distributed communication resource allocation method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The method comprises a computer program and instructions. When the computer program or the instructions are executed on a computer, the computer is enabled to execute the Latin square-based distributed communication resource allocation method according to any one of claims 1 to 7.