WO2023124253A1 - Graph search method and apparatus, device and storage medium - Google Patents

Graph search method and apparatus, device and storage medium Download PDF

Info

Publication number
WO2023124253A1
WO2023124253A1 PCT/CN2022/119014 CN2022119014W WO2023124253A1 WO 2023124253 A1 WO2023124253 A1 WO 2023124253A1 CN 2022119014 W CN2022119014 W CN 2022119014W WO 2023124253 A1 WO2023124253 A1 WO 2023124253A1
Authority
WO
WIPO (PCT)
Prior art keywords
vertex
search
graph
relationship
reverse
Prior art date
Application number
PCT/CN2022/119014
Other languages
French (fr)
Chinese (zh)
Inventor
崖飞虎
周可
邸帅
卢道和
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2023124253A1 publication Critical patent/WO2023124253A1/en

Links

Images

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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • 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
    • 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

Definitions

  • the embodiment of the present application relates to the technical field of financial technology (Fintech) data processing, and relates to but not limited to a graph search method, device, device and storage medium.
  • Financial technology Fetech
  • the embodiment of the present application provides a graph search method, device, equipment and storage medium to solve the problem in the related art that the complex search of graphs can only be realized through the back-end offline algorithm, and there is no real-time return and visual graph display solution.
  • An embodiment of the present application provides a graph search method, including:
  • search vertex Receives a search vertex and a selected search mode input at the search entry of the front-end page; wherein, the search vertex is a point in a directed acyclic graph;
  • the search results are displayed through a visual plug-in.
  • An embodiment of the present application provides a graph search device, including:
  • the display module is used to display the search entry of the front-end page
  • a receiving module configured to receive a search vertex input at the search entry and a selected search mode; wherein the search vertex is a point in a directed acyclic graph;
  • a processing module configured to determine an adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to perform a search based on the search vertex to obtain a search result;
  • the display module is configured to display the search results through a visual plug-in.
  • An embodiment of the present application provides a graph search device, including:
  • the memory is used to store executable instructions; the processor is used to implement the above method when executing the executable instructions stored in the memory.
  • An embodiment of the present application provides a storage medium, which stores executable instructions, and is used to cause a processor to implement the above method when executed.
  • the search vertex By receiving the search vertex and the selected search mode input in the search entry of the front-end page; wherein, the search vertex is a point in a directed acyclic graph; determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm based on the search
  • the vertices are searched to get the search results; the search results are displayed through the visualization plug-in.
  • FIG. 1 is a schematic diagram of an optional architecture of a server provided in an embodiment of the present application
  • Fig. 2 is a schematic flow diagram of a graph search method provided in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the architecture of the graph visualization analysis system provided by the embodiment of the present application.
  • Fig. 4 is the second schematic flow diagram of the graph search method provided by the embodiment of the present application.
  • Fig. 5 is a schematic diagram of the directed acyclic graph G and the interval label graph of vertices provided by the embodiment of the present application;
  • Fig. 6 is a schematic diagram of the directed acyclic graph G and the forward and reverse breadth layers and the forward and reverse topology layers of the vertices provided by the embodiment of the present application.
  • the graph search device provided by the embodiment of the present application can be implemented as a notebook computer, a tablet computer, a desktop computer, a mobile device (for example, a mobile phone, a portable music player, Personal digital assistants, special messaging devices, portable game devices), intelligent robots and other terminals with screen display functions can also be implemented as servers.
  • a mobile device for example, a mobile phone, a portable music player, Personal digital assistants, special messaging devices, portable game devices
  • intelligent robots and other terminals with screen display functions can also be implemented as servers.
  • FIG. 1 is a schematic structural diagram of a server 100 provided by an embodiment of the present application.
  • the server 100 shown in FIG. Various components in the server 100 are coupled together through the bus system 140 .
  • the bus system 140 is used to realize connection and communication between these components.
  • the bus system 140 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as bus system 140 in FIG. 1 for clarity of illustration.
  • Processor 110 can be a kind of integrated circuit chip, has signal processing capability, such as general-purpose processor, digital signal processor (DSP, Digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware Components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
  • DSP digital signal processor
  • DSP Digital Signal Processor
  • User interface 130 includes one or more output devices 131 that enable presentation of media content, including one or more speakers and/or one or more visual displays.
  • the user interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
  • Memory 150 may be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and the like. Memory 150 optionally includes one or more storage devices located physically remote from processor 110 . Memory 150 includes volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile memory can be read-only memory (Read Only Memory, ROM), and the volatile memory can be random access memory (Random Access Memory, RAM). The memory 150 described in the embodiment of the present application is intended to include any suitable type of memory. In some embodiments, the memory 150 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
  • Operating system 151 including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
  • Network communication module 152 for reaching other computing devices via one or more (wired or wireless) network interfaces 120
  • exemplary network interfaces 120 include: Bluetooth, Wireless Compatibility Authentication (Wi-Fi), and Universal Serial Bus (Universal Serial Bus, USB), etc.;
  • the input processing module 153 is configured to detect one or more user inputs or interactions from one or more of the input devices 132 and translate the detected inputs or interactions.
  • the device provided by the embodiment of the present application can be realized by software.
  • FIG. 1 shows a graph search device 154 stored in the memory 150.
  • the graph search device 154 can be a graph search
  • the device which can be software in the form of programs and plug-ins, includes the following software modules: a display module 1541, a receiving module 1542, and a processing module 1543. These modules are logical, so any combination or further split. The function of each module will be explained below.
  • the device provided in the embodiment of the present application may be implemented in hardware.
  • the device provided in the embodiment of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the In the graph search method provided by the embodiment, for example, the processor in the form of a hardware decoding processor may adopt one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), DSP, Programmable Logic Device (Programmable Logic Device, PLD), Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other electronic components.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing
  • Programmable Logic Device Programmable Logic Device
  • PLD Complex Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • Field Programmable Gate Array Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • FIG. 2 is an optional flowchart of the graph search method provided by the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 2.
  • Step S201 receiving the search vertex and the selected search mode entered in the search entry of the front page.
  • the search vertex is a point in the directed acyclic graph.
  • a directed acyclic graph (Directed acyclic graph, DAG) is a data set composed of vertices and edges, the vertices represent an entity, and the edges represent the relationship between entities.
  • DAG directed acyclic graph
  • V represents the set of vertices in graph G
  • E represents the set of edges in graph G.
  • the number of input search vertices is greater than or equal to 1.
  • the search mode includes the mode corresponding to the reachability analysis and the mode corresponding to the path search between two points; when the number of search vertices is single, the search mode includes a single
  • the search fixed-point is the pattern corresponding to the K-step search of a specific vertex.
  • accessibility refers to: any two vertices u and v in the graph, if there is a path starting from u that can reach v, it means that vertex u can reach vertex v.
  • the path refers to: a path from vertex u to vertex v is a vertex sequence (u, u1,...,v) starting from vertex u, and the vertex sequence ends at vertex v.
  • the graph database used for querying and storing the graph model can be an open source distributed graph database, such as nebulagraph, which supports millisecond-level query of very large-scale data sets.
  • the search engine can be a distributed full-text search engine, such as elasticsearch, which supports word segmentation, indexing and fast retrieval of massive data.
  • this embodiment of the application provides a search and visualization platform, which presents front-end pages to users, and users can perform various searches on graphs on the platform.
  • Step S202 determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result.
  • the corresponding adaptation algorithm is different if the selected search mode is different; the adaptation algorithm in the present application is a search method adopted in the process of searching for the input search fixed point.
  • the adaptation algorithm is an algorithm design for the graph model in the graph database, which involves the operation of the graph model; Disassembly-based graph semantic operations, such as viewing vertex attributes, obtaining adjacent vertices, obtaining edges between two points, these most basic graph semantic operations, that is to say, in the search process, the adaptation algorithm will The operation is decomposed into basic graph semantic atomic operations, thereby reducing the complexity of graph operations; using elasticsearch to search, indexing all algorithm features, and using the index only requires one-time retrieval to obtain search results, which improves the overall stability of the service sex.
  • the breadth-first traversal method (Breath First Search, BFS) can be used to process the vertices according to the hierarchy, and the vertices closest to the starting point are visited first, in order of distance Traverse the vertices in the graph in turn.
  • Step S203 displaying search results through a visualization plug-in.
  • the visualization plug-in includes but is not limited to the CYSOSCAPE.JS visualization plug-in.
  • the visualization plug-in can flexibly assemble the visualization structure packaged in the backend into various graph visualizations, and perform rendering and color matching.
  • the visualization plug-in can flexibly assemble the visualization structure into various graphs in the following way: take the input search vertex as the root node, and then expand outward layer by layer to build the entire complete graph relationship link; specifically The set of all vertices of the structure and the edges between any two vertices. Then, the visualization plug-in takes the input search vertex as the root node, and constructs a complete graph layer by layer outward.
  • the platform can return the search results in real time through the visualization plug-in, and display the search results visually.
  • the graph search method provided by this application is applicable to various OLAP search scenarios of graphs, such as reachability analysis, two-point link search, and k-step search. Various search conditions, and then obtain the results of visual display of various graph models.
  • this application can support users to complete various types of graph relationship data (blood relationship data, risk control data, etc.) Configure different conditional queries in different search scenarios to realize visual search.
  • graph relationship data blood relationship data, risk control data, etc.
  • the graph search method receives the search vertex and the selected search mode input in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the appropriate search mode corresponding to the search mode is determined.
  • For the problem of graphic display solutions it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
  • this application proposes a schematic diagram of a graph search architecture, as shown in Figure 3, the graph search architecture can also be a graph visualization analysis system, and the graph visualization analysis system includes front-end WEB services There are two parts, and the graph analysis engine. Among them, the front-end WEB service includes the following components: the front-end search entry and the CYSOSCAPE.JS visualization plug-in.
  • the front-end search entry is used as the search entry of the front-end page, which supports search modes such as graph accessibility, path between two points, and specific vertex K-step search, and various search conditions can be configured.
  • the CYSOSCAPE.JS visualization plug-in as a visualization plug-in for the front-end diagram, can flexibly assemble the visualization structure packaged in the back-end into various visualization graphics for rendering and color matching.
  • the graph analysis engine includes the following components: application programming interface (Application Programming Interface, API), standardized template, adapter and policy factory, algorithm library and graph atomic semantic operation layer.
  • API Application Programming Interface
  • the graph analysis engine corresponding to the API provides graph analysis functions for various scenarios through spring boot microservices.
  • the standardized template is a standardized template for graph analysis, which defines the standardized steps from the API to the final packaging process. The standardization steps are: add root node -> adapt algorithm strategy -> execute search algorithm -> adapt packaging strategy -> execute packaging method -> return packaging structure.
  • Adapters and policy factories can adapt different algorithm strategies and packaging strategies according to various search modes and conditions input by the front end.
  • the algorithm library supports reachability analysis, path search between two points, and K-step search of specific vertices and other search modes.
  • Elasticsearch is used to index various features of vertices, such as degree, label interval, breadth layer, and topology layer.
  • the graph atomic semantic operation layer refers to decomposing various algorithms in the algorithm library into the smallest atomic operations on semantics, such as viewing vertex attributes, obtaining adjacent vertices, and obtaining edges between two points.
  • the storage and query of graph models use nebulagraph graph database.
  • the first stage, search mode and algorithm relationship various search modes input by the front-end determine the specific algorithm for back-end adaptation, that is, the above-mentioned adaptation algorithm. For example, the front-end searches for whether two application vertices are related by blood, and the algorithm adapter will automatically match them. Reachability analysis strategy, calling the reachability analysis algorithm.
  • the second stage the relationship between search conditions and pruning strategies: the search conditions configured on the front end will be configured into different condition categories according to the search mode, and the search results will be pruned; for example, during the K-step search process, search for a table 10 degrees upstream Dependency table, and configure a time interval condition, when using BFS search, pruning will be performed according to the time condition.
  • pruning refers to removing unqualified vertices and edges during graph traversal to improve the time and space efficiency of the traversal algorithm.
  • the third stage, returning the structure the search results need to be packaged into a json structure of vertices and edges, the vertex set is the unnecessary set of vertices on all paths, and the edge is the directed edge set between two adjacent vertices, CYSOSCAPE.
  • the JS plug-in will automatically assemble and render the returned structure; the specific assembly process is to add the input node to the root node, and then expand outward from the edge layer upstream and downstream of the root node to build a complete graph relationship link.
  • the search vertex includes vertex u and vertex v.
  • the adaptation algorithm is executed to search based on the search vertex, and the search result is obtained, which can be realized through the following steps:
  • G represents a directed acyclic graph.
  • the degree of a vertex refers to the number of adjacent vertices of the vertex.
  • the degree of a vertex is the sum of the out-degree and in-degree of the vertex.
  • the determination in A11 whether the reachability condition is satisfied between the vertex u and the vertex v can be realized through the following steps:
  • A114 Based on at least one of the interval label relationship, the forward breadth layer number and reverse breadth layer number relationship, and the forward topology layer number and reverse topology layer number relationship, determine whether the reachability condition between the vertex u and the vertex v is satisfied.
  • the first interval label of vertex v It is the label obtained when the child vertex of vertex v is traversed forward in the pre-order traversal of vertex v, and the starting value of the interval For the current vertex, include the minimum value of the start value and the end value of the child vertex Access the sequential value of v for subsequent traversals;
  • the second interval label It is the label obtained by traversing the child vertices in reverse order when traversing the vertex v for the second time, similarly It is the minimum value of the starting value among the child vertices contained in the current vertex, Ordered value for accessing vertex v for subsequent traversals.
  • Figure 5 is the first value in the first bracket, is the second value in the first square bracket; for example, for vertex 1 it's 1, is 10.
  • the number of forward breadth layers and reverse breadth layers of vertex v the number of forward breadth layers of each vertex in Figure 5 is Figure 6
  • the value before the comma before the middle separator, and the number of reverse breadth layers is the value after the comma, for example, the number of forward breadth layers for vertex 1 is 1, and the number of reverse breadth layers is 6.
  • the specific definition of the number of positive breadth layers is as follows:
  • inN(v, G) identifies the in-degree of vertex v, and the number of forward breadth layers of a vertex with an in-degree of 0 is 1, otherwise the number of forward breadth layers is equal to the number of forward breadth layers of all in-degree vertices of the vertex + 1
  • the minimum value of that is, the number of forward breadth layers of vertex v is equal to the layer value of the parent node of v+1 when performing breadth-first traversal on the graph G.
  • the reverse breadth layer rebre(v) of vertex v is to reverse all the directed edges of graph G, and then perform the same calculation to obtain the reverse breadth layer of all vertices.
  • the number of forward topological layers and reverse topological layers of vertex v define the number of forward topological layers and reverse topological layers of vertex v, and the number of forward topological layers of each vertex in Figure 5 is the segmentation graph in Figure 6
  • the number of reverse topology layers is the value after the comma, for example, the number of forward topology layers for vertex 1 is 1, and the number of reverse topology layers is 1.
  • the specific definition of forward topology layers is as follows:
  • the number of forward topological layers of a vertex with an in-degree of 0 is 1, otherwise the number of forward topological layers is equal to the maximum value after the number of forward topological layers of all in-degree vertices of the vertex + 1, that is, the number of forward topological layers of vertex v is equal to The traversal order value when performing pre-order traversal on vertices with in-degree 0;
  • the reverse topology layer number of the vertex whose out-degree is 0 is the length of the longest path in the current graph
  • the reverse topology layer number of other vertices v is the minimum value after the reverse topology layer number of all out-degree vertices of v -1.
  • A111 judges the interval label relationship between vertex u and vertex v, which can be realized through the following steps: judge the first interval label of vertex v Is it the first interval label of vertex u within , and the second interval label of vertex v Whether in the second interval label of vertex u within;
  • the first interval label of each vertex is the label obtained when the child vertex of each vertex is traversed forward in the preorder traversal of each vertex
  • the second interval label of each vertex is the second interval label for each vertex.
  • whether the reachability condition is satisfied between the vertex u and the vertex v including: if exist within and exist Within, it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
  • A112 judges the relationship between the number of forward breadth layers and the number of reverse breadth layers of vertex u and vertex v, which can be realized through the following steps:
  • whether the reachability condition is satisfied between the vertex u and the vertex v including: if bre(v) ⁇ bre(u) and rebre(u) ⁇ rebre(v), determine whether the reachability condition is satisfied between the vertex u and the vertex v .
  • A113 judges the relationship between the forward and reverse topological layers of vertex u and vertex v, which can be realized through the following steps:
  • whether the reachability condition is satisfied between the vertex u and the vertex v includes: topo(u) ⁇ topo(v) or retopo(u) ⁇ retopo(v), and it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
  • A11 executes the adaptation algorithm based on the recursive call method to judge whether the reachability condition is satisfied between the vertex u and the vertex v, including the following steps:
  • vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
  • a two-way search method is used to perform the search between the out-degree outDeg(u,G) of vertex u and the in-degree inDeg(v,G) of vertex v in A12
  • the relationship executes the search and obtains the search results, including the following steps:
  • the reachability algorithm uses the spark engine to calculate the interval labels of all vertices of the graph model and And the number of forward breadth layers bre(v), reverse breadth layers rebre(v), forward topology layers topo(v), and reverse topology layers retopo(v) of all labels; then upsert all vertex features to elasticsarch indexing.
  • the Elasticsearch vertex feature index structure is:
  • the search mode includes a mode corresponding to path search between two points, and A11 performs an adaptation algorithm based on a recursive calling method to judge whether the reachability condition between the vertex u and the vertex v is met, including the following steps:
  • linked list v1 adds vertex u as the head node
  • linked list v2 adds vertex v as the head node
  • vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
  • a two-way search method is used to execute the relationship between the out-degree outDeg(u,G) of vertex u based on vertex u and the in-degree inDeg(v,G) of vertex v in A12. Execute the search for the relationship and get the search results, including the following steps:
  • the search mode includes the corresponding mode of K-step search, and breadth-first search is adopted.
  • breadth-first search is used to search the adjacent hierarchical nodes of a vertex, it can be searched out at one time using the batch search mode; combined with the search conditions, each search When an adjacent fixed point comes out, use the search condition to prune, which can greatly speed up the search and get the search results quickly.
  • the software module stored in the graph search device 154 of the memory 150 may be a server
  • the graph search apparatus in 100 comprising:
  • Display module 1541 used to display the search entry of the front-end page
  • the receiving module 1542 is used to receive the search vertex input at the search entry and the selected search mode; wherein, the search vertex is a point in a directed acyclic graph;
  • the processing module 1543 is used to determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result;
  • the display module 1541 is configured to display search results through a visual plug-in.
  • the search vertex includes vertex u and vertex v
  • the processing module 1543 is used to execute the adaptation algorithm to judge whether the reachability condition between vertex u and vertex v is satisfied based on the recursive calling method; Satisfy the reachability condition, perform a search based on the relationship between the out-degree outDeg(u,G) of vertex u and the in-degree inDeg(v,G) of vertex v, and obtain the search results, where G represents a directed acyclic graph .
  • the processing module 1543 is used to judge the interval label relationship between vertex u and vertex v; Topological layer number and reverse topological layer number relationship; based on interval label relationship, forward breadth layer number and reverse breadth layer number relationship, and at least one of forward topological layer number and reverse topological layer number relationship, determine vertex u and vertex Whether the reachability condition is satisfied between v.
  • the processing module 1543 is used to determine the first interval label of the vertex v Is it the first interval label of vertex u within , and the second interval label of vertex v Whether in the second interval label of vertex u Within; where, the first interval label of each vertex is the forward direction of the child vertex of each vertex when the pre-order traversal is performed on each vertex;
  • the label obtained during the traversal, the second interval label of each vertex is the label obtained by traversing the reverse order of the child vertex during the second preorder traversal of each vertex; among them, whether the relationship between vertex u and vertex v satisfies Accessible conditions, including: if exist within and exist Within, it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
  • the processing module 1543 is used to determine whether the difference between the forward breadth level bre(v) of the vertex v minus the forward breadth level bre(u) of the vertex u is greater than 0;
  • the reachability condition is satisfied between vertex u and vertex v, including: if bre(v)-bre(u) ⁇ 0 and rebre(u)-rebre(v) ⁇ 0, determine the distance between vertex u and vertex v The reachability condition is met.
  • the processing module 1543 is configured to determine whether the forward topology layer topo(u) of the vertex u is smaller than the forward topology layer topo(v) of the vertex v;
  • whether the reachability condition is satisfied between the vertex u and the vertex v includes: topo(u) ⁇ topo(v) or retopo(u) ⁇ retopo(v), and it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
  • the search mode includes a mode corresponding to the reachability analysis
  • the processing module 1543 is used to determine whether the vertex u i and the vertex v i input by the recursive call are equal; wherein, the vertex u i belongs to the vertex u and the vertex u A set of child nodes, vertex v i belongs to the set of parent nodes of v and v; if vertex u i is not equal to vertex v i , judge whether the reachability condition between vertex u and vertex v is satisfied based on the recursive calling method.
  • the processing module 1543 is configured to perform a recursive call on each vertex u i and vertex v in the set of adjacent child nodes of vertex u if outDeg(u, G) ⁇ inDeg(v, G), to obtain search results;
  • the search mode includes a mode corresponding to path search between two points, and the processing module 15 to 43 is used to create a linked list v1 and a linked list v2; wherein, the linked list v1 adds a vertex u as a head node, and the linked list v2 adds a vertex v as a head node Node;
  • vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
  • vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on the recursive calling method.
  • the processing module 1543 is configured to perform recursive calls on each vertex u i and vertex v in the set of adjacent child nodes of vertex u if outDeg(u, G) ⁇ inDeg(v, G), and clone The current out-degree vertex list and add u i as the tail node to get the search results of all links between vertex u and vertex v;
  • the graph search device receives the search vertex and the selected search mode inputted in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the appropriate search mode corresponding to the search mode is determined.
  • Algorithm matching, and execution of the matching algorithm to search based on the search vertex to obtain the search results display the search results through the visualization plug-in; solve the problem that the complex search of the graph in the related technology can only be realized through the back-end offline algorithm, without a real-time return and visualization
  • For the problem of graphic display solutions it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
  • the embodiment of the present application provides a storage medium storing executable instructions, and the executable instruction is stored therein.
  • the executable instruction When executed by the processor, it will cause the processor to execute the method provided in the embodiment of the present application, for example, as shown in FIG. 2 shows the method.
  • the storage medium receives the search vertex and the selected search mode input in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the matching corresponding to the search mode is determined Algorithm, and execute the adaptation algorithm to search based on the search vertex to obtain the search results; display the search results through the visualization plug-in; solve the problem that the complex search of the graph in the related technology can only be realized through the back-end offline algorithm, there is no real-time return and visual graph For the problem of displaying solutions, it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
  • the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various devices including one or any combination of the above-mentioned memories.
  • FRAM Ferroelectric memory
  • ROM Read Only Memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • flash memory magnetic surface memory
  • optical disc Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various
  • executable instructions may take the form of programs, software, software modules, scripts, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and its Can be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
  • executable instructions may, but do not necessarily correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in Hyper Text Markup Language (HTML, Hyper Text Markup Language) in one or more scripts in a document, in a single file dedicated to the program in question, or in multiple cooperating files (for example, a file that stores one or more modules, subroutines, or code sections )middle.
  • executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communication network. to execute.
  • the embodiment of the present application provides a graph search method, device, device and storage medium, by receiving the search vertex and the selected search mode input in the search entry of the front-end page; wherein, the search vertex is a directed acyclic graph point; determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result; display the search result through a visualization plug-in.
  • OLAP online analytical processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (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)
  • Debugging And Monitoring (AREA)

Abstract

Provided are a graph search method and apparatus, a device, and a storage medium. The method comprises: receiving a selected search mode and a search vertex input at a search entry of a front-end page (S201), the search vertex being a point in a directed acyclic graph; determining an adaptation algorithm corresponding to the search mode, and executing the adaptation algorithm to search on the basis of the search vertex to obtain a search result (S202); displaying the search result by means of a visualization plug-in (S203).

Description

一种图搜索方法、装置、设备及存储介质A graph search method, device, equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求在2021年12月28日提交中国专利局、申请号为202111627096.0、申请名称为“一种图搜索方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111627096.0 and the application title "A Graph Search Method, Device, Equipment, and Storage Medium" submitted to the China Patent Office on December 28, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请实施例涉及金融科技(Fintech)的数据处理技术领域,涉及但不限于一种图搜索方法、装置、设备及存储介质。The embodiment of the present application relates to the technical field of financial technology (Fintech) data processing, and relates to but not limited to a graph search method, device, device and storage medium.
背景技术Background technique
随着计算机计算的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出了更高的要求。With the development of computer computing, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming into Fintech. However, due to the security and real-time requirements of the financial industry, higher requirements are placed on technology. requirements.
金融科技领域下,企业有各种图搜索的场景,比如数据血缘关系搜索、应用血缘关系搜索等等,通常企业的图模型数据量非常庞大,目前,图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案。In the field of financial technology, enterprises have various graph search scenarios, such as data kinship search, application kinship search, etc. Usually, the amount of graph model data in an enterprise is very large. At present, the complex search of graphs can only be performed through the back-end offline algorithm. To achieve, there is no real-time return and visual graphic display solution.
发明内容Contents of the invention
本申请实施例提供一种图搜索方法、装置、设备及存储介质,以解决相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题。The embodiment of the present application provides a graph search method, device, equipment and storage medium to solve the problem in the related art that the complex search of graphs can only be realized through the back-end offline algorithm, and there is no real-time return and visual graph display solution.
本申请实施例的技术方案是这样实现的:The technical scheme of the embodiment of the application is realized in this way:
本申请实施例提供一种图搜索方法,包括:An embodiment of the present application provides a graph search method, including:
接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,所述搜索顶点是有向无环图中的点;Receive a search vertex and a selected search mode input at the search entry of the front-end page; wherein, the search vertex is a point in a directed acyclic graph;
确定与所述搜索模式对应的适配算法,并执行所述适配算法基于所述搜索顶点进行搜索,得到搜索结果;determining an adaptation algorithm corresponding to the search mode, and executing the adaptation algorithm to perform a search based on the search vertex to obtain a search result;
通过可视化插件展示所述搜索结果。The search results are displayed through a visual plug-in.
本申请实施例提供一种图搜索装置,包括:An embodiment of the present application provides a graph search device, including:
显示模块,用于展示前端页面的搜索入口;The display module is used to display the search entry of the front-end page;
接收模块,用于接收在所述搜索入口输入的搜索顶点和选定的搜索模式;其中,所述搜索顶点是有向无环图中的点;A receiving module, configured to receive a search vertex input at the search entry and a selected search mode; wherein the search vertex is a point in a directed acyclic graph;
处理模块,用于确定与所述搜索模式对应的适配算法,并执行所述适配算法基于所述搜索顶点进行搜索,得到搜索结果;A processing module, configured to determine an adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to perform a search based on the search vertex to obtain a search result;
所述显示模块,用于通过可视化插件展示所述搜索结果。The display module is configured to display the search results through a visual plug-in.
本申请实施例提供一种图搜索设备,包括:An embodiment of the present application provides a graph search device, including:
存储器,用于存储可执行指令;处理器,用于执行存储器中存储的可执行指令时,实现上述的方法。The memory is used to store executable instructions; the processor is used to implement the above method when executing the executable instructions stored in the memory.
本申请实施例提供一种存储介质,存储有可执行指令,用于引起处理器执行时,实现上述的方法。An embodiment of the present application provides a storage medium, which stores executable instructions, and is used to cause a processor to implement the above method when executed.
本申请实施例具有以下有益效果:The embodiment of the present application has the following beneficial effects:
通过接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果;通过可视化插件展示搜索结果。解决了相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题,支持超大规模数据集的联机分析处理(Online Analytical Processing,OLAP)复杂场景搜索和各种图模型的可视化展示一整套方案。By receiving the search vertex and the selected search mode input in the search entry of the front-end page; wherein, the search vertex is a point in a directed acyclic graph; determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm based on the search The vertices are searched to get the search results; the search results are displayed through the visualization plug-in. It solves the problem that the complex search of graphs in related technologies can only be realized through the back-end offline algorithm, and there is no real-time return and visual graphic display solution, and supports online analytical processing (OLAP) complex scene search of ultra-large-scale data sets And a complete set of solutions for visual display of various graph models.
附图说明Description of drawings
图1是本申请实施例提供的服务器的一个可选的架构示意图;FIG. 1 is a schematic diagram of an optional architecture of a server provided in an embodiment of the present application;
图2是本申请实施例提供的图搜索方法的流程示意图一;Fig. 2 is a schematic flow diagram of a graph search method provided in an embodiment of the present application;
图3是本申请实施例提供的图可视化分析系统的架构示意图;FIG. 3 is a schematic diagram of the architecture of the graph visualization analysis system provided by the embodiment of the present application;
图4是本申请实施例提供的图搜索方法的流程示意图二;Fig. 4 is the second schematic flow diagram of the graph search method provided by the embodiment of the present application;
图5是本申请实施例提供的有向无环图G以及顶点的区间标签图的示意图;Fig. 5 is a schematic diagram of the directed acyclic graph G and the interval label graph of vertices provided by the embodiment of the present application;
图6是本申请实施例提供的有向无环图G及顶点的正向、逆向广度层数和正向、逆向拓扑层数的示意图。Fig. 6 is a schematic diagram of the directed acyclic graph G and the forward and reverse breadth layers and the forward and reverse topology layers of the vertices provided by the embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the application clearer, the application will be further described in detail below in conjunction with the accompanying drawings. All other embodiments obtained under the premise of creative labor belong to the scope of protection of this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。除非另有定义,本申请实施例所使用的所有的技术和科学术语与属于本申请实施例的技术领域的技术人员通常理解的含义相同。本申请实施例所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the technical field of the embodiments of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
下面说明本申请实施例提供的图搜索设备的示例性应用,本申请实施例提供的图搜索设备可以实施为笔记本电脑,平板电脑,台式计算机,移动设备(例如,移动电话,便携式音乐播放器,个人数字助理,专用消息设备,便携式游戏设备),智能机器人等任意具有屏幕显示功能的终端,也可以实施为服务器。下面,将说明图搜索设备实施为服务器时的示例性应用。The following describes the exemplary application of the graph search device provided by the embodiment of the present application. The graph search device provided by the embodiment of the present application can be implemented as a notebook computer, a tablet computer, a desktop computer, a mobile device (for example, a mobile phone, a portable music player, Personal digital assistants, special messaging devices, portable game devices), intelligent robots and other terminals with screen display functions can also be implemented as servers. Next, an exemplary application when the graph search device is implemented as a server will be explained.
参见图1,图1是本申请实施例提供的服务器100的结构示意图,图1所示的服务器100包括:至少一个处理器110、至少一个网络接口120、用户接口130和存储器150。服务器100中的各个组件通过总线系统140耦合在一起。可理解,总线系统140用于实现这些组件之间的连接通信。总线系统140除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说 明起见,在图1中将各种总线都标为总线系统140。Referring to FIG. 1, FIG. 1 is a schematic structural diagram of a server 100 provided by an embodiment of the present application. The server 100 shown in FIG. Various components in the server 100 are coupled together through the bus system 140 . It can be understood that the bus system 140 is used to realize connection and communication between these components. In addition to the data bus, the bus system 140 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 140 in FIG. 1 for clarity of illustration.
处理器110可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。Processor 110 can be a kind of integrated circuit chip, has signal processing capability, such as general-purpose processor, digital signal processor (DSP, Digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware Components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
用户接口130包括使得能够呈现媒体内容的一个或多个输出装置131,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口130还包括一个或多个输入装置132,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。User interface 130 includes one or more output devices 131 that enable presentation of media content, including one or more speakers and/or one or more visual displays. The user interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
存储器150可以是可移除的,不可移除的或其组合。示例性地硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器150可选地包括在物理位置上远离处理器110的一个或多个存储设备。存储器150包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(Read Only Memory,ROM),易失性存储器可以是随机存取存储器(Random Access Memory,RAM)。本申请实施例描述的存储器150旨在包括任意适合类型的存储器。在一些实施例中,存储器150能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。Memory 150 may be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and the like. Memory 150 optionally includes one or more storage devices located physically remote from processor 110 . Memory 150 includes volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile memory can be read-only memory (Read Only Memory, ROM), and the volatile memory can be random access memory (Random Access Memory, RAM). The memory 150 described in the embodiment of the present application is intended to include any suitable type of memory. In some embodiments, the memory 150 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
操作系统151,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;Operating system 151, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
网络通信模块152,用于经由一个或多个(有线或无线)网络接口120到达其他计算设备,示例性地网络接口120包括:蓝牙、无线相容性认证(Wi-Fi)、和通用串行总线(Universal Serial Bus,USB)等;Network communication module 152 for reaching other computing devices via one or more (wired or wireless) network interfaces 120, exemplary network interfaces 120 include: Bluetooth, Wireless Compatibility Authentication (Wi-Fi), and Universal Serial Bus (Universal Serial Bus, USB), etc.;
输入处理模块153,用于对一个或多个来自一个或多个输入装置132之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。The input processing module 153 is configured to detect one or more user inputs or interactions from one or more of the input devices 132 and translate the detected inputs or interactions.
在一些实施例中,本申请实施例提供的装置可以采用软件方式实现,图1 示出了存储在存储器150中的一种图搜索装置154,该图搜索装置154可以是服务器100中的图搜索装置,其可以是程序和插件等形式的软件,包括以下软件模块:显示模块1541、接收模块1542、处理模块1543,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。将在下文中说明各个模块的功能。In some embodiments, the device provided by the embodiment of the present application can be realized by software. FIG. 1 shows a graph search device 154 stored in the memory 150. The graph search device 154 can be a graph search The device, which can be software in the form of programs and plug-ins, includes the following software modules: a display module 1541, a receiving module 1542, and a processing module 1543. These modules are logical, so any combination or further split. The function of each module will be explained below.
在另一些实施例中,本申请实施例提供的装置可以采用硬件方式实现,作为示例,本申请实施例提供的装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的图搜索方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(Application Specific Int egrated Circuit,ASIC)、DSP、可编程逻辑器件(Programmable Logic Device,PLD)、复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或其他电子元件。In other embodiments, the device provided in the embodiment of the present application may be implemented in hardware. As an example, the device provided in the embodiment of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the In the graph search method provided by the embodiment, for example, the processor in the form of a hardware decoding processor may adopt one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), DSP, Programmable Logic Device (Programmable Logic Device, PLD), Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other electronic components.
下面将结合本申请实施例提供的服务器100的示例性应用和实施,说明本申请实施例提供的图搜索方法。参见图2,图2是本申请实施例提供的图搜索方法的一个可选的流程示意图,将结合图2示出的步骤进行说明,The graph search method provided by the embodiment of the present application will be described below in conjunction with the exemplary application and implementation of the server 100 provided in the embodiment of the present application. Referring to FIG. 2, FIG. 2 is an optional flowchart of the graph search method provided by the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 2.
步骤S201,接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式。Step S201, receiving the search vertex and the selected search mode entered in the search entry of the front page.
其中,搜索顶点是有向无环图中的点。Among them, the search vertex is a point in the directed acyclic graph.
本申请实施例中,有向无环图(Directed acyclic graph,DAG)是一个由顶点和边构成的数据集,顶点代表一个实体,边代表实体之间的关系,这里,用G=(V,E)表示有向无环图简称图,V表示图G中顶点的集合,E表示图G中边的集合。In the embodiment of the present application, a directed acyclic graph (Directed acyclic graph, DAG) is a data set composed of vertices and edges, the vertices represent an entity, and the edges represent the relationship between entities. Here, use G=(V, E) represents a directed acyclic graph for short, V represents the set of vertices in graph G, and E represents the set of edges in graph G.
本申请实施例中,在搜索的过程中,输入的搜索顶点的个数大于或等于1。在搜索顶点的个数为多个的情况下,搜索模式包括可达性分析对应的模式、两点间路径搜索对应的模式;在搜索顶点的个数为单个的情况下,搜索模式包括以单个搜索定点为特定顶点的K步搜索对应的模式。其中,可达性指的是:图中任意两个顶点u和v,如果从u出发存在一条路径可以到达v,则说明顶点u 可达顶点v。路径指的是:顶点u到顶点v的一条路径为从顶点u出发的一个顶点序列(u,u1,…,v),顶点序列到顶点v终止。In the embodiment of the present application, during the search process, the number of input search vertices is greater than or equal to 1. When the number of search vertices is multiple, the search mode includes the mode corresponding to the reachability analysis and the mode corresponding to the path search between two points; when the number of search vertices is single, the search mode includes a single The search fixed-point is the pattern corresponding to the K-step search of a specific vertex. Among them, accessibility refers to: any two vertices u and v in the graph, if there is a path starting from u that can reach v, it means that vertex u can reach vertex v. The path refers to: a path from vertex u to vertex v is a vertex sequence (u, u1,...,v) starting from vertex u, and the vertex sequence ends at vertex v.
本申请实施例中,在搜索的过程中,查询和图模型的存储使用的图数据库可以是开源的分布式图数据库,例如nebulagraph,支持超大规模数据集的毫秒级查询。在前端页面的搜索入口进行搜索时,可以通过前端页面的搜索引擎实现,搜索引擎可以是分布式的全文搜索引擎,例如elasticsearch,支持对海量数据分词、索引和快速检索。In this embodiment of the application, during the search process, the graph database used for querying and storing the graph model can be an open source distributed graph database, such as nebulagraph, which supports millisecond-level query of very large-scale data sets. When searching at the search entry of the front-end page, it can be realized through the search engine of the front-end page. The search engine can be a distributed full-text search engine, such as elasticsearch, which supports word segmentation, indexing and fast retrieval of massive data.
在实际应用中,企业有各种图搜索的场景,包括但不限于数据溯源时的数据血缘关系搜索、应用溯源时的应用血缘关系搜索。面对企业的图模型数据量非常庞大的情况,本申请实施例提供了一个搜索和可视化平台,该可视化平台呈现前端页面给用户,用户可以在平台上进行各种关于图的搜索。In practical applications, enterprises have various graph search scenarios, including but not limited to data kinship search in data traceability and application kinship search in application traceability. Faced with the huge amount of graph model data in an enterprise, this embodiment of the application provides a search and visualization platform, which presents front-end pages to users, and users can perform various searches on graphs on the platform.
步骤S202,确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果。Step S202, determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result.
本申请实施例中,所选搜索模式不同则对应的适配算法不同;本申请中的适配算法是针对输入的搜索定点进行搜索的过程中所采用的搜索方法。需要说明的是,本申请实施例中,适配算法是对图数据库中的图模型进行的一种算法设计,涉及对图模型的操作;在算法实现过程中,本申请将算法对图的操作拆解为基础的图语义操作,比如查看顶点属性,获取相邻顶点,获取两点之间的边这些最基础的图语义操作,也就是说,在搜索过程中将适配算法对图数据库的操作分解为基础的图语义原子操作,从而降低了图操作复杂度;采用elasti csearch进行搜索,索引了所有算法特征,利用索引仅需要一次性检索,便可以得到搜索结果,提高了服务整体的稳定性。In the embodiment of the present application, the corresponding adaptation algorithm is different if the selected search mode is different; the adaptation algorithm in the present application is a search method adopted in the process of searching for the input search fixed point. It should be noted that in the embodiment of this application, the adaptation algorithm is an algorithm design for the graph model in the graph database, which involves the operation of the graph model; Disassembly-based graph semantic operations, such as viewing vertex attributes, obtaining adjacent vertices, obtaining edges between two points, these most basic graph semantic operations, that is to say, in the search process, the adaptation algorithm will The operation is decomposed into basic graph semantic atomic operations, thereby reducing the complexity of graph operations; using elasticsearch to search, indexing all algorithm features, and using the index only requires one-time retrieval to obtain search results, which improves the overall stability of the service sex.
本申请一些实施例中,执行适配算法基于搜索顶点进行搜索时,可以采用广度优先遍历方式(Breath First Search,BFS),按照层次来处理顶点,距离出发点最近的顶点首先被访问,按照距离顺序依次遍历图中的顶点。In some embodiments of the present application, when executing the adaptation algorithm to search based on the search vertex, the breadth-first traversal method (Breath First Search, BFS) can be used to process the vertices according to the hierarchy, and the vertices closest to the starting point are visited first, in order of distance Traverse the vertices in the graph in turn.
步骤S203,通过可视化插件展示搜索结果。Step S203, displaying search results through a visualization plug-in.
本申请实施例中,可视化插件包括但不限于CYSOSCAPE.JS可视化插件。可 视化插件可以将后端打包的可视化结构体灵活组装成各种图的可视化图形,并进行渲染配色。在一些实施例中,可视化插件可以通过如下方式,将可视化结构体灵活组装成各种图:以输入的搜索顶点为根节点,然后层层向外拓展构建出整个完整的图关系链路;具体的结构体所有顶点和两两定点之间的边的集合,然后,可视化插件以输入的搜索顶点为根节点,逐层向外构建出来完整的图。In the embodiment of the present application, the visualization plug-in includes but is not limited to the CYSOSCAPE.JS visualization plug-in. The visualization plug-in can flexibly assemble the visualization structure packaged in the backend into various graph visualizations, and perform rendering and color matching. In some embodiments, the visualization plug-in can flexibly assemble the visualization structure into various graphs in the following way: take the input search vertex as the root node, and then expand outward layer by layer to build the entire complete graph relationship link; specifically The set of all vertices of the structure and the edges between any two vertices. Then, the visualization plug-in takes the input search vertex as the root node, and constructs a complete graph layer by layer outward.
在实际应用中,用户可以在平台上进行各种关于图的搜索后,进一步的,平台可以通过可视化插件实时的返回搜索结果,并且针对搜索结果进行可视化图形展示。可见,本申请提供的图搜索方法,适用于图的各种OLAP搜索场景如可达性分析、两点链路搜索、k步搜索,在搜索的过程中,通过前端页面的搜索入口灵活配置各种搜索条件,进而得到各种图模型可视化展示的结果。In practical applications, after users can search various graphs on the platform, further, the platform can return the search results in real time through the visualization plug-in, and display the search results visually. It can be seen that the graph search method provided by this application is applicable to various OLAP search scenarios of graphs, such as reachability analysis, two-point link search, and k-step search. Various search conditions, and then obtain the results of visual display of various graph models.
由此可知,本申请通过建立一整套完整图分析可视化框架,可以支持用户在前端全球广域网(World Wide Web,WEB)页面上完成各种类型的图关系数据(血缘数据、风控数据等等)在不同搜索场景下配置不同的条件查询,实现可视化搜索。It can be seen from this that this application can support users to complete various types of graph relationship data (blood relationship data, risk control data, etc.) Configure different conditional queries in different search scenarios to realize visual search.
本申请实施例提供的图搜索方法,通过接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果;通过可视化插件展示搜索结果;解决了相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题,支持OLAP复杂场景搜索和各种图模型的可视化展示一整套方案。The graph search method provided by the embodiment of the present application receives the search vertex and the selected search mode input in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the appropriate search mode corresponding to the search mode is determined. Algorithm matching, and execution of the matching algorithm to search based on the search vertex to obtain the search results; display the search results through the visualization plug-in; solve the problem that the complex search of the graph in the related technology can only be realized through the back-end offline algorithm, without a real-time return and visualization For the problem of graphic display solutions, it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
进一步的,在一个图搜索的场景中,本申请提出了一种图搜索的架构示意图,参见图3所示,图搜索的架构又可以成为图可视化分析系统,该图可视化分析系统包括前端WEB服务和图分析引擎两大部分,其中,前端WEB服务包括如下组件:前端搜索入口和CYSOSCAPE.JS可视化插件。这里,前端搜索入口作为前端页面的搜索入口,支持图的可达性、两点之间路径和特定顶点K步搜索等搜索模式,可以配置各种搜索条件。CYSOSCAPE.JS可视化插件作为前端图的可视化插件,可以将后端打包的可视化结构体灵活组装成各种图的可视化图形, 并进行渲染配色。其中,图分析引擎包括如下组件:应用程序接口(Application Programming Interface,API)、标准化模版、适配器和策略工厂、算法库和图原子语义操作层。这里,API对应的图分析引擎通过spring boot微服务提供各种场景的图分析功能。标准化模版为图分析的标准化模版,制定了从API到最后打包整个过程的标准化步骤。标准化步骤为:添加根节点->适配算法策略–>执行搜索算法–>适配打包策略–>执行打包方法–>返回打包结构体。适配器和策略工厂,可以根据前端输入的各种搜索模式和条件,适配不同的算法策略和打包策略。算法库作为自主开发的高性能搜索算法集成算法库,支持可达性分析,两点间路径搜索,和特定顶点的K步搜索等搜索模式。elasticsearch用于索引顶点的各种特征,比如度数、标签区间、广度层数、拓扑层数。图原子语义操作层指的是,将算法库里面的各种算法分解为对语义的最小原子操作,比如查看顶点属性,获取相邻顶点,获取两点之间的边等。图模型的存储和查询使用nebulagraph图数据库。Further, in a graph search scenario, this application proposes a schematic diagram of a graph search architecture, as shown in Figure 3, the graph search architecture can also be a graph visualization analysis system, and the graph visualization analysis system includes front-end WEB services There are two parts, and the graph analysis engine. Among them, the front-end WEB service includes the following components: the front-end search entry and the CYSOSCAPE.JS visualization plug-in. Here, the front-end search entry is used as the search entry of the front-end page, which supports search modes such as graph accessibility, path between two points, and specific vertex K-step search, and various search conditions can be configured. The CYSOSCAPE.JS visualization plug-in, as a visualization plug-in for the front-end diagram, can flexibly assemble the visualization structure packaged in the back-end into various visualization graphics for rendering and color matching. Among them, the graph analysis engine includes the following components: application programming interface (Application Programming Interface, API), standardized template, adapter and policy factory, algorithm library and graph atomic semantic operation layer. Here, the graph analysis engine corresponding to the API provides graph analysis functions for various scenarios through spring boot microservices. The standardized template is a standardized template for graph analysis, which defines the standardized steps from the API to the final packaging process. The standardization steps are: add root node -> adapt algorithm strategy -> execute search algorithm -> adapt packaging strategy -> execute packaging method -> return packaging structure. Adapters and policy factories can adapt different algorithm strategies and packaging strategies according to various search modes and conditions input by the front end. As a self-developed high-performance search algorithm integrated algorithm library, the algorithm library supports reachability analysis, path search between two points, and K-step search of specific vertices and other search modes. Elasticsearch is used to index various features of vertices, such as degree, label interval, breadth layer, and topology layer. The graph atomic semantic operation layer refers to decomposing various algorithms in the algorithm library into the smallest atomic operations on semantics, such as viewing vertex attributes, obtaining adjacent vertices, and obtaining edges between two points. The storage and query of graph models use nebulagraph graph database.
进一步的,结合上述图3所示的图搜索的架构和图4,将本申请的图搜索的流程分为三个阶段进行说明:Further, in combination with the above graph search architecture shown in Figure 3 and Figure 4, the graph search process of this application is divided into three stages for description:
第一阶段、搜索模式和算法关系:前端输入的各种搜索模式决定了后端适配的具体算法即上述适配算法,比如前端搜索两个应用顶点是否有血缘关系,算法适配器会自动匹配到可达性分析策略,调用可达性分析算法。The first stage, search mode and algorithm relationship: various search modes input by the front-end determine the specific algorithm for back-end adaptation, that is, the above-mentioned adaptation algorithm. For example, the front-end searches for whether two application vertices are related by blood, and the algorithm adapter will automatically match them. Reachability analysis strategy, calling the reachability analysis algorithm.
第二阶段、搜索条件和剪枝策略关系:前端配置的搜索条件根据搜索模式会配置成不同的条件类,对搜索结果进行剪枝;比如K步搜索过程中搜索某一张表上游10度的依赖表,并配置一个时间区间条件,使用BFS搜索时候会根据时间条件进行剪枝。这里,剪枝指的是在图的遍历过程中,将不符合条件的顶点和边去掉,提高遍历算法的时间和空间效率。The second stage, the relationship between search conditions and pruning strategies: the search conditions configured on the front end will be configured into different condition categories according to the search mode, and the search results will be pruned; for example, during the K-step search process, search for a table 10 degrees upstream Dependency table, and configure a time interval condition, when using BFS search, pruning will be performed according to the time condition. Here, pruning refers to removing unqualified vertices and edges during graph traversal to improve the time and space efficiency of the traversal algorithm.
第三阶段、返回结构体:搜索结果需要打包成顶点和边的json结构体,顶点集合是所有路径上的顶点的无需集合,边是相邻两个顶点之间的有向边集合,CYSOSCAPE.JS插件会自动将返回结构体进行组装和渲染;具体组装过程是将输入节点添加给根节点,然后从根节点上下游的边层层向外拓展,构建出来完整 的图关系链路。The third stage, returning the structure: the search results need to be packaged into a json structure of vertices and edges, the vertex set is the unnecessary set of vertices on all paths, and the edge is the directed edge set between two adjacent vertices, CYSOSCAPE. The JS plug-in will automatically assemble and render the returned structure; the specific assembly process is to add the input node to the root node, and then expand outward from the edge layer upstream and downstream of the root node to build a complete graph relationship link.
下面对本申请的图搜索的流程作出进一步的说明:The following is a further description of the graph search process of this application:
本申请其他实施例中,搜索顶点包括顶点u和顶点v,步骤S202中执行适配算法基于搜索顶点进行搜索,得到搜索结果,可以通过如下步骤实现:In other embodiments of the present application, the search vertex includes vertex u and vertex v. In step S202, the adaptation algorithm is executed to search based on the search vertex, and the search result is obtained, which can be realized through the following steps:
A11、执行适配算法基于递归调用方式判断顶点u和顶点v之间是否满足可达条件;A11. Execute the adaptation algorithm to judge whether the reachability condition between vertex u and vertex v is satisfied based on the recursive calling method;
A12、若顶点u和顶点v之间满足可达条件,基于顶点u的出度outDeg(u,G)和顶点v的入度inDeg(v,G)之间的关系执行搜索,得到搜索结果,其中,G表征有向无环图。A12. If the reachability condition is satisfied between the vertex u and the vertex v, perform a search based on the relationship between the out-degree outDeg(u,G) of the vertex u and the in-degree inDeg(v,G) of the vertex v, and obtain the search result. Among them, G represents a directed acyclic graph.
本申请实施例中,顶点度数指的是该顶点相邻顶点的个数。在有向图中,顶点度数为顶点出度和入度之和。用inDeg(u,G)标识u的入度,即指向u的顶点个数,用outDeg(u,G)标识u的出度,即u指向的顶点个数。In the embodiment of the present application, the degree of a vertex refers to the number of adjacent vertices of the vertex. In a directed graph, the degree of a vertex is the sum of the out-degree and in-degree of the vertex. Use inDeg(u,G) to mark the in-degree of u, that is, the number of vertices pointing to u, and use outDeg(u,G) to mark the out-degree of u, that is, the number of vertices pointed to by u.
本申请其他实施例中,A11中判断顶点u和顶点v之间是否满足可达条件,可以通过如下步骤实现:In other embodiments of the present application, the determination in A11 whether the reachability condition is satisfied between the vertex u and the vertex v can be realized through the following steps:
A111、判断顶点u和顶点v的区间标签关系;A111, judging the interval label relationship between vertex u and vertex v;
A112、判断顶点u和顶点v的正向广度层数和逆向广度层数关系;A112, judging the relationship between the forward breadth layers and reverse breadth layers of vertex u and vertex v;
A113、判断顶点u和顶点v的正向拓扑层数和逆向拓扑层数关系;A113, judging the relationship between the forward and reverse topological layers of vertex u and vertex v;
A114、基于区间标签关系、正向广度层数和逆向广度层数关系、以及正向拓扑层数和逆向拓扑层数关系中的至少一个,确定顶点u和顶点v之间是否满足可达条件。A114. Based on at least one of the interval label relationship, the forward breadth layer number and reverse breadth layer number relationship, and the forward topology layer number and reverse topology layer number relationship, determine whether the reachability condition between the vertex u and the vertex v is satisfied.
在一些场景中,参见图5所示,图G中每个顶点有两个区间标签,例如对于顶点v有顶点v的第一区间标签
Figure PCTCN2022119014-appb-000001
和顶点v的第二个区间标签
Figure PCTCN2022119014-appb-000002
其中,
Figure PCTCN2022119014-appb-000003
Figure PCTCN2022119014-appb-000004
其中
Figure PCTCN2022119014-appb-000005
表示第i个区间的起始值,
Figure PCTCN2022119014-appb-000006
标识第i个区间的结束值,其中,i=1,2。顶点v的第一个区间标签
Figure PCTCN2022119014-appb-000007
为对顶点v进行先序遍历时顶点v的孩子顶点正向遍历时得到的标签,区间起始值
Figure PCTCN2022119014-appb-000008
为当前顶点包含孩子顶点中起始值最小值,结束值
Figure PCTCN2022119014-appb-000009
为后续遍历时访问v的顺序值;第二个区间标签
Figure PCTCN2022119014-appb-000010
为第二次对顶点v进行先序遍历时按照孩子顶点的逆序顺序遍历得到 的标签,同样
Figure PCTCN2022119014-appb-000011
为当前顶点所包含对孩子顶点中起始值最小值,
Figure PCTCN2022119014-appb-000012
为后续遍历时访问顶点v的顺序值。图5中
Figure PCTCN2022119014-appb-000013
为第一个中括号里面的第一个数值,
Figure PCTCN2022119014-appb-000014
为第一个中括号里面的第二个数值;例如对于顶点1对应的
Figure PCTCN2022119014-appb-000015
是1,
Figure PCTCN2022119014-appb-000016
是10。
Figure PCTCN2022119014-appb-000017
为第二个中括号里面的第一个数值,
Figure PCTCN2022119014-appb-000018
为第二个中括号里面的第二个数值;例如对于顶点1对应的
Figure PCTCN2022119014-appb-000019
是1,
Figure PCTCN2022119014-appb-000020
是10。
In some scenarios, as shown in Figure 5, each vertex in graph G has two interval labels, for example, for vertex v there is the first interval label of vertex v
Figure PCTCN2022119014-appb-000001
and the second interval label of vertex v
Figure PCTCN2022119014-appb-000002
in,
Figure PCTCN2022119014-appb-000003
and
Figure PCTCN2022119014-appb-000004
in
Figure PCTCN2022119014-appb-000005
Indicates the starting value of the i-th interval,
Figure PCTCN2022119014-appb-000006
Identifies the end value of the i-th interval, where i=1,2. the first interval label of vertex v
Figure PCTCN2022119014-appb-000007
It is the label obtained when the child vertex of vertex v is traversed forward in the pre-order traversal of vertex v, and the starting value of the interval
Figure PCTCN2022119014-appb-000008
For the current vertex, include the minimum value of the start value and the end value of the child vertex
Figure PCTCN2022119014-appb-000009
Access the sequential value of v for subsequent traversals; the second interval label
Figure PCTCN2022119014-appb-000010
It is the label obtained by traversing the child vertices in reverse order when traversing the vertex v for the second time, similarly
Figure PCTCN2022119014-appb-000011
It is the minimum value of the starting value among the child vertices contained in the current vertex,
Figure PCTCN2022119014-appb-000012
Ordered value for accessing vertex v for subsequent traversals. Figure 5
Figure PCTCN2022119014-appb-000013
is the first value in the first bracket,
Figure PCTCN2022119014-appb-000014
is the second value in the first square bracket; for example, for vertex 1
Figure PCTCN2022119014-appb-000015
it's 1,
Figure PCTCN2022119014-appb-000016
is 10.
Figure PCTCN2022119014-appb-000017
is the first value in the second bracket,
Figure PCTCN2022119014-appb-000018
is the second value in the second square bracket; for example, for vertex 1 corresponding
Figure PCTCN2022119014-appb-000019
it's 1,
Figure PCTCN2022119014-appb-000020
is 10.
进一步的,参见图6所示,针对上述图5所示的有向图G,定义顶点v的正向广度层数和逆向广度层数,图5每个顶点的正向广度层数是图6中分割号之前的逗号前面的数值,逆向广度层数是逗号之后的数值,例如对于顶点1的正向广度层数是1,逆向广度层数是6。正向广度层数具体定义如下:Further, as shown in Figure 6, for the directed graph G shown in Figure 5 above, define the number of forward breadth layers and reverse breadth layers of vertex v, the number of forward breadth layers of each vertex in Figure 5 is Figure 6 The value before the comma before the middle separator, and the number of reverse breadth layers is the value after the comma, for example, the number of forward breadth layers for vertex 1 is 1, and the number of reverse breadth layers is 6. The specific definition of the number of positive breadth layers is as follows:
Figure PCTCN2022119014-appb-000021
Figure PCTCN2022119014-appb-000021
其中,inN(v,G)标识顶点v的入度,入度为0的顶点正向广度层数为1,否则正向广度层数等于顶点的所有入度顶点正向广度层数+1之后的最小值,即顶点v正向广度层数等于对图G进行广度优先遍历时v父节点的层数值+1。Among them, inN(v, G) identifies the in-degree of vertex v, and the number of forward breadth layers of a vertex with an in-degree of 0 is 1, otherwise the number of forward breadth layers is equal to the number of forward breadth layers of all in-degree vertices of the vertex + 1 The minimum value of , that is, the number of forward breadth layers of vertex v is equal to the layer value of the parent node of v+1 when performing breadth-first traversal on the graph G.
顶点v的逆向广度层数rebre(v)是将图G的所有的有向边进行反转,之后进行相同计算得到所有顶点的逆向广度层数。The reverse breadth layer rebre(v) of vertex v is to reverse all the directed edges of graph G, and then perform the same calculation to obtain the reverse breadth layer of all vertices.
参见图6所示,针对上述图5所示的有向图G,定义顶点v的正向拓扑层数和逆向拓扑层数,图5每个顶点的正向拓扑层数是图6中分割图之后的逗号前面的数值,逆向拓扑层数是逗号之后的数值,例如对于顶点1的正向拓扑层数是1,逆向拓扑层数是1。正向拓扑层数具体定义如下:Referring to Figure 6, for the directed graph G shown in Figure 5 above, define the number of forward topological layers and reverse topological layers of vertex v, and the number of forward topological layers of each vertex in Figure 5 is the segmentation graph in Figure 6 After the value before the comma, the number of reverse topology layers is the value after the comma, for example, the number of forward topology layers for vertex 1 is 1, and the number of reverse topology layers is 1. The specific definition of forward topology layers is as follows:
Figure PCTCN2022119014-appb-000022
Figure PCTCN2022119014-appb-000022
其中,入度为0的顶点正向拓扑层数为1,否则正向拓扑层数等于顶点的所有入度顶点正向拓扑层数+1之后的最大值,即顶点v正向拓扑层数等于对入度为0的顶点进行先序遍历时的遍历顺序值;Among them, the number of forward topological layers of a vertex with an in-degree of 0 is 1, otherwise the number of forward topological layers is equal to the maximum value after the number of forward topological layers of all in-degree vertices of the vertex + 1, that is, the number of forward topological layers of vertex v is equal to The traversal order value when performing pre-order traversal on vertices with in-degree 0;
逆向拓扑层数具体定义如下:The specific definition of reverse topology layers is as follows:
Figure PCTCN2022119014-appb-000023
Figure PCTCN2022119014-appb-000023
其中,出度为0的顶点逆向拓扑层数是当前图最长路径的长度,其他顶点v的逆向拓扑层数是v的所有出度顶点逆向拓扑层数-1之后的最小值。Among them, the reverse topology layer number of the vertex whose out-degree is 0 is the length of the longest path in the current graph, and the reverse topology layer number of other vertices v is the minimum value after the reverse topology layer number of all out-degree vertices of v -1.
本申请其他实施例中,A111判断顶点u和顶点v的区间标签关系,可以通过如下步骤实现:判断顶点v的第一个区间标签
Figure PCTCN2022119014-appb-000024
是否在顶点u的第一个区间标签
Figure PCTCN2022119014-appb-000025
之内,以及顶点v的第二个区间标签
Figure PCTCN2022119014-appb-000026
是否在顶点u的第二个区间标签
Figure PCTCN2022119014-appb-000027
之内;
In other embodiments of the present application, A111 judges the interval label relationship between vertex u and vertex v, which can be realized through the following steps: judge the first interval label of vertex v
Figure PCTCN2022119014-appb-000024
Is it the first interval label of vertex u
Figure PCTCN2022119014-appb-000025
within , and the second interval label of vertex v
Figure PCTCN2022119014-appb-000026
Whether in the second interval label of vertex u
Figure PCTCN2022119014-appb-000027
within;
其中,每一顶点的第一个区间标签为对每一顶点进行先序遍历时每一顶点的孩子顶点正向遍历时得到的标签,每一顶点的第二个区间标签为第二次对每一顶点进行先序遍历时按照孩子顶点的逆序顺序遍历得到的标签;Among them, the first interval label of each vertex is the label obtained when the child vertex of each vertex is traversed forward in the preorder traversal of each vertex, and the second interval label of each vertex is the second interval label for each vertex. When a vertex is traversed in pre-order, the label is traversed according to the reverse order of the child vertices;
其中,顶点u和顶点v之间是否满足可达条件,包括:若
Figure PCTCN2022119014-appb-000028
Figure PCTCN2022119014-appb-000029
之内且
Figure PCTCN2022119014-appb-000030
Figure PCTCN2022119014-appb-000031
之内,确定顶点u和顶点v之间满足可达条件。
Among them, whether the reachability condition is satisfied between the vertex u and the vertex v, including: if
Figure PCTCN2022119014-appb-000028
exist
Figure PCTCN2022119014-appb-000029
within and
Figure PCTCN2022119014-appb-000030
exist
Figure PCTCN2022119014-appb-000031
Within, it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
也就是说,本申请实施例中,针对给定的有向无环图G中任意两个顶点u和顶点v,若
Figure PCTCN2022119014-appb-000032
Figure PCTCN2022119014-appb-000033
则u->v不可达。
That is to say, in the embodiment of this application, for any two vertices u and v in a given directed acyclic graph G, if
Figure PCTCN2022119014-appb-000032
or
Figure PCTCN2022119014-appb-000033
Then u->v is unreachable.
本申请其他实施例中,A112判断顶点u和顶点v的正向广度层数和逆向广度层数关系,可以通过如下步骤实现:In other embodiments of the present application, A112 judges the relationship between the number of forward breadth layers and the number of reverse breadth layers of vertex u and vertex v, which can be realized through the following steps:
判断顶点v的正向广度层数bre(v)是否大于顶点u的正向广度层数bre(u);Determine whether the number of forward breadth layers bre(v) of vertex v is greater than the number of forward breadth layers bre(u) of vertex u;
判断顶点u的逆向广度层数rebre(u)是否大于顶点v的逆向广度层数rebre(v);Determine whether the reverse breadth layer rebre(u) of vertex u is greater than the reverse breadth layer rebre(v) of vertex v;
其中,顶点u和顶点v之间是否满足可达条件,包括:若bre(v)≤bre(u)且rebre(u)≤rebre(v),确定顶点u和顶点v之间满足可达条件。Among them, whether the reachability condition is satisfied between the vertex u and the vertex v, including: if bre(v)≤bre(u) and rebre(u)≤rebre(v), determine whether the reachability condition is satisfied between the vertex u and the vertex v .
也就是说,本申请实施例中,针对给定的有向无环图G中任意两个顶点u和顶点v,bre(v)-bre(u)>0或者rebre(u)-rebre(v)>0,则u->v不可达。That is to say, in this embodiment of the application, for any two vertices u and v in a given directed acyclic graph G, bre(v)-bre(u)>0 or rebre(u)-rebre(v )>0, then u->v is unreachable.
本申请其他实施例中,A113判断顶点u和顶点v的正向拓扑层数和逆向拓扑层数关系,可以通过如下步骤实现:In other embodiments of the present application, A113 judges the relationship between the forward and reverse topological layers of vertex u and vertex v, which can be realized through the following steps:
判断顶点u的正向拓扑层数topo(u)是否小于顶点v的正向拓扑层数topo (v);Determine whether the forward topological layer topo(u) of vertex u is smaller than the forward topological layer topo (v) of vertex v;
判断顶点u的逆向拓扑层数retopo(u)是否小于顶点v的逆向拓扑层数retopo(v);Determine whether the number of reverse topology layers retopo(u) of vertex u is smaller than the number of reverse topology layers retopo(v) of vertex v;
其中,顶点u和顶点v之间是否满足可达条件,包括:topo(u)<topo(v)或者retopo(u)<retopo(v),确定顶点u和顶点v之间满足可达条件。Wherein, whether the reachability condition is satisfied between the vertex u and the vertex v includes: topo(u)<topo(v) or retopo(u)<retopo(v), and it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
也就是说,本申请实施例中,针对给定的有向无环图G中任意两个顶点u和v,若topo(u)>=topo(v)或者retopo(u)>=retopo(v),则u->v不可达。That is to say, in the embodiment of this application, for any two vertices u and v in a given directed acyclic graph G, if topo(u)>=topo(v) or retopo(u)>=retopo(v ), then u->v is unreachable.
本申请其他实施例中,搜索模式包括可达性分析对应的模式的情况下,A11执行适配算法基于递归调用方式判断顶点u和顶点v之间是否满足可达条件,包括如下步骤:In other embodiments of the present application, when the search pattern includes the pattern corresponding to the reachability analysis, A11 executes the adaptation algorithm based on the recursive call method to judge whether the reachability condition is satisfied between the vertex u and the vertex v, including the following steps:
判断递归调用输入的顶点u i和顶点v i是否相等;其中,顶点u i属于顶点u和顶点u的子节点集合,顶点v i属于v和v的父节点集合; Determine whether the vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
这里,若u i=v i,则顶点u和顶点v可达,递归终止,其中u i属于顶点u和顶点u的子节点集合,v i属于顶点v和顶点v的父节点集合。 Here, if u i =v i , then vertex u and vertex v are reachable, and the recursion terminates, where u i belongs to vertex u and the child node set of vertex u, and v i belongs to vertex v and the parent node set of vertex v.
然而,若顶点u i不等于顶点v i,基于递归调用方式判断顶点u和顶点v之间是否满足可达条件。 However, if the vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on the recursive calling method.
在判断是否满足可达条件的过程中,存在如下三种场景,均确认不可达:In the process of judging whether the reachability conditions are met, there are the following three scenarios, all of which are confirmed to be unreachable:
判断顶点v的区间标签
Figure PCTCN2022119014-appb-000034
Figure PCTCN2022119014-appb-000035
是否在顶点u的区间标签之内,如果不再则不可达,停止遍历。
Determine the interval label of vertex v
Figure PCTCN2022119014-appb-000034
and
Figure PCTCN2022119014-appb-000035
Whether it is within the interval label of vertex u, if not, it is unreachable, stop traversing.
判断顶点v和u的正向广度层数和逆向广度层数关系,若bre(v)-bre(u)>0或者rebre(u)-rebre(v)>0,则不可达,停止遍历。Determine the relationship between the forward and reverse breadth layers of vertices v and u. If bre(v)-bre(u)>0 or rebre(u)-rebre(v)>0, it is unreachable and the traversal is stopped.
判断顶点v和u的正向拓扑层数和逆向拓扑层数关系,若topo(u)≥topo(v)或者retopo(u)≥retopo(v),则不可达,停止遍历。Determine the relationship between the forward and reverse topological layers of vertices v and u. If topo(u)≥topo(v) or retopo(u)≥retopo(v), it is unreachable and the traversal is stopped.
进一步地,在可达性分析对应的模式的情况下,采用双向搜索方法,执行A12中基于顶点u的出度outDeg(u,G)和顶点v的入度inDeg(v,G)之间的关系执行搜索,得到搜索结果,包括如下步骤:Further, in the case of the pattern corresponding to the reachability analysis, a two-way search method is used to perform the search between the out-degree outDeg(u,G) of vertex u and the in-degree inDeg(v,G) of vertex v in A12 The relationship executes the search and obtains the search results, including the following steps:
若outDeg(u,G)≤inDeg(v,G),对顶点u的相邻子节点集合中每一个顶点u i 和顶点v执行递归调用,得到搜索结果; If outDeg(u,G)≤inDeg(v,G), perform a recursive call on each vertex u i and vertex v in the set of adjacent child nodes of vertex u to obtain the search result;
若outDeg(u,G)>inDeg(v,G),对顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,得到搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in all parent node sets of vertex u and vertex v, and obtain the search result.
在实际应用中,搜索模式包括可达性分析对应的模式的情况下,针对可达性算法实施,每天离线计算作业更新算法特征:使用spark引擎计算图模型所有顶点的区间标签
Figure PCTCN2022119014-appb-000036
Figure PCTCN2022119014-appb-000037
以及所有标签的正向广度层数bre(v)、逆向广度层数rebre(v)、正向拓扑层数topo(v),逆向拓扑层数retopo(v);然后将所有顶点特征upsert到elasticsarch索引中。
In practical applications, when the search pattern includes the pattern corresponding to the reachability analysis, the reachability algorithm is implemented, and the offline calculation job is updated every day. Features of the algorithm: use the spark engine to calculate the interval labels of all vertices of the graph model
Figure PCTCN2022119014-appb-000036
and
Figure PCTCN2022119014-appb-000037
And the number of forward breadth layers bre(v), reverse breadth layers rebre(v), forward topology layers topo(v), and reverse topology layers retopo(v) of all labels; then upsert all vertex features to elasticsarch indexing.
Elasticsearch顶点特征索引结构为:The Elasticsearch vertex feature index structure is:
Figure PCTCN2022119014-appb-000038
Figure PCTCN2022119014-appb-000038
采用线上OLAP分析,执行双向搜索剪枝算法递归调用,将算法对图的操作分解为基础的原子语义层操作,调用nebulagraph客户端进行图语义原子查询;算法根据区间标签、广度层数、拓扑层数进行剪枝,以及根据顶点的度数选择双向搜索方向时候,对elasticsearch只进行一次检索,搜索出来目标顶点的上 表的所有特征值,进行计算。本申请通过集成双向剪枝搜索算法,大大降低了大规模图数据集OLAP分析延迟。适配算法实现过程,对图的操作全部拆解为图的原子语义操作,以及通过每天的离线批量特征工程计算,将各个维度的特征索引到高性能的分布式搜索引擎中,保证了算法实现的高效和稳定。Using online OLAP analysis, execute the recursive call of the bidirectional search and pruning algorithm, decompose the operation of the algorithm on the graph into basic atomic semantic layer operations, and call the nebulagraph client to perform graph semantic atomic query; the algorithm is based on interval labels, breadth layers, and topology When the number of layers is pruned and the two-way search direction is selected according to the degree of the vertex, only one search is performed on elasticsearch, and all the eigenvalues in the above table of the target vertex are searched out and calculated. This application greatly reduces the delay of OLAP analysis of large-scale graph data sets by integrating the two-way pruning search algorithm. In the implementation process of the adaptation algorithm, all the operations on the graph are dismantled into atomic semantic operations of the graph, and through daily offline batch feature engineering calculations, the features of each dimension are indexed into the high-performance distributed search engine, which ensures the realization of the algorithm efficient and stable.
下述的两点间路径搜索算法步骤和可达性算法步骤一致,只是需要在遍历过程通过链表记录下完整链路,即输入顶点u和顶点v,搜索顶点u和顶点v之间的所有链路。The steps of the following path search algorithm between two points are the same as those of the reachability algorithm, except that the complete link needs to be recorded through the linked list during the traversal process, that is, input vertex u and vertex v, and search for all links between vertex u and vertex v road.
本申请其他实施例中,搜索模式包括两点间路径搜索对应的模式,A11执行适配算法基于递归调用方式判断顶点u和顶点v之间是否满足可达条件,包括如下步骤:In other embodiments of the present application, the search mode includes a mode corresponding to path search between two points, and A11 performs an adaptation algorithm based on a recursive calling method to judge whether the reachability condition between the vertex u and the vertex v is met, including the following steps:
创建链表v1和链表v2;其中,链表v1添加顶点u为头节点,链表v2添加顶点v为头结点;Create linked list v1 and linked list v2; among them, linked list v1 adds vertex u as the head node, and linked list v2 adds vertex v as the head node;
判断递归调用输入的顶点u i和顶点v i是否相等;其中,顶点u i属于顶点u和顶点u的子节点集合,顶点v i属于v和v的父节点集合; Determine whether the vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
若u i=v i,则顶点u和顶点v可达,递归终止,其中u i属于顶点u和顶点u的子节点集合,v i属于顶点v和顶点v的父节点集合。将link2链表进行反转,然后link1链表去掉尾节点,和link2链表进行拼接,返回拼接后的链表集合。 If u i =v i , then vertex u and vertex v are reachable, and the recursion terminates, where u i belongs to vertex u and the child node set of vertex u, and v i belongs to vertex v and the parent node set of vertex v. Reverse the linked list of link2, remove the tail node from the linked list of link1, splice with the linked list of link2, and return the set of linked lists after splicing.
然而,若顶点u i不等于顶点v i,基于递归调用方式判断顶点u和顶点v之间是否满足可达条件。 However, if the vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on the recursive calling method.
进一步地,在两点间路径搜索对应的模式的情况下,采用双向搜索方法,执行A12中基于顶点u的出度outDeg(u,G)和顶点v的入度inDeg(v,G)之间的关系执行搜索,得到搜索结果,包括如下步骤:Further, in the case of searching for the corresponding mode between two points, a two-way search method is used to execute the relationship between the out-degree outDeg(u,G) of vertex u based on vertex u and the in-degree inDeg(v,G) of vertex v in A12. Execute the search for the relationship and get the search results, including the following steps:
若outDeg(u,G)≤inDeg(v,G),对顶点u的相邻子节点集合中每一个顶点u i和顶点v执行递归调用,克隆当前出度顶点链表并添加u i为尾节点,得到顶点u和顶点v之间的所有链路的搜索结果; If outDeg(u,G)≤inDeg(v,G), perform a recursive call on each vertex u i and vertex v in the adjacent child node set of vertex u, clone the current out-degree vertex list and add u i as the tail node , get the search results of all links between vertex u and vertex v;
若outDeg(u,G)>inDeg(v,G),对顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,克隆当前入度顶点链表并添加v i为尾节点,得到顶点u 和顶点v之间的所有链路的搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in all parent node sets of vertex u and vertex v, clone the current in-degree vertex list and add v i as the tail node, Get the search results of all links between vertex u and vertex v.
本申请其他实施例中,搜索模式包括K步搜索对应的模式,采用广度优先搜索,广度优先搜索一个顶点的相邻层次节点时候,可以使用批量搜索模式一次性搜索出来;结合搜索条件,每搜索出来一个相邻定点时候,使用搜索条件进行剪枝,可以大大加快搜索速度,快速得到搜索结果。In other embodiments of the present application, the search mode includes the corresponding mode of K-step search, and breadth-first search is adopted. When breadth-first search is used to search the adjacent hierarchical nodes of a vertex, it can be searched out at one time using the batch search mode; combined with the search conditions, each search When an adjacent fixed point comes out, use the search condition to prune, which can greatly speed up the search and get the search results quickly.
下面继续说明本申请实施例提供的图搜索装置154实施为软件模块的示例性结构,在一些实施例中,如图1所示,存储在存储器150的图搜索装置154中的软件模块可以是服务器100中的图搜索装置,包括:The following continues to describe the exemplary structure in which the graph search device 154 provided by the embodiment of the present application is implemented as a software module. In some embodiments, as shown in FIG. 1 , the software module stored in the graph search device 154 of the memory 150 may be a server The graph search apparatus in 100, comprising:
显示模块1541,用于展示前端页面的搜索入口;Display module 1541, used to display the search entry of the front-end page;
接收模块1542,用于接收在搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;The receiving module 1542 is used to receive the search vertex input at the search entry and the selected search mode; wherein, the search vertex is a point in a directed acyclic graph;
处理模块1543,用于确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果;The processing module 1543 is used to determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result;
显示模块1541,用于通过可视化插件展示搜索结果。The display module 1541 is configured to display search results through a visual plug-in.
在一些实施例中,搜索顶点包括顶点u和顶点v,处理模块1543,用于执行适配算法基于递归调用方式判断顶点u和顶点v之间是否满足可达条件;若顶点u和顶点v之间满足可达条件,基于顶点u的出度outDeg(u,G)和顶点v的入度inDeg(v,G)之间的关系执行搜索,得到搜索结果,其中,G表征有向无环图。In some embodiments, the search vertex includes vertex u and vertex v, and the processing module 1543 is used to execute the adaptation algorithm to judge whether the reachability condition between vertex u and vertex v is satisfied based on the recursive calling method; Satisfy the reachability condition, perform a search based on the relationship between the out-degree outDeg(u,G) of vertex u and the in-degree inDeg(v,G) of vertex v, and obtain the search results, where G represents a directed acyclic graph .
在一些实施例中,处理模块1543,用于判断顶点u和顶点v的区间标签关系;判断顶点u和顶点v的正向广度层数和逆向广度层数关系;判断顶点u和顶点v的正向拓扑层数和逆向拓扑层数关系;基于区间标签关系、正向广度层数和逆向广度层数关系、以及正向拓扑层数和逆向拓扑层数关系中的至少一个,确定顶点u和顶点v之间是否满足可达条件。In some embodiments, the processing module 1543 is used to judge the interval label relationship between vertex u and vertex v; Topological layer number and reverse topological layer number relationship; based on interval label relationship, forward breadth layer number and reverse breadth layer number relationship, and at least one of forward topological layer number and reverse topological layer number relationship, determine vertex u and vertex Whether the reachability condition is satisfied between v.
在一些实施例中,处理模块1543,用于判断顶点v的第一个区间标签
Figure PCTCN2022119014-appb-000039
是否在顶点u的第一个区间标签
Figure PCTCN2022119014-appb-000040
之内,以及顶点v的第二个区间标签
Figure PCTCN2022119014-appb-000041
是否在顶点u的第二个区间标签
Figure PCTCN2022119014-appb-000042
之内;其中,每一顶点的第一个区间标签为对每一 顶点进行先序遍历时每一顶点的孩子顶点正向;
In some embodiments, the processing module 1543 is used to determine the first interval label of the vertex v
Figure PCTCN2022119014-appb-000039
Is it the first interval label of vertex u
Figure PCTCN2022119014-appb-000040
within , and the second interval label of vertex v
Figure PCTCN2022119014-appb-000041
Whether in the second interval label of vertex u
Figure PCTCN2022119014-appb-000042
Within; where, the first interval label of each vertex is the forward direction of the child vertex of each vertex when the pre-order traversal is performed on each vertex;
遍历时得到的标签,每一顶点的第二个区间标签为第二次对每一顶点进行先序遍历时按照孩子顶点的逆序顺序遍历得到的标签;其中,顶点u和顶点v之间是否满足可达条件,包括:若
Figure PCTCN2022119014-appb-000043
Figure PCTCN2022119014-appb-000044
之内且
Figure PCTCN2022119014-appb-000045
Figure PCTCN2022119014-appb-000046
之内,确定顶点u和顶点v之间满足可达条件。
The label obtained during the traversal, the second interval label of each vertex is the label obtained by traversing the reverse order of the child vertex during the second preorder traversal of each vertex; among them, whether the relationship between vertex u and vertex v satisfies Accessible conditions, including: if
Figure PCTCN2022119014-appb-000043
exist
Figure PCTCN2022119014-appb-000044
within and
Figure PCTCN2022119014-appb-000045
exist
Figure PCTCN2022119014-appb-000046
Within, it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
在一些实施例中,处理模块1543,用于判断顶点v的正向广度层数bre(v)减去顶点u的正向广度层数bre(u)的差值是否大于0;In some embodiments, the processing module 1543 is used to determine whether the difference between the forward breadth level bre(v) of the vertex v minus the forward breadth level bre(u) of the vertex u is greater than 0;
判断顶点u的逆向广度层数rebre(u)减去顶点v的逆向广度层数rebre(v)的差值是否大于0;Determine whether the difference between the number of reverse breadth layers rebre(u) of vertex u minus the number of reverse breadth layers rebre(v) of vertex v is greater than 0;
其中,顶点u和顶点v之间是否满足可达条件,包括:若bre(v)-bre(u)<0且rebre(u)-rebre(v)<0,确定顶点u和顶点v之间满足可达条件。Among them, whether the reachability condition is satisfied between vertex u and vertex v, including: if bre(v)-bre(u)<0 and rebre(u)-rebre(v)<0, determine the distance between vertex u and vertex v The reachability condition is met.
在一些实施例中,处理模块1543,用于判断顶点u的正向拓扑层数topo(u)是否小于顶点v的正向拓扑层数topo(v);In some embodiments, the processing module 1543 is configured to determine whether the forward topology layer topo(u) of the vertex u is smaller than the forward topology layer topo(v) of the vertex v;
判断顶点u的逆向拓扑层数retopo(u)是否小于顶点v的逆向拓扑层数retopo(v);Determine whether the number of reverse topology layers retopo(u) of vertex u is smaller than the number of reverse topology layers retopo(v) of vertex v;
其中,顶点u和顶点v之间是否满足可达条件,包括:topo(u)<topo(v)或者retopo(u)<retopo(v),确定顶点u和顶点v之间满足可达条件。Wherein, whether the reachability condition is satisfied between the vertex u and the vertex v includes: topo(u)<topo(v) or retopo(u)<retopo(v), and it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
在一些实施例中,搜索模式包括可达性分析对应的模式,处理模块1543,用于判断递归调用输入的顶点u i和顶点v i是否相等;其中,顶点u i属于顶点u和顶点u的子节点集合,顶点v i属于v和v的父节点集合;若顶点u i不等于顶点v i,基于递归调用方式判断顶点u和顶点v之间是否满足可达条件。 In some embodiments, the search mode includes a mode corresponding to the reachability analysis, and the processing module 1543 is used to determine whether the vertex u i and the vertex v i input by the recursive call are equal; wherein, the vertex u i belongs to the vertex u and the vertex u A set of child nodes, vertex v i belongs to the set of parent nodes of v and v; if vertex u i is not equal to vertex v i , judge whether the reachability condition between vertex u and vertex v is satisfied based on the recursive calling method.
在一些实施例中,处理模块1543,用于若outDeg(u,G)≤inDeg(v,G),对顶点u的相邻子节点集合中每一个顶点u i和顶点v执行递归调用,得到搜索结果; In some embodiments, the processing module 1543 is configured to perform a recursive call on each vertex u i and vertex v in the set of adjacent child nodes of vertex u if outDeg(u, G)≤inDeg(v, G), to obtain search results;
若outDeg(u,G)>inDeg(v,G),对顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,得到搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in all parent node sets of vertex u and vertex v, and obtain the search result.
在一些实施例中,搜索模式包括两点间路径搜索对应的模式,处理模块15 43,用于创建链表v1和链表v2;其中,链表v1添加顶点u为头节点,链表v2添加顶点v为头结点;In some embodiments, the search mode includes a mode corresponding to path search between two points, and the processing module 15 to 43 is used to create a linked list v1 and a linked list v2; wherein, the linked list v1 adds a vertex u as a head node, and the linked list v2 adds a vertex v as a head node Node;
判断递归调用输入的顶点u i和顶点v i是否相等;其中,顶点u i属于顶点u和顶点u的子节点集合,顶点v i属于v和v的父节点集合; Determine whether the vertex u i and vertex v i input by the recursive call are equal; among them, vertex u i belongs to the set of child nodes of vertex u and vertex u, and vertex v i belongs to the set of parent nodes of v and v;
若顶点u i不等于顶点v i,基于递归调用方式判断顶点u和顶点v之间是否满足可达条件。 If the vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on the recursive calling method.
在一些实施例中,处理模块1543,用于若outDeg(u,G)≤inDeg(v,G),对顶点u的相邻子节点集合中每一个顶点u i和顶点v执行递归调用,克隆当前出度顶点链表并添加u i为尾节点,得到顶点u和顶点v之间的所有链路的搜索结果; In some embodiments, the processing module 1543 is configured to perform recursive calls on each vertex u i and vertex v in the set of adjacent child nodes of vertex u if outDeg(u, G)≤inDeg(v, G), and clone The current out-degree vertex list and add u i as the tail node to get the search results of all links between vertex u and vertex v;
若outDeg(u,G)>inDeg(v,G),对顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,克隆当前入度顶点链表并添加v i为尾节点,得到顶点u和顶点v之间的所有链路的搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in all parent node sets of vertex u and vertex v, clone the current in-degree vertex list and add v i as the tail node, Get the search results of all links between vertex u and vertex v.
本申请实施例提供的图搜索装置,通过接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果;通过可视化插件展示搜索结果;解决了相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题,支持OLAP复杂场景搜索和各种图模型的可视化展示一整套方案。The graph search device provided by the embodiment of the present application receives the search vertex and the selected search mode inputted in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the appropriate search mode corresponding to the search mode is determined. Algorithm matching, and execution of the matching algorithm to search based on the search vertex to obtain the search results; display the search results through the visualization plug-in; solve the problem that the complex search of the graph in the related technology can only be realized through the back-end offline algorithm, without a real-time return and visualization For the problem of graphic display solutions, it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
需要说明的是,本申请实施例装置的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果,因此不做赘述。对于本装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be noted that the description of the device in the embodiment of the present application is similar to the description of the above-mentioned method embodiment, and has similar beneficial effects to the method embodiment, so details are not repeated here. For the technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
本申请实施例提供一种存储有可执行指令的存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图2示出的方法。The embodiment of the present application provides a storage medium storing executable instructions, and the executable instruction is stored therein. When the executable instruction is executed by the processor, it will cause the processor to execute the method provided in the embodiment of the present application, for example, as shown in FIG. 2 shows the method.
本申请实施例提供的存储介质,通过接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果; 通过可视化插件展示搜索结果;解决了相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题,支持OLAP复杂场景搜索和各种图模型的可视化展示一整套方案。The storage medium provided by the embodiment of the present application receives the search vertex and the selected search mode input in the search entry of the front page; wherein, the search vertex is a point in a directed acyclic graph; and the matching corresponding to the search mode is determined Algorithm, and execute the adaptation algorithm to search based on the search vertex to obtain the search results; display the search results through the visualization plug-in; solve the problem that the complex search of the graph in the related technology can only be realized through the back-end offline algorithm, there is no real-time return and visual graph For the problem of displaying solutions, it supports a complete set of solutions for OLAP complex scene search and visual display of various graph models.
在一些实施例中,存储介质可以是计算机可读存储介质,例如,铁电存储器(FRAM,Ferromagnetic Random Access Memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory)、带电可擦可编程只读存储器(EEPROM,Electrically Erasable Programmable Read Only Memory)、闪存、磁表面存储器、光盘、或光盘只读存储器(CD-ROM,Compact Disk-Read Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。In some embodiments, the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various devices including one or any combination of the above-mentioned memories.
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。In some embodiments, executable instructions may take the form of programs, software, software modules, scripts, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and its Can be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(超文本标记语言,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。As an example, executable instructions may, but do not necessarily correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in Hyper Text Markup Language (HTML, Hyper Text Markup Language) in one or more scripts in a document, in a single file dedicated to the program in question, or in multiple cooperating files (for example, a file that stores one or more modules, subroutines, or code sections )middle. As an example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communication network. to execute.
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。The above descriptions are merely examples of the present application, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
工业实用性Industrial Applicability
本申请实施例提供了一种图搜索方法、装置、设备及存储介质,通过接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,搜索顶点是有向无环图中的点;确定与搜索模式对应的适配算法,并执行适配算法基于搜索顶点进行搜索,得到搜索结果;通过可视化插件展示搜索结果。解决了相关技术中图的复杂搜索只能通过后端离线算法实现,没有一个实时的返回和可视化图形展示方案的问题,支持超大规模数据集的联机分析处理(Online Analy tical Processing,OLAP)复杂场景搜索和各种图模型的可视化展示一整套方案。The embodiment of the present application provides a graph search method, device, device and storage medium, by receiving the search vertex and the selected search mode input in the search entry of the front-end page; wherein, the search vertex is a directed acyclic graph point; determine the adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to search based on the search vertex, and obtain the search result; display the search result through a visualization plug-in. It solves the problem that the complex search of graphs in related technologies can only be realized through the back-end offline algorithm, and there is no real-time return and visual graphic display solution, and supports online analytical processing (OLAP) complex scenarios of ultra-large-scale data sets A complete set of solutions for searching and visual display of various graph models.

Claims (13)

  1. 一种图搜索方法,包括:A graph search method, comprising:
    接收在前端页面的搜索入口输入的搜索顶点和选定的搜索模式;其中,所述搜索顶点是有向无环图中的点;Receive a search vertex and a selected search mode input at the search entry of the front-end page; wherein, the search vertex is a point in a directed acyclic graph;
    确定与所述搜索模式对应的适配算法,并执行所述适配算法基于所述搜索顶点进行搜索,得到搜索结果;determining an adaptation algorithm corresponding to the search mode, and executing the adaptation algorithm to perform a search based on the search vertex to obtain a search result;
    通过可视化插件展示所述搜索结果。The search results are displayed through a visual plug-in.
  2. 根据权利要求1中所述的方法,其中,所述搜索顶点包括顶点u和顶点v,所述执行所述适配算法基于所述搜索顶点进行搜索,得到搜索结果,包括:The method according to claim 1, wherein the search vertex includes vertex u and vertex v, and performing the adaptation algorithm to search based on the search vertex to obtain a search result includes:
    执行所述适配算法基于递归调用方式判断所述顶点u和所述顶点v之间是否满足可达条件;Executing the adaptation algorithm to determine whether the reachability condition between the vertex u and the vertex v is satisfied based on a recursive calling method;
    若所述顶点u和所述顶点v之间满足所述可达条件,基于所述顶点u的出度outDeg(u,G)和所述顶点v的入度inDeg(v,G)之间的关系执行搜索,得到所述搜索结果,其中,G表征所述有向无环图。If the reachability condition is satisfied between the vertex u and the vertex v, based on the out-degree outDeg(u, G) of the vertex u and the in-degree inDeg(v, G) of the vertex v A relation performs a search to obtain the search result, where G represents the directed acyclic graph.
  3. 根据权利要求2所述的方法,其中,所述判断顶点u和所述顶点v之间是否满足可达条件,包括:The method according to claim 2, wherein said judging whether a reachability condition is satisfied between the vertex u and the vertex v comprises:
    判断所述顶点u和所述顶点v的区间标签关系;judging the interval label relationship between the vertex u and the vertex v;
    判断所述顶点u和所述顶点v的正向广度层数和逆向广度层数关系;judging the relationship between the forward breadth layers and the reverse breadth layers of the vertex u and the vertex v;
    判断所述顶点u和所述顶点v的正向拓扑层数和逆向拓扑层数关系;judging the relationship between the forward and reverse topological layers of the vertex u and the vertex v;
    基于所述区间标签关系、所述正向广度层数和逆向广度层数关系、以及所述正向拓扑层数和逆向拓扑层数关系中的至少一个,确定所述顶点u和所述顶点v之间是否满足可达条件。Determine the vertex u and the vertex v based on at least one of the interval label relationship, the forward breadth layer number and reverse breadth layer number relationship, and the forward topology layer number and reverse topology layer number relationship Whether the reachability condition is satisfied.
  4. 根据权利要求3所述的方法,其中,所述判断所述顶点u和所述顶点v的区间标签关系,包括;The method according to claim 3, wherein the judging the interval label relationship between the vertex u and the vertex v includes;
    判断所述顶点v的第一个区间标签
    Figure PCTCN2022119014-appb-100001
    是否在所述顶点u的第一个区间标签
    Figure PCTCN2022119014-appb-100002
    之内,以及所述顶点v的第二个区间标签
    Figure PCTCN2022119014-appb-100003
    是否在所述顶点u的第二个区间 标签
    Figure PCTCN2022119014-appb-100004
    之内;其中,每一顶点的第一个区间标签为对所述每一顶点进行先序遍历时所述每一顶点的孩子顶点正向遍历时得到的标签,所述每一顶点的第二个区间标签为第二次对所述每一顶点进行先序遍历时按照孩子顶点的逆序顺序遍历得到的标签;
    Determine the first interval label of the vertex v
    Figure PCTCN2022119014-appb-100001
    Is the first interval label in the vertex u
    Figure PCTCN2022119014-appb-100002
    within , and the second interval label of the vertex v
    Figure PCTCN2022119014-appb-100003
    is the second interval label of the vertex u
    Figure PCTCN2022119014-appb-100004
    Within; wherein, the first interval label of each vertex is the label obtained when the child vertex of each vertex is traversed forward when the pre-order traversal is performed on each vertex, and the second interval label of each vertex An interval label is the label obtained by traversing the reverse order of the child vertex when the pre-order traversal is performed on each vertex for the second time;
    其中,所述顶点u和所述顶点v之间是否满足可达条件,包括:若所述
    Figure PCTCN2022119014-appb-100005
    在所述
    Figure PCTCN2022119014-appb-100006
    之内且所述
    Figure PCTCN2022119014-appb-100007
    在所述
    Figure PCTCN2022119014-appb-100008
    之内,确定所述顶点u和所述顶点v之间满足可达条件。
    Wherein, whether the reachability condition is satisfied between the vertex u and the vertex v includes: if the
    Figure PCTCN2022119014-appb-100005
    in the
    Figure PCTCN2022119014-appb-100006
    within and as stated
    Figure PCTCN2022119014-appb-100007
    in the
    Figure PCTCN2022119014-appb-100008
    Within, it is determined that the reachability condition is satisfied between the vertex u and the vertex v.
  5. 根据权利要求3或4所述的方法,其中,所述判断所述顶点u和所述顶点v的正向广度层数和逆向广度层数关系,包括:The method according to claim 3 or 4, wherein the judging the relationship between the forward breadth layers and the reverse breadth layers of the vertex u and the vertex v includes:
    判断所述顶点v的正向广度层数bre(v)是否大于所述顶点u的正向广度层数bre(u);Judging whether the forward breadth number bre(v) of the vertex v is greater than the forward breadth number bre(u) of the vertex u;
    判断所述顶点u的逆向广度层数rebre(u)是否大于所述顶点v的逆向广度层数rebre(v);Judging whether the reverse breadth number rebre(u) of the vertex u is greater than the reverse breadth number rebre(v) of the vertex v;
    其中,所述顶点u和所述顶点v之间是否满足可达条件,包括:若bre(v)≤bre(u)且rebre(u)≤rebre(v),确定所述顶点u和所述顶点v之间满足可达条件。Wherein, whether the reachability condition is satisfied between the vertex u and the vertex v includes: if bre(v)≤bre(u) and rebre(u)≤rebre(v), determine the vertex u and the vertex v The reachability condition is satisfied between vertices v.
  6. 根据权利要求3至5中任一项所述的方法,其中,所述判断所述顶点u和所述顶点v的正向拓扑层数和逆向拓扑层数关系,包括:The method according to any one of claims 3 to 5, wherein the judging the relationship between the forward topological layer number and the reverse topological layer number of the vertex u and the vertex v includes:
    判断所述顶点u的正向拓扑层数topo(u)是否小于所述顶点v的正向拓扑层数topo(v);Judging whether the forward topology layer number topo(u) of the vertex u is less than the forward topology layer number topo(v) of the vertex v;
    判断所述顶点u的逆向拓扑层数retopo(u)是否小于所述顶点v的逆向拓扑层数retopo(v);Judging whether the reverse topology layer number retopo(u) of the vertex u is less than the reverse topology layer number retopo(v) of the vertex v;
    其中,所述顶点u和所述顶点v之间是否满足可达条件,包括:topo(u)<topo(v)或者retopo(u)<retopo(v),确定所述顶点u和所述顶点v之间满足可达条件。Wherein, whether the reachability condition is satisfied between the vertex u and the vertex v includes: topo(u)<topo(v) or retopo(u)<retopo(v), and determining the vertex u and the vertex The reachability condition is satisfied between v.
  7. 根据权利要求2所述的方法,其中,所述搜索模式包括可达性分析对应 的模式,所述执行所述适配算法基于递归调用方式判断所述顶点u和所述顶点v之间是否满足可达条件,包括:The method according to claim 2, wherein the search mode includes a mode corresponding to reachability analysis, and the execution of the adaptation algorithm judges whether the vertex u and the vertex v meet the requirements based on a recursive calling method. Accessible conditions, including:
    判断递归调用输入的顶点u i和顶点v i是否相等;其中,所述顶点u i属于所述顶点u和所述顶点u的子节点集合,所述顶点v i属于所述v和所述v的父节点集合; Judging whether the vertex u i and vertex v i input by the recursive call are equal; wherein, the vertex u i belongs to the vertex u and the child node set of the vertex u, and the vertex v i belongs to the v and the v set of parent nodes;
    若所述顶点u i不等于所述顶点v i,基于递归调用方式判断所述顶点u和所述顶点v之间是否满足可达条件。 If the vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on a recursive calling manner.
  8. 根据权利要求7所述的方法,其中,所述基于所述顶点u的出度outDeg(u,G)和所述顶点v的入度inDeg(v,G)之间的关系执行搜索,得到所述搜索结果,包括:The method according to claim 7, wherein the search is performed based on the relationship between the out-degree outDeg(u, G) of the vertex u and the in-degree inDeg(v, G) of the vertex v, to obtain the The above search results, including:
    若outDeg(u,G)≤inDeg(v,G),对所述顶点u的相邻子节点集合中每一个顶点u i和顶点v执行递归调用,得到所述搜索结果; If outDeg(u, G)≤inDeg(v, G), perform a recursive call on each vertex u i and vertex v in the set of adjacent child nodes of the vertex u to obtain the search result;
    若outDeg(u,G)>inDeg(v,G),对所述顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,得到所述搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in the set of all parent nodes of the vertex u and vertex v, and obtain the search result.
  9. 根据权利要求2所述的方法,其中,所述搜索模式包括两点间路径搜索对应的模式,所述执行所述适配算法基于递归调用方式判断所述顶点u和所述顶点v之间是否满足可达条件,包括:The method according to claim 2, wherein the search mode includes a mode corresponding to path search between two points, and the execution of the adaptation algorithm judges whether there is a relationship between the vertex u and the vertex v based on a recursive calling method. Accessible conditions are met, including:
    创建链表v1和链表v2;其中,所述链表v1添加所述顶点u为头节点,所述链表v2添加所述顶点v为头结点;Create a linked list v1 and a linked list v2; wherein, the linked list v1 adds the vertex u as a head node, and the linked list v2 adds the vertex v as a head node;
    判断递归调用输入的顶点u i和顶点v i是否相等;其中,所述顶点u i属于所述顶点u和所述顶点u的子节点集合,所述顶点v i属于所述v和所述v的父节点集合; Judging whether the vertex u i and vertex v i input by the recursive call are equal; wherein, the vertex u i belongs to the vertex u and the child node set of the vertex u, and the vertex v i belongs to the v and the v set of parent nodes;
    若所述顶点u i不等于所述顶点v i,基于递归调用方式判断所述顶点u和所述顶点v之间是否满足可达条件。 If the vertex u i is not equal to the vertex v i , judge whether the reachability condition between the vertex u and the vertex v is satisfied based on a recursive calling manner.
  10. 根据权利要求9所述的方法,其中,所述基于所述顶点u的出度outDeg(u,G)和所述顶点v的入度inDeg(v,G)之间的关系执行搜索,得到所述搜索结果,包括:The method according to claim 9, wherein the search is performed based on the relationship between the out-degree outDeg(u, G) of the vertex u and the in-degree inDeg(v, G) of the vertex v, to obtain the The above search results, including:
    若outDeg(u,G)≤inDeg(v,G),对所述顶点u的相邻子节点集合中每一个顶点u i和顶点v执行递归调用,克隆当前出度顶点链表并添加u i为尾节点,得到所述顶点u和所述顶点v之间的所有链路的搜索结果; If outDeg(u,G)≤inDeg(v,G), perform a recursive call on each vertex u i and vertex v in the set of adjacent child nodes of the vertex u, clone the current out-degree vertex linked list and add u i as Tail node, obtain the search results of all links between the vertex u and the vertex v;
    若outDeg(u,G)>inDeg(v,G),对所述顶点u和顶点v的所有父节点集合中每一个顶点v i执行递归调用,克隆当前入度顶点链表并添加v i为尾节点,得到所述顶点u和所述顶点v之间的所有链路的搜索结果。 If outDeg(u,G)>inDeg(v,G), perform a recursive call on each vertex v i in the set of all parent nodes of the vertex u and vertex v, clone the current in-degree vertex list and add v i as the tail node, to obtain the search results of all the links between the vertex u and the vertex v.
  11. 一种图搜索装置,包括:A graph search device, comprising:
    显示模块,用于展示前端页面的搜索入口;The display module is used to display the search entry of the front-end page;
    接收模块,用于接收在所述搜索入口输入的搜索顶点和选定的搜索模式;其中,所述搜索顶点是有向无环图中的点;A receiving module, configured to receive a search vertex input at the search entry and a selected search mode; wherein the search vertex is a point in a directed acyclic graph;
    处理模块,用于确定与所述搜索模式对应的适配算法,并执行所述适配算法基于所述搜索顶点进行搜索,得到搜索结果;A processing module, configured to determine an adaptation algorithm corresponding to the search mode, and execute the adaptation algorithm to perform a search based on the search vertex to obtain a search result;
    所述显示模块,用于通过可视化插件展示所述搜索结果。The display module is configured to display the search results through a visual plug-in.
  12. 一种图搜索设备,包括:A graph search device, comprising:
    存储器,用于存储可执行指令;处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至10任一项所述的方法。The memory is used to store executable instructions; the processor is used to implement the method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.
  13. 一种存储介质,存储有可执行指令,用于引起处理器执行时,实现权利要求1至10任一项所述的方法。A storage medium storing executable instructions for causing a processor to implement the method according to any one of claims 1 to 10.
PCT/CN2022/119014 2021-12-28 2022-09-15 Graph search method and apparatus, device and storage medium WO2023124253A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111627096.0A CN114385864A (en) 2021-12-28 2021-12-28 Graph searching method, device, equipment and storage medium
CN202111627096.0 2021-12-28

Publications (1)

Publication Number Publication Date
WO2023124253A1 true WO2023124253A1 (en) 2023-07-06

Family

ID=81197944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119014 WO2023124253A1 (en) 2021-12-28 2022-09-15 Graph search method and apparatus, device and storage medium

Country Status (2)

Country Link
CN (1) CN114385864A (en)
WO (1) WO2023124253A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114385864A (en) * 2021-12-28 2022-04-22 深圳前海微众银行股份有限公司 Graph searching method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060958A1 (en) * 2015-08-27 2017-03-02 Oracle International Corporation Fast processing of path-finding queries in large graph databases
CN110377795A (en) * 2019-06-27 2019-10-25 浙江大学 A kind of distributed temporal diagram accessibility inquiry processing method based on Blogel
US20200410008A1 (en) * 2019-06-27 2020-12-31 International Business Machines Corporation Auto generating reasoning query on a knowledge graph
CN112507135A (en) * 2020-12-17 2021-03-16 深圳市一号互联科技有限公司 Visual knowledge graph query template construction method, device, system and storage medium
CN114385864A (en) * 2021-12-28 2022-04-22 深圳前海微众银行股份有限公司 Graph searching method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060958A1 (en) * 2015-08-27 2017-03-02 Oracle International Corporation Fast processing of path-finding queries in large graph databases
CN110377795A (en) * 2019-06-27 2019-10-25 浙江大学 A kind of distributed temporal diagram accessibility inquiry processing method based on Blogel
US20200410008A1 (en) * 2019-06-27 2020-12-31 International Business Machines Corporation Auto generating reasoning query on a knowledge graph
CN112507135A (en) * 2020-12-17 2021-03-16 深圳市一号互联科技有限公司 Visual knowledge graph query template construction method, device, system and storage medium
CN114385864A (en) * 2021-12-28 2022-04-22 深圳前海微众银行股份有限公司 Graph searching method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114385864A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
US11966395B2 (en) Query generation based on merger of subqueries
EP3550444B1 (en) Query generation based on a logical data model
US20120047483A1 (en) Smart Web Service Discovery
US11928114B2 (en) Query generation based on a logical data model with one-to-one joins
US10115059B2 (en) System and method for utilizing a logical graphical model for scenario analysis
Furche et al. Oxpath: A language for scalable, memory-efficient data extraction from web applications
CN112860727B (en) Data query method, device, equipment and medium based on big data query engine
WO2023124253A1 (en) Graph search method and apparatus, device and storage medium
CN114116065A (en) Method and device for acquiring topological graph data object and electronic equipment
US11573790B2 (en) Generation of knowledge graphs based on repositories of code
KR102172138B1 (en) Distributed Computing Framework and Distributed Computing Method
Li et al. amAssist: In-IDE ambient search of online programming resources
CN110347573B (en) Application program analysis method, device, electronic equipment and computer readable medium
CN116894035A (en) Multi-source heterogeneous data blood-edge relation construction method, system, equipment and medium
CN116010444B (en) Low-code interactive graph query statement construction method
CN111782820A (en) Knowledge graph creating method and device, readable storage medium and electronic equipment
CN114020852A (en) Knowledge graph display method and device
US8250090B2 (en) Method for performing message-based distributed computing, involves executing expression of matched message response on members identified by set instance definition using dimension values derived from message
CN111222918A (en) Keyword mining method and device, electronic equipment and storage medium
US20240111922A1 (en) System and method for managing simulation artifacts
CN117573199B (en) Model difference comparison analysis method, device, equipment and medium
CN115563183B (en) Query method, query device and program product
CN112527880B (en) Method, device, equipment and medium for collecting metadata information of big data cluster
US20240104297A1 (en) Analysis of spreadsheet table in response to user input
US20210318858A1 (en) Method, apparatus, and computer readable storage medium for monitoring a data chain

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22913520

Country of ref document: EP

Kind code of ref document: A1