Chart generation method and system

By introducing configuration libraries and calculation rules into the chart generation system, the data is calculated by itself, which solves the problem of low data security during the report chart generation process and improves the security of data in the data source.

CN120107401APending Publication Date: 2025-06-06BAIRONG ZHIXIN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510117837.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

During the report chart generation process, operators can directly see the original data obtained from the data source, resulting in reduced security of the data in the data source.

Method used

By introducing configuration libraries and operation rules into the chart generation system, the system obtains multiple fields and data from the data source, and then calls the corresponding operation rules to calculate the data instead of presenting the original data to the operator.

Benefits of technology

This avoids direct exposure of raw data obtained from data sources to operators, improving the security of data in data sources during chart generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107401A_ABST
    Figure CN120107401A_ABST
Patent Text Reader

Abstract

The invention provides a chart generation method and system.The method is applied to the chart generation system.The method comprises the steps that multiple fields and data corresponding to the multiple fields are obtained from a data source, and the data corresponding to the multiple fields are non-visual data; a target operation rule corresponding to the chart is called and generated from a configuration library, various operation rules are stored in the configuration library, and the target operation rule is used for representing the processing modes of the fields and the data between the fields; calculating the data corresponding to the plurality of fields by adopting a target operation rule to obtain a new field and data corresponding to the new field; and generating a report chart based on the new field and the data corresponding to the new field. After a chart generation system obtains a plurality of fields and data corresponding to the fields from a data source, the data is not calculated through an operator, but the data corresponding to the fields is calculated by calling a corresponding operation rule automatically. The original data obtained from the data source is prevented from being directly exposed to operators, and the safety of the data source is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a chart generation method, a chart generation system, an electronic device, and a computer-readable storage medium. Background Art

[0002] As a common visual explanation tool, report charts can help users intuitively understand data through line charts, bar charts, pie charts, etc., and help decision makers predict future trends, providing strong support for decision-making.

[0003] At present, the report chart is mainly generated by system + manual method. Specifically, the chart generation system (hereinafter referred to as the system) collects data from the data source according to the scope of this data collection, for example: collect data under the "gender" field and data under the "age" field from the employee information database of institution A. Collect data under the "gender" field and data under the "age" field from the employee information database of institution B. Then, the system displays the collected data to the operator. The operator calculates the data between different fields according to the chart display requirements. For example: in institutions A and B, calculate the proportion of male employees and the proportion of female employees under the "gender" field, and calculate the proportion of employees aged 30 and above and the proportion of employees under 30 years old under the "age" field, and then multiply the calculation results under the "gender" field and the "age" field to obtain the proportion of male employees aged 30 and above 1, the proportion of female employees aged 30 and above 2, the proportion of male employees under 30 years old 3, and the proportion of female employees under 30 years old 4. Then, the operator feeds back the calculation results to the system. The system constructs a chart framework based on the calculation results, constructs institution A and institution B horizontally, and constructs the proportion vertically, and then presents the proportion 1, proportion 2, proportion 3 and proportion 4 of institution A and institution B at the corresponding positions of institution A and institution B. In this way, a more complex report chart is generated.

[0004] However, during the report chart generation process, operators can directly see the raw data obtained from the data source, such as the specific ages of employees in different institutions. For another example, when the report chart needs to include the proportion of employees' addresses in different regions, the specific addresses of employees in different institutions will also be exposed to operators. This undoubtedly reduces the security of the data in the data source. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a chart generation method, a chart generation system, an electronic device, and a computer-readable storage medium to improve the security of data in a data source.

[0006] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0007] In a first aspect, the present application provides a chart generation method, which is applied to a chart generation system, and includes: obtaining multiple fields and data corresponding to the multiple fields from a data source, wherein the data corresponding to the multiple fields are non-visual data; calling a target operation rule corresponding to the current chart from a configuration library, wherein the configuration library stores various operation rules, and the target operation rule is used to characterize the processing method of fields and data between fields; using the target operation rule to calculate the data corresponding to the multiple fields to obtain new fields and data corresponding to the new fields; and generating a report chart based on the new fields and the data corresponding to the new fields.

[0008] Compared with the prior art, the chart generation method provided in the first aspect of the present application is that after the chart generation system obtains multiple fields and data corresponding to the multiple fields from the data source, it no longer displays the obtained data to the operator so that the operator can calculate the data, but instead automatically calls the corresponding operation rules to calculate the data corresponding to the multiple fields. In this way, it is possible to avoid the original data obtained from the data source being directly exposed to the operator, thereby improving the security of the data in the data source during the chart generation process.

[0009] In some changed implementation modes of the first aspect of the present application, the target operation rules corresponding to the current chart are called from the configuration library, including: calling the operation rules specified for generating the current chart from the configuration library; if the specified operation rules represent direct output data, then using the specified operation rules to calculate the preset virtual data corresponding to the specified budget rules, to obtain new fields and virtual data corresponding to the new fields, and generating a virtual report chart based on the new fields and the virtual data corresponding to the new fields; if the specified operation rules do not represent direct output data, then determining the specified operation rules as the target operation rules.

[0010] Before using operation rules to process data corresponding to multiple fields, it is necessary to ensure that the operation rules used are not malicious, that is, avoid using operation rules without substantial operations to directly output data obtained from the data source, so as to improve the security of the data in the data source.

[0011] In some modified implementations of the first aspect of the present application, the method also includes: if the specified operation rule includes an operation symbol, determining that the specified operation rule does not represent direct output data; if the specified operation rule does not include an operation symbol, determining that the specified operation rule represents direct output data.

[0012] Generally speaking, the operation rules that directly output data are empty or contain only some useless fields, and operation symbols will not appear to a large extent. Therefore, by judging whether the operation rules include operation symbols, it is possible to avoid analyzing the specific content of the rules, thereby improving the efficiency of judging whether the operation rules directly output data.

[0013] In some modified implementations of the first aspect of the present application, after obtaining multiple fields and data corresponding to the multiple fields from the data source, the method also includes: closing other system processes in the device where the chart generation system is located except for processes related to the chart generation system.

[0014] After the system obtains data from the data source, it shuts down other processes on the device. This prevents other programs in the device from obtaining data from the data source. Even if a malicious program embedded in the system obtains data from the data source, the data in the data source cannot be exported from the device because other processes on the device are shut down, thus improving the security of the data in the data source.

[0015] In some change implementation modes of the first aspect of the present application, the target operation rules are used to calculate the data corresponding to multiple fields to obtain new fields and data corresponding to the new fields, including: obtaining fields and operation relationships involved in the fields from the target operation rules; combining the obtained fields based on the obtained operation relationships to obtain new fields, and using the obtained operation relationships to calculate the data corresponding to multiple fields to obtain data corresponding to new fields.

[0016] Determining new fields based on the content in the target operation rules can achieve accurate and efficient generation of new fields compared to manually entering the new fields again, thereby improving the accuracy and efficiency of report chart generation.

[0017] In some changed implementation modes of the first aspect of the present application, before obtaining multiple fields and data corresponding to the multiple fields from the data source, the method also includes: obtaining the operation rules configured in the configuration library when generating this chart; obtaining the fields to be calculated from the configured operation rules, and determining the data range corresponding to the generation of this chart; obtaining multiple fields and data corresponding to the multiple fields from the data source, including: obtaining data corresponding to the fields to be calculated within the data range from the data source, and determining the obtained data as multiple fields and data corresponding to the multiple fields.

[0018] Data is obtained from the data source according to the fields in the configured operation rules, without the need for system users to specify the fields for data acquisition again, thereby improving the system's automation level in obtaining data from the data source.

[0019] In some changed implementation modes of the first aspect of the present application, before using the target operation rule to calculate the data corresponding to multiple fields, the method also includes: classifying the data corresponding to the multiple fields in one or more levels according to the preset classification rules to obtain the data corresponding to the multiple fields under different classifications, wherein the data corresponding to the multiple fields under all classifications constitute the data corresponding to the multiple fields obtained from the data source; using the target operation rule to calculate the data corresponding to the multiple fields, including: using the target operation rule to calculate the data corresponding to the multiple fields under each classification respectively.

[0020] For the data obtained from the data source, it is first classified according to certain rules, and then the data corresponding to multiple fields under different categories are calculated using operation rules respectively, so as to achieve precise and efficient data calculation, and then generate report charts based on the classified and calculated data, which can improve the visibility of report charts and improve the efficiency of generating report charts.

[0021] The second aspect of the present application provides a chart generation system, which includes: an acquisition module, which is used to acquire multiple fields and data corresponding to the multiple fields from a data source, and the data corresponding to the multiple fields are non-visual data; a calling module, which is used to call the target operation rules corresponding to the current chart from the configuration library, and the configuration library stores various operation rules. The target operation rules are used to characterize the processing method of fields and data between fields; a calculation module, which uses the target operation rules to calculate the data corresponding to the multiple fields to obtain new fields and data corresponding to the new fields; a generation module, which is used to generate a report chart based on the new fields and the data corresponding to the new fields.

[0022] The third aspect of the present application provides an electronic device, which includes: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method in the first aspect.

[0023] A fourth aspect of the present application provides a computer-readable storage medium, the storage medium comprising: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method in the first aspect.

[0024] The chart generation system provided in the second aspect, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect of the present application have the same or similar beneficial effects as the chart generation method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0026] Figure 1 This is a schematic diagram of the application scenario architecture of the chart generation method in the embodiment of the present application;

[0027] Figure 2 The process diagram of the method for generating a chart in the embodiment of the present application is shown in FIG. Figure 1 ;

[0028] Figure 3A schematic diagram of an interface configured with special operation rules in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of a report chart generated in an embodiment of the present application;

[0030] Figure 5 The process diagram of the method for generating a chart in the embodiment of the present application is shown in FIG. Figure 2 ;

[0031] Figure 6 A schematic diagram of a process of classifying and calculating data corresponding to multiple fields according to preset classification rules in an embodiment of the present application;

[0032] Figure 7 The structure of the chart generation system in the embodiment of the present application is shown in FIG. Figure 1 ;

[0033] Figure 8 The structure of the chart generation system in the embodiment of the present application is shown in FIG. Figure 2 ;

[0034] Fig. 9 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0037] Currently, in the process of generating report charts, after the system obtains data from the data source, operators need to perform corresponding calculations on the obtained data. In this way, the data obtained from the data source will be directly exposed to the operators, increasing the risk of data leakage in the data source, thereby reducing the security of the red data in the data source.

[0038] In view of this, the embodiments of the present application provide a chart generation method, a chart generation system, an electronic device, and a computer-readable storage medium. After the system obtains data from a data source, it can not be displayed to an operator, nor can the operator manually calculate the data. The system can call the corresponding operation rules to directly calculate the obtained data, thereby generating a report chart based on the calculation results. In this way, the data in the data source can be prevented from being seen by the operator in the process of generating the report chart, reducing the risk of data leakage and improving the security of the data in the data source.

[0039] It should be noted here that the information, data and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions.

[0040] First, the application scenario of the chart generation method provided in the embodiment of the present application is described.

[0041] Figure 1 This is a schematic diagram of the application scenario architecture of the diagram generation method in the embodiment of the present application, see Figure 1 As shown, the architecture may include: a data source 11 and a chart generating system 12 .

[0042] In the data source 11, various data with practical significance are stored. For example, employee information, customer information, product information, etc. of a certain organization are stored. These data sometimes need to be organized into charts to show relevant personnel. These data can be stored in the form of text or in the form of data tables. The specific storage form of each of these data in the data source 11 is not limited here.

[0043] The chart generation system 12 is a system that can obtain data from the data source 11, process the data into report charts, and display the report charts to relevant personnel.

[0044] The chart generation system 12 is pre-configured with calculation rules. After acquiring data from the data source 11, the chart generation system 12 calls the configured calculation rules to calculate the acquired data, thereby generating a report chart based on the calculation results, and finally presenting the report chart to relevant personnel.

[0045] In practical applications, the relevant personnel may be any personnel who has the authority to view the statistical data in the data source 11, such as the manager of the data source 11 and the decision maker of a certain matter. The specific meaning of the relevant personnel is not limited here.

[0046] The following is a detailed description of the chart generation method provided in the embodiment of the present application.

[0047] Figure 2The process diagram of the method for generating a chart in the embodiment of the present application is shown in FIG. Figure 1 , see Figure 2 As shown, the method may include: S21-S24.

[0048] S21: Acquire multiple fields and data corresponding to the multiple fields from a data source, where the data corresponding to the multiple fields is non-visualized data.

[0049] The so-called non-visual data may refer to data whose meaning cannot be directly known by operators.

[0050] For example, non-visual data is machine code. In the data source, the data corresponding to the multiple fields to be obtained are converted into machine code, and then the multiple fields and the machine codes corresponding to the multiple fields are obtained from the data source. In this way, even if the operator sees the machine code through the system, he cannot identify the actual content in the machine code, thereby achieving security protection of the data in the data source.

[0051] Another example: non-visual data is data that is prohibited from being output and displayed. The system is configured in advance to prohibit the output and display of relevant data. After the system obtains multiple fields and the visual data corresponding to the multiple fields from the data source, when the operator controls the output and display of the visual data obtained from the data source through the operating system, the system will refuse to output and display the visual data obtained from the data source because the system is configured to prohibit the output and display of the data obtained from the data source. In this way, it can also ensure that the data obtained from the data source in the system is not directly seen by the operator, thereby realizing the security protection of the data in the data source.

[0052] The multiple fields and the data corresponding to the multiple fields are the relevant contents involved in the report chart to be generated.

[0053] When it is necessary to generate a report chart, the operator inputs the relevant fields required to generate the report chart into the chart generation system according to the requirements for generating the report chart. The chart generation system determines the corresponding data source based on the relevant fields. Here, the system can search for the data source corresponding to the relevant fields from a preset data table, or the operator can input the data source of the data to be obtained again so that the system can directly determine the data source. Then, the system can obtain the data corresponding to the corresponding fields from the data source, thereby obtaining multiple fields and data corresponding to multiple fields from the data source.

[0054] Of course, the system can also obtain all the data in the data source, that is, the data corresponding to multiple fields is all the data in the data source. After the system obtains all the data in the data source, it can select the data corresponding to the fields actually required from the obtained multiple fields and the data corresponding to the multiple fields for subsequent processing according to the fields involved in the subsequent operation rules.

[0055] S22: Calling the target operation rule corresponding to the generated chart from the configuration library.

[0056] The configuration library stores various operation rules. The target operation rules are used to characterize the processing method of fields and data between fields.

[0057] When generating report charts, the data of fields directly obtained from the data source may not be used directly. For example, if the home addresses of each employee of a company are obtained from the data source, and the report chart needs to count the percentage of employees living in different areas, then the number of employees living in each area needs to be divided by the total number of employees. Another example: if the gender and age of each employee of a company are obtained from the data source, and the report chart needs to count the percentage of male and female employees in different age groups, then the percentage of male and female employees corresponding to the "gender" field needs to be multiplied by the percentage of each age range corresponding to the "age" field. It can be seen that in the process of generating report charts, the data corresponding to multiple fields obtained from the data source need to be calculated and processed using operation rules.

[0058] In practical applications, the operation rules may be four arithmetic operation rules, for example: (a+b) / (b / a). Where a and b represent different fields respectively. The operation rules may also be special operation rules. Special operation rules may refer to rules that add screening conditions on the basis of the four arithmetic operation rules. For example: (drs_nodebtscore>3)×((drs_nodebt<15)-(nodebtscore=8)). Where drs_nodebtscore, drs_nodebt, and nodebtscore represent different fields respectively. Special operation rules may also refer to rules that contain non-four arithmetic operation symbols in addition to the four arithmetic operation rules. The specific content of the special operation rules is not limited here.

[0059] Figure 3 This is a schematic diagram of the interface configuration of the special operation rules in the embodiment of this application, see Figure 3 As shown, the operator can select the required operation symbol through the switch option in the system interface, for example, select "×" and "="; and write the field and threshold in the corresponding space, for example, nodebtscore, 8. In this way, the system can generate special operation rules based on the operator's input and store them in the configuration library.

[0060] Of course, the input of the four arithmetic operation rules is similar to the input of the special operation rules, which will not be repeated here.

[0061] The operation rules can be input into the system by the operator, and the system stores the input operation rules in the configuration library for subsequent use.

[0062] After obtaining data corresponding to multiple fields from the data source, which operation rule in the configuration library is used to process the data, that is, to determine the target operation rule from the multiple operation rules in the configuration library, can be determined according to the instructions of the operator. That is, the operator selects the operation rule in the system's configuration library, and the selected operation rule is the target operation rule for subsequent processing of the data corresponding to multiple fields, until the operator cancels the selection or selects another operation rule, the currently selected operation rule is no longer used as the target operation rule.

[0063] The target operation rule can also be determined based on the matching results of multiple fields with the fields contained in each operation rule in the configuration library. When the matching degree of multiple fields with the fields in a certain operation rule in the configuration library is greater than the matching degree with the fields in other operation rules, this operation rule is used as the target operation rule. The data corresponding to a field and multiple fields are obtained from the data source once, that is, each time a report chart is generated, the target operation rule needs to be re-determined in the above manner to achieve accurate generation of charts.

[0064] Once the target operation rules are determined, they can be called from the configuration library to calculate the data corresponding to multiple fields.

[0065] S23: Calculate the data corresponding to the multiple fields using the target operation rule to obtain a new field and the data corresponding to the new field.

[0066] The data corresponding to multiple fields are calculated using the target operation rules. When the target operation rules only involve calculations within a single field, the new fields generated are multiple fields, but the data corresponding to the new fields and the multiple fields are different. For example, multiple fields and the data corresponding to the multiple fields include: Gender: Male, Male, Female, Female; Age: 50, 40, 40, 20. The target operation rules are: Count the proportion of males and the proportion of females, Count the proportion of 45 years and above and Count the proportion of under 45 years old. The new fields and the data corresponding to the new fields include: Gender: Male 50%, Female 50%; Age: 45 and above 25%, under 45 75%.

[0067] When the target operation rule involves calculations between multiple fields, the generated new fields and the data corresponding to the new fields are completely different from the data corresponding to the multiple fields and the multiple fields. For example, multiple fields and the data corresponding to the multiple fields include: gender: male, male, female, female; age: 50, 40, 40, 20. The target operation rule is: the percentage calculation of the combination of the age limit of 45 years old and gender. The new fields and the data corresponding to the new fields include: gender age: 12.5% ​​for males 45 and above, 12.5% ​​for females 45 and above, 37.5% for males under 45, and 37.5% for females under 45. The new fields here can combine multiple fields according to the logical relationship indicated in the target operation rule. For example, the logical relationship is "and" obtained from the target operation rule based on "45 years old age limit and gender combination", and then multiple fields, namely "gender" and "age" are merged to obtain the new field "gender age". The data corresponding to the new field is obtained by processing the data of multiple fields based on the target operation rule.

[0068] S24: Generate a report chart based on the new field and the data corresponding to the new field.

[0069] The new fields and the data corresponding to the new fields are what needs to be presented in the report chart. Therefore, you can first build the required chart frameworks such as line charts, bar charts, and pie charts, and then fill the new fields and the data corresponding to the new fields into the chart framework. In this way, a report chart that can be displayed to the corresponding users of the system is generated.

[0070] Figure 4 This is a schematic diagram of the report chart generated in the embodiment of this application, see Figure 4 As shown, the report chart is a bar chart, showing the preferences of all institutions and each institution for four interest rates. Among them, the whole, institution 1-institution 8 are the scope of this chart display. Interest rate A-interest rate D are four new fields. The 8%, 19%... corresponding to interest rate A are the data corresponding to the first new field. The 36%, 34%... corresponding to interest rate B are the data corresponding to the second new field. The 27%, 23%... corresponding to interest rate C are the data corresponding to the third new field. The 28%, 24%... corresponding to interest rate D are the data corresponding to the fourth new field.

[0071] From the above content, it can be seen that in the chart generation method provided by the embodiment of the present application, after the chart generation system obtains multiple fields and data corresponding to the multiple fields from the data source, it no longer displays the obtained data to the operator so that the operator can calculate the data, but calls the corresponding operation rules to calculate the data corresponding to the multiple fields. In this way, it is possible to avoid the original data obtained from the data source from being directly exposed to the operator, thereby improving the security of the data in the data source during the chart generation process.

[0072] Furthermore, as a Figure 2 As a refinement and extension of the method shown, an embodiment of the present application also provides a method for generating a chart.

[0073] Figure 5 The process diagram of the method for generating a chart in the embodiment of the present application is shown in FIG. Figure 2 , see Figure 5 As shown, the method may include: S51-S513.

[0074] S51: Obtain the operation rules configured in the configuration library when generating this chart.

[0075] When a report chart needs to be generated, for example, when a more complex report chart needs to be generated, the content in the report chart cannot be directly obtained based on the data obtained from the data source, but needs to be calculated based on the data obtained from the data source before it can be presented in the report chart. The specific calculation method, that is, the operation rules, needs to be configured by the operator in the configuration library before the report chart is officially generated.

[0076] When the operator uses the device to configure the operation rules in the configuration library, the operator can obtain the operation rules so as to know which fields need to be obtained from the data source next from the obtained operation rules.

[0077] When obtaining the operation rules, a monitoring function and a writing function can be configured in the configuration library. When the monitoring function detects that an operation rule is input into the configuration library, the monitoring function can control the writing function to record and store the operation rule being written into the configuration library for subsequent use. The specific contents of the monitoring function and the writing function are not limited here.

[0078] S52: Obtain the field to be calculated from the configured calculation rules.

[0079] The configured operation rules include operations between a certain field or multiple fields to generate an operation formula for a new field. A certain field or multiple fields, that is, the fields before the comparison symbol, are the fields to be operated, that is, the fields corresponding to the data to be obtained from the data source. For example: the configured operation rules include a×b=c, and a and b are the fields to be operated. Then it is determined that the data corresponding to field a and the data corresponding to field b need to be obtained from the data source, and the data corresponding to field c needs to be presented in the report chart.

[0080] S53: Determine the data range corresponding to the generated chart.

[0081] The data range here can refer to the time, coverage, etc. of the data in the generated report chart, that is, the time, coverage, etc. of the data corresponding to the field obtained from the data source. For example: the report chart needs to show the proportion of residential areas and educational backgrounds of employees who joined XX organization in 2024. 2024, XX organization, and employees who joined the company are the data range.

[0082] It should be noted here that in order to improve the efficiency of generating report charts, the above step S53 can be executed simultaneously with the above steps S51-S52.

[0083] S54: Acquire data corresponding to the field to be calculated within the data range from the data source, and determine the acquired data as multiple fields and data corresponding to the multiple fields.

[0084] After determining the data range and specific fields of data to be obtained from the data source this time, data corresponding to the fields to be calculated within the data range can be obtained from the data source.

[0085] In other embodiments, data within the data range may be first obtained from the data source, and then data corresponding to the field to be calculated may be extracted from the obtained data. In this way, data within the data range that do not correspond to the field to be calculated can also be transmitted to the system, and the system can cache these data first, and can be used directly when the chart is modified later, without having to obtain them from the data source again, thereby improving the efficiency of chart regeneration.

[0086] S55: Closing other system processes in the device where the chart generating system is located except for the processes involved in the chart generating system.

[0087] After the system obtains data from the data source, in order to prevent data leakage, all processes except the system in the device where the system is located can be closed.

[0088] For example, a chart generation system and other business systems are installed in the device. After the chart generation system obtains data from the data source, the chart generation system will send a process termination request to the management module of the device. The process termination request includes request information for terminating system processes other than the chart generation system. After receiving the process termination request, the management module will close the system processes other than the chart generation system, that is, the processes of other business systems. In this way, if other businesses are exploited by malicious third parties, other business systems will not be able to obtain the data obtained by the chart generation system from the data source because the processes are closed, thereby ensuring the security of the data in the data source.

[0089] Of course, in addition to shutting down the related processes of other business systems in the device, it is also necessary to shut down the module used to send messages to the outside of the device. In this way, even if the chart generation system is hacked, the data obtained from the data source cannot be sent out of the device, ensuring the security of the data in the data source.

[0090] S56: Calling the calculation rules specified for generating this chart from the configuration library.

[0091] Before generating a report chart, the operator will write or select the calculation rules used to generate the chart in the system's configuration library. The calculation rules specified here are the calculation rules that the operator has previously configured in the configuration library. However, if the operator has malicious intent and specifies rules for stealing data, or if the system is illegally hacked, and the intruder tampers with the calculation rules specified by the operator into rules for stealing data, then the original data in the data source may be displayed in a straight line in the generated report chart, still causing data leakage in the data source. For this reason, after calling the specified calculation rules from the configuration library, use the specified calculation rules to process the data, and before generating the report chart, check the specified calculation rules to ensure that the original data of the data source cannot be presented in the generated chart through the specified calculation rules.

[0092] S57: Determine whether the specified operation rule represents direct output of data. If yes, execute S58; if no, execute S59.

[0093] Generally speaking, the operator normally specifies the operation rules in order to calculate the field data obtained from the data source, and then present the calculated field data in the report chart, rather than directly displaying the field data obtained from the data source in the report chart. Therefore, it is possible to check whether the specified operation rules are normal by judging whether they represent direct output of data. If the specified operation rules represent direct output of data, the specified operation rules are abnormal, and the chart generation system may be invaded. If the specified operation rules do not represent direct output of data, the specified operation rules are normal, and the chart generation system is operating normally.

[0094] In the specific judgment, the preset fields and the data corresponding to the preset fields can be calculated using the specified operation rules. If the calculation result is still the preset fields and the data corresponding to the preset fields, it is determined that the specified operation rules represent direct output data. If the calculation result is a field and data different from the preset fields and the data corresponding to the preset fields, it is determined that the specified operation rules do not represent direct output data. In addition, the content of the specified operation rules can also be directly analyzed to determine whether the specified operation rules represent direct output data.

[0095] Specifically, the above step S57 may include:

[0096] Step A1: Determine whether the specified operation rule includes an operation symbol. If yes, execute step A2; if no, execute step A3.

[0097] For malicious operation rules that need to convert non-visual data into visual data and display them, they generally do not contain operation symbols, but mainly contain some statements with data output functions. Therefore, by judging whether the specified operation rules include operation symbols, it is possible to avoid analyzing all the contents in the operation rules and reduce the amount of analysis. While ensuring the accuracy of the judgment, it can improve the judgment efficiency.

[0098] The operation symbols here may refer to various mathematical operation symbols such as +, -, ×, ÷, >, <, etc.

[0099] Through statistics, various mathematical operation symbols involved in field data calculation are organized into a symbol set. After obtaining the specified operation rules, the mathematical operation symbols in the operation rules are extracted, and then the extracted mathematical operation symbols are matched with the symbols in the symbol set. If the match is successful, it is determined that the specified operation rules include the operation symbols, and then it is determined that the specified operation rules do not represent direct output data, and the specified operation rules are normal. If the match fails, it is determined that the specified operation rules do not include the operation symbols, and then it is determined that the specified operation rules do not represent direct output data, and the specified operation rules are abnormal.

[0100] Step A2: Determine that the specified operation rule does not represent direct output data.

[0101] Step A3: Determine the designated operation rule to represent the direct output data.

[0102] S58: Using the specified operation rules to calculate the preset virtual data corresponding to the specified budget rules, obtain new fields and virtual data corresponding to the new fields, and generate virtual report charts based on the new fields and the virtual data corresponding to the new fields.

[0103] When it is determined that the specified operation rules represent direct output data, it means that the chart generation system has been invaded, and the original data in the data source obtained by the system may be about to be exposed. At this time, in addition to notifying the relevant personnel of this issue, the system can first use preset virtual data to replace the data obtained from the data source. The preset virtual data continues to be calculated using the specified operation rules, and then generates a virtual report chart display. In this way, it can prevent the intruder from using other attack methods to obtain the original data in the data source after realizing that he has been discovered, leaving enough time for the relevant personnel to solve the problem and improve the security of the data in the data source.

[0104] The preset virtual data may be pre-set unreal data corresponding to the obtained multiple fields. After determining that the specified operation rule is used to directly output data, the multiple fields obtained from the data source this time may be determined first, and then the unreal data corresponding to the multiple fields may be searched in the pre-set unreal data, and the found unreal data may be used as the preset virtual data.

[0105] The preset virtual data may also be multiple fields obtained by modifying the data corresponding to multiple fields obtained from the data source and the data corresponding to the multiple fields. For example, the "gender" field: male, male, female, female, is modified to the "gender" field: female, male, male, etc. The specific method of modification may be one or more combinations of field modification, field addition, field deletion, etc.

[0106] S59: Determine the designated operation rule as the target operation rule.

[0107] When it is determined that the specified operation rule does not represent direct output data, it means that the specified operation rule is the operation rule required for normal generation of report charts. At this time, the specified operation rule can be used as a target operation rule to generate report charts.

[0108] When using the target operation rules to calculate the data corresponding to multiple fields obtained from the data source, in order to make the generated report charts clearer and to increase the data operation speed, thereby increasing the speed of generating report charts, the data can be reasonably split and the split data can be calculated in parallel.

[0109] S510: Classify the data corresponding to the multiple fields in one level or multiple levels according to the preset classification rules to obtain the data corresponding to the multiple fields under different classifications.

[0110] The data corresponding to the multiple fields under all the categories constitute the data corresponding to the multiple fields obtained from the data source.

[0111] The data corresponding to multiple fields obtained from the data source all have certain rules, for example: the data corresponding to each field is sorted by time. The data corresponding to each field belongs to different objects, etc. The data corresponding to multiple fields are classified into one or more levels according to their rules, so that the data corresponding to multiple fields can be calculated in parallel under each classification, which can not only improve the calculation efficiency, but also facilitate the accurate and clear generation of report charts.

[0112] The rule here can be the preset classification rule mentioned above, or it can be the rule corresponding to when the data corresponding to multiple fields are clustered by themselves.

[0113] The preset classification rules need to be pre-configured in the system by the operator based on the generation requirements of the report chart. For example, the report chart needs to count the proportion of various interest rate promotions of various institutions in different months. At this time, the preset classification rules pre-configured by the operator in the system are time and institution.

[0114] Figure 6 This is a schematic diagram of the process of classifying and calculating the data corresponding to multiple fields according to the preset classification rules in the embodiment of the present application, see Figure 6 As shown, after obtaining the data corresponding to multiple fields from the data source, first, the data corresponding to the multiple fields are grouped according to time to obtain the data corresponding to the multiple fields in different months (April 2023, August 2023, October 2023). In the data corresponding to the multiple fields of each month, the data corresponding to the multiple fields of different institutions are grouped according to the institution, and the data corresponding to the multiple fields under different institutions are obtained. For example: in April 2023, the data corresponding to field 1 and field 2 of institution a, the data corresponding to field 1 and field 2 of institution b, the data corresponding to field 1 and field 2 of institution c, and the data corresponding to field 1 and field 2 of institution d are obtained. Finally, under each category, the target operation rules are used to calculate the data corresponding to multiple fields at the same time.

[0115] S511: Acquire fields and operation relationships involved in the fields from the target operation rule.

[0116] The target operation rules include what kind of calculations need to be performed in which fields, and what kind of calculations need to be performed between which fields. The "which fields" here are the fields that need to be obtained from the target operation rules. The "what kind of calculations" here are the operation relationships that need to be obtained from the target operation rules.

[0117] For example, suppose the target operation rule is: perform percentage statistics on the content under the "Gender" field, perform percentage statistics on the content under the "Age" field with 45 years old as the dividing line, and combine the statistical results in the "Gender" field and the "Age" field. Then, from the target operation rule, the fields obtained are: "Gender" field and "Age" field, and the operation relationship obtained is: the percentage statistics under the "Gender" field, the percentage statistics of the 45-year-old dividing line under the "Age" field, and the combined statistical operation relationship of the statistical results of the "Gender" field and the "Age" field.

[0118] S512: combining the acquired fields based on the acquired operation relationship to obtain a new field, and calculating the data corresponding to the multiple fields using the acquired operation relationship to obtain the data corresponding to the new field.

[0119] Continuing with the above example, according to the operation relationship of the combined statistics of the statistical results of the "gender" field and the "age" field, the obtained "gender" field and the "age" field are combined to obtain the "gender age" field, that is, a new field is obtained. And, according to the operation relationship of the proportion statistics under the "gender" field, the data under the "gender" field is counted to obtain the male proportion results and the female proportion results. At the same time, according to the operation relationship of the proportion statistics under the "age" field, the data of the 45-year-old dividing line under the "age" field is counted to obtain the proportion results of 45 years old and above and the proportion results of under 45 years old. Then, according to the operation relationship of the combined statistics of the statistical results of the "gender" field and the "age" field, the proportion results corresponding to the gender field (i.e., the male proportion results and the female proportion results) are multiplied one by one with the proportion results corresponding to the age field (i.e., the proportion results of 45 years old and above and the proportion results of under 45 years old) to obtain the proportion results of 45 years old and above men, the proportion results of 45 years old and above women, the proportion results of men under 45 years old, and the proportion results of women under 45 years old. The new field and the data corresponding to the new field are:

[0120] New Fields data Men aged 45 and above Percentage of men aged 45 and above Women aged 45 and above Percentage of women aged 45 and above Male under 45 years old Results of the percentage of men under 45 years old Women under 45 years old Results of the proportion of women under 45 years old

[0121] S513: Generate a report chart based on the new field and the data corresponding to the new field.

[0122] Under each category, you will get a set of new fields and the data corresponding to the new fields. When generating a report chart, fill the new fields and the data corresponding to the new fields into the chart according to different categories to get the final report chart.

[0123] Taking the report chart as a bar chart as an example, the horizontal axis of the chart can be each organization, and the vertical axis of the chart can be the proportion. Each organization corresponds to three columns, and different columns represent different months. The length of each column is used to represent the proportion of the corresponding content in the corresponding month of the corresponding organization.

[0124] S514: Display the report chart at the default chart display position of the chart generation system.

[0125] After the report chart is generated, it needs to be displayed in the corresponding location in the system so that relevant personnel can view it.

[0126] The display position of the report chart can use the system default chart display position. For personnel with viewing permissions, the system default chart display position can be known in advance, and after the system generates the report chart, the personnel can enter the system to view it. For personnel without viewing permissions, the system default chart display position will not be known to them. Even if the personnel controls the system to generate the report chart, the personnel will not know where to view the report chart in the system, which improves the security of data in the data source.

[0127] The display location of the report chart can also be the location set by the operator when the system generates the report chart. In this case, in order to prevent the statistical data in the data source from being viewed by irrelevant personnel, the operator can be authenticated when the operator configures the display location for the system. Only after the verification is passed, the operator is allowed to set the display location of the report chart in the system. If the verification fails, the operator is not allowed to set the display location of the report chart in the system, and the generated report chart is still displayed in the default location.

[0128] The specific verification method may be to log in to the account registered in the system, or to enter preset information, and so on.

[0129] At this point, the chart generation method provided in the embodiment of the present application has been fully described.

[0130] Based on the same inventive concept, as an implementation of the above method, the embodiment of the present application also provides a chart generating system.

[0131] Figure 7 The structure of the chart generation system in the embodiment of the present application is shown in FIG. Figure 1 , see Figure 7 As shown, the system may include: an acquisition module 71 , a calling module 72 , a calculation module 73 and a generation module 74 .

[0132] The acquisition module 71 is used to acquire multiple fields and data corresponding to the multiple fields from a data source, where the data corresponding to the multiple fields are non-visual data.

[0133] The calling module 72 is used to call the target operation rules corresponding to the generated chart from the configuration library. The configuration library stores various operation rules. The target operation rules are used to represent the processing method of fields and data between fields.

[0134] The calculation module 73 is used to calculate the data corresponding to the multiple fields using the target operation rules to obtain new fields and the data corresponding to the new fields.

[0135] The generating module 74 is used to generate a report chart based on the new field and the data corresponding to the new field.

[0136] Furthermore, as a Figure 7 As a refinement and expansion of the system shown, the embodiment of the present application also provides a chart generation system.

[0137] Figure 8 The structure of the chart generation system in the embodiment of the present application is shown in FIG. Figure 2 , see Figure 8 As shown, the system may include:

[0138] The first acquisition module 81 includes: a rule acquisition unit 811 and a range determination unit 812 .

[0139] The rule acquisition unit 811 is used to acquire the operation rules configured in the configuration library when generating the current chart.

[0140] The range determination unit 812 is used to obtain the field to be calculated from the configured calculation rules, and determine the data range corresponding to the generated chart.

[0141] The second acquisition module 82 is used to acquire data corresponding to the field to be calculated within the data range from the data source, and determine the acquired data as multiple fields and data corresponding to the multiple fields.

[0142] The process closing module 83 is used to close other system processes in the device where the chart generating system is located except for the processes involved in the chart generating system.

[0143] The calling module 84 includes: a rule calling unit 841 , a rule judging unit 842 , a virtual processing unit 843 and a rule determining unit 844 .

[0144] The rule calling unit 841 is used to call the operation rule specified for generating this chart from the configuration library. The rule judging unit 842 is used to determine that the specified operation rule does not represent direct output data if the specified operation rule includes an operation symbol; if the specified operation rule does not include an operation symbol, determine that the specified operation rule represents direct output data.

[0145] The virtual processing unit 843 is used to calculate the preset virtual data corresponding to the specified budget rule using the specified operation rule if the specified operation rule represents direct output data, obtain the new field and the virtual data corresponding to the new field, and generate a virtual report chart based on the new field and the virtual data corresponding to the new field.

[0146] The rule determination unit 844 is configured to determine the specified operation rule as a target operation rule if the specified operation rule does not represent the direct output data.

[0147] The classification module 85 is used to perform primary or multi-level classification on the data corresponding to the multiple fields according to the preset classification rules to obtain the data corresponding to the multiple fields under different classifications, wherein the data corresponding to the multiple fields under all classifications constitute the data corresponding to the multiple fields obtained from the data source.

[0148] The calculation module 86 is used to calculate the data corresponding to the multiple fields under each category respectively using the target operation rules to obtain new fields and their corresponding data.

[0149] The calculation module 86 includes: a field acquisition unit 861 and a data calculation unit 862 .

[0150] The field acquisition unit 861 is used to acquire fields and operation relationships involved in the fields from the target operation rules.

[0151] The data calculation unit 862 is used to combine the obtained fields based on the obtained operation relationship to obtain a new field, and to calculate the data corresponding to the multiple fields using the obtained operation relationship to obtain the data corresponding to the new field.

[0152] The generating module 87 is used to generate a report chart based on the new field and its corresponding data.

[0153] It should be noted here that the description of the above system embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the system embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0154] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0155] Fig. 9 This is a schematic diagram of the structure of the electronic device in the embodiment of the present application, see Fig. 9 As shown, the electronic device may include: a processor 91, a memory 92, and a bus 93; wherein the processor 91 and the memory 92 communicate with each other via the bus 93; the processor 91 is used to call program instructions in the memory 92 to execute the methods in one or more of the above embodiments.

[0156] It should be noted that the description of the above electronic device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the electronic device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.

[0157] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which may include: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method in one or more of the above embodiments.

[0158] It should be noted here that the description of the above storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0159] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a chart, characterized in that: The method is applied to a chart generation system, and the method comprises: Acquire multiple fields and data corresponding to the multiple fields from a data source, where the data corresponding to the multiple fields is non-visualized data; Calling the target operation rule corresponding to the generated chart from the configuration library, wherein the configuration library stores various operation rules, and the target operation rule is used to characterize the processing method of fields and data between fields; Using the target operation rule to calculate the data corresponding to the multiple fields, to obtain a new field and the data corresponding to the new field; A report chart is generated based on the new field and the data corresponding to the new field.

2. The method according to claim 1, characterized in that The calling of the target operation rules corresponding to the generated chart from the configuration library includes: Call the calculation rules specified in generating this chart from the configuration library; If the specified operation rule represents direct output data, the specified operation rule is used to calculate the preset virtual data corresponding to the specified budget rule to obtain a new field and the virtual data corresponding to the new field, and a virtual report chart is generated based on the new field and the virtual data corresponding to the new field; If the specified operation rule does not represent direct output data, the specified operation rule is determined as the target operation rule.

3. The method according to claim 2, characterized in that The method further comprises: If the specified operation rule includes an operation symbol, determining that the specified operation rule does not represent direct output data; If the specified operation rule does not include an operation symbol, it is determined that the specified operation rule represents direct output of data.

4. The method according to claim 1, characterized in that: After acquiring a plurality of fields and data corresponding to the plurality of fields from a data source, the method further includes: Shut down other system processes in the device where the chart generating system is located except for the processes involved in the chart generating system.

5. The method according to claim 1, characterized in that The step of using the target operation rule to calculate the data corresponding to the multiple fields to obtain a new field and the data corresponding to the new field includes: Acquire fields and operation relationships involved in the fields from the target operation rule; The acquired fields are combined based on the acquired operation relationship to obtain the new field, and the data corresponding to the multiple fields are calculated using the acquired operation relationship to obtain the data corresponding to the new field.

6. The method according to any one of claims 1 to 5, characterized in that Before acquiring a plurality of fields and data corresponding to the plurality of fields from a data source, the method further includes: Obtaining the operation rules configured in the configuration library when generating this chart; Obtaining the field to be calculated from the configured calculation rules, and determining the data range corresponding to the generated chart; The acquiring a plurality of fields and data corresponding to the plurality of fields from a data source includes: The data corresponding to the field to be calculated within the data range is acquired from the data source, and the acquired data is determined as the multiple fields and the data corresponding to the multiple fields.

7. The method according to any one of claims 1 to 5, characterized in that Before calculating the data corresponding to the multiple fields using the target operation rule, the method further includes: Classifying the data corresponding to the multiple fields in one level or multiple levels according to a preset classification rule to obtain data corresponding to the multiple fields under different classifications, wherein the data corresponding to the multiple fields under all classifications constitute the data corresponding to the multiple fields obtained from the data source; The using the target operation rule to calculate the data corresponding to the multiple fields includes: The target operation rules are used to calculate the data corresponding to the multiple fields under each category.

8. A chart generation system, characterized in that: The system comprises: An acquisition module, used for acquiring a plurality of fields and data corresponding to the plurality of fields from a data source, wherein the data corresponding to the plurality of fields is non-visual data; A calling module is used to call the target operation rule corresponding to the generated chart from the configuration library, wherein the configuration library stores various operation rules, and the target operation rule is used to characterize the processing method of the fields and the data between the fields; A calculation module, used to calculate the data corresponding to the multiple fields using the target operation rule to obtain a new field and the data corresponding to the new field; A generating module is used to generate a report chart based on the new field and the data corresponding to the new field.

9. An electronic device, characterized in that: The electronic device comprises: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium comprises: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method as claimed in any one of claims 1 to 7.