CN112560416A - Page chart generation method and device, electronic equipment and storage medium - Google Patents

Page chart generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112560416A
CN112560416A CN202011527503.6A CN202011527503A CN112560416A CN 112560416 A CN112560416 A CN 112560416A CN 202011527503 A CN202011527503 A CN 202011527503A CN 112560416 A CN112560416 A CN 112560416A
Authority
CN
China
Prior art keywords
chart
chart data
data set
page
data
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
CN202011527503.6A
Other languages
Chinese (zh)
Other versions
CN112560416B (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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011527503.6A priority Critical patent/CN112560416B/en
Publication of CN112560416A publication Critical patent/CN112560416A/en
Application granted granted Critical
Publication of CN112560416B publication Critical patent/CN112560416B/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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of development, and discloses a page diagram generation method, which comprises the following steps: acquiring chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model which is created in a database in advance, and selecting the chart data acquisition model of which the matching value is greater than a preset threshold value to obtain a target chart data acquisition model; acquiring data corresponding to chart data to be generated from the database based on a target chart data acquisition model to obtain an initial chart data set; preprocessing the initial chart data set to obtain a target chart data set; carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set; and carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart. In addition, the invention also relates to a block chain technology, and the configuration chart data set can be stored in the block chain. The invention can improve the efficiency of generating the page chart.

Description

Page chart generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of development, and in particular, to a method and an apparatus for generating a page table, an electronic device, and a computer-readable storage medium.
Background
In the era of rapid development of information, data visualization is applied to numerous fields, such as census, finance, product analysis and the like, data visualization is usually realized based on a visualization analysis tool, for example, a common Excel form tool can also perform simple data visualization, but if the Excel tool meets the huge data volume of a multi-organization multi-account set, the processing is complex, and the response waiting time is not short. Therefore, in recent years, Business Intelligence (BI) systems, which are systems that perform data analysis by using modern data warehouse technology, online analysis processing technology, data mining and data presentation technology to realize functions such as data filling and data processing, are gaining popularity of multiple users.
However, the current BI system development has several problems: first, each chart in the BI system needs to write codes for generating data independently, but in reality, there are many same places in processing logic, which easily causes redundant codes, thereby affecting the efficiency of generating page charts; secondly, each chart in the BI system is independently used for collecting the database, a page of the BI system has a plurality of charts, the problem of database interface performance is easily caused by excessive chart data collection, and the generation efficiency of the page chart is influenced.
Disclosure of Invention
The invention provides a page chart generation method, a page chart generation device, electronic equipment and a computer readable storage medium, and mainly aims to improve the page chart generation efficiency.
In order to achieve the above object, the present invention provides a page chart generating method, including:
acquiring chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
preprocessing the initial chart data set to obtain a target chart data set;
carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set;
and carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
Optionally, before the calculating a matching value between the chart data to be generated and a chart data collection model created in a database in advance, the method further includes:
acquiring all data tables of the database, and clustering the data tables of the same type to obtain one or more initial data tables;
and calculating the expected value of each initial data table, and taking the initial data tables with the same expected values as chart data acquisition models.
Optionally, the calculating an expected value of each of the initial data tables includes:
calculating an expected value for each of the initial data tables using:
Figure BDA0002851059980000021
wherein ,CiIndicating the expected value of the ith initial data table, EiA feature vector representing the ith initial data table,
Figure BDA0002851059980000022
represents the eigenvector covariance of the ith initial data table, and trace () represents the spatial filter function.
Optionally, the calculating a matching value between the chart data to be generated and a chart data collection model created in a database in advance includes:
acquiring the same field of the to-be-generated chart data and the field in the chart data acquisition model, and identifying the same field to obtain a target field set;
summarizing the field length of each field in the to-be-generated chart data to obtain a first field length value, summarizing the field length of each field in the chart data acquisition model to obtain a second field length value, summarizing the field length of each field in the target field set to obtain a third field length value;
calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio, and calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio;
and calculating a matching value between the chart data to be generated and the chart data acquisition model according to the first ratio and the second ratio.
Optionally, the preprocessing the initial chart data set to obtain a target chart data set includes:
carrying out chart category screening on the initial chart data set to obtain a screened chart data set;
performing chart generation sorting on the screened chart data set to obtain a sorted chart data set;
carrying out chart data filling on the sorted chart data set to obtain a filled chart data set;
carrying out chart data grouping on the filled chart data set to obtain a grouped chart data set;
and performing chart data vacancy on the grouped chart data set to obtain a target chart data set.
Optionally, the performing graph configuration on the target graph data set by using a preset filter to obtain a configured graph data set includes:
converting enumerated data in the target chart data set by using a chart screener in the screeners to obtain a converted chart data set;
carrying out chart level association on the conversion chart data set by utilizing a global filter in the filters to obtain an associated chart data set;
and carrying out chart classification configuration on the associated chart data set by utilizing an automatic filter in the filters to obtain a configured chart data set.
The analyzing a page interface of the configuration chart data set by using a pre-created text template engine to generate a corresponding page chart comprises the following steps:
and analyzing the text format of the configuration chart data set by using the text template engine to obtain a text chart set, and transmitting the text chart set to a page interface to obtain a corresponding page chart.
In order to solve the above problem, the present invention further provides a page table generating apparatus, including:
the selection module is used for acquiring the chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
the acquisition module is used for acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
the preprocessing module is used for preprocessing the initial chart data set to obtain a target chart data set;
the configuration module is used for carrying out chart configuration on the target chart data set by utilizing a preset filter to obtain a configuration chart data set;
and the generating module is used for carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to implement the page table generating method described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the page chart generating method described above.
The method comprises the steps of firstly obtaining chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model which is created in a database in advance, selecting the chart data acquisition model of which the matching value is larger than a preset threshold value, acquiring data corresponding to the chart data to be generated from the database based on the selected chart data acquisition model to obtain an initial chart data set, preprocessing the initial chart data set to obtain a target chart data set, avoiding the problem of data throughput of the database caused by excessive chart data acquisition, improving the interface performance of the database and further improving the chart generation efficiency; secondly, the chart configuration is carried out on the target chart data set by utilizing a preset filter to obtain a configured chart data set, so that the redundant phenomenon of excessive data codes is avoided, and the chart generation efficiency is improved; further, in the embodiment of the present invention, a pre-created text template engine is used to perform page interface analysis on the configuration chart data set, so as to generate a corresponding page chart. Therefore, the page chart generation method, the page chart generation device, the electronic equipment and the storage medium can improve the page chart generation efficiency.
Drawings
Fig. 1 is a schematic flowchart of a page diagram generation method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart illustrating a step of the page table generating method shown in FIG. 1 according to a first embodiment of the present invention;
fig. 3 is a schematic block diagram of a page table generating apparatus according to an embodiment of the present invention;
fig. 4 is a schematic internal structural diagram of an electronic device implementing a page diagram generation method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a page diagram generating method. The executing body of the page chart generation method includes, but is not limited to, at least one of electronic devices such as a server and a terminal, which can be configured to execute the method provided by the embodiment of the present application. In other words, the page table generating method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of a page diagram generation method according to an embodiment of the present invention. In the embodiment of the present invention, the page chart generating method includes:
s1, obtaining the chart data to be generated, calculating the matching value of the chart data to be generated and the chart data acquisition model created in the database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain the target chart data acquisition model.
In the embodiment of the invention, the database comprises a relational database, such as an Oracle database, a MySQL database and the like, and the database is used for storing data for generating the chart. The to-be-generated graph data is used for forming a graph in a Business Intelligence (BI) system, and the BI system is a system for performing data analysis by adopting a modern data warehouse technology, an on-line analysis processing technology, a data mining and data presentation technology to realize functions of data filling, data processing and the like.
Further, before calculating a matching value between the chart data to be generated and a chart data collection model created in advance in a database, the embodiment of the present invention further includes: acquiring all data tables of the database, and clustering the data tables of the same type to obtain one or more initial data tables; calculating an expected value of each initial data table; and taking the initial data table with the same expected value as a chart data acquisition model.
The chart data acquisition model is used for inquiring data from a database, so that the configuration of screening conditions required in the subsequent data acquisition is avoided, and the data to be acquired can be directly filled into the corresponding data acquisition model so as to improve the data acquisition efficiency; the expected value can be understood as the importance value of each initial data table in the corresponding data table matrix.
In an alternative embodiment, the data tables are clustered by the k-means algorithm.
In an alternative embodiment, the expected value of each of the initial data tables is calculated using the following method:
Figure BDA0002851059980000051
wherein ,CiIndicating the expected value of the ith initial data table, EiA feature vector representing the ith initial data table,
Figure BDA0002851059980000052
represents the eigenvector covariance of the ith initial data table, and trace () represents the spatial filter function.
Further, the calculating a matching value between the chart data to be generated and a chart data collection model created in a database in advance includes: acquiring the same field of the to-be-generated chart data and the field in the chart data acquisition model, and identifying the same field to obtain a target field set; summarizing the field length of each field in the to-be-generated chart data to obtain a first field length value, summarizing the field length of each field in the chart data acquisition model to obtain a second field length value, and summarizing the field length of each field in the target field set to obtain a third field length value; calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio, and calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio; and calculating a matching value between the chart data to be generated and the chart data acquisition model according to the first ratio and the second ratio.
In the embodiment of the invention, the same fields of the chart data to be generated and the chart data acquisition model are acquired through SQL query sentences, for example, the number of the fields exists in the chart data to be generated, the SQL query sentences are used for carrying out field query on the chart data acquisition model, and if the number of the fields is queried, the number of the fields is identified. The field length refers to the number of characters contained in the corresponding field, for example, if the field student contains 7 characters, the field degree of the field student is 7.
Further, the calculating matching values of the field set and the fields in the data acquisition model according to the first and second ratios includes: and taking the average value of the first ratio and the second ratio as a matching value of the field set and a field in the data acquisition model.
Further, in the embodiment of the present invention, a data acquisition model with the matching value greater than a preset threshold is selected, and optionally, the preset threshold is 0.6.
And S2, acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set.
In an embodiment of the present invention, the acquiring, based on the target chart data acquisition model, data corresponding to the chart data to be generated from the database to obtain an initial chart data set includes:
and operating the SQL configuration statement of the target chart data acquisition model, and inquiring data corresponding to the chart data to be generated in the database by using a preset data acquisition mechanism to obtain an initial chart data set.
In an optional embodiment, the preset data collection mechanism is configured by an SQL statement, which includes: a data main query mechanism, a data pre-query mechanism and a data independent query mechanism.
The data main query mechanism takes date as a condition to perform data query, and comprises the following steps: the query method comprises a time point query and a time period query, wherein the time point query can be understood as a data query with a certain day as a time point, such as a data query of 6 months and 18 days in 2020, and the time period query can be understood as a data query with a collection time stamp, and the collection time stamp is set based on user requirements. For example, the collection timestamp is { "start": 2019-01-01"," end ": 2030-12-31", "diff": "-23" }, where start denotes the minimum start date, end denotes the maximum expiration date, and diff denotes the difference between the required data interval and the query entry date. The data pre-query mechanism adds query conditions, such as a configuration data blacklist (which data do not need to be collected), a configuration data priority (which data are queried first) and the like, to a data main query mechanism according to a configured default value. The data independent query mechanism refers to a mechanism for querying data which cannot be queried by the data main query mechanism so as to guarantee the integrity of data acquisition.
And S3, preprocessing the initial chart data set to obtain a target chart data set.
It should be appreciated that, because the initial chart data in the initial chart data set may generate a corresponding chart, and because the initial chart data set includes many different types of chart data, if chart generation is directly performed on the initial chart data set, many repeated query actions are easily brought, and the speed of chart generation is affected, therefore, the embodiment of the present invention performs a preprocessing operation on the initial chart data set to increase the speed of subsequent chart generation.
In detail, the preprocessing the initial chart data set to obtain a target chart data set includes: carrying out chart category screening on the initial chart data set to obtain a screened chart data set; performing chart generation sorting on the screened chart data set to obtain a sorted chart data set; carrying out chart data filling on the sorted chart data set to obtain a filled chart data set; carrying out chart data grouping on the filled chart data set to obtain a grouped chart data set; and performing chart data vacancy on the grouped chart data set to obtain a target chart data set.
In one embodiment of the present invention, the chart category filtering is in a key-value (key-value) form, i.e., the initial chart data corresponding to the same key value is divided together.
In one embodiment of the present invention, the chart generation ordering is implemented by a preset ordering rule, where the preset ordering rule includes: ASC (increment, null before), DESC (decrement, null before), ASCNULL (increment, null after), desnull (decrement, null after).
In one embodiment of the present invention, the graph data padding is implemented by binary coding, and is used for performing a serialization process on discontinuous section data. Wherein the two-level system encoding comprises: chart data encoding is carried out from low order to high order, namely the first order 0 represents that the data with empty tail is intercepted according to the date range filling data 1; the second bit, 0, indicates that discrete data is held and 1 indicates that padding is required for serialization.
In one embodiment of the invention, the chart data groups are grouped according to attributes that populate the chart dataset, i.e., data that will generate the same chart is grouped together.
In one embodiment of the present invention, the chart data vacancy is implemented by an EMPTY rule, where the EMPTY rule includes [ "# REMOVAL": { "EMPTY": true "} for specifying that chart vacancy processing is required if the data is EMPTY.
And S4, carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set.
It should be understood that, in the process of generating a graph of a BI system, the enumerated values of corresponding graph data need to be converted and the corresponding graph data hierarchy relationship needs to be identified, so that in the embodiment of the present invention, a preset filter is used to perform graph configuration on the target graph data to ensure the premise of graph generation. Wherein, the preset filter is compiled by Java language, which includes: graph filters, global filters, and auto filters.
In detail, referring to fig. 2, the performing graph configuration on the target graph data set by using a preset filter to obtain a configured graph data set includes:
s20, converting enumerated data in the target chart data set by using the chart filter to obtain a converted chart data set;
s21, carrying out chart hierarchy association on the conversion chart data set by using the global filter to obtain an associated chart data set;
and S22, carrying out chart classification configuration on the associated chart data set by using the automatic filter to obtain a configured chart data set.
In an optional embodiment, the enumeration data conversion is implemented by a conversion rule configured in advance in the graph filter, and the conversion rule includes: { "D0009900005" { "ALL": ALL "}, meaning a conversion of the value" ALL "to ALL" to effect a name conversion of the enumerated value for subsequent chart presentation at the front end.
In an optional embodiment, the chart hierarchy association is implemented by an association rule configured in advance in the global filter, and the association rule includes: [ # GLODIM ": {" D0096800001": {" D0000100105": {" D0009800003": {" title ":" team "," rename ": {" ALL ": ALL" }, "remove": { "ALL": "}," title ": lines", "rename": { "ALL": full area "}," nochild ": {" ALL ":" }, "title" }, "battle area", "rename": { "ALL": full line "}," nochild ": wherein the title configures a specified current level title, the rename specifies a name conversion rule, and the nochild indicates that child generation of child-level data is terminated upon encountering the specified value, and the child filters some specified data without production.
In an optional embodiment, the chart classification configuration is implemented by a classification rule configured in advance in an automatic filter, and the classification rule includes: [ MANDIM ": {" jsz ": {" # CHDCODE ": jsz", "# CHILDREN": { "0": { "name": increase, "# CHDCODE": jsr "," # CHILDREN ": {" 0": {" name ": move" } } and "} LDREN" { "name": decrease "} wherein, # MANDIM is the key of the auto-screener configuration, # CHDCEN represents the code value of its sub-level screener, # CHIODEN represents the enumeration of the sub-level screener, the key of # CHIEN is the value of the screening option, and name specifies the name of the value.
Further, in order to ensure the reusability and privacy of the configuration chart data set, the configuration chart data set can also be stored in a blockchain node.
And S5, carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
In the embodiment of the invention, a pre-created text template engine is utilized to carry out page interface analysis on the configuration chart data set, and a corresponding page chart is generated. The page diagram can be in display forms such as pie, tree, bar and the like. The text template engine includes a server side template engine (Ejs template).
In detail, the performing page interface analysis on the configuration chart data set by using a pre-created text template engine to generate a corresponding page chart includes: and analyzing the text format of the configuration chart data set by using the text template engine to obtain a text chart set, and transmitting the text chart set to a page interface to obtain a corresponding page chart.
The text format comprises a josn format text, an xml format text and the like, and the page interface refers to a visual page configured in the BI system and is used for visually displaying a page chart. Optionally, the transmission of the text chart set is implemented by a herf tag.
The method comprises the steps of firstly obtaining chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model which is created in a database in advance, selecting the chart data acquisition model of which the matching value is larger than a preset threshold value, acquiring data corresponding to the chart data to be generated from the database based on the selected chart data acquisition model to obtain an initial chart data set, preprocessing the initial chart data set to obtain a target chart data set, avoiding the problem of data throughput of the database caused by excessive chart data acquisition, improving the interface performance of the database and further improving the chart generation efficiency; secondly, the chart configuration is carried out on the target chart data set by utilizing a preset filter to obtain a configured chart data set, so that the redundant phenomenon of excessive data codes is avoided, and the chart generation efficiency is improved; further, in the embodiment of the present invention, a pre-created text template engine is used to perform page interface analysis on the configuration chart data set, so as to generate a corresponding page chart. Therefore, the page chart generation method, the page chart generation device, the electronic equipment and the storage medium can improve the page chart generation efficiency.
FIG. 3 is a functional block diagram of the page table generating apparatus according to the present invention.
The page diagram generating apparatus 100 of the present invention may be installed in an electronic device. According to the realized functions, the page diagram generating device can include a selecting module 101, an acquiring module 102, a preprocessing module 103, a configuring module 104 and a generating module 105. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the selection module 101 is configured to obtain chart data to be generated, calculate a matching value between the chart data to be generated and a chart data acquisition model created in a database in advance, and select a chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
the acquisition module 102 is configured to acquire, based on the target chart data acquisition model, data corresponding to the chart data to be generated from the database to obtain an initial chart data set;
the preprocessing module 103 is configured to perform preprocessing operation on the initial chart data set to obtain a target chart data set;
the configuration module 104 is configured to perform chart configuration on the target chart data set by using a preset filter to obtain a configuration chart data set;
the generating module 105 is configured to perform page interface analysis on the configuration chart data set by using a pre-created text template engine, and generate a corresponding page chart.
In detail, when the modules in the page diagram generating apparatus 100 in the embodiment of the present invention are used, the same technical means as the page diagram generating method described in fig. 1 and fig. 2 are adopted, and the same technical effect can be produced, and details are not described here.
Fig. 4 is a schematic structural diagram of an electronic device implementing the method for generating a page diagram according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a page table generating program 12, stored in the memory 11 and operable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as a page table generation code, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., performing page table generation, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 4 only shows an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The page table generation 12 stored in the memory 11 of the electronic device 1 is a combination of a plurality of computer programs, which when executed in the processor 10, may implement:
acquiring chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
preprocessing the initial chart data set to obtain a target chart data set;
carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set;
and carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
preprocessing the initial chart data set to obtain a target chart data set;
carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set;
and carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules 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.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A page diagram generation method, characterized in that the method comprises:
acquiring chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
preprocessing the initial chart data set to obtain a target chart data set;
carrying out chart configuration on the target chart data set by using a preset filter to obtain a configured chart data set;
and carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
2. The method for generating page diagrams according to claim 1, wherein before calculating the matching value between the diagram data to be generated and the diagram data collection model created in the database in advance, the method further comprises:
acquiring all data tables of the database, and clustering the data tables of the same type to obtain one or more initial data tables;
and calculating the expected value of each initial data table, and taking the initial data tables with the same expected values as chart data acquisition models.
3. The page table generating method of claim 2, wherein said calculating an expected value for each of said initial data tables comprises:
calculating an expected value for each of the initial data tables using:
Figure FDA0002851059970000011
wherein ,CiIndicating the expected value of the ith initial data table, EiA feature vector representing the ith initial data table,
Figure FDA0002851059970000012
represents the eigenvector covariance of the ith initial data table, and trace () represents the spatial filter function.
4. The method for generating page diagrams according to claim 1, wherein the calculating a matching value between the diagram data to be generated and a diagram data collection model created in a database in advance comprises:
acquiring the same field of the to-be-generated chart data and the field in the chart data acquisition model, and identifying the same field to obtain a target field set;
summarizing the field length of each field in the to-be-generated chart data to obtain a first field length value, summarizing the field length of each field in the chart data acquisition model to obtain a second field length value, summarizing the field length of each field in the target field set to obtain a third field length value;
calculating the ratio of the length value of the third field to the length value of the first field to obtain a first ratio, and calculating the ratio of the length value of the third field to the length value of the second field to obtain a second ratio;
and calculating a matching value between the chart data to be generated and the chart data acquisition model according to the first ratio and the second ratio.
5. The method for generating a page diagram of claim 1, wherein said pre-processing said initial diagram dataset to obtain a target diagram dataset comprises:
carrying out chart category screening on the initial chart data set to obtain a screened chart data set;
performing chart generation sorting on the screened chart data set to obtain a sorted chart data set;
carrying out chart data filling on the sorted chart data set to obtain a filled chart data set;
carrying out chart data grouping on the filled chart data set to obtain a grouped chart data set;
and performing chart data vacancy on the grouped chart data set to obtain a target chart data set.
6. The method for generating a page diagram according to claim 1, wherein the step of performing diagram configuration on the target diagram data set by using a preset filter to obtain a configured diagram data set comprises:
converting enumerated data in the target chart data set by using a chart screener in the screeners to obtain a converted chart data set;
carrying out chart level association on the conversion chart data set by utilizing a global filter in the filters to obtain an associated chart data set;
and carrying out chart classification configuration on the associated chart data set by utilizing an automatic filter in the filters to obtain a configured chart data set.
7. The method for generating page diagrams according to any one of claims 1 to 6, wherein the generating a corresponding page diagram by performing page interface parsing on the configuration diagram dataset by using a pre-created text template engine comprises:
and analyzing the text format of the configuration chart data set by using the text template engine to obtain a text chart set, and transmitting the text chart set to a page interface to obtain a corresponding page chart.
8. An apparatus for generating a page table, the apparatus comprising:
the selection module is used for acquiring the chart data to be generated, calculating a matching value of the chart data to be generated and a chart data acquisition model created in a database in advance, and selecting the chart data acquisition model with the matching value larger than a preset threshold value to obtain a target chart data acquisition model;
the acquisition module is used for acquiring data corresponding to the chart data to be generated from the database based on the target chart data acquisition model to obtain an initial chart data set;
the preprocessing module is used for preprocessing the initial chart data set to obtain a target chart data set;
the configuration module is used for carrying out chart configuration on the target chart data set by utilizing a preset filter to obtain a configuration chart data set;
and the generating module is used for carrying out page interface analysis on the configuration chart data set by utilizing a pre-created text template engine to generate a corresponding page chart.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the page table generating method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the page table generating method according to any one of claims 1 to 7.
CN202011527503.6A 2020-12-22 2020-12-22 Page chart generation method and device, electronic equipment and storage medium Active CN112560416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011527503.6A CN112560416B (en) 2020-12-22 2020-12-22 Page chart generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011527503.6A CN112560416B (en) 2020-12-22 2020-12-22 Page chart generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112560416A true CN112560416A (en) 2021-03-26
CN112560416B CN112560416B (en) 2023-09-15

Family

ID=75030792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011527503.6A Active CN112560416B (en) 2020-12-22 2020-12-22 Page chart generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112560416B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656431A (en) * 2021-08-13 2021-11-16 辽宁华盾安全技术有限责任公司 Graph display method based on big data
CN113807066A (en) * 2021-09-16 2021-12-17 东软集团股份有限公司 Chart generation method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004029755A2 (en) * 2002-09-27 2004-04-08 Enviance, Inc. Automated report building system
WO2009154484A2 (en) * 2008-06-20 2009-12-23 Business Intelligence Solutions Safe B.V. Methods, apparatus and systems for data visualization and related applications
WO2014096453A1 (en) * 2012-12-21 2014-06-26 What-Ifolution Bv Method and system for visualizing and manipulating graphic charts
US20140351158A1 (en) * 2013-05-24 2014-11-27 Bank Of America Corporation Use of organization chart to direct mail items from central receiving area to organizational entities
US20200042626A1 (en) * 2018-07-31 2020-02-06 Splunk Inc. Identifying similar field sets using related source types

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004029755A2 (en) * 2002-09-27 2004-04-08 Enviance, Inc. Automated report building system
WO2009154484A2 (en) * 2008-06-20 2009-12-23 Business Intelligence Solutions Safe B.V. Methods, apparatus and systems for data visualization and related applications
WO2014096453A1 (en) * 2012-12-21 2014-06-26 What-Ifolution Bv Method and system for visualizing and manipulating graphic charts
US20140351158A1 (en) * 2013-05-24 2014-11-27 Bank Of America Corporation Use of organization chart to direct mail items from central receiving area to organizational entities
US20200042626A1 (en) * 2018-07-31 2020-02-06 Splunk Inc. Identifying similar field sets using related source types

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656431A (en) * 2021-08-13 2021-11-16 辽宁华盾安全技术有限责任公司 Graph display method based on big data
CN113807066A (en) * 2021-09-16 2021-12-17 东软集团股份有限公司 Chart generation method and device and electronic equipment

Also Published As

Publication number Publication date
CN112560416B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN112052370A (en) Message generation method and device, electronic equipment and computer readable storage medium
CN112541745A (en) User behavior data analysis method and device, electronic equipment and readable storage medium
CN112052242A (en) Data query method and device, electronic equipment and storage medium
CN112115152B (en) Data increment updating and inquiring method and device, electronic equipment and storage medium
CN112115145A (en) Data acquisition method and device, electronic equipment and storage medium
CN112560416B (en) Page chart generation method and device, electronic equipment and storage medium
CN112883042A (en) Data updating and displaying method and device, electronic equipment and storage medium
CN111768096A (en) Rating method and device based on algorithm model, electronic equipment and storage medium
CN112231417A (en) Data classification method and device, electronic equipment and storage medium
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN112579621A (en) Data display method and device, electronic equipment and computer storage medium
CN113268665A (en) Information recommendation method, device and equipment based on random forest and storage medium
CN114979120A (en) Data uploading method, device, equipment and storage medium
CN112949278A (en) Data checking method and device, electronic equipment and readable storage medium
CN111932147A (en) Visualization method and device for overall index, electronic equipment and storage medium
CN111352955A (en) Index data query method and device, electronic equipment and storage medium
CN113435308B (en) Text multi-label classification method, device, equipment and storage medium
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
CN112948380A (en) Data storage method and device based on big data, electronic equipment and storage medium
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN113064928A (en) Report data query method and device, electronic equipment and storage medium
CN114840631A (en) Spatial text query method and device, electronic equipment and storage medium
CN115114297A (en) Data lightweight storage and search method and device, electronic equipment and storage medium
CN114238375A (en) Index query method and device, electronic equipment and storage 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