CN117574861A - Method, device, equipment and storage medium for summarizing table data - Google Patents
Method, device, equipment and storage medium for summarizing table data Download PDFInfo
- Publication number
- CN117574861A CN117574861A CN202311483306.2A CN202311483306A CN117574861A CN 117574861 A CN117574861 A CN 117574861A CN 202311483306 A CN202311483306 A CN 202311483306A CN 117574861 A CN117574861 A CN 117574861A
- Authority
- CN
- China
- Prior art keywords
- data
- service data
- original
- target
- identifier
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000008569 process Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000003442 weekly effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 239000003999 initiator Substances 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/174—Form filling; Merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention belongs to the technical field of computers, and discloses a method, a device, equipment and a storage medium for summarizing table data; the method comprises the following steps: acquiring a row identifier and a column identifier of a user target table; matching the row identification and the column identification with data in a preset middle business data table; locating the space coordinates of the row identifier and the column identifier in the original list data according to the matching result; determining target service data in the original list according to the space coordinates, and summarizing the target service data into a target table; according to the invention, the business data in each original data database is called from the intermediate database in a unified format by the business data needed by the customer, so that business data tables needed by the user are more conveniently and rapidly summarized, and the grid business work is better expanded, and the problem that when the table data is counted, the table data with different formats generated by different business data are required to be called, so that the data is not conveniently called, and the development of the business work is seriously influenced is solved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for summarizing table data.
Background
With the continuous development and running experience accumulation of smart grids, the power system accumulates a large amount of text and table data generated in the power field. The automation and intelligent degree in the running process of the power grid is relatively low, the system function integration is not strong, the text and form data are mostly from different businesses or platforms, the formats are not uniform, unstructured text and form data bring great difficulty to the extraction and summarization of knowledge information, and how to fully and effectively utilize the experience knowledge and establish a knowledge base in the electric power field is a problem to be paid attention to.
In the collection and statistics of power grid business data, the data report is widely used. The special requirements of different occasions, different units and different personnel on the report form are met, so that the data report form is not in a standard format and can be found in various forms when in use, the data report form cannot be designed into a uniform format, and the processing progress of different personnel on the work task is different due to personalized difference of the task execution efficiency, so that the feedback time of the task execution result is also different.
Along with the gradual popularization of computer office systems, the function of the data form capable of being customized is very popular, the function of the data form capable of being customized brings great convenience to data reporting, but different reporting agents respectively report to an initiator in a file form, and the reporting information of the reporting agents is manually collected by the initiator.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for summarizing table data, and aims to solve the technical problems that the prior art is inconvenient for calling table data of different formats, and original business data of different formats are difficult to summarize and update in time, so that business work cannot be carried out better.
In order to achieve the above object, the present invention provides a table data summarizing method, which includes the following steps:
acquiring a row identifier and a column identifier of a user target table;
matching the row identifiers and the column identifiers with data in a preset intermediate service data table, wherein the preset intermediate service data table comprises space coordinates of original data corresponding to each row identifier and each column identifier;
When the matching is successful, the space coordinates of the row identifiers and the column identifiers in the original list data are obtained from the preset intermediate service data table;
and determining target service data in the original list according to the space coordinates, and summarizing the target service data into the target table.
Optionally, the target table includes a preset table and a pre-constructed table;
the obtaining the row identifier and the column identifier of the user target table comprises the following steps:
when the target table is a preset table, obtaining a row identifier and a column identifier according to a table header in the preset table;
when the target table is a pre-constructed table, determining a pre-constructed table type according to the current time, and determining row identifiers and column identifiers of the pre-constructed table according to the pre-constructed table type.
Optionally, before the matching between the row identifier and the column identifier and the data in the preset intermediate service data table, the method further includes:
analyzing each original list to obtain the format type of each original list;
determining the reading operation corresponding to each original list according to the format type;
reading the original list according to the reading operation to obtain original service data in each original list;
And constructing a preset intermediate service data table according to the original service data.
Optionally, the constructing a preset intermediate service data table according to the original service data includes:
deleting blank rows and blank columns in the original service data, deleting repeated data in the original service data, and obtaining cleaned original service data;
positioning the original business data according to the coordinates of each original business data in the original list to obtain a reference position of the original business data, wherein the reference position comprises a row identifier and a column identifier;
and constructing a preset intermediate service data table according to the cleaned original service data and the reference position of the original service data.
Optionally, the constructing a preset intermediate service data table according to the cleaned original service data and the reference position of the original service data includes:
acquiring an initial intermediate service data table, and matching the header of the initial intermediate service data table with the reference position of the original service data;
when the head of the initial intermediate service data table is successfully matched with the row identifier and the column identifier of the reference position, writing the original service data into the initial intermediate service data based on the row identifier and the column identifier to obtain a preset intermediate service data table;
When the matching of the table head of the initial intermediate service data table with the row identifier and the column identifier of the reference position fails, updating the table head of the initial intermediate service data table based on the row identifier and the column identifier, and writing the original service data into the initial intermediate service data table based on the updated table head of the initial intermediate service data table to obtain a preset intermediate service data table.
Optionally, the determining the target service data in the original list according to the spatial coordinates, and summarizing the target service data to the target table includes:
positioning reference original service data in an original list according to the space coordinates;
acquiring a data format of the reference original service data;
taking the reference original service data, the space coordinates and the data format as target service data;
and writing each target service data into the target table.
Optionally, the determining the target service data in the original list according to the spatial coordinates, and after summarizing the target service data to the target table, further includes:
acquiring space coordinates of each target service data in a target table;
Obtaining real-time service data corresponding to each target service data according to the space coordinates, wherein the target service data comprises at least one corresponding real-time service data;
calculating according to the real-time service data to obtain reference real-time data;
when the real-time service data is inconsistent with the reference real-time data, updating the target service data according to the real-time service data;
and when the real-time service data is inconsistent with the reference real-time data, not updating the target service data.
In addition, in order to achieve the above object, the present invention also provides a table data summarizing device, including:
the parameter acquisition module is used for acquiring the row identifier and the column identifier of the user target table;
the business data positioning module is used for matching with data in a preset intermediate business data table according to the row identifiers and the column identifiers, wherein the preset intermediate business data table comprises space coordinates of original data corresponding to each row identifier and each column identifier;
the service data positioning module is further configured to obtain, when the matching is successful, spatial coordinates of the row identifier and the column identifier in original list data from the preset intermediate service data table;
And the data summarizing module is used for determining target service data in the original list according to the space coordinates and summarizing the target service data to the target table.
In addition, to achieve the above object, the present invention also proposes a form data summarizing apparatus, including: a memory, a processor, and a tabular data summarization program stored on the memory and executable on the processor, the tabular data summarization program configured to implement the steps of the tabular data summarization method as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a table data summarizing program which, when executed by a processor, implements the steps of the table data summarizing method as described above.
According to the invention, the business data in each original data database is called from the intermediate database in a unified format by the business data needed by the customer, so that business data tables needed by the user are more conveniently and rapidly summarized, and the grid business work is better expanded, and the problem that when the table data is counted, the table data with different formats generated by different business data are required to be called, so that the data is not conveniently called, and the development of the business work is seriously influenced is solved.
Drawings
FIG. 1 is a schematic diagram of a configuration of a tabular data summarizing device of a hardware runtime environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a table data summarizing method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a target table generation process according to an embodiment of the table data summarizing method of the present invention;
FIG. 4 is a flowchart of a second embodiment of a table data summarizing method according to the present invention;
fig. 5 is a block diagram showing the structure of a first embodiment of the tabular data summarizing apparatus of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a table data summarizing device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the tabular data summarization apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 1 does not constitute a limitation of the table data summarizing apparatus, and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a form data summarization program may be included in the memory 1005 as one type of storage medium.
In the tabular data summarization apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the table data summarizing device of the present invention may be disposed in the table data summarizing device, where the table data summarizing device calls a table data summarizing program stored in the memory 1005 through the processor 1001, and executes the table data summarizing method provided by the embodiment of the present invention.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a table data summarizing method according to the present invention.
In this embodiment, the table data summarizing method includes the following steps:
Step S10: and acquiring a row identifier and a column identifier of the user target table.
It is understood that the target table includes a preset table and a pre-built table.
It should be noted that, the preset table may be a table object created by the user according to the personal requirement, where a table frame may be already constructed, and the table frame includes a corresponding row identifier and a column identifier; the pre-built table may be a table that is created autonomously according to the data period required by the user. The autonomously created table may be created according to a preset period template, for example, weekly line loss data of the power grid, monthly line loss data of the power grid, and quarterly line loss data of the power grid.
It is emphasized that the row and column identifications corresponding to weekly line loss data may be determined, but weekly and monthly line loss data are not used as calculation means.
It should be understood that the row identifier and the column identifier may be simply understood as a header in the table data, an identifier for classifying and locating the data, the row identifier may be understood as locating the current row of data, the column identifier represents locating the column of data, the position of a data in the two-dimensional table may be accurately located according to the row identifier and the column identifier corresponding to the data, and the target table and the row identifier and the column identifier may refer to the following table 1:
Referring to table 1, the grid line loss data quarter data table can be understood as a pre-constructed table, the grid line loss data quarter data table is automatically created at the beginning of each quarter, and line loss data such as line loss standard reaching numbers, standard reaching rates, custom threshold standard reaching rates, economic operation numbers and economic operation rates of power supply centers 1-5 are counted, wherein the rows are identified as the power supply centers 1-5 (management units), and the columns are identified as the standard reaching numbers, standard reaching rates, custom threshold standard reaching rates, economic operation numbers and economic operation rates (standard reaching conditions).
It should be noted that, when the target table is a preset table, the row identifier and the column identifier are obtained according to the header in the preset table, the preset table may be understood as a table header already constructed, the row identifier and the column identifier are identified from the header, and then the corresponding data table may be filled according to the column identifier and the row identifier. When the target table is a pre-constructed table, determining a pre-constructed table type according to the current time, and determining row identifiers and column identifiers of the pre-constructed table according to the pre-constructed table type, wherein the pre-constructed table can be understood as a table which is automatically created periodically according to a template, and the periodic table can be understood as a plurality of types, such as a week data table, a month data table, a quarter data table, a half year data table and a year data table.
It should be noted that, the execution body of the embodiment is a table data summarizing device, where the table data summarizing device has functions of data processing, data communication, program running, and the like, and the table data summarizing device may be an integrated controller, a control computer, or other devices with similar functions, which is not limited in this embodiment.
Step S20: and matching the row identifiers and the column identifiers with data in a preset intermediate service data table, wherein the preset intermediate service data table comprises space coordinates of original data corresponding to each row identifier and each column identifier.
It is understood that the preset intermediate service data table is an intermediate database constructed by integrating table data of a plurality of services of the power grid, and the intermediate database comprises all historical data of the power grid and data generated continuously at present.
It should be noted that, the preset intermediate service data table may be divided according to the type of the data, and the data of the same type is divided into the same area for storage, so that the data of the type can be found more quickly through the data type corresponding to the row identifier and the column identifier of the target table.
Furthermore, the preset middle service data table may also locate data based on the row identifier and the column identifier, for example, the data where the same row identifier is located is determined from the preset middle service data table, and then the data of the same column identifier is found from the data corresponding to the row identifier.
Furthermore, the preset intermediate service data table may be a three-dimensional data table, in which data of the same row identifier and column identifier are arranged and recorded based on time sequence, and the three-dimensional data table may be simply understood as a plurality of two-dimensional data tables with the same row identifier and column identifier, and each two-dimensional data table records service data under different time.
It can be understood that, matching is performed according to the row identifier and the column identifier with data in a preset intermediate service data table, where the preset intermediate service data table includes spatial coordinates of original data corresponding to each row identifier and each column identifier, and matching the row identifier with the row identifier in the preset intermediate service data table, and performing column identifier matching in the same row identifier data to obtain data of the same row identifier and column identifier, and meanwhile, based on data time corresponding to data required by the target table, further determining data in different time points corresponding to the same row identifier and the same column identifier more accurately according to the data time. For example, the power supply station 1 is a row identifier, the standard rate is a column identifier, but the standard rate of the power supply station 1 can include the standard rate of the power supply station 1 of the last month, and also can include the standard rate of the power supply station 1 of the last quarter, so that the data in the preset intermediate service data table can be more accurately positioned according to the requirement of the target table.
Step S30: and when the matching is successful, the space coordinates of the row identifier and the column identifier in the original list data are obtained from the preset intermediate service data table.
It can be understood that the matching result can be matching success or matching failure, if matching is successful, the space coordinates of the row identifier and the column identifier in the original list data are obtained from the preset intermediate service data table; if the matching fails, a prompt can be made, and the data is not found.
It should be understood that, data with different sources and different formats are recorded in the preset intermediate service data table, and meanwhile, the preset intermediate service data table may be recorded with data, a row identifier, a column identifier corresponding to the data, an original table of the data, and a format of the original table.
It is understood that the spatial coordinates may be where the source document of the successfully allocated data for the row and column identifiers is, the location of the data corresponding to the row and column identifiers in the source document, and the format of the source document.
Step S40: and determining target service data in the original list according to the space coordinates, and summarizing the target service data into the target table.
It is understood that the target service data may be data corresponding to the row identifier and the column identifier in the original table in the user target table.
It should be understood that there are a plurality of row identifiers and a plurality of column identifiers in the target table, and each row identifier and each column identifier may correspondingly form one target service data, and data corresponding to each row identifier and each column identifier in the target table is filled into the target table.
It should be noted that, according to the row identifier and the column identifier of the target table, data searching is performed from the preset intermediate service data table to obtain an index (which may be simply understood as a space coordinate) of the target service data, an original table storing the target service data is found based on the index, a position of the target service data in the original table is located according to a specific space coordinate in the index, data extraction is performed based on the position, and the extracted data is filled into the target table, which can be referred to in detail in fig. 3.
It should be further noted that, the determining the target service data in the original list according to the spatial coordinate, and summarizing the target service data to the target table may be positioning the reference original service data in the original list according to the spatial coordinate; acquiring a data format of the reference original service data; taking the reference original service data, the space coordinates and the data format as target service data; and writing each target service data into the target table.
It can be understood that the original list where the data corresponding to the row identifier and the column identifier are located can be found according to the space coordinates, and then the reference original service data corresponding to the row identifier and the column identifier in the original list is further obtained through the space coordinates.
It should be understood that the formats of the original list are not the same, and may be CSV formats, which can read text content through an algorithm; an xls format is also possible, which can be read by a generic structured query statement; an xlsx format is also possible, which can be read by the format operation interface.
It can be understood that each target service data in the target table includes the spatial coordinates and the data format of the target service data, so that when the subsequent original list is changed, the target table can be correspondingly adjusted according to the change of the data in the original list.
It should be emphasized that, after determining the target service data in the original list according to the spatial coordinates and summarizing the target service data to the target table, the method further includes:
acquiring space coordinates of each target service data in a target table; obtaining real-time service data corresponding to each target service data according to the space coordinates, wherein the target service data comprises at least one corresponding real-time service data; calculating according to the real-time service data to obtain reference real-time data; when the real-time service data is inconsistent with the reference real-time data, updating the target service data according to the real-time service data; and when the real-time service data is inconsistent with the reference real-time data, not updating the target service data.
It can be understood that each corresponding target service data in the target table can be synchronously changed along with the data in the original table, if the corresponding target service data is not synchronously changed, the real-time service data corresponding to the target service data can be obtained, and whether the target service data needs to be adjusted according to the real-time service data is judged.
It should be understood that the real-time service data may be data that may change with time, and may be one of data in an original table, where one target service data may be calculated from a plurality of real-time service data, and if the target service data includes a plurality of real-time service data, the target service data includes spatial coordinates of a plurality of real-time service data.
It should be noted that when the real-time service data is inconsistent with the reference real-time data, it can be understood that the real-time service data in the original table changes, but the data in the target table is not updated in time, the target service data is updated according to the real-time service data, so that the data in the target table is ensured to be synchronous with the real-time data, more accurate table data is obtained, and the service work is convenient to develop.
According to the embodiment, the business data in each original data database is called through the business data required by the client in the unified format of the intermediate database, so that business data tables required by the user are directly obtained by summarizing the data of each party more conveniently and rapidly, the grid business work is better expanded, and the problem that when the table data is counted, the table data with different formats generated by calling different business data is required, so that the data calling is not convenient enough, and the development of the business work is seriously affected is solved.
Referring to fig. 4, fig. 4 is a flowchart of a table data summarizing method according to a second embodiment of the present invention.
Based on the first embodiment, the table data summarizing method of the present embodiment further includes, before the step S20:
step S201: and analyzing each original list to obtain the format type of each original list.
It is understood that the original list may be a data table collected from multiple departments or multiple businesses, and the original list may be one or more.
It should be understood that parsing the original list may be analyzing the underlying code that constructs the original list to determine the corresponding format, where the original list may be constructed in a format including csv, xls, xlsx.
Step S202: and determining the reading operation corresponding to each original list according to the format type.
It can be understood that the underlying logic of tables of different format types is different, and the corresponding read types used to read the data in the original table are not the same.
It should be noted that, if the format of the original list is csv, identifying and reading the text content therein through CTC (Conectionist Temporal Classification) algorithm, sequence2Sequence algorithm and OCR text recognition algorithm; if the format of the original list is xls, the data can be read by using general structured query sentences such as OLEDB (Object Linking and Embedding, database, also called OLE DB or OLE-DB), a COM-based data storage object, which can provide operations on all types of data, and even access the data under the offline condition); if the format of the original list is xlsx, the data can be read directly through the format operation interface.
It should be understood that after extracting the data in each original list, the data information in the original list may be converted into the same standardized format by the adapter and stored in the preset intermediate service data table.
Step S203: and reading the original list according to the reading operation to obtain the original service data in each original list.
It can be understood that the reading operation can be understood as a corresponding reading mode determined according to the format of the original list, and after the reading mode is determined, reading data according to the corresponding reading mode of each original list.
It should be understood that reading the data in the original list includes reading the data content in the original list, and further includes the spatial coordinates of the data in the database, and the corresponding row coordinates and column coordinates, to obtain the original service data in the original list.
Step S204: and constructing a preset intermediate service data table according to the original service data.
It can be understood that the original service data is obtained after extracting the data information in each original list, and then the original service data in each original list is converted into the same standard format for storage, so as to obtain the preset intermediate service data table.
It should be emphasized that the constructing the preset intermediate service data table according to the original service data may be deleting blank rows and blank columns in the original service data, deleting repeated data in the original service data, and obtaining cleaned original service data; positioning the original business data according to the coordinates of each original business data in the original list to obtain a reference position of the original business data, wherein the reference position comprises a row identifier and a column identifier; and constructing a preset intermediate service data table according to the cleaned original service data and the reference position of the original service data.
It can be understood that some blank data, or error data, such as blank rows or blank columns in time, or data with only row identifiers or only column identifiers, may exist in the process of extracting the original service data according to the original list, and some repeated data may also exist, so that the data needs to be cleaned to obtain the final accurate and effective original service data.
Wherein, each original service data has a corresponding row identifier and a column identifier in the original list, and a reference position (which can be understood as a space coordinate) of the original service data can be obtained according to the row identifier and the column identifier; furthermore, the positioning of the original service data may be that the original service data is directly positioned at the spatial position of the original service data in the original list, and the spatial position of the original service data in the original list is used as the spatial coordinate of the original service data.
The construction of the preset intermediate service data table according to the cleaned original service data and the reference position of the original service data comprises the following steps:
acquiring an initial intermediate service data table, and matching the header of the initial intermediate service data table with the reference position of the original service data; when the head of the initial intermediate service data table is successfully matched with the row identifier and the column identifier of the reference position, writing the original service data into the initial intermediate service data based on the row identifier and the column identifier to obtain a preset intermediate service data table; when the matching of the table head of the initial intermediate service data table with the row identifier and the column identifier of the reference position fails, updating the table head of the initial intermediate service data table based on the row identifier and the column identifier, and writing the original service data into the initial intermediate service data table based on the updated table head of the initial intermediate service data table to obtain a preset intermediate service data table.
Further, the initial intermediate service data table may be understood as an empty table, and when the initial intermediate service data table is stored according to the spatial position of the initial service data in the initial list, the header of the initial intermediate service data table may be simply a spatial coordinate, or a sequence number for marking the data stored in the initial intermediate service data table according to the storage sequence; if the original service data is stored in the initial intermediate service data table according to the row identifier and the column identifier of the original service data in the original list, the header of the initial intermediate service data table comprises the row identifier and the column identifier of each original data.
According to the method, the format types of the original lists are obtained through analysis of the original lists, the data of the original lists are read based on the incompatible format types and converted into the same standard format to be stored in the preset middle business data table, so that when the target table needs to be generated, the data of the original lists only need to be called from the preset middle business data table, the problem that when the table data are summed, the table data with different formats generated by different business data need to be called, the call to the data is inconvenient is solved, the business data tables needed by users are obtained by summarizing the data of all parties more conveniently and rapidly, and the development efficiency of business work is improved.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium is stored with a table data summarizing program, and the table data summarizing program realizes the steps of the table data summarizing method when being executed by a processor.
Referring to fig. 5, fig. 5 is a block diagram showing the configuration of a first embodiment of the table data summarizing apparatus of the present invention.
As shown in fig. 5, a table data summarizing apparatus according to an embodiment of the present invention includes:
a parameter obtaining module 10, configured to obtain a row identifier and a column identifier of a user target table;
the service data positioning module 20 is configured to match data in a preset intermediate service data table according to the row identifier and the column identifier, where the preset intermediate service data table includes spatial coordinates of original data corresponding to each row identifier and each column identifier;
the service data positioning module 20 is further configured to obtain, when the matching is successful, spatial coordinates of the row identifier and the column identifier in the original list data from the preset intermediate service data table;
and the data summarizing module 30 is configured to determine target service data in the original list according to the spatial coordinates, and summarize the target service data into the target table.
According to the embodiment, the business data in each original data database is called through the business data required by the client in the unified format of the intermediate database, so that business data tables required by the user are directly obtained by summarizing the data of each party more conveniently and rapidly, the grid business work is better expanded, and the problem that when the table data is counted, the table data with different formats generated by calling different business data is required, so that the data calling is not convenient enough, and the development of the business work is seriously affected is solved.
In an embodiment, the parameter obtaining module 10 is further configured to obtain, when the target table is a preset table, a row identifier and a column identifier according to a header in the preset table;
when the target table is a pre-constructed table, determining a pre-constructed table type according to the current time, and determining row identifiers and column identifiers of the pre-constructed table according to the pre-constructed table type.
In an embodiment, the service data positioning module 20 is further configured to parse each original list to obtain a format type of each original list;
determining the reading operation corresponding to each original list according to the format type;
reading the original list according to the reading operation to obtain original service data in each original list;
And constructing a preset intermediate service data table according to the original service data.
In an embodiment, the service data positioning module 20 is further configured to delete blank rows and blank columns in the original service data, delete duplicate data in the original service data, and obtain cleaned original service data;
positioning the original business data according to the coordinates of each original business data in the original list to obtain a reference position of the original business data, wherein the reference position comprises a row identifier and a column identifier;
and constructing a preset intermediate service data table according to the cleaned original service data and the reference position of the original service data.
In an embodiment, the service data positioning module 20 is further configured to obtain an initial intermediate service data table, and match a header of the initial intermediate service data table with a reference position of the original service data;
when the head of the initial intermediate service data table is successfully matched with the row identifier and the column identifier of the reference position, writing the original service data into the initial intermediate service data based on the row identifier and the column identifier to obtain a preset intermediate service data table;
When the matching of the table head of the initial intermediate service data table with the row identifier and the column identifier of the reference position fails, updating the table head of the initial intermediate service data table based on the row identifier and the column identifier, and writing the original service data into the initial intermediate service data table based on the updated table head of the initial intermediate service data table to obtain a preset intermediate service data table.
In an embodiment, the data summarizing module 30 is further configured to locate the reference original service data in the original list according to the spatial coordinates;
acquiring a data format of the reference original service data;
taking the reference original service data, the space coordinates and the data format as target service data;
and writing each target service data into the target table.
In one embodiment, the data summarizing module 30 is further configured to obtain spatial coordinates of each target service data in the target table;
obtaining real-time service data corresponding to each target service data according to the space coordinates, wherein the target service data comprises at least one corresponding real-time service data;
calculating according to the real-time service data to obtain reference real-time data;
When the real-time service data is inconsistent with the reference real-time data, updating the target service data according to the real-time service data;
and when the real-time service data is inconsistent with the reference real-time data, not updating the target service data.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily occurring in sequence, but may be performed alternately or alternately with other steps or at least a portion of the other steps or stages.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A tabular data summarization method, characterized in that the tabular data summarization method comprises:
acquiring a row identifier and a column identifier of a user target table;
matching the row identifiers and the column identifiers with data in a preset intermediate service data table, wherein the preset intermediate service data table comprises space coordinates of original data corresponding to each row identifier and each column identifier;
when the matching is successful, the space coordinates of the row identifiers and the column identifiers in the original list data are obtained from the preset intermediate service data table;
and determining target service data in the original list according to the space coordinates, and summarizing the target service data into the target table.
2. The method for summarizing table data according to claim 1, wherein the target table comprises a preset table and a pre-constructed table;
The obtaining the row identifier and the column identifier of the user target table comprises the following steps:
when the target table is a preset table, obtaining a row identifier and a column identifier according to a table header in the preset table;
when the target table is a pre-constructed table, determining a pre-constructed table type according to the current time, and determining row identifiers and column identifiers of the pre-constructed table according to the pre-constructed table type.
3. The method for summarizing table data according to claim 1, wherein before the matching between the row identifier and the column identifier and the data in the preset intermediate service data table, the method further comprises:
analyzing each original list to obtain the format type of each original list;
determining the reading operation corresponding to each original list according to the format type;
reading the original list according to the reading operation to obtain original service data in each original list;
and constructing a preset intermediate service data table according to the original service data.
4. The method for summarizing table data according to claim 3, wherein said constructing a preset intermediate service data table from said original service data comprises:
Deleting blank rows and blank columns in the original service data, deleting repeated data in the original service data, and obtaining cleaned original service data;
positioning the original business data according to the coordinates of each original business data in the original list to obtain a reference position of the original business data, wherein the reference position comprises a row identifier and a column identifier;
and constructing a preset intermediate service data table according to the cleaned original service data and the reference position of the original service data.
5. The method for summarizing table data according to claim 3, wherein said constructing a preset intermediate service data table according to said cleaned original service data and said reference position of said original service data comprises:
acquiring an initial intermediate service data table, and matching the header of the initial intermediate service data table with the reference position of the original service data;
when the head of the initial intermediate service data table is successfully matched with the row identifier and the column identifier of the reference position, writing the original service data into the initial intermediate service data based on the row identifier and the column identifier to obtain a preset intermediate service data table;
When the matching of the table head of the initial intermediate service data table with the row identifier and the column identifier of the reference position fails, updating the table head of the initial intermediate service data table based on the row identifier and the column identifier, and writing the original service data into the initial intermediate service data table based on the updated table head of the initial intermediate service data table to obtain a preset intermediate service data table.
6. The method for summarizing table data according to claim 1, wherein determining target service data in the original list according to the spatial coordinates, summarizing the target service data to the target table, comprises:
positioning reference original service data in an original list according to the space coordinates;
acquiring a data format of the reference original service data;
taking the reference original service data, the space coordinates and the data format as target service data;
and writing each target service data into the target table.
7. The method for summarizing table data according to any one of claims 1 to 6, wherein determining target service data in the original list according to the spatial coordinates, and summarizing the target service data to the target table, further comprises:
Acquiring space coordinates of each target service data in a target table;
obtaining real-time service data corresponding to each target service data according to the space coordinates, wherein the target service data comprises at least one corresponding real-time service data;
calculating according to the real-time service data to obtain reference real-time data;
when the real-time service data is inconsistent with the reference real-time data, updating the target service data according to the real-time service data;
and when the real-time service data is inconsistent with the reference real-time data, not updating the target service data.
8. A tabular data summarization apparatus, characterized in that the tabular data summarization apparatus comprises:
the parameter acquisition module is used for acquiring the row identifier and the column identifier of the user target table;
the business data positioning module is used for matching with data in a preset intermediate business data table according to the row identifiers and the column identifiers, wherein the preset intermediate business data table comprises space coordinates of original data corresponding to each row identifier and each column identifier;
the service data positioning module is further configured to obtain, when the matching is successful, spatial coordinates of the row identifier and the column identifier in original list data from the preset intermediate service data table;
And the data summarizing module is used for determining target service data in the original list according to the space coordinates and summarizing the target service data to the target table.
9. A tabular data summarization apparatus, the apparatus comprising: a memory, a processor, and a tabular data summarization program stored on the memory and executable on the processor, the tabular data summarization program configured to implement a tabular data summarization method as claimed in any one of claims 1 to 7.
10. A storage medium having stored thereon a tabular data summarization program which when executed by a processor implements the tabular data summarization method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311483306.2A CN117574861A (en) | 2023-11-08 | 2023-11-08 | Method, device, equipment and storage medium for summarizing table data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311483306.2A CN117574861A (en) | 2023-11-08 | 2023-11-08 | Method, device, equipment and storage medium for summarizing table data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117574861A true CN117574861A (en) | 2024-02-20 |
Family
ID=89894618
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311483306.2A Pending CN117574861A (en) | 2023-11-08 | 2023-11-08 | Method, device, equipment and storage medium for summarizing table data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117574861A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118277500A (en) * | 2024-03-05 | 2024-07-02 | 广东烟草清远市有限公司 | Data processing method and device, electronic device and storage medium |
-
2023
- 2023-11-08 CN CN202311483306.2A patent/CN117574861A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118277500A (en) * | 2024-03-05 | 2024-07-02 | 广东烟草清远市有限公司 | Data processing method and device, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108874926B (en) | Mass data query method, device, computer equipment and storage medium | |
US10387457B2 (en) | Grid-based analysis of geospatial trajectories | |
CN110292775B (en) | Method and device for acquiring difference data | |
CN110019754B (en) | Knowledge base building method, device and equipment | |
CN112613917A (en) | Information pushing method, device and equipment based on user portrait and storage medium | |
US11790380B2 (en) | Systems and methods for finding an interaction subset within a set of interactions | |
CN112241445B (en) | Labeling method and device, electronic equipment and storage medium | |
CN108572945A (en) | Create method, system, storage medium and the electronic equipment of report | |
CN114528413B (en) | Knowledge graph updating method, system and readable storage medium supported by crowdsourced marking | |
CN113032633A (en) | Method for customizing table by using reference data item | |
CN111324687A (en) | Data processing method and device in knowledge base, computer equipment and storage medium | |
CN117574861A (en) | Method, device, equipment and storage medium for summarizing table data | |
CN113792981B (en) | Efficiency statistics method, device and computer readable storage medium | |
CN111414361A (en) | Label data storage method, device, equipment and readable storage medium | |
CN110442653A (en) | Method, apparatus, server and the storage medium of incremental build CUBE model | |
CN115391439B (en) | Document data export method, device, electronic equipment and storage medium | |
CN111400289A (en) | Intelligent user classification method, server and storage medium | |
CN112800127B (en) | Data mining analysis method and device based on transaction bill | |
CN117150138B (en) | Scientific and technological resource organization method and system based on high-dimensional space mapping | |
CN118260273A (en) | Database storage optimization method, system and medium based on enterprise data | |
CN116308148A (en) | Activity flow processing method and device and electronic equipment | |
CN109885710B (en) | User image depicting method based on differential evolution algorithm and server | |
CN115438076A (en) | Universal rule screening method and device, computing equipment and readable storage medium | |
CN112116509A (en) | Thing allies oneself with wisdom house endowment service object management system | |
CN111209330A (en) | Method and system for identifying consistent actor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |