CN114970479A - Chart generation method and device - Google Patents

Chart generation method and device Download PDF

Info

Publication number
CN114970479A
CN114970479A CN202210904242.8A CN202210904242A CN114970479A CN 114970479 A CN114970479 A CN 114970479A CN 202210904242 A CN202210904242 A CN 202210904242A CN 114970479 A CN114970479 A CN 114970479A
Authority
CN
China
Prior art keywords
data
chart
database
database table
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210904242.8A
Other languages
Chinese (zh)
Other versions
CN114970479B (en
Inventor
王硕
闵博
孙成新
王金明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feihu Information Technology Tianjin Co Ltd
Original Assignee
Feihu Information Technology Tianjin Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feihu Information Technology Tianjin Co Ltd filed Critical Feihu Information Technology Tianjin Co Ltd
Priority to CN202210904242.8A priority Critical patent/CN114970479B/en
Publication of CN114970479A publication Critical patent/CN114970479A/en
Application granted granted Critical
Publication of CN114970479B publication Critical patent/CN114970479B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Abstract

The invention provides a chart generation method and a chart generation device, wherein the method comprises the following steps: starting a plurality of service databases in the cancer connection service system; acquiring at least one changed database table in each business database through the Canal, and determining table change operation corresponding to the at least one database table; preprocessing at least one database table, and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table; determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute; the method provided by the invention can not invade a business system, can count the database table in near real time, can display data in time and has no influence on the original system.

Description

Chart generation method and device
Technical Field
The invention relates to the technical field of computers, in particular to a chart generation method and a chart generation device.
Background
In many business systems, it is necessary to know the system data situation in real time, and generate, for example: data charts such as bar charts, line charts, pie charts, etc. However, since the system data is complex, analysis from the perspective of service codes is time-consuming and labor-consuming, and if the same database is used by a plurality of systems at the same time, omission may occur. Moreover, data charts cannot be processed by one code each time the data is analyzed, which is time-consuming and labor-consuming, because most charts are only different in display form and have similar requirements on data.
Disclosure of Invention
In view of the above, the present invention provides a chart generation method, by which a database table can be counted in near real time without intruding into a business system, data display is timely, and no influence is caused on an original system.
The invention also provides a chart generation device which is used for ensuring the realization and the application of the method in practice.
A chart generation method, comprising:
starting a preset data synchronization tool, namely, a cancer connection service system and a plurality of service databases;
acquiring at least one changed database table in each service database through the Canal, and determining table change operations corresponding to the at least one database table, wherein the table change operations comprise data adding operations, data modifying operations and data deleting operations;
preprocessing the at least one database table, and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table;
determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute;
and determining the chart type corresponding to the chart data set, and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
Optionally, in the method, the preprocessing the at least one database table, and obtaining intermediate data corresponding to the at least one database table based on the table change operation corresponding to the at least one database table includes:
determining the number of changed database tables in each business database;
when only one database table in each business database changes, cleaning the database table, and extracting the changed data in the cleaned database table as intermediate data based on the table change operation;
when a plurality of database tables in each business database change, the database tables are subjected to data cleaning in the business database to which the database tables belong, the changed data in each cleaned database table is extracted based on the table change operation corresponding to each database table, and each extracted data is used as intermediate data corresponding to each database table.
Optionally, the determining the data attribute corresponding to the intermediate data includes:
acquiring auditing information for auditing the intermediate data;
and analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
Optionally, the method for generating the data chart corresponding to the chart type based on each data stored in the chart data set includes:
determining a data format supported by a data chart corresponding to the chart type;
based on the data format, performing data format conversion on each data in the chart data set to obtain target data corresponding to the data format;
and generating a data chart corresponding to the chart type based on each target data.
The above method, optionally, further includes:
when a change instruction which is sent to the business system by a user and is used for changing the chart type of the data chart is received, a display scene for displaying the data chart in the business system is obtained;
determining the type of the chart corresponding to the display scene;
obtaining chart parameters which accord with the chart type corresponding to the display scene;
altering the data chart based on the chart parameter.
A chart generation apparatus comprising:
the connection unit is used for starting a preset data synchronization tool, namely, a cancer, to connect a plurality of service databases in the service system;
a first determining unit, configured to obtain at least one changed database table in each service database through the Canal, and determine a table change operation corresponding to the at least one database table, where the table change operation includes a data addition operation, a data modification operation, and a data deletion operation;
the processing unit is used for preprocessing the at least one database table and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table;
the second determining unit is used for determining the data attribute corresponding to the intermediate data and adding the intermediate data to the chart data set corresponding to the data attribute;
and the generating unit is used for determining the chart type corresponding to the chart data set and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
The above apparatus, optionally, the processing unit includes:
the first determining subunit is used for determining the number of the changed database tables in each service database;
the first processing subunit is used for cleaning the database table to generate intermediate data corresponding to the database table when only one database table in each business database changes, and extracting the changed data in the cleaned database table as the intermediate data based on the table change operation;
and the second processing subunit is used for cleaning the data of each database table in the service database to which the database table belongs when a plurality of database tables in each service database change, extracting the changed data in each cleaned database table based on the table change operation corresponding to each database table, and taking each extracted data as the intermediate data corresponding to each database table.
The above apparatus, optionally, the second determining unit includes:
the acquisition subunit is used for acquiring audit information for auditing the intermediate data;
and the analysis subunit is used for analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
The above apparatus, optionally, the generating unit includes:
the second determining subunit is used for determining the data format supported by the data chart corresponding to the chart type;
the conversion subunit is configured to perform data format conversion on each data in the chart data set based on the data format, and obtain target data corresponding to the data format;
and the generating subunit is used for generating a data chart corresponding to the chart type based on each target data.
The above apparatus, optionally, further comprises:
the first obtaining unit is used for obtaining a display scene for displaying the data chart in the service system when a change instruction for changing the chart type of the data chart, which is sent to the service system by a user, is received;
the third determining unit is used for determining the chart type corresponding to the display scene;
the second acquisition unit is used for acquiring chart parameters conforming to the chart type corresponding to the display scene;
and the changing unit is used for changing the data chart based on the chart parameters.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, the storage medium controls a device to execute the chart generation method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the graph generation method described above.
Compared with the prior art, the invention has the following advantages:
the invention provides a chart generation method, which comprises the following steps: starting a preset data synchronization tool, namely, a cancer connection service system and a plurality of service databases; acquiring at least one changed database table in each service database through the Canal, and determining table change operations corresponding to the at least one database table, wherein the table change operations comprise data adding operation, data modifying operation and data deleting operation; preprocessing the at least one database table, and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table; determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute; the method provided by the invention is applied to determining the chart type corresponding to the chart data set and generating the data chart corresponding to the chart type based on each data stored in the chart data set, so that a business system can not be invaded, the database table can be counted in near real time, the data display is timely, and the original system is not influenced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method of generating a diagram according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method of a chart generation method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method of a chart generation method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an apparatus structure of a chart generating apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the present invention provides a diagram generating method, which can be applied to a plurality of system platforms, an execution subject of the method can be a computer terminal or a processor of various mobile devices, and a flow chart of the method is shown in fig. 1, and specifically includes:
s101: and starting a preset data synchronization tool, namely, Canal, to connect a plurality of service databases in the service system.
The Canal is a data synchronization tool, and when data in the service database changes, the Canal can synchronize the changed data in time.
S102: and acquiring at least one changed database table in each business database through the Canal, and determining table change operation corresponding to the at least one database table.
The table changing operation comprises a data adding operation, a data modifying operation and a data deleting operation.
It should be noted that when data is added, deleted, or modified in the database table, the Canal synchronizes the changed database table, and each service database includes a database table for recording each data included in the service database to which the database belongs.
S103: preprocessing the at least one database table, and acquiring intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table.
The intermediate data is data which changes before and after the database table.
S104: and determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute.
Specifically, in the method provided in the embodiment of the present invention, determining the data attribute corresponding to the intermediate data includes:
acquiring auditing information for auditing the intermediate data;
and analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
The audit information comprises a current operator for operating the intermediate data, audit actions, the type of the audit data, a main key of the audit data, an audit data channel, audit remarks, a risk label and the like.
It should be noted that, the change operation in which the database table in the business database is changed is performed by the user, and the operation information includes audit information and operation time, etc. that require auditing of the changed data. And acquiring audit information from the operation information, and analyzing the audit information to determine the data attribute corresponding to the intermediate data. And determining the data attribute corresponding to the intermediate data according to the type of the audit data.
S105: and determining the chart type corresponding to the chart data set, and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
The data chart is a plurality of line graphs, a plurality of bar graphs, a bar graph with line graphs or pie graphs and the like.
Based on the method provided by the embodiment, Canal pretends itself to be a slave of MySQL and sends the dump protocol to a master (business database). The master receives the dump protocol, and pushes the binary log (database table) to the Canal after the data of the service database is changed. The Canal parses the binary log object and converts it into incremental data.
In the method provided by the embodiment of the invention, each business database in the Canal connection business system is started, the data in each business database is synchronized in real time through the Canal, when any business database changes, at least one changed database table is obtained, and the table change operation corresponding to the changed database table is determined. And preprocessing the table database, and then obtaining intermediate data corresponding to the table database based on table change operation corresponding to the table database. And adding the intermediate data into the corresponding chart data set based on the data attribute of the intermediate data, and generating a data chart from each data stored in the chart data set. And generating a data chart in the chart data set, wherein each data generating the data chart in the chart data set comprises the intermediate data.
The method provided by the embodiment of the invention can not invade a business system, can count the database table in near real time, can display the data in time and has no influence on the original system.
In the method provided in the embodiment of the present invention, the preprocessing the at least one database table to obtain intermediate data corresponding to the at least one database table includes:
determining the number of changed database tables in each business database;
when only one database table in each business database changes, cleaning the database table, and extracting the changed data in the cleaned database table as intermediate data based on the table change operation;
when a plurality of database tables in each business database change, the database tables are subjected to data cleaning in the business database to which the database tables belong, the changed data in each cleaned database table is extracted based on the table change operation corresponding to each database table, and each extracted data is used as intermediate data corresponding to each database table.
It should be noted that each service database corresponds to one database table, and each data stored in the service database is recorded therein. If only one database table of the service database is changed, after data in the database table is cleaned, the changed data is extracted as intermediate data according to the table changing operation, for example, the changing operation is a new data adding operation, and the new data is extracted as intermediate data. If the database tables of the plurality of business databases change, the changed data in each database table is extracted after the database tables are subjected to data cleaning in the business database to which the database tables belong, the extracted data are subjected to collection processing, and the processed data are intermediate data corresponding to each database table.
When a plurality of database tables change, the table change operation corresponding to each database may be different, for example, three database tables change, and the corresponding table change operation may be a new data addition operation, a data modification operation, and a data deletion operation, respectively; and after data cleaning is carried out on each database table, extracting the newly added data in the database table of the newly added data operation, extracting the data before and after modification in the database table of the data modification operation and extracting the deleted data in the database table corresponding to the data deletion operation.
In the method provided in the embodiment of the present invention, the process of generating the data chart corresponding to the chart type based on each data stored in the chart data set is shown in fig. 2, and includes:
s201: and determining the data format supported by the data chart corresponding to the chart type.
It should be noted that the data charts corresponding to different chart types may support different data formats, or may support the same data format.
S202: and performing data format conversion on each data in the chart data set based on the data format to obtain target data corresponding to the data format.
If the data format of the data in the chart data set is consistent with the data format supported by the chart type, format conversion is not required.
S203: and generating a data chart corresponding to the chart type based on each target data.
In the method provided by the embodiment of the invention, before the data chart is generated, the data format supported by the data chart to be generated is determined, the data format conversion is carried out on each data in the chart data set according to the data format, and the data chart is generated after the format conversion is successful.
In the method provided by the embodiment of the present invention, the type of the graph may also be changed according to an actual scene in a process of displaying the data graph, and a specific process is shown in fig. 3, and specifically may include:
s301: when a change instruction which is sent to a service system by a user and is used for changing the chart type of the data chart is received, a display scene for displaying the data chart in the service system is obtained.
In the present invention, after the data diagram is generated based on the above S105, the data diagram is displayed, and a technician can review the displayed data diagram, and in the process of the review, the diagram type of the data diagram can be changed according to a specific display scenario, and a diagram change instruction is issued.
S302: and determining the type of the chart corresponding to the display scene.
It should be noted that different chart types are applied to different presentation scenarios.
S303: and obtaining chart parameters which accord with the chart type corresponding to the display scene.
In the invention, the generation process of different data charts needs to apply the chart parameters corresponding to the data charts, and when the chart type of the data charts needs to be changed, the chart parameters of the chart type of the data charts needing to be changed are obtained.
S304: altering the data chart based on the chart parameter.
It should be noted that the data diagram can be changed only by the diagram parameter level of the data diagram, and a new diagram code of the data diagram does not need to be written. For example: the initial demand data graph is viewed by a technician at a back-end, so that the data graph may be presented as a bar graph, where the technician is relatively interested in the particular data. And in the later period, the data chart is displayed on an auditing and monitoring large screen, the data chart display may be mainly based on a pie chart, the proportion condition is mainly displayed, specific numbers do not need to be displayed on the large screen, when the data chart is changed, if the original parameter of the bar chart is bar, if the bar chart is changed into the pie chart, the corresponding parameter of the pie chart is pie, and only the parameter bar needs to be changed into the pie, the change of the data chart can be realized.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a chart generating apparatus, which is used for implementing the method in fig. 1 specifically, the chart generating apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the chart generating apparatus is shown in fig. 4, and specifically includes:
a connection unit 401, configured to enable a preset data synchronization tool, a cancer, to connect to multiple service databases in a service system;
a first determining unit 402, configured to obtain at least one changed database table in each service database through the Canal, and determine a table change operation corresponding to the at least one database table, where the table change operation includes a data addition operation, a data modification operation, and a data deletion operation;
a processing unit 403, configured to perform preprocessing on the at least one database table, and obtain intermediate data corresponding to the at least one database table based on a table change operation corresponding to the at least one database table;
a second determining unit 404, configured to determine a data attribute corresponding to the intermediate data, and add the intermediate data to a chart data set corresponding to the data attribute;
the generating unit 405 is configured to determine a chart type corresponding to the chart data set, and generate a data chart corresponding to the chart type based on each data stored in the chart data set.
In the device provided by the embodiment of the invention, each business database in the Canal connection business system is started, data in each business database is synchronized in real time through the Canal, when any business database changes, at least one changed database table is obtained, and table change operation corresponding to the changed database table is determined. And preprocessing the table database, and then obtaining intermediate data corresponding to the table database based on table change operation corresponding to the table database. And adding the intermediate data into the corresponding chart data set based on the data attributes of the intermediate data, and generating a data chart from each data stored in the chart data set. And generating a data chart in the chart data set, wherein each datum for generating the data chart comprises the intermediate datum.
The device provided by the embodiment of the invention can not invade a business system, can count the database table in near real time, can display the data in time and has no influence on the original system.
In the apparatus provided in the embodiment of the present invention, the processing unit 403 includes:
the first determining subunit is used for determining the number of the changed database tables in each service database;
the first processing subunit is used for cleaning the database table to generate intermediate data corresponding to the database table when only one database table in each business database changes, and extracting the changed data in the cleaned database table as the intermediate data based on the table change operation;
and the second processing subunit is used for cleaning the data of each database table in the service database to which the database table belongs when a plurality of database tables in each service database change, extracting the changed data in each cleaned database table based on the table change operation corresponding to each database table, and taking each extracted data as the intermediate data corresponding to each database table.
In the apparatus provided in the embodiment of the present invention, the second determining unit 404 includes:
the acquisition subunit is used for acquiring audit information for auditing the intermediate data;
and the analysis subunit is used for analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
In the apparatus provided in the embodiment of the present invention, the generating unit 405 includes:
the third determining subunit is configured to determine a data format supported by the data chart corresponding to the chart type;
the conversion subunit is configured to perform data format conversion on each data in the chart data set based on the data format, and obtain target data corresponding to the data format;
and the generating subunit is used for generating a data chart corresponding to the chart type based on each target data.
The device provided by the embodiment of the invention further comprises:
the first obtaining unit is used for obtaining a display scene for displaying the data chart in the service system when a change instruction for changing the chart type of the data chart, which is sent to the service system by a user, is received;
the third determining unit is used for determining the chart type corresponding to the display scene;
the second acquisition unit is used for acquiring chart parameters conforming to the chart type corresponding to the display scene;
and the changing unit is used for changing the data chart based on the chart parameters.
For specific working processes of each unit and sub-unit in the graph generating device disclosed in the above embodiment of the present invention, reference may be made to corresponding contents in the graph generating method disclosed in the above embodiment of the present invention, and details are not described here again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the chart generation method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
starting a preset data synchronization tool, namely, a cancer connection service system and a plurality of service databases;
acquiring at least one changed database table in each service database through the Canal, and determining table change operations corresponding to the at least one database table, wherein the table change operations comprise data adding operations, data modifying operations and data deleting operations;
preprocessing the at least one database table, and acquiring intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table;
determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute;
and determining the chart type corresponding to the chart data set, and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
To clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A chart generation method, comprising:
starting a preset data synchronization tool, namely, a cancer connection service system and a plurality of service databases;
acquiring at least one changed database table in each service database through the Canal, and determining table change operations corresponding to the at least one database table, wherein the table change operations comprise data adding operations, data modifying operations and data deleting operations;
preprocessing the at least one database table, and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table;
determining a data attribute corresponding to the intermediate data, and adding the intermediate data to a chart data set corresponding to the data attribute;
and determining the chart type corresponding to the chart data set, and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
2. The method of claim 1, wherein preprocessing the at least one database table and obtaining intermediate data corresponding to the at least one database table based on a table change operation corresponding to the at least one database table comprises:
determining the number of changed database tables in each service database;
when only one database table in each business database changes, cleaning the database table, and extracting the changed data in the cleaned database table as intermediate data based on the table change operation;
when a plurality of database tables in each service database change, the database tables are subjected to data cleaning in the service database to which the database tables belong, the changed data in each cleaned database table is extracted based on the table change operation corresponding to each database table, and each extracted data is used as intermediate data corresponding to each database table.
3. The method of claim 1, wherein the determining the data attribute corresponding to the intermediate data comprises:
acquiring auditing information for auditing the intermediate data;
and analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
4. The method of claim 1, wherein generating the data graph corresponding to the graph type based on the respective data stored in the graph data set comprises:
determining a data format supported by a data chart corresponding to the chart type;
based on the data format, performing data format conversion on each data in the chart data set to obtain target data corresponding to the data format;
and generating a data chart corresponding to the chart type based on each target data.
5. The method according to any one of claims 1 to 4, further comprising:
when a change instruction which is sent to the business system by a user and is used for changing the chart type of the data chart is received, a display scene for displaying the data chart in the business system is obtained;
determining the type of the chart corresponding to the display scene;
obtaining chart parameters which accord with the chart type corresponding to the display scene;
altering the data chart based on the chart parameter.
6. A chart generating apparatus, comprising:
the connection unit is used for starting a preset data synchronization tool, namely, a cancer, to connect a plurality of service databases in the service system;
a first determining unit, configured to obtain at least one changed database table in each service database through the Canal, and determine a table change operation corresponding to the at least one database table, where the table change operation includes a data addition operation, a data modification operation, and a data deletion operation;
the processing unit is used for preprocessing the at least one database table and obtaining intermediate data corresponding to the at least one database table based on table change operation corresponding to the at least one database table;
the second determining unit is used for determining the data attribute corresponding to the intermediate data and adding the intermediate data to the chart data set corresponding to the data attribute;
and the generating unit is used for determining the chart type corresponding to the chart data set and generating a data chart corresponding to the chart type based on each data stored in the chart data set.
7. The apparatus of claim 6, wherein the processing unit comprises:
the first determining subunit is used for determining the number of the changed database tables in each service database;
the first processing subunit is used for cleaning the database table to generate intermediate data corresponding to the database table when only one database table in each business database changes, and extracting the changed data in the cleaned database table as the intermediate data based on the table change operation;
and the second processing subunit is used for cleaning the data of each database table in the service database to which the database table belongs when a plurality of database tables in each service database change, extracting the changed data in each cleaned database table based on the table change operation corresponding to each database table, and taking each extracted data as the intermediate data corresponding to each database table.
8. The apparatus of claim 6, wherein the second determining unit comprises:
the acquisition subunit is used for acquiring audit information for auditing the intermediate data;
and the analysis subunit is used for analyzing the audit information to obtain the data attribute corresponding to the intermediate data.
9. The apparatus of claim 6, wherein the generating unit comprises:
the second determining subunit is used for determining the data format supported by the data chart corresponding to the chart type;
the conversion subunit is configured to perform data format conversion on each data in the chart data set based on the data format, and obtain target data corresponding to the data format;
and the generating subunit is used for generating a data chart corresponding to the chart type based on each target data.
10. The apparatus according to any one of claims 6 to 9, further comprising:
the first obtaining unit is used for obtaining a display scene for displaying the data chart in the service system when a change instruction for changing the chart type of the data chart, which is sent to the service system by a user, is received;
the third determining unit is used for determining the chart type corresponding to the display scene;
the second acquisition unit is used for acquiring chart parameters which accord with the chart type corresponding to the display scene;
and the changing unit is used for changing the data chart based on the chart parameters.
CN202210904242.8A 2022-07-29 2022-07-29 Chart generation method and device Active CN114970479B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210904242.8A CN114970479B (en) 2022-07-29 2022-07-29 Chart generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210904242.8A CN114970479B (en) 2022-07-29 2022-07-29 Chart generation method and device

Publications (2)

Publication Number Publication Date
CN114970479A true CN114970479A (en) 2022-08-30
CN114970479B CN114970479B (en) 2023-01-03

Family

ID=82968587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210904242.8A Active CN114970479B (en) 2022-07-29 2022-07-29 Chart generation method and device

Country Status (1)

Country Link
CN (1) CN114970479B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019189A (en) * 2017-09-18 2019-07-16 飞狐信息技术(天津)有限公司 A kind of generation method and generation system of chart
CN110069378A (en) * 2019-03-16 2019-07-30 平安城市建设科技(深圳)有限公司 Data monitoring method, device, terminal and computer readable storage medium
CN111008241A (en) * 2019-11-14 2020-04-14 微民保险代理有限公司 Data synchronization method and device, storage medium and computer equipment
CN111026727A (en) * 2019-10-24 2020-04-17 贝壳技术有限公司 Table dimension retrieval data synchronization method, system and device based on log file
CN111143621A (en) * 2019-11-19 2020-05-12 京东数字科技控股有限公司 Data auditing method and device and data processing system
CN112199447A (en) * 2020-12-03 2021-01-08 深圳市易博天下科技有限公司 Database synchronization method, device and system and electronic equipment
CN112416710A (en) * 2020-11-19 2021-02-26 京东数字科技控股股份有限公司 User operation recording method and device, electronic equipment and storage medium
CN112559475A (en) * 2020-12-11 2021-03-26 上海哔哩哔哩科技有限公司 Data real-time capturing and transmitting method and system
CN112883022A (en) * 2021-03-18 2021-06-01 武汉众邦银行股份有限公司 XML template-based object data cleaning and converting method
CN113486008A (en) * 2021-06-30 2021-10-08 平安信托有限责任公司 Data blood margin analysis method, device, equipment and storage medium
CN113672668A (en) * 2021-08-27 2021-11-19 工银科技有限公司 Log real-time processing method and device in big data scene
CN113886485A (en) * 2020-12-28 2022-01-04 京东科技控股股份有限公司 Data processing method, device, electronic equipment, system and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019189A (en) * 2017-09-18 2019-07-16 飞狐信息技术(天津)有限公司 A kind of generation method and generation system of chart
CN110069378A (en) * 2019-03-16 2019-07-30 平安城市建设科技(深圳)有限公司 Data monitoring method, device, terminal and computer readable storage medium
CN111026727A (en) * 2019-10-24 2020-04-17 贝壳技术有限公司 Table dimension retrieval data synchronization method, system and device based on log file
CN111008241A (en) * 2019-11-14 2020-04-14 微民保险代理有限公司 Data synchronization method and device, storage medium and computer equipment
CN111143621A (en) * 2019-11-19 2020-05-12 京东数字科技控股有限公司 Data auditing method and device and data processing system
CN112416710A (en) * 2020-11-19 2021-02-26 京东数字科技控股股份有限公司 User operation recording method and device, electronic equipment and storage medium
CN112199447A (en) * 2020-12-03 2021-01-08 深圳市易博天下科技有限公司 Database synchronization method, device and system and electronic equipment
CN112559475A (en) * 2020-12-11 2021-03-26 上海哔哩哔哩科技有限公司 Data real-time capturing and transmitting method and system
CN113886485A (en) * 2020-12-28 2022-01-04 京东科技控股股份有限公司 Data processing method, device, electronic equipment, system and storage medium
CN112883022A (en) * 2021-03-18 2021-06-01 武汉众邦银行股份有限公司 XML template-based object data cleaning and converting method
CN113486008A (en) * 2021-06-30 2021-10-08 平安信托有限责任公司 Data blood margin analysis method, device, equipment and storage medium
CN113672668A (en) * 2021-08-27 2021-11-19 工银科技有限公司 Log real-time processing method and device in big data scene

Also Published As

Publication number Publication date
CN114970479B (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN110019279B (en) Online document collaborative updating method, device, equipment and storage medium
CN111597257A (en) Database synchronization method and device, storage medium and terminal
CN110716966B (en) Data visualization processing method and system, electronic device and storage medium
CN111177165B (en) Method, device and equipment for detecting data consistency
CN110515968B (en) Method and apparatus for outputting information
CN110851209A (en) Data processing method and device, electronic equipment and storage medium
CN109634970A (en) Table method of data synchronization, equipment, storage medium and device
CN111327466B (en) Alarm analysis method, system, equipment and medium
CN113242159A (en) Application access relation determining method and device
US20170220218A1 (en) Automatic Generation of Regular Expression Based on Log Line Data
CN109634986B (en) System monitoring method, device, computer and computer readable storage medium
CN111367529A (en) Code contribution statistical method and device
CN114970479B (en) Chart generation method and device
CN115774707B (en) Object attribute-based data processing method and device, electronic equipment and storage medium
CN107679096B (en) Method and device for sharing indexes among data marts
CN111311014B (en) Service data processing method, device, computer equipment and storage medium
CN109726550A (en) Abnormal operation behavioral value method, apparatus and computer readable storage medium
CN114398188A (en) Model management method, model management service, client, and storage medium
CN113138970A (en) Real-time statistical analysis system and method for database error logs
CN113010208A (en) Version information generation method, version information generation device, version information generation equipment and storage medium
CN112749140A (en) MySQL slow SQL log real-time collection and optimization method and system
CN112685360A (en) Memory data persistence method and device, storage medium and computer equipment
JP7397535B1 (en) Information processing system, information processing method and program
CN112035425B (en) Log storage method and device and computer system
CN113238742B (en) Direct current control page protection program modification playback method, device, terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant