CN110647517B - Processing method and device for table data structure - Google Patents

Processing method and device for table data structure Download PDF

Info

Publication number
CN110647517B
CN110647517B CN201810596772.4A CN201810596772A CN110647517B CN 110647517 B CN110647517 B CN 110647517B CN 201810596772 A CN201810596772 A CN 201810596772A CN 110647517 B CN110647517 B CN 110647517B
Authority
CN
China
Prior art keywords
data
item
title
row
sequence
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.)
Active
Application number
CN201810596772.4A
Other languages
Chinese (zh)
Other versions
CN110647517A (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.)
Ultrapower Software Co ltd
Original Assignee
Ultrapower Software 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 Ultrapower Software Co ltd filed Critical Ultrapower Software Co ltd
Priority to CN201810596772.4A priority Critical patent/CN110647517B/en
Publication of CN110647517A publication Critical patent/CN110647517A/en
Application granted granted Critical
Publication of CN110647517B publication Critical patent/CN110647517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for processing a table data structure. The method comprises the following steps: constructing a data structure of a table, wherein the data structure comprises a header item set, a data row set and a mapping relation between column numbers and header items; storing the title items in the title item set as storage objects; storing the cell data item of each data line in the data line set in a key value pair storage mode by taking the title item as a key and the content of the cell data item as a value; and performing data query and modification on the table based on the mapping relation and the key value pair of the data row. The invention adopts different forms to store the title lines and the data lines, so that the query and modification operations of the table can be carried out through the column headers without depending on the column numbers, the dynamic binding between the title items and the column sequences is realized by constructing the mapping relation between the column numbers and the title items, the data structure of the whole table is not required to be adjusted when the column sequences are adjusted, the efficiency is high, and the operation is simple.

Description

Processing method and device for table data structure
Technical Field
The present invention relates to the field of table data processing technologies, and in particular, to a method and an apparatus for processing a table data structure.
Background
In the data processing for table display, it is often encountered that some unordered data is required to be processed into an ordered data set according to a specific order of a certain column or several columns. In existing schemes, a table's data objects, typically stored in an object form similar to a List set nesting a List set. Each element of the external List set represents a row of the table, where the first row is the title row content and the second row is followed by the data row content. The internal List set represents each cell of the row per element.
The existing solutions have at least the following drawbacks:
1. the existing scheme is feasible under the condition of simple requirement, and once the requirement of data change exists, the ranks of all data in the existing scheme are fixedly stored, so that the dynamic modification of the cell contents is very inconvenient, the efficiency is very low, and the operation is complicated.
2. When the existing scheme adjusts the sequence, the data of all columns after the adjusted column needs to be subjected to column modification or shifting, and only one column is adjusted, which may have a great influence on the whole table.
3. When the existing scheme modifies the data of a certain cell, the corresponding internal List row data can only be found from the external List according to the row number, and then the corresponding cell value is found from the internal List row data according to the column number and then modified.
4. In the existing scheme, when tables are sorted, a certain column can only be sorted according to column numbers, if the column of a certain title is designated to be sorted, all values of lists in a header row need to be traversed, the column number corresponding to a target title is searched, and then the column is sorted according to the column number, so that the modification process is complicated.
Disclosure of Invention
The invention provides a method and a device for processing a table data structure, which aim to solve the problems of low efficiency and complex operation of the conventional scheme for adjusting table data.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
one aspect of the present invention provides a method for processing a table data structure, including:
constructing a data structure of a table, wherein the data structure comprises a header item set, a data row set, and a mapping relation between a column number of the table and a header item;
storing the title items in the title item set as storage objects;
storing the cell data item of each data line in the data line set in a key value pair storage mode by taking the title item as a key and the content of the cell data item as a value;
and performing data query and modification on the table based on the mapping relation and the key value pair of the data row.
Another aspect of the present invention provides a processing apparatus for a table data structure, including:
the data structure comprises a title item set, a data line set and a mapping relation between a column number and a title item;
the first storage unit is used for storing the title items in the title item set as storage objects;
the second storage unit is used for storing the cell data items of each data line in the data line set in a key value pair storage mode by taking the title items as keys and the contents of the cell data items as values;
and the processing unit is used for carrying out data query and modification on the table based on the mapping relation and the key value pair of the data row.
The invention has the beneficial effects that: the title lines and the data lines are stored in different forms, the title lines and the data lines are separated, the data lines are stored in a key value pair form by taking the title items as keys and taking the content of the cell data items as values, each title item of the title lines is stored as a storage object, so that the query and modification operation of the table can be carried out through the title items, the table does not depend on the column number, the title items can be quickly found through the column number or the column number can be quickly found through the title items by constructing the mapping relation between the column number and the title items, the dynamic binding between the title items and the column number is realized, when the column sequence is adjusted, the data structure of the whole table is not required to be adjusted, the dynamic binding can be realized only by simply modifying the set of mapping relation, the efficiency is high, and the operation is simple.
Drawings
FIG. 1 is a flow chart illustrating a method for processing a table data structure according to an embodiment of the present invention;
FIG. 2 is a block diagram of a processing device for table data structure according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hardware structure of a processing apparatus of a table data structure according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It is to be understood that such description is merely illustrative and not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The words "a", "an" and "the" and the like as used herein are also intended to include the meanings of "a plurality" and "the" unless the context clearly dictates otherwise. Furthermore, the terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, 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, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Thus, the techniques of the present invention may be implemented in hardware and/or in software (including firmware, microcode, etc.). Furthermore, the techniques of this disclosure may take the form of a computer program product on a computer-readable medium having instructions stored thereon for use by or in connection with an instruction execution system. In the context of the present invention, a computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, the computer readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the computer readable medium include: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or wired/wireless communication links.
The invention does not use a row and column mode which is fixedly stored, but constructs a table model so as to conveniently modify the content of the cell data items according to the column titles and quickly adjust the column sequence according to the column sequence of the titles.
Fig. 1 is a flowchart of a processing method of a table data structure according to an embodiment of the present invention, and as shown in fig. 1, the method of the embodiment includes:
s110, constructing a data structure of the table, wherein the data structure comprises a header item set, a data row set, and a mapping relation between a column number and a header item of the table.
The header item set in this embodiment may be understood as a header row, the header item set includes a plurality of header items, the data row set includes a plurality of data rows, each data row includes a plurality of cell data items, the header items correspond to column headers of the table, and the data rows correspond to data rows of the table. Assuming that the table is a2 × 3 table, that is, the table includes two data rows and 3 column headers, the header item set constructed at this time includes three header items, the three header items respectively correspond to three respective headers of the table, and the data row set includes two data rows, and the two data rows respectively correspond to two data rows of the table.
In this embodiment, the mapping relationship between the column number and the title item includes mapping of the column number to the title item and mapping of the title item to the column number, and according to the mapping relationship between the column number and the title item, the title item can be quickly found through the column number or the column number can be found through the title item, so that dynamic binding between the title item and the column sequence is realized, if there is a change in the column form, the data structure of the whole table does not need to be adjusted, and the dynamic binding can be realized only by simply modifying the set of mapping relationship, so that the efficiency is high, and the operation is simple.
And S120, storing the title items in the title item set as storage objects.
And S130, storing the cell data item of each data line of the data line set in a key-value pair storage mode by taking the title item as a key and the content of the cell data item as a value.
According to the embodiment, the header line and the data line are respectively stored, and the header line and the data line are separated, so that the header and the data can be stored in different forms, and operations such as row sequence adjustment, data modification and the like can be conveniently and quickly performed. The embodiment takes the title items in the title lines as storage objects, and does not store column numbers, so that the sequence of columns can be dynamically modified; the storage form of the data row is that the title item is a Key, and the content of the cell data item is a Value, that is, the cell data item of the data row is stored in a Key Value pair Key-Value form, so that the content of the cell data item can be found through a column header, not through a column number.
And S140, performing data query and modification on the table based on the mapping relation and the key value pair of the data row.
Since the cell data items of the data rows are stored with the title items as keys and the content of the cell data items as values, all query modification operations, such as sequence adjustment, data modification, data sorting and the like, can be operated on the basis of the title items, and are not positioned depending on the column numbers.
In the embodiment, the header lines and the data lines are stored in different forms, the header lines and the data lines are separated, so that the cell data items of the data lines are stored in a Key-Value form in which the content of the cell data items is Value, and each header item of the header lines is stored as a storage object, so that the query and modification operations of the table can be performed through the column headers, and are independent of the column numbers.
The embodiment can perform rank adjustment, data modification, data item ordering and the like on the table data structure. According to an embodiment of the present invention, the index of each data line in the data line set of the present embodiment has a corresponding relationship with the line number of the table, for example, it is assumed that the data line set is { "a", "B", "C", "D" }, where the index of the data line "a" in the data line set is 1, and the index 1 of the data line "a" may correspond to the line number 1 of the table. Therefore, the present embodiment may adopt any one of the following methods to perform data modification on the table data structure:
the method comprises the following steps: receiving a data modification request, wherein the data modification request carries a title item to be modified, a line number to be modified and modified data content; and inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the title to be modified.
Assuming that the title item to be modified carried by the data modification request is "name", the line number to be modified is the third line, and the modified data content is "zhao xx", querying the data line "C" in the third line corresponding data line set { "a", "B", "C", "D" } according to the corresponding relationship between the label of each data line in the data line set and the line number of the table, and modifying the cell data item content with the title item being "name" in the data line "C" into "zhao xx".
The second method comprises the following steps: receiving a data modification request, wherein the data modification request carries a column number to be modified, a row number to be modified and modified data content; and inquiring a title item corresponding to the column number to be modified according to the mapping relation, inquiring a data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the inquired title item.
Assuming that the column number to be modified carried by the data modification request is a first column, the line number to be modified is a third line, and the modified data content is 'Zhaxx', inquiring that the title item corresponding to the first column is 'name' according to the mapping relation, inquiring that the data line 'C' in the data line set corresponding to the third line { 'A', 'B', 'C', 'D' } according to the corresponding relation between the label of each data line in the data line set and the line number of the table, and modifying the unit grid data item content of which the title item is 'name' in the data line 'C' into 'Zhaxx'.
The present embodiment may modify the content of the data item according to the title item and the row number, and may also modify the content of the data item according to the row number and the column number.
According to an embodiment of the present invention, the present invention may sort the table data structure by the cell data items by any one of the following methods:
the method comprises the following steps: receiving a cell data item ordering request, wherein the cell data item ordering request carries a title item sequence; and inquiring the cell data item corresponding to each title item of the title item sequence in each data line according to the Key-Value of the data line, and sequencing the cell data items inquired in each data line according to the title item sequence.
Assuming that the sequence of title items carried by the cell data item ordering request is "name", "age" and "gender", the data line set is { "a", "B" }, each data line includes three cell data items, the cell data items included in the data line "a" are sequentially a1, a2 and a3, and the cell data items included in the data line "B" are sequentially B1, B2 and B3. If the cell data items corresponding to each title item of the title item sequence in each data line of the data line set queried according to Key-Value of the data line are respectively the 2 nd cell data item, the 3 rd cell data item, and the 1 st cell data item, that is, the cell data items corresponding to the title item sequence in data line "a" are respectively a2, a3, and a1, and the cell data items corresponding to the title item sequence in data line "a" are respectively B2, B3, and B1, then the cell data items queried in each data line are sorted according to the title item sequence, and the cell data items included in the sorted data line "a" are sequentially a2, a3, and a1, and the cell data items included in data item "B" are sequentially B2, B3, and B1.
The second method comprises the following steps: receiving a cell data item ordering request, wherein the cell data item ordering request carries a column number sequence; inquiring the title item corresponding to each column number in the column number sequence according to the mapping relation between the column numbers and the title items to obtain a title item sequence; and inquiring the cell data item corresponding to each title item of the title item sequence in each data line according to the Key-Value of the data line, and sequencing the cell data items inquired in each data line according to the title item sequence.
Based on the above assumptions, assuming that the sequence of the title items is "name", "age", and "gender" and the column numbers carried by the corresponding ordering request for the cell data items are 2, 3, and 1, respectively, and 231, the order of the title items corresponding to each column number in the sequence of column numbers is "name", "age", and "gender" according to the mapping relationship between the column numbers and the title items, so as to order the cell data items of each data row of the data row set { "a", "B" }.
According to an embodiment of the present invention, the present invention may perform rank order adjustment on the table data structure by the following method:
receiving a sequence adjustment request, wherein the sequence adjustment request carries a title item sequence; and modifying the mapping relation between the column numbers and the title items according to the title item sequence to realize the adjustment of the sequence.
Assuming that the column header items of the original sequence are "name", "age" and "gender" in turn, and the corresponding column numbers are 1, 2 and 3, that is, the column number corresponding to "name" is 1, the column number corresponding to "age" is 2, and the column number corresponding to "gender" is 3, if the column header items of the desired new sequence are "name", "gender" and "age" in turn, the sequence of header items carried by the sequence adjustment request is "name", "gender" and "age", and the mapping between the modified column numbers and the header items is: column number 1 corresponds to "name", column number 2 corresponds to "gender", and column number 3 corresponds to "age"; the mapping between the modified title entry pair column numbers is: the column number corresponding to "name" is 1, the column number corresponding to "age" is 3, and the column number corresponding to "gender" is 2.
In practical application, the table data structure constructed by the present embodiment is as follows:
ArrayList < HashMap < String, String > > dataList; // data line set
HashMap < String, Integer > colNameTitleMap; // column number to title phase mapping
HashMap < Integer, String > colIndexTitleMap; // title item to column number mapping
ArrayList < String > titleList; // title item set
The embodiment may provide an interface for processing a table data structure, for example, a sequence adjustment interface refreshhitleindex (String [ ] titles) is used to perform sequence adjustment, a header item sequence carried by a sequence adjustment request is transmitted into the array String [ ], the sequence adjustment interface refreshhitleindex (String [ ] titles) returns the header item sequence titles, the adjustment of the sequence is implemented by modifying the mapping between colNameTitleMap and colindexttitlemap, and no operation is required to be performed on the data line object and the header line object.
And modifying data by using a data modification interface updateDataUnit (String title, String value, int rowNum), sequentially transmitting a title item to be modified, a line number to be modified and modified data content carried by a data modification request into the title item title, the line number rowNum and the data content value, finding a corresponding data line by the line number rowNum, and assigning the data content value to a cell data item corresponding to the key of the title item title. Or, modifying data by using a data modification interface updateDataUnit (int colNum, String value, int rowNum), sequentially transmitting a column number to be modified, a line number to be modified and modified data content carried by a data modification request into the column number colNum, the line number rowNum and the data content value, finding a mapped title item title from the colindextltlemp through the column number colNum, finding a corresponding data line through the line number rowNum, and assigning the value to a cell data item corresponding to the key of the title item title.
And utilizing a cell data item ordering interface sort (String colName) to sort the cell data items, transmitting a title item sequence carried by a cell data item ordering request into a column title name colName, searching the value of the cell corresponding to each data row through a title item key, and ordering the cell data items. Or, using a cell data item ordering interface sort (int colNum) to order the cell data items, transmitting a column number sequence carried by a cell data item ordering request into the column number colNum, finding a corresponding title item from a colindextltlemap mapping through the column number, finding a value of a cell corresponding to each data line through a key of the title item, and ordering the cell data items.
The method and the device can quickly adjust the column sequence, are simple to operate, have no influence on the storage of the data rows and the header rows, are high in execution efficiency, are more suitable for quickly reading and modifying the content through the column headers in the storage form of the data rows and the header rows, and are more suitable for the habit of people and simple to operate.
Corresponding to the processing method of the table data structure, the embodiment of the invention also provides a processing device of the table data structure.
Fig. 2 is a block diagram of a processing apparatus of a table data structure according to an embodiment of the present invention, and as shown in fig. 2, the apparatus of the embodiment includes:
the building unit 21 is configured to build a data structure of a table, where the data structure includes a header item set, a data row set, and a mapping relationship between a column number of the table and a header item;
a first storage unit 22, configured to store the title items in the title item set as storage objects;
a second storage unit 23, configured to store the cell data item of each data line of the data line set in a storage manner of a key value pair by using the title item as a key and using the content of the cell data item as a value;
and the processing unit 24 is configured to perform data query and modification on the table based on the mapping relationship and the key value pair of the data line.
In the embodiment, the label of each data row in the data row set has a corresponding relationship with the row number of the table, and correspondingly, the processing unit 24 is configured to receive a data modification request, where the data modification request carries a title item to be modified, a row number to be modified, and modified data content; and inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the title item to be modified.
Or, the processing unit 24 is configured to receive a data modification request, where the data modification request carries a column number to be modified, a row number to be modified, and modified data content; and inquiring a title item corresponding to the column number to be modified according to the mapping relation, inquiring a data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the inquired title item.
In an implementation of this embodiment, the processing unit 24 is further configured to receive a sequence adjustment request, where the sequence adjustment request carries a sequence of header items; and modifying the mapping relation between the column numbers and the title items according to the title item sequence to realize the adjustment of the sequence.
In another implementation of this embodiment, the processing unit 24 is further configured to receive a data item ordering request for a cell, where the data item ordering request for the cell carries a sequence of header items; and inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value of the data row, and sequencing the cell data items inquired in each data row according to the title item sequence.
Or, the processing unit 24 is configured to receive a cell data item ordering request, where the cell data item ordering request carries a column number sequence; inquiring the title item corresponding to each column number in the column number sequence according to the mapping relation to obtain a title item sequence; and inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value of the data row, and sequencing the cell data items inquired in each data row according to the title item sequence. .
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The processing device of the table data structure provided by the application can be realized by software, and also can be realized by hardware or a combination of hardware and software. Taking a software implementation as an example, referring to fig. 3, the processing device of the table data structure provided in the present application may include a processor 301 and a machine-readable storage medium 302 storing machine-executable instructions. The processor 301 and the machine-readable storage medium 302 may communicate via a system bus 303. Also, the processor 301 may perform the above-described processing method of the table data structure by reading and executing machine-executable instructions in the machine-readable storage medium 302 corresponding to the processing logic of the table data structure.
The machine-readable storage medium 302 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
According to an example disclosed herein, there is also provided a machine-readable storage medium, such as machine-readable storage medium 302 in fig. 3, comprising machine-executable instructions executable by processor 301 in a processing device of a table data structure to implement the above-described processing method of the table data structure.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", and the like are used to distinguish the same items or similar items with basically the same functions and actions, and those skilled in the art can understand that the words "first", "second", and the like do not limit the quantity and execution order.
While the foregoing is directed to embodiments of the present invention, other modifications and variations of the present invention may be devised by those skilled in the art in light of the above teachings. It should be understood by those skilled in the art that the foregoing detailed description is for the purpose of better explaining the present invention, and the scope of the present invention should be determined by the scope of the appended claims.

Claims (10)

1. A method of processing a table data structure, the method comprising:
constructing a data structure of a table, wherein the data structure comprises a header item set, a data row set, and a mapping relation between a column number of the table and a header item;
storing the title items in the title item set as storage objects;
storing the cell data item of each data row in the data row set in a key value pair storage mode by taking the title item as a key and the content of the cell data item as a value;
and performing data query and modification on the table based on the mapping relation and the key value pair of the data row.
2. The method of claim 1, wherein the index of each data row in the set of data rows has a corresponding relationship with a row number of a table.
3. The method of claim 2, wherein the data querying and modifying the table comprises:
receiving a data modification request, wherein the data modification request carries a title item to be modified, a line number to be modified and modified data content; inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the title item to be modified;
or, receiving a data modification request, wherein the data modification request carries a column number to be modified, a row number to be modified and modified data content; and inquiring the title item corresponding to the column number to be modified according to the mapping relation, inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the inquired title item.
4. The method of claim 1, wherein the data querying and modifying the table comprises:
receiving a sequence adjustment request, wherein the sequence adjustment request carries a title item sequence;
and modifying the mapping relation between the column number and the title item according to the title item sequence to realize the adjustment of the column sequence.
5. The method of claim 1, wherein the data querying and modifying the table comprises:
receiving a cell data item ordering request, wherein the cell data item ordering request carries a title item sequence; inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value pair of the data row, and sequencing the inquired cell data items in each data row according to the title item sequence;
or receiving a cell data item ordering request, wherein the cell data item ordering request carries a column number sequence; inquiring the title item corresponding to each column number in the column number sequence according to the mapping relation to obtain a title item sequence; and inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value of the data row, and sequencing the cell data items inquired in each data row according to the title item sequence.
6. An apparatus for processing a table data structure, the apparatus comprising:
the data structure comprises a title item set, a data row set, and a mapping relation between a column number and a title item of the table;
the first storage unit is used for storing the title items in the title item set as storage objects;
the second storage unit is used for storing the cell data items of each data line in the data line set in a key value pair storage mode by taking the title items as keys and the contents of the cell data items as values;
and the processing unit is used for carrying out data query and modification on the table based on the mapping relation and the key value pair of the data row.
7. The apparatus of claim 6, wherein the reference number of each data row in the data row set has a corresponding relationship with a row number of a table.
8. The apparatus of claim 7,
the processing unit is used for receiving a data modification request, wherein the data modification request carries a title item to be modified, a line number to be modified and modified data content; inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the title item to be modified;
or, the processing unit is configured to receive a data modification request, where the data modification request carries a column number to be modified, a row number to be modified, and modified data content; and inquiring the title item corresponding to the column number to be modified according to the mapping relation, inquiring the data row corresponding to the row number to be modified according to the corresponding relation between the label of each data row in the data row set and the row number of the table, and assigning the modified data content to the cell data item corresponding to the inquired title item.
9. The apparatus of claim 6,
the processing unit is used for receiving a sequence adjustment request, and the sequence adjustment request carries a title item sequence; and modifying the mapping relation between the column number and the title item according to the title item sequence to realize the adjustment of the column sequence.
10. The apparatus of claim 6,
the processing unit is used for receiving a cell data item ordering request, and the cell data item ordering request carries a title item sequence; inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value pair of the data row, and sequencing the cell data items inquired in each data row according to the title item sequence;
or, the processing unit is configured to receive a cell data item ordering request, where the cell data item ordering request carries a column number sequence; inquiring the title item corresponding to each column number in the column number sequence according to the mapping relation to obtain a title item sequence; and inquiring the cell data item corresponding to each title item of the title item sequence in each data row according to the key value of the data row, and sequencing the cell data items inquired in each data row according to the title item sequence.
CN201810596772.4A 2018-06-11 2018-06-11 Processing method and device for table data structure Active CN110647517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810596772.4A CN110647517B (en) 2018-06-11 2018-06-11 Processing method and device for table data structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810596772.4A CN110647517B (en) 2018-06-11 2018-06-11 Processing method and device for table data structure

Publications (2)

Publication Number Publication Date
CN110647517A CN110647517A (en) 2020-01-03
CN110647517B true CN110647517B (en) 2022-06-24

Family

ID=68988402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810596772.4A Active CN110647517B (en) 2018-06-11 2018-06-11 Processing method and device for table data structure

Country Status (1)

Country Link
CN (1) CN110647517B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612924A (en) * 2020-12-30 2021-04-06 绿盟科技集团股份有限公司 Data reading and exporting methods and devices, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456067A (en) * 2010-10-25 2012-05-16 国际商业机器公司 Communicating secondary selection feedback
CN103703467A (en) * 2013-08-29 2014-04-02 华为技术有限公司 Method and apparatus for storing data
CN104156278A (en) * 2014-08-01 2014-11-19 江苏大学 File version control system and file version control method
CN106940690A (en) * 2017-03-06 2017-07-11 锐达互动科技股份有限公司 A kind of interactive electric whiteboard software form and chart method for mutually conversing and system
CN107145537A (en) * 2017-04-21 2017-09-08 上海斐讯数据通信技术有限公司 A kind of list data introduction method and system
CN107992625A (en) * 2017-12-25 2018-05-04 湖南星汉数智科技有限公司 A kind of automatic abstracting method of web page form data and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665654B2 (en) * 2001-07-03 2003-12-16 International Business Machines Corporation Changing table records in a database management system
US6976027B2 (en) * 2002-08-21 2005-12-13 International Business Machines Corporation Implementing geographical taxonomy within network-accessible service registries using spatial extensions

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456067A (en) * 2010-10-25 2012-05-16 国际商业机器公司 Communicating secondary selection feedback
CN103703467A (en) * 2013-08-29 2014-04-02 华为技术有限公司 Method and apparatus for storing data
CN104156278A (en) * 2014-08-01 2014-11-19 江苏大学 File version control system and file version control method
CN106940690A (en) * 2017-03-06 2017-07-11 锐达互动科技股份有限公司 A kind of interactive electric whiteboard software form and chart method for mutually conversing and system
CN107145537A (en) * 2017-04-21 2017-09-08 上海斐讯数据通信技术有限公司 A kind of list data introduction method and system
CN107992625A (en) * 2017-12-25 2018-05-04 湖南星汉数智科技有限公司 A kind of automatic abstracting method of web page form data and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SQL in CockroachDB: Mapping Table Data to Key-Value Storage;Peter Mattis et al.;《https://www.cockroachlabs.com/blog/sql-in-cockroachdb-mapping-table-data-to-key-value-storage/》;20150916;1-8 *
什么是正确的数据储存姿势;饼干;《https://zhuanlan.zhihu.com/p/25593304》;20170308;1-15 *
面向海量地质文档的表格信息快速抽取方法研究;李杨 等;《中国矿业》;20170930;第26卷(第9期);98-103 *

Also Published As

Publication number Publication date
CN110647517A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
US20210357479A1 (en) Methods and apparatus for sorting data
US11269956B2 (en) Systems and methods of managing an index
CN104079614B (en) The method and system obtained in order for distributed post ordering system message
US20160328445A1 (en) Data Query Method and Apparatus
CN105320608A (en) Memory controller and method for controlling a memory device to process access requests
CN107526542A (en) Object storage device and its operating method
US20210271658A1 (en) Data edge platform for improved storage and analytics
CN105393227A (en) Memory controlled data movement and timing
US20220019567A1 (en) Data storage using vectors of vectors
CN105740264A (en) Distributed XML database sorting method and apparatus
CN107895050A (en) Image searching method and system
US10394838B2 (en) App store searching
CN110647517B (en) Processing method and device for table data structure
US8407255B1 (en) Method and apparatus for exploiting master-detail data relationships to enhance searching operations
CN102870115A (en) Storage method for network disk files, and server
CN103984754A (en) Search system and search method
CN108628892A (en) Method, apparatus, electronic equipment and the readable storage medium storing program for executing of ordered data storage
CN105027094A (en) Critical-word-first ordering of cache memory fills to accelerate cache memory accesses, and related processor-based systems and methods
US9600517B2 (en) Convert command into a BULK load operation
US20170124088A1 (en) Method of operating a solution searching system and solution searching system
CN108874816B (en) Sequence number burning method and sequence number burning system for multiple burning devices
JP2016081492A (en) Different type storage server and file storage method thereof
US20160292168A1 (en) File retention
CN110232066A (en) A kind of target cache method and system obtaining table data request
US11853325B2 (en) Data storage using vectors of vectors

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
CB02 Change of applicant information

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Applicant after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601

Applicant before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant