Graph annotation method, model training method, electronic device and storage medium
By using the target chart recommendation model and graphical user interface in the data visualization tool, the existing tool configuration is complicated and interaction is not intuitive, and intelligent annotation and efficient data communication are achieved.
Patent Information
- Application Number
- CN202411709591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Existing data visualization tools are cumbersome and unintuitive in configuration and interaction, limiting the user experience and custom labeling efficiency.
By obtaining the data characteristics and chart types of the input data set, using the target chart recommendation model to analyze and generate adapted initial annotation results, providing an intuitive graphical user interface for interaction.
It realizes intelligent and fast chart annotation, improves the dissemination efficiency of data insights and the quality of data visualization content, and reduces user manual adjustment time and labor costs.
Smart Images

Figure CN119202239B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data visualization and chart annotation, and in particular to a chart annotation method, a model training method, an electronic device and a storage medium. Background Art
[0002] Data visualization technology is an indispensable part of modern data analysis. It can present complex data to users in an intuitive and easy-to-understand way, helping users quickly gain data insights. As an important tool in data visualization technology, the chart annotation function can further explain data relationships, highlight key information, and improve the efficiency of data insight dissemination by adding graphic elements such as text, arrows, and highlighted areas to the chart.
[0003] Currently, in the field of data visualization technology, existing data visualization tools such as Tableau and Dundas BI provide chart annotation functions, which support users to add additional explanatory information or visual emphasis to charts. However, the configuration process of these data visualization tools is cumbersome, requiring users to have certain programming knowledge to fully utilize them, and lacks intuitive interactive methods for users to directly modify chart annotations. Therefore, current data visualization tools not only limit the user experience of non-professional users, but also increase the configuration burden of users when customizing annotations, reducing user work efficiency.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a chart annotation method, a model training method, an electronic device and a storage medium to at least solve the technical problems in the related art that the configuration process of data visualization tools is cumbersome and the interaction method is not intuitive enough.
[0006] According to one aspect of an embodiment of the present application, a chart annotation method is provided, including: obtaining data features of an input data set and a selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; using a target chart recommendation model to analyze the data features and the chart type to obtain an annotation object; and generating an initial annotation result that is adapted to the chart type based on the annotation properties of the annotation object, wherein the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0007] According to another aspect of an embodiment of the present application, a model training method is also provided, including: obtaining training data, wherein the training data includes: matching sample data features and sample chart types, the sample data features are used to determine the statistical object, and the sample chart type is used to determine the visual chart display method; using the training data to train the initial chart recommendation model to obtain a predicted object; calculating the target loss based on the predicted object and the real object; updating the model parameters of the initial chart recommendation model based on the target loss to obtain a target chart recommendation model, wherein the target chart recommendation model is used to analyze the data features and the chart type to obtain a labeled object, and the labeling attributes of the labeled object are used to generate an initial labeling result that is compatible with the chart type, and the initial labeling result is used to recommend the labeling form corresponding to the labeled object.
[0008] According to another aspect of an embodiment of the present application, a chart annotation method is also provided, including: obtaining data features of a commodity sales data set and a selected commodity sales chart type, wherein the data features are used to determine the statistical objects of the commodity sales data, and the commodity sales chart type is used to determine the visual chart display method corresponding to the commodity sales data set; using a target chart recommendation model to analyze the data features and the commodity sales chart type to obtain annotated commodities; generating a commodity sales annotation result that is compatible with the commodity sales chart type based on the annotation attributes of the annotated commodities, wherein the commodity sales annotation result is used to recommend the annotation form corresponding to the annotated commodities.
[0009] According to another aspect of an embodiment of the present application, a chart annotation method is also provided, including: obtaining a chart annotation request through a first application programming interface, wherein the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; returning a chart annotation response through a second application programming interface, wherein the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation properties of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0010] According to another aspect of an embodiment of the present application, a chart annotation method is also provided, which provides a graphical user interface through a terminal device, including: in response to a first control operation performed on the graphical user interface, obtaining data features of an input data set and a selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; in response to a second control operation performed on the graphical user interface, generating an initial annotation result adapted to the chart type, wherein the initial annotation result is generated based on the annotation attributes of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object; and displaying the initial annotation result in the graphical user interface.
[0011] According to another aspect of an embodiment of the present application, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein when the program is running, any one of the above-mentioned chart annotation methods is executed.
[0012] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned chart annotation methods.
[0013] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a computer program, which implements any one of the above-mentioned chart annotation methods when executed by a processor.
[0014] In an embodiment of the present application, by obtaining data features of an input data set and a selected chart type, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set, and then a target chart recommendation model is used to analyze the data features and the chart type to obtain a labeled object, and finally an initial labeling result adapted to the chart type is generated based on the labeling attributes of the labeled object, and the initial labeling result is used to recommend the labeling form corresponding to the labeled object, thereby achieving the purpose of intelligent and rapid chart labeling, thereby achieving a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the labor cost. The technical effect, thereby solving the technical problems of cumbersome configuration process and less intuitive interaction method of data visualization tools in related technologies.
[0015] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a chart annotation method according to an embodiment of the present application;
[0018] Figure 2 is a flow chart of a diagram annotation method according to an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of the classification of chart annotation types according to an embodiment of the present application;
[0020] Figure 4 is a schematic diagram of preset annotation types according to an embodiment of the present application;
[0021] Figure 5 It is a schematic diagram of the effect of the chart annotation function according to an embodiment of the present application;
[0022] Figure 6 is a flow chart of another diagram marking method according to an embodiment of the present application;
[0023] Figure 7 is a flow chart of another diagram marking method according to an embodiment of the present application;
[0024] Figure 8 is a flow chart of another diagram marking method according to an embodiment of the present application;
[0025] Fig. 9 is a structural schematic diagram of a diagram marking device according to an embodiment of the present application;
[0026] Fig.10 is a structural schematic diagram of another diagram marking device according to an embodiment of the present application;
[0027] Fig.11 is a structural schematic diagram of another diagram marking device according to an embodiment of the present application;
[0028] Fig.12 is a structural schematic diagram of another diagram marking device according to an embodiment of the present application;
[0029] Fig.13 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] It is understandable that the annotation function in data visualization charts can effectively illustrate data relationships and convey data insights through text and various graphic elements. It is a powerful tool for visual data expression.
[0033] In current data visualization tools, chart annotation can increase the expressiveness and narrative ability of charts in the following three aspects: 1. Provide more detailed explanations for data insights; 2. Highlight specific data or value ranges; 3. Increase the beauty of charts. However, although the function is important, the configuration process of current data visualization tools is cumbersome and not intuitive, thus limiting the efficiency and creativity of users.
[0034] For example, although the Tableau tool provides a series of powerful data visualization functions, its advanced annotation features require users to have certain programming knowledge to fully utilize them. There is no intuitive interactive method for direct modification, nor is there a function that can automatically recommend and generate annotations based on chart features.
[0035] Although the Dundas BI tool supports basic chart annotation functions and annotation forms, the supported scope and types are relatively limited, the operation links are relatively complex, and it does not support recommendation generation.
[0036] The data visualization tools in the related art have the following defects.
[0037] Defect 1: The configuration process is cumbersome and not intuitive enough, which takes a long time for users to configure and limits their efficiency and creativity.
[0038] Defect 2: Does not support recommendation generation.
[0039] With respect to the above-mentioned defects, no effective solution has been proposed before the present application.
[0040] According to an embodiment of the present application, a diagram annotation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a chart annotation method according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (shown in the figure as 102a, 102b, ..., 102n) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (Field-Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (Input / Output Interface, I / O interface), a universal serial bus (Universal Serial Bus, one of the ports of the BUS bus is included), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0042] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0043] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the diagram annotation method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned diagram annotation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0044] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0045] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0046] Under the above operating environment, this application provides Figure 2 The diagram annotation method shown. Figure 2 is a flow chart of a diagram annotation method according to an embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0047] Step S21, obtaining data features of the input data set and the selected chart type, wherein the data features are used to determine the statistical object of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set;
[0048] Step S22, using the target chart recommendation model to analyze the data features and chart types to obtain a labeled object;
[0049] Step S23: generating an initial annotation result adapted to the chart type based on the annotation attributes of the annotation object, wherein the initial annotation result is used to recommend an annotation form corresponding to the annotation object.
[0050] In the embodiments of the present application, the input data set can be understood as a data set uploaded or specified by the user, which is input into the target chart recommendation model for analysis. For example, the input data set can come from various industries and scenarios, including finance, medical care, education, scientific research, social media, e-commerce, etc., which are not limited here.
[0051] Data features are used to determine the statistical objects of the input data set. Statistical objects can be understood as specific parts or attributes of the data set that need to be emphasized, analyzed or visualized. Exemplarily, statistical objects include but are not limited to the distribution of chart data, trends, outliers, mean values, medians, standard deviations, maximum and minimum values, correlations between data, etc. of the input data set, which are not limited here. By analyzing the data features of the data set, it is possible to determine which data points, data ranges or data relationships are critical, thereby deciding what to mark on the chart. Exemplarily, if there are outliers in the data set, by analyzing and obtaining the outliers, the outliers can be marked in the visual chart later.
[0052] The chart type is used to determine the visual chart display method corresponding to the input data set, which can be understood as the visual chart display method selected by the user for the input data set. Exemplarily, chart types include area charts, density charts, pie charts, line charts, bar charts, scatter charts, heatmaps, etc., which are not limited here. Each chart type has a corresponding display method and applicable scenario, which can express the statistical objects and relationships of data in a specific visual form.
[0053] By obtaining the data features of the input data set and the selected chart type, the intrinsic characteristics of the data set and the chart type selected by the user are taken into consideration, thereby facilitating the subsequent intelligent generation or recommendation of chart annotations.
[0054] After obtaining the data features of the input data set and the selected chart type, the target chart recommendation model is used to analyze the data features and the chart type to obtain the labeled object. The target chart recommendation model can be understood as a pre-trained model, which can recommend a visualization configuration suitable for the current data and chart based on the data features of the data set and the chart type selected by the user. Exemplarily, the target chart recommendation model can be a large model or other deep learning model, which is not limited here.
[0055] The annotation object can be understood as the data in the data set that needs to be annotated, usually the data in the data set that is valuable or that the user may be interested in. The annotation object can be a specific data point, data range, or statistical value in the data set, such as the maximum value, minimum value, outlier, central tendency, etc., which is not limited here.
[0056] It can be understood that the target chart recommendation model is used to analyze data features and chart types to obtain annotation objects. The target chart recommendation model can intelligently select or generate annotation objects based on data features and chart types, thereby enhancing the expressiveness of the chart and the user's data understanding ability in a more intelligent and efficient manner.
[0057] After obtaining the annotated object, an initial annotation result adapted to the chart type is generated based on the annotation attributes of the annotated object. The annotation attributes of the annotated object are used to reflect the display details of the annotated object on the chart, and the expression form of the annotated object in the chart can be determined through the annotation attributes. Exemplarily, the annotation attributes may include the data value, position, size, text description, arrow direction, color mark, shape, etc. of the annotated object, which are not limited here.
[0058] The initial annotation result is used to recommend the annotation style corresponding to the annotation object, which can be understood as automatically recommending the annotation style that matches and is more suitable for the annotation object, thereby intuitively displaying the annotation method of the annotation object on the chart.
[0059] It can be understood that generating an initial annotation result that matches the chart type based on the annotation attributes of the annotation object can be understood as generating an annotation form that matches the chart type selected by the user based on the annotation attributes of the annotation object, and recommending the initial annotation result to the user. As a result, the user can intuitively see the key information annotated on the chart based on the initial annotation result, thereby helping the user to better understand the data in the data set. In addition, it can also reduce the user's manual adjustment time and reduce labor costs. Therefore, it not only saves the user's manual configuration time, but also improves the accuracy and aesthetics of chart annotation.
[0060] In the embodiment of the present application, by obtaining the data features of the input data set and the selected chart type, the pre-trained target chart recommendation model is used to analyze the data features and the chart type to obtain the annotation object, and finally the initial annotation result adapted to the chart type is generated based on the annotation attribute of the annotation object, so as to recommend the initial annotation result to the user. In this way, more suitable chart display methods and annotation forms can be intelligently recommended, and key information or statistical objects in the data set can be highlighted, so as to convey data insights more intuitively and accurately, improve the quality and attractiveness of data visualization content, and reduce the time of manual adjustment by users and reduce labor costs.
[0061] The above-mentioned chart annotation method provided in the embodiment of the present application can be applied to, but is not limited to, application scenarios involving chart annotation of data sets in the fields of e-commerce services, educational services, legal services, medical services, conference services, social network services, financial product services, logistics services and navigation services, for example: chart annotation of e-commerce service data sets, chart annotation of educational service data sets, chart annotation of legal service data sets, etc., which are not limited here.
[0062] By adopting the embodiment of the present application, the data features of the input data set and the selected chart type are obtained, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set, and then the target chart recommendation model is used to analyze the data features and the chart type to obtain the labeled object, and finally, based on the labeling attributes of the labeled object, an initial labeling result suitable for the chart type is generated, and the initial labeling result is used to recommend the labeling form corresponding to the labeled object, thereby achieving the purpose of intelligent and rapid chart labeling, thereby realizing more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of cumbersome configuration process of data visualization tools in related technologies and insufficiently intuitive interaction methods.
[0063] In an optional embodiment, the chart annotation method further includes the following method steps:
[0064] Step S241, classifying multiple annotation forms to obtain a first classification result;
[0065] Step S242, classifying the multiple chart types based on the graphic representation types applied in the multiple chart types to obtain a second classification result;
[0066] Step S243, matching the first classification result with the second classification result to obtain a labeled classification result, wherein the labeled classification result is used to provide data support for obtaining an initial labeling result.
[0067] In an embodiment of the present application, when annotating a chart, multiple annotation forms can also be classified to obtain a first classification result. It can be understood that the embodiment of the present application constructs a labeling classification system, by classifying the annotation forms, the annotation forms are divided into multiple types, so as to obtain a first classification result. Exemplarily, the annotation forms can be divided into text annotation, line annotation, area annotation, scattered point annotation, and highlight annotation, etc., which are not limited here. Classification can be carried out based on the visual features of the annotation, the applicable data type, the information category expressed, etc., to provide a basis for subsequent recommendations and matching.
[0068] In an embodiment of the present application, when annotating a chart, multiple chart types can also be classified based on the graphic representation type applied in the multiple chart types to obtain a second classification result. It can be understood that the embodiment of the present application constructs a chart classification system, and the chart types are divided into multiple types according to the graphic representation type applied in the chart, so as to obtain a second classification result. Exemplarily, the chart types can be classified into area charts, bar charts, scatter charts, and line charts, etc., which are not limited here. Classification can be performed by using what kind of graphic elements (such as columns, lines, and sectors), which helps to identify which chart types are more suitable for using specific annotation forms.
[0069] Afterwards, the first classification result is matched with the second classification result to obtain the labeling classification result, which can be understood as matching multiple labeling forms with multiple chart types to ensure that the recommended labeling form is more suitable for the current chart type, thereby obtaining the labeling classification result. Among them, the labeling classification result is used to provide data support for obtaining the initial labeling result. Exemplarily, when matching multiple labeling forms with multiple chart types, a set of rules for describing the most suitable labeling forms for different chart types can be predefined, so as to match according to the formulated rules. For example, for a time series line chart, it may be recommended to use arrows and text annotations to emphasize the data changes at a specific time point; for a scatter plot, it may be recommended to use color coding and shape coding to distinguish different data classifications, and then identify the chart type selected by the user, and select the most appropriate labeling type from the labeling form library according to the predefined rules, so as to ensure that the labeling form matches the display method of the data. Alternatively, a machine learning model can be trained to match multiple labeling forms with multiple chart types using a machine learning model. For example, a large number of chart samples are collected, each sample containing information such as chart type, data features, and labeling form. Then, supervised learning methods are used to train a classification model that can predict the most appropriate annotation form based on the input chart type and data features. Finally, in actual applications, the model receives the type and data features of the current chart as input and outputs the recommended annotation form. It is understandable that there may be other matching methods, which are not limited here.
[0070] It can be seen that this matching process improves the consistency and relevance between annotations and charts, making the information on the chart more accurate and efficient. In addition, this intelligent recommendation based on classification and matching avoids users from blindly choosing when they are unfamiliar with the information, reduces the possibility of misconfiguration, and improves the accuracy and reliability of recommendations.
[0071] In an optional embodiment, the first classification result includes any of the following: text annotation, line annotation, area annotation, scatter point annotation and highlight annotation, wherein text annotation is used to provide a text description for the annotated object, line annotation is used to prompt the coordinate value or data change trend corresponding to the annotated object, area annotation is used to draw attention to the annotated object through background area changes, scatter point annotation is used to draw attention to the annotated object through specific point symbols, and highlight annotation is used to change the graphic representation of the annotated object.
[0072] In the embodiment of the present application, the first classification result may include text annotations, line annotations, area annotations, point annotations, highlights, etc., which are not limited here.
[0073] Furthermore, text annotations are used to provide text descriptions for the annotated objects, which can be understood as text annotations used to indicate the detailed values of chart elements, provide additional contextual information or editorial comments, thereby enhancing the explanatory power and readability of the chart. Exemplarily, text annotations can be placed next to line annotations to indicate the attribute values of the lines. In addition, considering the wide range of expressive power of text annotations, text annotations can be used as an auxiliary in combination with other annotation types. For example, when generating a line annotation, an additional text annotation can be added to explain the attribute value corresponding to the line. Text annotations can also be generated as independent annotations in charts, so they can be regarded as a special case of point annotations. The visual attributes of text annotations include fonts, alignment, fill, background color, and shape. It can be seen that text annotations can be used as auxiliary annotations in combination with other types, or they can be generated as independent annotations.
[0074] Line annotation is used to indicate the coordinate value or data change trend corresponding to the annotated object. It can be understood that line annotation can highlight the position of the annotated target, such as the coordinate value, through line or arc elements, thereby guiding the user to pay attention to specific data values. For example, taking a Cartesian coordinate system chart as an example, the line annotations in the chart are usually vertical or horizontal lines to guide the user to pay attention to the corresponding x or y values. In addition, line annotations can also be oblique line annotations, which are usually used to indicate the trend of a data series. The visual attributes of line annotations include stroke color, line style, line width, and fill, etc. It can be seen that line annotations are suitable for most chart types, but are generally not suitable for charts that already use lines as the main graphic representation.
[0075] Area annotation is used to draw attention to the annotated object by changing the background area. It can be understood that area annotation can attract attention and highlight the importance of the selected data range by filling the background area on the chart, and can be compared with other external elements of the chart. For example, in a line chart, a specific data range can be highlighted with background fill. The visual attributes of area annotation include fill color, boundary line style, etc. It can be seen that area annotation is suitable for various charts, but it is generally not suitable for charts such as pie charts and heat maps that already use areas as graphical representations.
[0076] Scatter annotation is used to draw attention to the annotated object through specific point symbols. It can be understood that scatter annotation can annotate specific points in the chart through symbols, allowing users to notice special data points or emphasize data locations. The visual attributes of scatter annotation include the shape, size, fill color, and boundary lines of the points. It can be seen that scatter charts or bubble charts are usually not suitable for this type of scatter annotation.
[0077] Highlight annotation is used to change the graphical representation of the annotated object. It can be understood that highlight annotation can directly change the visual properties of the graphical representation, and is used to emphasize or weaken the importance of specific data, and instantly feedback the visual expression of the data. For example, in a bar chart, highlight annotation can be used to change the color or transparency of a specific column to emphasize its value. The visual properties of highlight annotation depend on the properties of the graphic elements in the chart, such as color, size, transparency, etc. It can be seen that highlight annotation is generally applicable to all chart types, and can achieve the purpose of annotation by directly manipulating chart elements.
[0078] It is understandable that the first classification result may also include regression line annotations, trendline annotations, callout box annotations, and timeline annotations, etc., which are not limited here.
[0079] Among them, regression line annotation is usually used in scatter plots or bubble charts to represent the relationship or trend between variables by fitting a line. This line can be a linear regression line, a polynomial regression line, or other types of regression model results, which helps to reveal the potential correlation between variables, such as the relationship between sales volume and price.
[0080] Trendlines are often used in line graphs of time series data, such as sales over time. Unlike regression lines, trendlines may use smoother fitting methods, such as moving averages, to filter out short-term fluctuations and highlight the long-term trend of the data. Trendline annotations help identify cyclical, seasonal, or long-term trends in data, which is very useful for predicting future trends and performing time series analysis.
[0081] A callout is a type of callout used to highlight a specific area or data point in a chart. It usually contains an arrow pointing to the area or data point and a text box containing detailed explanation information. Callouts can be used on any type of chart, especially when you need to emphasize or explain a detail in the chart.
[0082] In an optional embodiment, the second classification result includes any of the following: an area chart, a bar chart, a scatter chart, and a line chart, wherein the area chart is used to display data change trends through area visualization, the bar chart is used to compare data volumes in different categories or time periods, the scatter chart is used to display the relationship between different variables, and the line chart is used to display data change trends through line visualization.
[0083] In the embodiment of the present application, the second classification result may include an area chart, a bar chart, a point chart, a line chart, etc., which are not limited here.
[0084] Furthermore, area charts are used to display data trends through area visualization, showing the trend of data changes over time or other continuous variables by filling the area between the connection points. Area charts can clearly show the changes in data volume and are suitable for representing the cumulative effect or trend of data over a period of time.
[0085] Bar charts are used to compare the amount of data in different categories or time periods. The height or length of the bar is used to represent the size of the value. The bar can be vertical (i.e. vertical bar chart) or horizontal (i.e. horizontal bar chart). Bar charts are suitable for comparing the amount of data in different categories or time points. Bar charts are intuitive and easy to understand, suitable for showing the distribution of data and comparing the values between different groups.
[0086] Scatter charts are used to show the relationship between different variables by plotting data points on a two-dimensional coordinate system. Scatter charts are suitable for exploring the potential correlation between variables and the pattern of data distribution.
[0087] Line charts are used to visualize data trends through lines, and to show the trend of data changes over time or other continuous variables by connecting data points. Line charts can clearly show the continuous changes of data and are suitable for tracking the dynamic changes of data series and showing long-term trends.
[0088] It is understandable that the second classification result may also include a pie chart, a radar chart, a histogram, a matrix chart, etc., which are not limited here.
[0089] Among them, a pie chart is a chart used to show the proportion of data components. The pie chart is divided into multiple sector areas, and the size of each sector represents the proportion of a category or data point in the data set. Pie charts are suitable for showing the proportion of each part of a whole, especially for scenarios where there are not many data categories and the proportion difference needs to be intuitively seen. However, when there are too many categories or the proportion difference is not obvious, pie charts may not be the best choice because it is difficult to visually distinguish small differences or locate specific sectors.
[0090] Radar chart, also known as spider web chart or polar coordinate chart, is a chart used to describe multidimensional data. Radar chart consists of a central point and multiple axes around it. Each axis represents a variable or dimension, and the values of the axis radiate outward from the center. Data points are marked on each axis according to their values, and then these points are connected by lines to form a polygon. Radar chart is suitable for comparing a set of data under different variables or dimensions. By observing the shape and size of the polygon, the differences and advantages of different data sets in each dimension can be intuitively seen.
[0091] A histogram is a graph used to display the distribution of continuous data. It divides the data range into a series of evenly spaced "intervals" (or "boxes") and then uses the height of the column to represent the number of data points in each interval. It is suitable for displaying the frequency distribution of data.
[0092] A matrix plot is a chart used to display many-to-many relationships. It consists of a two-dimensional matrix. The rows and columns of the matrix represent different data sets or variables. The value or color coding in each cell represents the strength of the relationship between the row and column variables. Matrix plots are suitable for the visualization of large data sets, especially for displaying the correlation or similarity between features in the fields of data mining and machine learning.
[0093] In an optional embodiment, in step S243, matching the first classification result with the second classification result to obtain a labeled classification result includes the following method steps:
[0094] Step S2431, determining a labeling symbol corresponding to the first classification result and a visual representation corresponding to the second classification result;
[0095] Step S2432: Based on the similarity between the annotation symbol and the visual representation, the first classification result and the second classification result are matched to obtain the annotation classification result.
[0096] In an embodiment of the present application, when considering providing annotation types for different types of charts, annotation types whose annotation symbols are similar to the visual representation of the chart itself will be excluded. Therefore, when matching the first classification result with the second classification result to obtain the annotation classification result, the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result can be determined first. It can be understood as determining the annotation symbols unique to each annotation form, such as arrows, text labels, color highlights, point symbols, area highlights, etc. At the same time, the visual representation corresponding to each chart type is determined. For example, the visual representation of a line chart may include lines, data points, trends, etc. The visualization features determine how the chart presents data and the relationship between data.
[0097] Then, based on the similarity between the annotation symbol and the visual representation, the first classification result is matched with the second classification result to obtain the annotation classification result. It can be understood as calculating the similarity between the annotation symbol and the visual representation of the chart type, so as to evaluate from multiple dimensions based on the similarity, such as the visual consistency between the annotation and the chart (e.g., the similarity between the point annotation and the data point on the point chart), the applicability of the annotation (e.g., the applicability of the trend line annotation on the line chart), and the effect of enhancing the chart information (e.g., the effect of the arrow annotation on the chart showing the data flow). In this way, the first classification result is matched with the second classification result, and finally the annotation classification result is generated based on the matching result. The annotation classification result includes a more recommended annotation form for the chart type, which serves as the basis for the subsequent generation of the initial annotation result, ensuring that the annotation can both highlight the data characteristics and be consistent with the chart type, thereby enhancing the expression effect of the chart and the user's understanding.
[0098] Exemplarily, when calculating the similarity between the annotation symbol and the visual representation of the chart type, the similarity calculation can be performed based on visual characteristics, such as extracting key visual features such as shape, color, size, position, direction, etc. from the annotation symbol and the visual representation of the chart, which are not limited here. Then the visual features are converted into numerical representations for easy calculation, such as the color can be represented by red, green, blue (Red, Green, Blue, RGB) or hue, saturation, brightness (Hue, Saturation, Value, HSV) numerical representation, and the position can be represented by coordinate values, which are not limited here. Finally, a distance measurement method (such as Euclidean distance, Manhattan distance, cosine similarity, etc.) is used to calculate the difference or similarity between the features of the annotation symbol and the features of the visual representation of the chart. It can be understood that the above example is only one way to calculate the similarity, and the similarity can also be calculated by other methods, such as information contribution evaluation, user preference and behavior analysis, and context relevance evaluation, which are not limited here.
[0099] Exemplarily, after calculating the similarity, it can be evaluated from multiple dimensions based on the similarity, and by setting a weight for the evaluation result of each dimension, the weight reflects the importance of the dimension in the matching process. Multiply the score of each dimension by its weight, and then sum them to get a comprehensive score. Compare the size relationship between the comprehensive score and the preset threshold. Only when the comprehensive score reaches or exceeds this preset threshold, the annotation symbol is considered to match the chart type. It is understandable that the setting of the preset threshold can be adjusted according to business needs, the complexity of the chart, user feedback, etc., and is not limited here.
[0100] In an optional embodiment, the chart annotation method further includes the following method steps:
[0101] Step S251, providing a chart editing interface through a terminal device;
[0102] Step S252, in response to the chart editing operation performed on the chart editing interface, adding new annotation content to the initial annotation result to obtain a target annotation result;
[0103] Step S253, displaying the target labeling result in the chart editing interface.
[0104] In the embodiment of the present application, considering that the user may make further adjustments to the generated initial annotation results, an application can be developed based on the chart annotation method proposed in the present application to provide a chart editing interface through a terminal device.
[0105] The chart editing interface is used to display the chart and allows simple style configuration changes to the chart, that is, the chart editing interface can be understood as a platform for users to interact with the system that applies the chart annotation method. Users can view, edit and create charts on this interface. The chart editing interface can clearly display charts and annotations, and provide a toolbar or menu for users to select and apply different annotation forms.
[0106] In response to the chart editing operation performed on the chart editing interface, new annotation content is added to the initial annotation result to obtain the target annotation result. Among them, the chart editing operation can be understood as the operation performed by the user on the chart editing interface. Exemplarily, the chart editing operation can include click, drag, double-click and other operations, which are not limited here. It can be understood that if the user has further modification requirements for the initial annotation result, the chart editing operation can be performed on the chart editing interface. After receiving the user's input, new annotation content will be added to the initial annotation result based on the user's chart editing operation, and finally a target annotation result containing annotations manually added or adjusted by the user is formed. Exemplarily, the user can add new annotations by clicking, dragging, etc., or using special tools, such as adding text descriptions to specific data points, drawing arrows pointing to a trend, or highlighting an area with color.
[0107] After obtaining the target annotation results, the target annotation results can be displayed in the chart editing interface so that users can instantly see the effect feedback, including changes in visual attributes such as the annotation position, size, and color.
[0108] It can be seen that users can use the intelligently recommended annotations (i.e., initial annotation results) as a starting point in an intuitive chart editing interface to perform personalized annotation editing to create more accurate and explanatory data visualization charts. This interactive editing process not only improves the efficiency of chart production, but also enhances the readability of charts and user participation.
[0109] In an optional embodiment, the chart editing operation includes at least one of the following:
[0110] Generate point annotations through click-to-interaction operations;
[0111] Generate horizontal or vertical line annotations by pressing and sliding along the coordinate axis interactively;
[0112] Create line or area annotations using a press and slide interaction.
[0113] In an embodiment of the present application, the chart editing operation may include generating at least one of point annotations through a click interaction operation, generating horizontal or vertical line annotations through a press and slide interaction operation along the coordinate axis, and generating line annotations or area annotations through a press and slide interaction operation.
[0114] Among them, the chart editing operation can generate point annotations through click interaction operations. When the user clicks on any data point in the chart, the system will recognize this operation as a focus selection for a certain point or data item. A point annotation is then generated at the clicked position, which may be a text label, symbol mark, or visual highlight to highlight the data point or add explanatory information to it.
[0115] It is understandable that the generated point annotations are interactive, and users can adjust their positions by dragging them to make them fit the data points more accurately or better meet the visual layout requirements. The chart editing operation is simple and intuitive, and is very suitable for occasions where one or more specific data points in the chart need to be annotated and explained immediately.
[0116] Chart editing operations can also generate horizontal or vertical line annotations for interactive operations such as pressing and sliding along the coordinate axis. When the user presses and slides on the coordinate axis of the chart, the system generates horizontal or vertical line annotations by identifying the direction and range of the operation. For example, if the user presses and slides on the X-axis, the system will generate a vertical line whose X-coordinate value is the same as the X-coordinate value of the pressed position. This line may run through the entire Y-axis range of the chart to mark or compare data values at a specific moment. Correspondingly, performing the same operation on the Y-axis will generate a horizontal line for comparing the performance of different data series at a specific value. This chart editing operation allows users to quickly generate annotation lines for data comparison or trend analysis through intuitive gestures.
[0117] Chart editing operations can also generate line or area annotations for press-and-swipe interactions. Users press and slide on the main visualization area of the chart (such as data points, lines, or areas), and the system tracks this trajectory to generate line or area annotations. The first press and final slide positions determine the range of the annotation. After the slide operation, the user interface will pop up an option menu, allowing the user to choose whether to generate a line annotation connecting two points or to generate an area annotation with the two points as the diagonal line. For line charts or scatter charts, this chart editing operation can quickly generate oblique line annotations to emphasize data trends or associations; for area charts, this chart editing operation can generate area annotations that highlight specific data distributions. In polar coordinate charts, this chart editing operation is also applicable. The system automatically identifies the trajectory and generates the corresponding arc annotations, making this chart editing operation not only limited to Cartesian coordinate systems, but also applicable to a wider range of chart types.
[0118] In an optional embodiment, the chart annotation method further includes the following method steps:
[0119] Step S261, providing a custom style configuration panel and a graphical user interface adapted to the custom style configuration panel through a terminal device;
[0120] Step S262, in response to the style configuration operation on the custom style configuration panel, custom configure the annotation attributes of the initial annotation result to obtain the target annotation result;
[0121] Step S263: preview the target annotation result in the graphical user interface.
[0122] In the embodiment of the present application, the terminal device may also provide a custom style configuration panel and a graphical user interface adapted to the custom style configuration panel. The custom style configuration panel may be understood as a user interface component for adjusting the chart annotation style (such as font, color, size, shape, etc.), including a series of sliders, drop-down menus, color selectors and other controls, allowing the user to fine-tune the visual attributes of the annotation.
[0123] The graphical user interface adapted by the custom style configuration panel can be understood as the integration of the configuration panel and the main chart editing interface, which can ensure that when users adjust the annotation style, they can clearly see the position and effect of the annotation on the chart.
[0124] In response to the style configuration operation on the custom style configuration panel, the annotation properties of the initial annotation result are customized to obtain the target annotation result. It can be understood that when the user performs style configuration operations in the custom style configuration panel, for example, changing the annotation text color, adjusting the annotation position, changing the shape of the arrow, etc., the system will respond to these operations in real time, and immediately adjust the style of the initial annotation result on the chart to generate the target annotation result. It can be understood that this application allows users to make fine adjustments based on intelligent recommendations, including the position, size, color, etc. of the annotation, and users can freely choose the annotation properties that need to be modified for personalized configuration, allowing users to perform deeper customization based on their aesthetic preferences or data expression needs to ensure that the annotations on the chart are both beautiful and targeted.
[0125] Finally, the target annotation result is previewed in the graphical user interface, that is, the final visual effect of the annotation with the user-defined style applied on the chart, so that users can instantly view the impact of the style change on the overall visual effect of the chart and ensure that the annotation modification is in line with expectations.
[0126] In an optional embodiment, the chart annotation method further includes the following method steps:
[0127] Step S271, accessing the extended annotation service via a reserved application programming interface;
[0128] Step S272: based on the extended annotation classification provided by the extended annotation service, the annotation classification result is updated.
[0129] In an embodiment of the present application, the extended annotation service can also be accessed through a reserved application programming interface. Through the reserved application programming interface (API), third-party service access can be facilitated, and additional annotation types and styles can be introduced into the system, thereby enhancing the expressive power of the chart and the user's creative flexibility, as well as enhancing the scalability and adaptability of the system.
[0130] After that, based on the extended annotation classification provided by the extended annotation service, the annotation classification results are updated. It can be understood that the system has successfully connected to the extended annotation service, and the additional annotation classification provided in the service can be used to update and enrich the annotation results. Based on the original annotation types, the system will integrate these new annotation types into the existing annotation classification results to provide users with more annotation options, such as adding new annotation types / new chart types, so that chart annotations can better match the user's specific needs and data characteristics, improving the customization level and expression effect of the chart.
[0131] In an optional embodiment, in step S23, generating an initial annotation result adapted to the chart type based on the annotation attribute of the annotation object includes the following method steps:
[0132] Step S231, determining the annotation attributes of the annotation object, wherein the annotation attributes include: annotation type and annotation quantity;
[0133] Step S232: generating an initial annotation result adapted to the chart type based on the annotation type and the annotation quantity.
[0134] In the embodiment of the present application, when generating an initial annotation result adapted to a chart type based on the annotation attributes of the annotation object, the annotation attributes of the annotation object can be determined, wherein the annotation attributes include: annotation type and annotation quantity, and the annotation type can be understood as a specific form of annotation, such as a text label, arrow, graphic highlight, symbol of a data point, etc. The annotation quantity can be understood as the total number of annotations that the user wants to add to the chart.
[0135] Then, based on the annotation type and the number of annotations, an initial annotation result that matches the chart type is generated. It can be understood that after the annotation attributes are determined, the system will generate an initial annotation result that matches the chart type according to these annotation attributes. It can be seen that the automated and intelligent design of chart annotation in the data visualization tool of the embodiment of the present application is intended to improve the dissemination efficiency of data insights and the comprehensibility of charts by reducing the manual configuration work of users.
[0136] From the above, it can be seen that the embodiment of the present application proposes a chart annotation function, and combines a recommendation algorithm with a user-friendly interface design. The platform will first identify the characteristics of the input data set (ie, data features) and the selected view type (ie, chart type), and then automatically suggest a suitable annotation format. Users can also directly add new annotation content by clicking, dragging, and other operations, and see the effect feedback instantly. In addition, the present application also introduces a set of rule judgment calculation methods, allowing users to define their own logical control chart annotation content according to different annotation types.
[0137] The chart annotation function proposed in the embodiment of the present application includes the following main modules:
[0138] 1. Graphical representation annotation type classification module
[0139] This application comprehensively sorts out and classifies existing chart annotation types, including but not limited to text annotation, arrow annotation, area highlight and other elements. Figure 3 is a schematic diagram of the classification of chart annotation types according to an embodiment of the present application, such as Figure 3 The figure shows the application of annotations in different charts, including area charts (area charts and density charts), bar charts (bar charts, waterfall charts, proportional bar charts, column charts, proportional column charts), scatter charts (scatter charts / bubble charts, heat charts) and line charts, as well as pie charts, arc bar charts and radar charts. The annotation types include line annotations, area annotations, scatter annotations and highlight annotations. Among them, the columns indicate whether different types of annotations should be supported in different charts. Figure 3 Different grayscale blocks represent different annotation methods. In each column of blocks corresponding to the annotation method, blocks with different grayscales from other blocks (i.e. blocks with the lowest grayscale) indicate that the annotation method is not suitable for annotating the chart. In the Cartesian coordinate system, X, Y, and S indicate that vertical, horizontal, and oblique line annotations are supported, respectively. In the polar coordinate system, R and D indicate that arc annotations and ray annotations through the origin are supported, respectively.
[0140] Based on the statistical results, we proposed a labeling classification system based on chart element types and established a detailed labeling type library to provide basic data support for subsequent intelligent recommendations.
[0141] 2. User-friendly User Interface (UI) design module
[0142] This application has designed an intuitive and easy-to-use user interface that allows users to easily select, edit, and apply various types of annotations. The UI interface design needs to take into account user operating habits and provide a clear navigation and feedback mechanism to ensure that users can quickly get started even without professional backgrounds. Considering the need for low understanding costs, this application presets some existing annotation types for common chart feature data display, which can be quickly selected when users have direct needs.
[0143] Figure 4 is a schematic diagram of the preset annotation type according to an embodiment of the present application, wherein the average value is recorded as , the median is recorded as m. Figure 4 A variety of preset annotation types are shown, including mean (line), above mean (range), below mean (range), above mean (object), below mean (object), median (line), above median (range), below median (range), above median (object), below median (object), fixed value (line), above fixed value (range), below fixed value (range), above fixed value (object), below fixed value (object), etc. There are no restrictions here, so that users can quickly select when they have direct needs.
[0144] 3. Intelligent recommendation algorithm module
[0145] Combining data features and chart types, based on the ability of existing chart recommendation algorithm models to automatically identify key statistical information in charts, this application expands the support scope of the recommendation algorithm and adds feature value annotation support on the basis of the original chart types to provide a suitable annotation solution. The algorithm can analyze statistics such as chart data distribution, trends, and outliers, and intelligently generate preliminary annotation suggestions, reducing the cost of users' initial use and the time for manual adjustments.
[0146] 4. Interactive annotation editing module
[0147] This application provides a set of UI interfaces for interactively modifying the configuration related to chart annotations, allowing users to make fine adjustments based on intelligent recommendations, including the position, size, color, etc. of the annotations. At the same time, the display effect of the chart supports dynamic preview, and users can see the change effect in real time when adjusting the configuration, ensuring that the final annotation is both accurate and beautiful.
[0148] Therefore, the final effect of the embodiment of the present application is as follows Figure 5 As shown, Figure 5This is a schematic diagram of the effect of the chart annotation function according to the embodiment of the present application. It can be seen that the graphical user interface includes a data setting part and an effect display part. Users can make custom settings (such as setting the meaning of the X-axis and Y-axis, selecting stacking or tiling, etc.) and information annotation (such as selecting graphic element style, text annotation, conditional settings, custom settings, etc.) in the data setting part. When setting conditions, new conditions can be added by selecting "and" conditions or "or" conditions for the values of the X-axis or Y-axis, which is not limited here). The user's real-time settings and adjustments will be immediately displayed in the effect display part. Figure 5 The effect display part is a chart that displays the total average unit price (ten thousand / square meter) of different areas (such as area 1 to area 11) in real time.
[0149] From this, it can be seen that this application first summarizes the classification of annotation types based on graphical representation, and develops on this basis, providing an interactive method for users to directly add different types of annotation forms, and supports intelligent recommendation, automatically generates chart annotations based on data features and chart types, and realizes automatic generation and interactive modification of chart annotation expressions, which can simplify the annotation configuration process and improve user experience; the intelligent recommendation function reduces human intervention and improves work efficiency; the annotation form can highlight data characteristics and rules, and enhance the technical effect of data comprehension ability.
[0150] It is easy to understand that the beneficial effects of the diagram annotation method provided by the present application include the following points.
[0151] Beneficial effect (1) simplifies the creation and editing process of chart annotations, improves the intuitiveness and convenience of user operations, and enables even users without a deep technical background to easily create high-quality data visualization content, thereby improving user experience.
[0152] Beneficial effect (2): It realizes intelligent annotation recommendation based on data characteristics and chart types. Through the intelligent annotation recommendation function, it reduces the steps of human intervention, speeds up the process conversion from data to insight, and thus improves work efficiency.
[0153] Beneficial effect (3): Automated annotation generation helps to better reveal the patterns and correlations hidden behind the data, thereby enhancing data understanding capabilities.
[0154] Beneficial effect (4) supports interactive modification, allowing users to adjust the annotation content and style as needed.
[0155] Beneficial effect (5): shorten user configuration time and improve the efficiency of data insight dissemination.
[0156] Beneficial effect (6): This application attempts to apply the research results in different fields of data analysis, visualization, and interactive design to solve actual business scenarios, thereby achieving interdisciplinary integration.
[0157] Beneficial effect (7): This application supports full-link automatic generation, based on one-click generation of visual charts from input data to final annotated expressions, while providing UI interaction methods to support local modifications of each link, covering all key links in the entire life cycle from raw data import to final report output.
[0158] Beneficial effect (8): This application supports open interface design, facilitates third-party service access by reserving API interfaces, and enhances the scalability and adaptability of the system.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0160] In addition, it should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0162] According to an embodiment of the present application, a model training method is also provided, which may include the following steps:
[0163] Step S281, obtaining training data, wherein the training data includes: matching sample data features and sample chart types, the sample data features are used to determine the statistical object, and the sample chart type is used to determine the visual chart display method;
[0164] Step S282, using the training data to train the initial chart recommendation model to obtain a prediction object;
[0165] Step S283, calculating the target loss based on the predicted object and the real object;
[0166] Step S284, based on the target loss, the model parameters of the initial chart recommendation model are updated to obtain the target chart recommendation model, wherein the target chart recommendation model is used to analyze the data features and the chart type to obtain the annotation object, and the annotation attributes of the annotation object are used to generate an initial annotation result that is compatible with the chart type, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0167] In an embodiment of the present application, the process of training the target chart recommendation model is as follows: first, the training data is obtained, and the training data includes: matching sample data features and sample chart types, the sample data features are the attributes and statistical data of the data set, and the sample chart type is the chart type that matches the sample data features.
[0168] Then, the initial chart recommendation model is trained with the training data to obtain the predicted object, which can be understood as the initial chart recommendation model trying to learn patterns from data features so that it can accurately recommend chart types when encountering new data sets. Among them, the predicted object can be understood as the chart type predicted by the initial chart recommendation model based on the training data.
[0169] Then, the target loss is calculated based on the predicted object and the true object. It can be understood as comparing the predicted object (i.e., the chart type predicted by the initial chart recommendation model) with the true object in the training data (i.e., the actual chart type that matches the data features), and calculating the difference between the prediction of the initial chart recommendation model and the true value, i.e., the target loss. It can be understood that the loss function can be a variety of indicators to measure the accuracy of model prediction, such as Mean Squared Error (MSE), Cross Entropy Loss, etc. The goal is to make this loss value as small as possible.
[0170] Finally, the model parameters of the initial chart recommendation model are updated based on the target loss to obtain the target chart recommendation model, which can be understood as adjusting the model parameters according to the calculated target loss, optimizing the model and reducing the prediction error. After that, the initial chart recommendation model can gradually learn how to recommend chart types more accurately by continuously iterating this process (i.e., executing steps S282 to S284 multiple times). Finally, the fully trained and optimized initial chart recommendation model is called the target chart recommendation model. The target chart recommendation model can intelligently recommend the most appropriate chart type based on the characteristics of the data set, thereby improving the data visualization effect and user experience.
[0171] It is understandable that the specific application of the target chart recommendation model can refer to the description of the aforementioned embodiment, which will not be described in detail here.
[0172] According to the embodiment of the present application, there is also provided Figure 6 A diagram annotation method shown in Figure 1. Figure 6 is a flowchart of a diagram annotation method according to an embodiment of the present application, such as Figure 6 As shown, the method includes:
[0173] Step S61, obtaining data features of a commodity sales data set and a selected commodity sales chart type, wherein the data features are used to determine a statistical object of the commodity sales data, and the commodity sales chart type is used to determine a visualization chart display method corresponding to the commodity sales data set;
[0174] Step S62, using a target chart recommendation model to analyze data features and commodity sales chart types to obtain labeled commodities;
[0175] Step S63, generating a commodity sales annotation result adapted to the commodity sales chart type based on the annotation attributes of the annotated commodity, wherein the commodity sales annotation result is used to recommend an annotation form corresponding to the annotated commodity.
[0176] In the embodiment of the present application, the commodity sales data set can be understood as a commodity data set in a commodity sales scenario, which is used to be input into the target chart recommendation model for analysis.
[0177] Data features are used to determine the statistical objects of the commodity sales data set. The statistical objects can be understood as specific parts or attributes in the commodity sales data set that need to be emphasized, analyzed or visualized. Exemplarily, the statistical objects include but are not limited to the chart data distribution, trend, outliers, mean, median, standard deviation, maximum and minimum values, correlation between data, etc. of the commodity sales data set, which are not limited here. By analyzing the data features of the commodity sales data set, it is possible to determine which data points, data ranges or data relationships are critical, thereby deciding what to mark on the chart. Exemplarily, if there are outliers in the commodity sales data set, by analyzing and obtaining the outliers, the outliers can be marked in the visualization chart later.
[0178] The commodity sales chart type is used to determine the visualization chart display method corresponding to the commodity sales data set, which can be understood as the visualization chart display method selected by the user for the commodity sales data set. Exemplarily, commodity sales chart types include area charts, density charts, pie charts, line charts, bar charts, scatter charts, heat maps, etc., which are not limited here. Each chart type has a corresponding display method and applicable scenario, which can express the statistical objects and relationships of data in a specific visual form.
[0179] By obtaining the data features of the commodity sales data set and the commodity sales chart type, and taking into account the intrinsic features of the commodity sales data set and the commodity sales chart type selected by the user, it is helpful to subsequently intelligently generate or recommend chart annotations.
[0180] After obtaining the data features of the commodity sales data set and the commodity sales chart type, the target chart recommendation model is used to analyze the data features of the commodity sales data set and the commodity sales chart type to obtain labeled commodities. The target chart recommendation model can be understood as a pre-trained model, which can recommend visualization configurations suitable for data and charts based on the data features of the commodity sales data set and the commodity sales chart type. Exemplarily, the target chart recommendation model can be a large model or other deep learning model, which is not limited here.
[0181] The labeled products can be understood as the products that need to be labeled in the product sales data set, usually the products that are valuable or that users may be interested in. The labeled products may be those with abnormal sales performance, inconsistent with the trend, the highest or lowest sales volume, the largest seasonal sales fluctuations, etc., depending on the data characteristics and the user's analysis goals.
[0182] It can be understood that the target chart recommendation model is used to analyze the data characteristics and the commodity sales chart type to obtain labeled commodities. The target chart recommendation model can intelligently select or generate labeled objects according to the data characteristics and the commodity sales chart type, thereby enhancing the expressive power of the chart and the user's data understanding ability in a more intelligent and efficient manner.
[0183] After obtaining the marked commodity, a commodity sales marking result adapted to the commodity sales chart type is generated based on the marking attributes of the marked commodity. The marking attributes of the marked commodity may be specific values of sales volume and sales amount, which are not limited here.
[0184] The product sales labeling results are used to recommend the labeling style corresponding to the labeled product, which can be understood as automatically recommending a labeling style that matches the labeled product and is more suitable for the labeled product, thereby intuitively displaying the labeling style of the labeled product on the chart.
[0185] For example, if the chart type is a bar chart, and the marked products are the products with the highest sales volume, the system may add text annotations above the columns corresponding to these products to show the specific sales volume. If the chart type is a time series line chart, and the marked products are products with abnormal sales trends, the system may use arrows or highlighted areas to mark the abnormal trends of these products. The generation of product sales annotation results takes into account the visual effects of the chart and the expression requirements of the data, ensuring that the annotations highlight key information without affecting the overall readability of the chart.
[0186] It can be understood that generating a product sales annotation result that matches the product sales chart type based on the annotation attributes of the annotated product can be understood as generating an annotation form that matches the product sales chart type selected by the user based on the annotation attributes of the annotated product, and recommending the product sales annotation result to the user. As a result, the user can intuitively see the key information annotated on the chart based on the product sales annotation result, thereby helping the user to better understand the data in the product sales data set. In addition, it can also reduce the user's manual adjustment time and reduce labor costs. Therefore, it not only saves the user's manual configuration time, but also improves the accuracy and aesthetics of the chart annotation.
[0187] In the embodiment of the present application, by obtaining the data features of the commodity sales data set and the selected commodity sales chart type, the target chart recommendation model is then used to analyze the data features and the commodity sales chart type to obtain the labeled commodity, and finally the commodity sales annotation results that match the commodity sales chart type are generated based on the annotation attributes of the labeled commodity, so as to recommend the commodity sales annotation results to the user. In this way, more suitable chart display methods and annotation forms can be intelligently recommended, and key information or statistical objects in the commodity sales data set can be highlighted, so as to convey data insights more intuitively and accurately, improve the quality and attractiveness of data visualization content, and reduce the user's manual adjustment time and labor costs.
[0188] The above-mentioned chart annotation method provided in the embodiment of the present application can also be applied to, but not limited to, application scenarios involving chart annotation of data sets in the fields of education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services, for example: chart annotation of education service data sets, chart annotation of legal service data sets, etc., which are not limited here.
[0189] According to the embodiment of the present application, data features of a commodity sales data set and a selected commodity sales chart type are obtained, wherein the data features are used to determine the statistical objects of the commodity sales data, and the commodity sales chart type is used to determine the visual chart display method corresponding to the commodity sales data set; a target chart recommendation model is used to analyze the data features and the commodity sales chart type to obtain labeled commodities; and commodity sales labeling results that match the commodity sales chart type are generated based on the labeling attributes of the labeled commodities, wherein the commodity sales labeling results are used to recommend the labeling form corresponding to the labeled commodities, thereby achieving the purpose of intelligent and rapid chart labeling, thereby realizing a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the labor cost, thereby solving the technical problems in the related technology that the configuration process of data visualization tools is cumbersome and the interaction method is not intuitive enough.
[0190] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0191] According to the embodiment of the present application, there is also provided Figure 7 A method of diagram annotation is shown. Figure 7 is a flowchart of a diagram annotation method according to an embodiment of the present application, such as Figure 7 As shown, the method includes:
[0192] Step S71, obtaining a chart annotation request through a first application programming interface, wherein the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, wherein the data features are used to determine a statistical object of the input data set, and the chart type is used to determine a visual chart display method corresponding to the input data set;
[0193] Step S72, returning a chart annotation response through a second application programming interface, wherein the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation properties of the annotation object, the annotation object is obtained by analyzing data features and chart types using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0194] The first application programming interface and the second application programming interface may be the same application programming interface or different application programming interfaces. In an optional embodiment, the interface parameters in the first application programming interface and the second application programming interface may include but are not limited to: interface global identifier, interface signature key, interface timestamp, interface request identifier, system call credential identifier, etc. The first application programming interface may use GET or POST as the interface request method to obtain the file processing request. The second application programming interface may use JSON format to feedback the file processing response.
[0195] In the embodiment of the present application, the chart annotation request is used to request the chart annotation, and the request data carried in the chart annotation request includes: data features of the input data set and the selected chart type. The chart annotation response can be understood as a reply to the chart annotation request, and the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type.
[0196] For the rest of the description, please refer to the description of the aforementioned embodiment and will not be repeated here.
[0197] In an embodiment of the present application, a chart annotation request is obtained through a first application programming interface, and the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. Then, a chart annotation response is returned through a second application programming interface, and the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation attributes of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object. In this way, more appropriate chart display methods and annotation forms can be intelligently recommended, and key information or statistical objects in the data set can be highlighted, so as to convey data insights more intuitively and accurately, improve the quality and attractiveness of data visualization content, and at the same time reduce the user's manual adjustment time and reduce labor costs.
[0198] The above-mentioned chart annotation method provided in the embodiment of the present application can be applied to, but is not limited to, application scenarios involving chart annotation of data sets in the fields of e-commerce services, educational services, legal services, medical services, conference services, social network services, financial product services, logistics services and navigation services, for example: chart annotation of e-commerce service data sets, chart annotation of educational service data sets, chart annotation of legal service data sets, etc., which are not limited here.
[0199] According to an embodiment of the present application, a chart annotation request is obtained through a first application programming interface, and the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. Then, a chart annotation response is returned through a second application programming interface, and the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation attributes of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object, thereby achieving the purpose of intelligent and rapid chart annotation, thereby achieving a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of the cumbersome configuration process of data visualization tools in related technologies and the lack of intuitive interaction methods.
[0200] According to the embodiment of the present application, there is also provided Figure 8 A method of diagram annotation is shown. Figure 8is a flowchart of a diagram annotation method according to an embodiment of the present application, such as Figure 8 As shown, a graphical user interface is provided by a terminal device, and the method includes:
[0201] Step S81, in response to a first control operation performed on the graphical user interface, obtaining data features of an input data set and a selected chart type, wherein the data features are used to determine a statistical object of the input data set, and the chart type is used to determine a visual chart display method corresponding to the input data set;
[0202] Step S82, in response to the second control operation performed on the graphical user interface, generating an initial annotation result adapted to the chart type, wherein the initial annotation result is generated based on the annotation attribute of the annotation object, the annotation object is obtained by analyzing the data characteristics and the chart type using the target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object;
[0203] Step S83: display the initial annotation result in the graphical user interface.
[0204] The graphical user interface in the embodiment of the present application at least displays a chart annotation scene, and the user can perform control operations in the chart annotation scene displayed in the graphical user interface. It is understandable that the above-mentioned chart annotation scene can be, but is not limited to, scenes involving chart annotation in the fields of e-commerce, education, medical care, conferences, social networks, financial products, logistics, and navigation.
[0205] The above-mentioned graphical user interface also includes a first control (or a first touch area). When a first control operation acting on the first control (or the first touch area) is detected, data features of the input data set and a selected chart type can be obtained, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set.
[0206] The above-mentioned graphical user interface also includes a second control (or a second touch area). When a second control operation acting on the second control (or the second touch area) is detected, an initial annotation result suitable for the chart type can be generated, wherein the initial annotation result is generated based on the annotation properties of the annotation object, and the annotation object is obtained by analyzing the data characteristics and the chart type using the target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0207] After obtaining the initial annotation result, the initial annotation result can be displayed in the graphical user interface.
[0208] It should be noted that both the first control operation and the second control operation can be operations in which the user touches the display screen of the terminal device with a finger and touches the terminal device. The touch operation can include single-point touch and multi-point touch, wherein the touch operation of each touch point can include click, long press, heavy press, swipe, etc. The first control operation and the second control operation can also be touch operations implemented by input devices such as a mouse and a keyboard, which are not limited here.
[0209] For the rest of the description, please refer to the description of the aforementioned embodiment and will not be repeated here.
[0210] In an embodiment of the present application, in response to a first control operation performed on a graphical user interface, data features of an input data set and a selected chart type are obtained, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. In response to a second control operation performed on the graphical user interface, an initial annotation result adapted to the chart type is generated, wherein the initial annotation result is generated based on the annotation attributes of the annotation object, and the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object. Finally, the initial annotation result is displayed in the graphical user interface. In this way, more suitable chart display methods and annotation forms can be intelligently recommended, and key information or statistical objects in the data set can be highlighted, so as to convey data insights more intuitively and accurately, improve the quality and attractiveness of data visualization content, and at the same time reduce the user's manual adjustment time and reduce labor costs.
[0211] The above-mentioned chart annotation method provided in the embodiment of the present application can be applied to, but is not limited to, application scenarios involving chart annotation of data sets in the fields of e-commerce services, educational services, legal services, medical services, conference services, social network services, financial product services, logistics services and navigation services, for example: chart annotation of e-commerce service data sets, chart annotation of educational service data sets, chart annotation of legal service data sets, etc., which are not limited here.
[0212] According to an embodiment of the present application, in response to a first control operation performed on a graphical user interface, data features of an input data set and a selected chart type are obtained, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. In response to a second control operation performed on the graphical user interface, an initial annotation result adapted to the chart type is generated, wherein the initial annotation result is generated based on the annotation attributes of the annotation object, and the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object. Finally, the initial annotation result is displayed in the graphical user interface, thereby achieving the purpose of intelligent and rapid chart annotation, thereby achieving a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of the cumbersome configuration process of data visualization tools in related technologies and the lack of intuitive interaction methods.
[0213] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0214] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0215] According to an embodiment of the present application, a device embodiment for implementing the above-mentioned chart annotation method is also provided. Fig. 9 is a structural schematic diagram of a diagram marking device according to an embodiment of the present application, such as Fig. 9 As shown, the device comprises:
[0216] The first acquisition module 901 is used to acquire data features of an input data set and a selected chart type, wherein the data features are used to determine the statistical object of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set;
[0217] The first analysis module 902 is used to analyze data features and chart types using a target chart recommendation model to obtain a labeled object;
[0218] The first generating module 903 is used to generate an initial annotation result adapted to the chart type based on the annotation attributes of the annotation object, wherein the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0219] Optionally, the device also includes: a matching module, used to classify multiple annotation forms to obtain a first classification result; classify multiple chart types based on the graphic representation types applied in the multiple chart types to obtain a second classification result; match the first classification result with the second classification result to obtain an annotation classification result, wherein the annotation classification result is used to provide data support for obtaining an initial annotation result.
[0220] Optionally, the first classification result includes: text annotation, line annotation, area annotation, scatter point annotation and highlight annotation, wherein text annotation is used to provide text description for the annotated object, line annotation is used to prompt the coordinate value or data change trend corresponding to the annotated object, area annotation is used to draw attention to the annotated object through background area changes, scatter point annotation is used to draw attention to the annotated object through specific point symbols, and highlight annotation is used to change the graphic representation of the annotated object.
[0221] Optionally, the second classification result includes: an area chart, a bar chart, a scatter chart and a line chart, wherein the area chart is used to display the data change trend through area visualization, the bar chart is used to compare the data volume of different categories or time periods, the scatter chart is used to display the relationship between different variables, and the line chart is used to display the data change trend through line visualization.
[0222] Optionally, the matching module is also used to determine the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result; based on the similarity between the annotation symbol and the visual representation, the first classification result and the second classification result are matched to obtain the annotated classification result.
[0223] Optionally, the apparatus further includes: a display module for providing a chart editing interface through a terminal device; responding to a chart editing operation performed on the chart editing interface, adding new annotation content to the initial annotation result to obtain a target annotation result; and displaying the target annotation result in the chart editing interface.
[0224] Optionally, the chart editing operation includes at least one of the following: generating a point annotation through a click interaction operation; generating a horizontal or vertical line annotation through a press and slide interaction operation along the coordinate axis; generating a line annotation or an area annotation through a press and slide interaction operation.
[0225] Optionally, the device also includes: a preview module, used to provide a custom style configuration panel and a graphical user interface adapted to the custom style configuration panel through a terminal device; in response to a style configuration operation on the custom style configuration panel, customize the annotation attributes of the initial annotation result to obtain a target annotation result; and preview the target annotation result in the graphical user interface.
[0226] Optionally, the device further includes: a classification module, configured to access the extended annotation service via a reserved application programming interface; and update the annotation classification result based on the extended annotation classification provided by the extended annotation service.
[0227] Optionally, the device also includes: an updating module, used to obtain training data, wherein the training data includes: matching sample data features and sample chart types; using the training data to train the initial chart recommendation model to obtain a predicted object; calculating a target loss based on the predicted object and the real object; and updating the model parameters of the initial chart recommendation model based on the target loss to obtain a target chart recommendation model.
[0228] Optionally, the first generating module 903 is further used to: determine the annotation attributes of the annotation object, wherein the annotation attributes include: annotation type and annotation quantity; and generate an initial annotation result adapted to the chart type based on the annotation type and annotation quantity.
[0229] By adopting the embodiment of the present application, the data features of the input data set and the selected chart type are obtained, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set, and then the target chart recommendation model is used to analyze the data features and the chart type to obtain the labeled object, and finally, based on the labeling attributes of the labeled object, an initial labeling result suitable for the chart type is generated, and the initial labeling result is used to recommend the labeling form corresponding to the labeled object, thereby achieving the purpose of intelligent and rapid chart labeling, thereby realizing more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of cumbersome configuration process of data visualization tools in related technologies and insufficiently intuitive interaction methods.
[0230] It should be noted that the first acquisition module 901, the first analysis module 902 and the first generation module 903 correspond to steps S21 to S23 in the embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules can also be part of the device and can be run in the computer terminal 10 provided in the embodiment.
[0231] According to an embodiment of the present application, another device embodiment for implementing the above-mentioned chart marking method is also provided. Fig.10is a structural schematic diagram of another diagram marking device according to an embodiment of the present application, such as Fig.10 As shown, the device comprises:
[0232] The second acquisition module 1001 is used to acquire data features of the commodity sales data set and the selected commodity sales chart type, wherein the data features are used to determine the statistical object of the commodity sales data, and the commodity sales chart type is used to determine the visual chart display method corresponding to the commodity sales data set;
[0233] The second analysis module 1002 is used to analyze the data features and the commodity sales chart type using the target chart recommendation model to obtain the marked commodities;
[0234] The second generating module 1003 is used to generate a commodity sales annotation result adapted to the commodity sales chart type based on the annotation attributes of the annotated commodity, wherein the commodity sales annotation result is used to recommend an annotation form corresponding to the annotated commodity.
[0235] According to the embodiment of the present application, data features of a commodity sales data set and a selected commodity sales chart type are obtained, wherein the data features are used to determine the statistical objects of the commodity sales data, and the commodity sales chart type is used to determine the visual chart display method corresponding to the commodity sales data set; a target chart recommendation model is used to analyze the data features and the commodity sales chart type to obtain labeled commodities; and commodity sales labeling results that match the commodity sales chart type are generated based on the labeling attributes of the labeled commodities, wherein the commodity sales labeling results are used to recommend the labeling form corresponding to the labeled commodities, thereby achieving the purpose of intelligent and rapid chart labeling, thereby realizing a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the labor cost, thereby solving the technical problems in the related technology that the configuration process of data visualization tools is cumbersome and the interaction method is not intuitive enough.
[0236] It should be noted that the second acquisition module 1001, the second analysis module 1002 and the second generation module 1003 correspond to steps S61 to S63 in the embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules can also be part of the device and can be run in the computer terminal 10 provided in the embodiment.
[0237] According to an embodiment of the present application, another device embodiment for implementing the above-mentioned chart marking method is also provided. Fig.11 is a structural schematic diagram of another diagram marking device according to an embodiment of the present application, such as Fig.11 As shown, the device comprises:
[0238] The third acquisition module 1101 is used to acquire a chart annotation request through the first application programming interface, wherein the request data carried in the chart annotation request includes: data features of the input data set and a selected chart type, the data features are used to determine the statistical object of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set;
[0239] Return module 1102 is used to return a chart annotation response through a second application programming interface, wherein the response data carried in the chart annotation response includes: an initial annotation result that is compatible with the chart type, the initial annotation result is generated based on the annotation properties of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0240] According to an embodiment of the present application, a chart annotation request is obtained through a first application programming interface, and the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. Then, a chart annotation response is returned through a second application programming interface, and the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation attributes of the annotation object, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object, thereby achieving the purpose of intelligent and rapid chart annotation, thereby achieving a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of the cumbersome configuration process of data visualization tools in related technologies and the lack of intuitive interaction methods.
[0241] It should be noted that the third acquisition module 1101 and the return module 1102 correspond to step S71 and step S72 in the embodiment, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules can also be run in the computer terminal 10 provided in the embodiment as part of the device.
[0242] According to an embodiment of the present application, another device embodiment for implementing the above-mentioned chart marking method is also provided. Fig.12 is a structural schematic diagram of another diagram marking device according to an embodiment of the present application, such as Fig.12 As shown, the device comprises:
[0243] The fourth acquisition module 1201 is used to respond to the first control operation performed on the graphical user interface and acquire data features of the input data set and the selected chart type, wherein the data features are used to determine the statistical object of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set;
[0244] The third return module 1202 is used to respond to the second control operation performed on the graphical user interface and generate an initial annotation result that is compatible with the chart type, wherein the initial annotation result is generated based on the annotation properties of the annotation object, and the annotation object is obtained by analyzing the data characteristics and the chart type using the target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0245] The display module 1203 is used to display the initial annotation result in the graphical user interface.
[0246] According to an embodiment of the present application, in response to a first control operation performed on a graphical user interface, data features of an input data set and a selected chart type are obtained, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set. In response to a second control operation performed on the graphical user interface, an initial annotation result adapted to the chart type is generated, wherein the initial annotation result is generated based on the annotation attributes of the annotation object, and the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, and the initial annotation result is used to recommend the annotation form corresponding to the annotation object. Finally, the initial annotation result is displayed in the graphical user interface, thereby achieving the purpose of intelligent and rapid chart annotation, thereby achieving a more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of the cumbersome configuration process of data visualization tools in related technologies and the lack of intuitive interaction methods.
[0247] It should be noted that the fourth acquisition module 1201, the third return module 1202 and the display module 1203 correspond to step S81 and step S83 in the embodiment, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules can also be part of the device and can be run in the computer terminal 10 provided in the embodiment.
[0248] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in the embodiments, as well as the application scenario and implementation process, but is not limited to the scheme provided in the embodiments.
[0249] The embodiment of the present application may provide an electronic device, which may be any electronic device in a group of electronic devices. Optionally, in this embodiment, the electronic device may also be replaced by a terminal device such as a mobile terminal. Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices in a computer network.
[0250] In this embodiment, the above-mentioned electronic device can execute the program code of the following steps in the chart annotation method: obtaining data features of the input data set and the selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; using the target chart recommendation model to analyze the data features and the chart type to obtain the annotation object; generating an initial annotation result that is compatible with the chart type based on the annotation attributes of the annotation object, wherein the initial annotation result is used to recommend the annotation form corresponding to the annotation object.
[0251] Optionally, Fig.13 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig.13 As shown, taking electronic device A as an example, the electronic device A may include: one or more (only one is shown in the figure) processors 1302, a memory 1304, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0252] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the diagram annotation method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the stored software programs and modules, that is, realizing the above-mentioned diagram annotation method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the electronic device A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0253] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain data features of the input data set and the selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; use the target chart recommendation model to analyze the data features and the chart type to obtain the labeled object; generate an initial labeling result that is compatible with the chart type based on the labeling attributes of the labeled object, wherein the initial labeling result is used to recommend the labeling form corresponding to the labeled object.
[0254] By adopting the embodiment of the present application, the data features of the input data set and the selected chart type are obtained, the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set, and then the target chart recommendation model is used to analyze the data features and the chart type to obtain the labeled object, and finally, based on the labeling attributes of the labeled object, an initial labeling result suitable for the chart type is generated, and the initial labeling result is used to recommend the labeling form corresponding to the labeled object, thereby achieving the purpose of intelligent and rapid chart labeling, thereby realizing more intuitive and accurate communication of data insights, improving the quality and attractiveness of data visualization content, and at the same time reducing the user's manual adjustment time and reducing the technical effect of labor costs, thereby solving the technical problems of cumbersome configuration process of data visualization tools in related technologies and insufficiently intuitive interaction methods.
[0255] It can be understood by those skilled in the art that Fig.13 The structure shown is for illustration only, and the electronic device A may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.13 It does not limit the structure of the above electronic device. For example, the electronic device A may also include Fig.13 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Fig.13 Different configurations are shown.
[0256] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0257] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the diagram annotation method provided in the first embodiment.
[0258] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0259] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining data features of an input data set and a selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; using a target chart recommendation model to analyze the data features and the chart type to obtain a labeled object; and generating an initial labeling result that is compatible with the chart type based on the labeling properties of the labeled object, wherein the initial labeling result is used to recommend a labeling form corresponding to the labeled object.
[0260] An embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements any one of the above-mentioned chart annotation methods.
[0261] Optionally, in this embodiment, the computer program product is a program code for performing the following steps when executed by a processor: obtaining data features of an input data set and a selected chart type, wherein the data features are used to determine the statistical objects of the input data set, and the chart type is used to determine the visual chart display method corresponding to the input data set; using a target chart recommendation model to analyze the data features and the chart type to obtain a labeled object; and generating an initial labeling result that matches the chart type based on the labeling attributes of the labeled object, wherein the initial labeling result is used to recommend a labeling form corresponding to the labeled object.
[0262] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0263] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0264] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only 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 interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0265] 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.
[0266] In addition, each functional unit in each embodiment of 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0267] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0268] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A diagram annotation method, characterized in that: include: Acquire data features of an input data set and a selected chart type, wherein the data features are used to determine a statistical object of the input data set, and the chart type is used to determine a visual chart display method corresponding to the input data set; Using a target chart recommendation model to analyze the data features and the chart type to obtain annotated objects in the input data set; An initial annotation result adapted to the chart type is generated based on the annotation attributes of the annotation object, wherein the initial annotation result is used to recommend the annotation form corresponding to the annotation object, the annotation attributes of the annotation object are used to reflect the display details of the annotation object on the chart, the annotation classification result is used to provide data support for obtaining the initial annotation result, the annotation classification result is used to represent the matching relationship between multiple annotation forms and multiple chart types, the annotation classification result is obtained by matching the first classification result with the second classification result based on the similarity between the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result, the first classification result is obtained by classifying the multiple annotation forms, and the second classification result is obtained by classifying the multiple chart types based on the graphic representation types applied in the multiple chart types.
2. The method for marking a chart according to claim 1, characterized in that: The first classification result includes any of the following: text annotation, line annotation, area annotation, scattered point annotation and highlight annotation, wherein the text annotation is used to provide a text description for the annotated object, the line annotation is used to prompt the coordinate value or data change trend corresponding to the annotated object, the area annotation is used to draw attention to the annotated object through background area changes, the scattered point annotation is used to draw attention to the annotated object through specific point symbols, and the highlight annotation is used to change the graphical representation of the annotated object.
3. The diagram marking method according to claim 1, characterized in that: The second classification result includes any of the following: an area chart, a bar chart, a scatter chart and a line chart, wherein the area chart is used to display the data change trend through area visualization, the bar chart is used to compare the data volume of different categories or time periods, the scatter chart is used to display the relationship between different variables, and the line chart is used to display the data change trend through line visualization.
4. The diagram marking method according to claim 1, characterized in that: The method further comprises: Determining a labeling symbol corresponding to the first classification result and a visual representation corresponding to the second classification result; Based on the similarity between the annotation symbol and the visual representation, the first classification result and the second classification result are matched to obtain the annotation classification result.
5. The diagram marking method according to claim 1, characterized in that: The diagram marking method further comprises: Provide a chart editing interface through terminal devices; In response to a chart editing operation performed on the chart editing interface, new annotation content is added to the initial annotation result to obtain a target annotation result; The target labeling result is displayed in the chart editing interface.
6. The diagram marking method according to claim 5, characterized in that: The chart editing operation includes at least one of the following: Generate point annotations through click-to-interaction operations; Generate horizontal or vertical line annotations by pressing and sliding along the coordinate axis interactively; Create line or area annotations using a press and slide interaction.
7. The diagram marking method according to claim 1, characterized in that: The diagram marking method further comprises: Providing a custom style configuration panel and a graphical user interface adapted to the custom style configuration panel through a terminal device; In response to the style configuration operation on the custom style configuration panel, the annotation attribute of the initial annotation result is customized to obtain a target annotation result; The target annotation result is previewed in the graphical user interface.
8. The diagram marking method according to claim 1, characterized in that: The diagram marking method further comprises: Access to extended annotation services via reserved application programming interfaces; Based on the extended annotation classification provided by the extended annotation service, the annotation classification result is updated.
9. The diagram marking method according to claim 1, characterized in that: Generating the initial annotation result adapted to the chart type based on the annotation attribute of the annotation object includes: Determine the annotation attribute of the annotation object, wherein the annotation attribute includes: annotation type and annotation quantity; The initial annotation result adapted to the chart type is generated based on the annotation type and the annotation quantity.
10. A model training method, characterized in that: include: Acquire training data, wherein the training data includes: matching sample data features and sample chart types, the sample data features are used to determine the statistical object, and the sample chart type is used to determine the visual chart display method; Using the training data to train the initial chart recommendation model to obtain a prediction object; Calculating a target loss based on the predicted object and the real object; The model parameters of the initial chart recommendation model are updated based on the target loss to obtain a target chart recommendation model, wherein the target chart recommendation model is used to analyze data features and chart types to obtain labeled objects in an input data set, the labeling attributes of the labeled objects are used to generate an initial labeling result adapted to the chart type, the initial labeling result is used to recommend a labeling form corresponding to the labeled object, the labeling attributes of the labeled object are used to reflect the display details of the labeled object on the chart, the labeling classification result is used to provide data support for obtaining the initial labeling result, the labeling classification result is used to represent the matching relationship between multiple labeling forms and multiple chart types, the labeling classification result is obtained by matching the first classification result with the second classification result based on the similarity between the labeling symbol corresponding to the first classification result and the visual representation corresponding to the second classification result, the first classification result is obtained by classifying the multiple labeling forms, and the second classification result is obtained by classifying the multiple chart types based on the graphic representation types applied in the multiple chart types.
11. A method for marking a chart, characterized in that: include: Acquire data features of a commodity sales data set and a selected commodity sales chart type, wherein the data features are used to determine a statistical object of the commodity sales data, and the commodity sales chart type is used to determine a visual chart display method corresponding to the commodity sales data set; Using a target chart recommendation model to analyze the data features and the commodity sales chart type to obtain labeled commodities in the commodity sales data set; A commodity sales annotation result adapted to the commodity sales chart type is generated based on the annotation attributes of the annotated commodity, wherein the commodity sales annotation result is used to recommend an annotation form corresponding to the annotated commodity, the annotation attributes of the annotated commodity are used to reflect the display details of the annotated commodity on the chart, the annotation classification result is used to provide data support for obtaining the commodity sales annotation result, the annotation classification result is used to represent the matching relationship between multiple annotation forms and multiple chart types, the annotation classification result is obtained by matching the first classification result with the second classification result based on the similarity between the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result, the first classification result is obtained by classifying the multiple annotation forms, and the second classification result is obtained by classifying the multiple chart types based on the graphic representation types applied in the multiple chart types.
12. A method for marking a chart, characterized in that: include: Obtaining a chart annotation request through a first application programming interface, wherein the request data carried in the chart annotation request includes: data features of an input data set and a selected chart type, wherein the data features are used to determine a statistical object of the input data set, and the chart type is used to determine a visual chart display method corresponding to the input data set; A chart annotation response is returned through a second application programming interface, wherein the response data carried in the chart annotation response includes: an initial annotation result adapted to the chart type, the initial annotation result is generated based on the annotation attributes of the annotation object in the input data set, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, the initial annotation result is used to recommend an annotation form corresponding to the annotation object, the annotation attributes of the annotation object are used to reflect the display details of the annotation object on the chart, the annotation classification result is used to provide data support for obtaining the initial annotation result, the annotation classification result is used to represent the matching relationship between multiple annotation forms and multiple chart types, the annotation classification result is obtained by matching the first classification result with the second classification result based on the similarity between the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result, the first classification result is obtained by classifying the multiple annotation forms, and the second classification result is obtained by classifying the multiple chart types based on the graphic representation types applied in the multiple chart types.
13. A method for marking a chart, characterized in that: A graphical user interface is provided by a terminal device, and the chart marking method includes: In response to a first control operation performed on the graphical user interface, a data feature of an input data set and a selected chart type are obtained, wherein the data feature is used to determine a statistical object of the input data set, and the chart type is used to determine a visual chart display method corresponding to the input data set; In response to a second control operation performed on the graphical user interface, an initial annotation result adapted to the chart type is generated, wherein the initial annotation result is generated based on the annotation attribute of the annotation object in the input data set, the annotation object is obtained by analyzing the data features and the chart type using a target chart recommendation model, the initial annotation result is used to recommend the annotation form corresponding to the annotation object, the annotation attribute of the annotation object is used to reflect the display details of the annotation object on the chart, the annotation classification result is used to provide data support for obtaining the initial annotation result, the annotation classification result is used to represent the matching relationship between multiple annotation forms and multiple chart types, the annotation classification result is obtained by matching the first classification result with the second classification result based on the similarity between the annotation symbol corresponding to the first classification result and the visual representation corresponding to the second classification result, the first classification result is obtained by classifying the multiple annotation forms, and the second classification result is obtained by classifying the multiple chart types based on the graphic representation types applied in the multiple chart types; The initial annotation result is displayed in the graphical user interface.
14. An electronic device, characterized in that: include: A memory storing an executable program; A processor for running the program, wherein the program, when running, executes the chart annotation method described in any one of claims 1 to 9 or 11 to 13, or the model training method described in claim 10.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the chart annotation method described in any one of claims 1 to 9 or 11 to 13, or the model training method described in claim 10.
16. A computer program product, characterized in that It comprises a computer program which, when executed by a processor, implements the chart annotation method described in any one of claims 1 to 9 or 11 to 13, or the model training method described in claim 10.
Citation Information
Patent Citations
Energy report generation method and related device
CN117170642A
Chart construction method and related equipment
CN118095231A
Trend prediction and presentation system and method thereof
CN118246969A