Visual chart generation method and device, equipment and storage medium
By determining the order of data ordering and assigning the axis length of the coordinate axis in the generation of visual charts, the data points caused by data level differences are solved, and the clear presentation of the data point and the improvement of the user experience are realized.
Patent Information
- Application Number
- CN202411614919.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-01-28
AI Technical Summary
In data analysis scenarios, when the numerical gap between different data is large, the conventional visual chart generation method causes the small data points to be too concentrated, resulting in users being prone to accidentally touching when viewing or clicking to view, affecting users' Visual chart viewing experience.
By determining whether the original data on each coordinate axis belongs to the same order of magnitude, if it belongs to the same magnitude, the length of the axis of the coordinate axis is allocated; if it is not the same level, the length of the coordinate shaft is allocated according to the proportional coefficient of the user configuration to determine the drawing diagram The coordinate system and generate a visual chart.
While maintaining the linear relationship of the original coordinate system, the data points with a large difference in data order can be clearly presented, and the intuitive and clarity of users' intuition and clarity on visual charts.
Smart Images

Figure CN119377445A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data visualization, and in particular to a method, device, equipment and storage medium for generating a visualization chart. Background Art
[0002] In the prior art, the coordinate axes of conventional visualization charts use the maximum values in the statistical data as the value range of the coordinate axes, and then the coordinate axes are evenly divided to determine the specific value represented by each unit length on the coordinate axes, and a target coordinate system composed of the allocated coordinate axes is obtained. Finally, based on the coordinates corresponding to each data in the statistical data in the above target coordinate system, a visualization chart corresponding to the above statistical data can be generated.
[0003] However, in actual data analysis scenarios, when the numerical gap between different data is large, if the above-mentioned conventional visualization chart generation method is used, it is easy for multiple data points with small values to be too concentrated in the conventional visualization chart and overlap with each other, so that when the user floats to view or clicks to view the specific data of a certain data point, there will be accidental touches due to the small distance between the data points, which is not conducive to the user viewing the visualization chart. Summary of the invention
[0004] In view of this, the present application provides a method, device, equipment and storage medium for generating a visualization chart, which, while maintaining the linear relationship of the original coordinate system, enables data points with large differences in data magnitude to be clearly presented on the visualization chart, thereby enabling users to view the visualization chart more intuitively and clearly.
[0005] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a visualization chart, the method comprising:
[0007] For each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude;
[0008] If they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions;
[0009] If they are not of the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude;
[0010] According to the length distribution of each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, the cartographic coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
[0011] In a second aspect, an embodiment of the present application provides a device for generating a visualization chart, the device comprising:
[0012] A judgment module, for judging, for each coordinate axis in the target visualization chart, whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude;
[0013] A first allocation module, for evenly allocating the length of the coordinate axis according to a preset number of divisions if the coordinates are of the same order of magnitude;
[0014] The second allocation module is used to determine the length of the coordinate axis corresponding to each order of magnitude according to the proportional coefficient configured by the user for each order of magnitude if they do not belong to the same order of magnitude;
[0015] A mapping module is used to determine the mapping coordinate system corresponding to the target visualization chart according to the length assigned to each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, and to generate the target visualization chart according to the coordinates corresponding to each of the original data in the mapping coordinate system.
[0016] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for generating a visual chart when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for generating a visualization chart are executed.
[0018] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0019] A method, device, equipment and storage medium for generating a visualization chart provided by an embodiment of the present application, for each coordinate axis in a target visualization chart, determines whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; if they do not belong to the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; according to each coordinate axis with a length distribution and the value range of the variable represented by each coordinate axis, the mapping coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A schematic diagram showing a flow chart of a method for generating a visual chart provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of a flow chart of a data identification deduplication method provided in an embodiment of the present application is shown;
[0023] Figure 3a A sample schematic diagram of adjusting the display position of an odd number of abnormal data identifiers provided by an embodiment of the present application is shown;
[0024] Figure 3b A sample schematic diagram of adjusting the display position of an even number of abnormal data identifiers provided in an embodiment of the present application is shown;
[0025] Figure 4 A schematic diagram of the structure of a device for generating a visual chart provided in an embodiment of the present application is shown;
[0026] Figure 5 A schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0028] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0029] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0030] At present, in actual data analysis scenarios, when the numerical gap between different data is large, if the conventional visualization chart is generated, it is easy to cause multiple data points with small values to be too concentrated in the conventional visualization chart and overlap with each other. When the user floats to view or clicks to view the specific data of a data point, the user may accidentally touch the data point because the distance between the data points is too small, which is not conducive to the user viewing the visualization chart.
[0031] Based on this, the embodiments of the present application provide a method, device, equipment and storage medium for generating a visualization chart, which, while maintaining the linear relationship of the original coordinate system, enables data points with large differences in data magnitude to be clearly presented on the visualization chart, thereby allowing users to view the visualization chart more intuitively and clearly.
[0032] In one embodiment of the present application, a method for generating a visualization chart can be applied to a visualization tool that can generate a visualization chart, and the visualization tool can run on a terminal device or a server, wherein the terminal device can be a local terminal device. When the visualization tool runs on the server, the method for generating a visualization chart can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device (i.e., a terminal device).
[0033] To facilitate understanding of the embodiments of the present application, a method, device, equipment and storage medium for generating a visual chart provided in the embodiments of the present application are introduced in detail below.
[0034] Reference Figure 1 As shown, Figure 1 A schematic flow chart of a method for generating a visualization chart provided in an embodiment of the present application is shown, wherein the generating method comprises steps S101-S104; specifically:
[0035] S101, for each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude.
[0036] S102: If they are of the same order of magnitude, the length of the coordinate axis is evenly distributed according to a preset number of divisions.
[0037] S103: If they are not of the same order of magnitude, then the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude.
[0038] S104, determining the cartographic coordinate system corresponding to the target visualization chart according to the length assigned to each of the coordinate axes and the value range of the variable represented by each of the coordinate axes, and generating the target visualization chart according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
[0039] The method for generating the above-mentioned visualization chart provided by the embodiment of the present application, for each coordinate axis in the target visualization chart, determines whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; if they do not belong to the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; according to each coordinate axis with a length distribution and the value range of the variable represented by each coordinate axis, the mapping coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly.
[0040] The following is an exemplary description of each step in the method for generating the above-mentioned visualization chart provided in the embodiment of the present application:
[0041] S101, for each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude.
[0042] Here, a graphical user interface of the visualization tool can be displayed through a terminal device, wherein the user can select a target visualization chart that needs to be generated from a variety of visualization charts (such as scatter plots, bubble plots, line charts, etc.) displayed on the graphical user interface, wherein the target visualization chart can be a scatter plot (used to display the relationship between two variables represented by the coordinate x-axis and the coordinate y-axis respectively), or a bubble chart (used to display the relationship between three variables represented by the coordinate x-axis, the coordinate y-axis and the bubble area respectively), or other visualization charts for displaying the relationship between multiple variables. The embodiments of the present application do not impose any limitation on the specific visualization chart type to which the above-mentioned target visualization chart belongs.
[0043] Here, the above-mentioned multiple original data represent data used to draw the above-mentioned target visualization chart, wherein the specific data content of the original data and the specific variables represented by each of the above-mentioned coordinate axes can be determined according to the actual mapping requirements of the target visualization chart, and the embodiment of the present application does not impose any limitation on this.
[0044] For example, in the business analysis scenario of game macro market research, if it is necessary to analyze the distribution of different types of game tracks in the entire game market, taking the target visualization chart as a scatter plot, the x-axis of the scatter plot can represent the proportion of the market size of each game track occupied by the game ranked first in revenue, and the y-axis of the scatter plot can represent the overall market size of each game track. At this time, each of the above raw data can correspond to a game track, and the specific data content of each raw data can include the proportion of the market size of the game track occupied by the game ranked first in revenue in the game track corresponding to the raw data (equivalent to the variable value of the raw data under the variable represented by the x-axis) and the overall market size of the game track corresponding to the raw data (equivalent to the variable value of the raw data under the variable represented by the y-axis).
[0045] In the embodiment of the present application, as an optional embodiment, for each coordinate axis in the target visualization chart, when executing the above step S101, the method shown in the following steps a1-a3 can be used to determine whether the variable values of the above multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude, specifically:
[0046] Step a1: Calculate the discrete coefficients corresponding to the multiple variable values according to the variable values of the multiple original data under the variable represented by the coordinate axis.
[0047] Here, in combination with the specific example content shown in the above exemplary description, it can be seen that each coordinate axis can represent a variable under a specific dimension (for example, the coordinate x-axis of the above scatter plot can represent the proportion of the market size of each game track occupied by the game ranked first in revenue in the game track), wherein the discrete coefficient of the variable value under the same dimension (that is, the variable value of the above multiple original data under the variable represented by the same coordinate axis) can be calculated to determine whether these variable values belong to the same order of magnitude.
[0048] Specifically, the dispersion coefficient refers to the ratio of the standard deviation of the above multiple variable values (that is, the variable values of the above multiple original data under the variables represented by the same coordinate axis) to their corresponding mean (that is, the average value), which can reflect the relative dispersion of a set of data (that is, the above multiple variable values). The specific calculation formula is as follows:
[0049]
[0050] Among them, μ refers to the average value of the above multiple variable values (that is, the variable values of the above multiple original data under the variables represented by the same coordinate axis);
[0051] σ refers to the standard deviation among the above multiple variable values;
[0052] Cv It refers to the discrete coefficient corresponding to the above-mentioned multiple variable values (that is, the variable values of the above-mentioned multiple original data under the variables represented by the same coordinate axis).
[0053] Step a2: If the discrete coefficient is within the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis belong to the same order of magnitude.
[0054] Here, the larger the dispersion coefficient, the greater the degree of dispersion of the above-mentioned multiple variable values (that is, the variable values of the above-mentioned multiple original data under the variables represented by the same coordinate axis); the smaller the dispersion coefficient, the smaller the degree of dispersion of the above-mentioned multiple variable values (that is, the variable values of the above-mentioned multiple original data under the variables represented by the same coordinate axis).
[0055] Specifically, as an optional embodiment, the above-mentioned target numerical range can be 1±0.5 (that is, 0.5 to 1.5), wherein the specific value of the above-mentioned target numerical range can be set according to the actual drawing requirements of the target visualization chart, and the embodiment of the present application does not impose any limitation on this.
[0056] For example, the x-axis of the scatter plot represents the proportion of the market size of each game track occupied by the game ranked first in revenue, and the y-axis of the scatter plot represents the overall market size of each game track. Since the proportion of the market size of each game track occupied by the game ranked first in revenue is not much different, the discrete coefficients corresponding to the variable values of the above multiple original data under the variables represented by the x-axis will be within the above target numerical range, so that the visualization tool can automatically determine that the variable values of the above multiple original data under the variables represented by the x-axis belong to the same order of magnitude.
[0057] Step a3: If the discrete coefficient is outside the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis do not belong to the same order of magnitude.
[0058] For example, the x-axis of the scatter plot represents the proportion of the market size of each game track occupied by the game with the highest revenue in each game track, and the y-axis of the scatter plot represents the overall market size of each game track. Since the market size data of popular game tracks are quite different from those of unpopular game tracks, the discrete coefficients corresponding to the variable values of the above-mentioned multiple original data under the variables represented by the y-axis will exceed the above-mentioned target numerical range (i.e., be outside the target numerical range), so that the visualization tool can automatically determine that the variable values of the above-mentioned multiple original data under the variables represented by the y-axis are not of the same order of magnitude.
[0059] S102: If they are of the same order of magnitude, the length of the coordinate axis is evenly distributed according to a preset number of divisions.
[0060] Here, the display area of the target visualization chart in the graphical user interface of the visualization tool is fixed, that is, the length of each coordinate axis in the target visualization chart may be a preconfigured preset length.
[0061] Specifically, when it is determined that the variable values of the above-mentioned multiple original data under the variable represented by a coordinate axis belong to the same order of magnitude, since the difference between the variable values of the above-mentioned multiple original data under the variable represented by the coordinate axis is small (that is, they belong to the same order of magnitude), there is no need to scale the coordinate axis (that is, there is no need to change the range of variable values represented by each unit length in the coordinate axis), that is, the length of the coordinate axis can be evenly distributed according to a preset number of divisions, so that the range of variable values represented by each unit length in the coordinate axis is the same.
[0062] As an exemplary explanation, take the x-axis of the scatter plot representing the proportion of the market size of each game track occupied by the game ranked first in revenue in the game track as an example. Combined with the above specific example content, it can be seen that the variable values of the above multiple original data under the variable represented by the x-axis belong to the same order of magnitude. At this time, if the above preset number of divisions is 10, the x-axis of the scatter plot can be divided into 10 segments on average, wherein the value range of the x variable represented by each segment can be determined according to the maximum x value and the minimum x value of the x-axis of the scatter plot (e.g., if the maximum x value of the x-axis of the scatter plot is 100% and the minimum x value is 0%, the x-axis of the scatter plot is divided into 10 segments on average, and the value range of the x variable represented by each segment can be 10%).
[0063] S103: If they are not of the same order of magnitude, then the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude.
[0064] Specifically, when it is determined that the variable values of the above-mentioned multiple original data under the variable represented by a coordinate axis do not belong to the same order of magnitude, since the variable values of the above-mentioned multiple original data under the variable represented by the coordinate axis have a large difference (that is, they do not belong to the same order of magnitude), it is necessary to scale the coordinate axis, that is, the coordinate axis can be divided into multiple sections according to the proportional coefficient configured by the user for each order of magnitude, wherein the coordinate axis length of each section corresponds to the variable value range corresponding to an order of magnitude, and the proportion of the coordinate axis length of each section to the total length of the entire coordinate axis is determined according to the above-mentioned proportional coefficient configured for the order of magnitude corresponding to the length of the coordinate axis section.
[0065] For example, the y-axis of the scatter plot represents the overall market size of each game track. Combined with the above specific examples, it can be seen that the variable values of the variables represented by the y-axis of the above multiple original data do not belong to the same order of magnitude. At this time, if the three orders of magnitude entered by the user are "first order of magnitude" (representing a large game track with a market size of 5 billion to 50 billion), "second order of magnitude" (representing a medium-sized game track with a market size of 1 billion to 5 billion), and "third order of magnitude" (representing a small game track with a market size of 0 billion to 1 billion), the proportional coefficient of the above "first order of magnitude" configuration is 50%, and the above "second order of magnitude" configuration is 50%. If the proportional coefficient of the "first order of magnitude" configuration is 30% and the proportional coefficient of the above-mentioned "third order of magnitude" configuration is 20%, the coordinate y-axis of the scatter plot can be divided into 3 sections according to the proportions of 50%, 30% and 20%, among which the value range of the y variable represented by the portion of the coordinate y-axis with a length of 50% can be the above-mentioned "first order of magnitude" (i.e. 5 billion-50 billion), the value range of the y variable represented by the portion of the coordinate y-axis with a length of 30% can be the above-mentioned "second order of magnitude" (i.e. 1 billion-5 billion), and the value range of the y variable represented by the portion of the coordinate y-axis with a length of 20% can be the above-mentioned "third order of magnitude" (i.e. 0 billion-1 billion).
[0066] S104, determining the cartographic coordinate system corresponding to the target visualization chart according to the length assigned to each of the coordinate axes and the value range of the variable represented by each of the coordinate axes, and generating the target visualization chart according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
[0067] Here, as an optional embodiment, the value range of the variable represented by each coordinate axis can be determined according to the maximum value and the minimum value of the variable represented by the coordinate axis of multiple original data (equivalent to determining the value range of the variable represented by each coordinate axis according to the variable value in the actual original data). At this time, the method shown in the following steps b1-b2 can be used to determine the above-mentioned mapping coordinate system, specifically:
[0068] Step b1: for each coordinate axis, determine the value range of the variable represented by the coordinate axis according to the maximum value and the minimum value of the variable of the plurality of original data under the variable represented by the coordinate axis.
[0069] Specifically, taking the x-axis of the scatter plot representing the proportion of the market size of each game track occupied by the game ranked first in revenue in the game track as an example, if the maximum value of the variable under the variable represented by the x-axis of the above multiple original data is 70%, and the minimum value of the variable is 20%, then it can be determined that the value range of the variable represented by the x-axis is 20%-70%.
[0070] Specifically, taking the y-axis of the scatter plot representing the overall market size of each game track as an example, if the maximum value of the variable represented by the y-axis of the above multiple original data is 53 billion and the minimum value of the variable is 500 million, then it can be determined that the value range of the variable represented by the y-axis is 500 million-53 billion.
[0071] Step b2: determine the mapping coordinate system corresponding to the target visualization chart according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0072] Here, the length allocation method of each coordinate axis can refer to the contents of the aforementioned steps S102-S103, and the repeated parts will not be repeated here.
[0073] Specifically, taking the x-axis of the scatter plot representing the proportion of the market size of each game track occupied by the game ranked first in revenue as an example (the variable values are of the same order of magnitude), if the value range of the variable represented by the x-axis is determined to be 20%-70%, and the above preset number of divisions is 10, then the x-axis of the scatter plot can be divided into 10 segments on average, where the value range of the x variable represented by each segment is: 20%-25%, 25%-30%, 30%-35%, 35%-40%, 40%-45%, 45%-50%, 50%-55%, 55%-60%, 60%-65%, 65%-70%.
[0074] Here, considering that if the variable value range represented by each coordinate axis is determined according to the variable value in the actual original data, the coordinate axis may be affected by the extreme variable value in the original data (the extreme variable value is much larger than other variable values or the extreme variable value is much smaller than other variable values), so that the display effect of the target visualization chart finally generated is deteriorated (for example, the data points corresponding to different original data are too densely distributed, which is not convenient for users to view). Therefore, as another optional embodiment, the variable value range represented by each coordinate axis can also be determined according to the preset maximum value and preset minimum value corresponding to the variable represented by each coordinate axis input by the user. At this time, the above-mentioned mapping coordinate system can be determined according to the method shown in the following steps c1-c2, specifically:
[0075] Step c1: for each of the coordinate axes, determine the value range of the variable represented by the coordinate axis according to a preset maximum value and a preset minimum value corresponding to the variable represented by the coordinate axis.
[0076] Specifically, taking the x-axis of the scatter plot representing the proportion of the market size of each game track occupied by the game ranked first in revenue as an example, if the preset maximum value corresponding to the variable represented by the x-axis is 100% and the preset minimum value is 0%, then it can be determined that the value range of the variable represented by the x-axis is 0%-100%.
[0077] Specifically, taking the y-axis of the scatter plot representing the overall market size of each game track as an example, if the preset maximum value corresponding to the variable represented by the y-axis is 50 billion and the preset minimum value is 0 billion, then it can be determined that the value range of the variable represented by the y-axis is 0 billion-50 billion.
[0078] Step c2: determine the mapping coordinate system corresponding to the target visualization chart according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0079] Here, taking the y-axis of the scatter plot as an example to represent the overall market size of each game track (the variable values do not belong to the same order of magnitude), if the three orders of magnitude entered by the user are "first order of magnitude" (representing a large game track with a market size of 5 billion to 50 billion), "second order of magnitude" (representing a medium-sized game track with a market size of 1 billion to 5 billion), and "third order of magnitude" (representing a small game track with a market size of 0 billion to 1 billion), among which the proportional coefficient of the above "first order of magnitude" configuration is 50%, the proportional coefficient of the above "second order of magnitude" configuration is 30%, and the proportional coefficient of the above "third order of magnitude" configuration is 20%, then the scatter plot can be The y-axis of the point graph is divided into three segments according to the ratio of 50%, 30%, and 20% (equivalent to dividing the y-axis into 10 segments on average, of which 5 segments belong to the "first order of magnitude", 3 segments belong to the "second order of magnitude", and 2 segments belong to the "third order of magnitude"). At this time, when executing step c2, it is equivalent to mapping the variable value range of the "third order of magnitude" (0 billion-1 billion) to segments 0-2 in the y-axis, mapping the variable value range of the "second order of magnitude" (1 billion-5 billion) to segments 2-5 in the y-axis, and mapping the variable value range of the "first order of magnitude" (5 billion-50 billion) to segments 5-10 in the y-axis.
[0080] Specifically, for the case where the above variable values do not belong to the same order of magnitude, for the local coordinate axis area corresponding to each order of magnitude, the variable value range corresponding to the order of magnitude can be mapped to the local coordinate axis area corresponding to the order of magnitude according to the following formula:
[0081] Y target =(Y source -Min in )*(Max out -Min out ) / (Max in -Min in )+Min out ;
[0082] Among them, Y source Represents the original variable value corresponding to the coordinate axis;
[0083] Min in and Max in Represents the minimum and maximum values of the variables corresponding to each order of magnitude (i.e., the range of variable values). For example, the minimum and maximum values of the variables corresponding to the "first order of magnitude" are 5 billion and 50 billion.
[0084] Min out and Max out Represents the local coordinate axis area corresponding to each order of magnitude, for example, the 5-10 segment in the coordinate y-axis corresponding to the above “first order of magnitude”.
[0085] Here, when executing step S104, after determining the above-mentioned cartographic coordinate system, it is only necessary to display the data identifier used to represent the original data at the coordinate position according to the coordinate corresponding to each original data in the cartographic coordinate system (such as the x-coordinate value corresponding to the x-axis and the y-coordinate value corresponding to the y-axis of each original data), so as to generate a target visualization chart composed of the coordinate axes in the above-mentioned cartographic coordinate system (that is, the coordinate axes in the target visualization chart) and the data identifiers of each original data.
[0086] Specifically, in visualization tools such as Echarts, Highcharts, and AntV, the user can enter the code instance corresponding to the method shown in the above steps S101-S104 in the visualization tool, and generate the above target visualization chart by clicking to run the above code instance entered in the visualization tool. The visualization tool will display the generated target visualization chart on the graphical user interface for the user to view. The user can also view the original data corresponding to any data identifier displayed in the target visualization chart by hovering or clicking to view the data identifier (that is, the visualization tool displays the original data corresponding to the data identifier on the graphical user interface in response to the user's hovering operation or clicking operation on the data identifier).
[0087] It should be noted that the above-mentioned code instance can be a code instance programmed by the user according to the method shown in the above steps S101-S104, or it can be a code instance generated by the AI model by the user inputting the method shown in the above steps S101-S104 as prompt information. The specific writing method and specific code content of the above-mentioned code instance are not limited in any way in the embodiments of the present application.
[0088] The following describes in detail the specific implementation process of each of the above steps in the embodiment of the present application:
[0089] Regarding the specific implementation process of the above-mentioned step S104, when determining the mapping coordinate system according to the method shown in the above-mentioned steps b1-b2, although the variable value range represented by each coordinate axis is determined according to the variable value in the actual original data, there will be no problem that the coordinates corresponding to the original data exceed the chart area of the target visualization chart (that is, exceed the determined variable value range represented by any of the above-mentioned coordinate axes), but the coordinate axis may be affected by the extreme variable value in the original data, so that the display effect of the target visualization chart finally generated is deteriorated (for example, the data points corresponding to different original data are too densely distributed, which is not convenient for users to view).
[0090] Regarding the specific implementation process of the above-mentioned step S104, when the mapping coordinate system is determined according to the method shown in the above-mentioned steps c1-c2, although it will not affect the display effect of the finally generated target visualization chart like the method shown in the above-mentioned steps b1-b2, but because the variable value range corresponding to the coordinate axis is preset by the user (that is, the preset maximum value and the preset minimum value), there may be a problem that the data identifier corresponding to the original data exceeds the chart area of the target visualization chart.
[0091] Based on this, in order to overcome the above problem, when determining the mapping coordinate system according to the method shown in the above steps c1-c2, before generating the above target visualization chart, the abnormal coordinates that exceed the value range of the variable represented by any of the above coordinate axes can also be corrected according to the method shown in the following steps d1-d2. Specifically:
[0092] Step d1, based on the coordinates corresponding to the plurality of original data in the mapping coordinate system, detecting whether there are abnormal coordinates in the plurality of coordinates that exceed the value range of the variable represented by any of the coordinate axes.
[0093] Here, for each coordinate axis, the value range of the variable represented by the coordinate axis is equivalent to the preset maximum value and preset minimum value corresponding to the variable represented by the coordinate axis in the above step c1.
[0094] Step d2: if it is determined that the abnormal coordinates exist, the abnormal coordinates are corrected according to the preset maximum value and the preset minimum value corresponding to the variable represented by the target coordinate axis.
[0095] Here, the target coordinate axis represents the coordinate axis whose value range of the variable is exceeded by the abnormal coordinate. For example, if there is original data in the multiple original data whose y-axis coordinate is greater than the preset maximum value of the y-axis, the target coordinate axis can be determined to be the y-axis.
[0096] Specifically, if the abnormal coordinates are abnormal because they exceed the preset maximum value corresponding to the variable represented by the target coordinate axis, the abnormal coordinates can be corrected by correcting the variable value of the abnormal coordinates on the target coordinate axis to the preset maximum value.
[0097] Specifically, if the abnormal coordinates are abnormal because they are smaller than the preset minimum value corresponding to the variable represented by the target coordinate axis, the abnormal coordinates can be corrected by correcting the variable value of the abnormal coordinates on the target coordinate axis to the preset minimum value.
[0098] With respect to the target visualization chart finally generated in step S104, considering that a data identifier for representing each of the original data is displayed in the target visualization chart, when the coordinates of multiple original data in the mapping coordinate system are close to each other (the distance between them is less than the sum of the radii of the two data identifiers), multiple data identifiers may overlap with each other. To overcome the above situation, in an optional implementation, referring to Figure 2 As shown, Figure 2 A flow chart of a method for deduplication of data identification provided in an embodiment of the present application is shown, wherein the deduplication method includes steps S201-S202; specifically:
[0099] S201, detecting whether there are multiple abnormal data identifiers with overlapping display areas from among multiple data identifiers displayed in the target visualization chart.
[0100] Here, taking the case where the data marker is a circular marker as an example, when the target visualization chart is a bubble chart, the coordinates of the center of the i-th data marker in the bubble chart (i.e., the coordinates of the original data corresponding to the data marker in the mapping coordinate system) can be expressed as (x i ,y i ,r i ), where x i Indicates the x-axis coordinate and y-axis coordinate of the center of the i-th data marker circle in the bubble chart i Indicates the y-axis coordinate of the center of the i-th data marker circle in the bubble chart, r i Indicates the radius of the i-th data marker. At this time, for any two data markers in the bubble chart (recorded as data marker A and data marker B), the following formula can be used to determine whether the two data markers are abnormal data markers with overlapping display areas. Specifically:
[0101]
[0102] d <r1+r2;
[0103] The center coordinates of the data marker A in the bubble chart can be expressed as (x1, y1, r1), and the center coordinates of the data marker B in the bubble chart can be expressed as (x2, y2, r2);
[0104] d represents the distance between the center of the circle of data marker A and the center of the circle of data marker B;
[0105] If d is smaller than the sum of the radius r1 of the data marker A and the radius r2 of the data marker B, it can be determined that the display area of the data marker A overlaps the display area of the data marker B;
[0106] If d is greater than or equal to the sum of the radius r1 of the data marker A and the radius r2 of the data marker B, it can be determined that the display area of the data marker A and the display area of the data marker B do not overlap.
[0107] It should be noted that when the target visualization chart is a scatter plot, based on the fact that the identification sizes of different data identifiers in the scatter plot are the same (for example, the radius of different data identifiers can all be recorded as R), the specific judgment method for whether there is overlap in the display areas between two data identifiers A and B in the scatter plot is the same as the judgment method of the above-mentioned bubble chart. You only need to replace "r1+r2" in the above formula with 2R, and the repetitions will not be repeated here.
[0108] S202: If it is determined that the plurality of abnormal data identifiers exist, then the display positions of the plurality of abnormal data identifiers in the target visualization chart are adjusted to obtain a target visualization chart after removing overlaps.
[0109] Here, after executing the above step S201, if it is determined that there are abnormal data identifiers with overlapping display areas, the overlap between the display areas of different data identifiers in the target visualization chart can be eliminated by fine-tuning the display positions of different abnormal data identifiers in the target visualization chart.
[0110] Specifically, when the number of the above-mentioned multiple abnormal data identifiers is an odd number, the above-mentioned step S202 may be performed according to the method described in the following steps e1-e3:
[0111] Step e1: when the number of the plurality of abnormal data identifiers is an odd number, determining a target abnormal data identifier whose display position is centered among the plurality of abnormal data identifiers.
[0112] Exemplary description, Figure 3a A sample schematic diagram of adjusting the display position of an odd number of abnormal data marks provided by an embodiment of the present application is shown, such as Figure 3a As shown, taking the number of abnormal data identifiers as 3 as an example, the abnormal data identifier with a central display position can be determined as the target abnormal data identifier whose display position does not need to be moved.
[0113] Step e2: for each other abnormal data identifier among the multiple abnormal data identifiers, determine the corresponding moving direction of the other abnormal data identifier in the target visualization chart according to the relative position relationship between the other abnormal data identifier and the target abnormal data identifier.
[0114] Here, the other abnormal data identifiers may refer to abnormal data identifiers other than the target abnormal data identifier among the multiple abnormal data identifiers.
[0115] Specifically, for each other abnormal data identifier, the other abnormal data identifier may be moved in a direction away from the target abnormal data identifier.
[0116] Exemplary descriptions, such as Figure 3a As shown, for the abnormal data identifier located on the left side of the target abnormal data identifier, the abnormal data identifier can be moved in the left direction along the coordinate x-axis, or can be moved upward or downward along the coordinate y-axis. It only needs to ensure that the moving direction is away from the above-mentioned target abnormal data identifier. This embodiment of the present application does not impose any limitation on this.
[0117] Step e3: determining the corresponding moving distance of the other abnormal data identifier in the target visualization chart according to the relative distance between the other abnormal data identifier and the target abnormal data identifier and the identifier sizes corresponding to the other abnormal data identifier and the target abnormal data identifier respectively.
[0118] Here, taking the data identifier as a circular identifier as an example, when the target visualization chart is a bubble chart, for each other abnormal data identifier to be moved, after determining the moving direction of the other abnormal data identifier according to the method shown in the above step e2, the other abnormal data identifier can be moved along the determined moving direction and moving distance Δd.
[0119] Specifically, the moving distance Δd can be calculated by the following formula:
[0120]
[0121] The center coordinates of the other abnormal data marker C to be moved in the bubble chart can be expressed as (x3, y3, r3), and the center coordinates of the target abnormal data marker D in the bubble chart can be expressed as (x4, y4, r4);
[0122] d r Represents the distance between the center of the circle of other abnormal data markers C and the center of the circle of the target abnormal data marker D;
[0123] r3 represents the radius of other abnormal data markers C, and r4 represents the radius of target abnormal data marker D.
[0124] It should be noted that when the target visualization chart is a scatter plot, the identification sizes of different data identifiers in the scatter plot are the same (for example, the radius of different data identifiers can be denoted as R). At this time, the calculation method of the specific moving distance of other abnormal data identifiers C in the scatter plot is the same as the calculation method of the above bubble chart. It is only necessary to replace "r3+r4" in the above formula with 2R, and the repetitions will not be repeated here.
[0125] Specifically, when the number of the above-mentioned multiple abnormal data identifiers is an even number, the above-mentioned step S202 may be performed according to the method described in the following steps f1-f4:
[0126] Step f1: when the number of the plurality of abnormal data identifiers is an even number, determining a first abnormal data identifier and a second abnormal data identifier whose display positions are centered among the plurality of abnormal data identifiers.
[0127] Exemplary description, Figure 3b A sample schematic diagram of adjusting the display position of an even number of abnormal data marks provided in an embodiment of the present application is shown, such as Figure 3b As shown, taking the number of abnormal data identifiers as 4 as an example, two abnormal data identifiers in the middle of the display positions can be determined as the first abnormal data identifier and the second abnormal data identifier.
[0128] Step f2: adjusting the distance between the first abnormal data identifier and the second abnormal data identifier according to the identifier sizes corresponding to the first abnormal data identifier and the second abnormal data identifier respectively.
[0129] Here, when the number of the plurality of abnormal data identifiers is an even number, taking the radius of the first abnormal data identifier as r5 and the radius of the second abnormal data identifier as r6 as an example, Figure 3b As shown, the distance between the first abnormal data marker and the second abnormal data marker located in the center can be expanded to "r5+r6", that is, the relative position between the first abnormal data marker and the second abnormal data marker is adjusted first so that the adjusted first abnormal data marker and the second abnormal data marker no longer overlap.
[0130] Step f3, for multiple abnormal data identifiers close to one side of the first abnormal data identifier, use the first abnormal data identifier as the target abnormal data identifier, and adjust the display positions of the multiple abnormal data identifiers close to one side of the first abnormal data identifier in the target visualization chart.
[0131] Here, for multiple abnormal data identifiers close to the first abnormal data identifier, the first abnormal data identifier can be used as the target abnormal data identifier in the above steps e1-e3 and moved in the same manner as the above steps e1-e3, and the repeated parts will not be repeated here.
[0132] Step f4, for multiple abnormal data identifiers close to the second abnormal data identifier, use the second abnormal data identifier as the target abnormal data identifier, and adjust the display positions of the multiple abnormal data identifiers close to the second abnormal data identifier in the target visualization chart.
[0133] Here, for multiple abnormal data identifiers close to the second abnormal data identifier, the second abnormal data identifier can be used as the target abnormal data identifier in the above steps e1-e3 and moved in the same manner as the above steps e1-e3, and the repeated parts will not be repeated here.
[0134] Based on the above-mentioned method for generating a visualization chart provided by an embodiment of the present application, for each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, evenly distribute the length of the coordinate axis according to the preset number of divisions; if they do not belong to the same order of magnitude, determine the length of the coordinate axis corresponding to each order of magnitude according to the proportional coefficient configured by the user for each order of magnitude; determine the mapping coordinate system corresponding to the target visualization chart according to each coordinate axis with a good length distribution and the value range of the variable represented by each coordinate axis, and generate the target visualization chart according to the coordinates corresponding to each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly.
[0135] Based on the same inventive concept, the present application also provides a device for generating a visualization chart corresponding to the above-mentioned method for generating a visualization chart. Since the principle of solving the problem by the device for generating a visualization chart in the embodiment of the present application is similar to the method for generating a visualization chart in the embodiment of the present application, the implementation of the device for generating a visualization chart can refer to the implementation of the method for generating a visualization chart, and the repeated parts will not be repeated.
[0136] Reference Figure 4 As shown, Figure 4 A schematic diagram of the structure of a device for generating a visual chart provided in an embodiment of the present application is shown, wherein the device for generating a visual chart includes:
[0137] A judgment module 401 is used to judge, for each coordinate axis in the target visualization chart, whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude;
[0138] A first allocation module 402, configured to evenly allocate the length of the coordinate axis according to a preset number of divisions if the coordinates are of the same order of magnitude;
[0139] The second allocation module 403 is used to determine the length of the coordinate axis allocated to each order of magnitude according to the proportional coefficient configured by the user for each order of magnitude if the coordinate axes do not belong to the same order of magnitude;
[0140] The mapping module 404 is used to determine the mapping coordinate system corresponding to the target visualization chart according to the length assigned to each coordinate axis and the value range of the variable represented by each coordinate axis, and generate the target visualization chart according to the coordinates corresponding to each original data in the mapping coordinate system.
[0141] In an optional implementation, when determining whether the variable values of the plurality of original data under the variable represented by the coordinate axis are of the same order of magnitude, the determination module 401 is used to:
[0142] Calculate the discrete coefficients corresponding to the plurality of variable values according to the variable values of the plurality of original data under the variable represented by the coordinate axis;
[0143] If the dispersion coefficient is within the target value range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis belong to the same order of magnitude;
[0144] If the dispersion coefficient is outside the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis do not belong to the same order of magnitude.
[0145] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the mapping module 404 is used to:
[0146] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a preset maximum value and a preset minimum value corresponding to the variable represented by the coordinate axis;
[0147] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0148] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the mapping module 404 is used to:
[0149] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a maximum value and a minimum value of the variable of the plurality of original data under the variable represented by the coordinate axis;
[0150] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0151] In an optional implementation, before generating the target visualization chart, the mapping module 404 is further configured to:
[0152] According to the coordinates corresponding to the plurality of original data in the mapping coordinate system, detecting whether there are abnormal coordinates in the plurality of coordinates that exceed the value range of the variable represented by any of the coordinate axes;
[0153] If it is determined that the abnormal coordinates exist, the abnormal coordinates are corrected according to the preset maximum value and the preset minimum value corresponding to the variable represented by the target coordinate axis; wherein the target coordinate axis represents the coordinate axis whose value range of the variable is exceeded by the abnormal coordinates.
[0154] In an optional implementation, a data identifier for representing each of the original data is displayed in the target visualization chart, and the mapping module 404 is further used to:
[0155] Detecting whether there are multiple abnormal data identifiers with overlapping display areas from among the multiple data identifiers displayed in the target visualization chart;
[0156] If it is determined that the multiple abnormal data identifiers exist, the display positions of the multiple abnormal data identifiers in the target visualization chart are adjusted to obtain the target visualization chart after removing overlaps.
[0157] In an optional implementation, when adjusting the display positions of the plurality of abnormal data identifiers in the target visualization chart, the mapping module 404 is used to:
[0158] When the number of the plurality of abnormal data identifiers is an odd number, determining a target abnormal data identifier whose display position is centered among the plurality of abnormal data identifiers;
[0159] For each other abnormal data identifier among the multiple abnormal data identifiers, determining a moving direction corresponding to the other abnormal data identifier in the target visualization chart according to a relative position relationship between the other abnormal data identifier and the target abnormal data identifier;
[0160] According to the relative distance between the other abnormal data identifier and the target abnormal data identifier and the identifier sizes corresponding to the other abnormal data identifier and the target abnormal data identifier respectively, the corresponding moving distance of the other abnormal data identifier in the target visualization chart is determined.
[0161] In an optional implementation, when adjusting the display positions of the plurality of abnormal data identifiers in the target visualization chart, the mapping module 404 is used to:
[0162] When the number of the plurality of abnormal data identifiers is an even number, determining a first abnormal data identifier and a second abnormal data identifier whose display positions are centered among the plurality of abnormal data identifiers;
[0163] adjusting the distance between the first abnormal data identifier and the second abnormal data identifier according to the identifier sizes corresponding to the first abnormal data identifier and the second abnormal data identifier respectively;
[0164] For a plurality of abnormal data identifiers close to one side of the first abnormal data identifier, taking the first abnormal data identifier as the target abnormal data identifier, adjusting the display positions of the plurality of abnormal data identifiers close to one side of the first abnormal data identifier in the target visualization chart;
[0165] For multiple abnormal data identifiers close to the second abnormal data identifier, the second abnormal data identifier is used as the target abnormal data identifier, and the display positions of the multiple abnormal data identifiers close to the second abnormal data identifier in the target visualization chart are adjusted.
[0166] Based on the above-mentioned visualization chart generation device provided by the embodiment of the present application, for each coordinate axis in the target visualization chart, it is determined whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; if they do not belong to the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; according to each coordinate axis with a good length distribution and the value range of the variable represented by each coordinate axis, the mapping coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the corresponding coordinates of each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly.
[0167] Based on the same inventive concept, the present application also provides an electronic device corresponding to the above-mentioned method for generating a visualization chart. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the method for generating the above-mentioned visualization chart in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the method for generating the above-mentioned visualization chart, and the repeated parts will not be repeated.
[0168] Figure 5 A structural diagram of an electronic device 500 provided in an embodiment of the present application includes: a processor 501, a memory 502 and a bus 503, wherein the memory 502 stores machine-readable instructions executable by the processor 501. When the electronic device runs a method for generating a visual chart in an embodiment, the processor 501 communicates with the memory 502 via the bus 503, and the processor 501 executes the machine-readable instructions. When the processor 501 executes the machine-readable instructions, the following steps are implemented, specifically:
[0169] For each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude;
[0170] If they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions;
[0171] If they are not of the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude;
[0172] According to the length distribution of each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, the cartographic coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
[0173] In an optional implementation, when determining whether the variable values of the plurality of original data under the variable represented by the coordinate axis are of the same order of magnitude, the processor 501 is configured to:
[0174] Calculate the discrete coefficients corresponding to the plurality of variable values according to the variable values of the plurality of original data under the variable represented by the coordinate axis;
[0175] If the dispersion coefficient is within the target value range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis belong to the same order of magnitude;
[0176] If the dispersion coefficient is outside the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis do not belong to the same order of magnitude.
[0177] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the processor 501 is used to:
[0178] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a preset maximum value and a preset minimum value corresponding to the variable represented by the coordinate axis;
[0179] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0180] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the processor 501 is used to:
[0181] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a maximum value and a minimum value of the variable of the plurality of original data under the variable represented by the coordinate axis;
[0182] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0183] In an optional implementation, before generating the target visualization chart, the processor 501 is further configured to:
[0184] According to the coordinates corresponding to the plurality of original data in the mapping coordinate system, detecting whether there are abnormal coordinates in the plurality of coordinates that exceed the value range of the variable represented by any of the coordinate axes;
[0185] If it is determined that the abnormal coordinates exist, the abnormal coordinates are corrected according to the preset maximum value and the preset minimum value corresponding to the variable represented by the target coordinate axis; wherein the target coordinate axis represents the coordinate axis whose value range of the variable is exceeded by the abnormal coordinates.
[0186] In an optional implementation manner, a data identifier for representing each of the original data is displayed in the target visualization chart, and the processor 501 is further configured to:
[0187] Detecting whether there are multiple abnormal data identifiers with overlapping display areas from among the multiple data identifiers displayed in the target visualization chart;
[0188] If it is determined that the multiple abnormal data identifiers exist, the display positions of the multiple abnormal data identifiers in the target visualization chart are adjusted to obtain the target visualization chart after removing overlaps.
[0189] In an optional implementation, when adjusting the display positions of the multiple abnormal data identifiers in the target visualization chart, the processor 501 is configured to:
[0190] When the number of the plurality of abnormal data identifiers is an odd number, determining a target abnormal data identifier whose display position is centered among the plurality of abnormal data identifiers;
[0191] For each other abnormal data identifier among the multiple abnormal data identifiers, determining a moving direction corresponding to the other abnormal data identifier in the target visualization chart according to a relative position relationship between the other abnormal data identifier and the target abnormal data identifier;
[0192] According to the relative distance between the other abnormal data identifier and the target abnormal data identifier and the identifier sizes corresponding to the other abnormal data identifier and the target abnormal data identifier respectively, the corresponding moving distance of the other abnormal data identifier in the target visualization chart is determined.
[0193] In an optional implementation, when adjusting the display positions of the multiple abnormal data identifiers in the target visualization chart, the processor 501 is configured to:
[0194] When the number of the plurality of abnormal data identifiers is an even number, determining a first abnormal data identifier and a second abnormal data identifier whose display positions are centered among the plurality of abnormal data identifiers;
[0195] adjusting the distance between the first abnormal data identifier and the second abnormal data identifier according to the identifier sizes corresponding to the first abnormal data identifier and the second abnormal data identifier respectively;
[0196] For a plurality of abnormal data identifiers close to one side of the first abnormal data identifier, taking the first abnormal data identifier as the target abnormal data identifier, adjusting the display positions of the plurality of abnormal data identifiers close to one side of the first abnormal data identifier in the target visualization chart;
[0197] For multiple abnormal data identifiers close to the second abnormal data identifier, the second abnormal data identifier is used as the target abnormal data identifier, and the display positions of the multiple abnormal data identifiers close to the second abnormal data identifier in the target visualization chart are adjusted.
[0198] Through the above-mentioned electronic device provided by the embodiment of the present application, for each coordinate axis in the target visualization chart, it is determined whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; if they do not belong to the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; according to each coordinate axis with a length distribution and the value range of the variable represented by each coordinate axis, the mapping coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly.
[0199] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed when a processor is running, and the processor performs the following steps:
[0200] For each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude;
[0201] If they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions;
[0202] If they are not of the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude;
[0203] According to the length distribution of each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, the cartographic coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
[0204] In an optional implementation, when determining whether the variable values of the plurality of original data under the variable represented by the coordinate axis are of the same order of magnitude, the processor is configured to:
[0205] Calculate the discrete coefficients corresponding to the plurality of variable values according to the variable values of the plurality of original data under the variable represented by the coordinate axis;
[0206] If the dispersion coefficient is within the target value range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis belong to the same order of magnitude;
[0207] If the dispersion coefficient is outside the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis do not belong to the same order of magnitude.
[0208] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the processor is used to:
[0209] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a preset maximum value and a preset minimum value corresponding to the variable represented by the coordinate axis;
[0210] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0211] In an optional implementation, when determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes assigned with length and the value range of the variable represented by each of the coordinate axes, the processor is used to:
[0212] For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a maximum value and a minimum value of the variable of the plurality of original data under the variable represented by the coordinate axis;
[0213] The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
[0214] In an optional implementation, before generating the target visualization chart, the processor is further configured to:
[0215] According to the coordinates corresponding to the plurality of original data in the mapping coordinate system, detecting whether there are abnormal coordinates in the plurality of coordinates that exceed the value range of the variable represented by any of the coordinate axes;
[0216] If it is determined that the abnormal coordinates exist, the abnormal coordinates are corrected according to the preset maximum value and the preset minimum value corresponding to the variable represented by the target coordinate axis; wherein the target coordinate axis represents the coordinate axis whose value range of the variable is exceeded by the abnormal coordinates.
[0217] In an optional implementation manner, a data identifier for representing each of the original data is displayed in the target visualization chart, and the processor is further configured to:
[0218] Detecting whether there are multiple abnormal data identifiers with overlapping display areas from among the multiple data identifiers displayed in the target visualization chart;
[0219] If it is determined that the multiple abnormal data identifiers exist, the display positions of the multiple abnormal data identifiers in the target visualization chart are adjusted to obtain the target visualization chart after removing overlaps.
[0220] In an optional implementation, when adjusting the display positions of the multiple abnormal data identifiers in the target visualization chart, the processor is configured to:
[0221] When the number of the plurality of abnormal data identifiers is an odd number, determining a target abnormal data identifier whose display position is centered among the plurality of abnormal data identifiers;
[0222] For each other abnormal data identifier among the multiple abnormal data identifiers, determining a moving direction corresponding to the other abnormal data identifier in the target visualization chart according to a relative position relationship between the other abnormal data identifier and the target abnormal data identifier;
[0223] According to the relative distance between the other abnormal data identifier and the target abnormal data identifier and the identifier sizes corresponding to the other abnormal data identifier and the target abnormal data identifier respectively, the corresponding moving distance of the other abnormal data identifier in the target visualization chart is determined.
[0224] In an optional implementation, when adjusting the display positions of the multiple abnormal data identifiers in the target visualization chart, the processor is configured to:
[0225] When the number of the plurality of abnormal data identifiers is an even number, determining a first abnormal data identifier and a second abnormal data identifier whose display positions are centered among the plurality of abnormal data identifiers;
[0226] adjusting the distance between the first abnormal data identifier and the second abnormal data identifier according to the identifier sizes corresponding to the first abnormal data identifier and the second abnormal data identifier respectively;
[0227] For a plurality of abnormal data identifiers close to one side of the first abnormal data identifier, taking the first abnormal data identifier as the target abnormal data identifier, adjusting the display positions of the plurality of abnormal data identifiers close to one side of the first abnormal data identifier in the target visualization chart;
[0228] For multiple abnormal data identifiers close to the second abnormal data identifier, the second abnormal data identifier is used as the target abnormal data identifier, and the display positions of the multiple abnormal data identifiers close to the second abnormal data identifier in the target visualization chart are adjusted.
[0229] Through the above-mentioned computer-readable storage medium provided by the embodiment of the present application, for each coordinate axis in the target visualization chart, it is determined whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude; if they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; if they do not belong to the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; according to each coordinate axis with a length distribution and the value range of the variable represented by each coordinate axis, the mapping coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each original data in the mapping coordinate system. In this way, while maintaining the linear relationship of the original coordinate system, the present application enables data points with large differences in data magnitude to be clearly presented on the visualization chart, which is conducive to users being able to view the visualization chart more intuitively and clearly.
[0230] In an embodiment of the present application, the computer-readable storage medium can also execute other machine-readable instructions when run by the processor to execute a method for generating a visualization chart as described in other embodiments. For the specific steps and principles of the generation method, please refer to the description of the method side embodiment, which will not be repeated here.
[0231] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0232] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0233] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0234] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0235] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0236] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating a visual chart, characterized in that: The generation method comprises: For each coordinate axis in the target visualization chart, determine whether the variable values of multiple original data under the variables represented by the coordinate axis belong to the same order of magnitude; If they belong to the same order of magnitude, the length of the coordinate axis is evenly distributed according to the preset number of divisions; If they are not of the same order of magnitude, the length of the coordinate axis corresponding to each order of magnitude is determined according to the proportional coefficient configured by the user for each order of magnitude; According to the length distribution of each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, the cartographic coordinate system corresponding to the target visualization chart is determined, and the target visualization chart is generated according to the coordinates corresponding to each of the original data in the cartographic coordinate system.
2. The generation method according to claim 1, characterized in that: The step of judging whether the variable values of the plurality of original data under the variable represented by the coordinate axis are of the same order of magnitude includes: Calculate the discrete coefficients corresponding to the plurality of variable values according to the variable values of the plurality of original data under the variable represented by the coordinate axis; If the dispersion coefficient is within the target value range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis belong to the same order of magnitude; If the dispersion coefficient is outside the target numerical range, it is determined that the variable values of the plurality of original data under the variable represented by the coordinate axis do not belong to the same order of magnitude.
3. The generation method according to claim 1, characterized in that: Determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes with assigned lengths and the value range of the variable represented by each of the coordinate axes includes: For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a preset maximum value and a preset minimum value corresponding to the variable represented by the coordinate axis; The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
4. The generation method according to claim 1, characterized in that: Determining the mapping coordinate system corresponding to the target visualization chart according to each of the coordinate axes with assigned lengths and the value range of the variable represented by each of the coordinate axes also includes: For each of the coordinate axes, determining a value range of the variable represented by the coordinate axis according to a maximum value and a minimum value of the variable of the plurality of original data under the variable represented by the coordinate axis; The mapping coordinate system corresponding to the target visualization chart is determined according to the coordinate axis with the allocated length and the value range of the variable represented by the coordinate axis.
5. The generation method according to claim 3, characterized in that: Before generating the target visualization chart, the generating method further includes: According to the coordinates corresponding to the plurality of original data in the mapping coordinate system, detecting whether there are abnormal coordinates in the plurality of coordinates that exceed the value range of the variable represented by any of the coordinate axes; If it is determined that the abnormal coordinates exist, the abnormal coordinates are corrected according to the preset maximum value and the preset minimum value corresponding to the variable represented by the target coordinate axis; wherein the target coordinate axis represents the coordinate axis whose value range of the variable is exceeded by the abnormal coordinates.
6. The generation method according to claim 1, characterized in that: A data identifier for representing each of the original data is displayed in the target visualization chart, and the generating method further includes: Detecting whether there are multiple abnormal data identifiers with overlapping display areas from among the multiple data identifiers displayed in the target visualization chart; If it is determined that the multiple abnormal data identifiers exist, the display positions of the multiple abnormal data identifiers in the target visualization chart are adjusted to obtain the target visualization chart after removing overlaps.
7. The generation method according to claim 6, characterized in that: The adjusting the display positions of the plurality of abnormal data identifiers in the target visualization chart includes: When the number of the plurality of abnormal data identifiers is an odd number, determining a target abnormal data identifier whose display position is centered among the plurality of abnormal data identifiers; For each other abnormal data identifier among the multiple abnormal data identifiers, determining a moving direction corresponding to the other abnormal data identifier in the target visualization chart according to a relative position relationship between the other abnormal data identifier and the target abnormal data identifier; According to the relative distance between the other abnormal data identifier and the target abnormal data identifier and the identifier sizes corresponding to the other abnormal data identifier and the target abnormal data identifier respectively, the corresponding moving distance of the other abnormal data identifier in the target visualization chart is determined.
8. The generation method according to claim 7, characterized in that: The adjusting the display positions of the plurality of abnormal data identifiers in the target visualization chart includes: When the number of the plurality of abnormal data identifiers is an even number, determining a first abnormal data identifier and a second abnormal data identifier whose display positions are centered among the plurality of abnormal data identifiers; adjusting the distance between the first abnormal data identifier and the second abnormal data identifier according to the identifier sizes corresponding to the first abnormal data identifier and the second abnormal data identifier respectively; For a plurality of abnormal data identifiers close to one side of the first abnormal data identifier, taking the first abnormal data identifier as the target abnormal data identifier, adjusting the display positions of the plurality of abnormal data identifiers close to one side of the first abnormal data identifier in the target visualization chart; For multiple abnormal data identifiers close to the second abnormal data identifier, the second abnormal data identifier is used as the target abnormal data identifier, and the display positions of the multiple abnormal data identifiers close to the second abnormal data identifier in the target visualization chart are adjusted.
9. A device for generating a visual chart, characterized in that: The generating device comprises: A judgment module, for judging, for each coordinate axis in the target visualization chart, whether the variable values of multiple original data under the variable represented by the coordinate axis belong to the same order of magnitude; A first allocation module, for evenly allocating the length of the coordinate axis according to a preset number of divisions if the coordinates are of the same order of magnitude; The second allocation module is used to determine the length of the coordinate axis corresponding to each order of magnitude according to the proportional coefficient configured by the user for each order of magnitude if they do not belong to the same order of magnitude; A mapping module is used to determine the mapping coordinate system corresponding to the target visualization chart according to the length assigned to each of the coordinate axes and the value range of the variables represented by each of the coordinate axes, and to generate the target visualization chart according to the coordinates corresponding to each of the original data in the mapping coordinate system.
10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for generating a visualization chart as described in any one of claims 1 to 8 are performed.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a visualization chart as described in any one of claims 1 to 8 are executed.