Clustering graph generation method, electronic equipment, storage medium and program product

By generating cluster data point icons that include the tip point to the cluster center and using the flatness of the icon to represent the degree of correlation, the problem of difficulty in displaying the relationship between data points and data center in the prior art is solved, and an intuitive cluster diagram display is achieved.

CN119810246APending Publication Date: 2025-04-11KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411605105.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Existing visualization methods are difficult to visually display the relationship between data points and data centers, especially when there are many data points, it is difficult to show the global distribution and hierarchy of clustering.

Method used

By obtaining the map coordinates of the cluster data points and the cluster center point, a cluster center icon and cluster data point icon are generated. The cluster data point icon includes the tip pointing to the cluster center icon, and the flatness indicates the degree of correlation between the data points and the center point.

Benefits of technology

It realizes the intuitive display of the relationship between clustered data points and cluster center points, helping users quickly identify the distribution characteristics of data points and the influence range of cluster centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810246A_ABST
    Figure CN119810246A_ABST
Patent Text Reader

Abstract

The invention provides a cluster graph generation method, electronic equipment, a readable storage medium and a computer program product. The clustering graph generation method comprises the following steps: acquiring map coordinates of clustering data points and map coordinates of clustering center points; generating a clustering center icon at the map coordinate position of the clustering center point; clustering data point icons are generated at the map coordinate positions of the clustering data points, a clustering graph is obtained, the clustering data point icons comprise tips pointing to clustering center icons, and the flatness of the clustering data point icons represents the degree of correlation between the clustering data points and the clustering center points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method for generating a clustering graph, an electronic device, a storage medium, and a program product. Background Art

[0002] In modern business analysis and market research, the visualization of business data is a key link in understanding and decision-making. Existing visualization methods often focus on the display of a single data point, while ignoring the integrity and hierarchy of the clustering structure. It is difficult for users to grasp the global distribution of clusters. When there are many data points, it is difficult to intuitively display the relationship between data points and data centers. Summary of the invention

[0003] The present disclosure provides a method for generating a clustering graph, an electronic device, a storage medium, and a program product.

[0004] According to one aspect of the present disclosure, a method for generating a cluster map is provided, comprising: acquiring map coordinates of cluster data points and map coordinates of cluster center points; generating a cluster center icon at the map coordinate position of the cluster center point; and generating a cluster data point icon at the map coordinate position of the cluster data point to obtain the cluster map, wherein the cluster data point icon includes a tip pointing to the cluster center icon, and the flatness of the cluster data point icon represents the degree of correlation between the cluster data point and the cluster center point.

[0005] According to at least one embodiment of the cluster diagram generation method of the present disclosure, the cluster data point icon is generated at the map coordinate position of the cluster data point, including: calculating the distance between the cluster data point and the cluster center point according to the map coordinates of the cluster data point and the map coordinates of the cluster center point, and determining the direction from the cluster data point to the cluster center point; calculating the flatness of the cluster data point icon according to the distance between the cluster data point and the cluster center point, and the distance between the cluster data point and the cluster center point is proportional to the flatness of the cluster data point icon; generating the cluster data point icon according to the flatness of the cluster data point icon; and setting the cluster data point icon at the map coordinate position of the cluster data point, and setting the direction of the tip of the cluster data point icon according to the direction of the cluster center point relative to the cluster data point.

[0006] According to at least one embodiment of the cluster diagram generation method of the present disclosure, a cluster data point icon is generated according to the flatness of the cluster center icon, including: obtaining a template data point icon, the template data point icon including a tip; and according to the flatness of the cluster data point icon, stretching or flattening the template data point icon so that the template data point icon is stretched or flattened to a flatness equal to the flatness of the cluster data point icon, thereby obtaining the cluster data point icon.

[0007] According to at least one embodiment of the present disclosure, a method for generating a cluster graph, the distance between the cluster data point and the cluster center point is calculated based on the map coordinates of the cluster data point and the map coordinates of the cluster center point, and the direction from the cluster data point to the cluster center point is determined, including: querying multiple cluster clusters containing the cluster data point, and determining the cluster cluster containing the cluster data point as the target cluster cluster; respectively obtaining the cluster center points of multiple target cluster clusters, and determining the cluster center points of the target cluster cluster as the target center point; calculating the target position vector corresponding to each target center point based on the map coordinates of the cluster data point and the map coordinates of each target center point; and determining the length of the shortest target position vector among the multiple target position vectors as the distance between the cluster data point and the target center point, and determining the direction from the cluster data point to the target center point by the direction of the shortest target position vector.

[0008] According to the method for generating a cluster diagram of at least one embodiment of the present disclosure, the number of the cluster data point icons is multiple, the types of the cluster center icons include multiple, the cluster data point icons are generated at the map coordinate positions of the cluster data points, and also includes: configuring the same color for the multiple cluster data point icons whose tips point to the cluster center icons of the same type.

[0009] According to the method for generating a cluster diagram of at least one embodiment of the present disclosure, the cluster data point icon includes a tip angle and two bottom angles, a bottom edge is formed between the two bottom angles, the tip of the cluster data point icon is the tip angle of the cluster data point icon, and the flatness of the cluster data point icon is the ratio of the length of the bottom edge to the distance from the vertex of the tip angle to the bottom edge.

[0010] According to at least one embodiment of the present disclosure, the method for generating a clustering graph further includes: creating a map layer and loading a map on the map layer; and creating a clustering layer above the map layer; generating a clustering center icon at the map coordinate position of the clustering center point, including: generating the clustering center icon at the map coordinate position of the clustering center point on the clustering layer; generating clustering data point icons at the map coordinate position of the clustering data points to obtain the clustering graph, including: generating the clustering data point icons at the map coordinate position of the clustering data points on the clustering layer to obtain the clustering graph, wherein the clustering graph includes the map layer and the clustering layer.

[0011] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method for generating a clustering graph of any embodiment of the present disclosure.

[0012] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the method for generating a clustering graph according to any embodiment of the present disclosure is implemented.

[0013] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for generating a clustering graph according to any one of the embodiments of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0015] Figure 1 It is a schematic diagram of an application scenario of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0016] Figure 2 It is a schematic diagram of a cluster center point icon and a cluster data point icon according to an embodiment of the present disclosure.

[0017] Figure 3 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0018] Figure 4 It is a schematic diagram of cluster boundaries of a cluster diagram according to an embodiment of the present disclosure.

[0019] Figure 5 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0020] Figure 6 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0021] Figure 7 is a schematic diagram of the bottom edge of a clustered data point icon according to one embodiment of the present disclosure.

[0022] Figure 8 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0023] Fig. 9 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0024] Fig.10 It is a flowchart of a method for generating a clustering graph according to an embodiment of the present disclosure.

[0025] Fig.11 It is a schematic block diagram of the structure of a clustering graph generation device according to an embodiment of the present disclosure.

[0026] Fig.12 The present invention is a block diagram showing a structure of an electronic device equipped with a device for generating a clustering graph according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0028] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] Figure 1 The application scenario of the method for generating a clustering graph according to an embodiment of the present disclosure is shown. A clustering graph is a visualization picture of a collection of multiple clusters obtained by grouping similar objects in a set of data into a cluster. The clustering graph can be applied to various business scenarios to visualize business data and help users understand the business data intuitively. The rules for clustering business data can be formulated based on the content that you want to display through the clustering graph. For example, if you want to display the business area to which a business hall belongs through a clustering graph, the clustering rules can be configured to classify business halls belonging to the same business area into the same cluster.

[0030] Figure 1The cluster diagram in the application scenario shown is a cluster diagram established based on map information. A data point in a cluster in the cluster diagram (hereinafter referred to as a cluster data point) represents a location in the map. For example, a cluster data point can represent a business hall, a building complex, a residential community, a service site, etc., and can be configured according to the specific business type, which is not limited here. Usually, a cluster center point is also provided in the cluster diagram to represent the representative elements of a cluster. For clusters generated corresponding to different business data, the meaning and calculation method of the cluster center point can be configured accordingly as needed. For example, the center position of a cluster cluster can be configured as the cluster center point of the cluster cluster. In Figure 1 In the cluster diagram shown, a cluster data point represents a residential community, a cluster center point represents a business hall, and all cluster data points in the cluster cluster where the cluster center point is located represent the management scope of the business hall of the cluster center point of the cluster cluster. In other words, the cluster diagram can show the residential communities included in the management scope of a business hall, and at the same time, it can show which business hall the management of a residential community belongs to. This helps users quickly and accurately identify the influence scope of different business halls, the distribution characteristics of different residential communities, and the relationship between business halls and residential communities, etc.

[0031] like Figure 1 As shown, in the cluster diagram generated by the embodiment of the present disclosure, different icons are configured for cluster data points and cluster center points. For example, the icon representing the cluster center point is a circle, and the icon representing the cluster data point is a triangle. In this way, it is easy to intuitively distinguish the cluster center point and the cluster data point, which can facilitate users to quickly find the cluster center point.

[0032] Specifically, Figure 1 The icon representing the clustered data point is a triangle-shaped angular shape. Figure 2 The icon representing the cluster data point has a tip angle and two bottom angles, and the two bottom angles are symmetrical about the tip angle. The tip of the tip angle points to the icon representing the cluster center point. In this way, the cluster center point to which the cluster data point belongs can be more clearly shown. When there are many data points, the relationship between the cluster data points and the cluster center point can also be intuitively seen.

[0033] Based on the above scheme, the cluster diagram generation method disclosed in the present invention can generate a cluster diagram based on map information and cluster data, generate a cluster center icon to represent the cluster center point, generate a cluster data point icon to represent the cluster data point, and the generated cluster data point icon has a tip pointing to the cluster center icon. The cluster center point to which the cluster data point belongs can be determined by the direction of the tip, which can help users intuitively and clearly see the relationship between the cluster data points and the cluster center points.

[0034] Figure 3 FIG. 1 is a schematic diagram showing the overall process of a clustering graph generation method M100 according to an embodiment of the present disclosure. Figure 3 The method shown includes steps S110 to S140. The method can be executed by electronic devices such as mobile phones, tablet computers, and servers.

[0035] Specifically, Figure 3 The methods shown include: S120: Obtain map coordinates of cluster data points and map coordinates of cluster center points.

[0036] The clustered data points may be real geographical locations on a map. For example, if the clustered data points are residential areas, the map coordinates of the clustered data points are the location coordinates of the residential areas on the map.

[0037] In one example, the geographical location represented by the clustered data point is an area with a certain range, such as the area occupied by a residential area. The map coordinates of the clustered data point can be the map coordinates corresponding to the centroid of the geometric figure formed on the map by the area represented by the clustered data point. For example, assuming that a clustered data point represents a residential area, and the geometric figure formed on the map by the residential area is a rectangle, the map coordinates corresponding to the centroid of the rectangle are used as the map coordinates of the clustered data point. In other embodiments, the map coordinates can also be the centroid, center, etc. of the geometric figure formed on the map by the area represented by the clustered data point, which is not limited here.

[0038] In another example, the map coordinates of the clustered data points may be a specific location of the location represented by the clustered data points. For example, if the clustered data points represent a residential community with a north gate, the map coordinates corresponding to the north gate may be used as the map coordinates of the clustered data points.

[0039] The cluster center point can be a real geographical location point on the map, or a location point calculated based on the location of each cluster data point in a cluster. For example, in real estate-related businesses, a cluster data point represents the geographical location of a building, and a cluster center point represents the geographical location of a business hall. The business hall represented by the cluster center point in a cluster manages the building represented by each cluster data point in the same cluster. In this case, the cluster center point is a real geographical location point on the map. For another example, in urban planning business, a cluster data point represents the geographical location of a residential community, and a cluster center point represents the geographical location of a proposed convenience service station. First, it is necessary to classify the residential communities in the same jurisdiction into the same cluster, and then calculate a location that is relatively close to each residential community in the jurisdiction as the cluster center point. The cluster center point represents the geographical location of the proposed convenience service station. In this case, the cluster center point is a location point calculated based on the location of each cluster data point in a cluster.

[0040] Similar to the map coordinates of the cluster data points, when the cluster center point represents an area of ​​a certain range on the map, the map coordinates of the cluster center point can be the map coordinates corresponding to the centroid, centroid, center, etc. of the geometric figure formed by the area represented by the cluster center point on the map, or they can be the map coordinates corresponding to a specific location of the place represented by the cluster center point, and there is no limitation here.

[0041] S140: Generate a cluster center icon at the map coordinate position of the cluster center point.

[0042] There are no specific requirements for the shape, style, color and other parameters of the cluster center icon.

[0043] In one example, a cluster diagram can show a variety of different cluster center points, and different cluster center points represent different business locations, and different cluster center points have different cluster center icons. For example, cluster center points representing hospital locations have different cluster center icons from cluster center points representing school locations. A circular icon is used as the cluster center icon for cluster center points representing hospital locations, and a square icon is used as the cluster center icon for cluster center points representing school locations.

[0044] In one example, the icon library stores multiple cluster center icons, each of which corresponds to a business type. When generating the cluster center icon, the business type corresponding to the cluster center point is obtained, and the cluster center icon is retrieved in the icon library using the business type corresponding to the cluster center point, and the retrieved cluster center icon is called into the cluster diagram to generate a cluster center icon corresponding to the business type of the cluster center point in the cluster diagram.

[0045] S160 , generating cluster data point icons at the map coordinate positions of the cluster data points to obtain a cluster map, wherein the cluster data point icons include a tip pointing to the cluster center icon.

[0046] The tip of the cluster data point icon may be in the shape of a corner, a pointer, an arrow, etc., which is not limited here. The tip of the cluster data point icon points to the cluster center icon, which means that the cluster center icon is located in the direction pointed by the tip of the cluster data point icon.

[0047] The flatness of the cluster data point icon indicates the degree of correlation between the cluster data point and the cluster center point. The degree of correlation between the cluster data point and the cluster center point can be the distance, the degree of achievement of the indicator, the similarity of data classification, etc., which is not limited here. For example, the greater the correlation between the cluster data point and the cluster center point, the smaller the flatness of the cluster data point icon (i.e., the more slender); conversely, the smaller the correlation between the cluster data point and the cluster center point, the greater the flatness of the cluster data point icon (i.e., the flatter).

[0048] In this way, the user can intuitively determine the cluster center point related to the cluster data point by observing the cluster center icon pointed to by the tip of the cluster data point icon, and can intuitively determine the degree of correlation between the cluster data point and its related cluster center point by observing the flatness of the cluster data point icon. In one example, the icon library also stores cluster data point icons. When generating cluster data point icons, the cluster data point icons in the icon library are called, and according to the position of the cluster center point of the cluster cluster to which the cluster data point belongs, the cluster data point icon is rotated so that the tip of the cluster data point icon points to the cluster center point.

[0049] In summary, the cluster diagram generation method provided in this embodiment can generate a cluster center icon to represent the cluster center point, and generate a cluster data point icon to represent the cluster data point, and make the tip of the generated cluster data point icon point to the cluster center icon. In this way, the relationship between the cluster data point and the cluster center point can be intuitively seen.

[0050] Furthermore, in the cluster map generated by the cluster map generation method provided in the present embodiment, the flatness of the cluster data point icon indicates the degree of correlation between the cluster data point and the cluster center point. On the one hand, since the cluster data point icons of cluster data points with a lower degree of correlation with the cluster center point are flatter, multiple flat cluster data points will form a visual boundary effect, so that multiple flat cluster data point icons can surround the cluster center icon and outline the approximate boundary of the cluster, thereby intuitively displaying the cluster boundary of the cluster cluster where the cluster center point is located. Specifically, for a cluster center point icon, the line connecting the cluster data point icons with the farthest tip pointing to it in each direction is the cluster boundary of the cluster cluster where the cluster center point is located. For example, please combine Figure 4 , Figure 4 The boundary line L1 shown in the figure is the cluster boundary of the cluster cluster where the cluster center S1 is located. On the other hand, since the cluster data point icons of the cluster data points with a high correlation with the cluster center are more slender, when there are many cluster data point icons that are strongly correlated with the cluster center icon near it, the slender cluster data point icon can avoid being stacked with other cluster data point icons, thereby preventing the stacked cluster data point icons from being difficult to identify and affecting the user's judgment of the relationship between them and the cluster center.

[0051] Regarding step S160, in some embodiments of the present disclosure, it may include: Figure 5 Steps S1610 to S1640 are shown.

[0052] S1610. Calculate the distance between the cluster data points and the cluster center point according to the map coordinates of the cluster data points and the map coordinates of the cluster center point, and determine the direction from the cluster data points to the cluster center point.

[0053] The distance between the cluster data point and the cluster center point is a quantitative expression of the degree of correlation between the cluster data point and the cluster center point. The distance can be the absolute value of the line between the map coordinates of the cluster data point and the map coordinates of the cluster center point. Assuming that the map coordinates of the cluster data point are (X1, Y1), the map coordinates of the cluster center point are (X2, Y2), and the distance between the cluster data point and the cluster center point is D, the distance D can be calculated according to the following formula 1.

[0054] Formula 1: .

[0055] The direction from the cluster data point to the cluster center point can be stored as the angle between the map coordinates of the cluster data point and the map coordinates of the cluster center point and the 0 degree direction. For example, the true north direction is defined as the 0° direction, and assuming that the cluster center point is due east of the cluster data point, the direction from the cluster data point to the cluster center point is stored as 90°.

[0056] S1620. Calculate the flatness of the cluster data point icon according to the distance between the cluster data point and the cluster center point.

[0057] Among them, the distance between the cluster data point and the cluster center point is proportional to the flatness of the cluster data point icon.

[0058] The flatness of the cluster data point icon indicates the flatness of the cluster data point icon. Figure 2 , taking the tip as an angular structure as an example, the tip of the angular structure is recorded as the tip angle, and the other end opposite to the tip is recorded as the end. The longer the tip angle, the smaller the angle, and the narrower the end, the smaller the flatness of the cluster data point icon; the shorter the tip angle, the larger the angle, and the wider the end, the greater the flatness of the cluster data point icon.

[0059] In the case where the degree of correlation between the cluster data point and the cluster center point is represented by the distance between the two, the distance between the cluster data point and the cluster center point is proportional to the flatness of the cluster data point icon, which means that the closer the cluster data point icon is to the cluster center icon, the smaller the flatness of the cluster data point icon and the more slender the cluster data point icon is; conversely, the farther the cluster data point icon is from the cluster center icon, the greater the flatness of the cluster data point icon and the flatter the cluster data point icon is. In this way, on the one hand, it is convenient for users to intuitively see the distance between the cluster data point icon and its corresponding cluster center icon based on the flatness of the cluster data point icon. On the other hand, the space near the cluster center icon is limited. If the flatness of the cluster data point icon closer to the cluster center icon is smaller, it is more difficult for multiple cluster data point icons near the cluster center icon to overlap, which can avoid the overlapping of cluster data point icons near the cluster center icon to a certain extent and affect the visualization effect, so that the direction of the tip can be seen more clearly.

[0060] S1630 . Generate clustered data point icons according to the tip flatness of the clustered data point icons.

[0061] In one example, clustered data point icons are stored in an icon library. When generating a clustered data point icon, the clustered data point icon in the icon library is called, and the clustered data point icon is compressed or stretched according to the flatness of the clustered data point icon to generate a clustered data point icon with a certain flatness.

[0062] S1640: Setting a cluster data point icon at the map coordinate position of the cluster data point, and setting the direction of the tip of the cluster data point icon according to the direction of the cluster center point relative to the cluster data point.

[0063] In one example, setting a cluster data point icon at the map coordinate position of the cluster data point means setting the cluster data point icon with the map coordinate position of the cluster data point as the center position of the cluster data point icon. Setting the direction of the tip of the cluster data point icon according to the direction of the cluster center point relative to the cluster data point means rotating the cluster data point icon according to the direction of the cluster center point relative to the cluster data point so that the tip of the cluster data point icon points to the cluster center icon. For example, assuming that the north direction is 0°, when the cluster data point icon is generated at the map coordinate position of the cluster data point, the tip of the cluster data point icon points to the 0° direction by default. If the direction of the cluster center point corresponding to the cluster data point icon relative to the cluster data point is 90°, representing the east direction, the cluster data point icon is rotated 90° clockwise so that its tip points to the east direction.

[0064] In some embodiments of the present disclosure, when generating a cluster data point icon, it can also be configured that the size of the cluster data point icon is proportional to the distance between the cluster data point and the cluster center point.

[0065] The distance between the cluster data point and the cluster center point is proportional to the size of the cluster data point icon, which means that the closer the cluster data point icon is to the cluster center icon, the smaller the cluster data point icon is; conversely, the farther the cluster data point icon is from the cluster center icon, the larger the cluster data point icon is. In this way, on the one hand, it is convenient for users to intuitively see the distance between the cluster data point icon and its corresponding cluster center icon based on the size of the cluster data point icon. On the other hand, the space near the cluster center icon is limited. If the cluster data point icon closer to the cluster center icon is smaller, the space near the cluster center icon can accommodate more cluster data point icons, which can avoid the cluster data point icons near the cluster center icon from overlapping and affecting the visualization effect to a certain extent.

[0066] Based on the foregoing, in some embodiments of the present disclosure, the cluster data point icon can have its flatness proportional to the distance between the cluster data point and the cluster center point, or its size proportional to the distance between the cluster data point and the cluster center point, or its flatness and size both proportional to the distance between the cluster data point and the cluster center point, and there is no limitation here.

[0067] Regarding step S1630, in some embodiments of the present disclosure, it may include: Figure 6 Steps S1631 to S1633 are shown.

[0068] S1631. Obtain a template data point icon, where the template data point icon includes a tip.

[0069] In one example, the icon library stores template data point icons, and the cluster data point icons are icons obtained by a series of changes of the template data point icons.

[0070] S1632. According to the flatness of the cluster center icon, the template data point icon is stretched or flattened so that the template data point icon is stretched or flattened until the flatness is equal to the flatness of the cluster data point icon, thereby obtaining the cluster data point icon.

[0071] In one example, a distance-flatness conversion formula is configured to calculate the flatness of the cluster center icon based on the distance between the cluster data point and the cluster center point, for example, converting the distance into the tip flatness of the cluster data point icon according to a certain conversion ratio.

[0072] In some embodiments of the present disclosure, the cluster data point icon includes a tip corner and two bottom corners, a bottom edge is formed between the two bottom corners, the tip of the cluster data point icon is the tip corner of the cluster center icon, and the flatness of the cluster data point icon is the ratio of the length of the bottom edge to the distance from the vertex of the tip angle to the bottom edge.

[0073] For example, assuming that the distance from the vertex of the tip angle to the bottom edge is l, the length of the bottom edge is d, and the tip flatness of the cluster center icon is e, then the tip flatness e of the cluster center icon can be calculated according to the following formula 2.

[0074] Formula 2: .

[0075] To stretch the template data point icon, it means to increase the value of d and decrease the value of l, so that the angle of the tip angle increases, the bottom edge increases, and the distance from the vertex to the bottom edge decreases, thereby increasing the value of flatness e and making the template data point icon more slender. To stretch the scaled icon, it means to decrease the value of d and increase the value of l, so that the angle of the tip angle decreases, the bottom edge shortens, and the distance from the vertex to the bottom edge increases, thereby reducing the value of flatness e and making the template data point icon flatter and wider.

[0076] In some embodiments of the present disclosure, a distance-size conversion formula is also configured to calculate the size of the cluster data point icon based on the distance between the cluster data point and the cluster center point, for example, converting the distance to the size of the cluster data point icon according to a certain conversion ratio. The size of the cluster data point icon is expressed as n% of the size of the template data point icon. For example, when n=50, it means that the size of the cluster data point icon is 50% of the template data point icon, and the template data point icon is proportionally reduced by 50%. If n=120, it means that the size of the cluster data point icon is 120% of the template data point icon, and the template data point icon is proportionally enlarged by 120%.

[0077] Please combine Figure 7 In some embodiments of the present disclosure, the bottom edge of the cluster data point icon includes an edge formed by a straight line, a curve, a broken line, etc. Figure 7 In the example, the bottom edge of the cluster data point icon can be a straight line, a concave curve, a convex curve, a concave single polyline, or a convex single polyline.

[0078] In some embodiments of the present disclosure, the same cluster data point may be a data point in different cluster clusters, and different cluster clusters have different cluster centers. In this case, it is necessary to determine which cluster center point icon corresponds to which cluster center point icon is the cluster center point icon pointed to by the tip of the cluster data point icon corresponding to the cluster data point. Based on this, step S1640 may include the following: Figure 8 Steps S1641 to S1644 shown are used to determine which cluster center point icon the tip of the cluster data point icon points to.

[0079] S1641 , query multiple clusters containing cluster data points, and determine the cluster containing the cluster data points as the target cluster.

[0080] For example, a cluster data point represents a residential community, which is involved in both the house sale business, belonging to the cluster of house sale business, and the house rental business, that is, it belongs to the cluster of house rental business. Then, the cluster of house sale business and the cluster of house rental business can be determined as target clusters.

[0081] S1642: Obtain cluster center points of multiple target clusters respectively, and determine the cluster center point of the target cluster as the target center point.

[0082] For example, the target clusters include a cluster of house selling business and a cluster of house leasing business. The cluster center of the cluster of house selling business represents a house selling business hall, which is determined as a target center point; the cluster center of the cluster of house leasing business represents a house leasing business hall, which is determined as another target center point.

[0083] S1643. Calculate the target position vector corresponding to each target center point according to the map coordinates of the cluster data points and the map coordinates of each target center point.

[0084] Among them, the absolute value of the target position vector corresponding to the target center point represents the distance from the cluster data point to the target center point, and the direction of the target position vector corresponding to the target center point is the direction of the vector starting from the cluster data point and ending at the target center point, representing the direction from the cluster data point to the target center point.

[0085] S1644. Determine the length of the shortest target position vector among the multiple target position vectors as the distance between the cluster data point and the target center point, and determine the direction from the cluster data point to the target center point using the direction of the shortest target position vector.

[0086] The shortest target position vector among multiple target position vectors means that the target center point corresponding to the target position vector is closest to the cluster data point. That is to say, step S1644 represents using distance as a weight value and determining the cluster center point icon to which the cluster data point icon points based on the proximity principle. In this way, based on the above steps S1641 to S1644, the cluster center point icon to which the cluster data point icon points can be determined when the cluster data point belongs to multiple cluster clusters.

[0087] In other embodiments, when the cluster data point belongs to multiple clusters, the cluster center point icon to which the cluster data point icon points may be determined based on other factors, such as the number of cluster data points in the cluster, the size of the map area occupied by the cluster, the importance of the cluster, or other user-defined weights, which are not listed here one by one.

[0088] In some embodiments of the present disclosure, there are multiple types of cluster center icons, and the cluster center points representing clusters of different business types correspond to different cluster center icons. When generating cluster data point icons, multiple cluster data point icons whose tips point to the same type of cluster center icons are configured with the same color. In this way, it is convenient for users to clearly and intuitively determine the cluster center to which the cluster data point icon mainly belongs by the direction of the tip of the cluster data point icon combined with the color of the cluster data point icon.

[0089] For example, the cluster center icon corresponding to the cluster center point of the cluster cluster of the house selling business is a circle, and the cluster center icon corresponding to the cluster center point of the cluster cluster of the house rental business is a square. When generating cluster data point icons, if the cluster data point icon points to the circular cluster center icon, the color of the cluster data point icon is configured to be blue, and if the cluster data point icon points to the square cluster center icon, the color of the cluster data point icon is configured to be red. In this way, in the final generated cluster diagram, the blue cluster data point icons all point to the circular cluster center icon, and the red cluster data point icons all point to the square cluster center icon.

[0090] In a specific embodiment, after determining the cluster center icon to which a cluster data point icon points, the type of the cluster center icon is obtained, and it is detected whether the type of the cluster center icon is assigned a corresponding color. If so, the color of the cluster data point icon is configured using the color corresponding to the type of the cluster center icon; if not, an unassigned color is assigned to the cluster center icon to obtain the color corresponding to the cluster center icon, and then the color of the cluster data point icon is configured using the color corresponding to the type of the cluster center icon.

[0091] In some embodiments of the present disclosure, the method for generating a clustering graph may also include: Figure 8 Step S110 is shown.

[0092] S110. Create a map layer and a clustering layer.

[0093] The map layer is used to display map information, and the cluster layer is used to display cluster information, including cluster data point icons and cluster center point icons.

[0094] In the implementation method of the cluster layer for displaying cluster information, step S140, generating a cluster center icon at the map coordinate position of the cluster center point, can be specifically implemented as: generating a cluster center icon at the map coordinate position of the cluster center point on the cluster layer. And step S160, generating a cluster data point icon at the map coordinate position of the cluster data point, and obtaining a cluster graph, can be specifically implemented as: generating a cluster data point icon at the map coordinate position of the cluster data point on the cluster layer, and obtaining a cluster graph, the cluster graph including the map layer and the cluster layer.

[0095] In this way, the map information and the cluster information are displayed in different layers respectively. The map layer and the cluster layer can be displayed at the same time, or one of them can be displayed separately, providing users with multiple display perspectives.

[0096] Specifically, step S110 includes: Fig.10 Steps S1101 to S1102 are shown.

[0097] S1101. Create a map layer, and load a map into the map layer.

[0098] S1102. Create a clustering layer above the map layer.

[0099] In this way, the cluster data point icons and cluster center point icons are displayed above the map to avoid the cluster data point icons and cluster center point icons being blocked by the map. In addition, generating cluster data point icons and / or cluster center point icons in the cluster layer will not affect the data in the map layer.

[0100] Based on any of the above embodiments, the present disclosure also provides a device for generating a clustering graph. Fig.11 It is a schematic block diagram of the structure of a clustering graph generation device according to an embodiment of the present disclosure.

[0101] like Fig.11 As shown, the clustering graph generating device includes: The acquisition module 110 is used to acquire the map coordinates of the cluster data points and the map coordinates of the cluster center points.

[0102] The first generating module 120 is used to generate a cluster center icon at the map coordinate position of the cluster center point. The second generation module 130 is used to generate cluster data point icons at the map coordinate positions of the cluster data points to obtain a cluster diagram, wherein the cluster data point icons include a tip pointing to the cluster center icon, and the flatness of the cluster data point icons represents the degree of correlation between the cluster data points and the cluster center points.

[0103] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0104] The execution subject of the clustering graph generation method in the specific implementation manner of the present disclosure may be an electronic device such as a mobile phone, a tablet computer, a server, etc.

[0105] Therefore, based on any of the above-mentioned embodiments, the present disclosure also provides an electronic device, which can execute the method for generating a clustering graph of any of the embodiments described above in the present disclosure, and the device for generating a clustering graph of any of the embodiments described above can be configured on the electronic device.

[0106] Fig.12 It is a schematic block diagram of the structure of an electronic device 1000 configured with a clustering graph generating device for generating a clustering graph according to an embodiment of the present disclosure.

[0107] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0108] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0109] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0110] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0111] A computer program or instruction may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, a computer program or instruction may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0112] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable clustering graph generating device to produce a machine, so that the instructions executed by the processor of the computer or other programmable clustering graph generating device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable clustering graph generating device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable clustering diagram generating device, so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in a suitable manner in any one or more embodiments / methods or examples. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0117] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0118] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for generating a clustering graph, characterized in that: include: Get the map coordinates of cluster data points and cluster center points; Generating a cluster center icon at the map coordinate position of the cluster center point; as well as Generating cluster data point icons at the map coordinate positions of the cluster data points to obtain the cluster graph; The cluster data point icon includes a tip pointing to the cluster center icon, and the flatness of the cluster data point icon represents the degree of correlation between the cluster data point and the cluster center point.

2. The method for generating a clustering graph according to claim 1, characterized in that: Generating a clustered data point icon at the map coordinate position of the clustered data point includes: According to the map coordinates of the cluster data points and the map coordinates of the cluster center point, the distance between the cluster data points and the cluster center point is calculated, and the direction from the cluster data points to the cluster center point is determined; Calculating the flatness of the cluster data point icon according to the distance between the cluster data point and the cluster center point, wherein the distance between the cluster data point and the cluster center point is proportional to the flatness of the cluster data point icon; generating the clustered data point icon according to the flatness of the clustered data point icon; and The cluster data point icon is set at the map coordinate position of the cluster data point, and the direction of the tip of the cluster data point icon is set according to the direction of the cluster center point relative to the cluster data point.

3. The method for generating a clustering graph according to claim 2, characterized in that: Generating a clustered data point icon according to the flatness of the clustered data point icon, including: obtaining a template data point icon, the template data point icon comprising a tip; and According to the flatness of the cluster data point icon, the template data point icon is stretched or flattened so that the template data point icon is stretched or flattened until the flatness is equal to the flatness of the cluster data point icon, thereby obtaining the cluster data point icon.

4. The method for generating a clustering graph according to claim 2, characterized in that: The step of calculating the distance between the cluster data point and the cluster center point according to the map coordinates of the cluster data point and the map coordinates of the cluster center point, and determining the direction from the cluster data point to the cluster center point comprises: Querying multiple clusters containing the cluster data points, and determining the cluster containing the cluster data points as a target cluster; Respectively obtaining the cluster center points of the plurality of target clusters, and determining the cluster center point of the target cluster as the target center point; calculating the target position vector corresponding to each target center point according to the map coordinates of the clustered data points and the map coordinates of each target center point; and The length of the shortest target position vector among the multiple target position vectors is determined as the distance between the cluster data point and the target center point, and the direction of the shortest target position vector is determined as the direction from the cluster data point to the target center point.

5. The method for generating a clustering graph according to claim 2, characterized in that: The number of the cluster data point icons is multiple, the types of the cluster center icons include multiple, and the cluster data point icons are generated at the map coordinate positions of the cluster data points, further comprising: The same color is configured for a plurality of the cluster data point icons whose tips point to the same type of cluster center icon.

6. The method for generating a clustering graph according to claim 2, characterized in that: The cluster data point icon includes a tip angle and two bottom angles, a bottom edge is formed between the two bottom angles, the tip of the cluster data point icon is the tip angle of the cluster data point icon, and the flatness of the cluster data point icon is the ratio of the length of the bottom edge to the distance from the vertex of the tip angle to the bottom edge.

7. The method for generating a clustering graph according to claim 1, characterized in that: Also includes: Create a map layer and load a map into the map layer; as well as creating a clustering layer above the map layer; Generating a cluster center icon at the map coordinate position of the cluster center point includes: Generating the cluster center icon at the map coordinate position of the cluster center point on the cluster layer; Generating cluster data point icons at the map coordinate positions of the cluster data points to obtain the cluster graph includes: The cluster data point icons are generated at the map coordinate positions of the cluster data points on the cluster layer to obtain the cluster graph, which includes the map layer and the cluster layer.

8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method for generating a clustering graph according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the clustering graph generation method described in any one of claims 1 to 7 when executed by a processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a clustering graph according to any one of claims 1 to 7 is implemented.