Information matching method, device, electronic device and storage medium

By creating n non-overlapping subqueries to match in the initial, incremental and complete edge sets, the problems of redundant intermediate results and resource waste in the existing technology are solved, and efficient transaction information query detection is achieved.

CN117312621BActive Publication Date: 2025-09-09ZHEJIANG BANGSUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311350249.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-09-09
Estimated Expiration
2043-10-17

AI Technical Summary

Technical Problem

Existing subgraph matching methods are prone to generating redundant intermediate results in real-time pattern matching and cannot effectively adapt to frequently updated graph data, resulting in wasted computing resources and low query efficiency.

Method used

By creating n non-overlapping subqueries and using n edges in the preset subgraph pattern to match in the initial, incremental and complete edge sets, redundant intermediate results are avoided and the dynamic modification characteristics of graph data are used to narrow the search scope.

Benefits of technology

It effectively avoids redundant intermediate results, improves the efficiency of transaction information query and detection, adapts to frequently updated graph data scenarios, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312621B_ABST
    Figure CN117312621B_ABST
Patent Text Reader

Abstract

The present invention discloses an information matching method, device, electronic device, and storage medium, which relate to the field of computers. First, incremental graph data corresponding to newly added transaction information can be added to initial graph data corresponding to existing transaction information to obtain updated graph data, and the updated graph data can be divided into an initial edge set, an incremental edge set, and a complete edge set based on the initial graph data and the incremental graph data. Subsequently, n subqueries can be created based on the n edges contained in a preset subgraph pattern. These n subqueries do not overlap with each other, which can avoid the generation of redundant intermediate results during the query process. Moreover, these n subqueries utilize the incremental characteristics of the dynamic modification of graph data, which can greatly narrow the search scope. Furthermore, the present invention can quickly match the subgraph corresponding to the preset subgraph pattern from the updated graph data through these n subqueries, the initial edge set, the incremental edge set, and the complete edge set, thereby improving the efficiency of transaction information detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to an information matching method, device, electronic equipment and storage medium. Background Art

[0002] In order to mine transaction information between users for risk control detection or precision marketing purposes, problems such as "querying three-person circular transfers that occurred in the past three months" and "querying diamond transfer patterns that occurred in the past six months" often involve real-time pattern matching.

[0003] In related technologies, to address this type of real-time pattern matching problem, transaction information between users is typically converted into graph data. Subgraph matching methods are then used to match the graph data to a matching subgraph, thereby determining the matching transaction information based on the subgraph. However, existing subgraph matching methods are prone to generating redundant intermediate results during the query process, which wastes computing resources. Furthermore, transaction information between users is frequently updated, which in turn leads to frequent updates in the graph data. Existing subgraph matching methods are not well adapted to this frequently updated graph data, making it difficult to efficiently mine transaction information. Summary of the Invention

[0004] The purpose of the present invention is to provide an information matching method, device, electronic device and storage medium, which can create n non-overlapping sub-queries based on the n edges contained in a preset sub-graph pattern, and use these n sub-queries to perform sub-graph matching in graph data. This not only avoids the generation of redundant intermediate results, but also these n sub-queries utilize the incremental characteristics of dynamic modification of graph data, which can greatly narrow the search scope and thereby improve the efficiency of transaction information query detection.

[0005] To solve the above technical problems, the present invention provides an information matching method, comprising:

[0006] Convert new transaction information into incremental graph data;

[0007] Adding the incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and dividing the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data;

[0008] Create n subqueries based on the n edges contained in the preset subgraph pattern; the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set;

[0009] A subgraph corresponding to the preset subgraph pattern is matched from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set, and transaction information matching the preset subgraph pattern is determined using the subgraph.

[0010] Optionally, before creating n subqueries according to the n edges included in the preset subgraph pattern, the following is further included:

[0011] A plurality of the preset sub-image patterns are obtained from a plurality of triggers.

[0012] Optionally, it also includes:

[0013] When receiving the sub-image mode registration information, creating a trigger, and writing the preset sub-image mode included in the sub-image mode registration information into the newly created trigger;

[0014] When the sub-image mode deletion information is received, the trigger corresponding to the preset sub-image mode to be deleted is deleted.

[0015] Optionally, it also includes:

[0016] Periodically remove expired information from the existing transaction information.

[0017] Optionally, the matching a subgraph corresponding to the preset subgraph pattern from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set further includes:

[0018] Sorting the plurality of points included in the preset subgraph pattern according to the target subquery to obtain a point sequence, such that the two endpoints included in the corresponding edge of D in the target subquery in the preset subgraph pattern are located at the first position of the point sequence; the target subquery is an unprocessed subquery in the n subqueries;

[0019] The subgraph corresponding to the preset subgraph pattern in the target subquery is matched from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set, and the complete edge set.

[0020] Optionally, the step of sorting the plurality of points included in the preset subgraph pattern according to the target subquery to obtain a point sequence includes:

[0021] Writing the two endpoints of the corresponding edge of D in the target subquery in the preset subgraph pattern into the tail of the point sequence;

[0022] For the remaining points in the preset subgraph pattern except the endpoints, iteratively select the points with the largest number of neighbors in the point sequence and write them into the end of the point sequence.

[0023] Optionally, matching the subgraph corresponding to the preset subgraph pattern in the target subquery from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set, and the complete edge set includes:

[0024] Determine the k+1th point to be matched in the point sequence, and determine the arrangement corresponding to the first k points that have been matched in the point sequence k∈(1,n-1), a represents an edge in the preset subgraph pattern, Indicates the point in the updated graph data that matches the i-th point of the preset subgraph pattern, i∈(1,k);

[0025] For the edge to be matched in the preset subgraph pattern (a j ,a k+1 ),a j ∈{a1,…,a k}, use the target subquery to determine the edge to be matched (a j ,a k+1 ) in the target edge set corresponding to the initial edge set, the incremental edge set and the complete edge set, and the edge to be matched (a j ,a k+1 ) matching the target edge set to obtain a first point set that meets the requirements;

[0026] For the edge to be matched in the preset subgraph pattern (a k+1 ,a j ),a j ∈{a1,…,a k}, use the secret subquery to determine the edge to be matched (a k+1 ,a j ) in the target edge set corresponding to the initial edge set, the incremental edge set and the complete edge set, and the edge to be matched (a k+1 ,a j ) matching the target edge set to obtain a second point set that meets the requirements;

[0027] Using the first point set and the second point set to form a total point set, and performing a Cartesian product calculation on the total point set and p to obtain a permutation of the first k+1 points in the matched point sequence;

[0028] When k is not equal to n-1, add 1 to k and proceed to the step of determining the k+1th point to be matched in the point sequence;

[0029] When k is equal to n-1, the subgraph determined by the target subquery in the preset subgraph pattern is determined according to the arrangement of all points in the matched point sequence.

[0030] The present invention also provides an information matching device, comprising:

[0031] The conversion module is used to convert the newly added transaction information into incremental graph data;

[0032] An updating module, configured to add the incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and to divide the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data;

[0033] The subquery creation module is used to create n subqueries according to the n edges contained in the preset subgraph pattern; the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set;

[0034] A query module is configured to match a subgraph corresponding to the preset subgraph pattern from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set, and to determine transaction information matching the preset subgraph pattern using the subgraph.

[0035] The present invention further provides an electronic device, comprising:

[0036] memory for storing computer programs;

[0037] A processor is used to implement the above-mentioned information matching method when executing the computer program.

[0038] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the information matching method described above is implemented.

[0039] The present invention provides an information matching method, comprising: converting newly added transaction information into incremental graph data; adding the incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and dividing the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data; creating n subqueries according to the n edges included in a preset subgraph pattern; the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set; using the n subqueries, the initial edge set, the incremental edge set and the complete edge set, a subgraph corresponding to the preset subgraph pattern is matched from the updated graph data, and the subgraph is used to determine transaction information that matches the preset subgraph pattern.

[0040] It can be seen that the present invention can first add the incremental graph data corresponding to the newly added transaction information to the initial graph data corresponding to the existing transaction information to obtain the updated graph data, and divide the initial edge set, incremental edge set and complete edge set in the updated graph data according to the initial graph data and the incremental graph data; then, the present invention can create n subqueries according to the n edges included in the preset subgraph pattern, where the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set. It can be seen that these n subqueries do not overlap with each other, which can avoid the generation of redundant intermediate results during the query process; at the same time, these n subqueries take advantage of the incremental characteristics of dynamic modification of graph data, which greatly narrows the search scope. Furthermore, the present invention can quickly match the subgraph corresponding to the preset subgraph pattern from the updated graph data by utilizing n subqueries, the initial edge set, the incremental edge set, and the complete edge set, thereby improving the efficiency of transaction information query detection. The present invention also provides an information matching device, an electronic device, and a storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0042] Figure 1 A flowchart of an information matching method provided by an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of continuous subgraph pattern matching provided by an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of a diamond-shaped transfer relationship provided by an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of another continuous subgraph pattern matching method provided by an embodiment of the present invention;

[0046] Figure 5 This is a structural block diagram of an information matching device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0048] In order to mine transaction information between users in order to achieve the purpose of risk control detection or precision marketing, problems such as "querying the three-person circular transfer that occurred in the past three months" and "querying the diamond transfer pattern that occurred in the past six months" that require real-time pattern matching are often involved. In related technologies, for such real-time pattern matching problems, the transaction information between users can first be converted into graph data, and then matched in the graph data. This is because transaction behavior generally occurs between two users, and transaction behavior is directional, such as the transfer behavior between the transfer initiator and the transfer recipient is directed from the transfer initiator to the transfer recipient, which is similar to the structure of the graph. For example, the transfer initiator and the transfer recipient can be abstracted as two vertices, and the transfer behavior can be abstracted as a directed edge between the two vertices. That is, graph data can effectively record transaction information. In addition, the above-mentioned real-time pattern matching problem can be specifically solved using the subgraph pattern matching method. Specifically, let G = (V, E) represent a directed graph, where V represents a node set and E represents an edge set. Define a subgraph pattern P = (V', E'), where A subgraph pattern P is a partial graph, consisting of a portion of the nodes and edges in the original graph G. Subgraph pattern matching is to find all subgraphs in the graph G that are isomorphic to the pattern P. A subgraph H = (V", E") is isomorphic to the pattern P if and only if there exists a bijective function f:V'→V", such that for any (v1, v2)∈E', there is (f(v1), f(v2))∈E". Such a subgraph H is considered to be a match of the pattern P in the graph G. Since subgraph pattern matching has a similar form to the above-mentioned real-time pattern matching problems such as "querying for three-person circular transfers in the last three months" and "querying for diamond transfer patterns in the last six months", the general method to solve real-time pattern matching is to convert transaction information into graph data and perform subgraph pattern matching in the graph data to obtain transaction information that matches the given pattern.

[0049] However, existing subgraph matching methods do not achieve good processing results. Specifically, in each query, existing subgraph matching methods will gradually add a new edge to the previous query results for matching. This gradual iterative process will result in a large number of redundant intermediate results, and these intermediate results may contain the same subgraph instances, which in turn causes existing subgraph matching methods to waste a large amount of computing resources and storage space, affecting query efficiency and overall system performance. More importantly, transaction information between users is frequently updated, which leads to the graph data not only having a large scale, but also prone to frequent updates. Existing subgraph matching methods are simply unable to adapt to the large scale and frequent updates of transaction information.

[0050] In view of this, the present invention can create n non-overlapping sub-queries based on the n edges contained in the preset sub-graph pattern, and use these n sub-queries to perform sub-graph matching in the graph data. This not only avoids the generation of redundant intermediate results, but also these n sub-queries utilize the incremental characteristics of dynamic modification of graph data, which can greatly narrow the search scope and thereby improve the efficiency of transaction information query detection.

[0051] It should be noted that the embodiment of the present invention does not limit the specific hardware device for executing the method. For example, it can be a personal computer, a server, etc., and can be set according to actual application requirements.

[0052] Please refer to Figure 1 , Figure 1 This is a flow chart of an information matching method provided by an embodiment of the present invention. The method may include:

[0053] S100: Convert the newly added transaction information into incremental graph data.

[0054] It should be noted that the embodiments of the present invention are not limited to specific transaction information and may include, for example, transfer information, purchase information, etc., and may be set according to actual application requirements. The embodiments of the present invention also do not limit the conditions for triggering the execution of step S100. For example, step S100 may be executed each time new transaction information is received, or may be executed only when it is determined that a sufficient amount of new transaction information has accumulated. The conditions may be set according to actual application requirements.

[0055] Furthermore, the embodiments of the present invention do not limit the specific method for converting graph data; this method can be configured based on actual application requirements. If multiple transactions occur between two users, multiple edges will be established to represent the relationship between them. It is worth noting that all edges in the graph data appearing in the embodiments of the present invention are directed edges.

[0056] S200: Add incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and divide the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data.

[0057] It should be noted that the updated graph data is the complete graph data obtained by integrating the incremental graph data with the initial graph data. To leverage the incremental nature of dynamically modified graph data for subgraph pattern matching, the present invention can, after complete integration, divide the updated graph data into an initial edge set, an incremental edge set, and a complete edge set based on the initial and incremental graph data. The initial edge set is the edge set of the initial graph data, the incremental edge set is the edge set of the incremental graph data, and the complete edge set is the edge set of the updated graph data.

[0058] Furthermore, since the volume of existing transaction information can be enormous, to avoid placing significant pressure on storage devices, expired information can be regularly removed from the existing transaction information. For example, if a bank transfer service only uses information from the past six months, transfer information older than six months can be deleted from the system through regular searches.

[0059] S300, create n sub-queries according to the n edges included in the preset sub-graph pattern; the first sub-query is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set.

[0060] In particular, before performing subgraph matching, the embodiment of the present invention can split the subgraph pattern matching task into n subqueries according to the n edges contained in the preset subgraph pattern. Each subquery specifies which edge set in the initial edge set, incremental edge set, and complete edge set each edge in the preset subgraph pattern needs to be matched. Specifically, in these n subqueries, the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ). It should be noted that each position in the subquery corresponds to an edge in the preset subgraph pattern, C (Current, initial part) means that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D (Delta, incremental part) means that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N (New, complete part) means that the corresponding edge in the preset subgraph pattern is matched in the complete edge set. That is, C i Indicates that the i-th edge in the preset subgraph pattern is matched in the initial edge set, D i Indicates that the i-th edge in the preset subgraph pattern is matched in the incremental edge set, N iIndicates that the i-th edge in the preset subgraph pattern is matched against the complete edge set. As can be seen, these n subqueries do not overlap, preventing redundant intermediate results during the query process. Furthermore, these n subqueries ensure that edge matching is performed across edge sets. This not only avoids the low matching efficiency and high resource usage often associated with direct matching against the complete updated graph data, but also leverages the incremental nature of dynamic graph modification, significantly narrowing the search scope. This effectively improves matching efficiency and reduces resource consumption, making it more suitable for scenarios where transaction information is frequently updated.

[0061] Furthermore, for user convenience, multiple triggers can be set, each storing a user-specified preset subgraph pattern. These triggers can automatically perform subgraph matching when changes to graph data are detected. It should be noted that the present invention does not limit the number of triggers and can be set based on actual user needs.

[0062] Based on this, before creating n subqueries according to the n edges included in the preset subgraph pattern, it also includes:

[0063] S500: Acquire multiple preset sub-image patterns from multiple triggers.

[0064] Furthermore, users can upload E p List (sub-graph pattern list) to register the sub-graph pattern, for example, uploading "{(1,2),(2,3),(3,1)}" can register the circular triangle pattern. p The list is managed offline.

[0065] Based on this, the method may further include:

[0066] Step 11: upon receiving the sub-image mode registration information, creating a trigger, and writing the preset sub-image mode included in the sub-image mode registration information into the newly created trigger;

[0067] Step 12: upon receiving the sub-image mode deletion information, deleting the trigger corresponding to the preset sub-image mode to be deleted.

[0068] S400, using n subqueries, the initial edge set, the incremental edge set and the complete edge set to match a subgraph corresponding to a preset subgraph pattern from the updated graph data, and using the subgraph to determine transaction information matching the preset subgraph pattern.

[0069] It should be noted that the embodiment of the present invention does not limit how to perform subgraph pattern matching under the premise of setting a subquery. As long as the corresponding edges in the preset subgraph pattern can be matched in the corresponding edge set according to the requirements of the subquery, it can be set according to actual application needs. For example, in order to achieve higher matching efficiency, the embodiment of the present invention can match the subgraph corresponding to the preset subgraph pattern from the updated graph data based on a point-by-point strategy. Specifically, for the target subquery currently being processed, the embodiment of the present invention can sort the multiple points contained in the preset subgraph pattern according to the target subquery to obtain a point sequence, and can select points from the point sequence in turn for edge matching. To ensure effective matching in the incremental edge set, the embodiment of the present invention can place the two endpoints contained in the corresponding edge of D in the target subquery in the preset subgraph pattern at the first place in the point sequence when generating the point sequence. In this way, when performing point-by-point matching, the edge between these two endpoints can be matched first.

[0070] Based on this, using n subqueries, the initial edge set, the incremental edge set, and the complete edge set to match the subgraph corresponding to the preset subgraph pattern from the updated graph data may include:

[0071] S401: Sort multiple points included in the preset subgraph pattern according to the target subquery to obtain a point sequence, so that the two endpoints included in the corresponding edge of D in the target subquery in the preset subgraph pattern are located at the first position in the point sequence; the target subquery is an unprocessed subquery in the n subqueries;

[0072] S402: Matching a subgraph corresponding to a preset subgraph pattern in the target subquery from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set, and the complete edge set.

[0073] Of course, the other points in the point sequence can be sorted arbitrarily or according to a preset method. For example, to improve performance, a heuristic method can be used to determine the order: while ensuring that the two endpoints of the edge represented by D are at the beginning of the point sequence, the unselected points in the preset subgraph pattern with the largest number of neighbors to the selected points in the point sequence can be added to the point sequence.

[0074] Based on this, multiple points contained in the preset subgraph pattern are sorted according to the target subquery to obtain a point sequence, which may include:

[0075] S4011: writing the two endpoints contained in the corresponding edge of D in the target subquery in the preset subgraph pattern to the end of the point sequence;

[0076] S4012: For the remaining points except the endpoints in the preset subgraph pattern, iteratively select the points with the largest number of neighbors in the point sequence and write them to the end of the point sequence.

[0077] Furthermore, it should be pointed out that since the subgraphs matched by each subquery are not the same, after completing the query processing of all subqueries, the embodiment of the present invention only needs to take the union of the query results of all subqueries to obtain all subgraphs that match the preset subgraph pattern.

[0078] The following describes the specific process of matching the subgraph corresponding to the preset subgraph pattern from the updated graph data based on the point-by-point strategy. Based on this, using the point sequence, target subquery, initial edge set, incremental edge set, and complete edge set to match the subgraph corresponding to the preset subgraph pattern in the target subquery from the updated graph data can include:

[0079] S4021: Determine the k+1th point to be matched in the point sequence, and determine the arrangement corresponding to the first k points that have been matched in the point sequence k∈(1,n-1), a represents the edge in the preset subgraph pattern, Indicates the point in the updated graph data that matches the i-th point of the preset subgraph pattern, i∈(1,k);

[0080] S4022: For the edge to be matched in the preset subgraph pattern (a j ,a k+1 ),a j ∈{a1,…,a k}, use the target subquery to determine the edge to be matched (a j ,a k+1 ) in the initial edge set, incremental edge set and complete edge set corresponding to the target edge set, and the edge to be matched (a j ,a k+1 ) Match the target edge set to obtain the first point set that meets the requirements;

[0081] S4023: For the edge to be matched in the preset subgraph pattern (a k+1 ,a j ),a j ∈{a1,…,a k}, use the secret subquery to determine the edge to be matched (a k+1 ,a j ) in the initial edge set, incremental edge set and complete edge set, and the edge to be matched (a k+1 ,a j ) Match the target edge set to obtain a second point set that meets the requirements;

[0082] S4024: Using the first point set and the second point set to form a total point set, and performing a Cartesian product calculation on the total point set and p to obtain the arrangement of the first k+1 points in the matched point sequence;

[0083] S4025: When k is not equal to n-1, add 1 to k and go to S4021;

[0084] S4026: When k is equal to n-1, determine the subgraph determined by the target subquery according to the preset subgraph pattern according to the arrangement of all points in the matched point sequence.

[0085] It should be noted that the reason why this embodiment includes step S4022 and step S4023 is that the graph involved in this embodiment is a directed graph, that is, the edge pointing from point A to point B is not the same as the edge pointing from point B to point A.

[0086] Based on the above embodiment, the present invention can first add the incremental graph data corresponding to the newly added transaction information to the initial graph data corresponding to the existing transaction information to obtain the updated graph data, and divide the initial edge set, incremental edge set and complete edge set in the updated graph data according to the initial graph data and the incremental graph data; then, the present invention can create n subqueries according to the n edges included in the preset subgraph pattern, where the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set. It can be seen that these n subqueries do not overlap with each other, which can avoid the generation of redundant intermediate results during the query process; at the same time, these n subqueries take advantage of the incremental nature of the dynamic modification of graph data, greatly narrowing the search scope. Furthermore, the present invention can quickly match the subgraph corresponding to the preset subgraph pattern from the updated graph data by utilizing n subqueries, the initial edge set, the incremental edge set, and the complete edge set, thereby improving the efficiency of transaction information query detection.

[0087] The following is a complete introduction to the above method based on the accompanying drawings and specific examples. Figure 2 , Figure 2 A schematic diagram of continuous subgraph pattern matching provided by an embodiment of the present invention, the process is as follows:

[0088] 1. Receive several update messages (such as newly generated transfer information).

[0089] 2. Convert the update information into graph data. For example, the transfer initiator and transfer recipient can be abstracted into vertices, and the transfer behavior can be abstracted into a directed edge from the vertex representing the initiator to the vertex representing the recipient. Modify the graph storage in temporary memory. This storage implicitly stores three different versions of the graph when receiving updates: Current: the initial graph data; Delta: the incremental graph data; New: the updated graph data.

[0090] 3. Use the streaming graph real-time continuous subgraph matching method to check each registered trigger and execute the trigger's action.

[0091] The following further describes the streaming graph real-time continuous subgraph matching method.

[0092] Let C represent the edge set in the initial graph data, D represent the edge set in the incremental graph data, and N represent the edge set in the updated graph data. Assuming that the subgraph pattern of query Q contains n edges, Q can be split into the following n subqueries:

[0093] dQ1:=D1,C2,C3...C n ;

[0094] dQ2:=N1,D2,C3...C n ; ...

[0096] dQn:=N1,N2,N3...D n ;

[0097] C i Indicates that the i-th edge must be matched in C, and similarly D i 、N i Then, the union of the results of these n queries is obtained to obtain the subgraph query result corresponding to the subgraph pattern.

[0098] The following further describes how to find the result of a dQi query (i.e., using subquery dQi to perform full-graph matching). This query is static subgraph pattern matching. Assume that the pattern corresponding to dQi is x points, we can determine an order for these x points, denoted as a1, a2, a3...a x , ensure D i The two endpoints of the ith edge represented by it are in the first two positions (in order to improve performance, a heuristic method can be used to determine the order: i After the two endpoints of the edge represented by it are in the first two positions and are selected, for the remaining points, iteratively select the points with the largest number of neighbors to the selected points). Use the point-by-point strategy and breadth-first algorithm to match these x points in this order, with the condition that n edges match the specified edge set respectively: When the first k points are matched, several arrangements that temporarily meet the conditions are obtained. Indicates the point in the updated graph data that matches the i-th point of the preset subgraph pattern. For each permutation, when it is necessary to match the k+1-th point, for each (a j ,a k+1 ),a j ∈{a1,…,a k}Match in the specified edge set to obtain the point set that meets the requirements. Similarly, for each (a k+1 ,a j ),a j ∈{a1,…,a k Match the specified edge set, intersect these point sets, and perform a Cartesian product with p to obtain a permutation that matches the first k+1 points; ultimately, several permutations containing x points are obtained, which are the results of the dQi query.

[0099] The above continuous subgraph matching method is further explained with an example.

[0100] Please refer to Figure 3 , Figure 3 A schematic diagram of a diamond-shaped transfer relationship provided in an embodiment of the present invention. Figure 3 It shows the diamond-shaped transfer relationship (using edges e1, e2, e3, e4) between four users (represented by points a1, a2, a3, and a4). Figure 3 The matching mode applies the streaming graph real-time continuous subgraph matching method to perform continuous subgraph matching, splitting the query Q into the following four subqueries:

[0101] dQ1:=D1, C2, C3, C4;

[0102] dQ2:=N1,D2,C3,C4;

[0103] dQ3:=N1,N2,D3,C4;

[0104] dQ4:=N1, N2, N3, D4.

[0105] Use these four subqueries to perform subgraph pattern matching. The specific matching process is as follows: Figure 4 As shown in , “increment” refers to the incremental edge set, “old graph” refers to the initial edge set, and “new graph” refers to the updated edge set. The point sequences corresponding to the above four subqueries are:

[0106] a1, a2, a4, a3;

[0107] a1, a3, a4, a2;

[0108] a2, a4, a1, a3;

[0109] a3, a4, a1, a2.

[0110] Take subquery dQ1 as an example. First, select a1 and a2 from the point sequence. Since there is only an edge (a1, a2) between points a1 and a2, edge (a1, a2) is matched in the incremental edge set. Then, further select a4 from the point sequence. Since point a4 only has an edge (a2, a4) with point a2, edge (a1, a2) is matched in the initial edge set. Then, further select a3 from the point sequence. Since there is an edge (a3, a4) between point a3 and point a4 and an edge (a1, a3) with point a1, edge (a3, a4) is matched in the initial edge set, and edge (a1, a3) is matched in the initial edge set.

[0111] Finally, the results of these n queries are unioned to obtain the changes in the subgraph corresponding to the subgraph pattern.

[0112] Based on the above embodiment, the present invention can receive continuous subgraph queries and batch dynamic modifications, and transmit the matching results to the lower-level risk control system. In the case of banking services, since the data update speed can reach 1000 / s, the dynamic modification is updated in a micro-batch manner, and a continuous subgraph query is performed on the incremental data during each micro-batch update. Through real-time continuous subgraph matching, abnormal transaction patterns or fraudulent behavior can be discovered in a timely manner, and corresponding risk control measures can be taken. This real-time matching and monitoring system can help protect the interests of institutions and their customers and improve overall security and risk management capabilities.

[0113] The following introduces the information matching device, electronic device, and computer-readable storage medium provided in the embodiments of the present invention. The information matching device, electronic device, and computer-readable storage medium described below can be referenced to the information matching method described above.

[0114] Please refer to Figure 5 , Figure 5 This is a structural block diagram of an information matching device provided by an embodiment of the present invention. The device may include:

[0115] A conversion module 501 is used to convert the newly added transaction information into incremental graph data;

[0116] An updating module 502 is configured to add incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and to divide the updated graph data into an initial edge set, an incremental edge set, and a complete edge set based on the initial graph data and the incremental graph data;

[0117] The sub-query creation module 503 is used to create n sub-queries according to the n edges contained in the preset sub-graph pattern; the first sub-query is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,Ni-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set;

[0118] The query module 504 is used to match a subgraph corresponding to a preset subgraph pattern from the updated graph data using n subqueries, the initial edge set, the incremental edge set and the complete edge set, and to determine transaction information matching the preset subgraph pattern using the subgraph.

[0119] Optionally, the device may further include:

[0120] The trigger module is used to obtain multiple preset sub-image modes from multiple triggers.

[0121] Optionally, the device may further include:

[0122] A trigger creation module, configured to create a trigger upon receiving sub-image pattern registration information, and write the preset sub-image pattern included in the sub-image pattern registration information into the newly created trigger;

[0123] The trigger deletion module is used to delete the trigger corresponding to the preset sub-image mode to be deleted when receiving the sub-image mode deletion information.

[0124] Optionally, the device may further include:

[0125] The information cleaning module is used to regularly remove expired information from existing transaction information.

[0126] Optionally, the query module 504 may include:

[0127] A point sequence generation submodule is used to sort the multiple points included in the preset subgraph pattern according to the target subquery to obtain a point sequence, so that the two endpoints included in the corresponding edge of D in the preset subgraph pattern in the target subquery are located at the first position in the point sequence; the target subquery is an unprocessed subquery in the n subqueries;

[0128] The query submodule is used to match the subgraph corresponding to the preset subgraph pattern in the target subquery from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set and the complete edge set.

[0129] Optionally, the point sequence generation submodule may include:

[0130] A first writing unit is configured to write two endpoints included in the corresponding edge of D in the target subquery in the preset subgraph pattern into the tail of the point sequence;

[0131] The second writing unit is configured to iteratively select the points with the largest number of neighbors in the point sequence for the remaining points except the endpoints in the preset sub-graph pattern and write them into the end of the point sequence.

[0132] Query submodule, specifically used for:

[0133] Determine the k+1th point to be matched in the point sequence, and determine the corresponding permutations of the first k points that have been matched in the point sequence k∈(1,n-1), a represents the edge in the preset subgraph pattern, Indicates the point in the updated graph data that matches the i-th point of the preset subgraph pattern, i∈(1,k);

[0134] For the edge to be matched in the preset subgraph pattern (a j ,a k+1 ),a j ∈{a1,…,a k}, use the target subquery to determine the edge to be matched (a j ,a k+1 ) in the initial edge set, incremental edge set and complete edge set, and the edge to be matched (a j ,a k+1 ) Match the target edge set to obtain the first point set that meets the requirements;

[0135] For the edge to be matched in the preset subgraph pattern (a k+1 ,a j ),a j ∈{a1,…,a k}, use the secret subquery to determine the edge to be matched (a k+1 ,a j ) in the initial edge set, incremental edge set and complete edge set, and the edge to be matched (a k+1 ,a j ) Match the target edge set to obtain a second point set that meets the requirements;

[0136] Use the first point set and the second point set to form the total point set, and calculate the Cartesian product of the total point set and p to obtain the arrangement of the first k+1 points in the matched point sequence;

[0137] When k is not equal to n-1, add 1 to k and proceed to the step of determining the k+1th point to be matched in the point sequence;

[0138] When k is equal to n-1, the subgraph determined by the target subquery according to the preset subgraph pattern is determined according to the arrangement of all points in the matched point sequence.

[0139] An embodiment of the present invention further provides an electronic device, including:

[0140] memory for storing computer programs;

[0141] A processor is used to implement the steps of the above-mentioned information matching method when executing a computer program.

[0142] Since the embodiments of the electronic device part correspond to the embodiments of the information matching method part, the embodiments of the electronic device part refer to the description of the embodiments of the information matching method part, which will not be repeated here.

[0143] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the information matching method of any of the above embodiments are implemented.

[0144] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the information matching method part, the embodiments of the storage medium part refer to the description of the embodiments of the information matching method part and are not repeated here.

[0145] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0146] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0147] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0148] The above is a detailed introduction to the information matching method, device, electronic device and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An information matching method, characterized in that: include: Convert new transaction information into incremental graph data; Adding the incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and dividing the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data; Create n subqueries based on the n edges contained in the preset subgraph pattern; the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set; A subgraph corresponding to the preset subgraph pattern is matched from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set, and transaction information matching the preset subgraph pattern is determined using the subgraph.

2. The information matching method according to claim 1, characterized in that: Before creating n subqueries based on the n edges included in the preset subgraph pattern, it also includes: A plurality of the preset sub-image patterns are obtained from a plurality of triggers.

3. The information matching method according to claim 2, characterized in that: Also includes: When receiving the sub-image mode registration information, creating a trigger, and writing the preset sub-image mode included in the sub-image mode registration information into the newly created trigger; When the sub-image mode deletion information is received, the trigger corresponding to the preset sub-image mode to be deleted is deleted.

4. The information matching method according to claim 1, characterized in that: Also includes: Periodically remove expired information from the existing transaction information.

5. The information matching method according to any one of claims 1 to 4, characterized in that: The matching of the subgraph corresponding to the preset subgraph pattern from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set includes: Sorting the plurality of points included in the preset subgraph pattern according to the target subquery to obtain a point sequence, such that the two endpoints included in the corresponding edge of D in the target subquery in the preset subgraph pattern are located at the first position of the point sequence; the target subquery is an unprocessed subquery in the n subqueries; The subgraph corresponding to the preset subgraph pattern in the target subquery is matched from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set, and the complete edge set.

6. The information matching method according to claim 5, characterized in that: The step of sorting the plurality of points included in the preset subgraph pattern according to the target subquery to obtain a point sequence includes: Writing the two endpoints of the corresponding edge of D in the target subquery in the preset subgraph pattern into the tail of the point sequence; For the remaining points in the preset subgraph pattern except the endpoints, iteratively select the points with the largest number of neighbors in the point sequence and write them into the end of the point sequence.

7. The information matching method according to claim 5, characterized in that: The step of matching the subgraph corresponding to the preset subgraph pattern in the target subquery from the updated graph data using the point sequence, the target subquery, the initial edge set, the incremental edge set, and the complete edge set includes: Determine the k+1th point to be matched in the point sequence, and determine the arrangement corresponding to the first k points that have been matched in the point sequence k∈(1,n-1), a represents an edge in the preset subgraph pattern, Indicates the point in the updated graph data that matches the i-th point of the preset subgraph pattern, i∈(1,k); For the edge to be matched in the preset subgraph pattern (a j ,a k+1 ),a j ∈{a1,…,a k }, use the target subquery to determine the edge to be matched (a j ,a k+1 ) in the target edge set corresponding to the initial edge set, the incremental edge set and the complete edge set, and the edge to be matched (a j ,a k+1 ) matching the target edge set to obtain a first point set that meets the requirements; For the edge to be matched in the preset subgraph pattern (a k+1 ,a j ),a j ∈{a1,…,a k }, use the target subquery to determine the edge to be matched (a k+1 ,a j ) in the target edge set corresponding to the initial edge set, the incremental edge set and the complete edge set, and the edge to be matched (a k+1 ,a j ) matching the target edge set to obtain a second point set that meets the requirements; Using the first point set and the second point set to form a total point set, and performing a Cartesian product calculation on the total point set and p to obtain a permutation of the first k+1 points in the matched point sequence; When k is not equal to n-1, add 1 to k and proceed to the step of determining the k+1th point to be matched in the point sequence; When k is equal to n-1, the subgraph determined by the target subquery in the preset subgraph pattern is determined according to the arrangement of all points in the matched point sequence.

8. An information matching device, characterized in that: include: The conversion module is used to convert the newly added transaction information into incremental graph data; An updating module, configured to add the incremental graph data to the initial graph data corresponding to the existing transaction information to obtain updated graph data, and to divide the updated graph data into an initial edge set, an incremental edge set, and a complete edge set according to the initial graph data and the incremental graph data; The subquery creation module is used to create n subqueries according to the n edges contained in the preset subgraph pattern; the first subquery is (D1, C2, C3, ..., C n ), the i-th subquery is (N1,…,N i-1 ,D i ,C i+1 ,…,C n ), i∈(2,n-1), the nth subquery is (N1,N2,N3,…,D n ), each position in the subquery corresponds to an edge in the preset subgraph pattern, C indicates that the corresponding edge in the preset subgraph pattern is matched in the initial edge set, D indicates that the corresponding edge in the preset subgraph pattern is matched in the incremental edge set, and N indicates that the corresponding edge in the preset subgraph pattern is matched in the complete edge set; A query module is configured to match a subgraph corresponding to the preset subgraph pattern from the updated graph data using the n subqueries, the initial edge set, the incremental edge set, and the complete edge set, and to determine transaction information matching the preset subgraph pattern using the subgraph.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the information matching method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the information matching method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Efficient method for subgraph pattern matching

    US20170169133A1

  • Query Generation Based On Merger Of Subqueries

    US20210034625A1