Resource transfer information detection method and apparatus, device, and storage medium
Abstract
A resource transfer information detection method and apparatus are provided. In a process of performing resource transfer path search on a resource transfer relationship graph, a current search node, a reference node that points to the current search node and that is in a current resource transfer path, and a candidate node that the current search node points to and that is in the resource transfer relationship graph are determined. A first resource transfer time is obtained between the current search node and the reference node and a second resource transfer time between the current search node and the candidate node is obtained. When the first resource transfer time and the second resource transfer time satisfy a time difference condition, the candidate node is added to the current resource transfer path to detect a target resource transfer path.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1 . A resource transfer information detection method performed by a computer device, comprising:
obtaining a resource transfer identifier set comprising a plurality of resource transfer identifiers; obtaining a resource transfer identifier pair corresponding to the resource transfer identifier set; determining a resource transfer direction corresponding to the resource transfer identifier pair, wherein
each resource transfer identifier pair includes two resource transfer identifiers with a resource transfer relationship in the resource transfer identifier set;
determining a resource transfer identifier in the resource transfer identifier set as a node in a resource transfer relationship graph; performing directed edge connection on nodes corresponding to the resource transfer identifier pair according to the resource transfer direction to obtain the resource transfer relationship graph; determining, in a process of performing resource transfer path search on the resource transfer relationship graph, a current search node in a current resource transfer path that is currently found; determining a node that points to the current search node and that is in the current resource transfer path as a reference node; determining a node that the current search node points to and that is in the resource transfer relationship graph as a candidate node; determining a first resource transfer time between the current search node and the reference node and a second resource transfer time between the current search node and the candidate node; and adding, when the first resource transfer time and the second resource transfer time satisfy a time difference condition, the candidate node to the current resource transfer path to detect a target resource transfer path, wherein
the time difference condition is a time difference condition of flowing of a target resource from the reference node sequentially to the current search node and the candidate node.
2 . The method according to claim 1 , wherein the determining the first resource transfer time between the current search node and the reference node comprises:
obtaining a resource transfer record set between the current search node and the reference node, wherein
the resource transfer record set comprises a plurality of resource transfer records;
obtaining resource transfer time and a resource transfer value in each resource transfer record; determining a time weight corresponding to the resource transfer time based on the resource transfer value, the time weight is in positive correlation with the resource transfer value; and performing weighted calculation on the resource transfer time in the resource transfer record set based on the time weight corresponding to the resource transfer time to obtain the first resource transfer time between the current search node and the reference node.
3 . The method according to claim 2 , wherein the determining the time weight corresponding to the resource transfer time based on the resource transfer value comprises:
summing resource transfer values in the resource transfer record set to obtain a resource transfer statistical value; calculating a ratio of the resource transfer value to the resource transfer statistical value; and determining the ratio as the time weight corresponding to the resource transfer time.
4 . The method according to claim 1 , wherein
the first resource transfer time is first last resource transfer time from the reference node to the current search node; the second resource transfer time is second initial resource transfer time from the current search node to the candidate node; and the determining that the first resource transfer time and the second resource transfer time satisfy a time difference condition comprises:
determining a time sequence between the first last resource transfer time and the second initial resource transfer time; and
determining, when the time sequence indicates that the first last resource transfer time is earlier than the second initial resource transfer time, that the first resource transfer time and the second resource transfer time satisfy the time difference condition.
5 . The method according to claim 4 , further comprising:
obtaining a first time difference value between the first last resource transfer time and the second initial resource transfer time such that the time sequence indicates that the first last resource transfer time is later than the second initial resource transfer time; obtaining first initial resource transfer time from the reference node to the current search node; obtaining second last resource transfer time from the current search node to the candidate node; obtaining a second time difference value between the second last resource transfer time and the first initial resource transfer time; calculating a time ratio between the first time difference value and the second time difference value; and determining, when the time ratio is less than a preset ratio threshold, that the first resource transfer time and the second resource transfer time satisfy the time difference condition.
6 . The method according to claim 1 , wherein the adding, when the first resource transfer time and the second resource transfer time satisfy a time difference condition, the candidate node to the current resource transfer path to detect a target resource transfer path comprises:
obtaining a first resource transfer amount from the reference node to the current search node and a second resource transfer amount from the current search node to the candidate node; and adding, when the first resource transfer time and the second resource transfer time satisfy the time difference condition and a resource amount difference between the first resource transfer amount and the second resource transfer amount is less than a preset amount difference, the candidate node to the current resource transfer path to detect the target resource transfer path.
7 . The method according to claim 6 , wherein the determining of the resource amount difference between the first resource transfer amount and the second resource transfer amount comprises:
calculating a resource amount ratio between the first resource transfer amount and the second resource transfer amount; determining the resource amount ratio as the resource amount difference; and the determining that the resource amount difference between the first resource transfer amount and the second resource transfer amount is less than a preset amount difference comprises:
determining, when the resource amount ratio is greater than a first threshold and less than a second threshold, that the resource amount difference between the first resource transfer amount and the second resource transfer amount is less than the preset amount difference, the first threshold is less than 1, and the second threshold is greater than 1.
8 . The method according to claim 1 , wherein the adding, when the first resource transfer time and the second resource transfer time satisfy a time difference condition, the candidate node to the current resource transfer path comprises:
obtaining a path attribute identifier corresponding to the candidate node when the first resource transfer time and the second resource transfer time satisfy the time difference condition, wherein
the path attribute identifier is added to a node for which there are a plurality of incoming edges in an existing target resource transfer path, and
the path attribute identifier is used for identifying a sub-path starting from the node for which there are the plurality of incoming edges in the existing target resource transfer path;
obtaining, based on the path attribute identifier, a sub-path starting from the candidate node; and concatenating the sub-path to the current resource transfer path to detect the target resource transfer path.
9 . The method according to claim 1 , further comprising:
determining a node satisfying a preset starting node condition in nodes in the resource transfer relationship graph as a starting node of the current resource transfer path, wherein the preset starting node condition comprises at least one of the following conditions:
an out-degree of the node is greater than 0, and
an in-degree of the node is less than or equal to a preset threshold; and
a ratio of a total resource transfer-in amount of the node to a total resource transfer-out amount of the node is less than a preset ratio.
10 . The method according to claim 9 , wherein the determining the current search node in the current resource transfer path that is currently found comprises:
forming, when a resource transfer amount from the starting node to a node that the starting node points to is greater than or equal to a resource transfer amount threshold, the current resource transfer path based on the starting node and the node that the starting node points to; and determining the node that the starting node points to as the current search node.
11 . A resource transfer information detection apparatus, comprising:
an identifier set obtaining module configured to obtain a resource transfer identifier set, wherein
the resource transfer identifier set comprises a plurality of resource transfer identifiers;
a transfer direction determining module configured to:
obtain a resource transfer identifier pair corresponding to the resource transfer identifier set, and
determine a resource transfer direction corresponding to the resource transfer identifier pair, wherein
each resource transfer identifier pair comprises two resource transfer identifiers with a resource transfer relationship in the resource transfer identifier set;
a relationship graph obtaining module configured to:
determine a resource transfer identifier in the resource transfer identifier set as a node in a resource transfer relationship graph, and
perform directed edge connection on nodes corresponding to the resource transfer identifier pair according to the resource transfer direction to obtain the resource transfer relationship graph;
a node determining module configured to:
determine, in a process of performing resource transfer path search on the resource transfer relationship graph, a current search node in a current resource transfer path that is currently found,
determine a node that points to the current search node and that is in the current resource transfer path as a reference node, and
determine a node that the current search node points to and that is in the resource transfer relationship graph as a candidate node;
a time determining module configured to determine a first resource transfer time between the current search node and the reference node and a second resource transfer time between the current search node and the candidate node; and a node addition module configured to add, when the first resource transfer time and the second resource transfer time satisfy a time difference condition, the candidate node to the current resource transfer path to detect a target resource transfer path, the time difference condition is a time difference condition of flowing of a target resource from the reference node sequentially to the current search node and the candidate node.
12 . The apparatus according to claim 11 , wherein the time determining module is further configured to:
obtain a resource transfer record set between the current search node and the reference node, wherein
the resource transfer record set comprises a plurality of resource transfer records;
obtain resource transfer time and a resource transfer value in each resource transfer record; determine a time weight corresponding to the resource transfer time based on the resource transfer value, wherein
the time weight is in positive correlation with the resource transfer value; and
perform weighted calculation on the resource transfer time in the resource transfer record set based on the time weight corresponding to the resource transfer time to obtain the first resource transfer time between the current search node and the reference node.
13 . The apparatus according to claim 11 , wherein the time determining module is further configured to:
sum resource transfer values in the resource transfer record set to obtain a resource transfer statistical value; and calculate a ratio of the resource transfer value to the resource transfer statistical value, and determine the ratio as a time weight corresponding to the resource transfer time.
14 . The apparatus according to claim 11 , wherein
the first resource transfer time is first last resource transfer time from the reference node to the current search node, the second resource transfer time is second initial resource transfer time from the current search node to the candidate node, and the node addition module is further configured to:
determine a time sequence between the first last resource transfer time and the second initial resource transfer time, and
determine, when the time sequence indicates that the first last resource transfer time is earlier than the second initial resource transfer time, that the first resource transfer time and the second resource transfer time satisfy the time difference condition.
15 . The apparatus according to claim 14 , wherein the node addition module is further configured to:
obtain a first time difference value between the first last resource transfer time and the second initial resource transfer time when the time sequence indicates that the first last resource transfer time is later than the second initial resource transfer time; obtain first initial resource transfer time from the reference node to the current search node; obtain second last resource transfer time from the current search node to the candidate node; obtain a second time difference value between the second last resource transfer time and the first initial resource transfer time; calculate a time ratio between the first time difference value and the second time difference value; and determine, when the time ratio is less than a preset ratio threshold, that the first resource transfer time and the second resource transfer time satisfy the time difference condition.
16 . The apparatus according to claim 11 , wherein the node addition module is further configured to:
obtain a first resource transfer amount from the reference node to the current search node and a second resource transfer amount from the current search node to the candidate node; and add, when the first resource transfer time and the second resource transfer time satisfy the time difference condition and a resource amount difference between the first resource transfer amount and the second resource transfer amount is less than a preset amount difference, the candidate node to the current resource transfer path to detect the target resource transfer path.
17 . The apparatus according claim 11 , wherein the node determining module is further configured to:
determine a node satisfying a preset starting node condition in nodes in the resource transfer relationship graph as a starting node of the current resource transfer path, wherein
the preset starting node condition comprises at least one of the following conditions:
an out-degree of the node is greater than 0, and
an in-degree of the node is less than or equal to a preset threshold; and
a ratio of a total resource transfer-in amount of the node to a total resource transfer-out amount of the node is less than a preset ratio.
18 . A computer device, comprising a memory and a processor, the memory storing computer-readable instructions executable by the processor to configure the processor to implement the method according to claim 1 .
19 . A non-transitory computer-readable storage medium, the computer-readable storage medium storing computer-readable instructions executable by a processor to configure the processor to implement the method according to claim 1 .Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.