Method and device for automatically generating visual chart based on post index configuration
Through the method of automatically generating and filtering charts, the problems of insufficient automation, low chart quality and lack of interaction in the existing technology of post indicator configuration automatically generating visual charts is solved, and efficient, personalized and interactive chart generation is achieved.
Patent Information
- Application Number
- CN202411788656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, when automatically generating visual charts with post indicator configuration, the degree of automation is limited, the chart quality and aesthetics are insufficient, the data processing capabilities are insufficient, and the interactiveness is lacking.
By obtaining the metrics and data sources selected by the user, a subset of indicators and data sources are generated, and using configuration information to generate functions, filter conditions to generate functions, chart generation functions and matching functions, automatically generate and filter charts to ensure that the chart meets user needs.
It improves the degree of automation of chart generation, improves the quality and aesthetics of charts, enhances data processing capabilities, provides interactivity, and reduces user operation burden.
Smart Images

Figure CN119620902A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic device for automatically generating a visual chart based on post indicator configuration. Background Art
[0002] Post data analysis refers to the process of conducting in-depth research on the data related to posts (i.e., "posts") published on social media, forums, blogs, etc. This analysis is usually aimed at understanding user behavior, evaluating the effect of data dissemination, and understanding information changes.
[0003] The existing technology has the following defects when automatically generating visual charts based on post indicator configuration:
[0004] 1. Limited automation
[0005] Despite the templates and preset options, in some cases, users still need to manually adjust the style, color, label and other details of the chart, which increases the user's operational burden. The system may not automatically recommend the best chart type and layout based on the data characteristics, causing users to try multiple charts to find the most suitable one.
[0006] 2. Insufficient chart quality and aesthetics
[0007] Many tools provide simple default chart styles that lack personalized design and are difficult to meet professional needs. Even if some customization options are provided, the user interface may not be intuitive enough, making it difficult for non-technical people to quickly get started.
[0008] 3. Insufficient data processing capabilities
[0009] For real-time processing and analysis of large amounts of data, existing tools may not have sufficient performance, affecting chart loading speed and response time.
[0010] 4. Lack of interactivity and dynamism
[0011] Most automatically generated charts are static and lack interactivity, and users cannot explore data by clicking, dragging, etc. For real-time updated data, the system may not be able to automatically refresh the chart and manual operation is required.
[0012] The above problems become technical problems that need to be solved. Summary of the invention
[0013] In view of this, embodiments of the present invention provide a method, device and electronic device for automatically generating a visualization chart based on post indicator configuration, which at least partially solves the problems existing in the prior art.
[0014] In a first aspect, an embodiment of the present invention provides a method for automatically generating a visualization chart based on a post indicator configuration, comprising:
[0015] Obtain a first indicator set D={D1, D2, ..., Dn} selected by a user on the interface, generate a first indicator subset D' based on the first indicator set D, obtain a second data source set P={P1, P2, ..., Pm} selected by the user, generate a first data source subset P' based on the data source set P, and generate a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and the first configuration information generation function Ff;
[0016] Obtaining a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by the user from a third filtering condition set F={F1, F2, ..., Fk} to form a third filtering condition subset F'⊆F, and generating a function Fs based on the third filtering condition subset F' and the second configuration information to generate second configuration information U2=Fs(F');
[0017] Based on the fourth parameter set S={C, A, X, L}, a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 is generated, and based on the fourth parameter subset S' and the third configuration information generation function Ft, the third configuration information U3=Ft(S') is generated, C represents a chart type set, C={C1, C2, ..., Cl}, A represents a data aggregation method set, A={A1, A2, ..., Ap}, X represents a chart X-axis data set, and L represents a chart legend data set;
[0018] Perform matching calculation on the first indicator subset D' and the third filter condition subset F through a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq};
[0019] Based on the chart generation function Fb, the first configuration information U1, the second configuration information U2 and the third configuration information U3 are aggregated to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and based on the filtering function Fx, a chart filtering operation is performed on the matching parameter set R and the chart aggregation set Z to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
[0020] According to a specific implementation of an embodiment of the present invention, the generating of the first data source subset P' based on the data source set P, and the generating of the first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generating function Ff, include:
[0021] Obtain a first indicator subset D'={d1',d2',...,dn'} and a first data source subset P'={p1',p2',...,pm'};
[0022] Set a first weight set WD={w1, w2, ..., wn} and a second weight set WP={v1, v2, ..., vm} corresponding to the first indicator subset D' and the first data source subset P';
[0023] Calculate the comprehensive score Sc for each indicator and data source:
[0024] .
[0025] According to a specific implementation of an embodiment of the present invention, the generating of the first data source subset P' based on the data source set P, generating the first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generating function Ff, further includes:
[0026] Generate the recommended chart type Tc based on the comprehensive score Sc and the indicator type selected by the user:
[0027]
[0028] Score (Tc,D',P') is a scoring function used to evaluate the suitability of the chart type Tc for a given indicator and data source;
[0029] According to the comprehensive score Sc and the indicator type selected by the user, the recommended data aggregation method Ta is generated:
[0030]
[0031] Score(a,D',P') is a scoring function used to evaluate the applicability of the data aggregation method Ta for a given indicator and data source;
[0032] Generate the first configuration information U1:
[0033] .
[0034] According to a specific implementation of the embodiment of the present invention, the generating of the second configuration information U2=Fs(F') based on the third filter condition subset F' and the second configuration information generating function Fs includes:
[0035] Generate specific filtering rules Rg according to the attributes of each filtering condition;
[0036] According to the generated filtering rules, select the qualified data source P′′={pj′|pj′ satisfies all rules i,∀i∈{1,2,…,k}} from the original data source P′;
[0037] Generate the second configuration information U2 ={filtering condition=F′, filtering rule=Rg, filtered data source=P′′}.
[0038] According to a specific implementation of an embodiment of the present invention, the generating of a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on the fourth parameter set S={C, A, X, L}, and generating the third configuration information U3=Ft(S') based on the fourth parameter subset S' and the third configuration information generating function Ft, includes:
[0039] After obtaining the fourth parameter set S, a fourth parameter subset S′ is generated based on the user's selection;
[0040] The fourth parameter subset S′ is input into the function Ft to generate the third configuration information U3.
[0041] According to a specific implementation of the embodiment of the present invention, the matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, including:
[0042] The matching degree between each indicator di' and each filter condition fj' is evaluated by the Fp function, and the matching matrix M is output:
[0043]
[0044] Mij represents the matching degree between the i-th indicator di' and the j-th filter condition fj'. Mij is calculated as follows:
[0045]
[0046] match(di',fj') is an evaluation function used to calculate the match between the indicator di' and the filter condition fj'.
[0047] According to a specific implementation of an embodiment of the present invention, the matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, and further includes:
[0048] Take each non-zero element in the matching matrix M as a matching parameter Ri, and extract the matching parameter set R from the matching matrix M:
[0049]
[0050] Each Ri is a triple (di', fj', Mij), which means that the matching degree between the indicator di' and the filter condition fj' is Mij.
[0051] According to a specific implementation of an embodiment of the present invention, the first configuration information U1, the second configuration information U2 and the third configuration information U3 are aggregated based on the chart generation function Fb to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, including:
[0052] Extract indicator information and data source information from U1, extract filter conditions, filter rules and filtered data source information from U2, and extract chart type, data aggregation method, X-axis data and legend data information from U3;
[0053] According to the filtering rules in U2, the filtered data is extracted from the data source in U1, and the extracted data is aggregated according to the data aggregation method in U3;
[0054] Generate the corresponding chart according to the chart type in U3, set the X-axis data, legend data, chart title, and axis label properties of the chart, and add the generated chart to the chart aggregation set Z.
[0055] In a second aspect, an embodiment of the present invention provides a device for automatically generating a visual chart based on a post indicator configuration, comprising:
[0056] an acquisition module, acquiring a first indicator set D={D1, D2, ..., Dn} selected by a user on an interface, generating a first indicator subset D' based on the first indicator set D, acquiring a second data source set P={P1, P2, ..., Pm} selected by a user, generating a first data source subset P' based on the data source set P, and generating a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and a first configuration information generation function Ff;
[0057] A generation module is provided to obtain a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by a user from a third filtering condition set F={F1, F2, ..., Fk}, to form a third filtering condition subset F'⊆F, and to generate a second configuration information U2=Fs(F') based on the third filtering condition subset F' and a second configuration information generation function Fs;
[0058] The configuration module generates a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on a fourth parameter set S={C, A, X, L}, generates a third configuration information U3=Ft(S') based on the fourth parameter subset S' and the third configuration information generation function Ft, C represents a chart type set, C={C1, C2, ..., Cl}, A represents a data aggregation method set, A={A1, A2, ..., Ap}, X represents a chart X-axis data set, and L represents a chart legend data set;
[0059] A matching module performs matching calculation on the first indicator subset D' and the third filter condition subset F through a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq};
[0060] The display module performs an aggregation operation on the first configuration information U1, the second configuration information U2 and the third configuration information U3 based on the chart generation function Fb to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and performs a chart filtering operation on the matching parameter set R and the chart aggregation set Z based on the filtering function Fx to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
[0061] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0062] at least one processor; and,
[0063] a memory communicatively connected to the at least one processor; wherein,
[0064] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of automatically generating a visual chart based on post indicator configuration in any of the aforementioned first aspects or any implementation of the first aspect.
[0065] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the method of automatically generating a visual chart based on post indicator configuration in the aforementioned first aspect or any implementation method of the first aspect.
[0066] In the fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method of automatically generating a visual chart based on post indicator configuration in the aforementioned first aspect or any implementation of the first aspect.
[0067] The solution for automatically generating a visualization chart based on a post indicator configuration in an embodiment of the present invention includes: obtaining a first indicator set D={D1, D2, ..., Dn} selected by a user on an interface, generating a first indicator subset D' based on the first indicator set D, obtaining a second data source set P={P1, P2, ..., Pm} selected by a user, generating a first data source subset P' based on the data source set P, generating a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and a first configuration information generating function Ff; obtaining a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by a user from a third filtering condition set F={F1, F2, ..., Fk} to form a third filtering condition subset F'⊆F, generating a function Fs based on the third filtering condition subset F' and the second configuration information, generating second configuration information U2=Fs(F'); generating a function Fs based on a fourth parameter set S={C, A, X, L} corresponding to the first configuration information The fourth parameter subset S' corresponding to the configuration information U1 and the second configuration information U2 is generated based on the fourth parameter subset S' and the third configuration information generation function Ft to generate the third configuration information U3=Ft(S'), C represents a chart type set, C={C1,C2,...,Cl}, A represents a data aggregation method set, A={A1,A2,...,Ap}, X represents a chart X-axis data set, and L represents a chart legend data set; the first indicator subset D' and the third filter condition are matched by the matching function Fp. Subset F is matched and calculated to obtain a matching parameter set R={R1, R2,…, Rq}; based on the chart generation function Fb, the first configuration information U1, the second configuration information U2 and the third configuration information U3 are aggregated to generate a chart aggregation set Z=Fb(U1, U2, U3)={Z1, Z2,…Zs}; based on the screening function Fx, the matching parameter set R and the chart aggregation set Z are screened to obtain the chart Z0=Fx(R, Z) finally displayed on the user interface. This solution has the following beneficial effects:
[0068] 1. High degree of automation
[0069] Through a series of configuration information and generation functions, the system can automatically generate charts from the indicators and data sources selected by the user, reducing the workload of manual configuration and improving efficiency. Use matching function Fp and filtering function Fx to automatically match and filter charts to ensure that the generated charts are the most in line with user needs.
[0070] 2. Flexibility and personalization
[0071] Users can select multiple indicators, data sources, filter conditions and chart parameters, and the system can generate personalized chart configuration information based on these selections. Users can adjust the selected indicators and filter conditions at any time on the interface, and the system can generate new charts in real time, providing a high degree of flexibility.
[0072] 3. Friendly interaction
[0073] Users can select indicators, data sources and filter conditions through a graphical interface, which is simple and intuitive, lowering the threshold for users. The system can instantly generate charts and display them on the user interface, so users can immediately see the effects of their selections, facilitating quick adjustments and optimizations.
[0074] 4. Efficient data processing
[0075] By selecting the data aggregation method, the system can efficiently process large amounts of data and generate meaningful charts. By selecting the filtering conditions, the system can reduce the impact of irrelevant data and improve the accuracy and relevance of the charts.
[0076] 5. Strong scalability
[0077] The system adopts a modular design, and each generating function (such as Ff, Fs, Ft, Fb and Fx) can be independently developed and optimized, which is convenient for system expansion and maintenance. The fourth parameter set S includes chart type, data aggregation method, X-axis data and legend data, etc. More parameters can be easily added in the future to enhance the functionality of the system.
[0078] 6. High precision and reliability
[0079] The matching function Fp is used to calculate the matching degree of indicators and filtering conditions, ensuring that the generated chart is highly consistent with user needs. The screening function Fx is used to select the optimal chart, improving the accuracy and reliability of the generated chart.
[0080] This solution provides a powerful visualization chart generation method through high automation, flexible configuration, user-friendly interface and efficient data processing. It not only improves the efficiency of data processing and display, but also enhances the user experience and is suitable for a variety of data analysis and visualization needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0082] Figure 1A schematic diagram of a method flow chart for automatically generating a visual chart based on post index configuration provided by an embodiment of the present invention;
[0083] Figure 2 A schematic diagram of another method flow chart for automatically generating a visual chart based on post index configuration provided by an embodiment of the present invention;
[0084] Figure 3 A schematic diagram of the structure of a device for automatically generating a visual chart based on a post index configuration provided by an embodiment of the present invention;
[0085] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0086] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0087] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0088] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0089] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0090] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0091] The disclosed embodiment provides a method for automatically generating a visualization chart based on a post index configuration. The method for automatically generating a visualization chart based on a post index configuration provided in this embodiment can be performed by a computing device, which can be implemented as software, or as a combination of software and hardware, and the computing device can be integrated in a server, a terminal device, etc.
[0092] See also Figure 1 and Figure 2 The present disclosure provides a method for automatically generating a visualization chart based on a post index configuration, including:
[0093] S101, obtain the first indicator set D={D1, D2, ..., Dn} selected by the user on the interface, generate a first indicator subset D' based on the first indicator set D, obtain the second data source set P={P1, P2, ..., Pm} selected by the user, generate a first data source subset P' based on the data source set P, generate a function Ff based on the first indicator subset D', the first data source subset P' and the first configuration information, and generate first configuration information U1=Ff(D',P').
[0094] The user selects the indicators of interest on the interface. These indicators can represent different data dimensions, such as the number of following users, the number of posts, the interaction rate, the user activity, etc. These selected indicators constitute the first indicator set D={D1,D2,...,Dn}. The user also needs to select the data source, that is, where the data is obtained from. For example, these data sources can be different database tables, API interfaces or files. The data sources selected by the user constitute the second data source set P={P1,P2,...,Pm}.
[0095] The original indicator set D can be filtered, transformed or combined in order to generate an indicator subset D' that is more suitable for subsequent chart generation. Similar to generating the first indicator subset, it is also necessary to select a part of the data sources from the second data source set P according to certain criteria to form the first data source subset P'. This may involve evaluating the relevance, quality or availability of the data source.
[0096] Furthermore, the first indicator subset D' and the first data source subset P' generated above can be combined with the pre-set first configuration information (which can include chart style, color scheme, etc.) and processed by a generation function Ff to output the first configuration information U1=Ff(D',P'). This generation function Ff can be a complex algorithm, which is responsible for converting the input information into the configuration format required for chart generation.
[0097] This process enables the system to automatically generate appropriate chart configuration information based on the user's actual needs and choices, thereby providing users with more intuitive and useful data visualization results.
[0098] S102, obtaining the filtering conditions corresponding to the first indicator subset D' and the first data source subset P' selected by the user from the third filtering condition set F={F1, F2, ..., Fk}, forming a third filtering condition subset F'⊆F, and generating a function Fs based on the third filtering condition subset F' and the second configuration information to generate the second configuration information U2=Fs(F').
[0099] The user selects applicable filter conditions from the filter condition set F to form a filter condition subset F'⊆F. The system generates a more specific filter condition subset F' based on the filter condition selected by the user. The filter condition subset F' should be applicable to the data in D' and P'.
[0100] The Fs function accepts the third filter condition subset F' as input to generate the second configuration information U2. The second configuration information U2 should include specific settings of the filter conditions, such as time range, geographic location, etc., as well as filtered data source information.
[0101] Through the above steps, the third filter condition subset F' can be systematically generated, and the second configuration information generation function Fs can be used to generate the second configuration information U2. This process ensures that the generated configuration information can accurately reflect the user's filtering requirements and provides necessary parameters and settings for subsequent chart generation.
[0102] S103, based on the fourth parameter set S={C,A,X,L}, generate a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2, and based on the fourth parameter subset S' and the third configuration information generation function Ft, generate third configuration information U3=Ft(S'), C represents a chart type set, C={C1,C2,...,Cl}, A represents a data aggregation method set, A={A1,A2,...,Ap}, X represents a chart X-axis data set, and L represents a chart legend data set.
[0103] In order to describe in detail how to generate the fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on the fourth parameter set S={C, A, X, L}, and generate the third configuration information U3 using the third configuration information generation function Ft, it can be divided into several specific steps:
[0104] The user selects a chart type from the chart type set C={C1,C2,...,Cl}, the user selects a data aggregation method from the data aggregation method set A={A1,A2,...,Ap}, the user selects the X-axis data X of the chart, and the user selects the legend data L of the chart.
[0105] Furthermore, a more specific fourth parameter subset S' is generated according to the chart type, data aggregation method, X-axis data and legend data selected by the user.
[0106] The third configuration information generation function Ft is used to generate the third configuration information U3. The Ft function accepts the fourth parameter subset S' as input to generate the third configuration information U3. The third configuration information U3 should include detailed configuration information such as chart type, data aggregation method, X-axis data, legend data, and other advanced chart settings.
[0107] Through the above steps, the fourth parameter subset S' can be systematically generated, and the third configuration information U3 can be generated using the third configuration information generation function Ft. This process ensures that the generated configuration information can accurately reflect the user's chart requirements and provides detailed parameters and settings for subsequent chart generation.
[0108] S104, performing matching calculation on the first indicator subset D' and the third filter condition subset F by using a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq}.
[0109] The following data sets are defined:
[0110] First indicator subset D': A subset selected from the original indicator set, which can be selected based on specific criteria (such as time range, data source, etc.). Each element represents a specific indicator value or indicator expression.
[0111] The third filter condition subset F: contains a set of filter conditions, which is used to further filter the elements in the first indicator subset. Each condition can be a specific requirement for a certain indicator, such as a value range, an attribute value, etc.
[0112] Matching parameter set R: The final output result set contains all elements in the first indicator subset that meet the filtering conditions. Each element Ri can be a simple value or a complex object, depending on the application requirements.
[0113] The main task of the matching function Fp is to evaluate whether each element in the first indicator subset D' satisfies all conditions in the third filter condition subset F. If an element satisfies all conditions, the element is added to the matching parameter set R.
[0114] Specifically, the matching parameter set R may be initialized: an empty set R is created to store elements that meet the conditions.
[0115] Traverse the first index subset D': For each element d in D', perform the following operations:
[0116] Initialize the condition satisfaction flag: set a Boolean variable `isMatch` with an initial value of `true` to mark whether the current element meets all filtering conditions.
[0117] Traverse the third filter condition subset F: For each condition f in F, check whether d satisfies f.
[0118] If d does not satisfy f, set `isMatch` to `false` and exit the current conditional loop.
[0119] Evaluate condition satisfaction: If after traversing all conditions, `isMatch` is still `true`, it means that d meets all conditions.
[0120] Add d to the set of matching parameters R.
[0121] After checking all elements, return a set R containing all elements that meet the conditions.
[0122] Through such a process, data that meets specific conditions can be effectively screened out from a large number of indicators, thereby supporting subsequent analysis or decision-making processes.
[0123] S105, based on the chart generation function Fb, perform aggregation operation on the first configuration information U1, the second configuration information U2 and the third configuration information U3 to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and based on the filtering function Fx, perform a chart filtering operation on the matching parameter set R and the chart aggregation set Z to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
[0124] A graph generation function Fb may be used to generate a graph aggregation set Z according to the first configuration information U1 , the second configuration information U2 , and the third configuration information U3 .
[0125] The Fb function accepts U1, U2 and U3 as input and generates multiple charts. Each chart Zi contains specific chart data and configuration information, Z=Fb(U1,U2,U3)={Z1,Z2,...,Zs}.
[0126] The indicator information and data source information can be extracted from U1. The filtering conditions, filtering rules and filtered data source information can be extracted from U2. The detailed configuration information such as chart type, data aggregation method, X-axis data and legend data can be extracted from U3.
[0127] According to the filtering rules in U2, the filtered data is extracted from the data source in U1. According to the data aggregation method in U3, the extracted data is aggregated.
[0128] Generate a corresponding chart based on the chart type in U3. Set the chart's X-axis data, legend data, chart title, axis labels and other properties. Add the generated chart to the chart aggregation collection Z.
[0129] Use the filter function Fx to select the chart Z0 that best meets the user's needs based on the matching parameter set R and the chart aggregation set Z. The Fx function accepts the matching parameter set R and the chart aggregation set Z as input and selects the chart with the highest total matching degree.
[0130] Z0=Fx(R,Z)
[0131] For each graph Zi, the matching degree Mij between it and each matching parameter rj is calculated. The matching degree can be determined based on whether the keywords match and the degree of matching.
[0132] For each graph Zi, its total matching degree Mi is calculated as the weighted sum of all matching degrees Mij.
[0133] Select the chart Z0 with the highest total match:
[0134]
[0135] Through the above steps and formulas, a chart aggregation set Z can be systematically generated, and charts can be screened according to the matching parameter set R, and finally a chart Z0 displayed on the user interface is generated. This process ensures that the generated chart not only meets the user's configuration requirements, but also has the highest matching degree, thereby improving the accuracy and practicality of the chart.
[0136] According to a specific implementation of an embodiment of the present invention, the generating of the first data source subset P' based on the data source set P, and the generating of the first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generating function Ff, include:
[0137] Obtain a first indicator subset D'={d1',d2',...,dn'} and a first data source subset P'={p1',p2',...,pm'};
[0138] Set a first weight set WD={w1, w2, ..., wn} and a second weight set WP={v1, v2, ..., vm} corresponding to the first indicator subset D' and the first data source subset P';
[0139] Calculate the comprehensive score Sc for each indicator and data source:
[0140] .
[0141] According to a specific implementation of an embodiment of the present invention, the generating of the first data source subset P' based on the data source set P, generating the first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generating function Ff, further includes:
[0142] Generate the recommended chart type Tc based on the comprehensive score Sc and the indicator type selected by the user:
[0143]
[0144] Score (Tc,D',P') is a scoring function used to evaluate the suitability of the chart type Tc for a given indicator and data source;
[0145] According to the comprehensive score Sc and the indicator type selected by the user, the recommended data aggregation method Ta is generated:
[0146]
[0147] Score(a,D',P') is a scoring function used to evaluate the applicability of the data aggregation method Ta for a given indicator and data source;
[0148] Generate the first configuration information U1:
[0149] .
[0150] According to a specific implementation of the embodiment of the present invention, the generating of the second configuration information U2=Fs(F') based on the third filter condition subset F' and the second configuration information generating function Fs includes:
[0151] Generate specific filtering rules Rg according to the attributes of each filtering condition;
[0152] According to the generated filtering rules, select the qualified data source P′′={pj′|pj′ satisfies all rules i,∀i∈{1,2,…,k}} from the original data source P′;
[0153] Generate the second configuration information U2 ={filtering condition=F′, filtering rule=Rg, filtered data source=P′′}.
[0154] According to a specific implementation of an embodiment of the present invention, the generating of a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on the fourth parameter set S={C, A, X, L}, and generating the third configuration information U3=Ft(S') based on the fourth parameter subset S' and the third configuration information generating function Ft, includes:
[0155] After obtaining the fourth parameter set S, a fourth parameter subset S′ is generated based on the user's selection;
[0156] The fourth parameter subset S′ is input into the function Ft to generate the third configuration information U3.
[0157] According to a specific implementation of the embodiment of the present invention, the matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, including:
[0158] The matching degree between each indicator di' and each filter condition fj' is evaluated by the Fp function, and the matching matrix M is output:
[0159]
[0160] Mij represents the matching degree between the i-th indicator di' and the j-th filter condition fj'. Mij is calculated as follows:
[0161]
[0162] match(di',fj') is an evaluation function used to calculate the match between the indicator di' and the filter condition fj'.
[0163] According to a specific implementation of an embodiment of the present invention, the matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, and further includes:
[0164] Take each non-zero element in the matching matrix M as a matching parameter Ri, and extract the matching parameter set R from the matching matrix M:
[0165]
[0166] Each Ri is a triple (di', fj', Mij), which means that the matching degree between the indicator di' and the filter condition fj' is Mij.
[0167] According to a specific implementation of an embodiment of the present invention, the first configuration information U1, the second configuration information U2 and the third configuration information U3 are aggregated based on the chart generation function Fb to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, including:
[0168] Extract indicator information and data source information from U1, extract filter conditions, filter rules and filtered data source information from U2, and extract chart type, data aggregation method, X-axis data and legend data information from U3;
[0169] According to the filtering rules in U2, the filtered data is extracted from the data source in U1, and the extracted data is aggregated according to the data aggregation method in U3;
[0170] Generate the corresponding chart according to the chart type in U3, set the X-axis data, legend data, chart title, and axis label properties of the chart, and add the generated chart to the chart aggregation set Z.
[0171] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a device 30 for automatically generating a visualization chart based on a post index configuration, comprising:
[0172] An acquisition module 301 is provided to acquire a first indicator set D={D1, D2, ..., Dn} selected by a user on an interface, generate a first indicator subset D' based on the first indicator set D, acquire a second data source set P={P1, P2, ..., Pm} selected by a user, generate a first data source subset P' based on the data source set P, and generate a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and a first configuration information generation function Ff;
[0173] A generation module 302 obtains a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by a user from a third filtering condition set F={F1, F2, ..., Fk}, forms a third filtering condition subset F'⊆F, and generates second configuration information U2=Fs(F') based on the third filtering condition subset F' and a second configuration information generation function Fs;
[0174] The configuration module 303 generates a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on the fourth parameter set S={C, A, X, L}, generates a third configuration information U3=Ft(S') based on the fourth parameter subset S' and the third configuration information generation function Ft, C represents a chart type set, C={C1, C2, ..., Cl}, A represents a data aggregation method set, A={A1, A2, ..., Ap}, X represents a chart X-axis data set, and L represents a chart legend data set;
[0175] A matching module 304 performs matching calculation on the first indicator subset D' and the third filter condition subset F through a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq};
[0176] The display module 305 performs an aggregation operation on the first configuration information U1, the second configuration information U2 and the third configuration information U3 based on the chart generation function Fb to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and performs a chart filtering operation on the matching parameter set R and the chart aggregation set Z based on the filtering function Fx to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
[0177] See also Figure 4 The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:
[0178] at least one processor; and,
[0179] a memory communicatively connected to the at least one processor; wherein,
[0180] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of automatically generating a visual chart based on the post indicator configuration in the aforementioned method embodiment.
[0181] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the aforementioned method embodiment.
[0182] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method of automatically generating a visual chart based on post indicator configuration in the aforementioned method embodiment.
[0183] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 60 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0184] like Figure 4 As shown, the electronic device 60 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0185] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, a gage, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 60 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0186] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0187] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for automatically generating a visualization chart based on post index configuration, characterized in that: include: Obtain a first indicator set D={D1, D2, ..., Dn} selected by a user on the interface, generate a first indicator subset D' based on the first indicator set D, obtain a second data source set P={P1, P2, ..., Pm} selected by the user, generate a first data source subset P' based on the data source set P, and generate a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and the first configuration information generation function Ff; Obtaining a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by the user from a third filtering condition set F={F1, F2, ..., Fk} to form a third filtering condition subset F'⊆F, and generating a function Fs based on the third filtering condition subset F' and the second configuration information to generate second configuration information U2=Fs(F'); Based on the fourth parameter set S={C, A, X, L}, a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 is generated, and based on the fourth parameter subset S' and the third configuration information generation function Ft, the third configuration information U3=Ft(S') is generated, C represents a chart type set, C={C1, C2, ..., Cl}, A represents a data aggregation method set, A={A1, A2, ..., Ap}, X represents a chart X-axis data set, and L represents a chart legend data set; Perform matching calculation on the first indicator subset D' and the third filter condition subset F through a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq}; Based on the chart generation function Fb, the first configuration information U1, the second configuration information U2 and the third configuration information U3 are aggregated to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and based on the filtering function Fx, a chart filtering operation is performed on the matching parameter set R and the chart aggregation set Z to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
2. The method according to claim 1, characterized in that The generating of the first data source subset P' based on the data source set P, and the generating of the first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generating function Ff, comprises: Obtain a first indicator subset D'={d1',d2',...,dn'} and a first data source subset P'={p1',p2',...,pm'}; Set a first weight set WD={w1, w2, ..., wn} and a second weight set WP={v1, v2, ..., vm} corresponding to the first indicator subset D' and the first data source subset P'; Calculate the comprehensive score Sc for each indicator and data source: 。 3. The method according to claim 2, characterized in that The method of generating a first data source subset P' based on the data source set P, and generating first configuration information U1=Ff(D',P') based on the first indicator subset D', the first data source subset P' and the first configuration information generation function Ff, further includes: Generate the recommended chart type Tc based on the comprehensive score Sc and the indicator type selected by the user: Score (Tc,D',P') is a scoring function used to evaluate the suitability of the chart type Tc for a given indicator and data source; According to the comprehensive score Sc and the indicator type selected by the user, the recommended data aggregation method Ta is generated: Score(a,D',P') is a scoring function used to evaluate the suitability of the data aggregation method Ta for a given indicator and data source; Generate the first configuration information U1: 。 4. The method according to claim 3, characterized in that The generating the second configuration information U2=Fs(F') based on the third filter condition subset F' and the second configuration information generating function Fs comprises: Generate specific filtering rules Rg according to the attributes of each filtering condition; According to the generated filtering rules, select the qualified data source P′′={pj′|pj′ satisfies all rules i,∀i∈{1,2,…,k}} from the original data source P′; Generate the second configuration information U2 ={filtering condition=F′, filtering rule=Rg, filtered data source=P′′}.
5. The method according to claim 4, characterized in that The generating, based on the fourth parameter set S={C, A, X, L}, a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2, and generating, based on the fourth parameter subset S' and the third configuration information generating function Ft, the third configuration information U3=Ft(S'), comprises: After obtaining the fourth parameter set S, a fourth parameter subset S′ is generated based on the user's selection; The fourth parameter subset S′ is input into the function Ft to generate the third configuration information U3.
6. The method according to claim 5, characterized in that The matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, including: The matching degree between each indicator di' and each filter condition fj' is evaluated by the Fp function, and the matching matrix M is output: Mij represents the matching degree between the i-th indicator di' and the j-th filter condition fj'. Mij is calculated as follows: match(di',fj') is an evaluation function used to calculate the match between the indicator di' and the filter condition fj'.
7. The method according to claim 6, characterized in that The matching function Fp is used to perform matching calculation on the first indicator subset D' and the third filter condition subset F to obtain a matching parameter set R={R1, R2, ..., Rq}, and further includes: Take each non-zero element in the matching matrix M as a matching parameter Ri, and extract the matching parameter set R from the matching matrix M: Each Ri is a triple (di', fj', Mij), which means that the matching degree between the indicator di' and the filter condition fj' is Mij.
8. The method according to claim 7, characterized in that The graph generation function Fb is used to aggregate the first configuration information U1, the second configuration information U2 and the third configuration information U3 to generate a graph aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, including: Extract indicator information and data source information from U1, extract filter conditions, filter rules and filtered data source information from U2, and extract chart type, data aggregation method, X-axis data and legend data information from U3; According to the filtering rules in U2, the filtered data is extracted from the data source in U1, and the extracted data is aggregated according to the data aggregation method in U3; Generate the corresponding chart according to the chart type in U3, set the X-axis data, legend data, chart title, and axis label properties of the chart, and add the generated chart to the chart aggregation set Z.
9. A device for automatically generating a visual chart based on a post index configuration, characterized in that: include: an acquisition module, acquiring a first indicator set D={D1, D2, ..., Dn} selected by a user on an interface, generating a first indicator subset D' based on the first indicator set D, acquiring a second data source set P={P1, P2, ..., Pm} selected by a user, generating a first data source subset P' based on the data source set P, and generating a first configuration information U1=Ff(D', P') based on the first indicator subset D', the first data source subset P' and a first configuration information generation function Ff; A generation module is provided to obtain a filtering condition corresponding to the first indicator subset D' and the first data source subset P' selected by a user from a third filtering condition set F={F1, F2, ..., Fk}, to form a third filtering condition subset F'⊆F, and to generate a second configuration information U2=Fs(F') based on the third filtering condition subset F' and a second configuration information generation function Fs; The configuration module generates a fourth parameter subset S' corresponding to the first configuration information U1 and the second configuration information U2 based on a fourth parameter set S={C, A, X, L}, generates a third configuration information U3=Ft(S') based on the fourth parameter subset S' and the third configuration information generation function Ft, C represents a chart type set, C={C1, C2, ..., Cl}, A represents a data aggregation method set, A={A1, A2, ..., Ap}, X represents a chart X-axis data set, and L represents a chart legend data set; A matching module performs matching calculation on the first indicator subset D' and the third filter condition subset F through a matching function Fp to obtain a matching parameter set R={R1, R2, ..., Rq}; The display module performs an aggregation operation on the first configuration information U1, the second configuration information U2 and the third configuration information U3 based on the chart generation function Fb to generate a chart aggregation set Z=Fb(U1,U2,U3)={Z1,Z2,…Zs}, and performs a chart filtering operation on the matching parameter set R and the chart aggregation set Z based on the filtering function Fx to obtain the chart Z0=Fx(R,Z) finally displayed on the user interface.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of automatically generating a visual chart based on post indicator configuration as described in any one of claims 1 to 8.