CN114842109A - Method and device for realizing multidimensional analysis, electronic equipment and medium - Google Patents
Method and device for realizing multidimensional analysis, electronic equipment and medium Download PDFInfo
- Publication number
- CN114842109A CN114842109A CN202210440899.3A CN202210440899A CN114842109A CN 114842109 A CN114842109 A CN 114842109A CN 202210440899 A CN202210440899 A CN 202210440899A CN 114842109 A CN114842109 A CN 114842109A
- Authority
- CN
- China
- Prior art keywords
- hexagon
- honeycomb
- radius
- hexagons
- analyzed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/20—Drawing from basic elements
- G06T11/26—Drawing of charts or graphs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/40—Filling planar surfaces by adding surface attributes, e.g. adding colours or textures
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a storage medium for realizing multi-dimensional analysis. Obtaining the dimension number and attribute information of an object to be analyzed; drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb picture according to the first hexagon, the second hexagon and the third hexagon with the same center points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal; and determining the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon with the same central points in each group according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of each hexagon with the smallest radius in the honeycomb diagram. According to the embodiment, the rendering speed and redrawing speed of the graph can be improved by drawing the honeycomb graphs with the corresponding number based on the dimension number, and the expansibility of the graph is improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, electronic equipment and a medium for realizing multi-dimensional analysis.
Background
Multidimensional analysis is a measure-gathering statistic after performing a dimensional analysis on data. The dimensionality is to classify according to the characteristics of the data, and the multidimensional analysis is used for measuring the relationship among the data among the classifications so as to obtain the relation among the statistical items with the same type of properties.
Currently, there are various means for graphical presentation of web multidimensional analysis, such as bar charts, multiline line charts, radar charts, and cellular charts. The honeycomb diagram is an optimal topological structure covering a two-position plane, is exquisite, compact and attractive in composition, and has the advantages of high space utilization rate, multiple dimension display and sequential display support during multi-dimensional analysis. In the related art, the cell hexagon unit structure in the cell graph is implemented by drawing rectangles and triangles through CSS (Cascading Style Sheets), which results in that a border and border line of the cell hexagon has 9 DOM (Document Object Model) elements, and if the number of dimensions is N, the number of DOM elements on one cell graph is 9N. It can be seen that as the number of dimensions increases, DOM elements multiply, thereby causing a stuck honeycomb map to be drawn. Therefore, how to solve the problem of the increase of the number of dimensions, which causes the cell graph drawing stuck, becomes an urgent problem to be solved.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a medium for realizing multi-dimensional analysis, which aim to solve the problem of unsmooth drawing of a honeycomb map caused by the increase of the number of dimensions.
According to an aspect of the present invention, there is provided a method for implementing multidimensional analysis, including: acquiring the dimension number and attribute information of an object to be analyzed;
drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the central point of each first hexagon, and forming a honeycomb graph according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal;
and determining the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon which have the same central point in each group according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of each hexagon with the smallest radius in the honeycomb diagram.
According to another aspect of the present invention, there is provided an apparatus for implementing multidimensional analysis, including: the information acquisition module is used for acquiring the dimension number and the attribute information of the object to be analyzed;
the honeycomb drawing module is used for drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the central point of each first hexagon, and forming a honeycomb drawing according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal;
and the information display module is used for determining 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 central point according to the attribute information, and the attribute state of the object to be analyzed is represented by the filling color of the hexagon with the smallest radius in the honeycomb diagram.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a method for implementing a multi-dimensional analysis according to any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a method for implementing multidimensional analysis according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the dimension number and the attribute information of the object to be analyzed are obtained; drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the center point of each first hexagon, and forming a honeycomb picture according to the first hexagon, the second hexagon and the third hexagon with the same center points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal; the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon with the same central points in each group is determined according to the attribute information, the attribute state of the object to be analyzed is represented by the filling color of the hexagon with the smallest radius in the honeycomb picture, the problem that the honeycomb picture is drawn and stuck due to the fact that the number of dimensions is increased in the prior art is solved, the rendering speed and the redrawing speed of the graph are improved by drawing the honeycomb picture with the corresponding number through the number of dimensions, and the expansibility of the graph is improved at the same time.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic diagram of a honeycomb hexagon drawn by CSS drawing;
FIG. 1b is another schematic diagram of drawing honeycomb hexagon by CSS drawing;
FIG. 2 is a flowchart of a method for implementing multidimensional analysis according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for implementing multidimensional analysis according to a second embodiment of the present invention;
FIG. 4 is a flowchart of an implementation method of multidimensional analysis according to a third embodiment of the present invention;
FIG. 5 is a schematic diagram of a honeycomb hexagon with border wires according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for implementing multidimensional analysis according to the fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device for implementing the method for implementing multidimensional analysis according to the fifth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
At present, the images of Web-based multidimensional analysis are presented in various ways, such as bar charts, pie charts, multi-line charts, radar charts, and honeycomb charts. The honeycomb map is an optimal topology structure covering a two-dimensional plane, so that the honeycomb map has the advantages of high space utilization rate, multiple dimension display and sequential display support during multi-dimensional analysis.
The cell structure of the honeycomb pattern is generally represented by a regular hexagon, and may also be referred to as a honeycomb hexagon. The honeycomb hexagon can be drawn by:
fig. 1a is a schematic diagram of drawing a honeycomb hexagon by using a CSS drawing method, in which a plurality of rectangles are cut and spliced into a pattern, and then the pattern is colored. As shown in fig. 1a, drawing the memory hexagon by using the CSS drawing method includes: drawing a rectangle b, two triangles a and c, and three dom elements in total, and synthesizing a hexagon n by the three dom elements. And drawing a hexagon m with a larger radius in the same way, wherein the centers of m and n coincide in the same direction and are laid at a relatively lower level. Then, the centers of hexagons l, m and n with larger radius are drawn to coincide in the same way and are laid at a lower level, and a honeycomb hexagon consisting of three hexagons is obtained.
Fig. 1b is another schematic diagram of drawing a honeycomb hexagon by using a CSS drawing method, and as shown in fig. 1b, drawing a memory hexagon by using a CSS drawing method includes: drawing a rectangle b, clockwise rotating the rectangle b by 60 degrees by taking the central point as an origin to obtain a rectangle c, anticlockwise rotating the rectangle b by 60 degrees by taking the central point as the origin to obtain a rectangle a, and overlapping the rectangles a, b and c to obtain a hexagon, namely synthesizing a hexagon n by adopting three dom elements (rectangles a, b and c). And drawing a hexagon m with a larger radius in the same way, wherein the centers of m and n coincide in the same direction and are laid at a relatively lower level. Then, the centers of hexagons l, m and n with larger radius are drawn to coincide in the same way and are laid at a lower level, and a honeycomb hexagon consisting of three hexagons is obtained.
The main expenses of CSS drawing are in recalculation of dom (Document Object Model) layout and redrawing of dom layer repaint, and the main expenses of canvas are in execution of Javascript overhead, Skia drawing overhead and composition overhead. The large number of DOM elements means that a large number of layers need to be composited, which is critical to the performance of the pull-down. Taking the cellular hexagons drawn in fig. 1a and 1b as an example, the number of dom elements of a framed, framed-wire cellular hexagon is 9, and if a cellular hexagon represents a dimension, the number of dom elements is 1800 when the number of dimensions is 200, and at this time, delay occurs in drawing the cellular map. If the dimension number reaches 500, the number of dom elements is 4500, and at the moment, the rendering speed and redrawing speed of the honeycomb hexagon are affected, and even the display is obviously stuck.
In order to solve the problems, the invention provides a scheme for drawing a honeycomb hexagon based on a Canvas drawing mode, compared with a CSS drawing mode, the honeycomb hexagon drawn by the Canvas drawing mode has fewer dom elements, and the rendering speed and redrawing speed of a honeycomb map in a high-dimensional scene can be improved.
Example one
Fig. 2 is a flowchart of an embodiment of the present invention, which provides a method for implementing multidimensional analysis, where the embodiment is applicable to a case of multidimensional analysis on a web system, and the method may be executed by an implementation apparatus of multidimensional analysis, where the implementation apparatus of multidimensional analysis may be implemented in hardware and/or software, and the implementation apparatus of multidimensional analysis may be integrally configured in an electronic device. As shown in fig. 1, the method includes:
and S110, acquiring the dimension number and attribute information of the object to be analyzed.
The object to be analyzed may be an object that needs to be subjected to Web-based multidimensional analysis. The object to be analyzed can be configured in the Web-based multidimensional analysis system through manual configuration, file import and the like. Multidimensional analysis is one of the advanced statistical analysis methods, and is a method for analyzing a product or a market phenomenon by putting the product or the market phenomenon on more than two-dimensional space coordinates.
The Web-based multidimensional analysis system can include two ends: the system comprises a server side and a front end, wherein the server side can use NETC # language for development and is used for executing tasks such as data analysis and storage; the front end can use an open source framework library dojo based on JavaScript language to develop and execute tasks such as interface operation, image display of multi-dimensional analysis and the like.
HTML5(HyperText Markup language 5.0) is a language description way to build Web content.
Canvas is an added element of HTML5, which can be used to render 2D images in conjunction with an API (Application Programming Interface) provided by JavaScript.
The dimension number may be the number of objects to be analyzed, for example, the dimension number may be the number of cities all over the world, the number of IP addresses in a certain downtown area, the number of rooms in a certain area, or the number of servers in a certain room, and so on.
The attribute information may be attribute characteristics of an object to be analyzed, specifically GDPs of various cities around the world, internet access time of an IP address of a certain urban area, or resource usage of a server in a certain machine room.
Illustratively, the method includes acquiring configuration information of an object to be analyzed, determining the dimension number of the object to be analyzed based on the configuration information, and acquiring attribute information of the object to be analyzed 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.
S120, drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the central point of each first hexagon, and forming a honeycomb picture according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal.
Specifically, the Graphics can be rendered by a ZRender (a two-dimensional drawing engine), which can provide multiple rendering modes such as Canvas, SVG (Scalable Vector Graphics), VML (Vector Graphics rendering Language), and the like. Meanwhile, the Zrender is also a brand-new lightweight Canvas class library and comprises the following components: MVC (Model View Controller) encapsulation, data-driven, can provide a hierarchical mechanism for DOM (Document Object Model) classes.
In this embodiment, a first hexagon may be drawn by obtaining the dimension number of the object to be analyzed, where the hexagon may be a regular hexagon having six symmetry axes, and includes a central point connecting line of three diagonal lines and three opposite lines, the six sides of the hexagon are all equal, degrees of each inner angle of the hexagon are also equal, the sum of outer angles of the hexagon is equal to 360 degrees, each outer angle of the hexagon is 60 degrees, and each inner angle is 120 degrees.
Drawing a second hexagon and a third hexagon respectively based on the central point of each first hexagon, and enabling the first hexagon, the second hexagon and the third hexagon with the same central points to form a honeycomb picture, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal.
S130, determining the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon which have the same center point in each group according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of the hexagon with the smallest radius in the honeycomb diagram.
In this embodiment, after the hexagon is drawn according to the number of dimensions of the object to be analyzed, the hexagon is subjected to three-dimensional rendering based on Canvas, and a corresponding rendering graph is obtained. The hexagons in the honeycomb map can be used for distinguishing attribute states of corresponding dimensions through different filling colors, and different groupings of the honeycomb map can deepen dimension analysis levels. For example, attribute states of hexagons in different dimensions may be represented according to the shades of colors, in this embodiment, the population density of a certain area may be counted as an example, and if the colors displayed on the graph are darker, the attribute states represent a higher degree of population density.
Specifically, determining the filling color of the hexagon with the smallest radius in 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 a hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon which have the same central point in each group; and taking the color corresponding to the target threshold interval as the filling color of the hexagon with the smallest radius corresponding to the dimension, and representing the attribute state of the object to be analyzed through the filling color of the hexagon with the smallest radius.
The threshold interval may be a numerical interval corresponding to different states set based on the attribute information of the object to be analyzed. Specifically, the threshold interval may be divided into a normal threshold interval, a suspicious threshold interval, and an abnormal threshold interval according to the severity. Alternatively, the threshold interval may be divided into a normal threshold interval and an abnormal threshold interval according to the degree of severity. The specific meaning of the threshold interval is not specifically limited in the embodiments of the present invention. A corresponding color is set in advance for each threshold interval. For example, the corresponding color may 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 with the threshold interval, the target threshold interval corresponding to the attribute information can be determined, and further, the filling color corresponding to each target threshold interval is determined. And then determining the hexagon with the smallest radius in each hexagon with the same central point in each group, taking the color corresponding to the target threshold interval as the filling color of the hexagon, and visually displaying the attribute state of the hexagon corresponding to the whole graph through the color.
According to the embodiment of the invention, the honeycomb graphs with corresponding quantity can be drawn according to the dimension quantity, the filling colors of the honeycomb graphs are determined according to the attribute information, so that the attribute state of the object to be analyzed is represented by the filling colors, the honeycomb graphs are drawn by adopting a small quantity of DOM elements, the graph drawing overhead is reduced, the graph rendering speed and redrawing speed are improved, and the expansibility of the graphs and the visualization of data are improved.
Example two
Fig. 3 is a flowchart of a method for implementing multidimensional analysis according to a second embodiment of the present invention, where in this embodiment, before drawing a corresponding number of first hexagons based on the number of dimensions, the method may further include detecting a relation between radii of the hexagons. The same terms as in the above embodiments are not described herein. As shown in fig. 3, the method includes:
s201, obtaining the dimension number and attribute information of the object to be analyzed.
S202, detecting the configuration information of the honeycomb map, and acquiring the radius of the first hexagon, the center point coordinate, 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 map.
The configuration information is graph shape information preset in a database for the honeycomb map, drawing of the honeycomb map is performed according to the configuration information, and the configuration information may include a radius of the first hexagon, a center point coordinate, a radius ratio of the second hexagon to the first hexagon, a radius ratio of the third hexagon to the first hexagon, and the like.
Alternatively, the ratio of the radii of the second hexagon to the first hexagon may be less than 1, and the ratio of the radii of the third hexagon to the first hexagon may be greater than 1. For example, the ratio p of the radius of the second hexagon to the radius of the first hexagon is 8/9, i.e. the radius r of the first hexagon is reduced to 8/9r to obtain the radius of the second hexagon. The ratio 1 of the radius of the third hexagon to the radius of the first hexagon is 1.01/1, namely, the radius of the first hexagon is enlarged by 1.01 times to obtain the radius of the third hexagon. It will be appreciated that the other two hexagonal radii may be obtained by enlarging and/or reducing the first hexagonal radius. For example, the other two hexagonal radii may be calculated by gradually enlarging or gradually reducing, and are not limited to the combined enlarging and reducing manner listed in the above example.
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 central point of each first hexagon, and forming a honeycomb picture according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal.
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, respectively, and constructing a honeycomb map according to 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 according to the radius and the center point coordinates of the first hexagons; 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 radius of the first hexagon; drawing a second hexagon which is coincided with the center point of the corresponding first hexagon according to the radius of the second hexagon based on the center point of each first hexagon; determining the radius of a 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; drawing a third hexagon which is coincided with the center point of the corresponding first hexagon according to the radius of the third hexagon based on the center point of each first hexagon; a honeycomb hexagon is formed based on a group of first hexagons, second hexagons and third hexagons with coincident center points, and the honeycomb patterns are formed by combining the individual honeycomb hexagons according to the relationship among the center points of the honeycomb hexagons.
And S204, determining the filling color of the hexagon with the smallest radius in 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 through the filling color of each hexagon with the smallest radius in the honeycomb diagram.
The embodiment of the invention can not only improve the rendering speed and redrawing speed of the graph, but also change the representation of the graph by modifying the radius ratio, improve the expansibility of the graph and realize the visualization of data by representing the attribute state of the object to be analyzed by colors.
EXAMPLE III
Fig. 4 is a flowchart of a method for implementing multidimensional analysis according to a second embodiment of the present invention, in this embodiment, before drawing a corresponding number of first hexagons based on the number of dimensions, an event may be mounted for each cell hexagon in a cell map based on operation configuration information. The same terms as those of the above embodiments are not described herein. As shown in fig. 4, the method includes:
s301, obtaining the dimension number and attribute information of the object to be analyzed.
S302, detecting the configuration information of the honeycomb map, and acquiring the radius of the first hexagon, the center point coordinate, 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 map.
Optionally, the ratio of the radius of the second hexagon to the radius of the first hexagon is less than 1, and the ratio of the radius of the third hexagon to the radius of the first hexagon is greater than 1.
S303, drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the central point of each first hexagon, and forming a honeycomb picture according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal.
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 central point of each first hexagon, respectively, and constructing a honeycomb map according to the first hexagon, the second hexagon, and the third hexagon having the same central point may include: drawing a number of first hexagons corresponding to the number of dimensions according to the radius and the center point coordinates of the first hexagons; 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 radius of the first hexagon; drawing a second hexagon which is coincided with the center point of the corresponding first hexagon according to the radius of the second hexagon based on the center point of each first hexagon; determining the radius of a 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; drawing a third hexagon which is coincided with the center point of the corresponding first hexagon according to the radius of the third hexagon based on the center point of each first hexagon; a honeycomb hexagon is formed based on a group of first hexagons, second hexagons and third hexagons with coincident center points, and the honeycomb patterns are formed by combining the individual honeycomb hexagons according to the relationship among the center points of the honeycomb hexagons.
In an exemplary implementation, a second hexagon in the honeycomb hexagons is used as an inner layer hexagon of the honeycomb hexagons, a region between the second hexagon and the first hexagon is used as a border of the honeycomb hexagons, and a region between the third hexagon and the first hexagon is used as a border line of the honeycomb hexagons. As shown in fig. 5, a schematic diagram of a honeycomb hexagon with border wires is shown, namely, 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 wires of the honeycomb hexagon.
S304, obtaining operation configuration information of the cellular graph, and mounting an event for each cellular hexagon in the cellular graph based on the operation configuration information, wherein the mounted event comprises a browser event.
The operation configuration information may be information for performing operation control on hexagons, and according to the operation configuration information, events may be mounted for each hexagon in the cellular graph, where the events refer to some specific interaction moments occurring in the browser, such as clicking and swiping, and the like.
S305, determining the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon which have the same center point in each group according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of the hexagon with the smallest radius in the honeycomb diagram.
S306, if the mouse is detected to stay at the inner layer hexagon of the honeycomb hexagon, the radius of the inner layer hexagon is adjusted, and the shadow of the inner layer hexagon is drawn at the frame of the honeycomb hexagon.
Specifically, when the mouse slides to the inner layer hexagon of the honeycomb hexagon, the inner layer hexagon can be redrawn according to the preset radius ratio of the inner layer hexagon to the first hexagon. The ratio of the preset radius of the inner layer hexagon to the first hexagon is larger than the ratio of the radius of the second hexagon to the first hexagon of the original honeycomb hexagon, so that the inner layer hexagon has an amplification effect. In addition, according to the preset radius ratio of the inner layer hexagon to the shadow hexagon, the shadow hexagon is drawn in the frame area of the honeycomb hexagon, and the shadow hexagon is adjusted by adopting the set transparency, so that the shadow hexagon has the shadow effect of the inner layer hexagon.
S307, if the mouse is detected to stay on the border line of the honeycomb hexagon, the width of the border line of the honeycomb hexagon is adjusted.
Specifically, when the mouse slides to the frame 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 scene where the mouse slides. The radius ratio of the third hexagon to the first hexagon is larger than that of the original honeycomb hexagon under the preset scene of mouse sliding, so that the border line is widened.
According to the embodiment of the invention, through reducing the dom elements required for drawing the honeycomb hexagon, the event mounting efficiency and success rate are improved, through mounting the event for the honeycomb hexagon, the prominent display of the honeycomb map in a specific interaction scene is realized, and the pattern display mode is enriched.
Example four
Fig. 6 is a schematic structural diagram of an apparatus for implementing multidimensional analysis according to a fourth embodiment of the present invention. As shown in fig. 6, the apparatus includes:
an information obtaining module 501, configured to perform obtaining of the dimension number and attribute information of an object to be analyzed;
a honeycomb drawing module 502, configured to perform drawing of a corresponding number of first hexagons based on the number of dimensions, drawing of a second hexagon and a third hexagon based on a center point of each first hexagon, and forming a honeycomb drawing according to the first hexagon, the second hexagon, and the third hexagon having the same center point, where radii of the first hexagon, the second hexagon, and the third hexagon are not equal;
and an information display module 503, configured to determine, according to the attribute information, a filling color of a hexagon with a smallest radius in each group of first hexagons, second hexagons, and third hexagons with the same center point, where 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 map.
Optionally, before the cellular diagram drawing module 502, the method further includes:
and the radius ratio module is used for detecting the configuration information of the honeycomb map and acquiring the radius of the first hexagon, the center point coordinate, 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 map.
The ratio of the radius of the second hexagon to the radius of the first hexagon is smaller than 1, and the ratio of the radius of the third hexagon to the radius of the first hexagon is larger than 1.
Optionally, the cell mapping module 502 may include:
the first hexagon drawing unit is used for drawing the first hexagons with the number corresponding to the number of dimensions according to the radius and the center point coordinates of the first hexagons;
a second hexagon radius determining unit, configured to determine a radius of a second hexagon according to the radius of the first hexagon and a ratio of the radius of the second hexagon to the radius of the first hexagon;
a second hexagon drawing unit for drawing a second hexagon coinciding with the center point of the corresponding first hexagon according to the radius of the second hexagon based on the center point of each first hexagon;
a third hexagon radius determining unit, configured to determine a radius of a third hexagon according to the radius of the first hexagon and a ratio of the radius of the third hexagon to the radius of the first hexagon;
a third hexagon drawing unit configured to draw a third hexagon, which coincides with the center point of the corresponding first hexagon, according to the radius of the third hexagon based on the center point of each first hexagon;
and a combining unit for forming a honeycomb hexagon based on a group of first hexagons, second hexagons and third hexagons whose center points coincide, and combining the respective honeycomb hexagons according to the relationship among the center points of the honeycomb hexagons to form a honeycomb map.
Optionally, after the combining unit, the method further includes:
the device comprises a configuration information acquisition unit, a data processing unit and a data processing unit, wherein the configuration information acquisition unit is used for acquiring operation configuration information of a cellular graph and mounting events for each cellular hexagon in the cellular graph based on the operation configuration information, and the mounted events comprise browser events.
Optionally, after the information displaying module 503, the method further includes:
a frame line determining unit, configured to use a second hexagon of the honeycomb hexagons as an inner layer hexagon of the honeycomb hexagons, a region between the second hexagon and the first hexagon as a frame of the honeycomb hexagons, and a region between the third hexagon and the first hexagon as a frame line of the honeycomb hexagons;
the shadow drawing unit is used for adjusting the radius of the inner layer hexagon and drawing the shadow of the inner layer hexagon at the frame of the honeycomb hexagon if the mouse is detected to stay at the inner layer hexagon of the honeycomb hexagon;
and the frame width adjusting unit is used for adjusting the width of the frame line of the honeycomb hexagon if the mouse is detected to stay on the frame line of the honeycomb hexagon.
Optionally, the information display module 503 includes:
the target threshold interval determining unit is used for 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;
the minimum hexagon radius determining unit is used for determining a hexagon with the minimum radius in the first hexagon, the second hexagon and the third hexagon which have the same central point in each group;
and the color filling unit is used for taking the color corresponding to the target threshold interval as the filling color of the hexagon with the smallest radius corresponding to the dimension, and representing the attribute state of the object to be analyzed through the filling color of the hexagon with the smallest radius.
The implementation device for multidimensional analysis provided by the embodiment of the invention can execute the implementation method for multidimensional analysis provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
FIG. 7 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
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, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
In some embodiments, a method of implementing multidimensional analysis can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When loaded into RAM 13 and executed by processor 11, the computer program may perform one or more of the steps of an implementation of a multi-dimensional analysis as described above. Alternatively, in other embodiments, the processor 11 may be configured by any other suitable means (e.g., by means of firmware) to perform an implementation of the multi-dimensional analysis.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for implementing multidimensional analysis is characterized by comprising the following steps:
acquiring the dimension number and attribute information of an object to be analyzed;
drawing a corresponding number of first hexagons based on the number of dimensions, drawing a second hexagon and a third hexagon based on a central point of each first hexagon, and forming a honeycomb map according to the first hexagon, the second hexagon and the third hexagon with the same central point, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal;
and determining the filling color of the hexagon with the smallest radius in the first hexagon, the second hexagon and the third hexagon which have the same central point in each group according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of each hexagon with the smallest radius in the honeycomb diagram.
2. The method of claim 1, further comprising, prior to drawing a corresponding number of first hexagons based on the number of dimensions:
and detecting the configuration information of the honeycomb map, and acquiring the radius of the first hexagon, the center point coordinate, 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 map.
3. The method of claim 2, wherein the ratio of the radii of the second hexagon to the first hexagon is less than 1, and the ratio of the radii of the third hexagon to the first hexagon is greater than 1.
4. The method of claim 2, wherein the plotting a corresponding number of first hexagons based on the number of dimensions, plotting a second hexagon and a third hexagon, respectively, based on a center point of each of the first hexagons, and constructing a honeycomb map from the first hexagons, the second hexagons, and the third hexagons having the same center point comprises:
drawing the first hexagons with the number corresponding to the dimension number according to the radius and the center point coordinates of the first hexagons;
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 radius of the first hexagon;
drawing a second hexagon which is coincident with the center point of the corresponding first hexagon according to the radius of the second hexagon based on the center point of each first hexagon;
determining the radius of the third hexagon according to the radius of the first hexagon and the radius ratio of the third hexagon to the first hexagon;
drawing a third hexagon which is coincident with the center point of the corresponding first hexagon according to the radius of the third hexagon based on the center point of each first hexagon;
and forming a honeycomb hexagon based on a group of the first hexagon, the second hexagon and the third hexagon with the center points coinciding, and combining the honeycomb hexagons according to the relation among the center points of the honeycomb hexagons to form the honeycomb map.
5. The method of claim 4, further comprising, after combining each of the cell hexagons into the cell graph according to the relationship between the center points of the cell hexagons:
obtaining operation configuration information of the cellular graph, and mounting an event for each cellular hexagon in the cellular graph based on the operation configuration information, wherein the mounted event comprises a browser event.
6. The method according to claim 1, wherein after 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 map, the method further comprises:
taking the second hexagon in the honeycomb hexagons as an inner layer hexagon of the honeycomb hexagons, taking the area between the second hexagon and the first hexagon as a border of the honeycomb hexagons, and taking the area between the third hexagon and the first hexagon as a border line of the honeycomb hexagons;
if the mouse is detected to stay at the inner layer hexagon of the honeycomb hexagon, adjusting the radius of the inner layer hexagon, and drawing the shadow of the inner layer hexagon at the frame of the honeycomb hexagon;
and if the mouse is detected to stay on the border line of the honeycomb hexagon, adjusting the width of the border line of the honeycomb hexagon.
7. The method according to any one of claims 1 to 6, wherein the determining 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 comprises:
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 in the first hexagon, the second hexagon and the third hexagon which have the same central point in each group;
and taking the color corresponding to the target threshold interval as the filling color of the hexagon with the minimum radius corresponding to the dimension, and representing the attribute state of the object to be analyzed through the filling color of the hexagon with the minimum radius.
8. An apparatus for implementing multidimensional analysis, comprising:
the information acquisition module is used for acquiring the dimension number and the attribute information of the object to be analyzed;
the honeycomb drawing module is used for drawing a corresponding number of first hexagons based on the dimension number, drawing a second hexagon and a third hexagon based on the central point of each first hexagon, and forming a honeycomb drawing according to the first hexagon, the second hexagon and the third hexagon with the same central points, wherein the radii of the first hexagon, the second hexagon and the third hexagon are not equal;
and the information display module is used for determining the filling color of the hexagon with the smallest radius in each group of the first hexagon, the second hexagon and the third hexagon which have the same central point according to the attribute information, and representing the attribute state of the object to be analyzed through the filling color of each hexagon with the smallest radius in the honeycomb diagram.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a method of implementing a multi-dimensional analysis as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform a method of performing a multidimensional analysis according to any one of claims 1 to 7 when executed.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210440899.3A CN114842109B (en) | 2022-04-25 | 2022-04-25 | A method, device, electronic device and medium for implementing multi-dimensional analysis |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210440899.3A CN114842109B (en) | 2022-04-25 | 2022-04-25 | A method, device, electronic device and medium for implementing multi-dimensional analysis |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114842109A true CN114842109A (en) | 2022-08-02 |
| CN114842109B CN114842109B (en) | 2025-02-18 |
Family
ID=82566179
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210440899.3A Active CN114842109B (en) | 2022-04-25 | 2022-04-25 | A method, device, electronic device and medium for implementing multi-dimensional analysis |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114842109B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115272513A (en) * | 2022-04-24 | 2022-11-01 | 北京博睿宏远数据科技股份有限公司 | Multi-dimensional analysis method and device, electronic equipment and medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9465891B1 (en) * | 2015-04-29 | 2016-10-11 | Data Cocoon LLC | Tessellated data visualization system |
| US20190005716A1 (en) * | 2016-11-10 | 2019-01-03 | Janus Vr Inc. | Method and system for translating a legacy web page into a three-dimensional virtual reality (vr) immersive space |
| CN110084869A (en) * | 2018-01-26 | 2019-08-02 | 北大方正集团有限公司 | Show method, system, equipment and the medium of 4 D data on single plane figure |
| US20200201929A1 (en) * | 2018-12-21 | 2020-06-25 | Business Objects Software Ltd. | Managing Multi-Dimensional Array Of Data Definitions |
-
2022
- 2022-04-25 CN CN202210440899.3A patent/CN114842109B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9465891B1 (en) * | 2015-04-29 | 2016-10-11 | Data Cocoon LLC | Tessellated data visualization system |
| US20170017730A1 (en) * | 2015-04-29 | 2017-01-19 | Data Cocoon LLC | Tessellated data visualization system |
| US20190005716A1 (en) * | 2016-11-10 | 2019-01-03 | Janus Vr Inc. | Method and system for translating a legacy web page into a three-dimensional virtual reality (vr) immersive space |
| CN110084869A (en) * | 2018-01-26 | 2019-08-02 | 北大方正集团有限公司 | Show method, system, equipment and the medium of 4 D data on single plane figure |
| US20200201929A1 (en) * | 2018-12-21 | 2020-06-25 | Business Objects Software Ltd. | Managing Multi-Dimensional Array Of Data Definitions |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115272513A (en) * | 2022-04-24 | 2022-11-01 | 北京博睿宏远数据科技股份有限公司 | Multi-dimensional analysis method and device, electronic equipment and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114842109B (en) | 2025-02-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11861919B2 (en) | Text recognition method and device, and electronic device | |
| CN109145366B (en) | Lightweight visualization method of building information model based on Web3D | |
| US20220392144A1 (en) | Image rendering method and apparatus, electronic device, and storage medium | |
| US20180365873A1 (en) | Recursive cell-based hierarchy for data visualizations | |
| US12313746B2 (en) | Method, apparatus for superimposing laser point clouds and high-precision map and electronic device | |
| US20080180439A1 (en) | Reducing occlusions in oblique views | |
| CN109801373A (en) | Enterprise's production three-dimensional visualization method and device are realized based on WebGL | |
| US10878034B2 (en) | Quantified Euler analysis | |
| CN112132941B (en) | Text rendering method, device, equipment and storage medium | |
| CN115423919B (en) | Image rendering method, device, equipment and storage medium | |
| EP3876197A2 (en) | Portrait extracting method and apparatus, electronic device and storage medium | |
| CN102722885A (en) | Method for accelerating three-dimensional graphic display | |
| CN106934058B (en) | Vector data reading method and system and vector data visualization method and system | |
| US20230206578A1 (en) | Method for generating virtual character, electronic device and storage medium | |
| CN111737844A (en) | Web 3D-based three-dimensional building model editing system and workflow | |
| CN117557682B (en) | Data processing method, apparatus, product, device, and medium | |
| CN114610295A (en) | Layout method, device, equipment and medium for page container | |
| CN116186240B (en) | Dynamic high-performance batch text rendering method, system and program product based on WebGL | |
| CN114842109B (en) | A method, device, electronic device and medium for implementing multi-dimensional analysis | |
| CN113608809B (en) | Layout method, device, device, storage medium and program product of components | |
| WO2023005104A1 (en) | Multi-view display method and apparatus, and device and medium | |
| CN115328607B (en) | Semiconductor device rendering method, device, equipment and storage medium | |
| CN115861510A (en) | Object rendering method, device, electronic equipment, storage medium and program product | |
| CN115272513A (en) | Multi-dimensional analysis method and device, electronic equipment and medium | |
| CN114485716A (en) | Lane rendering method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |