Method, system, device and medium for terminal device to access network

By performing dimensional clustering and particle swarm optimization on the data from power terminal equipment, the problems of high data latency and security risks in the power system were solved, achieving efficient data transmission and improved network efficiency.

CN116321354BActive Publication Date: 2025-11-18CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310281265.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2025-11-18
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

The existing 5G network architecture cannot effectively handle the rich variety of power data in the power system, resulting in large data latency and security risks, and it has not effectively solved the problem of collaborative allocation between 5G base stations.

Method used

By performing dimensional clustering on the data uploaded by terminal devices, several first clusters and second clusters are formed. Then, the particle swarm optimization algorithm is used to optimize the base station selection and select the optimal base station to transmit the data.

Benefits of technology

It enables the effective organization and evaluation of various types of data, avoids base station overload, and improves the overall network response efficiency and data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116321354B_ABST
    Figure CN116321354B_ABST
Patent Text Reader

Abstract

The application belongs to the field of electric power automation, and discloses a terminal device access network method, system, device and medium, comprising obtaining each terminal device uploaded data and the dimension of each terminal device uploaded data, sequentially classifying all terminal device uploaded data under each dimension to obtain a plurality of first clustering clusters, and classifying the first clustering clusters under all dimensions to obtain a plurality of second clustering clusters and a plurality of discrete data clusters; according to the intra-cluster difference of each second clustering cluster, the discrete distance of each discrete data cluster, the data volume of each second clustering cluster, the data volume of each discrete data cluster and the interaction distance of the terminal device and each base station, the optimal base station of each second clustering cluster and each discrete data cluster is obtained, and each second clustering cluster and each discrete data cluster is transmitted to the corresponding optimal base station. Through the integration and analysis of the terminal device uploaded data, the optimal base station is selected to complete network access, effectively solving the problem of large data delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power automation and relates to a method, system, device and medium for terminal equipment to access a network. Background Technology

[0002] Currently, the 5G network architecture of the power system mainly includes user equipment, radio access network, 5G core network functional components, and data network. The radio access network includes multiple 5G base stations, used to connect all power terminal equipment and receive access to power services and power data from the power equipment. 5G base stations contain various functions, including device mobility management providing core network control plane functions, user plane functions providing core network user plane functions, and authentication server functions providing authentication server functions for the 5G security process of the home network.

[0003] In existing 5G network architectures, to reduce latency for user equipment service requests, some functions of 5G base stations are separated and caching devices are added to meet the latency requirements of user equipment when accessing the network and acquiring data. However, in power systems, due to the rich variety of power data and the fact that different types of data exist in different dimensions, power data cannot be directly accessed to the network, which could easily create security risks for 5G base stations. Furthermore, the lack of consideration for the collaborative allocation between 5G base stations could lead to significant data latency. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, system, device and medium for terminal devices to access the network.

[0005] To achieve the above objectives, the present invention employs the following technical solution:

[0006] In a first aspect, the present invention provides a method for a terminal device to access a network, comprising: acquiring data uploaded by each terminal device and the dimensions of the data uploaded by each terminal device; classifying all data uploaded by terminal devices under each dimension according to the differences between the data uploaded by terminal devices to obtain a plurality of first clusters; classifying the first clusters under all dimensions according to the differences between the first clusters to obtain a plurality of second clusters and a plurality of discrete data clusters; acquiring the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station; obtaining the optimal base station for each second cluster and each discrete data cluster according to the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station; and transmitting each second cluster and each discrete data cluster to the corresponding optimal base station.

[0007] Optionally, before classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters, the method further includes: verifying the data uploaded by each terminal device; and after verification, classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters.

[0008] Optionally, the step of classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters includes: classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices using the K-means clustering algorithm to obtain several first clusters.

[0009] Optionally, the step of classifying the first clusters in all dimensions according to the differences between the first clusters to obtain several second clusters and several discrete data clusters includes: arranging the samples in each first cluster into a matrix to obtain several matrices and obtaining the Euclidean distance between the feature vectors of each matrix; classifying the first clusters whose Euclidean distance is less than a preset distance threshold into one class to obtain several classification clusters; and classifying the classification clusters that contain at least two first clusters as second clusters, and the other classification clusters as discrete data clusters.

[0010] Optionally, obtaining the intra-cluster differences of each second cluster includes: obtaining the sum of the differences between the data uploaded by each terminal device within each second cluster to obtain the intra-cluster differences of each second cluster; obtaining the discrete distance of each discrete data cluster includes: obtaining the sum of the difference distances between each discrete data cluster and each second cluster to obtain the discrete distance of each discrete data cluster.

[0011] Optionally, obtaining the optimal base station for each second cluster and each discrete data cluster based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station includes: using a particle swarm optimization algorithm to perform optimization and update based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station to obtain the optimal base station for each second cluster and each discrete data cluster; wherein, when using the particle swarm optimization algorithm for optimization and update, each second cluster and each discrete data cluster is used as a particle, and the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features, and the repulsion factor of each particle is obtained based on the particle data features of each particle, and the repulsion factor is used as the weight of the local optimal term in the particle swarm optimization algorithm, and the weight of the global optimal term in the particle swarm optimization algorithm is obtained based on the negative correlation of the repulsion factor.

[0012] Optionally, obtaining the repulsion factor of each particle based on its particle data characteristics includes obtaining the repulsion factor of each particle using the following formula:

[0013]

[0014] Where, α q Let be the repulsion factor of the q-th particle, and T be the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let be the intra-cluster difference of the q-th particle during the t-th data response process.

[0015] When using the particle swarm optimization algorithm for optimization and updating, the particle update model of the particle swarm optimization algorithm is as follows:

[0016] v q ′=wv q +β1×rand()×α q ×(pbest q -x q )+

[0017] β2×rand()×(1-α q (gbest) q -x q )

[0018] Among them, v q Let v' be the updated particle velocity of the q-th particle. q Let β1 be the particle velocity before the update for the q-th particle, w be the inertia factor, β1 be the first learning factor, β2 be the second learning factor, rand() be the random number function, and α be the inertia factor. q pbest is the repulsion factor of the q-th particle. q Let x be the distance from the q-th particle to the updated local optimum. q Let gbest be the distance from the q-th particle to the initial local optimum. q Let q be the distance from the q-th particle to the global optimal solution.

[0019] In a second aspect, the present invention provides a system for terminal devices to access a network, comprising: a data acquisition module for acquiring data uploaded by each terminal device and the dimensions of the data uploaded by each terminal device; a classification module for classifying all data uploaded by terminal devices under each dimension according to the differences between the data uploaded by terminal devices, to obtain several first clusters; and classifying the first clusters under all dimensions according to the differences between the first clusters, to obtain several second clusters and several discrete data clusters; a feature extraction module for acquiring the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station; and an optimization module for obtaining the optimal base station for each second cluster and each discrete data cluster according to the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, and transmitting each second cluster and each discrete data cluster to the corresponding optimal base station.

[0020] Optionally, the optimization module is specifically used to: perform optimization and update using a particle swarm optimization algorithm based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, to obtain the optimal base station for each second cluster and each discrete data cluster; wherein, when performing optimization and update using a particle swarm optimization algorithm, each second cluster and each discrete data cluster is used as a particle, and the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features, and the repulsion factor of each particle is obtained based on the particle data features of each particle, and the repulsion factor is used as the weight of the local optimal term in the particle swarm optimization algorithm, and the weight of the global optimal term in the particle swarm optimization algorithm is obtained based on the negative correlation of the repulsion factor.

[0021] Optionally, obtaining the repulsion factor of each particle based on its particle data characteristics includes obtaining the repulsion factor of each particle using the following formula:

[0022]

[0023] Where, α q Let be the repulsion factor of the q-th particle, and T be the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let be the intra-cluster difference of the q-th particle during the t-th data response process.

[0024] When using the particle swarm optimization algorithm for optimization and updating, the particle update model of the particle swarm optimization algorithm is as follows:

[0025] v q ′=wv q +β1×rand()×α q ×(pbest q -x q )+

[0026] β2×rand()×(1-α q (gbest) q -x q )

[0027] Among them, v q Let v' be the updated particle velocity of the q-th particle. q Let β1 be the particle velocity before the update for the q-th particle, w be the inertia factor, β1 be the first learning factor, β2 be the second learning factor, rand() be the random number function, and α be the inertia factor. q pbest is the repulsion factor of the q-th particle. q Let x be the distance from the q-th particle to the updated local optimum. q Let gbest be the distance from the q-th particle to the initial local optimum. q Let q be the distance from the q-th particle to the global optimal solution.

[0028] In a third aspect, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for accessing a network by a terminal device described above.

[0029] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for a terminal device to access a network described above.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] The present invention provides a method for terminal devices to access a network. This method involves grouping and analyzing the data uploaded by each terminal device across different dimensions to obtain several first clusters. Then, based on the differences between the first clusters, a second classification is performed to obtain several second clusters and several discrete data clusters. Through these two hierarchical clustering operations, effective regularization and evaluation of the data uploaded by each terminal device are achieved. Next, the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are extracted as feature quantities for each type of data. Then, the optimal base station for each type of data is selected based on the interaction distance between the terminal device and each base station. Finally, the data of each type of data is transmitted to the optimal base station to complete network access. Compared to transmitting data to the base station with the shortest interaction distance, this method effectively avoids the base station with the shortest interaction distance being overloaded, ensuring the overall data processing efficiency of the network and improving the overall response efficiency of the network. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating a method for a terminal device to access a network according to an embodiment of the present invention.

[0033] Figure 2 This is a system architecture block diagram of a terminal device accessing a network according to an embodiment of the present invention. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] The present invention will now be described in further detail with reference to the accompanying drawings:

[0037] SeeFigure 1 In one embodiment of the present invention, a method for a terminal device to access a network is provided, which can effectively solve the problem of large latency when accessing a network for specific types of data, such as data with rich variety and different types of data in different dimensions.

[0038] Specifically, the method by which the terminal device accesses the network includes the following steps:

[0039] S1: Obtain the data uploaded by each terminal device and the dimensions of the data uploaded by each terminal device.

[0040] S2: Based on the differences between the data uploaded by terminal devices, classify all the data uploaded by terminal devices under each dimension to obtain several first clusters; and based on the differences between the first clusters, classify the first clusters under all dimensions to obtain several second clusters and several discrete data clusters.

[0041] S3: Obtain the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station.

[0042] S4: Based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, the optimal base station for each second cluster and each discrete data cluster is obtained, and each second cluster and each discrete data cluster is transmitted to the corresponding optimal base station.

[0043] The network can be a 2G network, a 3G network, a 4G network, or a 5G network, etc.

[0044] In summary, the method for terminal devices to access the network in this embodiment of the invention performs group analysis on the data uploaded by each terminal device under different dimensions to obtain several first clusters. Then, based on the differences between the first clusters, a second classification is performed to obtain several second clusters and several discrete data clusters. Through two hierarchical clusterings, the data uploaded by each terminal device is effectively organized and evaluated. Then, the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are extracted as feature quantities of each type of data. Then, the optimal base station corresponding to each type of data is selected by combining the interaction distance between the terminal device and each base station, and finally, the data of each type of data is transmitted to the optimal base station to complete the network access. Compared with the method of transmitting to the base station with the shortest interaction distance, it can effectively avoid the base station with the shortest interaction distance being overloaded, ensure the overall data processing efficiency of the network, and improve the overall response efficiency of the network.

[0045] In this embodiment, a power terminal device is used as an example for explanation. The power terminal device has a variety of power data, and different types of data are in different dimensions. Corresponding to the power terminal device, the data uploaded by the terminal device is the power device uploaded data.

[0046] In one possible implementation, before classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters, the method further includes: verifying the data uploaded by each terminal device; and after verification, classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters.

[0047] Specifically, the power terminal equipment and the base station central unit jointly verify the data uploaded by the power equipment. The base station central unit initializes the power terminal equipment and transmits the data uploaded by the power equipment to the base station distribution unit to obtain multiple corresponding base station nodes. The base station central unit then establishes a transmission channel between the power terminal equipment and the multiple base station nodes.

[0048] The task of the power terminal equipment is to receive data uploaded by multiple power devices and connect them to the network. The power terminal equipment and the base station central unit jointly verify the data uploaded by the power devices to prevent security risks caused by irrelevant data accessing the network. Specifically, this involves verifying the data uploaded by the power devices based on the private key corresponding to the temporary identity of the power terminal equipment and the shared key of the base station central unit.

[0049] After the power equipment uploads and verifies the data, the base station central unit initializes the power terminal equipment. This initialization is for configuring the power terminal equipment at its underlying level. Then, the power equipment upload data is transmitted to the base station distribution unit. Specifically, this includes obtaining the power equipment upload data from the power terminal equipment using the mobility management function in the central unit. The central unit transmits the power equipment upload data to the base station distribution unit, and subsequently, the base station central unit transmits the power equipment upload data to the optimal base station node according to the corresponding transmission channel.

[0050] A base station distribution unit includes multiple base stations, and a transmission channel can be established between the power terminal equipment and these base stations using the centralized distribution unit. It should be noted that during conventional terminal network access, to facilitate data transmission, the power terminal equipment directly transmits data to the base station with the shortest interaction distance. However, in continuous high-volume data tasks, selecting only the base station with the shortest interaction distance can easily lead to base station overload, thus affecting the overall data processing efficiency of the network. Therefore, it is necessary to optimally select multiple base stations based on the characteristics of the data uploaded by the power equipment.

[0051] In one possible implementation, the step of classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters includes: classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices using the K-means clustering algorithm to obtain several first clusters.

[0052] Specifically, the uploaded data of power equipment under each dimension is classified according to the differences between the data, resulting in multiple first clusters. Uploaded data of power equipment includes various types of data such as current, voltage, and load. These different types of data can be stored under their respective dimensions during data storage. Therefore, uploaded data of power equipment can be considered a collection of data from multiple dimensions. Thus, to analyze the characteristics of the data and facilitate subsequent optimization of base stations, it is necessary to classify the different data under different dimensions, grouping data of the same type together. Specifically, this includes: first, classifying the data under the same dimension; then, classifying the uploaded data of power equipment under each dimension according to the differences between the data, resulting in multiple first clusters; specifically, obtaining the sample distance based on the differences between the uploaded data of power equipment; and then using the K-means clustering algorithm based on the sample distance to classify the uploaded data of power equipment, resulting in multiple first clusters.

[0053] In the K-means clustering algorithm, the number of first clusters can be set according to the number of areas where power equipment is located and the maximum effective range of base stations. In this embodiment, K is set to 500, meaning there are 500 first clusters. An optimization function is set during the clustering process: Where L is the optimal constraint value, N is the total number of data points in each dimension, and x i For the i-th data, Let be the cluster center point corresponding to the i-th data point. Clustering is completed under this dimension when the optimal constraint value is minimized.

[0054] In one possible implementation, classifying the first clusters across all dimensions based on the differences between the first clusters to obtain several second clusters and several discrete data clusters includes: arranging the samples in each first cluster into a matrix to obtain several matrices and obtaining the Euclidean distance between the feature vectors of each matrix; classifying the first clusters whose Euclidean distance is less than a preset distance threshold into one class to obtain several classification clusters; and classifying the classification clusters that contain at least two first clusters as second clusters, and the other classification clusters as discrete data clusters.

[0055] Specifically, the first clusters across all dimensions are statistically aggregated into a single sample space. Secondary classification is then performed based on the differences between the first clusters to obtain multiple second clusters and discrete data clusters. This includes: arranging the samples in each first cluster into a matrix and obtaining the matrix's feature vectors; obtaining the Euclidean distance between the feature vectors; and grouping first clusters with Euclidean distances less than a preset threshold into a single class, thus obtaining multiple second clusters and discrete data clusters. In this embodiment, the distance threshold is set to 2, meaning that first clusters with Euclidean distances less than 2 are merged into a single second cluster, achieving hierarchical clustering.

[0056] In one possible implementation, obtaining the intra-cluster differences of each second cluster includes: obtaining the sum of the differences between the data uploaded by each terminal device within each second cluster to obtain the intra-cluster differences of each second cluster; obtaining the discrete distance of each discrete data cluster includes: obtaining the sum of the difference distances between each discrete data cluster and each second cluster to obtain the discrete distance of each discrete data cluster.

[0057] Specifically, because the first clusters of power equipment uploaded data across different dimensions are integrated and classified into multiple second clusters, there is a degree of data similarity among individual samples within each second cluster. The smaller the difference between samples within a cluster, i.e., the more similar the samples are, the more concentrated the samples within the cluster, and the less complex the corresponding cluster. Therefore, the intra-cluster difference is obtained by accumulating the differences between data within the second cluster, which is used to represent the complexity of the data across different dimensions within the current second cluster. It should be noted that because the discrete data cluster is a single first cluster and is not combined with other first clusters, the intra-cluster difference of the discrete cluster is 0.

[0058] Further analysis of the characteristics of discrete clusters reveals that during the secondary classification process, discrete clusters are not grouped due to excessively large Euclidean distances between them and other second-level clusters, resulting in discrete points. Therefore, the sum of the difference distances between the discrete data cluster and all second-level clusters is used as the discrete distance. This discrete distance represents the specificity of the discrete cluster; the greater the specificity, the more unique the discrete cluster, and consequently, the greater the data complexity. It should be noted that second-level clusters do not have a discrete distance, i.e., the discrete distance is 0.

[0059] Optionally, since data volume is a relatively intuitive feature for evaluating data complexity, the data volume in all second clusters and all discrete clusters is obtained. Then, the complexity of the second clusters and discrete data clusters can be represented by the data volume, discrete distance, and intra-cluster differences.

[0060] In one possible implementation, obtaining the optimal base station for each second cluster and each discrete data cluster based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station includes: using a particle swarm optimization algorithm to perform optimization and update based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station to obtain the optimal base station for each second cluster and each discrete data cluster; wherein, when using the particle swarm optimization algorithm for optimization and update, each second cluster and each discrete data cluster is used as a particle, and the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features, and the repulsion factor of each particle is obtained based on the particle data features of each particle, and the repulsion factor is used as the weight of the local optimal term in the particle swarm optimization algorithm, and the weight of the global optimal term in the particle swarm optimization algorithm is obtained based on the negative correlation of the repulsion factor.

[0061] Specifically, each second cluster and discrete data cluster is treated as a particle. Intra-cluster differences, discrete distances, and data volume are used as particle data features. The repulsion factor for the particle swarm optimization (PSO) algorithm is obtained based on these features, and the repulsion factor is positively correlated with the data features. In the particle update model of the PSO algorithm, the repulsion factor is the weight of the local optimum. The weight of the global optimum is obtained based on the negative correlation of the repulsion factor. The PSO algorithm is used to optimize and update the data based on the interaction distance between the power equipment terminal and multiple base stations to obtain the optimal base station. The power equipment upload data is then transmitted to the optimal base station according to the corresponding transmission channel.

[0062] In existing base station allocation models, to reduce latency during data transmission, power equipment terminals are typically assigned base stations based on their interaction distance. However, power equipment data is time-sensitive, meaning the complexity of data uploaded by power equipment varies at different response times. Simply transmitting data to the base station with the closest interaction distance would overload that base station, impacting network efficiency. If the base station with the closest interaction distance is not selected, all base stations need to be analyzed based on their interaction distance to select the one with the average interaction distance. Therefore, the base station with the closest interaction distance can be considered a local optimum, while the base station with the average interaction distance can be considered a global optimum. Thus, a particle swarm optimization (PSO) algorithm can be used to combine local and global optima analysis. Each second cluster and discrete data cluster is treated as a particle, and the PSO algorithm is used to update the particle's velocity and position. After multiple updates, the optimal base station position is obtained.

[0063] The particle swarm optimization (PSO) algorithm is optimized by incorporating the data characteristics of each particle, using intra-cluster differences, discrete distances, and data volume as particle data features. A repulsion factor is obtained based on these features and introduced into the particle update model. The repulsion factor is positively correlated with the particle data features and is used as the weight for local optima in the particle update model. The weight for global optima is obtained based on the negative correlation between the repulsion factor and the local optima. This ensures that during the optimization process, data with higher complexity corresponds to a larger weight for local optima, leading to a greater tendency for particles to follow the nearest interaction distance in the update process. Conversely, data with lower complexity is easier to transmit, resulting in a larger weight for global optima, and particles tend to favor the global optimal direction during position updates.

[0064] Optionally, the specific method for obtaining the repulsion factor includes: obtaining the repulsion factor according to the repulsion factor calculation formula, which includes:

[0065]

[0066] Where, α q Let be the repulsion factor of the q-th particle, and T be the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let be the intra-cluster difference of the q-th particle during the t-th data response process.

[0067] The particle update model after introducing the repulsion factor specifically includes:

[0068] v q ′=wv q +β1×rand()×α q ×(pbest q -x q )+

[0069] β2×rand()×(1-α q (gbest) q -x q )

[0070] Among them, v q Let v' be the updated particle velocity of the q-th particle. q Let β1 be the particle velocity before the update for the q-th particle, w be the inertia factor, β1 be the first learning factor, β2 be the second learning factor, rand() be the random number function, and α be the inertia factor. q pbest is the repulsion factor of the q-th particle. qLet x be the distance from the q-th particle to the updated local optimum. q Let gbest be the distance from the q-th particle to the initial local optimum. q Let q be the distance from the q-th particle to the global optimal solution.

[0071] In this embodiment, Among them, w int =0.9,w end =0.4, w int and w end G represents the initial inertia weight and the inertia weight when iterating to the optimal value, respectively. k This represents the maximum number of iterations, which can be set according to the specific implementation scenario. g is an adjustable parameter, set to 10. Set both the first and second learning factors to 2, and the range of the random number function is [0,1].

[0072] In the initial process of the particle swarm optimization algorithm, each particle corresponds to an initial local optimum, which is the position of the nearest base station to the initial interaction base station. Through continuous iteration and updates, the speed and position of the particles are controlled in the hypothetical space according to the particle update model, which leads to continuous updates of the local optimum. Since the particle data characteristics of each particle may be different, each particle has a different update position and update speed.

[0073] When the particle swarm optimization algorithm converges, the corresponding location is the location of the optimal base station. Based on the corresponding transmission channel, the base station central unit transmits the power equipment's upload data to the optimal base station, completing the network access for the power equipment terminal. It should be noted that the particle swarm optimization algorithm is existing technology well-known to those skilled in the art and will not be elaborated upon here.

[0074] In summary, this embodiment of the invention acquires power equipment upload data from various units in the network, performs two grouping analyses on the power equipment upload data under different dimensions to obtain a second cluster and discrete data clusters. Then, the second cluster and discrete data clusters are treated as particles, and particle data features representing data complexity are obtained for each particle. Subsequently, the particle swarm optimization algorithm is optimized based on these particle data features. The optimized particle update model is then used to find the optimal base station among multiple base stations based on the local and global optimal solutions corresponding to the interaction distance. The power equipment upload data is then transmitted to the optimal base station, completing network access. This embodiment of the invention integrates and analyzes multi-dimensional power equipment data, optimizes the particle swarm optimization algorithm using the data complexity characteristics, and selects the optimal base station to complete network access.

[0075] As can be seen, the method for terminal devices to access the network in this invention achieves effective regularization and evaluation of the uploaded data of power devices by performing two hierarchical clustering operations on the data uploaded by power devices in different dimensions. This obtains second clusters in different dimensions and discrete data clusters related to the second clusters, thereby improving the overall response efficiency of the network. Simultaneously, based on the particle data characteristics of the second clusters and discrete data clusters, the complexity of the uploaded data of power devices is described using these characteristics. The constraints of the subsequent base station optimization process are enriched based on these particle data characteristics, avoiding the problem of the optimization process getting trapped in local optima. Furthermore, by introducing particle data characteristics to optimize the particle swarm optimization algorithm, the global optimum can be considered among multiple base stations, except for the base station with the closest interaction distance, based on the particle data characteristics during the base station selection process. This avoids multiple particles getting trapped in local optima, which would lead to a large load on the base station pointed to by the local optimum and affect the overall network capability.

[0076] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.

[0077] See Figure 2 In another embodiment of the present invention, a system for terminal devices to access a network is provided, which can be used to implement the above-mentioned method for terminal devices to access a network. Specifically, the system for terminal devices to access a network includes a data acquisition module, a classification module, a feature extraction module, and an optimization module.

[0078] The system comprises the following modules: a data acquisition module for acquiring data uploaded by each terminal device and the dimensions of that data; a classification module for classifying all data uploaded by each terminal device according to the differences between them, resulting in several first clusters; and a classification module for classifying all first clusters according to the differences between them, resulting in several second clusters and several discrete data clusters; a feature extraction module for acquiring the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station; and an optimization module for determining the optimal base station for each second cluster and each discrete data cluster based on the intra-cluster differences, the discrete distance, the data volume, and the interaction distance between the terminal device and each base station, and then transmitting each second cluster and each discrete data cluster to its corresponding optimal base station.

[0079] In one possible implementation, before classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters, the method further includes: verifying the data uploaded by each terminal device; and after verification, classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters.

[0080] In one possible implementation, the step of classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices to obtain several first clusters includes: classifying all terminal device uploaded data under each dimension according to the differences between the data uploaded by the terminal devices using the K-means clustering algorithm to obtain several first clusters.

[0081] In one possible implementation, classifying the first clusters across all dimensions based on the differences between the first clusters to obtain several second clusters and several discrete data clusters includes: arranging the samples in each first cluster into a matrix to obtain several matrices and obtaining the Euclidean distance between the feature vectors of each matrix; classifying the first clusters whose Euclidean distance is less than a preset distance threshold into one class to obtain several classification clusters; and classifying the classification clusters that contain at least two first clusters as second clusters, and the other classification clusters as discrete data clusters.

[0082] In one possible implementation, obtaining the intra-cluster differences of each second cluster includes: obtaining the sum of the differences between the data uploaded by each terminal device within each second cluster to obtain the intra-cluster differences of each second cluster; obtaining the discrete distance of each discrete data cluster includes: obtaining the sum of the difference distances between each discrete data cluster and each second cluster to obtain the discrete distance of each discrete data cluster.

[0083] In one possible implementation, obtaining the optimal base station for each second cluster and each discrete data cluster based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station includes: using a particle swarm optimization algorithm to perform optimization and update based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station to obtain the optimal base station for each second cluster and each discrete data cluster; wherein, when using the particle swarm optimization algorithm for optimization and update, each second cluster and each discrete data cluster is used as a particle, and the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features, and the repulsion factor of each particle is obtained based on the particle data features of each particle, and the repulsion factor is used as the weight of the local optimal term in the particle swarm optimization algorithm, and the weight of the global optimal term in the particle swarm optimization algorithm is obtained based on the negative correlation of the repulsion factor.

[0084] In one possible implementation, obtaining the repulsion factor of each particle based on the particle data characteristics of each particle includes: obtaining the repulsion factor of each particle using the following formula:

[0085]

[0086] Where, α q Let be the repulsion factor of the q-th particle, and T be the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let be the intra-cluster difference of the q-th particle during the t-th data response process.

[0087] When using the particle swarm optimization algorithm for optimization and updating, the particle update model of the particle swarm optimization algorithm is as follows:

[0088] v q ′=wv q +β1×rand()×α q ×(pbest q -x q )+

[0089] β2×rand()×(1-α q (gbest) q -x q )

[0090] Among them, v q Let v' be the updated particle velocity of the q-th particle. qLet β1 be the particle velocity before the update for the q-th particle, w be the inertia factor, β1 be the first learning factor, β2 be the second learning factor, rand() be the random number function, and α be the inertia factor. q pbest is the repulsion factor of the q-th particle. q Let x be the distance from the q-th particle to the updated local optimum. q Let gbest be the distance from the q-th particle to the initial local optimum. q Let q be the distance from the q-th particle to the global optimal solution.

[0091] All relevant content of each step involved in the aforementioned embodiments of the method for terminal devices to access the network can be referenced to the functional description of the corresponding functional module of the system for terminal devices to access the network in the embodiments of the present invention, and will not be repeated here.

[0092] The module division in this embodiment of the invention is illustrative and represents only one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional modules in the various embodiments of the invention can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0093] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used for the operation of a method for a terminal device to access a network.

[0094] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for the terminal device to access the network in the above embodiments.

[0095] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0097] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxesFigure 1 The function specified in one or more boxes.

[0098] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method for a terminal device to access a network, characterized in that, include: Obtain the data uploaded by each terminal device and the dimensions of the data uploaded by each terminal device; Based on the differences between the data uploaded by terminal devices, the K-means clustering algorithm is used to classify all the data uploaded by terminal devices in each dimension to obtain several first clusters. The differences between the data uploaded by terminal devices are represented by Euclidean distance. And based on the differences between the first clusters, classify the first clusters under all dimensions to obtain several second clusters and several discrete data clusters. Specifically, this includes: arranging the samples in each first cluster into a matrix to obtain several matrices and obtaining the Euclidean distance between the feature vectors of each matrix; classifying the first clusters whose Euclidean distance is less than a preset distance threshold into one class to obtain several classification clusters; and classifying the classification clusters that contain at least two first clusters as second clusters, and the other classification clusters as discrete data clusters. The method involves obtaining the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station. Obtaining the intra-cluster differences of each second cluster includes summing the differences between the data uploaded by each terminal device within each second cluster to obtain the intra-cluster differences of each second cluster. Obtaining the discrete distances of each discrete data cluster includes summing the difference distances between each discrete data cluster and each second cluster to obtain the discrete distances of each discrete data cluster. Based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, the optimal base station for each second cluster and each discrete data cluster is obtained. Each second cluster and each discrete data cluster is then transmitted to its corresponding optimal base station, specifically including: Based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, the particle swarm optimization algorithm is used to optimize and update, and the optimal base station for each second cluster and each discrete data cluster is obtained. In the process of using the particle swarm optimization algorithm for optimization and updating, each second cluster and each discrete data cluster are used as particles. The intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features. Based on the particle data features of each particle, the repulsion factor of each particle is obtained. The repulsion factor is used as the weight of the local optimum in the particle swarm optimization algorithm. Based on the negative correlation of the repulsion factor, the weight of the global optimum in the particle swarm optimization algorithm is obtained.

2. The method for terminal devices to access a network according to claim 1, characterized in that, Before classifying all terminal device uploaded data according to the differences between the data uploaded by terminal devices to obtain several first clusters, the process also includes: Verify the data uploaded by each terminal device. Once the verification is successful, classify the data uploaded by all terminal devices under each dimension according to the differences between the data uploaded by the terminal devices, and obtain several first clusters.

3. The method for terminal devices to access a network according to claim 1, characterized in that, The repulsion factor of each particle obtained based on its particle data characteristics includes: The repulsion factor of each particle is obtained by the following formula: in, Let be the repulsion factor of the q-th particle. This represents the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let q be the intra-cluster difference of the q-th particle during the t-th data response process; When using the particle swarm optimization algorithm for optimization and updating, the particle update model of the particle swarm optimization algorithm is as follows: in, The updated particle velocity of the q-th particle. Let be the particle velocity of the q-th particle before the update, and w be the inertia factor. As the first learning factor, The second learning factor is , and rand() is the random number function. Let be the repulsion factor of the q-th particle. Let be the distance from the q-th particle to the updated local optimum. Let be the distance from the q-th particle to the initial local optimum. Let q be the distance from the q-th particle to the global optimal solution.

4. A system for terminal devices to access a network, characterized in that, Configured to perform the method of claim 1, comprising: The data acquisition module is used to acquire the data uploaded by each terminal device and the dimensions of the data uploaded by each terminal device; The classification module is used to classify all data uploaded by terminal devices under each dimension according to the differences between the data uploaded by terminal devices, to obtain several first clusters; and to classify the first clusters under all dimensions according to the differences between the first clusters, to obtain several second clusters and several discrete data clusters. The feature extraction module is used to obtain the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station. The optimization module is used to determine the optimal base station for each second cluster and each discrete data cluster based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, and then transmit each second cluster and each discrete data cluster to the corresponding optimal base station.

5. The system for terminal equipment accessing a network according to claim 4, characterized in that, The optimization module is specifically used for: Based on the intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, the data volume of each discrete data cluster, and the interaction distance between the terminal device and each base station, the particle swarm optimization algorithm is used to optimize and update, and the optimal base station for each second cluster and each discrete data cluster is obtained. In the process of using the particle swarm optimization algorithm for optimization and updating, each second cluster and each discrete data cluster are used as particles. The intra-cluster differences of each second cluster, the discrete distance of each discrete data cluster, the data volume of each second cluster, and the data volume of each discrete data cluster are used as particle data features. Based on the particle data features of each particle, the repulsion factor of each particle is obtained. The repulsion factor is used as the weight of the local optimum in the particle swarm optimization algorithm. Based on the negative correlation of the repulsion factor, the weight of the global optimum in the particle swarm optimization algorithm is obtained.

6. The system for terminal equipment accessing a network according to claim 5, characterized in that, The above is based on each particle The repulsion factors of each particle obtained from particle data features include: The repulsion factor of each particle is obtained by the following formula: in, Let be the repulsion factor of the q-th particle. This represents the total number of data responses from the terminal device. Let be the discrete distance of the q-th particle during the t-th data response process. Let q be the amount of data for the q-th particle during the t-th data response process. Let q be the intra-cluster difference of the q-th particle during the t-th data response process; When using the particle swarm optimization algorithm for optimization and updating, the particle update model of the particle swarm optimization algorithm is as follows: in, Let be the updated particle velocity of the q-th particle. Let be the particle velocity of the q-th particle before the update, and w be the inertia factor. As the first learning factor, The second learning factor is , and rand() is the random number function. Let be the repulsion factor of the q-th particle. Let be the distance from the q-th particle to the updated local optimum. Let be the distance from the q-th particle to the initial local optimum. Let q be the distance from the q-th particle to the global optimal solution.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for a terminal device to access a network as described in any one of claims 1 to 3.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for a terminal device to access a network as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Human body behavior recognition method based on heterogeneous layered PSO and SVM

    CN110287896A

  • Artificial intelligence financial risk measurement method based on particle swarm algorithm

    CN112329906A