CN109684336A - The system and method for tree data table efficient retrieval and ranking function is realized based on big data application - Google Patents

The system and method for tree data table efficient retrieval and ranking function is realized based on big data application Download PDF

Info

Publication number
CN109684336A
CN109684336A CN201811611077.7A CN201811611077A CN109684336A CN 109684336 A CN109684336 A CN 109684336A CN 201811611077 A CN201811611077 A CN 201811611077A CN 109684336 A CN109684336 A CN 109684336A
Authority
CN
China
Prior art keywords
data
record
sequential coding
tree
field
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.)
Withdrawn
Application number
CN201811611077.7A
Other languages
Chinese (zh)
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.)
PRIMETON INFORMATION TECHNOLOGY Co Ltd
Original Assignee
PRIMETON INFORMATION 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 PRIMETON INFORMATION TECHNOLOGY Co Ltd filed Critical PRIMETON INFORMATION TECHNOLOGY Co Ltd
Priority to CN201811611077.7A priority Critical patent/CN109684336A/en
Publication of CN109684336A publication Critical patent/CN109684336A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

The present invention relates to a kind of systems for realizing tree data table efficient retrieval and ranking function based on big data application, including table structure module, for increasing sequential coding field on service attribute field basis and pressing specified rule value;Data maintenance module, for being increased data record, being modified and being deleted according to the sequential coding field;Data retrieval sorting module presses the result set of tree structure sequential arrangement for rendering.The invention further relates to a kind of methods for realizing the tree data table efficient retrieval based on big data application and sequence processing.Using the system and method, can be simple and efficient is that the user interface end of application system provides the tree structure data collection arranged according to membership, relative to circular recursion algorithm is used, the present invention has the advantages that operation is efficient, exploitation is simple, reduces resource consumption;Method provided by the invention is suitable for all relevant databases, has very strong applicability.

Description

The system for realizing tree data table efficient retrieval and ranking function based on big data application And method
Technical field
The present invention relates to computer software fields more particularly to big data application fields, in particular to one kind based on big number The system and method for tree data table efficient retrieval and ranking function is realized according to application.
Background technique
In the information management system field of computer software, be frequently present of a kind of storage scene of tables of data: a table is deposited In the record of storage, there is father and son's memberships of record row, constitute one by father and son's membership between record row Tree structure, typical scene such as institution table, other than root mechanism, other mechanism Dou You fathers mechanism, table notes all in this way Record constitutes a mechanism tree, and in application software, for the table of this tree structure, there are following retrieval ordering demands: Such as it inquires all subrecords of some record and is exported after being ranked up by the subrecord membership of designated recorder, such as look into All clamp mechanisms of some mechanism are ask, and are ranked up by mechanism ownership sequence.For large enterprise, the node of mechanism can Can have it is tens of thousands of, the level of mechanism may have 5,6 layers it is even more, the application field of information management covering it is more and more extensive, More and more deeply in the case where, the scene of similar means tree is there are also very much, such as region tree is (such as country-province-counties and cities-Qu Zhen- Village), administrative grade tree (country, portion, department, place, section), electric business platform product classification tree etc., in the big data of similar such scene Under application software environment, the retrieval ordering demand of quick response data, for promoting the usage experience of information system application software It is extremely important.
For the table of tree structure, it is assumed that it include 2 fields: ID (Major key of this record row) on table structure, ParentID (Major key of parent record), the common Search Requirement in information management system is: inquiring some designated recorder row All subrecords and by record attaching relation sequence.Common realization technology has 2 kinds:
One, it is handled by way of circular recursion in a program, operating procedure is as follows:
1) all subrecords of standard SQL queries (ID of ParentID=designated recorder) is used according to specified record;
2) circular recursion is carried out for subrecord, inquires the next stage subrecord of subrecord respectively, subrecord result set is put To after parent record;
3) until recurrence terminates, the query results arranged are exported.
Two, the generalized Petri net language inquiry provided using database software
Partial data library software provides the SQL syntax of the cascade inquiry for tree structure data table, can pass through SQL Sentence directly inquires all subrecords of some designated recorder, such as in oracle database, can be with such as flowering structure SQL Sentence is realized:
Select [column for wanting query display] from [tree structure table name] start with ID=[designated recorder ID value] Connect by prior ID=ParentID;
Existing deficiency is analyzed respectively below for 2 kinds of methods above-mentioned;
Method one: under big data environment, the node and level of data tree all compare it is more, if some of mechanism tree It include 4 levels under agency node, the agency node of every level-one is 10, then inquiring according to the circular recursion that method one provides The inquiry times of method are 1+10+10 × 10+10 × 10 × 10=1111 time, it is obvious that this method bring deficiency are as follows: 1, Treatment effeciency is low;2, too many to the inquiry times of database, cause to consume excessive database connection pool, network I/O and data Library server resource.
Method two: the problem of this method, needs to rely on the ability that database software itself provides, and is not each data Library software provides the cascade query SQL for data tree structure, that is, then provides the SQL language of the disparate databases of this ability Method is also different, reduces the portability of information system software in this way.
Summary of the invention
The purpose of the present invention is overcoming the above-mentioned prior art, provide that a kind of computational efficiency is high, resource consumption The system and method for tree data table efficient retrieval and ranking function is simply realized in small, exploitation based on big data application.
To achieve the goals above, of the invention that tree data table efficient retrieval and sequence function are realized based on big data application The system and method for energy is as follows:
The system for realizing tree data table efficient retrieval and ranking function based on big data application, is mainly characterized by, The system includes:
Table structure module for increasing sequential coding field on service attribute field basis, and presses specified rule Value;
Data maintenance module is connected with the table structure module, for according to the sequential coding field Data record is increased, modified and is deleted;
Data retrieval sorting module is connected, for rendering with the table structure module and data maintenance module By the result set of tree structure sequential arrangement.
Preferably, the sequential coding field of the table structure module uses character string type.
Preferably, the value rule of the sequential coding field value of the table structure module, specifically:
Field value=parent record sequential coding+this record Major key+separator;
Preferably, the data maintenance module includes:
Data adding unit is connected with the table structure module, for advising according to sequential coding field value Then increase new record;
Data modification unit being connected with the table structure module, updating it when for changing data parent record Sequential coding and the sequential coding of subrecord;
Data delete unit, are connected with the table structure module, are used for according to sequential coding field as item The record and its all subrecords of part entry deletion tree structure data table.
The method for realizing the tree data table efficient retrieval applied based on big data and sequence processing based on above system, It is mainly characterized by, the method the following steps are included:
(1) the table structure module described in increases sequential coding field on service attribute field basis;
(2) data maintenance module described in increases data record according to the sequential coding field, modify and It deletes;
(3) result set for pressing tree structure sequential arrangement is presented in the data retrieval sorting module described in.
Preferably, increase data record in the step (2) specifically includes the following steps:
(1-2.1) generates the Major key ID of newly-increased record according to business rule;
The sequential coding of (1-2.2) acquisition parent record;
The sequential coding of the newly-increased record of (1-2.3) setting;
(1-2.4) is according to the insertion of the standard implementation data record of database.
Preferably, modification data record in the step (2) specifically includes the following steps:
The existing sequential coding of (2-2.1) preservation modification record;
(2-2.2) obtains the sequential coding of the new parent record of change;
(2-2.3) generates the value of new sequential coding field according to rule;
The value of (2-2.4) batch updating modification record and the sequential coding field of all subrecords.
Preferably, the value of new sequential coding field is generated in the step (2-2.3), specifically:
The value of new sequential coding field is generated according to the following formula:
The value of sequential coding field=parent record sequential coding character string+this Record ID+separator;
Preferably, deletion data record in the step (3) specifically includes the following steps:
(3-2.1) obtains and saves the value of the sequential coding field of deletion record;
(3-2.2) batch deletes designated recorder and all juniors record.
Using it is of the invention based on big data application realize tree data table efficient retrieval and ranking function system and Method by additionally increasing field sequence code field in tree structure data table, and is handled by field value provided by the invention Rule, data maintenance and data retrieval method, can be simple and efficient is that the user interface end of application system is provided according to being subordinate to The tree structure data collection of relationship arrangement, relative to circular recursion algorithm is used, the present invention is efficient with operation, exploitation is simple, The advantages of reducing resource consumption;Relative to the specific syntax that certain database (such as oracle database) provides, the present invention is provided Method be suitable for all relevant databases, have very strong applicability.
Detailed description of the invention
Fig. 1 is the mark of the system of the invention that tree data table efficient retrieval and ranking function are realized based on big data application Quasi- tree structure scene figure.
Fig. 2 is the method for tree data table efficient retrieval and sequence processing that realization of the invention is applied based on big data Increase the flow chart of data record.
Fig. 3 is the method for tree data table efficient retrieval and sequence processing that realization of the invention is applied based on big data Modify the flow chart of data record.
Fig. 4 is the method for tree data table efficient retrieval and sequence processing that realization of the invention is applied based on big data Delete the flow chart of data record.
Fig. 5 is the method for tree data table efficient retrieval and sequence processing that realization of the invention is applied based on big data The data tree schematic diagram of embodiment.
Specific embodiment
It is further to carry out combined with specific embodiments below in order to more clearly describe technology contents of the invention Description.
Of the invention should be based on the system that tree data table efficient retrieval and ranking function are realized in big data application, wherein The system includes:
Table structure module for increasing sequential coding field on service attribute field basis, and presses specified rule Value;
Data maintenance module is connected with the table structure module, for according to the sequential coding field Data record is increased, modified and is deleted;
Data retrieval sorting module is connected, for rendering with the table structure module and data maintenance module By the result set of tree structure sequential arrangement.
As the preferred embodiment of the present invention, the sequential coding field of the table structure module uses character string Type.
As the preferred embodiment of the present invention, the value of the sequential coding field value of the table structure module is advised Then, specifically:
Field value=parent record sequential coding+this record Major key+separator;
As the preferred embodiment of the present invention, the data maintenance module includes:
Data adding unit is connected with the table structure module, for advising according to sequential coding field value Then increase new record;
Data modification unit being connected with the table structure module, updating it when for changing data parent record Sequential coding and the sequential coding of subrecord;
Data delete unit, are connected with the table structure module, are used for according to sequential coding field as item The record and its all subrecords of part entry deletion tree structure data table.
The method for realizing the tree data table efficient retrieval applied based on big data and sequence processing based on above system, Including following steps:
(1) the table structure module described in increases sequential coding field on service attribute field basis;
(2) data maintenance module described in increases data record according to the sequential coding field, modify and It deletes;
(1-2.1) generates the Major key ID of newly-increased record according to business rule;
The sequential coding of (1-2.2) acquisition parent record;
The sequential coding of the newly-increased record of (1-2.3) setting;
(1-2.4) is according to the insertion of the standard implementation data record of database;
The existing sequential coding of (2-2.1) preservation modification record;
(2-2.2) obtains the sequential coding of the new parent record of change;
(2-2.3) generates the value of new sequential coding field according to rule;
The value of (2-2.4) batch updating modification record and the sequential coding field of all subrecords;
(3-2.1) obtains and saves the value of the sequential coding field of deletion record;
(3-2.2) batch deletes designated recorder and all juniors record;
(3) result set for pressing tree structure sequential arrangement is presented in the data retrieval sorting module described in.
As the preferred embodiment of the present invention, the value of new sequential coding field is generated in the step (2-2.3), Specifically:
The value of new sequential coding field is generated according to the following formula:
The value of sequential coding field=parent record sequential coding character string+this Record ID+separator;
In a specific embodiment of the invention, the present invention relates to tree data tables in a kind of application of big data to realize efficiently inspection Rope and the design of the structure of sequence and method: its principle is one " sequential coding " (SeqNo) field of increase in tree data table Come the position sequence kept records of, this sequential coding is safeguarded by rule provided by the invention by the increase of table, modification function, It is constructed when the tree data table for uncertain level and number of nodes carries out subrecord inquiry using this sequential coding field Querying condition can simple, quickly, efficiently obtain the system structure design and implementation method of query result.In addition, fast meeting Under speed response big data application environment while tree structure data cascade query demand, the present invention has independent of certain number According to the versatility and universality of library management software.
The present invention mainly realizes following purpose for the retrieval of tree data table and sequence scene in big data application:
Efficient querying method is provided, user terminal can be allowed to be quickly obtained the query result of meet demand;
Reduce the consumption of application server and database server resource (database connect, network, calculating etc.);
Support different database management languages, the certain capabilities provided independent of certain database.
In big data application environment, when the number of nodes of tree structure data is very big, there are many level and level is not fixed In the case where.
In big data application environment, for single table data of the tree structure with father and son's membership, application software Interface is usually required with Tree structure display data, and this requires the data that Business Logic is output to boundary layer are also by tree-like The sequence that is subordinate to of structure provides, and when the number of nodes of tree structure data is very big, there are many level and the unfixed feelings of level quantity Under condition, the circular recursion algorithm computational efficiency generallyd use is low, and resource consumption is big, is unable to satisfy the need that interface edge is quickly shown Want, the present invention is directed to the tree structure list table of this father and son's membership, provide a kind of unique data list structure design and The method of data sorting and maintenance can obviously improve the efficiency that table data are retrieved and sorted by tree structure.
The present invention includes three component parts:
One, table structure method and the value rule of treelike structural table
Two, treelike structural table data maintaining method
Three, treelike structural table data retrieval sort method
For convenience of explanation, it is assumed that the tree structure scene of a standard is as shown in Figure 1.
Digital number expression in figure represents the unique number (Major key) of each node of tree structure, and each node may It also include other attributes (such as title, state).
Scene is a segment of tree structure in figure, and the number of nodes and the number of plies of tree are dynamically, that is, to indicate node Number may extend more, level may also be more than 5 levels shown in figure.
Three component parts of the invention are specifically described below in conjunction with the scene of offer:
One, table structure method and the value rule of treelike structural table
For the tables of data with father and son's membership, on the service attribute field basis that tables of data includes, increase by one A " sequential coding " field (field name is assumed to SeqNo), the field use character string type, the value rule of field value are as follows:
Parent record sequential coding (SeqNo)+this record Major key (ID)+separator (" ") compiles the sequence of root node Code SeqNo is this record Major key (ID)+separator (" ")
Such as: in the scene figure (Fig. 1) being provided above, the sequential coding of root node (ID=1) is " 1. ";ID is 2 The father node of node is the node that ID is 1, so sequential coding is " 1.2. ", and so on.
It is as follows: in conjunction with the table structure and data record of tree structure scene figure
ID ParentID SeqNo Name Level
1 - 1. A 1
2 1 1.2. B 2
3 1 1.3. C 2
4 3 1.3.4. D 3
5 2 1.2.5. E 3
6 4 1.3.4.6. F 4
7 6 1.3.4.6.7. G 5
8 6 1.3.4.6.8. H 5
9 3 1.3.9. I 3
10 4 1.3.4.10. J 4
It can be seen that containing " sequential coding " field SeqNo in the field of this above table, field value is according to this hair The rule and method of bright offer generates.
Two, treelike structural table data maintaining method
The maintenance of data includes increase, modification and the deletion of data record, this is the routine techniques hand of database table operation Section can be completed using the stsndard SQL that database provides, and for the present invention, special is when changing to data progress additions and deletions, such as Method where manages sequential coding field SeqNo illustrates individually below:
1, data increase: when increasing new record, the step of operation, is as shown in Figure 2
Step explanation:
Step 1: according to the rule of business, generating the Major key ID of newly-increased record;
Step 2: since newly-increased record is centainly under the jurisdiction of some already existing parent record, the sequence of parent record can be obtained Encode SeqNo;
Step 3: the ID+ that the parent record SeqNo+ step 1 that the sequential coding SeqNo=step 2 of newly-increased record obtains obtains Separator " " (new character strings that three sections of character strings connect into order);
Step 4: after other field assignment of newly-increased record, number being realized using the ability that the stsndard SQL of database provides According to the insertion of record.
2, data modification: being based on method provided by the invention, and when changing the parent record of a certain data, needing to update should The sequential coding SeqNo of the record and SeqNo of all subrecords, operating procedure are as shown in Figure 3:
Step explanation:
Step 1: the existing sequential coding SeqNo value of modification record is stored in variable SeqNo1;
Step 2: the sequential coding SeqNo value of the new parent record of change is obtained, is stored in variable SeqNo2;
Step 3: value (character string SeqNo2+ this Record ID+" " of new sequential coding SeqNo field is generated according to rule The character string of composition), it is stored in variable SeqNo3;
Step 4: the sequence of modification record and all subrecords is updated using the standard characters replacement function REPLACE of SQL Column coding SeqNo field value, SQL syntax are as follows:
Update [table name] SET SeqNo=replace (SeqNo, SeqNo1, SeqNo3) where SeqNo like SeqNo1+ " % ";
Illustrate: if record modification is not related to the parent record membership of modification record, the mode that data update is used The update mode of data record conventional technical means.
3, data are deleted: the deletion for tree structure data table record, need to judge that it whether there is subrecord, if Operator, which confirms, to delete, and realization needs to delete designated recorder in logic and all subrecords, operating procedure are as shown in Figure 4:
Step explanation:
Step 1: the sequential coding SeqNo field value for being deleted record is obtained, is stored in variable SeqNo1;
Step 2: batch deletes designated recorder and all juniors record, SQL syntax are as follows:
Delete [table name] where SeqNo like SeqNo1+ " % ";
It will be apparent that being based on sequential coding SeqNo field, simplifies treelike structural table and delete some node and all child nodes Processing mode, and traditional processing mode is to find child node by the way of circular recursion to be deleted one by one.The former nothing By being to outclass the processing method of circular recursion on algorithm simplicity and treatment effeciency.
Three, treelike structural table data retrieval sort method
For the present invention, using table structure described in first part and sequential coding field value composition rule Mostly important meaning is the recall precision of promotion tree structure data,
Under normal circumstances, the data of tree structure are largely also required to show by Tree structure in the scene of application Come, this requires store the data of two-dimensional structure in the database to go out according to the ordered retrieval of the membership of data record Come, form a result set by tree structure sequential arrangement and be output to interface edge, is supplied to tree-like UI control and presents,
The data list structure design method used through the invention introduces sequential coding field SeqNo, so that this Become very simple by the data retrieval demand that tree structure sorts, it can by one section of simple standard database query language It is the SQL syntax for realizing retrieval ordering demand below to realize:
Select [list of fields] from [table name] where SeqNo like " [SeqNo of designated recorder]+' % ' " order by SeqNo
Technical solution brief summary: of the invention by the introduction to three component parts of the technology of the present invention solution Key processing is additionally to increase field sequence code field for tree structure data table, it appears that seems to increase data dimension The complexity for protecting processing, provides a kind of efficient processing method actually for the data query of tree structure data table and displaying, On the one hand the complexity of exploitation is reduced, the efficiency of data query is on the other hand also maximumlly improved, reduces to system The consumption of resource.Under current big data application environment, the present invention has a wide range of applications scene.
In current information system, the tree structure data scene with membership is very extensive, and this section will be selected One of them typical scene " organization tree " is selected to describe the implementation process for realizing efficient data retrieval based on the present invention.
In large enterprise, organization's number covers all subsidiary and department, such as the organization of a bank Management level contains head office, region, branch, subbranch, sub-department, in China, every level-one parallel nodes quantity nor The mechanism quantity of Chang Duo, one large-scale nationwide bank are usually more than 10,000, constitute huge organization's data tree, As shown in Figure 5.
It is assumed that this family's nationwide bank has divided East China, south China, North China, West China, Central China Wu great Qu, each great Qu includes average 6 branches, every branch include average 20 subbranches, and every subbranch includes average 20 sub-departments, then total mechanism number=1 + 5 × 6 × 20 × 20=12001 family, if obtaining the data set of all clamp mechanisms in the area Hua Dong great by the sequence that mechanism is subordinate to, To show that the mechanism tree of a similar upper figure needs according to existing common circular recursion inquiring technology on a user interface The database querying step and number of completion are as follows:
1, all branches record (obtaining 6 branches to record) for inquiring the area Hua Dong great, is inquired 1 time
2, it is recycled based on branch's record, (circulation obtains 20 subbranches to all subrecords of the specified branch of inquiry every time Record, totally 120 subbranches record), it inquires 6 times
3, subbranch's record based on acquisition is recycled, and inquires sub-department's (20 points of circulation acquisition every time of each subbranch Recorded at reason, totally 120 × 20=2400 times), it inquires 120 times
4, since recursive algorithm does not know whether there are also clamp mechanisms under sub-department, it is still desirable to recurrence down, for every family Sub-department's circulation, inquires the clamp mechanism of sub-department, it is assumed that this scene in there is no Lower Establishment, but still queried 120 × 20 times
Above total inquiry times=1+6+6 × 20+6 × 20 × 20=2527 times, it is obvious that this processing mode will be right Under database server brings very big pressure, while the efficiency inquired is very low, the response that will lead to user interface end becomes Must be very slow, in addition, the three above steps are realized in the logical program of one section of relative complex circular recursion, developer is mentioned Higher technical capability requirement is gone out.
Next, fully achieving same Search Requirement using method provided by the invention, the following are the implementations of embodiment Step, structure are as shown in Figure 5: the data set of all clamp mechanisms in the area Hua Dong great is obtained by the sequence that mechanism is subordinate to.It is more than control Method, it will obviously experience the advantage being simple and efficient possessed by the present invention.
One, the table structure of institution table
It is following (part) for institution table (Organization) structure of banking institution's design data
In this table, SeqNo field is sequential coding field, stores each mechanism and records corresponding sequential coding, presses The data record formed according to rule provided by the invention is as follows:
OrgID OrgName ParentOrgID SeqNo Level OrgCode
1 Head office - 1. 1
159 Sub-department 113 101 1.20.52.101.159. 5
20 The area Hua Dong great 1 1.20. 2
11 Sub-department 133 124 1.20.52.124.181 5
3 The area Hua Nan great 1 1.43. 2
52 In lines 1 20 1.20.52. 3
146 Sub-department 112 101 1.20.52.101.146. 5
69 In lines 2 20 1.20.69. 3
199 Sub-department 134 124 1.20.52.124.199 5
101 Subbranch 11 52 1.20.52.101. 4
174 Sub-department 132 124 1.20.52.124.174 5
112 Subbranch 12 52 1.20.52.112. 4
135 Sub-department 111 101 1.20.52.101.135. 5
163 Sub-department 131 124 1.20.52.124.163 5
31 The area Hua Bei great 1 1.31. 2
124 Subbranch 13 52 1.20.52.124. 4
77 In lines 3 20 1.20.77. 3
It can be seen that the membership of every record meets bank machine provided above in the data of this institution table The scene figure of structure, but putting in order for the data record stored in tables of data is irregular, meanwhile, the sequence of every record Coded word segment value follows the rule in technical solution of the present invention, i.e. sequential coding=father mechanism sequential coding+mechanism OrgID+ separator " ".
Two, the efficient data retrieval based on sequential coding field
For the unordered institution table data stored above, if it is desired to retrieving all clamp mechanisms in the area Hua Dong great, and press Membership sequence, processing method are as follows:
1) the mechanism number (OrgID=20) and mechanism sequential coding (SeqNo=" 1.20. ") in the area Hua Dong great are obtained
2) it is inquired using the SQL syntax of technical solution of the present invention component part three, as follows:
Select × from Organization where SeqNo like " 1.20.% " order by SeqNo;
The data result collection for obtaining output based on the inquiry is as follows:
OrgID OrgName ParentOrgID SeqNo Level OrgCode
20 The area Hua Dong great 1 1.20. 2
52 In lines 1 20 1.20.52. 3
101 Subbranch 11 52 1.20.52.101. 4
135 Sub-department 111 101 1.20.52.101.135. 5
146 Sub-department 112 101 1.20.52.101.146. 5
159 Sub-department 113 101 1.20.52.101.159. 5
112 Subbranch 12 52 1.20.52.112. 4
124 Subbranch 13 52 1.20.52.124. 4
163 Sub-department 131 124 1.20.52.124.163 5
174 Sub-department 132 124 1.20.52.124.174 5
181 Sub-department 133 124 1.20.52.124.181 5
199 Sub-department 134 124 1.20.52.124.199 5
69 In lines 2 20 1.20.69. 3
77 In lines 3 20 1.20.77. 3
It will be apparent that the query result obtained meets the needs of retrieval: obtaining the area Hua Dong great by the sequence of membership All clamp mechanism record sets.1 inquiry has only been done in entire processing, only needs to construct the character string of query SQL, phase in program processing 2427 inquiries of the circular recursion algorithm used for front, it is evident that embody advantage of the invention: exploitation is simple, place Reason efficiently, occupies system resource low.
Using it is of the invention based on big data application realize tree data table efficient retrieval and ranking function system and Method by additionally increasing field sequence code field in tree structure data table, and is handled by field value provided by the invention Rule, data maintenance and data retrieval method, can be simple and efficient is that the user interface end of application system is provided according to being subordinate to The tree structure data collection of relationship arrangement, relative to circular recursion algorithm is used, the present invention is efficient with operation, exploitation is simple, The advantages of reducing resource consumption;Relative to the specific syntax that certain database (such as oracle database) provides, the present invention is provided Method be suitable for all relevant databases, have very strong applicability.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that can still make Various modifications and alterations are without departing from the spirit and scope of the invention.Therefore, the description and the appended drawings should be considered as illustrative And not restrictive.

Claims (9)

1. a kind of system for realizing tree data table efficient retrieval and ranking function based on big data application, which is characterized in that institute The system stated includes:
Table structure module for increasing sequential coding field on service attribute field basis, and presses specified rule value;
Data maintenance module is connected with the table structure module, for according to the sequential coding field logarithm Increased according to record, modified and is deleted;
Data retrieval sorting module is connected with the table structure module and data maintenance module, for rendering by tree The result set of shape structural order arrangement.
2. according to claim 1 be based on what tree data table efficient retrieval and ranking function were realized in big data application System, which is characterized in that the sequential coding field of the table structure module uses character string type.
3. according to claim 1 be based on what tree data table efficient retrieval and ranking function were realized in big data application System, which is characterized in that the value rule of the sequential coding field value of the table structure module, specifically:
Field value=parent record sequential coding+this record Major key+separator.
4. according to claim 1 be based on what tree data table efficient retrieval and ranking function were realized in big data application System, which is characterized in that the data maintenance module includes:
Data adding unit is connected with the table structure module, for increasing according to sequential coding field value rule Add new record;
Data modification unit being connected with the table structure module, its sequence updated when for changing data parent record The sequential coding of coding and subrecord;
Data delete unit, are connected with the table structure module, are used for according to sequential coding field as condition entry Delete the record and its all subrecords of tree structure data table.
5. a kind of realize that the tree data table applied based on big data is high using system described in any one of any one of claims 1 to 44 The method of effect retrieval and sequence processing, which is characterized in that the method the following steps are included:
(1) the table structure module described in increases sequential coding field on service attribute field basis;
(2) data maintenance module described in increases data record, modified and is deleted according to the sequential coding field;
(3) result set for pressing tree structure sequential arrangement is presented in the data retrieval sorting module described in.
6. the side according to claim 5 for realizing the tree data table efficient retrieval applied based on big data and sequence processing Method, which is characterized in that increase data record in the step (2) specifically includes the following steps:
(1-2.1) generates the Major key ID of newly-increased record according to business rule;
The sequential coding of (1-2.2) acquisition parent record;
The sequential coding of the newly-increased record of (1-2.3) setting;
(1-2.4) is according to the insertion of the standard implementation data record of database.
7. the side according to claim 5 for realizing the tree data table efficient retrieval applied based on big data and sequence processing Method, which is characterized in that modification data record in the step (2) specifically includes the following steps:
The existing sequential coding of (2-2.1) preservation modification record;
(2-2.2) obtains the sequential coding of the new parent record of change;
(2-2.3) generates the value of new sequential coding field according to rule;
The value of (2-2.4) batch updating modification record and the sequential coding field of all subrecords.
8. the side according to claim 7 for realizing the tree data table efficient retrieval applied based on big data and sequence processing Method, which is characterized in that the value of new sequential coding field is generated in the step (2-2.3), specifically:
The value of new sequential coding field is generated according to the following formula:
The value of sequential coding field=parent record sequential coding character string+this Record ID+separator.
9. the side according to claim 5 for realizing the tree data table efficient retrieval applied based on big data and sequence processing Method, which is characterized in that deletion data record in the step (3) specifically includes the following steps:
(3-2.1) obtains and saves the value of the sequential coding field of deletion record;
(3-2.2) batch deletes designated recorder and all juniors record.
CN201811611077.7A 2018-12-27 2018-12-27 The system and method for tree data table efficient retrieval and ranking function is realized based on big data application Withdrawn CN109684336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811611077.7A CN109684336A (en) 2018-12-27 2018-12-27 The system and method for tree data table efficient retrieval and ranking function is realized based on big data application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811611077.7A CN109684336A (en) 2018-12-27 2018-12-27 The system and method for tree data table efficient retrieval and ranking function is realized based on big data application

Publications (1)

Publication Number Publication Date
CN109684336A true CN109684336A (en) 2019-04-26

Family

ID=66190522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811611077.7A Withdrawn CN109684336A (en) 2018-12-27 2018-12-27 The system and method for tree data table efficient retrieval and ranking function is realized based on big data application

Country Status (1)

Country Link
CN (1) CN109684336A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309369A (en) * 2019-06-06 2019-10-08 福建天泉教育科技有限公司 A kind of implementation method and terminal of tree structure data
CN112000667A (en) * 2020-08-10 2020-11-27 多点(深圳)数字科技有限公司 Method, apparatus, server and medium for retrieving tree data
CN112241412A (en) * 2020-10-28 2021-01-19 天津中新智冠信息技术有限公司 Tree structure table generation method and device and electronic equipment
CN113656400A (en) * 2021-07-08 2021-11-16 上海二三四五网络科技有限公司 Feature data encoding method and device
CN113886433A (en) * 2021-10-01 2022-01-04 浙江大学 Hierarchical structure area retrieval method
CN115840751A (en) * 2023-02-21 2023-03-24 山东经伟晟睿数据技术有限公司 Novel tree data coding method
CN117575004A (en) * 2024-01-16 2024-02-20 北京壁仞科技开发有限公司 Nuclear function determining method, computing device and medium based on double-layer decision tree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邢海燕: "一种通用的树形结构编码设计方法", 《万方学术会议数据库》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309369A (en) * 2019-06-06 2019-10-08 福建天泉教育科技有限公司 A kind of implementation method and terminal of tree structure data
CN112000667A (en) * 2020-08-10 2020-11-27 多点(深圳)数字科技有限公司 Method, apparatus, server and medium for retrieving tree data
CN112000667B (en) * 2020-08-10 2024-04-12 多点(深圳)数字科技有限公司 Method, apparatus, server and medium for retrieving tree data
CN112241412A (en) * 2020-10-28 2021-01-19 天津中新智冠信息技术有限公司 Tree structure table generation method and device and electronic equipment
CN112241412B (en) * 2020-10-28 2023-10-13 天津中新智冠信息技术有限公司 Tree structure table generation method and device and electronic equipment
CN113656400A (en) * 2021-07-08 2021-11-16 上海二三四五网络科技有限公司 Feature data encoding method and device
CN113656400B (en) * 2021-07-08 2024-02-27 上海二三四五网络科技有限公司 Characteristic data encoding method and device
CN113886433A (en) * 2021-10-01 2022-01-04 浙江大学 Hierarchical structure area retrieval method
CN115840751A (en) * 2023-02-21 2023-03-24 山东经伟晟睿数据技术有限公司 Novel tree data coding method
CN117575004A (en) * 2024-01-16 2024-02-20 北京壁仞科技开发有限公司 Nuclear function determining method, computing device and medium based on double-layer decision tree
CN117575004B (en) * 2024-01-16 2024-05-10 北京壁仞科技开发有限公司 Nuclear function determining method, computing device and medium based on double-layer decision tree

Similar Documents

Publication Publication Date Title
CN109684336A (en) The system and method for tree data table efficient retrieval and ranking function is realized based on big data application
US9009099B1 (en) Method and system for reconstruction of object model data in a relational database
CN112214611B (en) Enterprise knowledge graph construction system and method
US6199059B1 (en) System and method for classifying and retrieving information with virtual object hierarchy
US5257365A (en) Database system with multi-dimensional summary search tree nodes for reducing the necessity to access records
CN103314371B (en) A kind of method and system of retrieval
CN108647276B (en) Searching method
CN102982076A (en) Multi-dimensionality content labeling method based on semanteme label database
CA2484009A1 (en) Managing expressions in a database system
JP2010039593A (en) Table classification device, table classification method, and table classification program
CN111506621A (en) Data statistical method and device
CN104794146A (en) Method and device for real-time screening and ranking of commodities
US10990573B2 (en) Fast index creation system for cloud big data database
CN102467544B (en) Information smart searching method and system based on space fuzzy coding
CN103064841A (en) Retrieval device and retrieval method
CN113886397A (en) Data resource directory system
CN112270628A (en) Intellectual property theme library management method and system
CN109063063B (en) Data processing method and device based on multi-source data
McClean et al. A comparison of mapreduce and parallel database management systems
US9400814B2 (en) Hierarchy nodes derived based on parent/child foreign key and/or range values on parent node
CN111159285B (en) Enterprise cross-system retrieval method based on distributed index service deployment
CN106372238A (en) Method for realizing non-recursive unlimited classification based on database
CN102541879A (en) Query method and query device for treelike structural table
JPH0934906A (en) Book management device
US20100205155A1 (en) System and method for content management and determination of search conditions

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20190426

WW01 Invention patent application withdrawn after publication