Heterogeneous network clustering method and device based on improved sea turtle optimization algorithm
By improving the turtle optimization algorithm and combining multi-dimensional indicators and chaotic mapping, the clustering process of a three-dimensional heterogeneous wireless sensor network is optimized, solving the problems of uneven node distribution and excessive energy consumption, and achieving efficient and energy-saving operation and stable coverage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies have failed to effectively address the problems of uneven node distribution, high energy consumption in cross-layer transmission, and the tendency of traditional clustering algorithms to get trapped in local optima in three-dimensional heterogeneous wireless sensor networks.
An improved turtle optimization algorithm is adopted, which optimizes the cluster head election and clustering process by combining multi-objective evaluation functions, Logistic, Tent and Sinusoidal chaotic mapping. By combining multi-dimensional indicators such as node energy, intra-cluster distance and base station distance, the learning rate and elite pool are dynamically adjusted to achieve adaptive clustering.
It significantly improves the optimization efficiency and accuracy of the three-dimensional solution space, reduces energy consumption for cross-layer data transmission, extends network lifetime, and improves network stability and coverage.
Smart Images

Figure CN121815362A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a heterogeneous network clustering method and apparatus based on an improved turtle optimization algorithm, belonging to the field of three-dimensional heterogeneous wireless sensor networks. Background Technology
[0002] Three-dimensional heterogeneous wireless sensor networks (3D-HWSNs) hold significant value in monitoring complex three-dimensional environments. However, their unique characteristics—such as the three-dimensional nature of node deployment, dynamic topology, and heterogeneous node attributes in terms of energy, computing, and communication capabilities—pose serious challenges to network design and optimization, primarily manifested in uneven node energy consumption and short network lifetimes. Clustering, as an effective energy management strategy, is crucial to network performance, especially the optimized design of cluster head election, which is a core component of clustering.
[0003] In existing clustering technologies, cluster head selection logic often has limitations. Most schemes rely on single or a few static indicators such as the remaining energy of nodes or the distance between nodes and base stations, failing to fully and systematically integrate the topological characteristics of three-dimensional space and the multidimensional heterogeneous attributes of nodes. Furthermore, they lack mechanisms to dynamically adjust election weights or rules based on the real-time network operating status. This simplified election method results in a significant degree of randomness and imbalance in the distribution of cluster heads in three-dimensional space: some areas may have excessively dense cluster heads, causing inter-cluster interference and data forwarding conflicts; while other areas may have coverage blind spots due to missing cluster heads, disrupting the integrity of the network topology and consequently impairing the reliability of data transmission and overall coverage.
[0004] Regarding energy consumption, traditional clustering algorithms are not optimized for the three-dimensional communication characteristics of 3D scenes. Their path planning often relies on fixed rules or 2D planar assumptions, making it difficult to effectively cope with non-uniform signal attenuation caused by signal refraction and occlusion in 3D space. This easily leads to unreasonable long-distance transmission across layers, redundant data forwarding, and routing holes, significantly increasing communication energy consumption. In addition, due to the insufficient stability of clustering results, nodes frequently switch between sleep, wake-up, and different operating modes, triggering high-frequency operation of computing and storage modules, thereby generating additional computing and storage energy consumption, further shortening the overall network lifespan.
[0005] Even though existing research has introduced swarm intelligence optimization algorithms to improve clustering, these algorithms still have significant shortcomings when applied to large-scale heterogeneous 3D networks: First, their optimization capabilities are limited, easily getting trapped in local optima and struggling to find globally better clustering solutions; second, the computational process is not optimized for large-scale node deployment in 3D networks, resulting in large amounts of redundant computation, low execution efficiency, and difficulty in meeting the real-time clustering requirements of dynamically changing networks; third, they have poor scene adaptability, insufficient robustness to dynamic topological changes caused by complex 3D terrain, and weak anti-interference performance; finally, the convergence judgment mechanism of the algorithms is often imperfect, easily leading to premature termination or excessive invalid iterations before convergence, wasting valuable computational resources and failing to guarantee the stability and superiority of the final clustering solution. Summary of the Invention
[0006] This invention aims to solve the problems of uneven node distribution, high energy consumption of cross-layer transmission, and the tendency of traditional clustering algorithms to get trapped in local optima in the three-dimensional solution space in three-dimensional heterogeneous wireless sensor networks. It proposes a heterogeneous network clustering method and device based on an improved turtle optimization algorithm.
[0007] The technical solution of this invention:
[0008] A heterogeneous network clustering method based on an improved turtle optimization algorithm includes the following steps: S1. Preprocessing: The weight parameters of the multi-objective evaluation function are determined by simulating the clustering process. The weight parameters include energy weight, intra-cluster distance weight factor and base station distance weight factor. The core network parameters and core algorithm parameters are also set. S2. Population initialization: Based on the energy and location characteristics of heterogeneous nodes, a basic initial population is constructed, and a perturbation optimization initial solution is generated through Logistic chaotic mapping to generate an initial clustering scheme. S3. Elite Pool Initialization: Construct an elite pool and select high-quality clustering schemes to accelerate algorithm convergence; S4. Calculate fitness value: Enter the main iteration loop and calculate the fitness value of each clustering scheme in the current population; S5. Update Learning Rate: Update the learning rate based on the current iteration number and determine the current iteration stage; S6. Chaotic Mutation and Diversity Enhancement: Based on the iteration stage determined in S5, the corresponding chaotic mapping method is adaptively switched. The chaotic mapping methods include Logistic mapping, Tent mapping, and Sinusoidal mapping, and the population diversity coefficient is calculated. S7. Elite Pool Update: Reassess population fitness, merge the current population with the previous generation's elite pool, screen and verify elite individuals, and dynamically adjust the number of elite pools based on population diversity. S8. Update the population: Generate a new clustering scheme based on the elite pool guidance and chaotic perturbation, replace the worst individual, and record the current best solution; S9. Algorithm Termination: Repeat the process of updating the learning rate, chaotic mutation and diversity enhancement, elite pool update and population update until the preset number of iterations is reached or the algorithm termination condition is met, and output the final clustering scheme.
[0009] Specifically, step S2 includes the following steps:
[0010] S21. Initial Population Generation: The population is a three-dimensional matrix. Its dimension is determined by the number of cluster heads. Number of work rounds Population size The basic clustering scheme is determined jointly; each individual in the population corresponds to a set of basic clustering schemes, which are generated in the following way:
[0011] Cluster head selection: Randomly selected from all heterogeneous nodes. Each node serves as the initial cluster head, and its three-dimensional coordinates are recorded.
[0012] Work status assignment: Randomly assign a work status value to each cluster head in L work rounds, where the work status value is 0 or 1, and restrict each cluster head to be randomly selected to work in a preset number of rounds in L rounds;
[0013] S22. Generate a chaotic sequence matrix using Logistic chaotic mapping. Chaotic sequence value The iterative formula is:
[0014]
[0015] in, For the first Replace the chaotic sequence values, initial values The chaotic sequence matrix consists of uniformly distributed random numbers between 0 and 1. The dimension is consistent with the dimension of the basic initial population matrix.
[0016] S23. Chaotic Perturbation Optimization of Initial Population: Perform chaotic perturbation on the basic initial population:
[0017]
[0018] in, For the perturbation of the first Individuals in a population, the first The state / coordinate value of each cluster head in round t; The original value at the corresponding position in the initial population; This represents the chaotic value at the corresponding position in the chaotic sequence matrix. For chaotic perturbation coefficients, 3D deployment space range.
[0019] Specifically, step S3 includes the following steps:
[0020] S31. Elite Quantity Calculation:
[0021]
[0022] The `round()` function rounds the integer part to the nearest integer. For population size, For the proportion of elites, [ , [This represents an upper and lower limit constraint on the number of elites;]
[0023] S32. Initial Elite Selection: The initial population after perturbation is sorted in ascending order of cluster fitness. The lower the fitness, the better the clustering scheme. The top elites are selected. Each individual is filled into the elite pool, and the corresponding fitness value is recorded.
[0024] Specifically, step S4, calculating the fitness value, is as follows:
[0025] based on Calculate fitness, focusing on core clustering performance:
[0026]
[0027]
[0028] = /
[0029]
[0030] in, For energy weighting, The intra-cluster distance weighting factor. The distance weighting factor is the base station distance. To normalize the total remaining energy of the cluster head, This is the maximum value among all remaining energy values of the cluster heads; The normalized total distance within the cluster, The sum of the three-dimensional distances between all nodes within a cluster and their corresponding cluster heads. This represents the maximum value among the three-dimensional distances between all nodes within a cluster and their corresponding cluster heads. For the normalized cluster head-to-base station total distance, The fitness value is the maximum value among all three-dimensional distances between cluster heads and the base station; the smaller the fitness value, the better the clustering scheme.
[0031] Specifically, step S5 updates the learning rate using the following formula:
[0032]
[0033] Where t is the current iteration number, The initial learning rate, For the final learning rate, This represents the maximum number of iterations.
[0034] Specifically, step S6 includes the following steps:
[0035] S61. Chaotic Map Switching: Update the switching threshold according to the iteration progress. Adaptable to different optimization stages:
[0036] like <0.3: then use Logistic chaotic mapping;
[0037] If 0.3≤ <0.7: Then the Tent chaotic mapping is used, and its iterative formula is:
[0038]
[0039] like ≥0.7: Then the Sinusoidal chaotic mapping is used, and its iterative formula is:
[0040] ;
[0041] S62. Calculation of population diversity coefficient:
[0042]
[0043] in, Differences in individual clustering schemes for population size The average Euclidean distance of the cluster heads:
[0044]
[0045] in, For the number of clusters, For the first Among the individuals in the population, the first A cluster of heads and Axis coordinates For the first Among the individuals in the population, the first A cluster of heads Axis coordinates.
[0046] Specifically, step S7 includes the following steps:
[0047] S71. Calculate the population fitness again;
[0048] S72. Elite Candidate Set Construction and Initial Screening: Merge the current population with the previous generation's elite pool, sort them in ascending order of fitness, and select the top 2. Individuals are selected as core candidates before further screening. One as initial elite candidates;
[0049] S73, Elite Diversity Verification and Dynamic Adjustment:
[0050] Calculate the cluster head coordinate distance between any two initial elite candidates:
[0051]
[0052] in, The average distance between the cluster head coordinates of the two elite candidate clustering schemes. For the first A number of elite candidate clustering schemes For the first A number of elite candidate clustering schemes For the first Among the elite candidate solutions, the first The state of each cluster head For the first Among the elite candidate solutions, the first The status of each cluster head;
[0053] like < If the clustering scheme is deemed similar, only individuals with better fitness will be retained.
[0054] If the number of elites is not reached after verification If the minimum number of elites is reached, a supplementary selection will be made; if it exceeds this limit... The upper limit on the number of elites is then reduced, and the number of elites is dynamically adjusted based on the population diversity coefficient.
[0055] .
[0056] Specifically, step S8 includes the following steps:
[0057] S81. Generate the chaotic perturbation matrix, and its calculation formula is as follows:
[0058]
[0059] S82. Calculate the mean of the elite cluster heads using the following formula:
[0060]
[0061] in, ;
[0062] S83. Generate a new clustering scheme, the formula is:
[0063]
[0064] in, This represents the cluster head state of the current optimal clustering scheme. =0.3 is the elite guidance coefficient;
[0065] S84. Apply boundary constraints to the newly generated individuals to ensure that the cluster head coordinates are within the specified range. Within the range, the working status is {0,1};
[0066] S85, worst-case replacement;
[0067] S851. Calculate the number of individuals that need to be replaced. The calculation formula is:
[0068]
[0069] S852. A small perturbation is applied to the individuals in the elite pool. The perturbation formula is as follows:
[0070]
[0071] in, , This is the fine-tuning coefficient;
[0072] S853, using the optimal elite pool after perturbation. One option is to replace the worst-performing member in the current population. One option;
[0073] S86. Select the clustering scheme with the best fitness from the updated population as the temporary optimal solution for this round of iteration, and record its fitness value and cluster head configuration information for subsequent convergence judgment.
[0074] Specifically, the algorithm termination condition in step S9 includes the simultaneous satisfaction of the following three conditions:
[0075] Current iteration number >50;
[0076] The fitness value of the best individual in the last 20 generations fluctuates less than a threshold, i.e., it satisfies:
[0077]
[0078] The current population diversity is below 50% of the threshold: that is, it meets the following conditions. <0.5< .
[0079] A heterogeneous network clustering device based on an improved turtle optimization algorithm includes:
[0080] The data acquisition module includes a sensor module and an A / D converter. The sensor module is responsible for collecting various status information of nodes in the heterogeneous network; the A / D converter converts the collected analog signals into digital signals.
[0081] The module processing and control module includes a microprocessor and a memory, wherein the microprocessor runs the heterogeneous network clustering method based on the improved turtle optimization algorithm as described in any one of claims 1 to 9, and the memory is used to store algorithm parameters, intermediate results and clustering schemes;
[0082] A power supply module is used to provide power support for the data acquisition module and the module processing and control module.
[0083] The beneficial effects of this invention are:
[0084] 1. To address the issues of dispersed node distribution and excessive energy consumption in cross-layer transmission in 3D scenes, a 3D hierarchical pseudo-clustering model is proposed. Based on the three-dimensional characteristics of the network, an adaptive hierarchical design is achieved. By scientifically dividing the vertical dimension of the hierarchy, the distribution of nodes in each layer is balanced, thereby reducing the energy loss of cross-layer data transmission from the perspective of topology.
[0085] 2. Breaking through the limitations of traditional single-index screening of initial cluster heads, this method integrates multiple-dimensional indicators such as node energy, intra-cluster distance, and cluster head-base station distance for pseudo-clustering. This not only effectively improves the quality of the initial solution and avoids inefficient iterations in the subsequent optimization process, but also further reduces the overall network energy consumption through the reasonable layout of initial cluster heads, laying a solid foundation for the efficient and energy-saving operation of 3D-HWSNs.
[0086] 3. To address the issue of single chaotic mappings easily getting trapped in local optima and exhibiting significant search bias in 3D solution space optimization, a multi-stage chaotic fusion operator is designed. This innovatively utilizes three complementary chaotic mappings—Logistic, Tent, and Sinusoidal—in stages: In the initial iteration, the strong global exploration capability of the Logistic mapping is leveraged to achieve broad-area coverage search of the 3D solution space, ensuring no potential high-quality cluster head solutions are overlooked; in the middle stage, the Tent mapping is switched to, utilizing its balanced exploration and development characteristics to gradually focus on high-quality solution regions while expanding the search range, preventing the algorithm from falling into blind search; in the later stage, the precise convergence characteristic of the Sinusoidal mapping is employed to deeply optimize the optimal solution clusters and lock in the optimal cluster head configuration. This dynamic combination mode ensures both the breadth of optimization and accelerates the convergence pace, significantly improving the optimization efficiency and accuracy of the 3D solution space. Attached Figure Description
[0087] Figure 1 This is a schematic diagram of the overall process of the method of the present invention;
[0088] Figure 2 The simulation comparison of the fitness of the method of this invention with three algorithms: LEACH, IS-k-means, and SEP-M is shown in the figure.
[0089] Figure 3 This is a structural diagram of the device of the present invention. Detailed Implementation
[0090] Example 1:
[0091] like Figure 1 As shown, the steps of the heterogeneous network clustering method and apparatus based on the Chaotic Enhanced Turtle Algorithm (CETA) in this embodiment are as follows:
[0092] 1. Preprocessing stage:
[0093] To determine the weight parameters of the multi-objective evaluation function and lay the foundation for cluster optimization, the following operations are performed:
[0094] (1) Clustering simulation and weighting: The distribution scenario of 3D heterogeneous sensor nodes is simulated. Multiple swarm intelligence algorithms such as PSO and GA are used to iteratively simulate the clustering process and select the combination of weight parameters that optimizes the energy consumption balance and cluster size balance of the clusters. For energy weight, Intra-cluster distance weighting factor (As a base station distance weighting factor), ensuring that the evaluation indicators focus on the core performance of the cluster.
[0095] (2) Basic parameter settings:
[0096] Core network parameters: Total number of heterogeneous sensor nodes =200, 3D deployment space range = Number of clusters =20 (the total number of cluster heads is determined according to the proportion of the number of nodes), the three-dimensional coordinates of the base station (BS) are (75,75,75);
[0097] Core algorithm parameter: Population size =100, Maximum number of iterations =100, initial learning rate =1.0, final learning rate =0.03, Elite Ratio =0.2, upper and lower limits of elite numbers =4 / =8. Chaotic perturbation coefficient =0.05, fine-tuning coefficient =0.1, Distance threshold =0.02, convergence fluctuation threshold =3e−5.
[0098] 2. Population initialization:
[0099] Based on the energy and location characteristics of heterogeneous nodes, a basic initial population is first constructed. Then, a perturbation optimization initial solution is generated through Logistic chaotic mapping to ensure that the initial clustering scheme covers the key regions of the 3D solution space and is free from homogenization.
[0100] (1) Basic initial population generation: The population is a three-dimensional matrix The dimension is "number of cluster heads". =20" × "Number of work rounds" =50”דPopulation Size” =100”; Each individual in the population corresponds to a basic clustering scheme:
[0101] Cluster head selection: 20 nodes are randomly selected from 200 heterogeneous nodes as initial cluster heads, and their 3D coordinates are recorded. , The cluster heads are numbered, ranging from [1 to 20].
[0102] Working status assignment: Randomly assign values to each cluster head during 50 working cycles. ∈{0,1} (0 represents active, 1 represents dormant), and restrict each cluster head from Randomly selected from each round Each round of work forms =100 basic initial solutions.
[0103] (2) Generation of Logistic Chaotic Sequences (Preparation before Perturbation):
[0104]
[0105] in For the first Replace the chaotic sequence values, initial values Generate a chaotic sequence matrix matching the initial population dimension using uniformly distributed random numbers between 0 and 1. (20×50×100).
[0106] (3) Chaotic perturbation optimization of the initial population: Chaotic perturbation is performed on the basic initial population to break homogeneity and expand the solution space coverage:
[0107]
[0108] in: For the perturbation of the first Individuals in a population, the first The state / coordinate value of each cluster head in round t; The original value at the corresponding position in the initial population; The chaotic value at the corresponding position in the chaotic sequence matrix, ( -0.5) causes the disturbance to fluctuate bidirectionally around the value of 0. Control the disturbance amplitude to ensure that the cluster head coordinates are within the range of... =[0,150]3, the working status value is still {0,1} after rounding.
[0109] 3. Elite Pool Initialization:
[0110] To build an elite pool and retain high-quality clustering schemes, accelerating algorithm convergence, the core steps are as follows:
[0111] (1) Elite number calculation (balancing population size and optimal solution retention requirements):
[0112]
[0113] The `round()` function rounds the integer part to the nearest integer. , This sets upper and lower limits for the number of elites, avoiding computational redundancy due to excessive size or insufficient guidance due to insufficient size.
[0114] (2) Initial elite selection: The initial population after perturbation is sorted in ascending order of cluster fitness (the lower the fitness, the better the clustering scheme), and the top elites are selected. Each individual is filled into the elite pool, and the corresponding fitness value is recorded.
[0115] 4. Calculate fitness value
[0116] Population fitness value assessment: based on , , Calculate fitness, focusing on core clustering performance:
[0117]
[0118]
[0119] = /
[0120]
[0121] in, For energy weighting, The intra-cluster distance weighting factor. The distance weighting factor is the base station distance. To normalize the total remaining energy of the cluster head, This is the maximum value among all remaining energy values of the cluster heads; The normalized total distance within the cluster, The sum of the three-dimensional distances between all nodes within a cluster and their corresponding cluster heads. It represents the maximum value among all three-dimensional distances between nodes within a cluster and their corresponding cluster heads.
[0122] 5. Adaptive parameter update (start of main algorithm loop):
[0123] The calculation and switching of dynamic parameters required for iteration are completed in one go, providing a benchmark for subsequent optimization:
[0124] (1) Dynamic learning rate adjustment: The learning rate decreases linearly with the iteration progress, balancing global exploration and local convergence:
[0125]
[0126] Where t is the current iteration number. (Large early-stage values) Enhance global exploration of chaotic perturbations. (Small value in the later stage) Focus on the clustering scheme with optimal local energy consumption.
[0127] (2) Chaotic mapping switching: Update the switching threshold according to the iteration progress. Adaptable to different optimization stages:
[0128] like <0.3: Use Logistic mapping (Equation 15) to enhance global coverage of the clustered solution space;
[0129] If 0.3≤ <0.7: Using Tent mappings to balance exploration and development:
[0130]
[0131] like ≥0.7: Use Sinusoidal mapping to enhance local precision convergence.
[0132]
[0133] (3) Population diversity coefficient calculation: Characterizes the overall difference of the current clustering scheme and provides a basis for subsequent perturbation and replacement:
[0134]
[0135] Among them, individual clustering scheme differences The average Euclidean distance of the cluster heads:
[0136]
[0137] in, Let X, Y, and Z be the coordinates of the k-th cluster head in the i-th individual of the population. Let X, Y, and Z be the coordinates of the k-th cluster head in the j-th population.
[0138] constraint ∈[0.2,0.8], the larger the value, the stronger the chaotic perturbation and the higher the diversity of clustering schemes.
[0139] 6. Elite Pool Update:
[0140] Integrating fitness assessment, candidate set construction, elite verification, and dynamic adjustment ensures a high-quality and diverse elite pool.
[0141] (1) Population fitness reassessment, the formula is the same as the fitness value calculation.
[0142] (2) Construction and initial screening of the elite candidate set: The current population is merged with the previous generation's elite pool, and the top 2 are selected after being sorted in ascending order of fitness. Individuals are selected as core candidates before further screening. One was selected as an initial elite candidate.
[0143] (3) Elite diversity verification and dynamic adjustment:
[0144] Calculate the cluster head coordinate distance between any two initial elite candidates:
[0145]
[0146] in, The average distance between the cluster head coordinates of the two elite candidate clustering schemes. For the p-th elite candidate clustering scheme, For the q-th elite candidate clustering scheme, Let represent the state (coordinates) of the k-th cluster head in the p-th elite candidate scheme. This represents the state (coordinates) of the k-th cluster head in the q-th elite candidate scheme.
[0147] like < If the clustering scheme is deemed similar, only individuals with better fitness will be retained.
[0148] If the number of elites is not reached after verification Then a supplementary election will be held if more than [number missing] votes are taken. Then, the population is pruned, and the number of elites is dynamically adjusted based on the population diversity coefficient:
[0149]
[0150] 7. Population Renewal
[0151] By merging the generation of new clustering schemes, boundary constraints, and worst-case individual replacement, the population iterative update is completed.
[0152] (1) Elite guidance + chaotic perturbation to generate new solutions:
[0153] Generate the chaotic perturbation matrix:
[0154]
[0155] Calculate the mean of the elite cluster heads:
[0156]
[0157] in, This represents the state (coordinates) of the kth cluster head within the eth elite individual.
[0158] Generate a new clustering scheme:
[0159]
[0160] This represents the cluster head state of the current optimal clustering scheme. =0.3 is the elite guiding coefficient); boundary constraints: ensure that the cluster head coordinates are within... Within the range, the working status is {0,1}.
[0161] (2) Replacement of the worst individual:
[0162] Calculate the number of replacements:
[0163]
[0164] Small disturbance in elites:
[0165]
[0166] in, This represents the state (coordinates) of the k-th cluster head in the e-th elite individual after a slight perturbation. This is the fine-tuning coefficient;
[0167] Replacement execution: Use the best one from the perturbed elite pool One option is to replace the worst-performing member in the current population. One option.
[0168] The clustering scheme with the best fitness is selected as the temporary optimal solution for this round of iteration, and its fitness value and cluster head configuration are recorded to provide a basis for convergence checking.
[0169] 8. Algorithm terminates
[0170] Repeat the above operations of adaptive parameter update, elite pool update, and population update until the preset number of iterations T is reached or the following algorithm termination condition is met:
[0171] (1) Current iteration number >50 ensures the algorithm has passed the initial fluctuation phase.
[0172] (2) The fitness value of the best individual in the last 20 generations fluctuates less than the threshold:
[0173]
[0174] The fluctuation threshold was determined experimentally to ensure that the solution is stable.
[0175] (3) The current population diversity is below 50% of the threshold: <0.5< This indicates that the population has become highly convergent to the vicinity of the optimal solution.
[0176] If the algorithm satisfies all three conditions mentioned above, it proves that the algorithm has entered the convergence phase. To avoid wasting computational resources, subsequent iterations will no longer update the population and will directly use the current global optimal solution until the maximum number of iterations is reached and the algorithm terminates.
[0177] Example 2:
[0178] To verify the performance of this invention, a simulation experiment was conducted in this embodiment. The experimental configuration is as follows: the number of sensor nodes is specifically set to 200, and the nodes are randomly deployed in the 3D sensing area with fixed positions; the 3D sensing area range is... The range of distances is set to 0-150 meters, meaning the X, Y, and Z axes all fall within this range. Base stations are deployed in the middle layer for convenient data aggregation. The initial node energy is 100.0 joules. The maximum number of simulation rounds is set to 1500, which is the maximum number of rounds that will terminate the simulation. The maximum number of iterations is set to 200, and the number of clusters is uniformly configured to 12, meaning the entire network is divided into 12 clusters. The node communication radius is 40 meters, which is the upper limit of the effective communication distance between nodes. Based on the initial node distribution, the layering thresholds are set to 30 meters and 70 meters, thus dividing the network into three layers: the lower layer is less than 30 meters on the Z-axis, the middle layer is 30-70 meters, and the upper layer is greater than 70 meters. The improved turtle optimization algorithm proposed in this invention is compared with three other algorithms: LEACH, IS-k-means, and SEP-M. Experimental results are as follows: Figure 2 As shown in the figure, the algorithm of this invention has the lowest convergence fitness value and the fastest convergence speed, significantly outperforming other comparative algorithms. This verifies the effectiveness of this invention in improving clustering performance and reducing network energy consumption.
[0179] Example 3:
[0180] like Figure 3 As shown, a heterogeneous network clustering device based on an improved turtle optimization algorithm is provided. The device performs the steps of a heterogeneous network clustering method based on an improved turtle optimization algorithm as described in Example 1.
[0181] 1. Data Acquisition Module: This module includes a sensor module and an A / D converter. The sensor module is responsible for collecting various state information of nodes in the heterogeneous network, such as the node's energy level and connectivity with neighboring nodes. The A / D converter converts the acquired analog signals into digital signals for subsequent processing.
[0182] 2. Module processing and control module:
[0183] (1) Microprocessor: The microprocessor in this device runs the improved Turtle Optimization Algorithm. The improved Turtle Optimization Algorithm fully considers the characteristics of heterogeneous networks and adjusts the algorithm based on factors such as the different energy levels and transmission ranges of network nodes. Simultaneously, during algorithm operation, relevant settings, such as chaotic mapping and population diversity, can be dynamically adjusted to improve the algorithm's convergence speed and optimization capability. The microprocessor uses the collected data to determine the clustering scheme of heterogeneous network nodes by running the improved Turtle Optimization Algorithm.
[0184] (2) Memory: Used to store the parameters of the improved turtle optimization algorithm, intermediate results during the algorithm's operation, and the final clustering scheme. The memory ensures stable data storage and fast retrieval, guaranteeing the efficient operation of the device.
[0185] 3. Power supply module: Provides stable power support for the entire device, ensuring that the data acquisition module, module processing and control module can work normally.
Claims
1. A heterogeneous network clustering method based on an improved turtle optimization algorithm, characterized in that, Includes the following steps: S1. Preprocessing: The weight parameters of the multi-objective evaluation function are determined by simulating the clustering process. The weight parameters include energy weight, intra-cluster distance weight factor and base station distance weight factor. The core network parameters and core algorithm parameters are also set. S2. Population initialization: Based on the energy and location characteristics of heterogeneous nodes, a basic initial population is constructed, and a perturbation optimization initial solution is generated through Logistic chaotic mapping to generate an initial clustering scheme. S3. Elite Pool Initialization: Construct an elite pool and select high-quality clustering schemes to accelerate algorithm convergence; S4. Calculate fitness value: Enter the main iteration loop and calculate the fitness value of each clustering scheme in the current population; S5. Update Learning Rate: Update the learning rate based on the current iteration number and determine the current iteration stage; S6. Chaotic Mutation and Diversity Enhancement: Based on the iteration stage determined in S5, the corresponding chaotic mapping method is adaptively switched. The chaotic mapping methods include Logistic mapping, Tent mapping, and Sinusoidal mapping, and the population diversity coefficient is calculated. S7. Elite Pool Update: Reassess population fitness, merge the current population with the previous generation's elite pool, screen and verify elite individuals, and dynamically adjust the number of elite pools based on population diversity. S8. Update the population: Generate a new clustering scheme based on the elite pool guidance and chaotic perturbation, replace the worst individual, and record the current best solution; S9. Algorithm Termination: Repeat the process of updating the learning rate, chaotic mutation and diversity enhancement, elite pool update and population update until the preset number of iterations is reached or the algorithm termination condition is met, and output the final clustering scheme.
2. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 1, characterized in that, Step S2 includes the following steps: S21. Initial Population Generation: The population is a three-dimensional matrix. Its dimension is determined by the number of cluster heads. Number of work rounds Population size The basic clustering scheme is determined jointly; each individual in the population corresponds to a set of basic clustering schemes, which are generated in the following way: Cluster head selection: Randomly selected from all heterogeneous nodes. Each node serves as the initial cluster head, and its three-dimensional coordinates are recorded. Work status assignment: Randomly assign a work status value to each cluster head in L work rounds, where the work status value is 0 or 1, and restrict each cluster head to be randomly selected to work in a preset number of rounds in L rounds; S22. Generate a chaotic sequence matrix using Logistic chaotic mapping. Chaotic sequence value The iterative formula is: ; in, For the first Replace the chaotic sequence values, initial values The chaotic sequence matrix consists of uniformly distributed random numbers between 0 and 1. The dimension is consistent with the dimension of the basic initial population matrix; S23. Chaotic Perturbation Optimization of Initial Population: Perform chaotic perturbation on the basic initial population: ; in, For the perturbation of the first Individuals in a population, the first The state / coordinate value of each cluster head in round t; The original value at the corresponding position in the initial population; This represents the chaotic value at the corresponding position in the chaotic sequence matrix. For chaotic perturbation coefficients, 3D deployment space range.
3. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 3, characterized in that, Step S3 includes the following steps: S31. Elite Quantity Calculation: ; The `round()` function rounds the integer part to the nearest integer. For population size, For the proportion of elites, [ , [This represents an upper and lower limit constraint on the number of elites;] S32. Initial Elite Selection: The initial population after perturbation is sorted in ascending order of cluster fitness. The lower the fitness, the better the clustering scheme. The top elites are selected. Each individual is filled into the elite pool, and the corresponding fitness value is recorded.
4. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 4, characterized in that, Step S4, calculating the fitness value, specifically involves: based on Calculate fitness, focusing on core clustering performance: ; ; = / ; ; in, For energy weighting, The intra-cluster distance weighting factor. The distance weighting factor is the base station distance. To normalize the total remaining energy of the cluster head, This is the maximum value among all remaining energy values of the cluster heads; The normalized total distance within the cluster, The sum of the three-dimensional distances between all nodes within a cluster and their corresponding cluster heads. This represents the maximum value among the three-dimensional distances between all nodes within a cluster and their corresponding cluster heads. For the normalized cluster head-to-base station total distance, The fitness value is the maximum value among all three-dimensional distances between cluster heads and the base station; the smaller the fitness value, the better the clustering scheme.
5. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 5, characterized in that, Step S5 updates the learning rate using the following formula: ; Where t is the current iteration number, The initial learning rate, For the final learning rate, This represents the maximum number of iterations.
6. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 6, characterized in that, Step S6 includes the following steps: S61. Chaotic Map Switching: Update the switching threshold according to the iteration progress. Adaptable to different optimization stages: like <0.3: then use Logistic chaotic mapping; If 0.3≤ <0.7: Then the Tent chaotic mapping is used, and its iterative formula is: ; like ≥0.7: Then the Sinusoidal chaotic mapping is used, and its iterative formula is: ; S62. Calculation of population diversity coefficient: ; in, Differences in individual clustering schemes for population size The average Euclidean distance of the cluster heads: ; in, For the number of clusters, For the first Among the individuals in the population, the first A cluster of heads and Axis coordinates For the first Among the individuals in the population, the first A cluster of heads Axis coordinates.
7. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 7, characterized in that, Step S7 includes the following steps: S71. Calculate the population fitness again; S72. Elite Candidate Set Construction and Initial Screening: Merge the current population with the previous generation's elite pool, sort them in ascending order of fitness, and select the top 2. Individuals are selected as core candidates before further screening. One as initial elite candidates; S73, Elite Diversity Verification and Dynamic Adjustment: Calculate the cluster head coordinate distance between any two initial elite candidates: ; in, The average distance between the cluster head coordinates of the two elite candidate clustering schemes. For the first A number of elite candidate clustering schemes For the first A number of elite candidate clustering schemes For the first Among the elite candidate solutions, the first The state of each cluster head For the first Among the elite candidate solutions, the first The status of each cluster head; like < If the clustering scheme is deemed similar, only individuals with better fitness will be retained. If the number of elites is not reached after verification If the minimum number of elites is reached, a supplementary selection will be made; if it exceeds this limit... The upper limit on the number of elites is then reduced, and the number of elites is dynamically adjusted based on the population diversity coefficient. 。 8. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 8, characterized in that, Step S8 includes the following steps: S81. Generate the chaotic perturbation matrix, and its calculation formula is as follows: ; S82. Calculate the mean of the elite cluster heads using the following formula: ; in, ; S83. Generate a new clustering scheme, the formula is: ; in, This represents the cluster head state of the current optimal clustering scheme. =0.3 is the elite guidance coefficient; S84. Apply boundary constraints to the newly generated individuals to ensure that the cluster head coordinates are within the specified range. Within the range, the working status is {0,1}; S85, worst-case replacement; S851. Calculate the number of individuals that need to be replaced. The calculation formula is: ; S852. A small perturbation is applied to the individuals in the elite pool. The perturbation formula is as follows: ; in, , This is the fine-tuning coefficient; S853, using the optimal elite pool after perturbation. One option is to replace the worst-performing member in the current population. One option; S86. Select the clustering scheme with the best fitness from the updated population as the temporary optimal solution for this round of iteration, and record its fitness value and cluster head configuration information for subsequent convergence judgment.
9. The heterogeneous network clustering method based on the improved turtle optimization algorithm according to claim 1, characterized in that, The specific termination conditions for step S9 include the simultaneous fulfillment of the following three conditions: Current iteration number >50; The fitness value of the best individual in the last 20 generations fluctuates less than a threshold, i.e., it satisfies: ; The current population diversity is below 50% of the threshold: that is, it meets the following conditions. <0.5< .
10. A heterogeneous network clustering device based on an improved turtle optimization algorithm, characterized in that, include: The data acquisition module includes a sensor module and an A / D converter. The sensor module is responsible for collecting various status information of nodes in the heterogeneous network; the A / D converter converts the collected analog signals into digital signals. The module processing and control module includes a microprocessor and a memory, wherein the microprocessor runs the heterogeneous network clustering method based on the improved turtle optimization algorithm as described in any one of claims 1 to 9, and the memory is used to store algorithm parameters, intermediate results and clustering schemes; A power supply module is used to provide power support for the data acquisition module and the module processing and control module.