CN111125088A - Multi-level data processing method and device - Google Patents

Multi-level data processing method and device Download PDF

Info

Publication number
CN111125088A
CN111125088A CN201811291665.7A CN201811291665A CN111125088A CN 111125088 A CN111125088 A CN 111125088A CN 201811291665 A CN201811291665 A CN 201811291665A CN 111125088 A CN111125088 A CN 111125088A
Authority
CN
China
Prior art keywords
data
level
summarized data
summarized
row
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
CN201811291665.7A
Other languages
Chinese (zh)
Other versions
CN111125088B (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811291665.7A priority Critical patent/CN111125088B/en
Publication of CN111125088A publication Critical patent/CN111125088A/en
Application granted granted Critical
Publication of CN111125088B publication Critical patent/CN111125088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a multi-level data processing method and device. The method comprises the following steps: acquiring a multi-layer series group to be processed; traversing the multi-level array to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; according to the method and the device, the summarized data are inserted into the corresponding positions of the multi-level array according to the descending order of the row marks and the descending order of the levels.

Description

Multi-level data processing method and device
Technical Field
The invention relates to the field of data processing, in particular to a multi-level data processing method and device.
Background
Multilevel sorting collections are always a data processing method that separately computes an aggregate for multiple levels of data,
the multi-level classification summarization corresponds to a two-dimensional array, the summarization row is just one value of the array, and the corresponding data before summarization are as follows:
[ [ "Fujian province", "Fuzhou city", "Furniture",12744],
[ "Fujian province", "Fuzhou city", "Technology",13610],
[ "Fujian province", "Xiamen", "Furniture",45],
[ "Fujian province", "mansion city", "Technology",296]
The corresponding data after the summary are as follows:
[ [ "Fujian province", "Fuzhou city", "Furniture",12744],
[ "Fujian province", "Fuzhou city", "Technology",13610],
[ "Fujian province", "Fuzhou city", "subtotal", 26354],
[ "Fujian province", "Xiamen", "Furniture",45],
[ "Fujian province", "mansion city", "Technology",296],
[ "Fujian province", "mansion city", "county", 341],
[ "Fujian province", "subtotal", 26694]
But three rows of summary data are added.
When the multi-level classification summary calculation is performed, the existing scheme is to recursively traverse an array, perform the summary calculation from the last level, add a line of data after the calculation is completed, mark the line as a summary line, and cause the repeat and error of the summary calculation of the previous level without marking. For example, the summary of Fuzhou city and Xiamen city is calculated, then two lines of the calculated summary data are marked, and the summary data are skipped when the summary of Fujian province is calculated.
However, this calculation method needs to frequently mark the summary row, and each calculation needs to ignore all the data marked as the summary row, which is easy to make an error, difficult to maintain, and has poor performance when the data size is large.
Aiming at the problem that the calculation process of the multi-level classification summary in the related art is unreasonable, an effective solution is not provided at present.
Disclosure of Invention
The invention mainly aims to provide a multi-level data processing method and device to solve the problem that a multi-level classification and summarization calculation process is unreasonable.
In order to achieve the above object, according to an aspect of the present invention, there is provided a multi-level data processing method including: acquiring a multi-layer series group to be processed; traversing the multi-level series group to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; and inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row marks and the descending order of the levels.
Further, the obtaining of the multi-layer series group to be processed includes: sending a data request to a server; receiving a multi-level array returned by the server; and storing the returned multi-layer series group in a memory.
Further, after traversing the multi-level group of levels to calculate the summarized data of each level, the method further comprises: establishing a new data table in a memory; storing the summarized data of each level into the new data table.
Further, after adding a row label and a hierarchy for each summary data, the method further comprises: sorting the summarized data in the new data table according to the descending order of the row marks and the descending order of the levels to obtain sorted summarized data; the inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row labels and the descending order of the levels comprises the following steps: inserting summarized data into the corresponding positions of the multi-level array according to the sorted sequence; or after adding row headings and hierarchies for each summary data, the method further comprises: sorting the summarized data in the new data table according to the ascending order of the row marks and the ascending order of the levels to obtain sorted summarized data; the inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row labels and the descending order of the levels comprises the following steps: and inserting the summarized data into the corresponding positions of the multi-level array in a reverse order according to the sorted order.
Further, the method further comprises: judging whether the new data table is used or not; deleting the new data table if the new data table is not used.
Further, after inserting summary data into corresponding locations of the multi-level array, the method further comprises: reading the data in the inserted multi-level array; processing the data in the inserted multi-level array to obtain a processing result; and generating a visualized chart according to the processing result.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a multi-hierarchy data processing apparatus including: the acquisition unit is used for acquiring a multi-layer series group to be processed; the calculation unit is used for calculating the summarized data of each level by traversing the multi-level array; the marking unit is used for adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; and the inserting unit is used for inserting the summarized data into the corresponding position of the multi-level array according to the descending order of the row marks and the descending order of the levels.
Further, the acquisition unit includes: the sending module is used for sending a data request to the server; the receiving module is used for receiving the multi-level array returned by the server; and the storage module is used for storing the returned multi-layer series group into the memory.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a storage medium including a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the multi-level data processing method according to the present invention.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a processor for executing a program, wherein the program executes the multi-level data processing method according to the present invention.
The method comprises the steps of obtaining a multi-level array to be processed; traversing the multi-level array to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; the summarized data are inserted into the positions corresponding to the multi-level arrays according to the descending order of the row marks and the descending order of the levels, the problem that the multi-level classification summarizing calculation process is unreasonable is solved, and the effect that the calculation of the summarizing rows is more accurate is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a multi-level data processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a multi-level data processing method according to a second embodiment of the present invention; and
fig. 3 is a schematic diagram of a multi-level data processing apparatus according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a multi-level data processing method.
Fig. 1 is a flowchart of a multi-level data processing method according to a first embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102: acquiring a multi-layer series group to be processed;
step S104: traversing the multi-level array to calculate the summarized data of each level;
step S106: adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs;
step S108: and inserting the summarized data into the corresponding positions of the multi-level series groups according to the descending order of the line marks and the descending order of the levels.
The embodiment adopts the steps of obtaining a multi-layer series group to be processed; traversing the multi-level array to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; and the summarized data are inserted into the corresponding positions of the multi-level arrays according to the descending order of the row marks and the descending order of the levels, so that the problem that the multi-level classification and summarization calculation process is unreasonable is solved, and the effect of more accurate calculation of the summarized rows is achieved.
In the embodiment of the present invention, the multilevel array may be an array in which a certain dimension has a hierarchical characteristic, such as a region, a court, a government, a tax authority, and the like, the multilevel array to be processed may be a two-dimensional array, each piece of summarized data is marked after traversing the multilevel array to calculate a summarized row of each level, so as to distinguish which level array the summarized data corresponds to, the summarized data has two marks, one is a row mark and one is a level mark, each piece of summarized data is marked by a row mark and a level respectively, for example, a piece of summarized data is summarized of row 1 and row 2 data, the row mark of the summarized data is 2, which indicates that the summarized data is to be inserted into row 2, after all pieces of summarized data are calculated and marked, the summarized data is inserted into a position corresponding to the multilevel array according to the sequence of row mark descending and level descending order, that is, in the array of arranging from top to bottom, the order when inserting is according to the number of rows from bottom to top, promptly, the summary data of inserting makes the number of rows of whole array change, also can not influence the number of rows of inserting the array more than the summary data position, therefore the wrong problem is inserted to the number of rows can not appear.
The descending hierarchy order means that the hierarchies are ordered from high to low, for example, the hierarchies can be divided into province, city, county and county, and the descending hierarchy order is ordered according to the province, city, county and county. Specifically, if fuzhou city and mansion city are used as first-level indexes and fujian province is used as a second-level index, the descending order of the hierarchy means that the second level is arranged first and then the first level is arranged, and if fujian province is defined as the first level and fuzhou city and mansion city are defined as the second level, the descending order of the hierarchy means that the first level is arranged first and then the second level is arranged. Whatever the index level definition, the hierarchy is followed from high to low.
Optionally, the obtaining of the multi-layer series group to be processed includes: sending a data request to a server; receiving a multi-level array returned by the server; and storing the returned multi-layer series group in a memory.
Optionally, after traversing the multi-level group to calculate the summarized data of each level, establishing a new data table in the memory; the summarized data for each level is stored into a new data table.
In the embodiment of the invention, the multi-level classification summary can be applied to a browser, or can be applied to an application of a PC (personal computer) end or a mobile end, and after data is requested from a server, the server returns the data to the memory. And a data table is newly built in the memory and used for storing a summarized data array, after the summarized data of each hierarchy is calculated, the summarized data are stored in a new data table, and the summarized data can be stored sequentially or scattered during storage.
Optionally, after adding row marks and levels to each piece of summarized data, sorting the summarized data in the new data table according to the ascending order of the row marks and the descending order of the levels to obtain sorted summarized data; inserting the summarized data into the corresponding positions of the multi-level array according to the sorted sequence; or after adding row marks and levels to each piece of summarized data, sorting the summarized data in the new data table according to the ascending order of the row marks and the ascending order of the levels to obtain the sorted summarized data; and inserting the summarized data into the corresponding positions of the multi-level array in a reverse order according to the sorted order.
If the summarized data is stored scattered in the new data table, the summarized data needs to be sorted before insertion to ensure that the data sorting is correct when the data is inserted, and the data is sorted according to the order to be inserted when the data is sorted.
Optionally, judging whether the new data table is used; if the new data table is not used, the new data table is deleted.
In the process of inserting the summarized data into the multi-level group, the new data table is always used, and after the summarized data are all inserted into the multi-level group, the new data table is not used any more, so that whether the data insertion is completed or not can be determined by judging whether the new data table is used, and if the data insertion is completed, the new data table is deleted, so that the memory occupation is reduced.
Optionally, after the summarized data is inserted into the corresponding position of the multi-level array, reading the data in the inserted multi-level array; processing the data in the inserted multi-level array to obtain a processing result; and generating a visual chart according to the processing result.
After the summarized data are inserted into the positions corresponding to the multi-level data, a visual chart is generated according to the data in the multi-level array and displayed in a webpage, the data can be processed in the process of generating the visual chart according to the data, and the visual chart can be in a table form or a picture, graph and the like.
The embodiment of the present invention also provides a preferred implementation manner, and the following describes the technical solution of the embodiment of the present invention with reference to the preferred implementation manner.
Fig. 2 is a flowchart of a multi-level data processing method according to a second embodiment of the present invention, as shown in fig. 2, the method including:
and traversing the data to calculate all summarized data, recording the levels and data subscripts (namely row logos) of the summarized data, performing subscript descending order and level descending order sorting on all the summarized data (ensuring that the insertion order is correct), and inserting the summarized data into the original array.
The code part is referred to as follows:
Figure BDA0001850129890000061
according to the technical scheme, the operation of frequently marking the summary lines and filtering the summary lines during summary calculation is avoided by optimizing the multi-level classification summary calculation process, so that the codes are easier to maintain, the performance is improved, and the problems of difficult maintenance and performance caused by unreasonable multi-level classification summary calculation process are solved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the invention provides a multi-level data processing device, which can be used for executing the multi-level data processing method of the embodiment of the invention.
Fig. 3 is a schematic diagram of a multi-level data processing apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus including:
an obtaining unit 10, configured to obtain a multi-layer series group to be processed;
a calculating unit 20, configured to traverse the multi-level group to calculate summarized data of each level;
a marking unit 30, configured to add a row label and a hierarchy to each piece of summarized data, where the row label of the summarized data is a row number of the last piece of summarized data, and the hierarchy of the summarized data is a hierarchy to which the summarized data belongs;
and the inserting unit 40 is used for inserting the summarized data into the corresponding positions of the multi-level series groups according to the descending order of the row marks and the descending order of the levels.
The embodiment adopts an acquisition unit 10 for acquiring a multi-layer series group to be processed; the calculation unit is used for traversing the multi-level series group to calculate the summarized data of each level; a marking unit 20, configured to add a row label and a hierarchy to each piece of summarized data, where the row label of the summarized data is a row number of the last piece of summarized data, and the hierarchy of the summarized data is a hierarchy to which the summarized data belongs; and the inserting unit 30 is used for inserting the summarized data into the corresponding positions of the multi-level series groups according to the descending order of the row marks and the descending order of the levels. Therefore, the problem that the multi-level classification summarizing calculation process is unreasonable is solved, and the effect that the summarizing row is more accurate in calculation is achieved.
Optionally, the obtaining unit 10 includes: for sending a data request to a server; the receiving module is used for receiving the multi-level array returned by the server; and the storage module is used for storing the returned multi-layer series group into the memory.
The multi-hierarchy data processing device comprises a processor and a memory, wherein the acquisition unit, the calculation unit, the marking unit, the insertion unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the calculation of the summary line is more accurate by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the multi-level data processing method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the multi-level data processing method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring a multi-layer series group to be processed; traversing the multi-level array to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; and inserting the summarized data into the corresponding positions of the multi-level series groups according to the descending order of the line marks and the descending order of the levels. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a multi-layer series group to be processed; traversing the multi-level array to calculate the summarized data of each level; adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs; and inserting the summarized data into the corresponding positions of the multi-level series groups according to the descending order of the line marks and the descending order of the levels.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A multi-level data processing method is characterized by comprising the following steps:
acquiring a multi-layer series group to be processed;
traversing the multi-level series group to calculate the summarized data of each level;
adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs;
and inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row marks and the descending order of the levels.
2. The method of claim 1, wherein obtaining the set of multi-level levels to be processed comprises:
sending a data request to a server;
receiving a multi-level array returned by the server;
and storing the returned multi-layer series group in a memory.
3. The method of claim 2, wherein after traversing the set of levels to calculate the summarized data for each level, the method further comprises:
establishing a new data table in a memory;
storing the summarized data of each level into the new data table.
4. The method of claim 3, wherein after adding a row label and a hierarchy level for each summary data, the method further comprises:
sorting the summarized data in the new data table according to the descending order of the row marks and the descending order of the levels to obtain sorted summarized data;
the inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row labels and the descending order of the levels comprises the following steps: inserting summarized data into the corresponding positions of the multi-level array according to the sorted sequence;
or
After adding row headings and hierarchies for each summary data, the method further comprises:
sorting the summarized data in the new data table according to the ascending order of the row marks and the ascending order of the levels to obtain sorted summarized data;
the inserting the summarized data into the corresponding positions of the multi-level array according to the descending order of the row labels and the descending order of the levels comprises the following steps: and inserting the summarized data into the corresponding positions of the multi-level array in a reverse order according to the sorted order.
5. The method of claim 4, further comprising:
judging whether the new data table is used or not;
deleting the new data table if the new data table is not used.
6. The method of claim 1, wherein after inserting summary data into corresponding locations of the multi-level array, the method further comprises:
reading the data in the inserted multi-level array;
processing the data in the inserted multi-level array to obtain a processing result;
and generating a visualized chart according to the processing result.
7. A multi-tier data processing apparatus, comprising:
the acquisition unit is used for acquiring a multi-layer series group to be processed;
the calculation unit is used for calculating the summarized data of each level by traversing the multi-level array;
the marking unit is used for adding a row mark and a hierarchy for each piece of summarized data, wherein the row mark of the summarized data is the row mark of the last piece of summarized data, and the hierarchy of the summarized data is the hierarchy to which the summarized data belongs;
and the inserting unit is used for inserting the summarized data into the corresponding position of the multi-level array according to the descending order of the row marks and the descending order of the levels.
8. The apparatus of claim 7, wherein the obtaining unit comprises:
the sending module is used for sending a data request to the server;
the receiving module is used for receiving the multi-level array returned by the server;
and the storage module is used for storing the returned multi-layer series group into the memory.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the multi-level data processing method according to any one of claims 1 to 6.
10. A processor, configured to execute a program, wherein the program executes the multi-level data processing method according to any one of claims 1 to 6.
CN201811291665.7A 2018-10-31 2018-10-31 Multi-level data processing method and device Active CN111125088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811291665.7A CN111125088B (en) 2018-10-31 2018-10-31 Multi-level data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811291665.7A CN111125088B (en) 2018-10-31 2018-10-31 Multi-level data processing method and device

Publications (2)

Publication Number Publication Date
CN111125088A true CN111125088A (en) 2020-05-08
CN111125088B CN111125088B (en) 2023-08-25

Family

ID=70494249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811291665.7A Active CN111125088B (en) 2018-10-31 2018-10-31 Multi-level data processing method and device

Country Status (1)

Country Link
CN (1) CN111125088B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112037065A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 Method and device for processing securities trading expense source data table
CN112364090A (en) * 2020-11-03 2021-02-12 杭州数梦工场科技有限公司 Data attribute display method and device and electronic equipment
CN112597210A (en) * 2020-12-16 2021-04-02 中国建设银行股份有限公司 Data summarizing method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050065910A1 (en) * 2003-08-08 2005-03-24 Caleb Welton Method and apparatus for storage and retrieval of information in compressed cubes
CN1612100A (en) * 2003-10-27 2005-05-04 陈启星 Hierarchical positioning ordering and hierarchical positioning searching dynamic search table algorithm
CN102360371A (en) * 2011-09-29 2012-02-22 畅捷通信息技术股份有限公司 Data processing device and data processing method
CN102567361A (en) * 2010-12-23 2012-07-11 金蝶软件(中国)有限公司 Data table layering summarizing method and data table layering summarizing device
CN103186560A (en) * 2011-12-28 2013-07-03 金蝶软件(中国)有限公司 Data sorting method and related device
CN105528447A (en) * 2015-12-22 2016-04-27 远光软件股份有限公司 Method for rejecting and summarizing specific data layer by layer simultaneously
US20160132543A1 (en) * 2014-11-11 2016-05-12 International Business Machines Corporation Automatically aggregating data in database tables
CN105893421A (en) * 2015-12-02 2016-08-24 乐视网信息技术(北京)股份有限公司 UV calculation method and apparatus
CN107688580A (en) * 2016-08-05 2018-02-13 北京京东尚科信息技术有限公司 The method, apparatus and system of commodity classification based on Distributed Data Warehouse

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050065910A1 (en) * 2003-08-08 2005-03-24 Caleb Welton Method and apparatus for storage and retrieval of information in compressed cubes
CN1612100A (en) * 2003-10-27 2005-05-04 陈启星 Hierarchical positioning ordering and hierarchical positioning searching dynamic search table algorithm
CN102567361A (en) * 2010-12-23 2012-07-11 金蝶软件(中国)有限公司 Data table layering summarizing method and data table layering summarizing device
CN102360371A (en) * 2011-09-29 2012-02-22 畅捷通信息技术股份有限公司 Data processing device and data processing method
CN103186560A (en) * 2011-12-28 2013-07-03 金蝶软件(中国)有限公司 Data sorting method and related device
US20160132543A1 (en) * 2014-11-11 2016-05-12 International Business Machines Corporation Automatically aggregating data in database tables
CN105893421A (en) * 2015-12-02 2016-08-24 乐视网信息技术(北京)股份有限公司 UV calculation method and apparatus
CN105528447A (en) * 2015-12-22 2016-04-27 远光软件股份有限公司 Method for rejecting and summarizing specific data layer by layer simultaneously
CN107688580A (en) * 2016-08-05 2018-02-13 北京京东尚科信息技术有限公司 The method, apparatus and system of commodity classification based on Distributed Data Warehouse

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李意文: "二叉树的分层遍历的汇总", Retrieved from the Internet <URL:https://blog.csdn.net/u014698348/article/details/53967704> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112037065A (en) * 2020-09-01 2020-12-04 中国银行股份有限公司 Method and device for processing securities trading expense source data table
CN112037065B (en) * 2020-09-01 2023-09-19 中国银行股份有限公司 Processing method and device of securities trade fee source data table
CN112364090A (en) * 2020-11-03 2021-02-12 杭州数梦工场科技有限公司 Data attribute display method and device and electronic equipment
CN112597210A (en) * 2020-12-16 2021-04-02 中国建设银行股份有限公司 Data summarizing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111125088B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN106649346B (en) Data repeatability checking method and device
US9953102B2 (en) Creating NoSQL database index for semi-structured data
CN107491487B (en) Full-text database architecture and bitmap index creation and data query method, server and medium
CN108052653A (en) Acquisition methods, device, storage medium, terminal and the image search method of characteristics of image descriptor
CN111125088A (en) Multi-level data processing method and device
CN103761229B (en) Data processing method and device
CN110019298B (en) Data processing method and device
CN110569489B (en) PDF file-based form data analysis method and device
CN109597983A (en) A kind of spelling error correction method and device
CN106610931A (en) Extraction method and device for topic names
CN104199784A (en) Data migration method and device based on hierarchical storage
CN106202098A (en) The method and apparatus of click location in record and reduction webpage
CN103488523A (en) Page access method, page access device and server
CN111680472A (en) Table data processing method and device, computer equipment and readable storage medium
CN105608214A (en) Method for searching under-surveillance license plate numbers fast
CN108959359A (en) A kind of uniform resource locator semanteme De-weight method, device, equipment and medium
CN112347131B (en) Urban rail project demand identification and coverage method and device
CN104765775B (en) A kind of log preservation method and device
CN111190896B (en) Data processing method, device, storage medium and computer equipment
CN105677677A (en) Information classification and device
CN113792237B (en) Optimization method and device for card layout, storage medium and processor
CN110020343A (en) The determination method and apparatus of web page coding format
CN110889424B (en) Vector index establishing method and device and vector retrieving method and device
CN114820729A (en) Element one-key layout method and device
CN114138787A (en) Bar code identification method, equipment and medium

Legal Events

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