Object clustering method and apparatus based on attribute data

By successively selecting and updating objects in the k-modes clustering algorithm for re-clustering, the problems of low accuracy and efficiency in large-scale object clustering are solved, and more efficient and accurate clustering results are achieved.

CN117272085BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2023-09-08
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, the k-modes clustering algorithm struggles to achieve accurate clustering results and is inefficient when clustering large-scale objects.

Method used

By performing multiple selection operations in sequence, the first object of the target number is selected from multiple objects for re-clustering, and the clustering result of the previous selection operation is updated again based on the re-clustering result, until the selected target number is greater than or equal to the preset number threshold, and the clustering result of the current selection operation is taken as the target clustering result.

Benefits of technology

It improves the accuracy and efficiency of clustering results, reduces the number of objects to be re-clustered each time, avoids repeated clustering operations on global objects, and optimizes clustering results step by step.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117272085B_ABST
    Figure CN117272085B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of object clustering method and device based on attribute data.The method comprises: clustering multiple objects according to the object attribute data of multiple objects, and obtaining initial clustering result;Multiple selection operations are executed in turn, and for each selection operation, a target number of first objects are selected from multiple objects for re-clustering, and the clustering result updated by the last selection operation is updated again according to the re-clustering result;In the case where the target number selected by the currently executed selection operation is greater than or equal to the preset number threshold, the clustering result updated by the currently executed selection operation is taken as the target clustering result.The embodiment method improves the accuracy of clustering result, improves the clustering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communication technology, and in particular relates to an object clustering method and apparatus based on attribute data. Background Technology

[0002] With the development of communication technology, the variety of communication products offered to users is also increasing. In order to meet user needs, objects related to user needs can be clustered based on attribute data, and then communication products that meet user needs can be recommended in a targeted manner based on the clustering results.

[0003] In related technologies, user objects are typically clustered using the k-modes clustering algorithm, and communication products are recommended to users based on the clustering results.

[0004] However, the methods of related technologies can only cluster a small number of objects. When the number of objects to be clustered is large, the k-modes clustering algorithm based on related technologies is difficult to obtain accurate clustering results and has the problem of low clustering efficiency. Summary of the Invention

[0005] This invention provides an object clustering method and apparatus based on attribute data to solve the problems of low accuracy and low efficiency in clustering results in related technologies.

[0006] In a first aspect, the present invention provides an object clustering method based on attribute data, the method comprising:

[0007] Multiple objects are clustered based on their object attribute data to obtain initial clustering results; there is a one-to-one correspondence between object attribute data and objects.

[0008] Multiple selection operations are performed sequentially. For each selection operation, a target number of first objects are selected from the multiple objects for re-clustering. The clustering results obtained from the previous selection operation are updated again based on the re-clustering results. The target number selected in each selection operation is greater than the target number selected in the previous selection operation.

[0009] If the number of targets selected in the current selection operation is greater than or equal to a preset number threshold, the clustering result obtained by updating the current selection operation is used as the target clustering result.

[0010] The re-clustering result of the first selection operation is used to update the initial clustering result.

[0011] In a second aspect, the present invention provides an object clustering device based on attribute data, the device comprising:

[0012] The first acquisition module is used to cluster multiple objects based on their object attribute data to obtain initial clustering results; the object attribute data and the objects are in one-to-one correspondence.

[0013] The update module is used to perform multiple selection operations sequentially, and for each selection operation, select a target number of first objects from the multiple objects for re-clustering, and update the clustering results obtained from the previous selection operation again based on the re-clustering results; the target number selected in each selection operation is greater than the target number in the previous selection operation.

[0014] The first determining module is used to take the clustering result obtained by updating the current selection operation as the target clustering result when the number of targets selected in the current selection operation is greater than or equal to a preset number threshold; wherein, the re-clustering result of the first selection operation is used to update the initial clustering result.

[0015] Thirdly, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the object clustering method based on attribute data described in the first aspect.

[0016] Fourthly, the present invention provides a readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the object clustering method based on attribute data described in the first aspect.

[0017] In summary, this embodiment sequentially performs multiple selection operations. For each selection operation, a target number of first objects are selected from multiple objects for re-clustering, and the clustering results obtained from the previous selection operation are updated again based on the re-clustering results. Essentially, in each selection operation, the clustering results of a portion of the objects remain unchanged, and only the target number of first objects are re-clustered, thereby obtaining the updated clustering results. Compared to related technologies that use the k-mode clustering algorithm, which requires re-clustering all objects in each clustering, this method reduces the number of objects re-clustered each time, improving clustering efficiency. In this embodiment, the target number selected in each selection operation is greater than the target number in the previous selection operation. This is equivalent to progressively increasing the number of first objects re-clustered and decreasing the number of fixed objects until the target number selected in the current selection operation is greater than or equal to a preset threshold. Then, the clustering result updated by the current selection operation is used as the target clustering result. This process is equivalent to progressively optimizing the clustering results, improving the accuracy of the clustering results. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the steps of an object clustering method provided in an embodiment of the present invention;

[0020] Figure 2 This is a flowchart of another object clustering method provided in an embodiment of the present invention;

[0021] Figure 3 This is a flowchart illustrating the steps of another object clustering method provided in this embodiment of the invention;

[0022] Figure 4 This is a schematic diagram of the structure of the object clustering device based on attribute data provided in an embodiment of the present invention;

[0023] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0025] In practical applications, multiple objects can be clustered based on the object attribute data of objects (such as users) to obtain clustering results. Based on the clustering results, communication products that meet the user's needs can be recommended.

[0026] Figure 1 This is a flowchart illustrating the steps of an object clustering method based on attribute data provided in an embodiment of the present invention. (Refer to...) Figure 1 The method may include the following steps:

[0027] Step 101: Cluster the multiple objects based on their object attribute data to obtain the initial clustering results.

[0028] In this system, the object attribute data corresponds one-to-one with the object.

[0029] In this step, the object attribute data can be the object's communication data, and the object can be a user.

[0030] For example, the object of clustering is a user, and the object attribute data may include the user's online time, online frequency, network traffic usage, or other communication-related data. Correspondingly, the clustering results obtained by clustering users may include: the user belongs to a high-traffic-consumption user, a medium-traffic-consumption user, or a low-traffic-consumption user.

[0031] In one embodiment, multiple objects can be clustered according to a method randomly set by the user to obtain an initial clustering result, or multiple objects can be clustered using the k-modes clustering algorithm to obtain an initial clustering result.

[0032] Step 102: Perform multiple selection operations in sequence, and for each selection operation, select the first number of objects from multiple objects for re-clustering, and update the clustering results obtained from the previous selection operation again based on the re-clustering results.

[0033] In each selection operation, the number of targets selected is greater than the number of targets selected in the previous selection operation.

[0034] In this step, the target number can be set according to the accuracy requirements of the clustering results. For example, if high accuracy is required, the target number selected in the first selection operation can be set smaller, and the difference between the target number selected in each subsequent selection operation and the target number in the previous selection operation can be set smaller. Conversely, the target number selected in the first selection operation can be set larger, and the difference between the target number selected in each subsequent selection operation and the target number in the previous selection operation can be set larger.

[0035] In this step, the difference between the target number selected in each selection operation and the target number in the previous selection operation can be a preset value. The preset value can be set according to the accuracy requirements of the clustering results. For example, if the accuracy requirements of the clustering results are relatively high, the preset value can be set smaller; if the accuracy requirements of the clustering results are relatively low, the preset value can be set larger.

[0036] In this step, for each selection operation, when selecting the target number of first objects from multiple objects for re-clustering, the clustering results of the second objects (excluding the first objects) remain unchanged. When updating the clustering results obtained from the previous selection operation based on the re-clustering results, only the clustering results of the first objects are updated, while the clustering results of the second objects remain unchanged, thus obtaining the new clustering results after the second update.

[0037] In one embodiment, for each selection operation, a target number of first objects are selected from multiple objects for re-clustering using a random selection method.

[0038] In one embodiment, for each selection operation, selecting a target number of first objects from multiple objects for re-clustering to obtain a re-clustering result includes: sequentially performing multiple clustering operations on the target number of first objects to obtain the re-clustering result. The target number of first objects corresponding to the multiple clustering operations is the same, but the first objects can be the same or different.

[0039] For example, there are 10,000 objects, ranging from A1 to A10000. In a certain selection operation, the target number of objects to be selected for the first clustering operation is 100. In the first clustering operation, the first objects selected can be objects A1 to A100. In the second clustering operation, the first objects selected can be objects A1 to A100 or objects A50 to A150.

[0040] Step 103: If the number of targets selected by the current selection operation is greater than or equal to the preset number threshold, the clustering result obtained by updating the current selection operation is used as the target clustering result.

[0041] The re-clustering results from the initial selection operation are used to update the initial clustering results.

[0042] In this step, a preset threshold number can be set according to the accuracy requirements of the clustering results. For example, if the accuracy requirements of the clustering results are relatively high, the preset threshold number can be set larger; conversely, if the accuracy requirements are lower, the preset threshold number can be set smaller.

[0043] In one embodiment, updating the initial clustering result using the re-clustering result of the first selection operation includes: using the re-clustering result of the first object to update the initial clustering result of the first object in the initial clustering result, thereby obtaining the updated new clustering result.

[0044] In summary, this embodiment sequentially performs multiple selection operations. For each selection operation, a target number of first objects are selected from multiple objects for re-clustering, and the clustering results obtained from the previous selection operation are updated again based on the re-clustering results. Essentially, in each selection operation, the clustering results of a portion of the objects remain unchanged, and only the target number of first objects are re-clustered, thereby obtaining the updated clustering results. Compared to related technologies that use the k-mode clustering algorithm, which requires re-clustering all objects in each clustering, this method reduces the number of objects re-clustered each time, improving clustering efficiency. In this embodiment, the target number selected in each selection operation is greater than the target number in the previous selection operation. This is equivalent to progressively increasing the number of first objects re-clustered and decreasing the number of fixed objects until the target number selected in the current selection operation is greater than or equal to a preset threshold. Then, the clustering result updated by the current selection operation is used as the target clustering result. This process is equivalent to progressively optimizing the clustering results, improving the accuracy of the clustering results.

[0045] In one embodiment, refer to Figure 2 Object clustering methods based on attribute data may include the following steps:

[0046] Step 201: Based on the object attributes of multiple objects, use the k-modes clustering algorithm to cluster the multiple objects and obtain the initial clustering results.

[0047] It should be noted that the k-modes algorithm is a clustering algorithm suitable for discrete data, which can divide objects into different categories based on object attributes. Specifically, it finds a predetermined number of clusters among a plurality of objects and assigns each object in the plurality of objects to the corresponding cluster to obtain the clustering result.

[0048] For example, each selection operation updates the clustering results to include the categories to which all objects belong. Correspondingly, after step 201, the following steps are also included:

[0049] Step 202: For each selection operation, re-cluster the first number of objects selected by the selection operation to obtain the re-clustering result.

[0050] The re-clustering results include the new category to which each first object belongs.

[0051] In each selection operation, the number of target objects selected in the first selection operation is greater than the number of target objects selected in the previous selection operation.

[0052] In this step, the k-mode clustering algorithm can be used to re-cluster the first number of objects to obtain the re-clustering result.

[0053] In this step, the first number of objects are re-clustered to obtain new clusters to which each first object belongs. Each cluster has a corresponding category. Based on the new clusters to which each first object belongs, the new category to which each first object belongs can be determined.

[0054] Step 203: Use the new category of the first object to replace the category of the first object in the clustering result obtained from the previous selection operation, and complete the update of the clustering result obtained from the previous selection operation.

[0055] In this step, when the new category of the first object is used to replace the category of the first object in the clustering result updated by the previous selection operation, the clustering result of the second object (excluding the first object) remains unchanged and is still the clustering result updated by the previous selection operation. That is, in this step, only the new category of the first object is used to replace the category of the first object in the clustering result updated by the previous selection operation; the category of the second object remains unchanged and is still the category in the clustering result updated by the previous selection operation.

[0056] Step 204: If it is determined that the number of targets selected by the current selection operation is greater than or equal to the preset number threshold, the clustering result obtained by updating the current selection operation is used as the target clustering result.

[0057] The clustering results of the first selection operation are used to update the initial clustering results.

[0058] The method for this step has been explained in step 103 above, and will not be repeated here.

[0059] In summary, in this embodiment, for each selection operation, the first objects selected by the target number of selection operations are re-clustered to obtain a new category to which the first objects belong in the re-clustering result. This new category of the first objects is then used to replace the category to which the first objects belong in the clustering result updated by the previous selection operation, completing another update of the clustering result obtained from the previous selection operation. This results in a new clustering result for the first objects selected by the target number of selection operations. If the target number selected in the currently executed selection operation is greater than or equal to a preset threshold, the clustering result updated by the currently executed selection operation is used as the target clustering result. Compared to related technologies that use the k-modes clustering algorithm for clustering, which requires re-clustering all objects in each clustering operation, this method reduces the number of objects re-clustered each time, avoids performing global object clustering operations each time, and improves clustering efficiency. In this embodiment, the number of first objects to be re-clustered is increased successively, while the number of fixed objects is decreased, until the target number selected by the current selection operation is greater than or equal to a preset number threshold. Then, the clustering result obtained by the current selection operation is used as the target clustering result, which improves the accuracy of the clustering result.

[0060] In some embodiments, step 202 includes the following sub-steps:

[0061] Sub-step 2021: In each selection operation, for the first object of the target number selected by the selection operation, perform multiple clustering operations in sequence, and for each clustering operation, if the clustering score of the clustering operation meets the preset conditions, set the number of clustering operations of the clustering operation to zero.

[0062] In one embodiment, for each clustering operation, the distance between each object in the clustering result and the centroid of its cluster is obtained. Based on the sum of the distances of all objects relative to their respective centroids, a target distance for characterizing the clustering score is determined. After obtaining the target distance, it is not necessary to score the clustering results; instead, the clustering score is determined based on the target distance to determine whether it meets preset conditions. This improves the efficiency and accuracy of judging the clustering operation's effectiveness.

[0063] Sub-step 2022: In each selection operation, for the first object of the target number selected by the selection operation, perform multiple clustering operations in sequence. For each clustering operation, if it is determined that the clustering score of the clustering operation does not meet the preset conditions, increment the number of clustering operations corresponding to the previous clustering operation by one to obtain the number of clustering operations corresponding to each clustering operation.

[0064] It should be noted that sub-steps 2021 and 2022 are processing steps for the clustering results of different clustering operations, and there is no requirement for the order of execution of sub-steps 2021 and 2022.

[0065] Sub-step 2023: If the number of clustering operations corresponding to the currently executed clustering operation is greater than the preset number threshold, determine that the clustering result obtained by the currently executed clustering operation is the re-clustering result for the first object with the target number.

[0066] In this step, a preset threshold number of iterations can be set according to the required accuracy of the clustering results. For example, if the accuracy requirement for the clustering results is relatively high, the preset threshold number of iterations can be set larger; if the accuracy requirement for the clustering results is relatively low, the preset threshold number of iterations can be set smaller.

[0067] In this embodiment, when the clustering score of the clustering operation meets the preset conditions, the number of clustering operations is set to zero. This is equivalent to continuing the clustering operation based on the clustering result that meets the preset conditions, thereby further optimizing the clustering result. When the clustering score of the clustering operation does not meet the requirements, the number of clustering operations is incremented by one. If the number of clustering operations performed in the current execution exceeds a preset threshold, the clustering result of this operation is used as the re-clustering result for the target number of first objects. This is equivalent to performing more clustering operations than the preset threshold on the target number of first objects, and still finding a clustering result whose clustering score meets the preset conditions. In other words, the clustering result of the currently executed clustering operation is the optimal clustering result obtained by re-clustering the target number of first objects. Based on the method of this embodiment, the accuracy of the clustering results is improved.

[0068] In some embodiments, prior to sub-step 2021, the method further includes:

[0069] Sub-step 2024: In each selection operation, for the first object of the target number selected by the selection operation, perform multiple clustering operations in sequence, and for each clustering operation, if the clustering score of the clustering operation is greater than the clustering score of the previous clustering operation, determine that the clustering score of the clustering operation meets the preset condition.

[0070] In this step, if the clustering score of the current clustering operation is greater than the clustering score of the previous clustering operation, it means that the clustering result of the current clustering operation is better than the clustering result of the previous clustering operation.

[0071] Sub-step 2025: If the clustering score of the clustering operation is less than or equal to the clustering score of the previous clustering operation, then determine that the clustering score of the clustering operation does not meet the preset conditions.

[0072] In this step, if the clustering score of the current clustering operation is less than or equal to the clustering score of the previous clustering operation, it indicates that the clustering result of the current clustering operation is worse than the clustering result of the previous clustering operation, or that the clustering result of the current clustering operation is the same as the clustering result of the previous clustering operation.

[0073] It should be noted that in this embodiment, when determining the comparison result between the clustering score of the clustering operation and the clustering score of the previous clustering operation, it is not necessary to obtain the clustering result scores of the two clustering operations. Instead, the target distance in the aforementioned step 2021 is used to represent the clustering score, and the comparison result of the clustering score of the clustering operation is determined based on the comparison result of the target distance.

[0074] In this embodiment, based on the comparison between the clustering score of the clustering operation and the clustering score of the previous clustering operation, it can be quickly and accurately determined whether the clustering score of the clustering operation meets the preset conditions.

[0075] In some embodiments, prior to sub-step 2024, the method further includes:

[0076] Sub-step 2026: In each selection operation, for the first object of the target number selected in the selection operation, perform multiple clustering operations in sequence, and for each clustering operation, obtain the distance between each object and the centroid of the cluster to which the object belongs in the clustering result of each clustering operation.

[0077] In one embodiment, for each object, by comparing the object's category with the category of the object corresponding to the centroid, the distance between the two objects can be marked as 0 when the categories of the two objects are the same, and can be marked as 1 when the categories of the two objects are different.

[0078] Sub-step 2027: Sum the distances between each object and the centroid of the cluster to obtain the total distance.

[0079] In one embodiment, for each cluster, the distance between each object in the cluster and its centroid is obtained, and then the sum of the distances corresponding to that cluster is obtained. By summing the sums of the distances corresponding to each cluster, the total distance of all objects relative to the centroid of their respective clusters is obtained.

[0080] Sub-step 2028: Determine the target distance based on the total distance. The target distance and clustering score are negatively correlated.

[0081] In this step, a larger target distance indicates a worse clustering result, and further, it can be considered that the clustering score of the clustering operation is lower. Conversely, a smaller target distance indicates a better clustering result, and further, it can be considered that the clustering score of the clustering operation is higher.

[0082] Sub-step 2029: Based on the target distance, determine whether the clustering score of the clustering operation meets the preset conditions.

[0083] For example, based on the target distance, it is determined whether the target distance meets the first preset condition. If the target distance meets the first preset condition, it is determined that the clustering score of the clustering operation meets the preset condition; otherwise, it is determined that the clustering score of the clustering operation does not meet the preset condition.

[0084] In this embodiment, the total distance is obtained by summing the distances between each object and the centroid of the cluster to which the object belongs. The target distance is then determined based on the total distance. Based on the target distance, it is possible to accurately and quickly determine whether the clustering score of the clustering operation meets the preset conditions.

[0085] In some embodiments, sub-step 2029 includes:

[0086] Sub-step 2030: In each selection operation, for the first object of the target number selected in the selection operation, perform multiple clustering operations in sequence, and for each clustering operation, if it is determined that the target distance of the clustering operation is less than the target distance of the previous clustering operation, determine that the clustering score of the clustering operation meets the preset condition.

[0087] Specifically, if the target distance of the clustering operation is determined to be less than the target distance of the previous clustering operation, and the clustering score of the clustering operation is determined to be greater than the clustering score of the previous clustering operation, it indicates that the clustering score of the clustering operation meets the preset conditions.

[0088] Sub-step 2031: If the target distance of the clustering operation is greater than or equal to the target distance of the previous clustering operation, determine that the clustering score of the clustering operation does not meet the preset conditions.

[0089] Specifically, if the target distance of the clustering operation is equal to the target distance of the previous clustering operation, and the clustering score of the clustering operation is equal to the clustering score of the previous clustering operation, it means that the clustering score of the clustering operation does not meet the preset conditions.

[0090] Specifically, if the target distance of the clustering operation is determined to be greater than the target distance of the previous clustering operation, and the clustering score of the clustering operation is determined to be less than the clustering score of the previous clustering operation, it indicates that the clustering score of the clustering operation does not meet the preset conditions.

[0091] In this embodiment, based on the comparison between the target distance of the clustering operation and the target distance of the previous clustering operation, it is possible to quickly and accurately determine whether the clustering score meets the preset conditions.

[0092] In some embodiments, step 2021, in each selection operation, sequentially performing each clustering operation in multiple clustering operations for the first number of objects selected in the selection operation, may include the following sub-steps:

[0093] Sub-step 2032: In each selection operation, for the first object of the target number selected by the selection operation, perform multiple clustering operations in sequence. For each clustering operation, take the centroid of the clustering result of the previous clustering operation as the initial centroid and perform the clustering operation to obtain the clustering result of each clustering operation.

[0094] Specifically, for the first clustering operation in each selection operation, the centroid of the clustering result of the previous selection operation is used as the initial centroid, and the clustering operation is performed; for the first clustering operation in the first selection operation, the centroid of the initial clustering result is used as the initial centroid, and the clustering operation is performed.

[0095] In one embodiment, for each clustering operation, the centroid of the clustering result of the previous clustering operation is used as the initial centroid of the current clustering operation, and the clustering operation is performed based on the k-modes algorithm to obtain the clustering result.

[0096] In this embodiment, for each clustering operation, the centroid of the clustering result of the previous clustering operation is used as the initial centroid for the clustering operation, which improves the accuracy of the clustering results.

[0097] Figure 3 This is a flowchart illustrating the steps of an object clustering method based on attribute data provided in an embodiment of the present invention, as follows: Figure 3 As shown, the method may include:

[0098] Step S10: Obtain object attribute data for multiple objects.

[0099] The method for obtaining object attribute data of multiple objects has been explained in step 101 above, and will not be repeated here.

[0100] Step S11: Preprocess the object attribute data;

[0101] For example, noise points in object attribute data can be removed using denoising methods, thereby achieving preprocessing of the object attribute data.

[0102] Step S12: Based on the object attribute data, perform clustering using the k-modes clustering algorithm to obtain the initial clustering results of the objects.

[0103] The initial clustering results include multiple preset categories, and each preset category has corresponding objects.

[0104] For example, the object being clustered is a user. The object attribute data may include the user's online time, online frequency, network traffic usage, or other communication-related data. Preset categories may include: users are high-traffic consumers, medium-traffic consumers, or low-traffic consumers. Correspondingly, the number of clusters obtained from the clustering is three, which correspond to high-traffic consumers, medium-traffic consumers, and low-traffic consumers, respectively.

[0105] It should be noted that when using the k-modes clustering algorithm, the clustering result can be represented by the membership matrix variable W, where the clustering result and the membership decision variable w are related. ik Related.

[0106] In this step, when using the k-mode clustering algorithm to cluster multiple objects, we can construct an object dataset I based on the multiple objects, and number the n objects in object dataset I that need to be clustered from 1 to n. We can use t... ij Describe the value of attribute j for each data object i, where the range of attribute j can be labeled as A. j For example, the value of an attribute can be represented by a number. Correspondingly, attribute values ​​of different types can be mapped to consecutive natural numbers 1, 2, 3...M, where M is the total number of types corresponding to the attribute.

[0107] Step S13, initialize the target quantity k = k0.

[0108] In this step, the initial value k0 can be set according to user needs; for example, it can be set to 1 or other values.

[0109] Step S14: Perform the selection operation to select k first objects.

[0110] In this step, k first objects can be selected randomly.

[0111] Step S15: Initialize the number of clustering operations L = 0.

[0112] In this step, by setting the initial number of clustering operations to 0, the number of clustering operations can be obtained based on this initial value in subsequent clustering operations.

[0113] Step S16: Use the k-modes clustering algorithm to cluster the k first objects, and obtain the updated clustering result x1 based on the re-clustering result of the first objects.

[0114] In this step, the k-modes clustering algorithm is used to cluster the k first objects, which is equivalent to fixing the membership decision variable w of all second objects other than the k first objects.ik The membership decision variable w for k first objects ik Optimize.

[0115] Furthermore, in this step, all objects are first fixed, then k first objects are released, and the second objects (excluding the k first objects) are fixed. Then, the k-modes clustering algorithm is used to cluster the k first objects, resulting in clustering result x1. When using the k-modes clustering algorithm to cluster the k first objects, the fixed second objects do not need to be processed. Therefore, in the clustering result x1 obtained in this step, only the clustering results of the k first objects change; the clustering results of the second objects remain unchanged. Specifically, the clustering result of the second objects is the clustering result from the previous clustering.

[0116] The method for updating the clustering results has been explained in step 203 above and will not be repeated here.

[0117] Step S17: Determine whether the updated clustering result x1 is better than the clustering result x of the previous clustering operation. If yes, proceed to step S18; otherwise, proceed to step S19.

[0118] In this step, if the target distance corresponding to the updated clustering result x1 is less than the target distance corresponding to the clustering result x of the previous clustering operation, it means that the updated clustering result x1 is better than the clustering result x of the previous clustering operation, and the clustering score corresponding to the updated clustering result x1 meets the preset conditions. Otherwise, it means that the updated clustering result x1 is not better than the clustering result x of the previous clustering operation, and the clustering score corresponding to the updated clustering result x1 does not meet the preset conditions.

[0119] Specifically, the target distance is obtained by measuring the distance of each object relative to the centroid of its cluster. The following example illustrates how to obtain the distance between two objects.

[0120] The following example illustrates the distance between the matrices corresponding to two solutions in the k-modes clustering algorithm: Let the matrices corresponding to the two solutions be labeled as matrix x and matrix y, respectively, and let the membership decision variables of matrices x and y be labeled as... and

[0121] The distance between the matrices corresponding to two solutions represents the number of objects in the two solutions that are assigned to different categories. The generalized distance between matrices x and y is further illustrated below. In one embodiment, the membership decision variables of matrices x and y... and They are respectively:

[0122]

[0123] The elements in the matrix above represent whether an object belongs to a corresponding category. Based on the membership decision variables mentioned above... and It can be seen that the membership decision variable and In the second row, the objects belong to different categories. Therefore, in this embodiment, the number of objects with different categories is 1, and correspondingly, the distance between matrices x and y is dis(x,y) = 1.

[0124] In another embodiment, the membership decision variables of matrices x and y and They are respectively:

[0125]

[0126] The elements in the matrix above represent whether an object belongs to a corresponding category. Based on the membership decision variables mentioned above... and It can be seen that the membership decision variable and In this example, the objects in the first row and the objects in the second row belong to different categories. Therefore, in this example, the number of objects with different categories is 2, and correspondingly, the distance between matrices x and y is dis(x,y) = 2.

[0127] It should be noted that the generalized distance is 0 ≤ dis(x,y) ≤ n, where n is the total number of objects to be clustered.

[0128] Based on the above analysis, when determining the distance between an object and the centroid of the cluster in which the object belongs, the types of the object and the object at the centroid can be compared. If the types are the same, the distance between the two objects can be marked as 0; otherwise, the distance between the two objects can be marked as 1.

[0129] Step S18: Set x = x1 and L = 0, then return to step S16.

[0130] In this step, setting x = x1 and L = 0 is equivalent to updating the clustering result x from the previous clustering operation to the better clustering result x1, and resetting the count of the number of operations.

[0131] Step S19, make L = L + 1.

[0132] In this step, setting L = L + 1 is equivalent to incrementing the number of clustering operations by 1.

[0133] Step S20: Determine whether the number of clustering operations L is greater than or equal to a preset threshold L. maxIf yes, proceed to step S21; otherwise, return to step S16.

[0134] It should be noted that in this step, L max This is equivalent to the maximum number of searches among two improved solutions in the neighborhood space corresponding to the same number of target quantities k. In L > L max In this case, it indicates that the corresponding clustering algorithm terminates at the maximum search neighborhood and the number of clustering operations reaches the maximum value L. max .

[0135] Step S21, make k = k + R.

[0136] In this step, k = k + R, and we return to step S14. Thus, we can re-cluster the k + R first objects, which is equivalent to expanding the scope of optimization of the first objects.

[0137] In this step, R is the preset step size for expanding the neighborhood search. R is equivalent to the difference between the number of targets of the first object selected in the two selection operations in the previous embodiment. The size of R can be determined according to user needs.

[0138] Where R is the preset quantity.

[0139] Step S22: Determine whether the target quantity k is greater than or equal to the preset quantity threshold k. max If yes, proceed to step S23; otherwise, return to step S14.

[0140] Step S24: Determine the updated clustering result x1 as the target clustering result.

[0141] In one embodiment, based on the above object clustering method, multiple objects are clustered according to their object attributes. The processing time and result bias of the clustering results are shown in Table 1.

[0142] Clustered objects Result deviation (%) Processing time (s) Communication equipment status 0 2277 Communication data packet loss rate 0.6 4265 Communication network latency 0 988 User call duration level 0 1633 User traffic usage level 1.6 637

[0143] Table 1

[0144] As shown in Table 1, the clustering results obtained by the method in this embodiment have low bias, short processing time, and high processing efficiency.

[0145] Figure 4 This is a schematic diagram of an object clustering device based on attribute data provided in an embodiment of the present invention, with reference to... Figure 4 The object clustering device 30 based on attribute data may include:

[0146] The first acquisition module 301 is used to cluster multiple objects based on their object attribute data to obtain an initial clustering result; the object attribute data and the objects correspond one-to-one.

[0147] The update module 302 is used to perform multiple selection operations in sequence, and for each selection operation, select a target number of first objects from the multiple objects for re-clustering, and update the clustering results obtained by the previous selection operation again based on the re-clustering results; the target number selected in each selection operation is greater than the target number in the previous selection operation.

[0148] The first determining module 303 is used to take the clustering result obtained by updating the current selection operation as the target clustering result when the number of targets selected in the current selection operation is greater than or equal to a preset number threshold; wherein, the re-clustering result of the first selection operation is used to update the initial clustering result.

[0149] Optionally, the clustering results obtained from each selection operation update include the categories to which all objects belong;

[0150] Correspondingly, update module 302 may include:

[0151] The first acquisition submodule is used to re-cluster the target number of first objects selected by the selection operation for each selection operation to obtain a re-clustering result, wherein the re-clustering result includes the new category to which each of the first objects belongs.

[0152] The replacement submodule is used to replace the category to which the first object belongs in the clustering result obtained from the previous selection operation with the new category of the first object, thereby completing the update of the clustering result obtained from the previous selection operation.

[0153] Optionally, update module 302 may include:

[0154] The first update submodule is used to perform multiple clustering operations sequentially on the first object of the target number selected in each selection operation, and for each clustering operation, if it is determined that the clustering score of the clustering operation does not meet the preset conditions, the number of clustering operations corresponding to the previous clustering operation is incremented by one to obtain the number of clustering operations corresponding to each clustering operation.

[0155] The first determining submodule is used to determine, when the number of clustering operations corresponding to the currently executed clustering operation is greater than a preset threshold, the clustering result obtained by the currently executed clustering operation is the re-clustering result for the target number of first objects.

[0156] Optionally, the object clustering device 30 based on attribute data may further include:

[0157] The second determining module is used to perform multiple clustering operations sequentially on the first object of the target number selected in each selection operation, and to set the number of clustering operations of each clustering operation to zero if the clustering score of the clustering operation meets the preset conditions.

[0158] Optionally, the object clustering device 30 based on attribute data may further include:

[0159] The third determining module is used to perform multiple clustering operations sequentially on the first object of the target number selected in each selection operation, and to determine that the clustering score of the clustering operation satisfies a preset condition if the clustering score of the clustering operation is greater than the clustering score of the previous clustering operation.

[0160] The fourth determining module is used to determine that the clustering score of the clustering operation does not meet the preset conditions when the clustering score of the clustering operation is less than or equal to the clustering score of the previous clustering operation.

[0161] Optionally, the object clustering device 30 based on attribute data may further include:

[0162] The second acquisition module is used to perform multiple clustering operations sequentially on the first number of objects selected in each selection operation, and to acquire the distance between each object and the centroid of the cluster in the clustering result of each clustering operation.

[0163] The third acquisition module is used to sum the distances between each object and the centroid of the cluster to obtain the total distance;

[0164] The fourth acquisition module is used to determine the target distance based on the total distance, wherein the target distance is negatively correlated with the clustering score;

[0165] The fifth determining module is used to determine whether the clustering score of the clustering operation meets the preset conditions based on the target distance.

[0166] Optionally, the fifth determining module may include:

[0167] The second determining submodule is used to perform multiple clustering operations sequentially on the first object of the target number selected in each selection operation, and for each clustering operation, if the target distance of the clustering operation is less than the target distance of the previous clustering operation, determine that the clustering score of the clustering operation meets the preset condition.

[0168] The third determining submodule is used to determine that the clustering score of the clustering operation does not meet the preset conditions when the target distance of the clustering operation is greater than or equal to the target distance of the previous clustering operation.

[0169] Optionally, in each selection operation, the first update submodule may include:

[0170] The acquisition unit is configured to, in each selection operation, sequentially perform multiple clustering operations on the first number of objects selected in the selection operation, and for each clustering operation, use the centroid of the clustering result of the previous clustering operation as the initial centroid and perform the clustering operation to obtain the clustering result of each clustering operation; wherein, for the first clustering operation in each selection operation, the centroid of the clustering result of the previous selection operation is used as the initial centroid and the clustering operation is performed; for the first clustering operation in the first selection operation, the centroid of the initial clustering result is used as the initial centroid and the clustering operation is performed.

[0171] Optionally, the first acquisition module 301 may include:

[0172] The second submodule is used to cluster multiple objects based on their object attributes using the k-modes clustering algorithm to obtain initial clustering results.

[0173] In summary, in this embodiment, multiple selection operations are performed sequentially. For each selection operation, a target number of first objects are selected from multiple objects for re-clustering, and the clustering results obtained from the previous selection operation are updated again based on the re-clustering results. Essentially, in each selection operation, the clustering results of a portion of the objects remain unchanged, and only the target number of first objects are re-clustered, thereby obtaining the updated clustering results. Compared to related technologies that use the k-modes clustering algorithm, which requires re-clustering all objects in each clustering, this method reduces the number of objects re-clustered each time, improving clustering efficiency. In this embodiment, the target number selected in each selection operation is greater than the target number in the previous selection operation. This is equivalent to progressively increasing the number of first objects to be re-clustered and decreasing the number of fixed objects until the target number selected in the current selection operation is greater than or equal to a preset threshold. Then, the clustering result obtained from the current selection operation is used as the target clustering result. This process is equivalent to progressively optimizing the clustering results, improving the accuracy of the clustering results.

[0174] The present invention also provides an electronic device, see [link to relevant documentation]. Figure 5It includes: a processor 401, a memory 402, and a computer program 4021 stored in the memory and executable on the processor. When the processor executes the program, it implements the object clustering method based on attribute data of the aforementioned embodiments.

[0175] The present invention also provides a readable storage medium that, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the object clustering method based on attribute data of the foregoing embodiments.

[0176] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0177] It should be noted that all information and data obtained in the embodiments of the present invention were obtained with the authorization of the information / data holder.

[0178] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0179] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification. Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention above. However, this disclosed approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0180] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0181] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention can also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0182] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0183] All object information (including but not limited to object device information, object personal information, etc.) and related data involved in this invention are information authorized by the object or authorized by all parties.

[0184] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0185] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0186] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An object clustering method based on attribute data, characterized in that, The method includes: Multiple objects are clustered based on their object attribute data to obtain initial clustering results; there is a one-to-one correspondence between object attribute data and objects. The multiple objects are users, and the object attribute data includes: the user's online time, the user's online frequency, and the user's network traffic usage data; Multiple selection operations are performed sequentially. For each selection operation, a target number of first objects are selected from the multiple objects for re-clustering. The clustering results obtained from the previous selection operation are updated again based on the re-clustering results. The target number selected in each selection operation is greater than the target number selected in the previous selection operation. If it is determined that the number of targets selected by the currently executed selection operation is greater than or equal to a preset number threshold, the clustering result obtained by updating the currently executed selection operation is used as the target clustering result. The re-clustering result of the first selection operation is used to update the initial clustering result; The initial clustering results include: users belonging to high-traffic-consumption users, medium-traffic-consumption users, or low-traffic-consumption users.

2. The method according to claim 1, characterized in that, Each selection operation updates the clustering results to include the category to which all objects belong; The step of selecting a target number of first objects from the plurality of objects for re-clustering, and updating the clustering results obtained from the previous selection operation based on the re-clustering results, includes: For each selection operation, the first number of objects selected by the selection operation are re-clustered to obtain a re-clustering result, which includes the new category to which each of the first objects belongs; The new category of the first object is used to replace the category to which the first object belongs in the clustering result obtained from the previous selection operation, thus completing the update of the clustering result obtained from the previous selection operation.

3. The method according to claim 1, characterized in that, For each selection operation, a target number of first objects are selected from the plurality of objects for re-clustering to obtain the re-clustering results, including: In each selection operation, for the first object of the target number selected by the selection operation, multiple clustering operations are performed in sequence. For each clustering operation, if it is determined that the clustering score of the clustering operation does not meet the preset conditions, the number of clustering operations corresponding to the previous clustering operation is incremented by one to obtain the number of clustering operations corresponding to each clustering operation. If the number of clustering operations corresponding to the currently executed clustering operation is greater than a preset threshold, the clustering result obtained by the currently executed clustering operation is determined to be the re-clustering result for the first object of the target number.

4. The method according to claim 3, characterized in that, Also includes: In each selection operation, for the first object of the target number selected by the selection operation, multiple clustering operations are performed in sequence, and for each clustering operation, if it is determined that the clustering score of the clustering operation meets the preset conditions, the number of clustering operations is set to zero.

5. The method according to claim 3 or 4, characterized in that, Also includes: In each selection operation, for the first object of the target number selected by the selection operation, multiple clustering operations are performed in sequence, and for each clustering operation, if it is determined that the clustering score of the clustering operation is greater than the clustering score of the previous clustering operation, it is determined that the clustering score of the clustering operation meets the preset condition. If the clustering score of the clustering operation is less than or equal to the clustering score of the previous clustering operation, then the clustering score of the clustering operation is determined not to meet the preset condition.

6. The method according to claim 3 or 4, characterized in that, Also includes: In each selection operation, for the first number of objects selected by the selection operation, multiple clustering operations are performed sequentially, and for each clustering operation, the distance between each object and the centroid of the cluster to which the object belongs is obtained in the clustering result of each clustering operation. The total distance is obtained by summing the distances between each object and the centroid of the cluster to which the object belongs; The target distance is determined based on the total distance, and the target distance is negatively correlated with the clustering score. Based on the target distance, determine whether the clustering score of the clustering operation meets the preset conditions.

7. The method according to claim 6, characterized in that, Based on the target distance, determine whether the clustering score of the clustering operation meets preset conditions, including: In each selection operation, for the first object of the target number selected by the selection operation, multiple clustering operations are performed in sequence, and for each clustering operation, if it is determined that the target distance of the clustering operation is less than the target distance of the previous clustering operation, the clustering score of the clustering operation is determined to meet the preset condition. If the target distance of the clustering operation is determined to be greater than or equal to the target distance of the previous clustering operation, the clustering score of the clustering operation is determined not to meet the preset condition.

8. The method according to claim 3 or 4, characterized in that, In each selection operation, for the first number of objects selected in the selection operation, the steps of each clustering operation in multiple clustering operations are executed sequentially, including: In each selection operation, for the first object of the target number selected by the selection operation, multiple clustering operations are performed in sequence. For each clustering operation, the centroid of the clustering result of the previous clustering operation is used as the initial centroid, and the clustering operation is performed to obtain the clustering result of each clustering operation. Specifically, for the first clustering operation in each selection operation, the centroid of the clustering result of the previous selection operation is used as the initial centroid, and the clustering operation is performed; for the first clustering operation in the first selection operation, the centroid of the initial clustering result is used as the initial centroid, and the clustering operation is performed.

9. The method according to claim 1, characterized in that, The step of clustering multiple objects based on their object attribute data to obtain initial clustering results includes: Based on the object attributes of multiple objects, the k-modes clustering algorithm is used to cluster multiple objects to obtain the initial clustering results.

10. An object clustering device based on attribute data, characterized in that, The device includes: The first acquisition module is used to cluster multiple objects based on their object attribute data to obtain an initial clustering result; the object attribute data corresponds one-to-one with the objects; the multiple objects are users, and the object attribute data includes: the user's online time, the user's online frequency, and the user's network traffic usage data; The update module is used to perform multiple selection operations sequentially, and for each selection operation, select a target number of first objects from the multiple objects for re-clustering, and update the clustering results obtained from the previous selection operation again based on the re-clustering results; the target number selected in each selection operation is greater than the target number in the previous selection operation. The first determining module is used to take the clustering result obtained by updating the current selection operation as the target clustering result when the number of targets selected by the current selection operation is greater than or equal to a preset number threshold. The re-clustering result of the first selection operation is used to update the initial clustering result, wherein the initial clustering result includes: the user belongs to a high-traffic-consumption user, a medium-traffic-consumption user, or a low-traffic-consumption user.

11. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1-9.

12. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method described in any one of claims 1-9.