Wireless network AP optimization method based on improved artificial fish swarm algorithm and K-means algorithm

Through the combination of improved artificial fish school algorithm and K-means algorithm, the optimization problem of wireless network AP in three-dimensional space is solved, the service quality of wireless network and the accuracy of clustering algorithm are improved, and efficient optimization of wireless network AP is achieved.

CN115643592BActive Publication Date: 2025-08-29NORTHWEST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211114878.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2025-08-29
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

When the coverage rate and number of nodes of the wireless sensor network reach the limit, how to improve network throughput to ensure service quality, especially in the optimization of wireless network AP layout in three-dimensional space, the prior art has the problem of large fluctuations in clustering results and low accuracy.

Method used

Combining the improved artificial fish school algorithm and K-means algorithm, by modifying the parameters of the artificial fish school algorithm and introducing three-dimensional environmental factors, finding the initial centroid, and using the K-means algorithm for cluster analysis, optimize the deployment of wireless network AP.

Benefits of technology

The service quality of wireless networks is improved, the volatility and accuracy of clustering results is solved, the wireless network AP optimization in three-dimensional areas is realized, and the solution speed and accuracy of clustering algorithms are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643592B_ABST
    Figure CN115643592B_ABST
Patent Text Reader

Abstract

The present invention discloses a wireless network AP optimization method based on an improved artificial fish swarm algorithm and a K-means algorithm. The method specifically includes the following steps: first, using the improved artificial fish swarm algorithm to find a better initial centroid, and then performing cluster analysis through the K-means algorithm to calculate the AP location information required to meet the wireless network AP service quality assurance. The results are fed back to the relevant departments for redeployment of the wireless network AP, and the above steps are repeated until the adjusted wireless network AP service quality can meet the Internet access needs of teachers and students. The beneficial effect of the present invention is that compared with the previous wireless network AP optimization process, the present invention solves the optimization problem of the wireless network AP under a three-dimensional perspective, introduces the improved artificial fish swarm algorithm to find the initial centroid, so that the clustering effect is better and the efficiency is higher, thereby more effectively solving the optimization problem of the wireless network AP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things applications and relates to a wireless network AP optimization method, in particular to a wireless network AP optimization method based on an improved artificial fish swarm algorithm and a K-means algorithm. Background Art

[0002] As wireless sensor network coverage and node count reach their limits, improving network throughput to ensure service quality has become a pressing challenge in wireless network AP deployment. Many researchers have proposed optimizing wireless network AP deployment based on campus big data, leveraging the location information of teachers and students within the campus to identify suitable AP nodes. The K-means clustering algorithm is often used to address this problem. Traditional K-means algorithms, when used to solve this problem, randomly select initial centroids, resulting in large fluctuations in clustering results and low accuracy. However, swarm intelligence algorithms offer excellent parallelism and autonomous exploration capabilities. Therefore, some researchers have proposed combining clustering with optimization algorithms, transforming the clustering problem into an optimization problem to address the shortcomings of the K-means algorithm in the clustering process. This approach provides new insights and approaches for solving clustering problems. Furthermore, traditional wireless network AP optimization solutions primarily focus on clustering in two-dimensional areas, without addressing three-dimensional clustering. Summary of the Invention

[0003] The present invention aims to address the aforementioned issues by proposing a wireless network AP optimization method based on a modified artificial fish swarm algorithm (AFSA) and a K-means algorithm. This method modifies the parameters of the AFSA and combines them with the K-means algorithm, resolving the K-means algorithm's sensitivity to initialization parameters. Furthermore, based on actual environments, floor level factors are incorporated into the experiment to optimize wireless network APs in a three-dimensional area, improving the quality of service (QoS).

[0004] The purpose of the present invention can be achieved through the following technical solutions:

[0005] A wireless network AP optimization method based on an improved artificial fish swarm algorithm and a K-means algorithm. The calculation formula of the improved artificial fish swarm algorithm is as follows:

[0006] Step=Step0×a+Step max ;

[0007] a=exp(-10((gen-1) / Max_Gen)∧3);

[0008] gen represents the number of rounds executed by the artificial fish school, Max_Gen represents the maximum number of rounds of the fish school behavior, Step represents the step size, Step0 represents the initial step size, and Stepmax represents the maximum step size;

[0009] An improved artificial fish swarm algorithm is used to find the initial centroid, and the K-means algorithm is used to perform cluster analysis on the initial centroid. The results of the cluster analysis are used to optimize wireless network APs in three-dimensional space.

[0010] Optionally, the method includes the following steps:

[0011] Step 1: Obtain the number of connections to wireless network AP nodes and the three-dimensional coordinate data of the teacher and student locations;

[0012] Step 2: Evaluate the traffic usage of the current wireless network AP nodes and determine whether wireless network AP optimization is needed;

[0013] Step 3: Use a combination of the improved artificial fish swarm algorithm and the K-means algorithm to perform cluster analysis on the three-dimensional coordinate data of the teacher and student locations of the wireless network AP nodes that need to be optimized. The obtained centroid coordinates are the deployment locations of the wireless network AP nodes.

[0014] Optionally, the improved artificial fish swarm algorithm is used to find the initial centroid, specifically including:

[0015] Step 1: Initialize the parameters of the artificial fish school algorithm, including the school size N, visual range visual, step size step, maximum number of attempts try_number and congestion factor σ;

[0016] Step 2: Calculate the fitness value of each artificial fish and record it on the bulletin board. The calculation formula is as follows:

[0017]

[0018] Among them C k is the kth cluster, x i It is C k The sample points in u k It is C k The centroid of ; k represents the current cluster, and K represents the number of clusters;

[0019] Step 3: Update the location information of the artificial fish and perform the following actions based on the conditions:

[0020] (1) Foraging behavior: The artificial fish randomly selects a state x within the visual range. j and x i , i≠j; where x j =x i+rand()×visual, where the rand() function is a random number between 0 and 1. Perform the following operations:

[0021]

[0022] In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. At the beginning of the operation, the step size is given the maximum value. As the network runs, the step size gradually decreases with the change of parameter a.

[0023] (2) Clustering behavior: Search for the number of artificial fish n in the current neighborhood f and the center position x center , if y is satisfied at the same time center >y i and y center / n f <σ×y i (σ<1), that is, the food concentration in the center of the artificial fish school in the neighborhood is high and not crowded, y represents the value of step fitness, and the subscript of y corresponds to the subscript of x; then perform the operation:

[0024]

[0025] (3) Tail-chasing behavior: If a fish finds food and there are not many fish at the food location, the fish nearby will quickly swim to the food location. max , if y is satisfied at the same time max >y i and y max / n f <σ×y i (σ<1), that is, the artificial fish x max If the surrounding area is not crowded and has a high food concentration, then perform the following operations:

[0026]

[0027] (4) Random behavior: Execute the operation:

[0028] x next =x i +rand()×visual;

[0029] Step 4: Calculate the fitness function for each artificial fish and loop until the maximum number of attempts try_number is reached or the optimal value in the bulletin board does not change.

[0030] Optionally, the specific steps for cluster analysis using the K-means algorithm are as follows:

[0031] S1: The dataset M of the three-dimensional coordinate data of the teacher and student positions is {m1,m2,...,mN} and the number of clusters K, output K classes C1, C2, ..., C K represents K clusters;

[0032] S2: Based on the result of the artificial fish swarm algorithm in step 3, K cluster centers are used as the initial cluster centers c1, c2, ..., c K ;

[0033] S3: Calculate the initial cluster center c1, c2, ..., c for each data object K The Euclidean distance is used to divide each data object into clusters with similar distances. The Euclidean distance calculation formula is as follows:

[0034]

[0035] Among them, X i and X j Represents the data samples in the dataset, X ik and X jk represents the data sample in the kth cluster; n represents the total number of clusters;

[0036] S4: Update the center point of the class to adjust the K classes and recalculate the cluster center point of each class The calculation formula is as follows:

[0037]

[0038]

[0039] S5: If Both That is, the cluster center no longer changes and the algorithm terminates; otherwise, it returns to S3;

[0040] S6: Output clustering results.

[0041] Optionally, calculate the traffic usage of the AP node to evaluate whether the node is optimized. The node traffic calculation formula is as follows:

[0042]

[0043] where w i,t It represents the traffic value of the i-th person at a certain time t, and M is the number of people connected to the current AP node.

[0044] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0045] (1) The present invention introduces a linearly varying parameter in the update of the artificial fish position information, which decreases with the increase in the number of iterations. This improves the range of solutions found in the initial stage of the algorithm, ensures the diversity of solutions, and avoids falling into local optimality. In the later stage of optimization, the linear factor enables the algorithm to converge faster, ensuring the speed of solution. Therefore, the improved artificial fish swarm algorithm can ensure both fast solution speed and solution accuracy in solving optimization problems.

[0046] (2) The present invention performs cluster analysis by combining an improved artificial fish swarm algorithm with the K-means algorithm. This solves the problem of poor clustering results caused by the K-means algorithm's sensitivity to initial values ​​during the clustering process, thereby improving the speed and accuracy of the clustering algorithm.

[0047] (3) The present invention applies the improved artificial fish swarm algorithm and K-means algorithm to the wireless network AP optimization problem, and proposes to optimize the wireless network AP from a three-dimensional perspective in a big data scenario, which is more suitable for real scenarios than other technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain examples of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 This is an overall implementation flow chart of a wireless network AP optimization method based on an improved artificial fish swarm algorithm and a K-means algorithm according to the present invention.

[0050] Figure 2 This is a flow chart of cluster analysis using the improved artificial fish swarm algorithm and K-means algorithm in the present invention.

[0051] Figure 3 The experimental results of cluster analysis using the improved artificial fish swarm algorithm and K-means algorithm in this paper on the Cancer dataset show that the accuracy and stability of the proposed algorithm are improved compared with traditional cluster analysis algorithms. DETAILED DESCRIPTION

[0052] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following embodiments of the present invention are further described in detail with reference to the accompanying drawings and specific embodiments. The following embodiments or drawings are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0053] To solve the problem of wireless network AP optimization, this invention proposes an improved artificial fish swarm algorithm to select centroids, followed by clustering using the K-means algorithm, addressing the shortcomings of the K-means algorithm. It also takes floor-level factors into account to optimize wireless network APs in a three-dimensional area, improving the wireless network's service quality. A 3D model of the school's teaching building is constructed, and the wireless network AP deployment information within the building is collected and analyzed to assess whether the nodes in that area require optimization. Node areas that fail to meet the internet access needs of teachers and students are optimized: the improved artificial fish swarm algorithm is first used to find optimal initial centroids, followed by cluster analysis using the K-means algorithm to calculate the AP location information required to ensure wireless network AP service quality. The results are fed back to the relevant departments for wireless network AP redeployment, and the above steps are repeated until the adjusted wireless network AP service quality meets the needs of teachers and students. The beneficial effect of this invention is that, compared to previous wireless network AP optimization processes, this invention addresses the optimization problem of wireless network APs in three dimensions. By introducing the improved artificial fish swarm algorithm to find the initial centroid, the algorithm achieves better clustering results and higher efficiency, thereby more effectively solving the wireless network AP optimization problem.

[0054] Combine Figure 1 and 2 The wireless network AP optimization method based on the improved artificial fish swarm algorithm and K-means algorithm of the present invention specifically includes the following steps:

[0055] Step 1:

[0056] S1: Data collection, collecting log data from the school server within a certain period of time. The log data contains many fields, such as the time of connection to the network, terminal MAC address, AP name, IP address, whether the wireless user successfully joins the network, etc.

[0057] S2: Data cleaning. The data cleaning work mainly involves obtaining data that meets the conditions from Wi-Fi log data and processing problematic data, such as duplicate data and abnormal data.

[0058] S3: Data analysis and visualization. Perform statistical analysis on the processed data to obtain Data 1: the number of connections to wireless network AP nodes, and create a visual chart to show the usage status of the campus wireless network AP during that time period; Data 2: the location information of teachers and students in a certain area. Combined with the floor information, the three-dimensional coordinates of the teacher and student locations are obtained and used as experimental data for the cluster analysis in step 5.

[0059] Step 2:

[0060] Calculate the traffic usage of the AP node. The node traffic calculation formula is as follows:

[0061]

[0062] where w i,t represents the traffic value of the i-th person at a certain time t, and M is the number of people connected to the current AP node. Based on the number of connections and traffic usage of the current AP node, the node is evaluated for optimization. The evaluation criterion is: if the per capita bandwidth multiplied by the number of connections is greater than w, the node is considered to be overloaded. The per capita bandwidth is a fixed value provided by the school operator.

[0063] Step 3:

[0064] S1: Improve the artificial fish swarm algorithm. In the later stages of optimization, a large step size will cause the artificial fish to oscillate back and forth in the global extreme value area, affecting the optimization accuracy. A small step size will reduce the convergence speed of the algorithm. Therefore, the present invention introduces an adaptive maximum step size. In the initial stage of the algorithm, a large field of view is used to quickly find a rough solution, effectively reducing the convergence time and determining the target range. As the number of iterative steps increases, the field of view gradually narrows, and a detailed target search is performed until the optimal solution is found. The improved formula is as follows:

[0065] Step=Step0×a+Step max

[0066] a=exp(-10((gen-1) / Max_Gen)∧3);

[0067] In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. Step represents the step size, Step0 represents the initial step size, and Stepmax represents the initial maximum step size. At the beginning of the operation, the step size is set to the maximum value. As the network runs, the step size gradually decreases as the parameter a changes.

[0068] S2: Use the improved artificial fish swarm algorithm to find the initial centroid. The specific process is as follows:

[0069] 1. Initialize the parameters of the artificial fish school algorithm. The parameters include the fish school size N, visual range visual, step size step, maximum number of attempts try_number, and congestion factor σ;

[0070] 2. Calculate the fitness value of each artificial fish and record it on the bulletin board. The calculation formula is as follows:

[0071]

[0072] Among them C k is the kth cluster, x i It is C k The sample points in u k It is Ck The center of mass (C k The mean of all samples in );

[0073] 3. Update the location information of the artificial fish and perform the following actions based on the conditions:

[0074] (1) Foraging behavior: Foraging is the behavior of fish moving towards food. The artificial fish currently randomly selects a state x within the visual range. j , where x j =x i +rand()×visual, where the rand() function is a random number between 0 and 1. Perform the following operations:

[0075]

[0076] In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. At the beginning of the operation, the step size is given the maximum value. As the network runs, the step size gradually decreases with the change of parameter a; Step here is the improved Step: Step = Step0 × a + Step max ;

[0077] (2) Clustering behavior: Clustering refers to the gathering of artificial fish toward the center of the school. Search for the number of artificial fish n in the current neighborhood. f and the center position x center , if both ycenter>yi and y center / n f <σ×y i (σ<1), that is, the food concentration in the center of the artificial fish school in the neighborhood is high and not crowded, then perform the operation:

[0078]

[0079] Here y represents the value of fitness in step 2; f has no meaning and is only used f The whole represents the number of artificial fish in the current neighborhood; the subscript of y corresponds to the subscript of x, for example, center represents the center, next represents the next, and i or j represents either.

[0080] (3) Tail-chasing behavior: If a fish finds food and there are not many fish at the food location, the fish nearby will quickly swim to the food location. max , if y is satisfied at the same time max >y i and y max / n f <σ×y i (σ<1), that is, artificial fish x maxIf the surrounding area is not crowded and has a high food concentration, then perform the following operations:

[0081]

[0082] (4) Random behavior: This behavior is the fish swimming freely in the water, which allows the artificial fish to forage or find companions in a larger range, ensuring the efficiency of patrol.

[0083] x next =x i +rand()×visual;

[0084] 4. Calculate the fitness function for each artificial fish and loop until the maximum number of attempts try_number is reached or the optimal value in the bulletin board no longer changes; the x value corresponding to the optimal solution y of the artificial fish algorithm is the center of mass coordinate, and x is output as the experimental result. There is no specific formula to represent it.

[0085] Step 4:

[0086] S1: Input M data to be clustered, set the number of iterations T and the number of clusters K;

[0087] S2: Based on the experimental results of step 3, the optimal value is selected, that is, K cluster centers are used as the initial centroids of K-means clustering operation, and the loop iterates for the maximum number of iterations T. The algorithm ends and the clustering results are output; k represents the current cluster, and K represents the number of clusters;

[0088] Step 5: Adjust the wireless network AP layout in the current area based on the clustering results in step 4, and repeat step 2 until the node layout reaches the optimal level.

[0089] Step 6: End

[0090] The solution of the present invention is described in detail below with reference to specific embodiments, specifically:

[0091] Example 1:

[0092] like Figure 1 As shown, the wireless network AP optimization method based on the improved artificial fish swarm algorithm and K-means algorithm disclosed in the present invention includes the following steps:

[0093] Step 1:

[0094] S1: Data collection. Based on the existing big data platform, the Sqoop component is used to collect log data from the school server within a certain period of time and store it in the distributed file system HDFS. The log data contains many fields, such as the time of connection to the network, terminal MAC address, AP name, IP address, whether the wireless user successfully joins the network, etc.

[0095] S2: Data cleaning. Due to the large size and disorganization of log data, data cleaning is required for the collected data. Data cleaning is a crucial process for subsequent cluster analysis of AP connection times and teacher and student locations. The quality of the data determines the accuracy of the cluster analysis. Data cleaning primarily maps the data in HDFS from S1 to the Hive data warehouse. Regular expressions are then used to extract qualified data from the log data and process problematic data. For example:

[0096] 1. Duplicate data: For two identical data, keep the former and delete the latter duplicate data

[0097] 2. Abnormal data: For example, if a certain AP node has not had any device connected in the past three months, it is possible that the AP node is faulty and the data has not been recorded. After cleaning the data, the authenticity of the experiment can be effectively guaranteed. Then, regular expressions are used to extract the fields required for student behavior analysis from the log data, and the data fields and formats in the experiment are specified;

[0098] S3: Data analysis and visualization. Perform statistical analysis on the processed data to obtain Data 1: the number of connections to wireless network AP nodes, and create a visual chart to show the usage status of the campus wireless network AP during that time period; Data 2: the location information of teachers and students in a certain area. Combined with the floor information, the three-dimensional coordinates of the teacher and student locations are obtained and used as experimental data for the cluster analysis in step 5.

[0099] Step 2: Calculate the traffic usage of the AP node. The node traffic calculation formula is as follows:

[0100]

[0101] where w i,t represents the traffic value of the i-th person at a certain time t, and M is the number of people connected to the current AP node. Based on the number of connections and traffic usage of the current AP node, the node is evaluated for optimization. The evaluation criterion is: if the per capita bandwidth multiplied by the number of connections is greater than w, the node is considered to be overloaded. The per capita bandwidth is a fixed value provided by the school operator.

[0102] Step 3: Improved artificial fish swarm algorithm to find the initial centroid.

[0103] S1: Improve the artificial fish swarm algorithm. In the later stages of optimization, a large step size will cause the artificial fish to oscillate back and forth in the global extreme value area, affecting the optimization accuracy. A small step size will reduce the convergence speed of the algorithm. Therefore, the present invention introduces an adaptive maximum step size. In the initial stage of the algorithm, a large field of view is used to quickly find a rough solution, effectively reducing the convergence time and determining the target range. As the number of iterative steps increases, the field of view gradually narrows, and a detailed target search is performed until the optimal solution is found. The improved formula is as follows:

[0104] Step=Step0×a+Step max

[0105] a=exp(-10((gen-1) / Max_Gen)∧3);

[0106] In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. At the beginning of the operation, the step size is given a maximum value. As the network runs, the step size gradually decreases as the parameter a changes;

[0107] S2: Use the improved artificial fish swarm algorithm to find the initial centroid. The specific process is as follows:

[0108] 1. Initialize the parameters of the artificial fish school algorithm. The parameters include the fish school size N, visual range visual, step size step, number of attempts try_number, and congestion factor σ;

[0109] 2. Calculate the fitness value of each artificial fish and record it on the bulletin board. The calculation formula is as follows:

[0110]

[0111] Among them C k is the kth cluster, x i It is C k The sample points in u. k It is C k The center of mass (C k The mean of all samples in );

[0112] 3. Update the location information of the artificial fish and perform the following actions based on the conditions:

[0113] (1) Foraging behavior: Foraging is the behavior of fish moving towards food. The artificial fish currently randomly selects a state x within the visual range. j , where x j =x i +rand()×visual, where the rand() function is a random number between 0 and 1. Perform the following operations:

[0114]

[0115] In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. At the beginning of the operation, the step size is given a maximum value. As the network runs, the step size gradually decreases as the parameter a changes;

[0116] (2) Clustering behavior: Clustering refers to the gathering of artificial fish toward the center of the school. Search for the number of artificial fish n in the current neighborhood. f and the center position x center , if y is satisfied at the same time center >y i and y center / n f <σ×y i (σ<1), that is, the food concentration in the center of the artificial fish school in the neighborhood is high and not crowded, then perform the operation:

[0117]

[0118] (3) Tail-chasing behavior: If a fish finds food and there are not many fish at the food location, the fish nearby will quickly swim to the food location. max , if y is satisfied at the same time max >y i and y max / n f <σ×y i (σ<1), that is, the artificial fish x max If the surrounding area is not crowded and has a high food concentration, then perform the following operations:

[0119]

[0120] (4) Random behavior: This behavior is the fish swimming freely in the water, which allows the artificial fish to forage or find companions in a larger range, ensuring the efficiency of patrol.

[0121] x next =x i +rand()×visual;

[0122] 4. Calculate the fitness function for each artificial fish and repeat step 7 until the maximum number of attempts is reached or the optimal value in the bulletin board does not change;

[0123] Step 4: Use the K-means algorithm to perform cluster analysis. Cluster analysis divides the data samples with the highest degree of similarity into one category based on their similarity, so that the data samples within a category have the highest similarity, while the data samples between categories have the highest dissimilarity. The specific steps of cluster analysis are as follows:

[0124] S1: Given the dataset M described in step 1 S3 = {m1,m2,...,m N} and the number of clusters K, and output K classes C1, C2, ..., C K represents K clusters;

[0125] S2: According to the experimental results of step 3, the optimal value (the result value of the artificial fish swarm algorithm in step 3) is selected, that is, K cluster centers as the initial cluster centers c1, c2, ..., c K ;

[0126] S3: Calculate the initial cluster center c1, c2, ..., c for each data object K The Euclidean distance is used to divide each data object into clusters with similar distances. The Euclidean distance calculation formula is as follows:

[0127]

[0128] Among them, X i and X j Represents the data samples in the dataset, X ik and X jk Represents the data sample in the kth cluster.

[0129] S4: Update the center point of the class to adjust the K classes and recalculate the cluster center point of each class The calculation formula is as follows:

[0130]

[0131]

[0132] S5: If Both That is, the cluster center no longer changes and the algorithm terminates. Otherwise, return to S3;

[0133] S6: Output clustering results.

[0134] Step 5: Adjust the wireless network AP layout in the current area according to the clustering result of S6 in step 4, and repeat step 2 until the node layout reaches the optimal one.

[0135] Step 6: End.

[0136] In order to make the data comparison more objective and effective, this paper uses accuracy as the clustering evaluation criterion, the formula is

[0137]

[0138] The experimental dataset used in this paper adopts the commonly used clustering dataset Cancer in the UCI database, with the number of clusters being 2, the attribute dimension being 10, and the dataset size being 700.

[0139] from Figure 3 It can be seen that after completing 30 experiments independently, the accuracy of the proposed algorithm is significantly higher than that of the traditional K-means clustering.

[0140] Although the present invention has been described in detail above using general descriptions and specific embodiments, it will be apparent to those skilled in the art that modifications and improvements may be made based on the present invention. Therefore, such modifications and improvements, which do not depart from the spirit of the present invention, are intended to be within the scope of protection claimed herein.

Claims

1. A wireless network AP optimization method based on an improved artificial fish swarm algorithm and a K-means algorithm, characterized in that: The calculation formula of the improved artificial fish swarm algorithm is as follows: Step=Step0×a+Step max ; a=exp(-10((gen-1) / Max__Gen)∧3); gen represents the number of rounds executed by the artificial fish school, Max_Gen represents the maximum number of rounds of the fish school behavior, Step represents the step size, Step0 represents the initial step size, and Stepmax represents the maximum step size. An adaptive maximum step size is introduced to quickly find a rough solution using a large field of view in the initial stage of the algorithm. An improved artificial fish swarm algorithm is used to find the initial centroid, and the K-means algorithm is used to perform cluster analysis on the initial centroid. The results of the cluster analysis are used to optimize wireless network APs in three-dimensional space. The specific steps include: Step 1: Obtain the number of connections to wireless network AP nodes and the three-dimensional coordinate data of the teacher and student locations; Step 2: Evaluate the traffic usage of the current wireless network AP nodes and determine whether wireless network AP optimization is needed; Step 3: Using a combination of the improved artificial fish swarm algorithm and the K-means algorithm, cluster analysis is performed on the three-dimensional coordinate data of the teacher and student locations of the wireless network AP nodes to be optimized. The obtained centroid coordinates are the deployment locations of the wireless network AP nodes. Calculate the traffic usage of the AP node to evaluate whether the node is optimized. The node traffic calculation formula is as follows: where w i,t It represents the traffic value of the i-th person at a certain time t, and M is the number of people connected to the current AP node.

2. The wireless network AP optimization method based on the improved artificial fish swarm algorithm and K-means algorithm according to claim 1, characterized in that: The improved artificial fish swarm algorithm is used to find the initial centroid, specifically including: Step 1: Initialize the parameters of the artificial fish school algorithm, including the school size N, visual range visual, step size step, maximum number of attempts try_number and congestion factor σ; Step 2: Calculate the fitness value of each artificial fish and record it on the bulletin board. The calculation formula is as follows: Among them C k is the kth cluster, x i It is C k The sample points in u k It is C k The centroid of ; k represents the current cluster, and K represents the number of clusters; Step 3: Update the location information of the artificial fish and perform the following actions based on the conditions: (1) Foraging behavior: The artificial fish randomly selects a state x within the visual range. j and x i , i≠j; where x j =x i +rand()×visual, where the rand() function is a random number between 0 and 1. Perform the following operations: In the formula, gen represents the number of rounds executed by the artificial fish school, and Max_Gen represents the maximum number of rounds of the fish school behavior. At the beginning of the operation, the step size is given the maximum value. As the network runs, the step size gradually decreases with the change of parameter a. (2) Clustering behavior: Search for the number of artificial fish n in the current neighborhood f and the center position x center , if y is satisfied at the same time center >y i and y center / n f <σ×y i (σ<1), that is, the food concentration in the center of the artificial fish school in the neighborhood is high and not crowded, y represents the value of step fitness, and the subscript of y corresponds to the subscript of x; then perform the operation: (3) Tail-chasing behavior: If a fish finds food and there are not many fish at the food location, the fish nearby will quickly swim to the food location. max , if y is satisfied at the same time max >y i and y max / n f <σ×y i (σ<1), that is, the artificial fish x max If the surrounding area is not crowded and has a high food concentration, then perform the following operations: (4) Random behavior: Execute the operation: x next =x i +rand()×visual; Step 4: Calculate the fitness function for each artificial fish and loop until the maximum number of attempts try_number is reached or the optimal value in the bulletin board does not change.

3. The wireless network AP optimization method based on the improved artificial fish swarm algorithm and K-means algorithm according to claim 1 or 2, characterized in that: The specific steps of K-means algorithm cluster analysis are as follows: S1: The dataset M of the three-dimensional coordinate data of the teacher and student positions is {m1,m2,...,m N } and the number of clusters K, output K classes C1, C2, ..., C K represents K clusters; S2: Based on the result of the artificial fish swarm algorithm in step 3, K cluster centers are used as the initial cluster centers c1, c2, ..., c K ; S3: Calculate the initial cluster center c1, c2, ..., c for each data object K The Euclidean distance is used to divide each data object into clusters with similar distances. The Euclidean distance calculation formula is as follows: Among them, X i and X j Represents the data samples in the dataset, X ik and X jk represents the data sample in the kth cluster; n represents the total number of clusters; S4: Update the center point of the class to adjust the K classes and recalculate the cluster center point of each class The calculation formula is as follows: S5: If Both That is, the cluster center no longer changes and the algorithm terminates; otherwise, it returns to S3; S6: Output clustering results.

Citation Information

Patent Citations

  • Power distribution network reactive power optimization method based on multi-objective fish swarm clustering algorithm

    CN103580023A

  • Leakage detection system and method for long petroleum pipeline based on afpso-k-means

    US20210033484A1