A method, device, electronic device and medium for implementing multi-dimensional analysis
By drawing a multi-layer hexagonal structure in the cellular diagram and setting the fill color according to the attribute information, the drawing lag problem of cellular diagram when the number of dimensions increases is solved, and the rendering speed and scalability of the figure are improved.
Patent Information
- Application Number
- CN202210440899.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-04-25
AI Technical Summary
In the prior art, cellular graphs will cause drawing lag when the number of dimensions increases, affecting the rendering speed and redrawing speed of the graph.
By obtaining the dimension number and attribute information of the object to be analyzed, the corresponding number of first hexagons is drawn based on the number of dimensions, and the second hexagon and the third hexagon are drawn respectively based on the center point of each first hexagon. , constitute a honeycomb diagram, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal. Based on the attribute information, the fill color of the hexagon with the smallest radius among the hexagons with the same center point in each group is determined, and the attribute state of the object to be analyzed is represented by the fill color of the hexagon with the smallest radius in the honeycomb diagram.
By reducing the number of DOM elements, the rendering speed and redrawing speed of cellular graphs are improved, the lag caused by the increase in the number of dimensions is solved, and the scalability of the graph and the visualization effect of data is improved.
Smart Images

Figure CN114842109B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic equipment and medium for implementing multi-dimensional analysis. Background Art
[0002] Multidimensional analysis is a measurement and aggregation statistic after dimensional analysis of data. Dimensional analysis is to classify data according to its characteristics, and multidimensional analysis is used to measure the relationship between data in each classification to obtain the relationship between statistical items of the same nature.
[0003] At present, there are many means of graphical display of web multidimensional analysis, such as bar charts, multi-line line charts, radar charts, and honeycomb charts. Honeycomb charts are the best topological structure covering two-dimensional planes. The composition is exquisite, compact, and beautiful. It has the advantages of large space utilization, multiple dimensional display, and support for sequential display in multidimensional analysis. In the related art, the honeycomb hexagonal unit structure in the honeycomb chart is realized by drawing rectangles and triangles with CSS (Cascading Style Sheets), resulting in a honeycomb hexagon with a border and border line. The DOM (Document Object Model) elements are 9. If the number of dimensions is N, the number of DOM elements on a honeycomb chart is 9*N. It can be seen that as the number of dimensions increases, the DOM elements will increase exponentially, resulting in jams when the honeycomb chart is drawn. Therefore, how to solve the jams in honeycomb chart drawing caused by the increase in the number of dimensions has become an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a method, device, electronic device and medium for implementing multi-dimensional analysis to solve the problem of honeycomb diagram drawing jamming caused by an increase in the number of dimensions.
[0005] According to one aspect of the present invention, there is provided a method for implementing multidimensional analysis, comprising: obtaining the number of dimensions and attribute information of an object to be analyzed;
[0006] Draw a corresponding number of first hexagons based on the number of dimensions, draw a second hexagon and a third hexagon based on the center point of each of the first hexagons, and form a honeycomb diagram based on the first hexagons, the second hexagons, and the third hexagons with the same center point, wherein the radii of the first hexagons, the second hexagons, and the third hexagons are not equal;
[0007] The filling color of the hexagon with the smallest radius in each group of the first hexagon, the second hexagon and the third hexagon with the same center point is determined according to the attribute information, and the attribute state of the object to be analyzed is represented by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0008] According to another aspect of the present invention, there is provided a device for implementing multidimensional analysis, comprising: an information acquisition module, configured to acquire the number of dimensions and attribute information of an object to be analyzed;
[0009] A honeycomb diagram drawing module, used for drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each of the first hexagons, and forming a honeycomb diagram based on the first hexagons, the second hexagons and the third hexagons with the same center point, wherein the radii of the first hexagons, the second hexagons and the third hexagons are not equal;
[0010] An information display module is used to determine the filling color of the hexagon with the smallest radius in each group of the first hexagon, the second hexagon and the third hexagon with the same center point according to the attribute information, and the attribute state of the object to be analyzed is represented by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for implementing multidimensional analysis described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for implementing multidimensional analysis described in any embodiment of the present invention when executed.
[0016] The technical solution of the embodiment of the present invention obtains the number of dimensions and attribute information of the object to be analyzed; draws a corresponding number of first hexagons based on the number of dimensions, draws a second hexagon and a third hexagon based on the center point of each first hexagon, and forms a honeycomb diagram based on the first hexagon, the second hexagon and the third hexagon with the same center point, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal; determines the filling color of the hexagon with the smallest radius in each group of the first hexagon, the second hexagon and the third hexagon with the same center point according to the attribute information, and represents the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram, thereby solving the problem of honeycomb diagram drawing jamming caused by the increase in the number of dimensions in the prior art, and drawing a corresponding number of honeycomb diagrams by the number of dimensions improves the rendering speed and redrawing speed of the graphics, while improving the scalability of the graphics.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1a It is a schematic diagram of drawing a honeycomb hexagon using CSS drawing method;
[0020] Figure 1b This is another diagram that uses CSS drawing to draw a honeycomb hexagon;
[0021] Figure 2 is a flow chart of a method for implementing multidimensional analysis provided according to the first embodiment of the present invention;
[0022] Figure 3 is a flow chart of a method for implementing multidimensional analysis provided according to Embodiment 2 of the present invention;
[0023] Figure 4 is a flow chart of a method for implementing multidimensional analysis provided according to Embodiment 3 of the present invention;
[0024] Figure 5 is a schematic diagram of a honeycomb hexagon with border lines provided according to Embodiment 3 of the present invention;
[0025] Figure 6is a schematic structural diagram of a device for implementing multidimensional analysis provided according to a fourth embodiment of the present invention;
[0026] Figure 7 It is a structural schematic diagram of an electronic device for implementing the multi-dimensional analysis implementation method of the fifth embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] At present, there are many ways to display images for multidimensional analysis based on the Web, such as bar charts, pie charts, multi-line line charts, radar charts, and honeycomb charts, etc. Among them, the honeycomb chart is the best topological structure covering the two-dimensional plane. Therefore, it has the advantages of large space utilization, multiple dimensional display, and support for sequential display in multidimensional analysis.
[0030] The cell structure of a honeycomb graph is usually represented by a regular hexagon, which can also be called a honeycomb hexagon. A honeycomb hexagon can be drawn in the following ways:
[0031] Figure 1a This is a schematic diagram of drawing a honeycomb hexagon using CSS drawing method, where the CSS drawing method is to cut and splice multiple rectangles into a pattern, and then color the pattern. Figure 1aAs shown, drawing a memory hexagon using CSS drawing method includes: drawing a rectangle b, two triangles a and c, a total of three DOM elements, and synthesizing a hexagon n through these three DOM elements. Using the same method to draw a hexagon m with a larger radius, and the centers of m and n coincide in the same direction, and are laid at a relatively low level. Then, in the same way, a hexagon l with a larger radius is drawn, and the centers of l, m and n coincide, and are laid at a lower level, to obtain a honeycomb hexagon composed of three hexagons.
[0032] Figure 1b This is another schematic diagram of drawing a honeycomb hexagon using CSS drawing method, such as Figure 1b As shown, the CSS drawing method for drawing a memory hexagon includes: drawing rectangle b, rotating rectangle b 60° clockwise with the center point as the origin to obtain rectangle c, and then rotating rectangle b 60° counterclockwise with the center point as the origin to obtain rectangle a, and overlapping rectangles a, b and c to obtain a hexagon, that is, using three DOM elements (rectangles a, b and c) to synthesize a hexagon n. Using the same method to draw a hexagon m with a larger radius, and the centers of m and n overlap in the same direction, and are laid at a relatively low level. Then, in the same way, draw a hexagon l with a larger radius, and the centers of l, m and n overlap, and are laid at a lower level to obtain a honeycomb hexagon composed of three hexagons.
[0033] The main cost of CSS painting is to recalculate the DOM (Document Object Model) layout and repaint the DOM layer. The main cost of canvas is the cost of executing Javascript, the cost of Skia drawing, and the cost of composite. A large number of DOM elements means that a large number of layers need to be composited, which is the key to performance degradation. Figure 1a and Figure 1b For example, a honeycomb hexagon with a border and border line has 9 DOM elements. If a honeycomb hexagon represents one dimension, then when the number of dimensions is 200, the number of DOM elements is 1800. At this time, the honeycomb diagram drawing begins to be delayed. If the number of dimensions reaches 500, the number of DOM elements is 4500. At this time, the rendering speed and redrawing speed of the honeycomb hexagon are affected, and even obvious jamming occurs.
[0034] To solve the above problems, the present invention provides a solution for drawing honeycomb hexagons based on Canvas drawing method. Compared with CSS drawing method, Canvas drawing method uses fewer DOM elements to draw honeycomb hexagons, which can improve the rendering speed and redrawing speed of honeycomb images in high-dimensional scenes.
[0035] Embodiment 1
[0036] Figure 2 A flowchart of a method for implementing multidimensional analysis is provided for the first embodiment of the present invention. This embodiment is applicable to the case of performing multidimensional analysis on a web system. The method can be executed by a device for implementing multidimensional analysis. The device for implementing multidimensional analysis can be implemented in the form of hardware and / or software. The device for implementing multidimensional analysis can be integrated in an electronic device. As shown in FIG1 , the method includes:
[0037] S110: Obtain the number of dimensions and attribute information of the object to be analyzed.
[0038] The object to be analyzed may be an object that needs to be subjected to a Web-based multidimensional analysis. The object to be analyzed may be configured in the Web-based multidimensional analysis system by manual configuration or file import. Multidimensional analysis is one of the advanced statistical analysis methods, which is a method of analyzing a product or a market phenomenon on a spatial coordinate of more than two dimensions.
[0039] The Web-based multidimensional analysis system can include two ends: a server end and a front end, wherein the server end can be developed using the .NET C# language to perform tasks such as data analysis and storage; the front end can be developed using the JavaScript-based open source framework library dojo to perform tasks such as interface calculations and image display of multidimensional analysis.
[0040] HTML5 (HyperText Markup Language Five) is a language description method for building Web content.
[0041] Canvas is a new element added to HTML5. This element, combined with the API (Application Programming Interface) provided by JavaScript, can be used to draw 2D images.
[0042] The number of dimensions may be the number of objects to be analyzed, for example, the number of dimensions may be the number of cities in the world, the number of IP addresses in a certain urban area, the number of computer rooms in a certain area, or the number of servers in a certain computer room, etc.
[0043] Attribute information may be attribute characteristics of the object to be analyzed, and may specifically be the GDP of cities around the world, the Internet access time of an IP address in a certain urban area, or the resource usage of a server in a certain computer room.
[0044] Exemplarily, the configuration information of the object to be analyzed is obtained, the number of dimensions of the object to be analyzed is determined based on the configuration information, and the attribute information of the object to be analyzed is obtained in real time based on the configuration information. Specifically, the attribute information of the object to be analyzed is obtained in real time based on the access interface of the object to be analyzed in the configuration information.
[0045] S120. Draw a corresponding number of first hexagons based on the number of dimensions, draw a second hexagon and a third hexagon based on the center point of each first hexagon, and form a honeycomb diagram based on the first hexagons, second hexagons, and third hexagons with the same center point, wherein the radii of the first hexagon, the second hexagon, and the third hexagon are not equal.
[0046] Specifically, graphics can be drawn through ZRender (ZlevelRender, a two-dimensional drawing engine), which can provide multiple rendering methods such as Canvas, SVG (Scalable Vector Graphics), VML (VectorMarkup Language, vector graphics drawing language), etc. At the same time, Zrender is also a new lightweight Canvas class library, including: MVC (Model View Controller, Model-View-Controller) encapsulation, data-driven, and can provide a DOM-like (Document Object Model, file object model) layered mechanism.
[0047] In this embodiment, a first hexagon can be drawn by obtaining the number of dimensions of the object to be analyzed. The hexagon can be a regular hexagon with six axes of symmetry, including three diagonals and lines connecting the center points of three opposite sides. Its six sides are equal, and the degree of each internal angle is also equal. The sum of its external angles is equal to 360 degrees, each external angle is 60 degrees, and each internal angle is 120 degrees.
[0048] The second hexagon and the third hexagon are drawn based on the center point of each first hexagon, and the first hexagon, the second hexagon and the third hexagon with the same center point form a honeycomb diagram, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal.
[0049] S130, determining the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group according to the attribute information, and representing the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0050] In this embodiment, after drawing a hexagon according to the number of dimensions of the object to be analyzed, the hexagon will be rendered in three dimensions based on Canvas to obtain the corresponding rendering graphics. Among them, the hexagons in the honeycomb diagram can be used to distinguish the attribute states of the corresponding dimensions by different filling colors, and different groupings of the honeycomb diagram can deepen the dimensional analysis level. For example, the attribute states of the hexagons in different dimensions can be represented by the depth of the color. In this embodiment, the population density of a certain area can be counted as an example. If the color displayed on the graph is darker, it means that the population density represented by its attribute state is higher.
[0051] Specifically, determining the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group according to the attribute information may include: comparing the attribute information of the object to be analyzed with the threshold interval under the corresponding dimension, and determining the target threshold interval to which the attribute information belongs; determining the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group; using the color corresponding to the target threshold interval as the filling color of the hexagon with the smallest radius in the corresponding dimension, and representing the attribute state of the object to be analyzed by the filling color of the hexagon with the smallest radius.
[0052] Among them, the threshold interval can be a numerical interval corresponding to different states set based on the attribute information of the object to be analyzed. Specifically, the threshold interval can be divided into a normal threshold interval, a suspicious threshold interval and an abnormal threshold interval according to the severity. Alternatively, the threshold interval can be divided into a normal threshold interval and an abnormal threshold interval according to the severity. The embodiment of the present invention does not specifically limit the specific connotation of the threshold interval. A corresponding color is set for each threshold interval in advance. For example, the corresponding color can be set to green for the normal threshold interval, orange for the suspicious threshold interval, and red for the abnormal threshold interval. By comparing the attribute information of the object to be analyzed and the threshold interval, the target threshold interval corresponding to the attribute information can be determined, and then, the corresponding fill color of each target threshold interval can be determined. Then, the hexagon with the smallest radius among the hexagons with the same center point in each group is determined, and the color corresponding to the target threshold interval is used as the fill color of the hexagon, and the attribute state corresponding to this hexagon in the entire graph can be intuitively displayed through this color.
[0053] The embodiment of the present invention can draw a corresponding number of honeycomb diagrams according to the number of dimensions, determine the fill color of the honeycomb diagram according to the attribute information, and use the fill color to represent the attribute state of the object to be analyzed, thereby using a small number of DOM elements to draw the honeycomb diagram, reducing the graphics drawing overhead, improving the rendering speed and redrawing speed of the graphics, and at the same time improving the scalability of the graphics and the visualization of the data.
[0054] Embodiment 2
[0055] Figure 3 This is a flowchart of a method for implementing multidimensional analysis provided in the second embodiment of the present invention. In the above embodiment, before drawing the first number of hexagons corresponding to the number of dimensions, this embodiment may also include detecting the radius ratio relationship between the hexagons. The same terms as those in the above embodiment are not repeated here. Figure 3 As shown, the method includes:
[0056] S201: Obtain the number of dimensions and attribute information of the object to be analyzed.
[0057] S202: Detect configuration information of a honeycomb graph, and obtain the radius of a first hexagon, center point coordinates, a radius ratio of a second hexagon to a first hexagon, and a radius ratio of a third hexagon to the first hexagon in the configuration information of the honeycomb graph.
[0058] Among them, the configuration information is the graphic shape information of the honeycomb diagram preset in the database. The honeycomb diagram is drawn according to the configuration information. The configuration information may include the radius of the first hexagon, the center point coordinates, the radius ratio of the second hexagon to the first hexagon, and the radius ratio of the third hexagon to the first hexagon, etc.
[0059] Optionally, the radius ratio of the second hexagon to the first hexagon may be less than 1, and the radius ratio of the third hexagon to the first hexagon may be greater than 1. For example, the radius ratio of the second hexagon to the first hexagon is p=8 / 9, that is, the radius r of the first hexagon is reduced to 8 / 9r to obtain the radius of the second hexagon. The radius ratio of the third hexagon to the first hexagon is 1=1.01 / 1, that is, the radius of the first hexagon is magnified by 1.01 times to obtain the radius of the third hexagon. It is understandable that the other two hexagonal radii can be obtained by enlarging and / or reducing the radius of the first hexagon. For example, the other two hexagonal radii can be calculated by gradually enlarging or gradually reducing, and are not limited to the combination of enlargement and reduction listed in the above examples.
[0060] S203, drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb diagram based on the first hexagons, second hexagons, and third hexagons with the same center point, wherein the radii of the first hexagon, the second hexagon, and the third hexagon are not equal.
[0061] Optionally, drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb diagram based on the first hexagon, the second hexagon, and the third hexagon with the same center point may include: drawing a number of first hexagons corresponding to the number of dimensions based on the radius and center point coordinates of the first hexagon; determining the radius of the second hexagon based on the radius of the first hexagon and the ratio of the radius of the second hexagon to the radius of the first hexagon; and drawing a second hexagon based on the center point of each first hexagon. A second hexagon is drawn according to the radius of the first hexagon, which coincides with the center point of the corresponding first hexagon; the radius of the third hexagon is determined according to the radius of the first hexagon and the ratio of the radius of the third hexagon to the first hexagon; based on the center point of each first hexagon, a third hexagon is drawn according to the radius of the third hexagon, which coincides with the center point of the corresponding first hexagon; a honeycomb hexagon is formed based on a group of first hexagons, second hexagons and third hexagons with coincident center points, and each honeycomb hexagon is combined according to the relationship between the center points of the honeycomb hexagons to form a honeycomb diagram.
[0062] S204, determining the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group according to the attribute information, and representing the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0063] The embodiments of the present invention can not only improve the rendering speed and redrawing speed of graphics, but also change the graphic representation by modifying the radius ratio, thereby improving the scalability of the graphics and realizing data visualization by representing the attribute status of the object to be analyzed by color.
[0064] Embodiment 3
[0065] Figure 4 This is a flowchart of a method for implementing multi-dimensional analysis provided in the second embodiment of the present invention. In the above embodiment, before drawing the first number of hexagons corresponding to the number of dimensions, this embodiment can also mount events for each honeycomb hexagon in the honeycomb diagram based on the operation configuration information. The same terms as those in the above embodiment are not repeated here. Figure 4 As shown, the method includes:
[0066] S301: Obtain the number of dimensions and attribute information of the object to be analyzed.
[0067] S302: Detect configuration information of a honeycomb graph, and obtain the radius of a first hexagon, center point coordinates, a radius ratio of a second hexagon to a first hexagon, and a radius ratio of a third hexagon to the first hexagon in the configuration information of the honeycomb graph.
[0068] Optionally, a radius ratio of the second hexagon to the first hexagon is less than 1, and a radius ratio of the third hexagon to the first hexagon is greater than 1.
[0069] S303, drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb diagram based on the first hexagons, second hexagons, and third hexagons with the same center point, wherein the radii of the first hexagon, the second hexagon, and the third hexagon are not equal.
[0070] Optionally, drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb diagram based on the first hexagon, the second hexagon, and the third hexagon with the same center point may include: drawing a number of first hexagons corresponding to the number of dimensions based on the radius and center point coordinates of the first hexagon; determining the radius of the second hexagon based on the radius of the first hexagon and the ratio of the radius of the second hexagon to the radius of the first hexagon; and drawing a second hexagon based on the center point of each first hexagon. A second hexagon is drawn according to the radius of the first hexagon, which coincides with the center point of the corresponding first hexagon; the radius of the third hexagon is determined according to the radius of the first hexagon and the ratio of the radius of the third hexagon to the first hexagon; based on the center point of each first hexagon, a third hexagon is drawn according to the radius of the third hexagon, which coincides with the center point of the corresponding first hexagon; a honeycomb hexagon is formed based on a group of first hexagons, second hexagons and third hexagons with coincident center points, and each honeycomb hexagon is combined according to the relationship between the center points of the honeycomb hexagons to form a honeycomb diagram.
[0071] In an exemplary implementation, the second hexagon in the honeycomb hexagon is used as the inner hexagon of the honeycomb hexagon, the area between the second hexagon and the first hexagon is used as the border of the honeycomb hexagon, and the area between the third hexagon and the first hexagon is used as the border line of the honeycomb hexagon. Figure 5 As shown, a schematic diagram of a honeycomb hexagon with a border line is shown, that is, the area between the second hexagon 52 and the first hexagon 51 is used as the border of the honeycomb hexagon, and the area between the third hexagon 53 and the first hexagon 51 is used as the border line of the honeycomb hexagon.
[0072] S304: Acquire operation configuration information for the honeycomb diagram, and mount events for each honeycomb hexagon in the honeycomb diagram based on the operation configuration information, wherein the mounted events include browser events.
[0073] The operation configuration information may be information for operating and controlling the hexagons. According to the operation configuration information, events may be mounted for each hexagon in the honeycomb diagram, wherein events refer to some specific interaction moments occurring in the browser, such as clicks and swipes.
[0074] S305, determining the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group according to the attribute information, and representing the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0075] S306: If it is detected that the mouse stays on the inner hexagon of the honeycomb hexagon, the radius of the inner hexagon is adjusted, and a shadow of the inner hexagon is drawn at the border of the honeycomb hexagon.
[0076] Specifically, when the mouse slides to the inner hexagon of the honeycomb hexagon, the inner hexagon can be redrawn according to the preset radius ratio of the inner hexagon to the first hexagon. The preset radius ratio of the inner hexagon to the first hexagon is greater than the radius ratio of the second hexagon to the first hexagon of the original honeycomb hexagon, so that the inner hexagon appears to be enlarged. In addition, according to the preset radius ratio of the inner hexagon to the shadow hexagon, a shadow hexagon is drawn in the border area of the honeycomb hexagon, and the shadow hexagon is adjusted by setting transparency, so that the shadow hexagon appears to be the shadow of the inner hexagon.
[0077] S307: If it is detected that the mouse is on the border line of the honeycomb hexagon, the width of the border line of the honeycomb hexagon is adjusted.
[0078] Specifically, when the mouse slides to the border line of the honeycomb hexagon, the third hexagon can be redrawn according to the preset radius ratio of the third hexagon to the first hexagon in the mouse sliding scene. The preset radius ratio of the third hexagon to the first hexagon in the mouse sliding scene is greater than the radius ratio of the third hexagon to the first hexagon of the original honeycomb hexagon, so that the border line appears to be widened.
[0079] The embodiment of the present invention can improve the event mounting efficiency and success rate by reducing the DOM elements required for drawing honeycomb hexagons, and realize the prominent display of honeycomb diagrams in specific interactive scenarios by mounting events for honeycomb hexagons, thereby enriching the graphic display method.
[0080] Embodiment 4
[0081] Figure 6 This is a schematic diagram of a device for implementing multidimensional analysis provided by the fourth embodiment of the present invention. Figure 6 As shown, the device comprises:
[0082] Information acquisition module 501, used to acquire the number of dimensions and attribute information of the object to be analyzed;
[0083] A honeycomb diagram drawing module 502 is used to draw a corresponding number of first hexagons based on the number of dimensions, draw a second hexagon and a third hexagon based on the center point of each first hexagon, and form a honeycomb diagram based on the first hexagons, the second hexagons and the third hexagons with the same center point, wherein the radii of the first hexagons, the second hexagons and the third hexagons are not equal;
[0084] The information display module 503 is used to determine the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon and the third hexagon with the same center point according to the attribute information, and the attribute state of the object to be analyzed is represented by the filling color of each hexagon with the smallest radius in the honeycomb diagram.
[0085] Optionally, before the cellular diagram drawing module 502, the following further includes:
[0086] The radius ratio module is used to detect the configuration information of the honeycomb diagram, and obtain the radius of the first hexagon, the center point coordinates, the radius ratio of the second hexagon to the first hexagon, and the radius ratio of the third hexagon to the first hexagon in the configuration information of the honeycomb diagram.
[0087] Among them, the radius ratio of the second hexagon to the first hexagon is less than 1, and the radius ratio of the third hexagon to the first hexagon is greater than 1.
[0088] Optionally, the cellular diagram drawing module 502 may include:
[0089] A first hexagon drawing unit, used for drawing a number of first hexagons corresponding to the number of dimensions according to the radius and center point coordinates of the first hexagon;
[0090] A second hexagon radius determining unit, configured to determine the radius of the second hexagon according to the radius of the first hexagon and the ratio of the radius of the second hexagon to the first hexagon;
[0091] A second hexagon drawing unit, configured to draw, based on the center point of each first hexagon and according to the radius of the second hexagon, a second hexagon that coincides with the center point of the corresponding first hexagon;
[0092] a third hexagon radius determining unit, configured to determine the radius of the third hexagon according to the radius of the first hexagon and the ratio of the radius of the third hexagon to the radius of the first hexagon;
[0093] A third hexagon drawing unit, configured to draw, based on the center point of each first hexagon and according to the radius of the third hexagon, a third hexagon coinciding with the center point of the corresponding first hexagon;
[0094] The combining unit is used to form a honeycomb hexagon based on a set of first hexagons, second hexagons and third hexagons with overlapping center points, and to combine the honeycomb hexagons to form a honeycomb diagram according to the relationship between the center points of the honeycomb hexagons.
[0095] Optionally, after the combination unit, also include:
[0096] The configuration information acquisition unit is used to acquire the operation configuration information of the honeycomb diagram, and mount an event for each honeycomb hexagon in the honeycomb diagram based on the operation configuration information, wherein the mounted event includes a browser event.
[0097] Optionally, after the information display module 503, the following is further included:
[0098] A frame line determination unit, used to use the second hexagon in the honeycomb hexagon as the inner hexagon of the honeycomb hexagon, the area between the second hexagon and the first hexagon as the frame of the honeycomb hexagon, and the area between the third hexagon and the first hexagon as the frame line of the honeycomb hexagon;
[0099] A shadow drawing unit, used for adjusting the radius of the inner hexagon and drawing the shadow of the inner hexagon at the border of the honeycomb hexagon if it is detected that the mouse is staying at the inner hexagon of the honeycomb hexagon;
[0100] The border width adjustment unit is used to adjust the width of the border line of the honeycomb hexagon if it is detected that the mouse stays on the border line of the honeycomb hexagon.
[0101] Optionally, the information display module 503 includes:
[0102] A target threshold interval determination unit, used to compare the attribute information of the object to be analyzed with the threshold interval under the corresponding dimension, and determine the target threshold interval to which the attribute information belongs;
[0103] A minimum hexagon radius determination unit, used to determine the hexagon with the smallest radius among the first hexagon, the second hexagon and the third hexagon with the same center point in each group;
[0104] The color filling unit is used to use the color corresponding to the target threshold interval as the filling color of the hexagon with the smallest radius of the corresponding dimension, and the filling color of the hexagon with the smallest radius represents the attribute state of the object to be analyzed.
[0105] A device for implementing multidimensional analysis provided in an embodiment of the present invention can execute a method for implementing multidimensional analysis provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0106] Embodiment 5
[0107] Figure 7A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0108] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0109] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for implementing multidimensional analysis.
[0111] In some embodiments, a method for implementing multidimensional analysis may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for implementing multidimensional analysis described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a method for implementing multidimensional analysis in any other appropriate manner (e.g., by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for implementing multidimensional analysis, characterized in that: include: Get the number of dimensions and attribute information of the object to be analyzed; Draw a corresponding number of first hexagons based on the number of dimensions, draw a second hexagon and a third hexagon based on the center point of each of the first hexagons, and form a honeycomb diagram based on the first hexagons, the second hexagons, and the third hexagons with the same center point, wherein the radii of the first hexagons, the second hexagons, and the third hexagons are not equal; Determining, according to the attribute information, the filling color of the hexagon with the smallest radius in each group of the first hexagon, the second hexagon, and the third hexagon with the same center point, and representing the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram; Before drawing a corresponding number of first hexagons based on the number of dimensions, the method further includes: Detecting the configuration information of the honeycomb graph, and acquiring the radius of the first hexagon, the center point coordinates, the radius ratio of the second hexagon to the first hexagon, and the radius ratio of the third hexagon to the first hexagon in the configuration information of the honeycomb graph; The method of drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each of the first hexagons, and forming a honeycomb diagram based on the first hexagons, the second hexagons, and the third hexagons with the same center point includes: According to the radius and center point coordinates of the first hexagons, drawing the first hexagons in a number corresponding to the number of dimensions; Determining the radius of the second hexagon according to the radius of the first hexagon and the ratio of the radius of the second hexagon to the first hexagon; Based on the center point of each of the first hexagons, drawing a second hexagon that coincides with the center point of the corresponding first hexagon according to the radius of the second hexagon; Determining the radius of the third hexagon according to the radius of the first hexagon and the ratio of the radius of the third hexagon to the first hexagon; Based on the center point of each of the first hexagons, drawing a third hexagon that coincides with the center point of the corresponding first hexagon according to the radius of the third hexagon; The first hexagon, the second hexagon and the third hexagon with a group of overlapping center points form a honeycomb hexagon, and the honeycomb hexagons are combined according to the relationship between the center points of the honeycomb hexagons to form the honeycomb graph.
2. The method according to claim 1, characterized in that A radius ratio of the second hexagon to the first hexagon is less than 1, and a radius ratio of the third hexagon to the first hexagon is greater than 1.
3. The method according to claim 1, characterized in that After combining the honeycomb hexagons to form the honeycomb diagram according to the relationship between the center points of the honeycomb hexagons, the method further includes: Operation configuration information for the honeycomb diagram is obtained, and events are mounted for each of the honeycomb hexagons in the honeycomb diagram based on the operation configuration information, wherein the mounted events include browser events.
4. The method according to claim 1, characterized in that After indicating the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram, the method further includes: The second hexagon in the honeycomb hexagon is used as the inner hexagon of the honeycomb hexagon, the area between the second hexagon and the first hexagon is used as the border of the honeycomb hexagon, and the area between the third hexagon and the first hexagon is used as the border line of the honeycomb hexagon; If it is detected that the mouse is staying at the inner hexagon of the honeycomb hexagon, the radius of the inner hexagon is adjusted, and the shadow of the inner hexagon is drawn at the border of the honeycomb hexagon; If it is detected that the mouse is staying on the border line of the honeycomb hexagon, the width of the border line of the honeycomb hexagon is adjusted.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining, according to the attribute information, the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group includes: Comparing the attribute information of the object to be analyzed with the threshold interval under the corresponding dimension, and determining the target threshold interval to which the attribute information belongs; Determine the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group; The color corresponding to the target threshold interval is used as the filling color of the hexagon with the smallest radius of the corresponding dimension, and the attribute state of the object to be analyzed is represented by the filling color of the hexagon with the smallest radius.
6. A device for implementing multidimensional analysis, characterized in that: include: An information acquisition module is used to acquire the number of dimensions and attribute information of the object to be analyzed; A honeycomb diagram drawing module, used for drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on the center point of each of the first hexagons, and forming a honeycomb diagram based on the first hexagons, the second hexagons and the third hexagons with the same center point, wherein the radii of the first hexagons, the second hexagons and the third hexagons are not equal; an information display module, configured to determine, according to the attribute information, the filling color of the hexagon with the smallest radius among the first hexagon, the second hexagon, and the third hexagon with the same center point in each group, and to represent the attribute state of the object to be analyzed by the filling color of each hexagon with the smallest radius in the honeycomb diagram; A radius ratio module, used to detect the configuration information of the honeycomb diagram, and obtain the radius of the first hexagon, the center point coordinates, the radius ratio of the second hexagon to the first hexagon, and the radius ratio of the third hexagon to the first hexagon in the configuration information of the honeycomb diagram; The cellular diagram drawing module includes: A first hexagon drawing unit, used for drawing a number of first hexagons corresponding to the number of dimensions according to the radius and center point coordinates of the first hexagon; A second hexagon radius determining unit, configured to determine the radius of the second hexagon according to the radius of the first hexagon and the ratio of the radius of the second hexagon to the radius of the first hexagon; A second hexagon drawing unit, configured to draw, based on the center point of each first hexagon and according to the radius of the second hexagon, a second hexagon that coincides with the center point of the corresponding first hexagon; a third hexagon radius determining unit, configured to determine the radius of the third hexagon according to the radius of the first hexagon and the ratio of the radius of the third hexagon to the radius of the first hexagon; A third hexagon drawing unit, configured to draw, based on the center point of each first hexagon and according to the radius of the third hexagon, a third hexagon coinciding with the center point of the corresponding first hexagon; The combining unit is used to form a honeycomb hexagon based on a set of first hexagons, second hexagons and third hexagons with overlapping center points, and to combine the honeycomb hexagons to form a honeycomb diagram according to the relationship between the center points of the honeycomb hexagons.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for implementing multidimensional analysis according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for implementing multidimensional analysis according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Method and system for displaying four-dimensional data on single plane graph, device and medium
CN110084869A
Tessellated data visualization system
US20170017730A1