Feature clustering method, apparatus, device, and storage medium
By calculating the offset between multi-dimensional feature data and the center position of the cluster type, the user position is adjusted to generate the target cluster map, which solves the problem of the lack of visibility of multi-dimensional clustering results and realizes an intuitive display of clustering results.
Patent Information
- Application Number
- CN202310216249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-03-02
AI Technical Summary
In existing technologies, multi-dimensional clustering results are not visual, and users cannot intuitively view the clustering results.
By acquiring multi-dimensional feature data, calculating the offset between the user and the cluster center, adjusting the user's position on the initial cluster map, and generating the target cluster map, the distribution characteristics of multi-dimensional feature data can be represented on a two-dimensional plane.
The generated target clustering diagram has strong visibility and can intuitively display the strength and bias of users in each cluster type, making it convenient for operation and maintenance personnel to quickly judge and take targeted measures.
Smart Images

Figure CN116150641B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of clustering technology, and more specifically, to a feature clustering method, apparatus, device, and storage medium. Background Technology
[0002] Clustering is a very common and effective data analysis method. In the process of application maintenance or decision-making, clustering is often used to cluster the information to be decided or maintained in order to determine the corresponding data analysis for the application.
[0003] In existing technologies, taking game user clustering as an example, by selecting appropriate gameplay-related features (such as weekly game count, rank points, preferred game modes, team ratio, etc.), each player can be described by a set of data. If we consider this set of data as a coordinate system (if two features are selected, it's a two-dimensional space, i.e., a plane; if three features are selected, it corresponds to a three-dimensional space), then all active players in the entire server are a large number of points in an N-dimensional space. Using a clustering algorithm, all players can be divided into several types, and labels can be assigned based on the feature values of the type centers.
[0004] However, this clustering method is only applicable to two dimensions. When clustering multi-dimensional features, even if labels or annotations have been given based on the feature values of the type centers, users cannot intuitively view the clustering results based on the clustering diagram. In other words, for multi-dimensional clustering, the clustering results are not visual. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a feature clustering method, apparatus, device, and storage medium to solve the problem that the clustering results of multi-dimensional clustering in the prior art are not visible.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, one embodiment of this application provides a feature clustering method, the method comprising:
[0008] Obtain multi-dimensional feature data for multiple users respectively;
[0009] Based on multiple multi-dimensional feature data and a preset number of clusters, the multiple users are clustered to obtain an initial clustering graph; the initial clustering graph includes: a preset number of clustering types, and a clustering type corresponding to each user, wherein the initial position of each user on the initial clustering graph is at the center position of each user's corresponding clustering type;
[0010] Based on the multi-dimensional feature data of each user, calculate the positional offset between the initial position of each user and the center position of multiple cluster types;
[0011] Based on the aforementioned position offsets, determine the target position displacement corresponding to each user;
[0012] Based on the target position displacement, the initial position of each user on the initial clustering graph is adjusted to obtain the target clustering graph.
[0013] Secondly, another embodiment of this application provides a feature clustering apparatus, the apparatus comprising:
[0014] The module includes an acquisition module, a determination module, a calculation module, and an adjustment module, among which:
[0015] The acquisition module is used to acquire multi-dimensional feature data corresponding to multiple users respectively;
[0016] The determining module is used to cluster the multiple users according to the multiple multi-dimensional feature data and a preset number of clusters to obtain an initial clustering graph; the initial clustering graph includes: a preset number of clustering types, and a clustering type corresponding to each user, wherein the initial position of each user on the initial clustering graph is at the center position of each user's corresponding clustering type;
[0017] The calculation module is used to calculate the positional offset between the initial position of each user and the center positions of multiple cluster types based on the multi-dimensional feature data of each user;
[0018] The determining module is specifically used to determine the target position displacement corresponding to each user based on each of the position offsets;
[0019] The adjustment module is used to adjust the initial position of each user on the initial clustering graph according to the target position displacement, so as to obtain the target clustering graph.
[0020] Thirdly, another embodiment of this application provides a feature clustering device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the feature clustering device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the first aspect above.
[0021] Fourthly, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of any of the methods described in the first aspect above.
[0022] The beneficial effects of this application are as follows: By using the feature clustering method provided in this application, after clustering multiple users based on multi-dimensional feature data and a preset number of clusters, each user is first clustered to the center position of the corresponding cluster type. That is, the multi-dimensional feature data is first laid flat on a two-dimensional plane. Then, by calculating the positional offset between the center position of each cluster type and each user, the target position displacement corresponding to each user is determined. Then, the initial position of each user on the initial cluster map is adjusted according to the target position displacement. The positional offset reflects the pull of the center position of each cluster type on each user. Thus, the target cluster map of multi-dimensional feature data is obtained on the two-dimensional plane. This method of obtaining the target cluster map can not only take into account the distribution characteristics of each user in each cluster type, but also quickly determine the strength of each user in each cluster type or which cluster type each user prefers by observing the target cluster map. This makes the target cluster map highly visible even when clustering multi-dimensional feature data. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a feature clustering method provided in an embodiment of this application;
[0025] Figure 2 A schematic diagram of an initial clustering graph provided for another embodiment of this application;
[0026] Figure 3 A schematic diagram of a target clustering graph provided in an embodiment of this application;
[0027] Figure 4 A flowchart illustrating a feature clustering method provided in another embodiment of this application;
[0028] Figure 5 A flowchart illustrating a feature clustering method provided in another embodiment of this application;
[0029] Figure 6 This is a schematic diagram of the structure of a feature clustering device provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of a feature clustering device provided in another embodiment of this application;
[0031] Figure 8 This is a schematic diagram of the structure of a feature clustering device provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0033] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0034] Furthermore, the flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed in order or performed simultaneously. Moreover, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0035] The following explanation, using several specific application examples, illustrates a feature clustering method provided in the embodiments of this application.
[0036] In one possible implementation, embodiments of the present invention provide a feature clustering method. Figure 1 This is a flowchart illustrating a feature clustering method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:
[0037] S101: Obtain multi-dimensional feature data for multiple users respectively.
[0038] In the embodiments of this application, the multi-dimensional feature data can be feature data of any dimension, such as feature data of hundreds or even thousands of dimensions. The specific dimension settings of the multi-dimensional feature data can be flexibly adjusted according to the user's needs, and this application does not impose any restrictions here.
[0039] In the embodiments of this application, taking users of game A as an example, the users to be clustered can be selected, for example, game users with stable login habits within a preset time period, thereby avoiding interference from some new game users or game users who only occasionally log in to check but do not play. Furthermore, some features that best describe the game user's gaming behavior in game A can be selected as multi-dimensional feature data, such as: average daily number of games played in single-player mode, average daily number of games played in team mode, highest rank achieved in single-player mode, highest rank achieved in team mode, total spending within a preset time range, number of friends added within a preset time range, and number of teammates who have teamed up within a preset time range. It should be understood that the specific selection principle of multi-dimensional feature data is determined according to the classification objective. The classification objective is "features that can describe the game user's gaming behavior within the game," so the corresponding multi-dimensional feature data may be as described above. However, in other possible embodiments, if the classification target is "a true profile of game users", then the multi-dimensional feature data to be obtained under this classification target may include: the province where each game user's game login account is located, the configuration of the computer used by the game user, the proportion of game users logging in on weekends, the longest active period of game users, etc. It should be understood that the above embodiments are only illustrative examples, and the specific multi-dimensional features and their relationship with the classification target can be flexibly adjusted according to user needs, and are not limited to those given in the above embodiments.
[0040] S102: Based on multiple multi-dimensional feature data and the preset number of clusters, cluster multiple users to obtain an initial clustering graph.
[0041] In one embodiment of this application, before obtaining the initial clustering graph, it is necessary to cluster each user based on multiple multi-dimensional feature data and a preset number of clusters to determine the preset number of cluster types. The initial clustering graph is then divided into equally spaced segments based on the preset number of clusters, with each segment representing the center position of a cluster type. Alternatively, in other possible embodiments, after determining the preset number of clusters, the preset number of points can be equally spaced on a two-dimensional plane to form the initial clustering graph, where each point on the two-dimensional plane represents the center position of a cluster type. This arrangement ensures that the size of the initial clustering graph is determined by the preset number of clusters. With a fixed preset spacing, a larger preset number of clusters results in a larger initial clustering graph. This ensures that the size of the initial clustering graph is related to the preset number of clusters, avoiding the problem that a large preset number of clusters can lead to a crowded initial clustering graph with closely spaced centers, making the subsequent target clustering graph less intuitive.
[0042] Figure 2 A schematic diagram of an initial clustering graph provided in an embodiment of this application, as shown below. Figure 2 As shown, the initial clustering graph can be, for example, a circle, with its center coinciding with the origin of the coordinate axes. The preset number of clusters can be, for example, 5. The display styles corresponding to the five cluster types are: solid circle, hollow circle, hollow triangle, solid square, and hollow square, respectively. The graph obtained after equally segmenting the initial clustering graph according to the preset number of clusters is as follows. Figure 2 As shown, the coordinate points corresponding to the center positions of the five cluster types are arranged in a circle with equal spacing, where each coordinate point represents the center position of a cluster type.
[0043] One way to determine the coordinates of each cluster type on the initial clustering graph is, for example, if the preset number of clusters is k, then the coordinate position of the kth cluster type on the coordinate axis is... Where k = 1, 2, 3...k, in the embodiments of this application, in order to ensure the visibility of the target clustering graph after clustering, the preset number of clusters k can generally be set to any integer between 5 and 10. It should be understood that the above embodiments are only illustrative examples, and the specific setting range and specific setting value of the preset number of clusters can be flexibly adjusted according to the user's needs, and are not necessarily limited to those given in the above embodiments.
[0044] The initial clustering graph includes: a preset number of cluster types, and the cluster type corresponding to each user. The initial position of each user on the initial clustering graph is at the center of the cluster type corresponding to each user.
[0045] In the embodiments of this application, in order to make the clustering graph visible, each user under each cluster type on the initial clustering graph is identified by a preset color, and different preset colors correspond to different cluster types; that is, the cluster type corresponding to each point can be intuitively determined by the color of each point on the coordinate axis, and the user data under the cluster type corresponding to each color can be determined according to the number of points corresponding to each color.
[0046] Alternatively, in some other possible embodiments, each user under each cluster type on the initial clustering graph is displayed in a preset display style. The display styles for different cluster types can be, for example, solid circles, hollow circles, solid triangles, hollow triangles, solid pentagons, hollow pentagons, solid squares, hollow squares, asterisks ("*"), hash symbols ("#"), etc. It should be understood that the above embodiments are only illustrative examples. The preset display method for each user under each cluster type on the specific initial clustering graph can be flexibly adjusted according to the user's needs and is not limited to the above embodiments. It is sufficient that each cluster type corresponds to a display method that can uniquely identify itself, and that the display method is different from the display methods of other cluster types.
[0047] That is, after each user is clustered, there is a corresponding cluster type, and the initial position of each user on the initial cluster graph is the center position of the cluster type corresponding to that user.
[0048] In the embodiments of this application, each user is not only displayed at the center of the corresponding cluster type with a preset color, but also the position point corresponding to each user is associated with the user's identification information. If the mouse is located at the position point corresponding to the user, the identification information of the user corresponding to the position point will be displayed on the side of the mouse.
[0049] S103: Based on the multi-dimensional feature data of each user, calculate the positional offset between the initial position of each user and the center position of multiple cluster types.
[0050] Although each user's initial position is at the center of the corresponding cluster type, since each user's feature data consists of multi-dimensional feature data, each user may also have a certain degree of similarity with other cluster types. In the embodiments of this application, the similarity between each user and other cluster types is reflected by position offset. A user may have a certain degree of similarity with multiple other cluster types. That is, in addition to the cluster type corresponding to the user, other cluster types may all bring a certain position offset to the user's initial position.
[0051] S104: Determine the target position displacement for each user based on the position offset.
[0052] Based on the positional offset brought about by each cluster type to the user's initial position, the target position displacement corresponding to the user, that is, the actual position offset, is determined comprehensively.
[0053] S105: Based on the target position displacement, adjust the initial position of each user on the initial clustering graph to obtain the target clustering graph.
[0054] Based on the target position displacement of each user, the initial cluster position of each user on the initial cluster graph is adjusted until each user is adjusted according to the target position displacement. The resulting cluster graph is the target cluster graph.
[0055] Figure 3 This is a schematic diagram of a target clustering graph provided in an embodiment of this application, as shown below. Figure 3 As shown in the embodiments of this application, since the display method of the location point corresponding to each user in the target clustering graph is its own corresponding display style, Figure 3 The five cluster types are displayed in the following styles: solid circle, hollow circle, hollow triangle, solid square, and hollow square. The clustering effect can be visually observed through the target clustering diagram. Specifically, the display style of each point on the coordinate axis indicates the cluster type; the number of points corresponding to each display style indicates the number of users in that cluster type; the degree of clustering of each point on the coordinate axis indicates the concentration of each cluster type; furthermore, the distance of each user's location from the center of each cluster type on the coordinate axis indicates the proximity of each user to that cluster type. The closer the user is to the cluster type, the closer the user is to that cluster type. Thus, the highly visual target clustering diagram directly conveys key clustering information without much further explanation, serving as a direct reference or supplementary tool for subsequent operations and maintenance personnel.
[0056] The feature clustering method provided in this application, after clustering multiple users based on multi-dimensional feature data and a preset number of clusters, first clusters each user to the center position of their respective cluster type. That is, first lays the multi-dimensional feature data flat on a two-dimensional plane, and then calculates the positional offset between the center position of each cluster type and each user to determine the target position displacement for each user. Then, the initial position of each user on the initial cluster map is adjusted according to the target position displacement. The positional offset reflects the pull of the center position of each cluster type on each user, thus obtaining the target cluster map of multi-dimensional feature data on the two-dimensional plane. This method of obtaining the target cluster map not only takes into account the distribution characteristics of each user in each cluster type, but also allows for quick determination of the strength of each user in each cluster type or which cluster type each user prefers by observing the target cluster map. This makes the target cluster map highly visible even when clustering multi-dimensional feature data.
[0057] Optionally, based on the above embodiments, this application embodiment may also provide a feature clustering method, the implementation process of which will be illustrated below with reference to the accompanying drawings. Figure 4 This is a flowchart illustrating a feature clustering method provided in another embodiment of this application, as shown below. Figure 4 As shown, the method may further include:
[0058] S111: Send the target clustering graph to the preset operation and maintenance terminal.
[0059] In the embodiments of this application, the preset operation and maintenance terminal can be, for example, a terminal corresponding to a data analyst, a terminal for a game planner, a terminal for game operation and maintenance, or a terminal for a game character. It should be understood that the above embodiments are only illustrative examples, and the specific types of preset operation and maintenance terminals can be flexibly adjusted according to user needs, and are not necessarily limited to those given in the above embodiments. The method provided in this application is not limited to game clustering, but can also be used for clustering users corresponding to other applications, such as clustering users corresponding to social applications, or clustering users corresponding to shopping applications, etc. The specific clustering objects and clustering scenarios can be flexibly adjusted according to user needs, and are not limited to those given in the above embodiments.
[0060] In some possible embodiments, the preset operation and maintenance terminal can interact with the target clustering map after obtaining it. It can view the target clustering map by dragging or zooming in, and when the mouse points to any point on the target clustering map, the user information corresponding to that target point, such as the user's identification information, will be displayed. Alternatively, the operator can search for the user corresponding to the target identification information on the target clustering map by obtaining the target user information that the operation and maintenance personnel wish to view. The target user information can be, for example, the identification information of a single target user or a list of identification information of multiple target users. The specific interaction method with the target clustering map can be flexibly adjusted according to the user's needs and is not limited to the embodiments given above.
[0061] This interactive method allows for quick queries on any user within a target cluster. For example, operations personnel can input the identifier of a churned player to determine the player's specific location on the target cluster graph and the corresponding cluster type. This facilitates operations personnel in quickly developing targeted recovery plans for that churned player.
[0062] Similarly, assuming the current operations and maintenance personnel want to monitor multiple churned players, they can input all the identification information of multiple players into the system (for example, in the form of a table). The system will highlight these multiple churned players on the target cluster map. To improve the display effect, for example, the brightness of other players' positions can be reduced at the same time. In this way, it can be directly obtained which cluster type the multiple churned players are located in on the current target cluster map, which cluster types correspond to more churned players, and the distribution of multiple churned players among each cluster type can be directly determined.
[0063] Optionally, based on the above embodiments, this application embodiment may also provide a feature clustering method, and the implementation process determined in the above method will be illustrated below with reference to the accompanying drawings. Figure 5 This is a flowchart illustrating a feature clustering method provided in another embodiment of this application, as shown below. Figure 5 As shown, S103 may further include:
[0064] S121: Based on the multi-dimensional feature data of each user, calculate the offset force of the center position of each cluster type on each user.
[0065] In the embodiments of this application, the distance between each user and the center position of each cluster type is first calculated; then, based on the distance, the magnitude of the offset force of the center position of each cluster type on each user is determined.
[0066] The method for calculating the distance between each user and the center of each cluster type can be, for example, as follows: For any user A, the feature sequence of its corresponding multi-dimensional feature data can be, for example, {f} i} where i = 1, 2, 3, ..., l; l is the dimension number of the multidimensional feature data, which can be very large, for example, hundreds or thousands. For clustering algorithms, the feature sequence values of the cluster centers for each cluster type are obtained. For example, for the k-th cluster type, the feature sequence of its cluster centers can be, for example, ... Where k is the label of each cluster type, K is the preset number of clusters, i = 1, 2, 3, ..., l; k = 1, 2, 3, ..., K, then the distance of user A to the cluster centers of each cluster type is...
[0067]
[0068] Thus, assuming there are M users to be clustered, with m as the index of each user, then for each user, there is the distance to each cluster type k. Where m = 1, 2, 3...M; k = 1, 2, 3...K.
[0069] In the embodiments of this application, when calculating the magnitude of the offset force, for example, the magnitude of the offset force of the center position of each cluster type relative to each user can be determined based on a preset threshold of distance and offset force magnitude.
[0070] Specifically, continuing with the above embodiment as an example, the distance from user m to cluster type K is changed as follows: It should be understood that if the distance from user M to any cluster type is 0, it indicates that the user precisely coincides with the cluster center of that cluster type. In this case, there is no need to perform alignment and subsequent calculation of the offset force; the user's corresponding position point can be directly plotted at the center position (cluster center) of that cluster type. Therefore, in the embodiments of this application, when processing the distance according to the above formula, the default distance is... All are greater than 0.
[0071] In the embodiments of this application, in order to limit the position of each user point, the transformed... There are preset maximum and minimum values, among which That is, the maximum value set. That is, the minimum value set.
[0072] Then, based on the above embodiments, To make further changes, that is, to Standardize to obtain in, That is, it is proportional to the magnitude of the offset force exerted on user m by the center position of cluster type k.
[0073] S122: Calculate the position offset of the center position of each cluster type relative to each user based on the magnitude of the offset force.
[0074] Taking any of the above embodiments as an example, suppose that after clustering multiple users, the clustering result of user m is a cluster type of k=3. In this case, the initial position of user m is first set at the center position of the cluster type of k=3. Then, the magnitude of the offset force received by user m from the center position of each of the other cluster types is calculated in turn. For example, taking the preset number of clusters as 5 as an example, user m needs to calculate the magnitude of the offset force of the center position of each cluster type of k=1, k=2, k=4 and k=5 on user m respectively.
[0075] For example, first calculate the offset force of the cluster center position of the k=1 cluster type to user m. For the sake of simplicity, let p be the cluster type of user m corresponding to k=3 and q be the cluster type of user m corresponding to k=1. Then the position offset of user m caused by q is:
[0076]
[0077]
[0078] Where, x q y q Let x be the coordinates of point q. p y p Let p be the coordinates of point p.
[0079] Ultimately, the unique way to determine the target location corresponding to user m is the vector sum of the offset effects of all cluster types on it, which is: Where L is a preset coefficient, which can uniformly scale the position offset and is used to adjust the concentration between points during visualization, so as to adjust the target clustering map to better highlight the situation of each type, or to better highlight the bias of the mixture between types.
[0080] In embodiments of this application, L can be set to, for example, [the value of L is missing]. It should be understood that the above embodiments are merely illustrative. In other possible embodiments, L can also be set to an adjustable range value. Users can adjust the final target clustering map by adjusting the value of L. The larger L is set, the more dispersed the points are; the smaller L is set, the more concentrated the points are. The specific adjustment can be made flexibly according to the user's needs and is not limited to the above embodiments.
[0081] After the above steps, the final position coordinates (x, y) of user m on the target clustering graph are (x...). p +ΔX, y p +ΔY), repeat the above arrangement until the initial position of each user on the initial cluster graph is adjusted, and the target cluster graph can be obtained.
[0082] Using the feature clustering method provided in this application, after clustering multiple users based on multi-dimensional feature data and a preset number of clusters, each user is first clustered to the center position of their respective cluster type. Then, the distance between the center position of each cluster type and each user is calculated. Based on the distance, the magnitude of the offset force of the center position of each cluster type on each user is determined. Based on the magnitude of the offset force, the positional offset of the center position of each cluster type on each user is determined, thereby determining the target position displacement for each user. Then, based on the target position displacement, the initial position of each user on the initial cluster map is adjusted to obtain the target cluster map. This method of obtaining the target cluster map not only takes into account the distribution characteristics of each user in each cluster type, but also allows for quick determination of the strength of each user in each cluster type, or which cluster type each user prefers, by observing the target cluster map. Furthermore, through the setting of interactive functions with the target cluster map, it is possible to quickly query the type of any user in the target cluster map.
[0083] The feature clustering apparatus provided in this application will be explained below with reference to the accompanying drawings. This feature clustering apparatus can perform the above-described... Figures 1-5 The specific implementation and beneficial effects of any feature clustering method are described above and will not be repeated below.
[0084] Figure 6 This is a schematic diagram of the feature clustering device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes: an acquisition module 201, a determination module 202, a calculation module 203, and an adjustment module 204, wherein:
[0085] The acquisition module 201 is used to acquire multi-dimensional feature data corresponding to multiple users respectively;
[0086] The determination module 202 is used to cluster multiple users based on multiple multi-dimensional feature data and a preset number of clusters to obtain an initial clustering graph. The initial clustering graph includes: a preset number of clustering types and a clustering type corresponding to each user. The initial position of each user on the initial clustering graph is at the center of the clustering type corresponding to each user.
[0087] The calculation module 203 is used to calculate the positional offset between the initial position of each user and the center position of multiple cluster types based on the multi-dimensional feature data of each user;
[0088] The determination module 202 is specifically used to determine the target position displacement for each user based on the position offsets.
[0089] The adjustment module 204 is used to adjust the initial position of each user on the initial clustering graph according to the target position displacement to obtain the target clustering graph.
[0090] Optionally, the calculation module 203 is specifically used to calculate the magnitude of the offset force of the center position of each cluster type relative to each user based on the multi-dimensional feature data of each user; and to calculate the position offset of the center position of each cluster type relative to each user based on the magnitude of the offset force.
[0091] Optionally, the calculation module 203 is specifically used to calculate the distance between each user and the center location of each cluster type;
[0092] The determination module 202 is specifically used to determine the magnitude of the offset force of the center position of each cluster type to each user based on the distance.
[0093] Optionally, the determining module 202 is specifically used to determine the offset force of the center position of each cluster type to each user based on preset thresholds for distance and offset force.
[0094] Optionally, each user in each cluster type on the initial clustering graph is identified by a preset color, with different preset colors corresponding to different cluster types.
[0095] Optionally, based on the above embodiments, this application embodiment may also provide a feature clustering device, as described below with reference to the accompanying drawings. Figure 6 The implementation process of the given device is illustrated with examples. Figure 7 This is a schematic diagram of the feature clustering device provided in another embodiment of this application, as shown below. Figure 7 As shown, the device also includes: a segmentation module 205, wherein:
[0096] The determination module 202 is specifically used to cluster each user based on multiple multi-dimensional feature data and a preset number of clusters, and to determine the preset number of cluster types;
[0097] The segmentation module 205 is used to segment the initial clustering graph at equal intervals according to the preset number of clusters, and each segmentation point represents the center position of a cluster type.
[0098] like Figure 7 As shown, the device also includes a sending module 206, used to send the target clustering map to a preset maintenance terminal.
[0099] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0100] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0101] Figure 8 This is a schematic diagram of the structure of a feature clustering device provided in an embodiment of this application. The feature clustering device can be integrated into a terminal device or a chip of a terminal device.
[0102] like Figure 8As shown, the feature clustering device includes a processor 501, a bus 502, and a storage medium 503.
[0103] Processor 501 is used to store programs, and processor 501 calls the programs stored in storage medium 503 to execute the above-mentioned programs. Figures 1-5 The corresponding method implementation is similar in both implementation and technical effect, and will not be described in detail here.
[0104] Optionally, this application also provides a program product, such as a storage medium storing a computer program, including a program that executes the embodiments corresponding to the above-described methods when run by a processor.
[0105] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0106] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0108] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A feature clustering method, characterized in that, The method includes: Obtain multi-dimensional feature data for multiple users respectively; Based on multiple multi-dimensional feature data and a preset number of clusters, the multiple users are clustered to obtain an initial clustering graph. The initial clustering graph includes: a preset number of cluster types, and a cluster type corresponding to each user. The initial position of each user on the initial clustering graph is at the center of each user's corresponding cluster type. The size of the initial clustering graph is determined according to the preset number of clusters. Each user under each cluster type on the initial clustering graph is displayed in a preset display style. Based on the multi-dimensional feature data of each user, calculate the positional offset between the initial position of each user and the center position of multiple cluster types; Based on the aforementioned position offsets, the target position displacement corresponding to each user is determined, wherein the target position displacement corresponding to each user is used to characterize the similarity of each user to other cluster types; Based on the target position displacement, the initial position of each user on the initial clustering graph is adjusted to obtain the target clustering graph.
2. The method as described in claim 1, characterized in that, The step of calculating the positional offset between the initial position of each user and the center positions of multiple cluster types based on the multi-dimensional feature data of each user includes: Based on the multi-dimensional feature data of each user, calculate the offset force of the center position of each cluster type relative to each user; Based on the magnitude of the offset force, the position offset of the center position of each cluster type relative to the position of each user is calculated.
3. The method as described in claim 2, characterized in that, The step of calculating the offset force of the center position of each cluster type relative to each user based on the multi-dimensional feature data of each user includes: Calculate the distance between each user and the center location of each cluster type; Based on the distance, determine the magnitude of the offset force of the center position of each cluster type relative to each user.
4. The method as described in claim 3, characterized in that, The step of determining the offset force of the center position of each cluster type relative to each user based on the distance includes: Based on preset thresholds for the distance and the magnitude of the offset force, the offset force of the center position of each cluster type relative to each user is determined.
5. The method as described in claim 1, characterized in that, Each user in each cluster type on the initial clustering graph is identified by a preset color, and different preset colors correspond to different cluster types.
6. The method as described in claim 1, characterized in that, Before clustering the multiple users based on the multiple multi-dimensional feature data and a preset number of clusters to obtain an initial clustering graph, the method further includes: Based on multiple multi-dimensional feature data and a preset number of clusters, each user is clustered to determine the preset number of cluster types. The initial clustering graph is divided into equally spaced segments according to the preset number of clusters, and each segmentation point represents the center position of a cluster type.
7. The method as described in claim 1, characterized in that, The method further includes: The target clustering graph is sent to the preset operation and maintenance terminal.
8. A feature clustering device, characterized in that, The device includes: an acquisition module, a determination module, a calculation module, and an adjustment module, wherein: The acquisition module is used to acquire multi-dimensional feature data corresponding to multiple users respectively; The determining module is used to cluster the multiple users according to the multiple multi-dimensional feature data and a preset number of clusters to obtain an initial clustering graph. The initial clustering graph includes: a preset number of cluster types and a cluster type corresponding to each user. The initial position of each user on the initial clustering graph is at the center of each user's corresponding cluster type. The size of the initial clustering graph is determined according to the preset number of clusters. Each user under each cluster type on the initial clustering graph is displayed in a preset display style. The calculation module is used to calculate the positional offset between the initial position of each user and the center positions of multiple cluster types based on the multi-dimensional feature data of each user; The determining module is specifically used to determine the target position displacement corresponding to each user based on each of the position offsets, wherein the target position displacement corresponding to each user is used to characterize the similarity of each user to other cluster types; The adjustment module is used to adjust the initial position of each user on the initial clustering graph according to the target position displacement, so as to obtain the target clustering graph.
9. A feature clustering device, characterized in that, The device includes a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the feature clustering device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1-7.
10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the method described in any one of claims 1-7.
Citation Information
Patent Citations
Force-directed segmented bone parallel coordinates plot clustering data bundling method
CN106709507A
A high-dimensional data visualization clustering analysis method and system
CN109271441A