CN107844582A - The search method and retrieval device of a kind of tree structure - Google Patents

The search method and retrieval device of a kind of tree structure Download PDF

Info

Publication number
CN107844582A
CN107844582A CN201711114716.4A CN201711114716A CN107844582A CN 107844582 A CN107844582 A CN 107844582A CN 201711114716 A CN201711114716 A CN 201711114716A CN 107844582 A CN107844582 A CN 107844582A
Authority
CN
China
Prior art keywords
nodename
specified
node data
node
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711114716.4A
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.)
Inspur Software Co Ltd
Original Assignee
Inspur 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 Inspur Software Co Ltd filed Critical Inspur Software Co Ltd
Priority to CN201711114716.4A priority Critical patent/CN107844582A/en
Publication of CN107844582A publication Critical patent/CN107844582A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a kind of search method of tree structure and retrieval device, including:Tree structure is pre-created, wherein, the tree structure includes at least two node datas;Node location and nodename corresponding to each described node data are determined respectively, wherein, the node location corresponds with the nodename;Obtain the inquiry application of user's input;Determine to whether there is the specified nodename corresponding with the inquiry application in each nodename;If it is, specifying node location according to corresponding to the specified nodename, the specified node data corresponding with the inquiry application is obtained;The specified node data is showed into the user.This programme can improve the efficiency that user inquires about data.

Description

The search method and retrieval device of a kind of tree structure
Technical field
The present invention relates to field of computer technology, the search method and retrieval device of more particularly to a kind of tree structure.
Background technology
Tree structure is referred to there is the data structure of the tree-like relation of " one-to-many " between data element, is a kind of weight The nonlinear data structure wanted.Because tree structure hierarchical relationship understands, it is easy to manage, therefore most enterprises are to business datum Storage mode be exactly to be stored with tree form data structure.
At present, user need to search some data in tree structure, it is thus necessary to determine that data to be checked are in tree structure Node location, open the level content in tree structure one by one according to node location, then search from corresponding level to be checked Data.But increasing with business data information, corresponding tree hierarchy and tree node are also increasing, this can cause User expends the excessive time when searching the tree node corresponding with data to be checked, so as to cause user to inquire about data Efficiency is low.
The content of the invention
The embodiments of the invention provide a kind of search method of tree structure and retrieval device, it is possible to increase user inquires about number According to efficiency.
In a first aspect, the embodiments of the invention provide a kind of search method of tree structure, including:
Tree structure is pre-created, wherein, the tree structure includes at least two node datas;
Node location and nodename corresponding to each described node data are determined respectively, wherein, the node location Corresponded with the nodename;
Obtain the inquiry application of user's input;
Determine to whether there is the specified nodename corresponding with the inquiry application in each nodename;
If it is, specifying node location according to corresponding to the specified nodename, obtain relative with the inquiry application The specified node data answered;
The specified node data is showed into the user.
Preferably, it is described determine node location corresponding to each described node data and nodename respectively after, Before whether there is the nodename to be pushed corresponding with the inquiry application in each nodename of determination, Further comprise:
For nodename each described, name information corresponding to the nodename is determined, wherein, the title letter Breath includes Chinese, Chinese spelling and Chinese simplicity;
The node location according to corresponding to the nodename, determine the node position corresponding to the name information Put;
It is described to determine to whether there is the specified nodename corresponding with the inquiry application in each nodename, Including:
By it is described inquiry application respectively with nodename each described corresponding to the name information be compared, it is determined that Name information is specified with the presence or absence of corresponding with the inquiry application;
It is described if it is, according to corresponding to the specified nodename specify node location, obtain with it is described inquiry apply Corresponding specified node data, including:
It is corresponding according to the specified name information when existing with the corresponding specified name information of inquiry application Specified node location, obtain and inquire about the corresponding specified node data of application with described.
Preferably, after name information corresponding to the determination nodename, further comprise:
For Chinese each described, determine to whether there is at least one polyphone in the Chinese;
If it is, increase multitone Chinese spelling in the name information corresponding to the Chinese with polyphone With multitone Chinese simplicity.
Preferably, it is described determine to whether there is in each nodename it is corresponding with the inquiry apply specified After nodename, node location is specified according to corresponding to the specified nodename described, obtains and applies with the inquiry Before corresponding specified node data, further comprise:
At least one node data that the nodename is met to the inquiry application shows the user;
It is described that node location is specified according to corresponding to the specified nodename, obtain corresponding with the inquiry application Node data is specified, including:
When receiving the target that the user selects from least one specified nodename and specifying nodename, Target specifies node location according to corresponding to the target specifies nodename, obtains the target corresponding with the inquiry application Specify node data.
Preferably, after the acquisition specified node data corresponding with the inquiry application, described by described in Before specified node data shows the user, further comprise:
Determine hierarchical relationship of the specified node data in the tree structure;
It is described that the specified node data is showed into the user, including:
The hierarchical relationship of the specified node data and the specified node data is showed into the user.
Second aspect, the embodiments of the invention provide a kind of retrieval device of tree structure, including:
Creating unit, for being pre-created tree structure, wherein, the tree structure includes at least two nodes According to;
Processing unit, node position corresponding to the node data created for determining each described creating unit respectively Put and nodename, wherein, the node location corresponds with the nodename;Determine be in each nodename It is no the specified nodename corresponding with the inquiry application that the acquiring unit obtains to be present;If it is, according to the finger Determine to specify node location corresponding to nodename, obtain the specified node data corresponding with the inquiry application;
Acquiring unit, for obtaining the inquiry application of user's input;
Display unit, the specified node data for the processing unit to be obtained show the user.
Preferably, the processing unit, it is further used for being directed to each described nodename, determines the nodename Corresponding name information, wherein, the name information includes Chinese, Chinese spelling and Chinese simplicity;According to the node The node location corresponding to title, determine the node location corresponding to the name information;By the inquiry application difference With nodename each described corresponding to the name information be compared, it is determined whether exist with it is described inquiry application it is corresponding Specified name information;When existing with the corresponding specified name information of inquiry application, according to the specified title Node location is specified corresponding to information, obtains the specified node data corresponding with the inquiry application.
Preferably, the processing unit, it is further used for being directed to each described Chinese, determines the Chinese In whether there is at least one polyphone;If it is, in the name information corresponding to the Chinese with polyphone Middle increase multitone Chinese spelling and multitone Chinese simplicity.
Preferably, the display unit, it is further used for meeting the nodename at least the one of the inquiry application The individual node data shows the user;
The processing unit, be further used for the acquiring unit receive the user from it is described it is at least one specify When the target selected in nodename specifies nodename, target specifies node according to corresponding to the target specifies nodename Position, obtain the target corresponding with the inquiry application and specify node data.
Preferably, the processing unit, it is further used for determining the specified node data in the tree structure Hierarchical relationship;
The display unit, it is further used for the level by the specified node data and the specified node data Relation shows the user.
In embodiments of the present invention, by being pre-created tree structure, then to each node data in tree structure Confirmed, the nodes needed for user can be searched from the node data of confirmation when obtaining the inquiry application of user's input According to, and show user.As fully visible, user need to only input required node data, and and if only if is present and inquiry application phase During the node data met, node data can be showed user, it is possible to reduce time during user's manual queries node data, So as to improve the efficiency that user inquires about data.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow chart of the search method for tree structure that one embodiment of the invention provides;
Fig. 2 is the flow chart of the search method for another tree structure that one embodiment of the invention provides;
Fig. 3 is a kind of structural representation of the retrieval device for tree structure that one embodiment of the invention provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of search method of tree structure, including:
Step 101:Tree structure is pre-created, wherein, the tree structure includes at least two node datas;
Step 102:Node location and nodename corresponding to each described node data are determined respectively, wherein, it is described Node location corresponds with the nodename;
Step 103:Obtain the inquiry application of user's input;
Step 104:Determine to whether there is the specified node corresponding with the inquiry application in each nodename Title;
Step 105:If it is, specifying node location according to corresponding to the specified nodename, obtain and the inquiry Apply for corresponding specified node data;
Step 106:The specified node data is showed into the user.
In embodiments of the present invention, by being pre-created tree structure, then to each node data in tree structure Confirmed, the nodes needed for user can be searched from the node data of confirmation when obtaining the inquiry application of user's input According to, and show user.As fully visible, user need to only input required node data, and and if only if is present and inquiry application phase During the node data met, node data can be showed user, it is possible to reduce time during user's manual queries node data, So as to improve the efficiency that user inquires about data.
In an embodiment of the present invention, node location and section corresponding to each described node data are determined respectively described Call the roll after being referred to as, push section is treated with the presence or absence of corresponding with the inquiry application in each nodename of determination Call the roll before being referred to as, further comprise:
For nodename each described, name information corresponding to the nodename is determined, wherein, the title letter Breath includes Chinese, Chinese spelling and Chinese simplicity;
The node location according to corresponding to the nodename, determine the node position corresponding to the name information Put;
It is described to determine to whether there is the specified nodename corresponding with the inquiry application in each nodename, Including:
By it is described inquiry application respectively with nodename each described corresponding to the name information be compared, it is determined that Name information is specified with the presence or absence of corresponding with the inquiry application;
It is described if it is, according to corresponding to the specified nodename specify node location, obtain with it is described inquiry apply Corresponding specified node data, including:
It is corresponding according to the specified name information when existing with the corresponding specified name information of inquiry application Specified node location, obtain and inquire about the corresponding specified node data of application with described.
In embodiments of the present invention, Chinese corresponding to each node data, the full name of Chinese and Chinese simplicity are determined, Chinese, the Chinese that the node data to be inquired about in user's query node data, can be inputted according to self-demand are complete Name or Chinese simplicity, you can required node data is searched from tree structure, needed for being searched manually from tree structure Data.As fully visible, a variety of retrieval modes of node data can meet the needs of different user so that user saves in inquiry It is more convenient during point data, so as to improve the experience of user.
In an embodiment of the present invention, after name information corresponding to the determination nodename, further wrap Include:
For Chinese each described, determine to whether there is at least one polyphone in the Chinese;
If it is, multitone Chinese spelling will be increased in the name information corresponding to the Chinese with polyphone With multitone Chinese simplicity.
In embodiments of the present invention, with the presence of the situation of a small number of Chinese character multitones, in order to meet the different query demand of user, When polyphone be present in the Chinese for confirming node data, you can in name information corresponding to the Chinese name with polyphone Middle increase multitone Chinese spelling and multitone Chinese simplicity, not only facilitate the node data needed for user's inquiry, can also make retrieval The process of node data is more convenient, so as to improve the experience of user.
For example, there are wulumuqi, wlmq, wulumuji and wlmj in the name information in Urumchi.
In an embodiment of the present invention, determine to whether there is and the inquiry application in each nodename described After corresponding specified nodename, it is described according to corresponding to the specified nodename specify node location, obtain with Before corresponding specified node data is applied in the inquiry, further comprise:
At least one node data that the nodename is met to the inquiry application shows the user;
It is described that node location is specified according to corresponding to the specified nodename, obtain corresponding with the inquiry application Node data is specified, including:
When receiving the target that the user selects from least one specified nodename and specifying nodename, Target specifies node location according to corresponding to the target specifies nodename, obtains the target corresponding with the inquiry application Specify node data.
In embodiments of the present invention, in tree structure, at least two nodes being consistent with the inquiry application of user be present During data, the node data title for meeting inquiry application can be showed user, and if only if, and user is choosing displaying at least During specified node data in one node data, by the content displaying in specified node data to user, can avoid to The node data of family displaying is to be consistent with inquiry application and the node data needed for non-user, so as to improve the body of user Test.
In an embodiment of the present invention, after the acquisition specified node data corresponding with the inquiry application, It is described the specified node data is showed into the user before, further comprise:
Determine hierarchical relationship of the specified node data in the attribute structure;
It is described that the specified node data is showed into the user, including:
The hierarchical relationship of the specified node data and the specified node data is showed into the user.
In embodiments of the present invention, in tree structure there is certain hierarchical relationship in each node data, from When the corresponding node data of the inquiry application inputted with user is found in tree structure, by node data and node data Corresponding hierarchical relationship shows user, can close subordinate of clearer and more definite the searched node data of user in tree structure System, so as to improve the experience of user.
As shown in Fig. 2 in order to more clearly illustrate technical scheme and advantage, the embodiment of the present invention is provided The search method of tree structure a kind of be described in detail, specifically may comprise steps of:
Step 201:Tree structure is pre-created, tree structure includes at least two node datas.
Specifically, there are the data of aggregating characteristic can be abstracted into tree structure for all, therefore tree structure is in enterprise It is widely used.
For example, by jquery.ztree.js plug-in units, the root using entitled " whole nation " file as tree structure Node data, there are node data " Henan " " Hebei " and " Xinjiang " below root node, and have " Wu Lumu below " Xinjiang " Together ".
Step 202:Node location and nodename corresponding to each node data are determined respectively.
Specifically, it is determined that the node location and nodename of each node data, can be in user input query application When, orient meet the node data that user inquires about application as early as possible, so as to save the query time of user, improve search efficiency.
For example, determine that node data " Henan " " Hebei " and " Xinjiang " are stored in root node " whole nation " below, node Data " Urumchi " are stored in node data " Xinjiang " below.
Step 203:For each nodename, name information corresponding to nodename is determined, wherein, name information bag Include Chinese, Chinese spelling and Chinese simplicity.
Specifically, by determining Chinese corresponding to each node data, Chinese spelling and Chinese simplicity, Ke Yi During user's query node data, according to self-demand input the node data to be inquired about Chinese, Chinese full name or in Literary simplicity, you can search required node data.
For example, the Chinese for determining node data " Henan " is Hebei, and Chinese spelling is henan, Chinese simplicity For hn;
The Chinese for determining node data " Hebei " is Hebei, and Chinese spelling is hebei, and Chinese simplicity is hb;
It is determined that " Xinjiang " Chinese is Xinjiang, Chinese spelling is xinjiang, and Chinese simplicity is xj;
It is determined that " Urumchi " Chinese is Urumchi, Chinese spelling is wulumuqi, and Chinese simplicity is wlmq.
Step 204:For each Chinese, determine to whether there is at least one polyphone in Chinese.
Specifically, in input inquiry application, other sounds for the Chinese character that may be inputted are (for example, neat sound can be user Qi can be with when ji), so in order to meet the different query demand of user, it is thus necessary to determine that whether there is multitone in Chinese Word, during so that Chinese having polyphone, increase the name information in Chinese.
For example, determine to whether there is polyphone in Chinese Hebei, Xinjiang and Urumchi respectively.
Step 205:When at least one polyphone in Chinese be present, corresponding to the Chinese with polyphone Increase multitone Chinese pinyin and multitone Chinese pinyin in name information.
Specifically, inquired about in order to facilitate user, it is necessary to which the Chinese of polyphone is spelled when polyphone in Chinese be present Sound and Chinese simplicity increase in name information.
For example, multitone Chinese pinyin wulumuji and more is increased in Chinese is the name information in Urumchi Sound Chinese simplicity wlmj.
Step 206:Obtain the inquiry application of user's input.
Specifically, user is when inquiring about the data of tree structure, need to only input needed for corresponding inquiry application can find Node data, avoid and waste excessive time.
For example, the inquiry application for obtaining user's input is h.
Step 207:Determine to whether there is the finger corresponding with inquiry application in name information corresponding to each nodename Determine nodename.
Specifically, after the inquiry application of user's input is received, application and the node in tree structure will be inquired about Data are contrasted, and search the node data for meeting inquiry application.
For example, by autocomplete.js plug-in units, will inquiry application h difference hnan, hn, hebei, hb, Xinjiang, xj, wulumuqi, wlmq, wulumuji and wlmj are compared.
Step 208:When at least one specified nodename corresponding with inquiry application be present, nodename is met The node data of inquiry application shows user.
Specifically, when user is in input inquiry application, partial query application is such as merely entered, may be deposited in tree structure In multiple node datas being consistent with inquiry application, the node data being consistent with inquiry application is all showed into user, so as to User preferably selects required node data.
For example, nodename is met into inquiry application h node data " Henan " and " Hebei " shows user.
Step 209:When the target selected in receiving specified nodename of the user from displaying specifies nodename, root Specify target corresponding to nodename to specify node location according to target, obtain the target corresponding with inquiry application and specify nodes According to.
Specifically, the node data for meeting inquiry application is being showed after user, it is necessary to which user is according to the node of displaying Node data needed for data selection, so as to which the node data needed for user is showed into user.
For example, after node data " Henan " and " Hebei " are showed into user, it is remaining that user can continue input Inquiry application, or required node data is selected from the node data of displaying, for example, user selects node data " river North ".
Step 210:It is determined that the target obtained specifies hierarchical relationship of the node data in tree structure.
Specifically, in tree structure, there is certain hierarchical relationship in each node data with other node datas, Before specifying node data to show user the target for meeting inquiry application, it is thus necessary to determine that the level of destination node data is closed System, to specify node data and corresponding hierarchical relationship to show user target.
For example, the file that hierarchical relationship of the node data " Hebei " in tree structure is root node " whole nation " is determined Under.
Step 211:Node data and target is specified to specify hierarchical relationship exhibition of the node data in tree structure target Show to user.
Specifically, when the target for meeting inquiry application is specified into node data displaying user, target is specified into nodes According to hierarchical relationship and destination node data simultaneously show user, the clearer and more definite node data of user can be made in tree structure Hierarchical relationship.
For example, the hierarchical relationship of node data " Hebei " and node data " Hebei " and root node " whole nation " is shown To user.
As shown in figure 3, the embodiments of the invention provide a kind of retrieval device of tree structure, it is characterised in that including:
Creating unit 301, for being pre-created tree structure, wherein, the tree structure includes at least two nodes Data;
Processing unit 302, for determining respectively corresponding to the node data of each establishment of creating unit 301 Node location and nodename, wherein, the node location corresponds with the nodename;Determine each node name It whether there is the specified nodename corresponding with the inquiry application that the acquiring unit 303 obtains in title;If it is, root According to node location is specified corresponding to the specified nodename, the specified node data corresponding with the inquiry application is obtained;
Acquiring unit 303, for obtaining the inquiry application of user's input;
Display unit 304, the specified node data for the processing unit 302 to be obtained show the use Family.
In an embodiment of the present invention, the processing unit, it is further used for being directed to each described nodename, it is determined that Name information corresponding to the nodename, wherein, the name information includes Chinese, Chinese spelling and Chinese simplicity; The node location according to corresponding to the nodename, determine the node location corresponding to the name information;By described in Inquiry application respectively with nodename each described corresponding to the name information be compared, it is determined whether exist with it is described Name information is specified corresponding to inquiry application;When existing with the corresponding specified name information of inquiry application, according to Node location is specified corresponding to the specified name information, obtains the specified nodes corresponding with the inquiry application According to.
In an embodiment of the present invention, the processing unit, it is further used for being directed to each described Chinese, it is determined that It whether there is at least one polyphone in the Chinese;If it is, corresponding to the Chinese with polyphone Increase multitone Chinese spelling and multitone Chinese simplicity in the name information.
In an embodiment of the present invention, the display unit, it is further used for the nodename meeting the inquiry At least one node data of application shows the user;
The processing unit, be further used for the acquiring unit receive the user from it is described it is at least one specify When the target selected in nodename specifies nodename, target specifies node according to corresponding to the target specifies nodename Position, obtain the target corresponding with the inquiry application and specify node data.
In an embodiment of the present invention, the processing unit, it is further used for determining the specified node data described Hierarchical relationship in tree structure;
The display unit, it is further used for the level by the specified node data and the specified node data Relation shows the user.
The each embodiment of the present invention at least has the advantages that:
1st, in an embodiment of the present invention, by being pre-created tree structure, then to each node in tree structure Data are confirmed, the section needed for user can be searched from the node data of confirmation when obtaining the inquiry application of user's input Point data, and show user.As fully visible, user need to only input required node data, and and if only if is present with inquiring about Shen During the node data that please be consistent, node data can be showed user, it is possible to reduce during user's manual queries node data Time, so as to improve the efficiency that user inquires about data.
2nd, in an embodiment of the present invention, the full name of Chinese corresponding to each node data, Chinese and Chinese are determined Simplicity, can in user's query node data, according to self-demand input the node data to be inquired about Chinese, in Wen Quanming or Chinese simplicity, you can required node data is searched from tree structure, without being searched manually from tree structure Required data.As fully visible, a variety of retrieval modes of node data can meet the needs of different user so that user is looking into It is more convenient when asking node data, so as to improve the experience of user.
3rd, in an embodiment of the present invention, with the presence of the situation of a small number of Chinese character multitones, in order to meet the different inquiry of user Demand, when polyphone be present in the Chinese for confirming node data, you can in name corresponding to the Chinese name with polyphone Claim to increase multitone Chinese spelling and multitone Chinese simplicity in information, not only facilitate the node data needed for user's inquiry, can be with Make the process of retrieval node data more convenient, so as to improve the experience of user.
4th, in an embodiment of the present invention, in tree structure, have at least two and apply for what is be consistent with the inquiry of user During node data, the node data title for meeting inquiry application can be showed user, and if only if, and user is choosing displaying During specified node data at least one node data, by the content displaying in specified node data to user, it can avoid Node data to user's displaying is to be consistent with inquiry application and the node data needed for non-user, so as to improve user Experience.
5th, in an embodiment of the present invention, in tree structure there is certain hierarchical relationship in each node data, When finding the corresponding node data of the inquiry application inputted with user from tree structure, by node data and nodes According to corresponding hierarchical relationship show user, can make clearer and more definite the searched node data of user in tree structure from Category relation, so as to improve the experience of user.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply and exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements, But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence " including one ", is not arranged Except other identical factor in the process including the key element, method, article or equipment being also present.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, is merely to illustrate the skill of the present invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention, Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.

Claims (10)

  1. A kind of 1. search method of tree structure, it is characterised in that including:
    Tree structure is pre-created, wherein, the tree structure includes at least two node datas;
    Node location and nodename corresponding to each described node data are determined respectively, wherein, the node location and institute State nodename one-to-one corresponding;
    Obtain the inquiry application of user's input;
    Determine to whether there is the specified nodename corresponding with the inquiry application in each nodename;
    If it is, specifying node location according to corresponding to the specified nodename, obtain corresponding with the inquiry application Specify node data;
    The specified node data is showed into the user.
  2. 2. according to the method for claim 1, it is characterised in that
    It is described determine node location corresponding to each described node data and nodename respectively after, it is described determine it is each Before whether there is the nodename to be pushed corresponding with the inquiry application in the individual nodename, further comprise:
    For nodename each described, name information corresponding to the nodename is determined, wherein, the name information bag Include Chinese, Chinese spelling and Chinese simplicity;
    The node location according to corresponding to the nodename, determine the node location corresponding to the name information;
    It is described to determine to whether there is the specified nodename corresponding with the inquiry application, bag in each nodename Include:
    By it is described inquiry application respectively with nodename each described corresponding to the name information be compared, it is determined whether Name information is specified in the presence of corresponding with the inquiry application;
    It is described if it is, specify node location according to corresponding to the specified nodename, obtain relative with the inquiry application The specified node data answered, including:
    When existing with the corresponding specified name information of inquiry application, the finger according to corresponding to the specified name information Determine node location, obtain the specified node data corresponding with the inquiry application.
  3. 3. according to the method for claim 2, it is characterised in that
    After name information corresponding to the determination nodename, further comprise:
    For Chinese each described, determine to whether there is at least one polyphone in the Chinese;
    If it is, increase multitone Chinese spelling and more in the name information corresponding to the Chinese with polyphone Sound Chinese simplicity.
  4. 4. according to the method for claim 1, it is characterised in that
    It whether there is the specified node name corresponding with the inquiry application in each nodename of determination to be referred to as Afterwards, node location is specified according to corresponding to the specified nodename described, obtains the finger corresponding with the inquiry application Before determining node data, further comprise:
    At least one node data that the nodename is met to the inquiry application shows the user;
    It is described that node location is specified according to corresponding to the specified nodename, obtain corresponding with the inquiry application specified Node data, including:
    When receiving the target that the user selects from least one specified nodename and specifying nodename, according to The target specifies target corresponding to nodename to specify node location, obtains the target corresponding with the inquiry application and specifies Node data.
  5. 5. according to any described method in Claims 1-4, it is characterised in that
    After the acquisition specified node data corresponding with the inquiry application, described by the specified node data Before showing the user, further comprise:
    Determine hierarchical relationship of the specified node data in the tree structure;
    It is described that the specified node data is showed into the user, including:
    The hierarchical relationship of the specified node data and the specified node data is showed into the user.
  6. A kind of 6. retrieval device of tree structure, it is characterised in that including:
    Creating unit, for being pre-created tree structure, wherein, the tree structure includes at least two node datas;
    Processing unit, node location corresponding to the node data created for determining each described creating unit respectively and Nodename, wherein, the node location corresponds with the nodename;Determine whether deposited in each nodename In the specified nodename corresponding with the inquiry application that the acquiring unit obtains;If it is, according to the specified section Node location is specified corresponding to point title, obtains the specified node data corresponding with the inquiry application;
    Acquiring unit, for obtaining the inquiry application of user's input;
    Display unit, the specified node data for the processing unit to be obtained show the user.
  7. 7. retrieval device according to claim 6, it is characterised in that
    The processing unit, it is further used for being directed to each described nodename, determines title corresponding to the nodename Information, wherein, the name information includes Chinese, Chinese spelling and Chinese simplicity;According to corresponding to the nodename The node location, determine the node location corresponding to the name information;By it is described inquiry application respectively with each institute State the name information corresponding to nodename to be compared, it is determined whether have specified title corresponding with the inquiry application Information;When existing with the corresponding specified name information of inquiry application, according to corresponding to the specified name information Node location is specified, obtains the specified node data corresponding with the inquiry application.
  8. 8. retrieval device according to claim 7, it is characterised in that
    The processing unit, it is further used for being directed to each described Chinese, determines to whether there is in the Chinese At least one polyphone;If it is, increase multitone in the name information corresponding to the Chinese with polyphone Chinese spelling and multitone Chinese simplicity.
  9. 9. retrieval device according to claim 6, it is characterised in that
    The display unit, it is further used at least one nodes that the nodename is met to the inquiry application According to showing the user;
    The processing unit, it is further used for receiving the user from least one specified node in the acquiring unit When the target selected in title specifies nodename, target specifies node position according to corresponding to the target specifies nodename Put, obtain the target corresponding with the inquiry application and specify node data.
  10. 10. according to any described retrieval device in claim 6 to 9, it is characterised in that
    The processing unit, it is further used for determining hierarchical relationship of the specified node data in the tree structure;
    The display unit, it is further used for the hierarchical relationship by the specified node data and the specified node data Show the user.
CN201711114716.4A 2017-11-13 2017-11-13 The search method and retrieval device of a kind of tree structure Pending CN107844582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711114716.4A CN107844582A (en) 2017-11-13 2017-11-13 The search method and retrieval device of a kind of tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711114716.4A CN107844582A (en) 2017-11-13 2017-11-13 The search method and retrieval device of a kind of tree structure

Publications (1)

Publication Number Publication Date
CN107844582A true CN107844582A (en) 2018-03-27

Family

ID=61681839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711114716.4A Pending CN107844582A (en) 2017-11-13 2017-11-13 The search method and retrieval device of a kind of tree structure

Country Status (1)

Country Link
CN (1) CN107844582A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508866A (en) * 2011-10-09 2012-06-20 中国电子科技集团公司第二十八研究所 Digital addressing-based method for structured storage and rapid processing of command relation tree
CN102609545A (en) * 2012-03-14 2012-07-25 福建榕基软件股份有限公司 Method for fast searching and positioning tree node of tree structure
CN106339450A (en) * 2016-08-25 2017-01-18 成都索贝数码科技股份有限公司 Index method of tree-shaped data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508866A (en) * 2011-10-09 2012-06-20 中国电子科技集团公司第二十八研究所 Digital addressing-based method for structured storage and rapid processing of command relation tree
CN102609545A (en) * 2012-03-14 2012-07-25 福建榕基软件股份有限公司 Method for fast searching and positioning tree node of tree structure
CN106339450A (en) * 2016-08-25 2017-01-18 成都索贝数码科技股份有限公司 Index method of tree-shaped data

Similar Documents

Publication Publication Date Title
US10783213B2 (en) Flexible graph system for accessing organization information
US20180039399A1 (en) Interactive user interface for dynamically updating data and data analysis and query processing
CN104750681B (en) A kind of processing method and processing device of mass data
US9753960B1 (en) System, method, and computer program for dynamically generating a visual representation of a subset of a graph for display, based on search criteria
CN104809190B (en) A kind of database access method of tree structure data
CN102768674B (en) A kind of XML data based on path structure storage method
KR20140145018A (en) Knowledge index system and method thereof
CN104182405A (en) Method and device for connection query
US20190286721A1 (en) Graph based recommendation engine
CN103914487B (en) The collection of document, the system identifying and associating
US11487707B2 (en) Efficient file path indexing for a content repository
US9990397B2 (en) Optimized query ordering for file path indexing in a content repository
US20120197870A1 (en) Transforming entity and relation data using a proxy engine
US8914356B2 (en) Optimized queries for file path indexing in a content repository
US8694559B2 (en) Using database content for multiple business data systems connected to one database
US9886497B2 (en) Indexing presentation slides
CN107844582A (en) The search method and retrieval device of a kind of tree structure
US20230185818A1 (en) Systems and methods for generation and display of query visualizations
US7747652B2 (en) Structured data storage
JP5877488B1 (en) RDB system
CN107357836A (en) A kind of VNF bags and its image file delet method quoted and equipment
CN104102738B (en) A kind of method and device for expanding entity storehouse
CN113407678A (en) Knowledge graph construction method, device and equipment
CN105740250B (en) A kind of method and device for the property index creating XML node
CN110851543A (en) Data modeling method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180327