CN117609558A - Method, system, terminal and medium for improving depth-first search performance - Google Patents

Method, system, terminal and medium for improving depth-first search performance Download PDF

Info

Publication number
CN117609558A
CN117609558A CN202311396109.7A CN202311396109A CN117609558A CN 117609558 A CN117609558 A CN 117609558A CN 202311396109 A CN202311396109 A CN 202311396109A CN 117609558 A CN117609558 A CN 117609558A
Authority
CN
China
Prior art keywords
point
neighbors
traversal
traversed
neighbor
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
CN202311396109.7A
Other languages
Chinese (zh)
Inventor
张晨
周研
杨万秋
吴菁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Create Link Technology Co ltd
Original Assignee
Zhejiang Create Link 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 Zhejiang Create Link Technology Co ltd filed Critical Zhejiang Create Link Technology Co ltd
Priority to CN202311396109.7A priority Critical patent/CN117609558A/en
Publication of CN117609558A publication Critical patent/CN117609558A/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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • 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/90335Query processing

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)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for improving the performance of depth-first search, which comprises the following steps: acquiring a starting point and an ending point of query input by a user and upper limit parameters of a query result; judging whether the starting point neighbor is larger than the ending point neighbor; if yes, exchanging the starting point and the ending point; if not, keeping the original state, and setting a k-hop neighbor of the storage termination point by adopting a memorization search method; traversing the 1-hop neighbor of the starting point to store traversing information in a form of a simulation stack; selecting p neighbors as points to be traversed by the next batch of priority by adopting an hair-type searching method; p neighbors are respectively distributed to corresponding threads, and parallel traversal is performed at the same time; and respectively placing the points in the traversal process into a thread stack, analyzing the traversed points, neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain an analysis result, and executing continuous traversal or terminating the query according to the analysis result. The heuristic search thought is adopted and the memorial search is combined, so that the calculation complexity is greatly reduced in a parallel calculation mode.

Description

Method, system, terminal and medium for improving depth-first search performance
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system, a terminal and a medium for improving the performance of depth-first search.
Background
The use of graph data is now becoming more and more widespread, and its field of action covers aspects such as logistics, social networking, finance, etc. Depth-first search (Depth First Search) algorithms are used everywhere in various fields of graph data. Depth-first search (Depth First Search) serves as a basic algorithm for graph traversal, and it goes without saying that depth-first traversal algorithms are needed for deep-chain queries, minimum planning, cost calculation, etc.
The first depth first search (Depth First Search) algorithm is a recursive algorithm using the retrospective concept. The traversing sequence is from bottom to top and traverses layer by layer, namely, the bottom layer node is traversed firstly, the middle layer node is traversed secondly, and the high layer node is traversed finally. Recursive implementation of depth-first traversal algorithms can be said to be textbook-level, but the performance and implementation of such implementations cannot meet the use of industrial-level production. The main problems are represented by the following points:
1. data size: the amount of data that is produced in the industry can reach the tens or even hundreds of millions.
2. Time complexity: the depth-first search has a computational complexity of O (d≡m), d is the average number of one-hop neighbors, and m is the corresponding hop count. M in a production environment can often reach 10 layers or even deeper, and as the number of layers increases, the computational complexity will increase exponentially.
3. Recursive implementation: depth-first search is usually implemented by recursion, and under the condition of large depth, the condition of recursion stack explosion occurs, so that the service is directly crashed.
4. The resources are idle: depth-first search is realized by adopting single threads, and the implementation mode is often not suitable for the current multi-path CPU architecture, so that a large amount of CPU computing resources are idle, and the computing time cost is high.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method, a system, a terminal and a medium for improving the depth-first search performance, which adopt heuristic search ideas and combine memorization search to greatly reduce the calculation complexity in a parallel calculation mode.
In a first aspect, the present invention provides a method for improving the performance of depth-first search, including the following steps:
acquiring a starting point, an ending point and an upper limit parameter of a query result input by a user, and storing neighbors of the starting point and the ending point into an array object;
judging whether the starting point neighbor is larger than the ending point neighbor;
if yes, exchanging the starting point and the ending point;
if not, keeping the original state, and setting k-hop neighbors of the storage termination point by adopting a memorization search method;
traversing the 1-hop neighbor of the starting point to store traversing information in a form of a simulation stack;
p neighbors are selected as points to be traversed by the next batch of priority by adopting a heuristic search method;
p neighbors are distributed to corresponding threads, and parallel traversal is performed at the same time;
and respectively placing the points in the traversal process into a thread stack, analyzing the traversed points, neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain an analysis result, and executing continuous traversal or terminating the query according to the analysis result.
In a second aspect, the present invention provides a system for improving depth-first search performance, including: the system comprises a data acquisition module, a judging module, a traversing module, a priority traversing point selecting module, a parallel traversing module and an analyzing module, wherein the data acquisition module is used for acquiring a starting point, an ending point and an upper limit parameter of a query result of user input query, and storing neighbors of the starting point and the ending point into an array object;
the judging module is used for judging whether the starting point neighbor is larger than the ending point neighbor, if yes, exchanging the starting point and the ending point, if not, keeping the starting point and the ending point intact, and setting a k-hop neighbor for storing the ending point by adopting a memorizing searching method;
the traversing module is used for traversing the 1-hop neighbor of the starting point and storing traversing information in a mode of simulating a stack;
the priority traversal point selection module is used for selecting p neighbors as points of the next batch of priority traversal by adopting a heuristic search method;
the parallel traversing module is used for distributing p neighbors to corresponding threads and simultaneously carrying out parallel traversing;
the analysis module is used for respectively placing the points in the traversal process into the thread stacks, analyzing the traversed points, the neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain the analysis result, and executing continuous traversal or terminating the query according to the analysis result.
In a third aspect, an embodiment of the present invention provides an intelligent terminal, including a processor, an input device, an output device, and a memory, where the processor is connected to the input device, the output device, and the memory, respectively, and the memory is configured to store a computer program, where the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method described in the foregoing embodiment.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method described in the above embodiments.
The invention has the beneficial effects that:
the embodiment of the invention provides a method for improving the performance of depth-first search, which adopts heuristic search ideas and combines a memorization search method to improve the performance of a depth-first search algorithm under the condition of big data and large depth. The calculation complexity is greatly reduced by a parallel calculation mode, useless neighbor traversal is reduced as much as possible by adopting a heuristic strategy, the probability of hitting an ending point is increased, and the calculation complexity is reduced by a power level. The method is applied to a real production environment, and the performance improvement of 100-1000 times can be obtained.
The embodiment of the invention provides a system, a terminal and a medium for improving the depth-first search performance, which have the same beneficial effects as the method for improving the depth-first search performance, because of the same inventive concept.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. Like elements or portions are generally identified by like reference numerals throughout the several figures. In the drawings, elements or portions thereof are not necessarily drawn to scale.
FIG. 1 is a flow chart of a method for improving the performance of a depth-first search according to a first embodiment of the present invention;
FIG. 2 is a flowchart showing a method for improving the performance of a depth-first search according to a first embodiment of the present invention;
FIG. 3 is a block diagram illustrating a system for enhancing depth-first search performance according to another embodiment of the present invention;
fig. 4 is a block diagram of an intelligent terminal according to another embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
It is noted that unless otherwise indicated, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
Referring to fig. 1 and 2, a flowchart of a method for improving the performance of depth-first search according to a first embodiment of the present invention is shown, where the method includes the following steps:
acquiring a starting point, an ending point and an upper limit parameter of a query result input by a user, and storing neighbors of the starting point and the ending point into an array object;
judging whether the starting point neighbor is larger than the ending point neighbor;
if yes, exchanging the starting point and the ending point;
if not, keeping the original state, and setting k-hop neighbors of the storage termination point by adopting a memorization search method;
traversing the 1-hop neighbor of the starting point to store traversing information in a form of a simulation stack;
p neighbors are selected as points to be traversed by the next batch of priority by adopting a heuristic search method;
p neighbors are distributed to corresponding threads, and parallel traversal is performed at the same time;
and respectively placing the points in the traversal process into a thread stack, analyzing the traversed points, neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain an analysis result, and executing continuous traversal or terminating the query according to the analysis result.
In this embodiment, a starting point, an ending point and an upper limit parameter of a query result are obtained, where the starting point is set by a user, the ending point is set by a large number of neighbor data, the starting point is set by a small number of neighbors, and the upper limit parameter of the query result is used to limit the number of returned results, for example, limit the return of 1000 paths. Judging whether the starting point neighbor input by the user is larger than the ending point neighbor or not, and if the starting point neighbor input by the user is larger than the ending point neighbor, traversing after exchanging the starting point and the ending point. When the starting point neighbor is smaller than the ending point neighbor, setting a k-hop neighbor storing the ending point by adopting a memorization search method, marking as X1, and storing k-hop neighbor information in a form of a link table. The traversal start point neighbors store the traversal information in the form of a simulated stack. And selecting p points to be traversed in the next round by adopting a heuristic search method, wherein the neighbors of the points to be traversed in the first round occupy a large number of k-hop neighbors of the termination point and have small neighbor degree, respectively distributing the p points to corresponding threads, and simultaneously carrying out parallel traversal. The points in the traversal process are pushed into the thread stacks where they are located, respectively.
The specific method for judging the traversed point, the neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain the judgment result comprises the following steps:
judging whether the traversed point is in the stored k-hop neighbor range of the termination point;
if not, traversing the current point 1-hop neighbors, and reselecting the next batch of neighbors for parallel traversal;
if yes, adding 1 on the basis of the query result, and judging whether the added query result is greater than the upper limit parameter of the query result;
if yes, terminating the inquiry;
if not, the next batch of neighbors are selected again for parallel traversal.
And judging whether the traversed point is in the stored k-hop neighbor range of the termination point, if so, indicating that the path is formed, increasing the number of the query results by 1, and then comparing the query results with the upper limit of the query results. Through the steps, when the termination point is judged, the termination point is not adopted for judgment, and the stored k-hop neighbors are judged, so that the cost of repeatedly searching the neighbors by depth-first search is reduced, and the purpose of using extremely small memory cost and reducing a large amount of calculation cost can be realized. Wherein k and p are positive integers.
The embodiment of the invention provides a method for improving the performance of depth-first search, which adopts heuristic search ideas and combines a memorization search method to improve the performance of a depth-first search algorithm under the condition of big data and large depth. The calculation complexity is greatly reduced by a parallel calculation mode, useless neighbor traversal is reduced as much as possible by adopting a heuristic strategy, the probability of hitting an ending point is increased, and the calculation complexity is reduced by a power level. The method is applied to a real production environment, and the performance improvement of 100-1000 times can be obtained.
In the first embodiment, a method for improving the depth-first search performance is provided, and correspondingly, the application also provides a system for improving the depth-first search performance. Fig. 2 is a block diagram of a system for improving depth-first search performance according to another embodiment of the present invention. Since the apparatus embodiments are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
Referring to fig. 3, a system for improving depth-first search performance according to another embodiment of the present invention includes: the system comprises a data acquisition module, a judging module, a traversing module, a priority traversing point selecting module, a parallel traversing module and an analyzing module, wherein the data acquisition module is used for acquiring a starting point, an ending point and an upper limit parameter of a query result of a user input query, and storing neighbors of the starting point and the ending point into an array object; the judging module is used for judging whether the starting point neighbor is larger than the ending point neighbor, if yes, the starting point and the ending point are exchanged, if not, the starting point neighbor and the ending point neighbor are kept unchanged, the k-hop neighbor for storing the ending point is set by adopting a memorizing searching method, and the k-hop neighbor form for storing the ending point is in a link table form. The traversing module is used for traversing the starting point 1-hop neighbors and storing traversing information in a form of a simulation stack; the priority traversal point selection module is used for selecting p neighbors as the next batch of points to be traversed preferentially by adopting a heuristic search method, wherein the neighbors of the points to be traversed preferentially occupy more k-hop neighbors of the termination point and have small neighbor degree; the parallel traversing module is used for respectively distributing p neighbors to corresponding threads and simultaneously carrying out parallel traversing; the analysis module is used for respectively placing the points in the traversal process into the thread stacks, analyzing the traversed points, the neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain an analysis result, and executing continuous traversal or terminating the query according to the analysis result.
The analysis module comprises a first analysis unit and a second analysis unit, wherein the first analysis unit is used for analyzing whether the traversed point is in the range of the stored k-hop neighbors of the termination point, if not, traversing the 1-hop neighbors of the current point, and reselecting the next batch of neighbors for parallel traversal; the second analysis unit is used for analyzing whether the traversed point is in the stored k-hop neighbor range of the termination point, 1 is added on the basis of the query result, whether the added query result is larger than the upper limit parameter of the query result or not is continuously analyzed, and if so, the query is terminated; if not, the next batch of neighbors are selected again for parallel traversal. The analysis module judges whether the traversed point is in the range of the stored k-hop neighbor of the termination point, if yes, the number of query results is increased by 1, and then the query results are compared with the upper limit of the query results. When judging the termination point, the termination point is not adopted for judgment, but the stored k-hop neighbors are judged, so that the cost of repeatedly searching the neighbors by depth-first search is reduced, and the cost of using a very small memory can be realized, and a large amount of calculation cost is reduced.
The embodiment of the invention provides a system for improving the performance of a depth-first search, which adopts heuristic search ideas and combines a memorization search method to improve the performance of a depth-first search algorithm under the condition of big data and large depth. The calculation complexity is greatly reduced by a parallel calculation mode, useless neighbor traversal is reduced as much as possible by adopting a heuristic strategy, the probability of hitting an ending point is increased, and the calculation complexity is reduced by a power level. The method is applied to a real production environment, and the performance improvement of 100-1000 times can be obtained.
As shown in fig. 4, a schematic structural diagram of an intelligent terminal according to another embodiment of the present invention is provided, where the terminal includes a processor, an input device, an output device, and a memory, where the processor is connected to the input device, the output device, and the memory, respectively, and the memory is used to store a computer program, where the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method described in the foregoing embodiments.
It should be appreciated that in embodiments of the present invention, the processor may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input devices may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of a fingerprint), a microphone, etc., and the output devices may include a display (LCD, etc.), a speaker, etc.
The memory may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
In a specific implementation, the processor, the input device, and the output device described in the embodiments of the present invention may execute the implementation described in the method embodiment provided in the embodiments of the present invention, or may execute the implementation of the system embodiment described in the embodiments of the present invention, which is not described herein again.
In a further embodiment of the invention, a computer-readable storage medium is provided, in which a computer program is stored, the computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method described in the above embodiment.
The computer readable storage medium may be an internal storage unit of the terminal according to the foregoing embodiment, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used to store the computer program and other programs and data required by the terminal. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working procedures of the terminal and the unit described above may refer to the corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In several embodiments provided in the present application, it should be understood that the disclosed terminal and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention, and are intended to be included within the scope of the appended claims and description.

Claims (10)

1. A method for improving depth-first search performance, comprising the steps of:
acquiring a starting point, an ending point and an upper limit parameter of a query result input by a user, and storing neighbors of the starting point and the ending point into an array object;
judging whether the starting point neighbor is larger than the ending point neighbor;
if yes, exchanging the starting point and the ending point;
if not, keeping the original state, and setting k-hop neighbors of the storage termination point by adopting a memorization search method;
traversing the 1-hop neighbor of the starting point to store traversing information in a form of a simulation stack;
p neighbors are selected as points to be traversed by the next batch of priority by adopting a heuristic search method;
p neighbors are respectively distributed to corresponding threads, and parallel traversal is performed at the same time;
and respectively placing the points in the traversal process into a thread stack, analyzing the traversed points, neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain an analysis result, and executing continuous traversal or terminating the query according to the analysis result.
2. The method of claim 1, wherein the neighbors of the point of preferential traversal account for a greater number of k-hop neighbors of the termination point and have a lesser degree of self-neighbors.
3. The method of claim 2, wherein the specific method for determining the neighbor between the traversed point and the point traversed by priority and the upper limit of the query result to obtain the determination result comprises:
judging whether the traversed point is in the stored k-hop neighbor range of the termination point;
if not, traversing the current point 1-hop neighbors, and reselecting the next batch of neighbors for parallel traversal;
if yes, adding 1 on the basis of the query result, and judging whether the added query result is greater than the upper limit parameter of the query result;
if yes, terminating the inquiry;
if not, the next batch of neighbors are selected again for parallel traversal.
4. The method of claim 1, wherein the form of k-hop neighbors of the storage termination point is in the form of a linked list.
5. A system for enhancing depth-first search performance, comprising: the system comprises a data acquisition module, a judging module, a traversing module, a priority traversing point selecting module, a parallel traversing module and an analyzing module, wherein the data acquisition module is used for acquiring a starting point, an ending point and an upper limit parameter of a query result of user input query, and storing neighbors of the starting point and the ending point into an array object;
the judging module is used for judging whether the starting point neighbor is larger than the ending point neighbor, if yes, exchanging the starting point and the ending point, if not, keeping the starting point and the ending point intact, and setting a k-hop neighbor for storing the ending point by adopting a memorizing searching method;
the traversing module is used for traversing the 1-hop neighbor of the starting point and storing traversing information in a mode of simulating a stack;
the priority traversal point selection module is used for selecting p neighbors as points of the next batch of priority traversal by adopting a heuristic search method;
the parallel traversing module is used for respectively distributing p neighbors to corresponding threads and simultaneously carrying out parallel traversing;
the analysis module is used for respectively placing the points in the traversal process into the thread stacks, analyzing the traversed points, the neighbors of the points which are preferentially traversed and the upper limit of the query result to obtain the analysis result, and executing continuous traversal or terminating the query according to the analysis result.
6. The system of claim 5, wherein the neighbors of the point of preferential traversal account for a large number of k-hop neighbors of the termination point and have a small degree of self-neighbors.
7. The system of claim 6, wherein the analysis module comprises a first analysis unit and a second analysis unit, the first analysis unit is configured to analyze whether the traversed point is within a stored range of k-hop neighbors of the termination point, if not, traverse the current point 1-hop neighbors, and reselect the next batch of neighbors for parallel traversal;
the second analysis unit is used for analyzing whether the traversed point is in the range of the k-hop neighbor of the stored termination point, 1 is added on the basis of the query result, whether the added query result is larger than the upper limit parameter of the query result or not is continuously analyzed, and if so, the query is terminated; if not, the next batch of neighbors are selected again for parallel traversal.
8. The system of claim 5, wherein the form of k-hop neighbors of the storage termination point is in the form of a linked list.
9. A smart terminal comprising a processor, an input device, an output device and a memory, the processor being connected to the input device, the output device and the memory, respectively, the memory being for storing a computer program comprising program instructions, characterized in that the processor is configured to invoke the program instructions to perform the method of any of claims 1-4.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-4.
CN202311396109.7A 2023-10-25 2023-10-25 Method, system, terminal and medium for improving depth-first search performance Pending CN117609558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311396109.7A CN117609558A (en) 2023-10-25 2023-10-25 Method, system, terminal and medium for improving depth-first search performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311396109.7A CN117609558A (en) 2023-10-25 2023-10-25 Method, system, terminal and medium for improving depth-first search performance

Publications (1)

Publication Number Publication Date
CN117609558A true CN117609558A (en) 2024-02-27

Family

ID=89943290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311396109.7A Pending CN117609558A (en) 2023-10-25 2023-10-25 Method, system, terminal and medium for improving depth-first search performance

Country Status (1)

Country Link
CN (1) CN117609558A (en)

Similar Documents

Publication Publication Date Title
US20120158623A1 (en) Visualizing machine learning accuracy
CN109685092B (en) Clustering method, equipment, storage medium and device based on big data
CN110147327B (en) Multi-granularity-based web automatic test management method
CN109978261A (en) Determine method, apparatus, readable medium and the electronic equipment of load forecasting model
CN108304585B (en) Result data selection method based on space keyword search and related device
CN108664471A (en) Text region error correction method, device, equipment and computer readable storage medium
CN114520743A (en) Method and system for detecting network abnormal flow and storable medium
CN106407233A (en) A data processing method and apparatus
Bai et al. Efficient temporal core maintenance of massive graphs
CN109766282A (en) A kind of Caton detection method, Caton detection device and terminal device
WO2024093005A1 (en) Battery capacity prediction method and apparatus, and electronic device
CN117609558A (en) Method, system, terminal and medium for improving depth-first search performance
CN112181479A (en) Method and device for determining difference between code file versions and electronic equipment
CN109828984B (en) Analysis processing method and device, computer storage medium and terminal
CN112215271A (en) Anti-occlusion target detection method and device based on multi-head attention mechanism
CN110706035A (en) Updating effect evaluation method and device, storage medium and electronic equipment
CN114679335B (en) Power monitoring system network security risk assessment training method, assessment method and equipment
CN110866127A (en) Method for establishing index and related device
CN109379640B (en) Bullet screen checking method and device based on linked list mode, terminal and storage medium
CN115080552A (en) Data quality evaluation method, device, equipment and computer readable storage medium
CN114138330A (en) Code clone detection optimization method and device based on knowledge graph and electronic equipment
Shahrivari et al. A Parallel and Distributed Approach for Diversified Top-k Best Region Search.
CN110096555B (en) Table matching processing method and device for distributed system
CN111488496A (en) Sliding window based Tango tree construction method and system
CN113641911B (en) Advertisement interception rule base establishing 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