Social network data analysis method and system based on restricted k-means

By introducing the restricted k-means algorithm and the minimum sum matching method to handle the mandatory and non-overlapping constraints in social network data, the problem of inaccurate clustering in existing technologies is solved, and more efficient data analysis and resource sharing are achieved.

CN116701979BActive Publication Date: 2026-05-08QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
Filing Date
2023-05-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing social network data analysis methods cannot effectively handle mandatory and non-intersecting constraints when processing labeled data, leading to inaccurate clustering results and affecting the efficiency and accuracy of data analysis.

Method used

A restricted k-means algorithm is introduced, which incorporates mandatory and non-intersecting sets as constraints during the initialization center selection phase. The minimum sum matching method is then used to process the constraint points during the iteration phase, prioritizing the processing of non-intersecting sets, thereby improving the accuracy and efficiency of the clustering algorithm.

Benefits of technology

It improves the accuracy and efficiency of social network data analysis, better handles constrained data, promotes resource sharing and information utilization, and provides personalized information services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701979B_ABST
    Figure CN116701979B_ABST
Patent Text Reader

Abstract

The disclosure provides a social network data analysis method and system based on limited k-means, and relates to the technical field of social network data processing. In the method, the initialization center selection stage mainly considers the connected constraint. After the first center is randomly selected, the remaining clustering centers are selected by cyclically calculating the weight probability affected by the connected constraint. Due to the influence of the connected constraint, the centroid of each connected set is used to represent the data points in the connected set to solve the limited k-means problem. Then, in the assignment step of the algorithm iteration stage, for the two types of data constraints, the strategy of preferentially processing the disjoint non-connected set and preferentially considering the intersection of the disjoint non-connected set and the connected set is adopted, and the constraint points are classified and processed, so that higher algorithm efficiency is achieved. The disclosure solves the problem of inaccurate data processing of the connected constraint and the disjoint non-connected constraint in the clustering process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of social network data processing technology, specifically to a method and system for social network data analysis based on restricted k-means. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] With the rapid development of information technology, social networks have stored and accumulated massive amounts of data. Effectively mining and analyzing this data using data mining tools can yield valuable information and a wealth of knowledge about the real world. This data is crucial information support for relevant departments. It also greatly promotes resource sharing among various departments and industries. The release, sharing, and analysis of large amounts of data continuously promote social development, making it easier for people to access information. Large-scale datasets typically contain a lot of personal data that needs protection, including node data, edge data (connections between individuals), and graph structure data. A clustering analysis algorithm based on social network data analysis is needed to more accurately analyze these three types of data in social network data, achieving better results in the data release and preprocessing stage.

[0004] Data analysis refers to the use of appropriate statistical analysis methods to analyze large amounts of collected data, extracting and refining information hidden within a large, disorganized dataset to identify the inherent patterns of the research object and maximize the functionality and role of the data. Cluster analysis is a typical method of data analysis. The purpose of cluster analysis is to analyze whether data belong to independent clusters, ensuring that members in one group are similar to each other and different from members in other groups. It analyzes a dataset, and the resulting classifications are unknown; therefore, cluster analysis belongs to unsupervised learning. Current clustering problems include k-means and k-median, with key methods including the k-means algorithm and the k-medoids algorithm. The k-means algorithm, proposed by Stuart Lloyd in 1957, is currently the most famous and widely used clustering algorithm.

[0005] The classic k-means algorithm requires randomly selecting k points as cluster centers in the initial stage of the dataset. The clustering effect and running time of the k-means algorithm are greatly affected by the selection of the initial cluster centers. If the initial cluster centers are not well selected, the clustering result may only be a local optimum.

[0006] The existing K-means++ algorithm improves the selection of initial cluster centers. The basic idea is that the initial cluster centers should be as far apart as possible, so a certain probability is used to select them. However, in real-world data samples, there is labeling information from the samples, which constrains all samples. For example, to group users with similar characteristics into the same category for data analysis to obtain valuable business information, even users with similar characteristics have limited relationships. For instance, on a public lifestyle sharing platform, two users following each other indicate they have very similar interests, so they can be clustered into the same cluster during data analysis, allowing for the distribution of similar content to users within that cluster. Conversely, if two users have blacklisted each other, for better efficiency in data analysis, we believe they should not be clustered into the same cluster.

[0007] In addition, when processing data with labeled information, the performance and accuracy of the clustering algorithm must be considered in addition to satisfying the constraints. Summary of the Invention

[0008] To address the aforementioned issues, this disclosure proposes a social network data analysis method and system based on restricted k-means. It introduces two types of constraints: mandatory connection and non-intersecting connection constraints during the initial center selection phase, making the restricted k-means algorithm feasible. Furthermore, in the allocation step of the algorithm iteration phase, constraint points are categorized and processed, resolving the inaccurate data processing issues of mandatory and non-intersecting constraints in existing technologies during clustering, thus demonstrating greater practicality.

[0009] According to some embodiments, the present disclosure adopts the following technical solutions:

[0010] Social network data analysis methods based on restricted k-means include:

[0011] Data is acquired from social networks and the data is used to form a network dataset. Given the number of clusters for data aggregation, as well as the ML set and DCL set, when performing clustering, a data point is randomly selected as the initial cluster center. Then, considering the constraints of ML / DCL on other data points, other initial cluster centers are selected to form the initial cluster center set.

[0012] The minimum sum matching method is used to assign data points to the clusters of each initial cluster center in the initial cluster center set. Among them, the DCL set is processed first and the intersection of the data in the DCL set with the ML set is considered. If the data point in the DCL set also belongs to the ML set, the data point is determined according to the weight for calculation. Otherwise, the data point is used directly for calculation until the DCL set is completely assigned.

[0013] Process the remaining data points until all data points are processed and an initial cluster set is obtained. For each cluster, update the cluster center using the mean to obtain a new cluster center set. Iterate and update the cluster set using the new cluster center set until it is no longer possible to obtain a smaller cost, and then stop iterating. This process classifies the data in the social network into a certain number of clusters.

[0014] According to some embodiments, the present disclosure adopts the following technical solutions:

[0015] The data acquisition module is used to acquire data from social networks, construct a network dataset from the data, and determine the number of clusters for data aggregation, as well as the ML set and DCL set.

[0016] The data clustering module is used to randomly select a data point as the initial cluster center when performing clustering, and then select other initial cluster centers by considering the constraints of ML / DCL on other data points to form an initial cluster center set;

[0017] The minimum sum matching method is used to assign data points to the clusters of each initial cluster center in the initial cluster center set. Among them, the DCL set is processed first and the intersection of the data in the DCL set with the ML set is considered. If the data point in the DCL set also belongs to the ML set, the data point is determined according to the weight for calculation. Otherwise, the data point is used directly for calculation until the DCL set is completely assigned.

[0018] Process the remaining data points until all data points are processed and an initial cluster set is obtained. For each cluster, update the cluster center using the mean to obtain a new cluster center set. Iterate and update the cluster set using the new cluster center set until it is no longer possible to obtain a smaller cost, and then stop iterating. This process classifies the data in the social network into a certain number of clusters.

[0019] According to some embodiments, the present disclosure adopts the following technical solutions:

[0020] A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned social network data analysis method based on restricted k-means.

[0021] According to some embodiments, the present disclosure adopts the following technical solutions:

[0022] An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the aforementioned social network data analysis method based on restricted k-means.

[0023] Compared with the prior art, the beneficial effects of this disclosure are as follows:

[0024] This disclosed method addresses the inaccurate handling of data subject to mandatory and disjoint constraints during cluster analysis of social network data. It selects remaining centers by iteratively calculating the weight probabilities of mandatory constraints. Since the centroid of each mandatory set represents the data points within that set, this algorithm can handle restricted k-means problems. Furthermore, in the allocation step of the algorithm's iterative phase, a strategy is adopted to prioritize disjoint sets and consider their intersection with mandatory sets, classifying constraint points accordingly to achieve higher algorithmic efficiency and greater practicality. Attached Figure Description

[0025] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0026] Figure 1 This is a flowchart illustrating the implementation of the method according to an embodiment of this disclosure;

[0027] Figure 2 This is a flowchart of the initialization center stage algorithm in the method of this disclosure embodiment;

[0028] Figure 3 This is a flowchart of the data allocation steps in the iterative phase of the method in an embodiment of this disclosure;

[0029] Figure 4 This is a flowchart of the cluster update during the iterative phase in the method of this embodiment. Detailed implementation method:

[0030] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0031] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0032] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0033] Terminology Explanation

[0034] Terminology Explanation: "Constrained" refers to two types of constraints on data:

[0035] Subject to the must-link (ML) constraint, multiple data items must belong to a single set;

[0036] Subject to the disjoint cannot-link (DCL) constraint, multiple data items must not belong to a single set.

[0037] Example 1

[0038] One embodiment of this disclosure provides a method for social network data analysis based on restricted k-means, comprising the following steps:

[0039] Step 1: Obtain data from social networks, construct a network dataset from the data, and specify the number of clusters to be aggregated, as well as the ML set and DCL set;

[0040] Step 2: Cluster the data. When clustering, randomly select a data point as the initial cluster center, and then consider the constraints of ML / DCL on other data points to select other initial cluster centers to form the initial cluster center set.

[0041] Step 3: Use the minimum sum matching method to assign data points to the clusters of each initial cluster center in the initial cluster center set; among them, the DCL set is processed first and the intersection of data in the DCL set with the ML set is considered. If a data point in the DCL set also belongs to the ML set, the data point is determined according to the weight for calculation; otherwise, the data point is used directly for calculation until the DCL set is completely assigned.

[0042] Process the remaining data points until all data points are processed and the initial cluster set is obtained;

[0043] Step 4: For each cluster, update the cluster center using the mean to obtain a new set of cluster centers. Iterate and update the cluster set using the new set of cluster centers until it is no longer possible to obtain a smaller cost, and then stop iterating to classify the data in the social network into a certain number of clusters.

[0044] After clustering analysis of data from social networks, the data is classified into a certain number of clusters, completing the preliminary data classification and preprocessing process for utilizing social network data. Social network data is a crucial information resource for social platform companies, data research departments, information consulting agencies, and government decision-making bodies, providing substantial data support for later access to the latest information and understanding of social development. Utilizing the classified social network data also greatly promotes resource sharing among various industries and departments. The continuous release and analysis of large amounts of data promotes social development, and people's access to online information becomes more personalized and convenient.

[0045] As one example, the specific implementation of the social network data analysis method based on restricted k-means is as follows: Figure 1 As shown:

[0046] S1, Input dataset P, Number of clusters k, ML set DCL Collection

[0047] S2. Determine the initialization center; randomly select the first center p0;

[0048] S3, based on other data points p c Under ML / DCL constraints, calculate D in a loop. 2 (p c );

[0049] S4, with D 2 (p c The probability of selecting the next data point p is... c ∈P;

[0050] S5. If subject to ML constraints, the centroid of the ML set is taken as the representative of the ML set and added to the initialization center set; if subject to DCL constraints, the point is directly used as a center; until k initialization centers are selected.

[0051] S6. Assign the data points sequentially to the clusters containing each cluster center set;

[0052] S7. Prioritize processing data points in the first DCL set. If a data point in the DCL set belongs to the ML set, then use the centroid of the ML set with weight |X|. This represents the data point; if a data point in the DCL set does not belong to the ML set, the point is used directly for calculation.

[0053] S8. Minimize ∑ using the minimum sum matching method. p∈Y d 2(p,c(p)) Calculate the center c(p) corresponding to the processed data points in S7, minimize the total squared distance, and assign these data points to the clusters where their corresponding c(p) belong;

[0054] S9, repeat S7-S8 until all DCL sets have been processed and allocated;

[0055] S10. Process the remaining data points; if the data point belongs to the ML set, find the centroid with weight |X|. Assign it to the cluster center; if it does not belong to the ML set, assign it to the nearest center.

[0056] S11. Obtain the initial cluster set.

[0057] S12, to For each cluster, update the cluster center using the mean. A new set of cluster centers C is obtained. t+1 ;

[0058] S13, Using the new cluster center set C t+1 Return to S12 and iteratively update the cluster. Thus, update the cluster set. Stop when no lower cost is achieved in this iteration;

[0059] From S1 to S5 above, the initialization center phase is as follows: Figure 2 As shown, a data point is randomly selected as the initial cluster center. Other initial cluster centers are then selected considering the constraints of the Multiple Join (ML) and Multiple Continuous Clustering (DCL) constraints on other data points. The process of forming the initial cluster center set is as follows: Based on the ML / DCL constraints of other data points, a weighted calculation of the data points is performed iteratively. The next data point is selected based on the weighted probability of the data point. If the data point is subject to ML constraints, the centroid of that ML set is taken as the representative of that ML set and added to the initial cluster center set. If it is subject to DCL constraints, the point is directly used as a cluster center. This process continues until a sufficient number of initial cluster centers are selected, forming the initial cluster center set. That is:

[0060] Furthermore, in step S1, the dataset P is a discrete dataset, and the clustering parameter k is manually specified;

[0061] The ML set and the DCL set are defined as follows:

[0062] An ML set is defined as: a set of data points Each Both are ML sets, given data points p i ,p j ,like Then p i ,pj ∈A m ;

[0063] A DCL set is defined as: a set of data points Each It is a condition that satisfies |Y i |≤k,i≠j, The DCL set, given data point p i ,p j ,like And p i ∈A m Then it is necessary

[0064] Among them, A m It is one of the k clusters after the dataset P has been clustered.

[0065] Furthermore, the data in the dataset is clustered. The goal of clustering is to find a set C containing k cluster centroids and divide the data points into k clusters. Expressed as the following formula:

[0066]

[0067]

[0068]

[0069] In step S3, the D of the data points subject to ML constraints and DCL constraints 2 The weighted calculation formulas are as follows:

[0070]

[0071]

[0072] in, Let C be the centroid of this ML set, and let C be the cluster center set. Indicates from The square of the distance to the nearest center in the already selected c. Indicates from p c arrive The square of the absolute distance.

[0073] Subject to the must-link (ML) constraint, multiple data items must belong to a single set;

[0074] Subject to the disjoint cannot-link (DCL) constraint, multiple data items must not belong to a single set.

[0075] In S4, a certain probability refers to:

[0076]

[0077] In S5, a certain number of initialization centers are selected, k, and these k initialization centers are denoted as C. 0 gather.

[0078] The allocation process from S6 to S10 is an iterative phase, as follows: Figure 3 As shown, the process of assigning data points to the clusters containing each initial cluster center in the initial cluster center set using the minimum sum matching method is as follows: Data points are sequentially assigned to the clusters containing each center in the initial cluster center set, with priority given to the DCL set. The first data point in the DCL set is processed. If a data point in the DCL set belongs to the ML set, then the centroid of that ML set with weight |X| is used. This represents the data point; if a data point in the DCL set does not belong to the ML set, it is used directly for calculation; the initial cluster center corresponding to the processed data point is calculated using the minimum sum matching method to minimize the total squared distance sum, and these data points are assigned to the clusters where their corresponding initial cluster centers are located.

[0079] The process of processing the remaining data points until all data is processed and the initial cluster set is obtained is as follows:

[0080] For the remaining data points in the ML set, if a data point belongs to the ML set, its centroid with weight |X| will be determined. Assign data points to the initial cluster centers; if a data point does not belong to the ML set, assign it to the nearest initial cluster center, and so on, until all data points have been assigned, resulting in the initial cluster set. That is:

[0081] In the data point allocation process described in S6, in order to achieve a lower cost, we first start with the DCL set, which has relatively "larger constraints";

[0082] In step S7, a data point belongs to both the DCL set and the ML set, and the centroid of the ML set represents that data point. The minimum sum matching method is used.

[0083] min∑ p∈Y d 2 (p,c(p))

[0084] Find c(p), and assign the data points that belong to both the DCL set and the ML set to the cluster where c(p) belongs;

[0085] In step S10, if the remaining data points belong only to the ML set, then these points are assigned to the centroid of the ML set. If the cluster containing the nearest cluster center does not belong to either the ML set or the DCL set, then these points are directly assigned to the cluster containing the nearest cluster center.

[0086] The process described in S11-S12 is the iterative cluster update process, as follows: Figure 4 As shown; for each cluster, the cluster centers are updated using the mean to obtain a new set of cluster centers. The new set of cluster centers is then used to iteratively update the cluster set until no lower cost can be obtained, at which point the iteration stops.

[0087] For each initial cluster, the cluster centers are updated using the mean method, resulting in an updated set of cluster centers. This updated set is then used to iteratively update the new set of cluster centers. The difference in cost is used to determine if the termination condition for iterative updates has been met. If a smaller cost is obtained, the next iteration begins, continuing until no smaller cost is found, at which point the iteration ends. That is:

[0088] In S11, This is the initial cluster set.

[0089] In S12, Let C represent the i-th cluster center in the t-th iteration. t+1 Let represent the i-th cluster center set in the (t+1)-th iteration stage.

[0090] Update using the mean method The cluster center, wherein the mean method is:

[0091]

[0092] Get the updated C t+1 Cluster center set.

[0093] In S13, the cluster center set C is updated iteratively. t+1 Iterative update Cluster set;

[0094] Using the difference in cost:

[0095]

[0096] The cost difference is used to determine whether the iterative update algorithm terminates. If a new iteration yields a lower cost, then the next iteration begins; otherwise, the algorithm terminates.

[0097] Clustering data from social networks allows for the classification of network data into clusters, completing the preprocessing stage for social network data utilization. This enables the extraction of more valuable information and a wealth of knowledge about the real world. This social network data is a crucial information resource for data research departments of social platform companies, information consulting agencies, and government decision-making bodies, providing substantial data support for them to grasp the latest information and understand social development. This also greatly promotes resource sharing among various industries and departments. The release and analysis of large amounts of data continuously promotes social development, and people's access to information becomes more personalized and convenient.

[0098] Example 2

[0099] One embodiment of this disclosure provides a social network data analysis system based on restricted k-means, comprising:

[0100] The data acquisition module is used to acquire data from social networks, construct a network dataset from the data, and determine the number of clusters for data aggregation, as well as the ML set and DCL set.

[0101] The data clustering module is used to randomly select a data point as the initial cluster center when performing clustering, and then select other initial cluster centers by considering the constraints of ML / DCL on other data points to form an initial cluster center set;

[0102] The minimum sum matching method is used to assign data points to the clusters of each initial cluster center in the initial cluster center set. Among them, the DCL set is processed first and the intersection of the data in the DCL set with the ML set is considered. If the data point in the DCL set also belongs to the ML set, the data point is determined according to the weight for calculation. Otherwise, the data point is used directly for calculation until the DCL set is completely assigned.

[0103] Process the remaining data points until all data points are processed and an initial cluster set is obtained. For each cluster, update the cluster center using the mean to obtain a new cluster center set. Iterate and update the cluster set using the new cluster center set until iteration stops when no lower cost can be obtained.

[0104] Example 3

[0105] A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned social network data analysis method based on restricted k-means.

[0106] Example 4

[0107] An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the aforementioned social network data analysis method based on restricted k-means.

[0108] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. 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, create a machine 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.

[0109] 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.

[0110] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A social network data analysis method based on restricted k-means, characterized in that, include: Data is acquired from social networks and the data from these social networks is used to form a network dataset. Given the number of clusters for data aggregation, as well as the ML set and DCL set, when performing clustering, a data point is randomly selected as the initial cluster center. Then, considering the constraints of ML / DCL on other data points, other initial cluster centers are selected to form an initial cluster center set. The network dataset is a discrete dataset, and the ML set is a set of points of the data. each They are all ML sets, given data points ,like ,So The DCL set is a point set of a set of data. Each It is a satisfaction The DCL set, given data points ,like and m Then it is necessary ;in, A m It is one of the k clusters after the dataset P has been clustered; The minimum sum matching method is used to assign data points to the clusters of each initial cluster center in the initial cluster center set. Among them, the DCL set is processed first and the intersection of the data in the DCL set with the ML set is considered. If the data point in the DCL set also belongs to the ML set, the data point is determined according to the weight for calculation. Otherwise, the data point is used directly for calculation until the DCL set is completely assigned. The process of assigning data points to the clusters containing each initial cluster center in the initial cluster center set using the minimum sum matching method is as follows: Data points are sequentially assigned to the clusters containing each center in the initial cluster center set, with priority given to the DCL set. The first data point in the DCL set is processed. If a data point in the DCL set belongs to the ML set, then the weight of that ML set is used. | center of mass This represents the data point; if a data point in the DCL set does not belong to the ML set, the data point is used directly for calculation; the initial cluster center corresponding to the processed data point is calculated using the minimum sum matching method to minimize the total squared distance sum, and these data points are assigned to the clusters where their corresponding initial cluster centers are located; Process the remaining data points until all data points are processed and an initial cluster set is obtained. For each cluster, update the cluster center using the mean to obtain a new cluster center set. Iterate and update the cluster set using the new cluster center set until it is no longer possible to obtain a smaller cost, and then stop iterating. This process classifies the data in the social network into a certain number of clusters.

2. The social network data analysis method based on restricted k-means as described in claim 1, characterized in that, The process of randomly selecting a data point as the initial cluster center, and then considering the constraints of ML / DCL on other data points to select other initial cluster centers to form the initial cluster center set is as follows: Based on the constraints of ML / DCL on the data points, the weighted calculation of the data points is performed iteratively, and the next data point is selected with the weighted probability of the data point. If the data point is constrained by ML, the centroid of the ML set is taken to represent the ML set and added to the initial cluster center set; if it is constrained by DCL, the data point is directly used as a cluster center; until a sufficient number of initial cluster centers are selected to form the initial cluster center set.

3. The social network data analysis method based on restricted k-means as described in claim 1, characterized in that, The process of processing the remaining data points until all data points are processed and the initial cluster set is obtained is as follows: For the remaining data points in the ML set, if a data point belongs to the ML set, its weight will be | | center of mass Assign the data point to the initial cluster center; if the data point does not belong to the ML set, assign it directly to the nearest initial cluster center, until all data points have been assigned, thus obtaining the initial cluster set.

4. The social network data analysis method based on restricted k-means as described in claim 1, characterized in that, The steps for updating the cluster centers using the mean for each cluster, obtaining a new set of cluster centers, and iteratively updating the cluster set using the new set of cluster centers until the iteration stops when no smaller cost can be obtained, are as follows: For each initial cluster, the cluster centers are updated using the mean method to obtain an updated set of cluster centers. The updated set of cluster centers is then used to iteratively update the new set of cluster centers. The difference in cost is used to determine whether the termination condition of the iterative update has been met. If a smaller cost is obtained, the next iteration begins, until no smaller cost is obtained, at which point the iteration ends.

5. The social network data analysis method based on restricted k-means as described in claim 1, characterized in that, ML constraints are subject to mandatory set constraints, meaning that multiple data items must belong to a set; DCL constraints are subject to disjoint set constraints, meaning that multiple data items must not belong to a set.

6. A social network data analysis system based on restricted k-means, characterized in that, include: The data acquisition module is used to acquire data from social networks, construct a network dataset from the social network data, and determine the number of clusters for data aggregation, as well as the ML set and DCL set; the network dataset is a discrete dataset, and the ML set is a set of points of a group of data. each They are all ML sets, given data points ,like ,So The DCL set is a point set of a set of data. Each It is a satisfaction The DCL set, given data points ,like and m Then it is necessary ;in, A m It is one of the k clusters after the dataset P has been clustered; The data clustering module is used to randomly select a data point as the initial cluster center when performing clustering, and then select other initial cluster centers by considering the constraints of ML / DCL on other data points to form an initial cluster center set; The minimum sum matching method is used to assign data points to the clusters containing each initial cluster center in the initial cluster center set. Priority is given to the DCL set, considering the intersection of data points in the DCL set with the ML set. If a data point in the DCL set also belongs to the ML set, the data point is used for calculation based on its weight; otherwise, the data point is used directly for calculation. This process continues until all data points in the DCL set are assigned. The process of assigning data points to the clusters containing each initial cluster center in the initial cluster center set using the minimum sum matching method is as follows: Data points are assigned sequentially to the clusters containing each center in the initial cluster center set, prioritizing the DCL set. The first data point in the DCL set is processed; if a data point in the DCL set belongs to the ML set, the weight of that ML set is used. | center of mass This represents the data point; if a data point in the DCL set does not belong to the ML set, the data point is used directly for calculation; the initial cluster center corresponding to the processed data point is calculated using the minimum sum matching method to minimize the total squared distance sum, and these data points are assigned to the clusters where their corresponding initial cluster centers are located; Process the remaining data points until all data points are processed and an initial cluster set is obtained. For each cluster, update the cluster center using the mean to obtain a new cluster center set. Iterate and update the cluster set using the new cluster center set until iteration stops when no lower cost can be obtained.

7. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the social network data analysis method based on restricted k-means as described in any one of claims 1-5.

8. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform the social network data analysis method based on restricted k-means as described in any one of claims 1-5.

Citation Information

Patent Citations

  • User clustering method and device for social network and computer equipment

    CN111125469A

  • Method and system for predicting user participation demand side response willingness based on semi-supervised clustering

    CN116051121A