CN110110153A - A kind of method and apparatus of node searching - Google Patents

A kind of method and apparatus of node searching Download PDF

Info

Publication number
CN110110153A
CN110110153A CN201810070065.1A CN201810070065A CN110110153A CN 110110153 A CN110110153 A CN 110110153A CN 201810070065 A CN201810070065 A CN 201810070065A CN 110110153 A CN110110153 A CN 110110153A
Authority
CN
China
Prior art keywords
node
child
type
information
nodal information
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
CN201810070065.1A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810070065.1A priority Critical patent/CN110110153A/en
Publication of CN110110153A publication Critical patent/CN110110153A/en
Pending legal-status Critical Current

Links

Classifications

    • G06F17/30961
    • G06F17/30979

Abstract

The invention discloses a kind of method and apparatus of node searching, are related to field of computer technology.One specific embodiment of this method includes: receiving node searching request, obtains the node identification information in the node searching request;It determines node corresponding with the node identification information, the nodal information of child node associated with the node and the child node is obtained, using the nodal information of the child node as the nodal information of the node.This embodiment offers a kind of thinkings of quickly traversal tree construction, improve the efficiency of retrieval node;The management for tree construction is greatly strengthened simultaneously, and the ability for searching in tree construction, positioning, solving mistake.

Description

A kind of method and apparatus of node searching
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus of node searching.
Background technique
In information system, in order to be counted, be managed to data, analyzed, it is often necessary to data carry out tissue and Management, to obtain data and to be counted.Tree type data is the data structure of a kind of common data organization and management, referred to as Tree construction.Tree construction is made of tree node, and the relationship between each tree node can be predecessor relationship, subsequent relationship, same pass System and relationship at the same level.
Tree construction interior joint quantity is various, code and information storage dispersion.It, can be with base for some small-scale tree constructions In the structural relation of node, positioning node information quickly.But it with the increasing of number of nodes, the increase of tree construction and patrols The raising for collecting complexity causes nodal information position to be difficult to position, be easy the case where omitting.
In view of the above-mentioned problems, relatively broad mode is used at present, usually in the modeling process of tree construction, by artificial Record the tree node and corresponding nodal information of operation;When requiring to look up nodal information, then in the information recorded into Row is searched.
It, in the prior art can also be to pass through FlexSim (three dimension system simulation modeling as a kind of alternative embodiments Software) built in the specified tree node of Find Object searching functions.
In realizing process of the present invention, inventor has found the prior art, and at least there are the following problems:
(1) according to the mode of manual record nodal information, it is understood that there may be error of omission lacks the case where note;In addition, being built in tree construction It goes to record operated nodal information again during vertical, will increase dramatically settling time, causes working efficiency lower;
(2) mode of node is searched according to FlexSim, FlexSim function is limited, is only capable of search part first nodes (example Such as, child node), two-level node (for example, attribute child node) can not be searched for;In addition, the also not search of supporting node content, when searching " more contents can not be searched " when rope node content, can be prompted, search efficiency is influenced.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus of node searching, it is at least able to solve existing skill Art can not search node and node content, cause modeler that more time need to be spent operated for recording in modeling process Node and its information, and then the phenomenon that influence working efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of method of node searching is provided, is wrapped Include: receiving node searching request obtains the node identification information in the node searching request;It is determining to believe with the node identification Corresponding node is ceased, the nodal information of child node associated with the node and the child node is obtained, by the son Nodal information of the nodal information of node as the node.
Optionally, determination node corresponding with the node identification information obtains son associated with the node The nodal information of node and the child node, using the nodal information of the child node as the nodal information packet of the node It includes: determining node corresponding with the node identification information, the node is added and is traversed;It is associated with the node when existing The first child node when, obtain the first child node information of first child node, and traversal is added in first child node; When there is the second child node associated with first child node, the second child node letter of second child node is obtained Breath, and second child node is added and is traversed;It repeats the above steps, until sub- section associated with N child node is not present When point, determine that the nodal information of N number of child node is the nodal information of the node.
Optionally, further includes: the nodal information for obtaining the node determines rule according to scheduled node type, determines The node type of the nodal information;The request of receiving node type search, is determined for compliance with the section of the node type searching request Point, and obtain the nodal information of determined node.
Optionally, the node type includes at least text-type node, numeric type node, entry type node and key assignments type Node.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of device of node searching is provided, is wrapped Include: receiving module is used for receiving node searching request, obtains the node identification information in the node searching request;Search for mould Block, for determining corresponding with node identification information node, acquisition child node associated with the node and described The nodal information of child node, using the nodal information of the child node as the nodal information of the node.
Optionally, described search module is used for: node corresponding with the node identification information is determined, by the node Traversal is added;When there is the first child node associated with the node, the first child node of first child node is obtained Information, and first child node is added and is traversed;When there is the second child node associated with first child node, obtain The second child node information of second child node is taken, and second child node is added and is traversed;It repeats the above steps, until There is no the node letters for when child node associated with N child node, determining that the nodal information of N number of child node is the node Breath.
Optionally, further include node type search module, be used for: the nodal information of the node is obtained, according to scheduled Node type determines rule, determines the node type of the nodal information;The request of receiving node type search is determined for compliance with described The node of node type searching request, and obtain the nodal information of determined node.
Optionally, the node type includes at least text-type node, numeric type node, entry type node and key assignments type Node.
To achieve the above object, according to an embodiment of the present invention in another aspect, the electronics for providing a kind of node searching is set It is standby.
The electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one or more A program, when one or more of programs are executed by one or more of processors, so that one or more of processing The method that device realizes any of the above-described node searching.
To achieve the above object, according to an embodiment of the present invention in another aspect, provide a kind of computer-readable medium, On be stored with computer program, the method for any of the above-described node searching is realized when described program is executed by processor.
The scheme of the offer according to the present invention, one embodiment in foregoing invention have the following advantages that or beneficial to effects Fruit: can quickly traverse tree construction, improve the efficiency of retrieval node;Related personnel is greatly improved for the pipe of tree construction simultaneously Reason, and lookup, the ability for positioning, solving tree construction mistake in tree construction.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is a kind of main flow schematic diagram of the method for node searching according to an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of the method for optional node searching according to an embodiment of the present invention;
Fig. 3 is the flow diagram of the method for another optional node searching according to an embodiment of the present invention;
Fig. 4 is a kind of main modular schematic diagram of the device of node searching according to an embodiment of the present invention;
Fig. 5 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 6 is adapted for the structural representation for realizing the mobile device of the embodiment of the present invention or the computer system of server Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
It should be noted that the embodiment of the present invention is applicable to possess tree construction and needs a large amount of lookup tree structure informations Software or application program, related tree construction, can be modeling structure, and being also possible to word, excl etc. can be to node, section The database that structural relation, nodal information between point are summarized, arranged.The present invention is illustrated by taking FlexSim as an example, The information that can be run by storage of data structure software.
In addition, recursive function according to the present invention, is the function that can directly or indirectly call itself, i.e., to Mr. Yu One function f (x), domain are set A, if being determined for some value X0, functional value f (x0) in A by f (f (x0)), So just f (x) is referred to as recursive function.
Referring to Fig. 1, thus it is shown that a kind of broad flow diagram of the method for node searching provided in an embodiment of the present invention, including Following steps:
S101: receiving node searching request obtains the node identification information in node searching request.
S102: determining node corresponding with node identification information, obtains child node associated with node and child node Nodal information, using the nodal information of child node as the nodal information of node.
In above embodiment, for step S101, since nodal information is more, for convenient for nodal information management, usually According to the structural relation between node, tree construction is constructed.Wherein, the structural relation between node can have set membership, same Relationship and relationship at the same level etc., specifically:
1) set membership: the father node of node 1 is the forerunner of node 1, in addition, the father node of the forerunner of node 1 is also The forerunner of node 1;
The child node of node 1 is the subsequent of node 1;The subsequent child node of node 1 is also the subsequent of node 1;
2) same relation: node 1 and node 2 are the same nodes;
3) relationship at the same level: the father node of node 1 and the father node of node 2 are the same nodes;
4) other relationships: the relationship in addition to above description.
Each node in the tree construction has respective nodal information, the nodal information include but is not limited to be node In the number of plies of tree construction, the data for being stored in the node, the father node of the node, the child node of the node and the number of child node Amount etc..
Since the position of node each in tree construction, information are fixed, all nodes in the tree can be marked Know, and mark is uniquely corresponding to the node of a tree.Received node searching is requested, node identification therein is extracted The mode of information includes but is not limited to be:
1) it is extracted according to the creation time of node, for example, 2018.01.17;
2) it is extracted according to nodes encoding, for example, number 03;
3) it is extracted according to nodename, for example, data, rows, columns, initonreset;
4) it is extracted according to level where node: for example, third layer third;
5) it is extracted according to nodal information, for example, " add object to group ";
6) it is extracted according to node type, for example, text-type node.
For step S102, after getting node identification information, tree construction can be traversed, determines corresponding section Point, for example, determine be encoded to 03 node, determine third layer third node, determine nodename for " add object The node etc. of to group ".
It is inquired when calling first time according to the node identification information according to the mode of traversal;Later, will Traversal is added in the node, obtains all child nodes associated with the node, while obtaining the information of all child nodes, that is, extracts The information of all child nodes under the node improves information covering surface.
In addition, can be shown search result after carrying out traversal search in tree construction for node identification information, Specifically:
If 1) search result is "None", user " inquiry is less than the node being consistent with inputted information " is reminded, to remind User checks inputted information;
2) if search result is " having ", corresponding node and nodal information are shown, if search result meets use Family expectation, can terminate to search for or continue with next node searching request;Otherwise, user need to check inputted search It whether correct requests.
In addition, above embodiment is applicable to the case where static data and dynamic data, wherein for static number According to data remain unchanged, therefore only need a time tree construction of traversal;For dynamic data, due to node information at any time more Newly, it is therefore desirable to traverse again.Simultaneously as tree construction is more huge, it can be only in one of son in real process Tree construction carries out dynamic traversal or static traversal, can't traverse to entire tree construction, reduce search work amount.
Method provided by above-described embodiment proposes a kind of positioning node position and obtains the thinking of nodal information, By carrying out unique identification to node, is traversed in tree construction only in accordance with node identification, ensure that the steady of database performance It is fixed;In addition, the above method can also support multistage tree in the case where not depending on manpower, not increasing expense Spread, enhancing practicability.
Referring to fig. 2, a kind of method flow schematic diagram of optional node searching according to an embodiment of the present invention is shown, is wrapped Include following steps:
S201: receiving node searching request obtains the node identification information in node searching request.
S202: determining node corresponding with node identification information, and node is added and is traversed.
S203: when there is the first child node associated with node, obtaining the first child node information of the first child node, And the first child node is added and is traversed.
S204: when there is the second child node associated with the first child node, the second son section of the second child node is obtained Point information, and the second child node is added and is traversed.
S205: repeating the above steps, until determining N number of child node when child node associated with N child node is not present Nodal information be node nodal information.
In above embodiment, step S201, S202 can distinguish the description of step S101, S102 shown in Figure 1, herein It repeats no more.
In above embodiment, for step S203~S205, since the number of nodes of tree construction is numerous, and some nodes It being only used for sorting out, nodal information is the nodal information in associated child node, therefore, when handling node searching request, Recursion process can be carried out to it, determine all child nodes under the node, and the nodal information of all child nodes is determined as The nodal information of the node, specifically:
1) it according to node identification information, is scanned in tree construction, determines node corresponding with node identification information, obtain Take the nodal information of the node;
2) judge whether there is child node associated with the node, if judging result be there is no, terminate to traverse, it is no Then, it determines associated with the node and adjacent the first nearest child node, obtains identification information, the node letter of first child node Ergodic process is added in breath;
3) according to the identification information of the first child node, child node associated with first child node is judged whether there is, If judging result is that there is no stop subsequent traversal process;Otherwise, it determines associated with first child node and adjacent nearest The second child node, obtain the second child node identification information, nodal information, be added ergodic process;
4) it repeats the above process, until stopping traversal when some child node does not have associated child node;
5) nodal information of the acquired all child nodes of statistics, nodal information as institute's search node are simultaneously shown Show.
Therefore, when calling this to traverse recursive procedure for the first time, the node identification information in searching request, phase are used The node answered is the start node traversed.In implementation procedure later, using the node as Recursive parameter, traversal tree knot All child nodes associated with the node are added traversal, the subsequent automatic calling node of recursive function are realized, with determination by structure All child nodes under the node.
Further, the calling to attribute child node can also be realized, to obtain all properties child node under the node, Wherein, attribute child node is one of child node type.It can also realize the section at the same level to the node and all child nodes The calling of point, and the brother of node is added and is traversed, to obtain all brother of nodes under the node.
I.e., it is possible to obtain all associated nodes associated with node, specifically, attribute node, child node and peer Node.But attribute node also has oneself attribute node, child node, the brother of node, then goes to traverse;Child node also has oneself Attribute node, child node, the brother of node, then go to traverse;The brother of node also has the attribute node of oneself, child node, peer Node, then go to traverse;Until some node when not having associated attribute node, child node, the brother of node, will stop time It goes through.
Furthermore it is possible to the principle according to depth-first, first traversal child node (including attribute child node) traverses peer again Node;Child node can also be traversed again later according to the principle of breadth First, the first traversal brother of node.Its specific traversal side Formula, the present invention is herein with no restrictions.
Further, associated nodes can also be determined, and according to association according to the node identification information in searching request Node establishes traverse path, later, directly should be inquired in traverse path, without to nodes all in tree construction into Row traversal improves traversal efficiency.
Method provided by above-described embodiment provides a kind of thinking that associated nodes are added to traversal, without tying to tree All nodes are traversed in structure, are improved search and are obtained efficiency, and it is smaller to expend resource;In addition without considering recurrence number, So that integral way is more succinct, quick, efficient.
Referring to Fig. 3, the method flow schematic diagram of another optional node searching according to an embodiment of the present invention is shown, Include the following steps:
S301: obtaining the nodal information of node, determines rule according to scheduled node type, determines the node of nodal information Type.
S302: the request of receiving node type search is determined for compliance with the node of node type searching request, and obtain and determine The nodal information of node.
In above embodiment, for step S301, node in tree construction can store different types of node letter Breath, for example, for FlexSim, can have character, numerical value, sdt (simple data type, simple data type), Bundle, wherein character is more intuitive with numerical value.
But it, can be to section since nodal information multiplicity improves subsequent search queries efficiency for the management convenient for nodal information Point information carries out type analysis, specifically:
1) for nodal information be plain text the case where, i.e., only comprising text do not include format, text can be classified as This type node, and usually control logic and code are all recorded in text-type node;For example, weather.
2) for nodal information be numerical value the case where, numeric type node can be classified as;For example, 2018.01.17.
3) for nodal information be key-value pair the case where, key assignments type node can be classified as;For example, in FlexSim Sdt, the storing data WorkInProgress in a manner of key-value pair.
4) for nodal information be entry the case where, entry type node can be classified as;For example, for FlexSim Middle bundle is stored the data of a plurality of multi-field in a manner of similar database, i.e., saves data in terms of rows and columns, and add Addend according to when be to be added according to the form of entry.
5) other situations in addition to the above-mentioned type, when node type is not above-mentioned numerical value, text, bundle, sdt type When, determine that the node type is nothing, content is sky.
After the affiliated type of analysis node information finishes, its node type and corresponding node data can be carried out Record, recording mode is unlimited, for example it is possible to record in database, also can recorde in text document, such as word, In excel, referring specifically to shown in table 1:
Table 1 records nodal information
Wherein, column are from left to right " serial number ", " nodename ", " node type ", " node data ", " numeric type respectively Node ", " text-type node ".In node type, 0 indicates void type node;1 indicates numeric type node;2 indicate character (text) Type node.
Further, node type includes but is not limited to the above-mentioned type, when there are other node types and needing to carry out When expansion, it is only necessary to determine " what type acquired node is " and " data for obtaining the node " are recorded later ?.
It,, can if wanting to learn the quantity of each type node in tree construction for developer or user for step S302 Corresponding with node type symbol is represented only to input.
But it may coincide with the nodal information of part of nodes since node type represents symbol, for convenient for screening from the background, Special node can be arranged in search interface in the input number for reducing query information and the inquiry workload in tree construction Type search option, for example, node type, when search column of the user in search interface inputs the node type to be inquired Symbol, and after being chosen to the option, the special search of node type may be implemented.
Therefore, from the background after receiving node type searching request, extracted node identification information can be to be checked Node type.Later, tree construction is traversed, obtains all nodes comprising the node type, and result is fed back into search interface It is shown.
Furthermore it is also possible to count the number of nodes for meeting the node type, each node type in tree construction is counted with this Quantity, be convenient for follow-up management.
Further, for method shown in Fig. 1, Fig. 2, when output node information, while it can export and belong to the node class The nodal information of type improves and obtains efficiency, simplifies screening process.
Method provided by above-described embodiment provides the thinking that a kind of pair of nodal information is classified, and believes convenient for node The management of breath is also convenient for subsequent query, statistics, simplifies search step, improves screening and obtains efficiency.
In the embodiment of the present invention, nodal information special project query path can also be preset, for example, data, works as user Nodal information to be checked is inputted in search interface, and after choosing the, can search for obtain all sections comprising the search information Point, for example, determining includes " add object to group " text in which node.Therefore, nodal information search is being received After request, nodal information therein can be extracted, carries out query search as node identification information.
Tree construction interior joint quantity and nodal information are large number of, for improve search efficiency, can according to traversal mode, Node corresponding with nodal information to be checked is extracted to be shown;Furthermore it is also possible to only show that this is to be checked included in nodal information Subsequent screening is convenient in the part of nodal information.
It for FlexSim, can be used included scripting language " FlexScript ", tree construction traversed, in tree construction Data be written and read.The language but is only capable of using in FlexSim with as the language such as C++, Java.In addition, FlexSim can also be compatible with other programming languages, such as C++, C# use related resolution to traversal tree or FlexSim official Device output tree structures.
Method provided by the embodiment of the present invention provides a kind of method for quickly traversing tree construction, search node;Greatly Improve the retrieval tree construction and the efficiency for setting content that modeler needs largely to carry out in modeling process.Meanwhile by quick Tree construction is traversed, the ability that model errors were searched in large-scale model, and positioned, being solved to modeler is improved.
Referring to fig. 4, a kind of main modular signal of the device 400 of node searching provided in an embodiment of the present invention is shown Figure, comprising:
Receiving module 401 is used for receiving node searching request, obtains the node identification letter in the node searching request Breath;
Search module 402 obtains associated with the node for determining node corresponding with the node identification information Child node and the child node nodal information, using the nodal information of the child node as the node node believe Breath.
In implementing device of the present invention, described search module 402 is used for:
It determines node corresponding with the node identification information, the node is added and is traversed;
When there is the first child node associated with the node, the first child node letter of first child node is obtained Breath, and first child node is added and is traversed;
When there is the second child node associated with first child node, the second son of second child node is obtained Nodal information, and second child node is added and is traversed;
It repeats the above steps, until determining the section of N number of child node when child node associated with N child node is not present Point information is the nodal information of the node.
Implementing device of the present invention further includes node type search module 403, is used for:
The nodal information for obtaining the node determines rule according to scheduled node type, determines the nodal information Node type;
The request of receiving node type search, is determined for compliance with all nodes of the node type searching request, and obtain institute Determine the nodal information of node.
Optionally, the node type includes at least text-type node, numeric type node, entry type node and key assignments type Node.
Device provided by the embodiment of the present invention provides a kind of quickly traversal tree construction, with efficient positioning node, acquisition The device of nodal information improves the efficiency of retrieval node;Management of the related personnel for tree construction is greatly improved simultaneously, and The ability for being searched in tree construction, positioning, solving tree construction mistake.
The exemplary of the node searching method or node searching device that can apply the embodiment of the present invention is shown referring to Fig. 5 System architecture 500.
As shown in figure 5, system architecture 500 may include terminal device 501,502,503, network 504 and server 505. Network 504 between terminal device 501,502,503 and server 505 to provide the medium of communication link.Network 504 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 501,502,503 and be interacted by network 504 with server 505, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 501,502,503 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 501,502,503 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 505 can be to provide the server of various services, such as utilize terminal device 501,502,503 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that monitoring system safety method provided by the embodiment of the present invention is generally executed by server 505, Correspondingly, monitoring system safety devices are generally positioned in server 505.
It should be understood that the number of terminal device, network and server in Fig. 5 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Referring to Fig. 6, it illustrates the knots of the computer system 600 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structure schematic diagram.Terminal device shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present invention Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include receiving module, search module.Wherein, the title of these modules does not constitute the limit to the module itself under certain conditions It is fixed, for example, search module is also described as " node searching module ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes:
Receiving node searching request obtains the node identification information in the node searching request;
Determine corresponding with node identification information node, acquisition child node associated with the node and described The nodal information of child node, using the nodal information of the child node as the nodal information of the node.
Technical solution according to an embodiment of the present invention provides a kind of quickly traversal tree construction, with efficient positioning node, obtains The method for taking nodal information improves the efficiency of retrieval node;Management of the related personnel for tree construction is greatly improved simultaneously, with And the ability for being searched in tree construction, positioning, solving tree construction mistake.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (10)

1. a kind of method of node searching characterized by comprising
Receiving node searching request obtains the node identification information in the node searching request;
It determines node corresponding with the node identification information, obtains child node associated with the node and the sub- section The nodal information of point, using the nodal information of the child node as the nodal information of the node.
2. being saved the method according to claim 1, wherein the determination is corresponding with the node identification information Point obtains the nodal information of child node associated with the node and the child node, by the node of the child node Information includes: as the nodal information of the node
It determines node corresponding with the node identification information, the node is added and is traversed;
When there is the first child node associated with the node, the first child node information of first child node is obtained, And first child node is added and is traversed;
When there is the second child node associated with first child node, the second child node of second child node is obtained Information, and second child node is added and is traversed;
It repeats the above steps, until determining the node letter of N number of child node when child node associated with N child node is not present Breath is the nodal information of the node.
3. the method according to claim 1, wherein further include:
The nodal information for obtaining the node determines rule according to scheduled node type, determines the node of the nodal information Type;
The request of receiving node type search, is determined for compliance with the node of the node type searching request, and obtain determined node Nodal information.
4. according to the method described in claim 3, it is characterized in that, the node type includes at least text-type node, numerical value Type node, entry type node and key assignments type node.
5. a kind of node searching device characterized by comprising
Receiving module is used for receiving node searching request, obtains the node identification information in the node searching request;
Search module obtains sub- section associated with the node for determining node corresponding with the node identification information The nodal information of point and the child node, using the nodal information of the child node as the nodal information of the node.
6. device according to claim 5, which is characterized in that described search module is used for:
It determines node corresponding with the node identification information, the node is added and is traversed;
When there is the first child node associated with the node, the first child node information of first child node is obtained, And first child node is added and is traversed;
When there is the second child node associated with first child node, the second child node of second child node is obtained Information, and second child node is added and is traversed;
It repeats the above steps, until determining the node letter of N number of child node when child node associated with N child node is not present Breath is the nodal information of the node.
7. device according to claim 5, which is characterized in that further include node type search module, be used for:
The nodal information for obtaining the node determines rule according to scheduled node type, determines the node of the nodal information Type;
The request of receiving node type search, is determined for compliance with the node of the node type searching request, and obtain determined node Nodal information.
8. device according to claim 7, which is characterized in that the node type includes at least text-type node, numerical value Type node, entry type node and key assignments type node.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-4 is realized when row.
CN201810070065.1A 2018-01-24 2018-01-24 A kind of method and apparatus of node searching Pending CN110110153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810070065.1A CN110110153A (en) 2018-01-24 2018-01-24 A kind of method and apparatus of node searching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810070065.1A CN110110153A (en) 2018-01-24 2018-01-24 A kind of method and apparatus of node searching

Publications (1)

Publication Number Publication Date
CN110110153A true CN110110153A (en) 2019-08-09

Family

ID=67483502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810070065.1A Pending CN110110153A (en) 2018-01-24 2018-01-24 A kind of method and apparatus of node searching

Country Status (1)

Country Link
CN (1) CN110110153A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352844A (en) * 2020-03-04 2020-06-30 腾讯科技(深圳)有限公司 Test method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352844A (en) * 2020-03-04 2020-06-30 腾讯科技(深圳)有限公司 Test method and related device

Similar Documents

Publication Publication Date Title
CN105224606B (en) A kind of processing method and processing device of user identifier
CN106980669B (en) A kind of storage of data, acquisition methods and device
CN107506451B (en) Abnormal information monitoring method and device for data interaction
Zhu et al. A framework-based approach to utility big data analytics
CN109446274A (en) The method and apparatus of big data platform BI metadata management
CN109697537A (en) The method and apparatus of data audit
CN108776678A (en) Index creation method and device based on mobile terminal NoSQL databases
CN103336791A (en) Hadoop-based fast rough set attribute reduction method
CN109614402A (en) Multidimensional data query method and device
CN110110153A (en) A kind of method and apparatus of node searching
CN109344223A (en) A kind of Building Information Model management system and method based on cloud computing technology
CN107301179A (en) The method and apparatus of data base read-write separation
CN105404974A (en) Data capitalization method and apparatus and management platform
CN110347428A (en) A kind of detection method and device of code similarity
CN107644286A (en) Workflow processing method and device
CN111190888A (en) Method and device for managing graph database cluster
CN109783562A (en) A kind of method and device for business processing
CN110471848A (en) A kind of method and apparatus of dynamic returned packet
CN107291539B (en) Cluster program scheduler method based on resource significance level
CN108763665A (en) Grid simulation analyzes date storage method and device
CN110348771A (en) The method and apparatus that a kind of pair of order carries out group list
CN108959294A (en) A kind of method and apparatus accessing search engine
CN110362815A (en) Text vector generation method and device
CN109002440A (en) Method, apparatus and system for big data multidimensional analysis
CN109933459A (en) A kind of execution method and apparatus of multitask

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