CN111784320B - Data association method and device and electronic equipment - Google Patents

Data association method and device and electronic equipment Download PDF

Info

Publication number
CN111784320B
CN111784320B CN202010732513.7A CN202010732513A CN111784320B CN 111784320 B CN111784320 B CN 111784320B CN 202010732513 A CN202010732513 A CN 202010732513A CN 111784320 B CN111784320 B CN 111784320B
Authority
CN
China
Prior art keywords
transaction data
asset
user
available
connected component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010732513.7A
Other languages
Chinese (zh)
Other versions
CN111784320A (en
Inventor
谭聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010732513.7A priority Critical patent/CN111784320B/en
Publication of CN111784320A publication Critical patent/CN111784320A/en
Application granted granted Critical
Publication of CN111784320B publication Critical patent/CN111784320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the specification provides a data association method, a data association device and electronic equipment, wherein in the data association method, after transaction data of a preset period of time are acquired, a directed graph corresponding to the preset period of time is constructed according to the transaction data of the preset period of time, then a maximum connected subgraph of the directed graph is acquired, the maximum connected subgraph is used as a connected component of the directed graph, the transaction data belonging to the same connected component in the preset period of time are acquired, and finally the transaction data belonging to the same connected component in the preset period of time are marked to mark a fund flow direction corresponding to the transaction data.

Description

Data association method and device and electronic equipment
[ technical field ] A method for producing a semiconductor device
The embodiment of the specification relates to the technical field of internet, in particular to a data association method and device and electronic equipment.
[ background ] A method for producing a semiconductor device
In the process of analyzing the fund service of a third-party service platform, some problems are often encountered, such as: a. the inflowing funds of the bank card finally flow to or stay in which accounts; b. after the capital flows for several times, the capital finally flows out of the third-party service platform and is brought back to the bank card; c. the fund is transferred more in which fund containers and which scenes; d. splitting the fund flow rotation speed, refining the fund flow rotation speed to a specific scene, and excavating opportunity points for improving the fund flow rotation speed; e. bankcards are subject to capital costs, how split between various business segments and/or products. Wherein, the fund container comprises a bank card, account balance or insurance and the like.
In the prior art, after the funds flow into a fund container of a third-party service platform, due to the indistinguishable funds, the outgoing funds of the fund container cannot be associated with the incoming funds, and the subsequent circulation of the funds in the fund container cannot be analyzed.
[ summary of the invention ]
The embodiment of the specification provides a data association method, a data association device and electronic equipment, so that the effect that the outflow fund in a third-party service platform is associated with the inflow fund can be achieved, and the circulation path of each fund in the third-party service platform can be tracked.
In a first aspect, an embodiment of the present specification provides a data association method, including: acquiring transaction data of a preset time period; constructing a directed graph corresponding to the preset time period according to the transaction data of the preset time period; acquiring a maximum connected subgraph of the directed graph, and taking the maximum connected subgraph as a connected component of the directed graph; acquiring transaction data belonging to the same connected component in the preset time period; marking the transaction data belonging to the same connected component in the preset time period so as to identify the fund flow direction corresponding to the transaction data.
In the data association method, after transaction data of a preset period of time are obtained, a directed graph corresponding to the preset period of time is constructed according to the transaction data of the preset period of time, then a maximum connected subgraph of the directed graph is obtained, the maximum connected subgraph is used as a connected component of the directed graph, the transaction data belonging to the same connected component in the preset period of time are obtained, and finally the transaction data belonging to the same connected component in the preset period of time are marked to mark the fund flow direction corresponding to the transaction data, so that the aim of associating the outgoing fund in a third-party service platform with the incoming fund can be achieved, and the circulation path of each fund in the third-party service platform can be tracked.
In one possible implementation manner, before the obtaining transaction data belonging to the same connected component in the predetermined period, the method further includes: associating the user identification in each transaction data of the preset time period with the identification of the connected component to which the transaction data belong; the user identification in each piece of transaction data comprises the user identification of a paying user and the user identification of a receiving user; the acquiring the transaction data belonging to the same connected component in the preset time period comprises: and acquiring the transaction data belonging to the same connected component in the preset time period according to the incidence relation between the identifier of the connected component and the user identifier.
In one possible implementation manner, after acquiring the transaction data of the predetermined period of time, the method further includes: segmenting the transaction data of the preset time period according to a preset time interval to obtain the transaction data included in each time segment; wherein the duration of each time slice is the preset time interval; the constructing of the directed graph corresponding to the predetermined period of time according to the transaction data of the predetermined period of time includes: and constructing a directed graph corresponding to each time slice according to the transaction data included in each time slice.
In one possible implementation manner, the constructing a directed graph corresponding to each time slice according to the transaction data included in each time slice includes: for each piece of transaction data in each time slice, acquiring a user identifier of a payee and a user identifier of a payer from the transaction data, and constructing a directed graph corresponding to each time slice by taking the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
In one possible implementation manner, the acquiring transaction data belonging to the same connected component in the predetermined period includes: and acquiring the transaction data belonging to the same connected component in each time slice.
In one possible implementation manner, the marking the transaction data belonging to the same connected component in the predetermined period of time to identify the fund flow corresponding to the transaction data includes: marking the transaction data belonging to the same connected component in each time slice so as to identify the fund flow direction corresponding to the transaction data.
In one possible implementation manner, the marking transaction data belonging to the same connected component in each time slice to identify a fund flow direction corresponding to the transaction data includes: traversing each transaction data belonging to the same connected component in each time slice; acquiring a user identifier of a payer and a user identifier of a payee from currently traversed transaction data, acquiring an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and acquiring the available asset list and the unavailable asset list of the payee according to the user identifier of the payee; if the available assets in the available asset list of the paying user exist, accumulating the available assets in the available asset list according to a preset time sequence until the total accumulated assets is equal to the payment amount of the paying user in the currently traversed transaction data; marking the accumulated available assets as unavailable and adding an identification of the accumulated available assets to a list of unavailable assets for the paying user; creating a sub-asset for each accumulated available asset, the parent node of the created sub-asset pointing to the corresponding accumulated available asset, and adding the identity of the sub-asset to the list of available assets of the receiving user; wherein the created sub-assets are equal in amount to the corresponding accumulated amount of available assets.
In one possible implementation manner, after acquiring the available asset list and the unavailable asset list of the payment user according to the user identifier of the payment user, and acquiring the available asset list and the unavailable asset list of the payment user according to the user identifier of the payment user, the method further includes: creating an initial asset and a sub-asset corresponding to the initial asset if there is no available asset in the list of available assets of the paying user; the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data; adding the identification of the initial asset to the list of unavailable assets for the paying user and adding the identification of the sub-asset corresponding to the initial asset to the list of available assets for the receiving user.
In a second aspect, an embodiment of the present specification provides an apparatus for associating data, including: the acquisition module is used for acquiring transaction data of a preset time period; the construction module is used for constructing a directed graph corresponding to the preset time period according to the transaction data of the preset time period; the obtaining module is further configured to obtain a maximum connected subgraph of the directed graph, and use the maximum connected subgraph as a connected component of the directed graph; acquiring transaction data belonging to the same connected component in the preset time period; and the marking module is used for marking the transaction data belonging to the same communication component in the preset time period so as to mark the fund flow direction corresponding to the transaction data.
In one possible implementation manner, the apparatus further includes: the association module is used for associating the user identifier in each transaction datum in the preset time period with the identifier of the connected component to which the transaction datum belongs before the acquisition module acquires the transaction data belonging to the same connected component in the preset time period; the user identification in each piece of transaction data comprises the user identification of a paying user and the user identification of a receiving user; the obtaining module is specifically configured to obtain the transaction data belonging to the same connected component in the predetermined period according to the association relationship between the identifier of the connected component and the user identifier.
In one possible implementation manner, the apparatus further includes: the segmentation module is used for segmenting the transaction data of the preset time period according to a preset time interval after the acquisition module acquires the transaction data of the preset time period to acquire the transaction data included in each time segment; wherein the duration of each time slice is the predetermined time interval; the construction module is specifically configured to construct a directed graph corresponding to each time slice according to the transaction data included in each time slice.
In one possible implementation manner, the constructing module is specifically configured to, for each transaction data in each time slice, obtain a user identifier of a payee and a user identifier of a payer from the transaction data, and construct a directed graph corresponding to each time slice with the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
In one possible implementation manner, the obtaining module is specifically configured to obtain transaction data belonging to the same connected component in each time slice.
In one possible implementation manner, the marking module is specifically configured to mark transaction data belonging to the same connected component in each time slice to identify a fund flow direction corresponding to the transaction data.
In one possible implementation manner, the marking module includes: the traversing submodule is used for traversing each transaction data belonging to the same connected component in each time slice; the acquisition submodule is used for acquiring a user identifier of a payer and a user identifier of a payee from currently traversed transaction data, acquiring an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and acquiring the available asset list and the unavailable asset list of the payee according to the user identifier of the payee; an accumulation submodule, configured to accumulate, when there is an available asset in the available asset list of the payer, the available assets in the available asset list according to a predetermined time sequence until a total amount of the accumulated assets is equal to a payment amount of the payer in the currently traversed transaction data; a marking submodule for marking the accumulated available assets as unavailable; an add sub-module for adding the identification of accumulated available assets to the list of unavailable assets for the paying user; the creating submodule is used for creating a child asset aiming at each accumulated available asset, and a parent node of the created child asset points to the corresponding accumulated available asset; wherein the created sub-assets are equal in money amount to the corresponding accumulated available assets; the add sub-module is further configured to add the identification of the sub-asset to the list of available assets of the checkout user.
In one possible implementation manner, the creating sub-module is further configured to create an initial asset and a sub-asset corresponding to the initial asset when there is no available asset in the available asset list of the payment user; wherein the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data; and the adding submodule is used for adding the identification of the initial asset into the unavailable asset list of the paying user and adding the identification of the sub-asset corresponding to the initial asset into the available asset list of the paying user.
In a third aspect, an embodiment of the present specification provides an electronic device, including: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, the processor being capable of executing the method provided by the first aspect when invoked by the processor.
In a fourth aspect, embodiments of the present specification provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method provided in the first aspect.
It should be understood that the second to fourth aspects of the embodiments in this specification are consistent with the technical solution of the first aspect of the embodiments in this specification, and similar beneficial effects are obtained in each aspect and the corresponding possible implementation manner, and are not described again.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present specification, the drawings required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present specification, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of one embodiment of a method for associating data of the present specification;
FIG. 2 is a flow chart of another embodiment of a method for associating data of the present specification;
FIG. 3 is a flow chart of yet another embodiment of a method for associating data of the present specification;
FIG. 4 is a schematic diagram of an embodiment of an apparatus for associating data of the present specification;
FIG. 5 is a schematic diagram of another embodiment of an apparatus for correlating data in the present specification;
fig. 6 is a schematic structural diagram of an embodiment of an electronic device in the present specification.
[ detailed description ] embodiments
For better understanding of the technical solutions in the present specification, the following detailed description of the embodiments of the present specification is provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only a few embodiments of the present specification, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The terminology used in the embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the specification. As used in the specification examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In the related art, after the funds are flowed into a fund container of a third-party service platform, because of the indistinguishable funds, the flowed-out funds of the fund container cannot be associated with the flowed-in funds, and the subsequent circulation of the fund container cannot be analyzed.
In order to be able to correlate the outgoing funds and the incoming funds of the fund container, the embodiments of the present specification introduce a certain business rule, for example, according to the sequence of funds flowing into the fund container, a first-in first-out rule or a last-in first-out rule is used for correlation, so as to correlate the outgoing funds and the incoming funds of the fund container one by one. Wherein the sequence of the funds flowing into the funds container may be determined according to the time of the funds flowing into the funds container.
Fig. 1 is a flowchart of an embodiment of a data association method in the present specification, and as shown in fig. 1, the data association method may include:
at step 102, transaction data for a predetermined period of time is acquired.
The preset time period may be set in a specific implementation, and the length of the preset time period is not limited in this embodiment, for example, the preset time period may be one day, and thus, the transaction data of the preset time period may include transaction data of a third-party service platform that performs a transaction within one day.
And 104, constructing a directed graph corresponding to the preset time period according to the transaction data of the preset time period.
Specifically, the user identifier of the payee and the user identifier of the payer may be extracted from each piece of transaction data in the predetermined period, and then the directed graph corresponding to the predetermined period may be constructed with the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
And 106, acquiring the maximum connected subgraph of the directed graph, and taking the maximum connected subgraph as the connected component of the directed graph.
The communication subgraph refers to that any pair of points (u, v) in one graph has a path from u to v, and a point between two communication subgraphs has no communication path.
In this embodiment, each connected component of the directed graph has a unique identifier.
And 108, acquiring the transaction data belonging to the same connected component in the preset time period.
And step 110, marking the transaction data belonging to the same connected component in the preset time period so as to identify the fund flow direction corresponding to the transaction data.
The marking of the transaction data is to simulate the inflow and outflow change of account funds, and associate the inflow funds with the outflow funds in each transaction data so as to identify the fund flow direction corresponding to the transaction data.
In the data association method, after transaction data of a preset period of time are obtained, a directed graph corresponding to the preset period of time is constructed according to the transaction data of the preset period of time, then a maximum connected subgraph of the directed graph is obtained, the maximum connected subgraph is used as a connected component of the directed graph, the transaction data belonging to the same connected component in the preset period of time are obtained, and finally the transaction data belonging to the same connected component in the preset period of time are marked to mark the fund flow direction corresponding to the transaction data, so that the aim of associating the outgoing fund in a third-party service platform with the incoming fund can be achieved, and the circulation path of each fund in the third-party service platform can be tracked.
Fig. 2 is a flowchart of another embodiment of a method for associating data in the present specification, as shown in fig. 2, in the embodiment shown in fig. 1 of the present application, before step 108, the method may further include:
step 202, associating the user identifier in each transaction data of the preset time period with the identifier of the connected component to which the transaction data belong; the user identifier in each transaction data includes a user identifier of a paying user and a user identifier of a receiving user.
Thus, step 108 may be:
and 204, acquiring the transaction data belonging to the same connected component in the preset time period according to the incidence relation between the identification of the connected component and the user identification.
That is to say, in a specific implementation, after the connected component of the directed graph is obtained, the user identifier of the payer and the user identifier of the payee in each piece of transaction data of the predetermined period may be associated with the identifier of the connected component to which the transaction data belongs, and then the transaction data belonging to the same connected component in the predetermined period may be obtained according to the association relationship between the identifier of the connected component and the user identifier.
Fig. 3 is a flowchart of a further embodiment of a method for associating data in this specification, as shown in fig. 3, in the embodiment shown in fig. 1 in this specification, after step 102, the method may further include:
step 302, segmenting the transaction data of the preset time period according to a preset time interval, and obtaining the transaction data included in each time segment; wherein, the duration of each time slice is the preset time interval.
In this embodiment, the predetermined time interval may be set according to system performance and/or implementation requirements during specific implementation, and the size of the predetermined time interval is not limited in this embodiment, for example, the predetermined time interval may be 1 hour.
After the transactional data is sliced, step 104 may be:
step 304, constructing a directed graph corresponding to each time slice according to the transaction data included in each time slice.
That is, after segmenting transaction data of a predetermined period of time at predetermined time intervals, a directed graph corresponding to each time slice may be constructed from the transaction data included in each time slice.
Specifically, constructing a directed graph corresponding to each time slice according to the transaction data included in each time slice may be: for each piece of transaction data in each time slice, acquiring a user identifier of a payee and a user identifier of a payer from the transaction data, and constructing a directed graph corresponding to each time slice by taking the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
Thus, step 108 may be:
step 306, obtaining the transaction data belonging to the same connected component in each time slice.
Thus, step 110 may include:
step 308, traverse each transaction data belonging to the same connected component in each time slice.
Specifically, the transaction data belonging to the same connected component in each time slice may be sorted according to the payment time, for example, the transaction data may be sorted in an ascending order of the payment time, or in a descending order of the payment time.
And 310, acquiring a user identifier of a payer and a user identifier of a payee from the currently traversed transaction data, acquiring an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and acquiring an available asset list and an unavailable asset list of the payee according to the user identifier of the payee. Then, step 312 or step 318 is executed.
In this embodiment, each piece of transaction data may include the following information:
1) other additional transaction information such as user identification (layer _ user _ id) of the payer, payment account type (account type), user identification (layer _ user _ id) of the payee, payment account type, payment time pay _ date, payment amount (amount) and transaction identification (identifier, id);
2) a list of available assets and a list of unavailable assets for the payment user;
3) a list of available assets and a list of unavailable assets for the payee.
The assets in the available asset list are arranged according to the descending order of the collection time, namely the closer the collection time of the assets is to the current moment, the more the assets are arranged in the available asset list.
And 312, if the available assets in the available asset list of the paying user exist, accumulating the available assets in the available asset list according to a preset time sequence until the total accumulated assets amount is equal to the payment amount of the paying user in the currently traversed transaction data.
Specifically, since the assets in the available asset list are arranged in descending order of collection time, the predetermined time sequence may be arranged in descending order of collection time, that is, the embodiment associates the incoming funds with each outgoing fund according to a last-in first-out rule.
The accumulated available assets are marked as unavailable and an identification of the accumulated available assets is added to the list of unavailable assets for the paying user, step 314.
Step 316, creating a sub-asset for each accumulated available asset, wherein the parent node of the created sub-asset points to the corresponding accumulated available asset, and adding the identifier of the sub-asset to the available asset list of the payee; wherein the created sub-assets are equal in monetary amount to the corresponding accumulated available assets.
Step 318, if there is no available asset in the available asset list of the payment user, creating an initial asset and a sub-asset corresponding to the initial asset; the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data.
And 320, adding the identification of the initial asset to the unavailable asset list of the paying user, and adding the identification of the sub-asset corresponding to the initial asset to the available asset list of the paying user.
In this embodiment, the time slices are marked, after the marking of the transaction data in one time slice is completed, the available asset list and the unavailable asset list of the paying user and the available asset list and the unavailable asset list of the collecting user are output, and then when the marking of the transaction data in the next time slice of the time slice is performed, the available asset list and the unavailable asset list output by the time slice are used as the input of the next time slice.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Fig. 4 is a schematic structural diagram of an embodiment of an apparatus for associating data in the present specification, and as shown in fig. 4, the apparatus for associating data may include: an acquisition module 41, a construction module 42 and a marking module 43;
the acquiring module 41 is configured to acquire transaction data of a predetermined time period;
a construction module 42, configured to construct a directed graph corresponding to the predetermined period according to the transaction data of the predetermined period;
the obtaining module 41 is further configured to obtain a maximum connected subgraph of the directed graph, and use the maximum connected subgraph as a connected component of the directed graph; acquiring transaction data belonging to the same connected component in the preset time period;
and the marking module 43 is configured to mark the transaction data belonging to the same connected component in the predetermined period to identify a fund flow direction corresponding to the transaction data.
The data association apparatus provided in the embodiment shown in fig. 4 may be used to implement the technical solution of the method embodiment shown in fig. 1 in this specification, and reference may be further made to the relevant description in the method embodiment for implementation principle and technical effect.
Fig. 5 is a schematic structural diagram of another embodiment of the data association apparatus in the present specification, and compared with the data association apparatus shown in fig. 4, the difference is that the data association apparatus shown in fig. 5 may further include: an association module 44;
an associating module 44, configured to associate, before the obtaining module 41 obtains the transaction data belonging to the same connected component in the predetermined period, the user identifier in each piece of transaction data in the predetermined period with the identifier of the connected component to which the transaction data belongs; the user identification in each piece of transaction data comprises the user identification of a paying user and the user identification of a receiving user;
in this way, the obtaining module 41 is specifically configured to obtain the transaction data belonging to the same connected component in the predetermined period according to the association relationship between the identifier of the connected component and the user identifier.
Further, the above apparatus may further include: a slicing module 45;
the segmentation module 45 is configured to segment the transaction data of the predetermined time period according to a predetermined time interval after the acquisition module 41 acquires the transaction data of the predetermined time period, so as to acquire the transaction data included in each time segment; wherein, the time length of each time slice is the preset time interval;
the constructing module 42 is specifically configured to construct a directed graph corresponding to each time slice according to the transaction data included in each time slice.
In this embodiment, the constructing module 42 is specifically configured to, for each piece of transaction data in each time slice, obtain a user identifier of a payee and a user identifier of a payer from the transaction data, and construct a directed graph corresponding to each time slice with the user identifier of the payer being an initial node and the user identifier of the payee being a target node.
In this embodiment, the obtaining module 41 is specifically configured to obtain transaction data belonging to the same connected component in each time slice.
In this way, the marking module 43 is specifically configured to mark the transaction data belonging to the same connected component in each time slice, so as to identify a fund flow direction corresponding to the transaction data.
Among them, the marking module 43 may include: traversing sub-module 431, obtaining sub-module 432, accumulating sub-module 433, marking sub-module 434, adding sub-module 435 and creating sub-module 436;
the traversal submodule 431 is used for traversing each transaction data belonging to the same connected component in each time slice;
an obtaining submodule 432, configured to obtain a user identifier of a payer and a user identifier of a payee from currently traversed transaction data, obtain an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and obtain an available asset list and an unavailable asset list of the payee according to the user identifier of the payee;
an accumulation submodule 433, configured to, when there is an available asset in the available asset list of the payer, accumulate the available assets in the available asset list according to a predetermined time sequence until a total amount of the accumulated assets is equal to a payment amount of the payer in the currently traversed transaction data;
a marking sub-module 434 for marking the accumulated available assets as unavailable;
an add sub-module 435 for adding the accumulated identification of available assets to the list of unavailable assets for the payer;
a creating submodule 436, configured to create a child asset for each accumulated available asset, where a parent node of the created child asset points to the corresponding accumulated available asset; wherein the created sub-assets are equal in money amount to the corresponding accumulated available assets;
the add sub-module 435 is further configured to add the identification of the sub-asset to the list of available assets of the recipient user.
In addition, the creating sub-module 436 is further configured to create an initial asset and a sub-asset corresponding to the initial asset when there is no available asset in the available asset list of the payment user; wherein the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data;
an add sub-module 435, configured to add the identifier of the initial asset to the list of unavailable assets of the paying user, and add the identifier of the sub-asset corresponding to the initial asset to the list of available assets of the receiving user.
The data association apparatus provided in the embodiment shown in fig. 5 may be used to implement the technical solutions of the method embodiments shown in fig. 1 to fig. 3 in this specification, and the implementation principles and technical effects of the data association apparatus may further refer to the related descriptions in the method embodiments.
FIG. 6 is a schematic block diagram of an embodiment of an electronic device according to the present disclosure, which may include at least one processor, as shown in FIG. 6; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method for associating data provided by the embodiments shown in fig. 1 to 3 in the present specification.
The electronic device may be a server, for example: the cloud server, the form of the electronic device is not limited in this embodiment; in an embodiment of this specification, the server is a server used by a third-party service platform.
FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present specification. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present specification.
As shown in fig. 6, the electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: one or more processors 410, a communication interface 420, a memory 430, and a communication bus 440 that connects the various components (including the memory 430, the communication interface 420, and the processing unit 410).
Communication bus 440 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus architectures. For example, communication bus 440 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a micro channel architecture (MAC) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic devices typically include a variety of computer system readable media. Such media may be any available media that is accessible by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 430 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory. Memory 430 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of the embodiments described herein with respect to fig. 1-3.
A program/utility having a set (at least one) of program modules, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in memory 430, each of which examples or some combination may include an implementation of a network environment. The program modules generally perform the functions and/or methods of the embodiments described in fig. 1-3 herein.
The processor 410 executes programs stored in the memory 430 to execute various functional applications and data processing, for example, to implement the data association method provided by the embodiments shown in fig. 1 to 3 in the present specification.
The embodiments of the present specification provide a non-transitory computer readable storage medium, which stores computer instructions, the computer instructions causing the computer to execute the method for associating data provided by the embodiments shown in fig. 1 to fig. 3 of the present specification.
The non-transitory computer readable storage medium described above may take any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM) or flash memory, an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present description may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present specification, "a plurality" means at least two, e.g., two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present description in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present description.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (a stated condition or event)" may be interpreted as "upon determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)", depending on the context.
It should be noted that the terminal referred to in the embodiments of the present specification may include, but is not limited to, a Personal Computer (PC), a Personal Digital Assistant (PDA), a wireless handheld device, a tablet computer (tablet computer), a mobile phone, an MP3 player, an MP4 player, and the like.
In the several embodiments provided in this specification, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present specification may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or the like.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (18)

1. A method of associating data, comprising:
acquiring transaction data of a preset time period;
constructing a directed graph corresponding to the preset time period according to the transaction data of the preset time period;
acquiring a maximum connected subgraph of the directed graph, and taking the maximum connected subgraph as a connected component of the directed graph;
acquiring transaction data belonging to the same connected component in the preset time period;
marking the transaction data belonging to the same connected component in the preset time period so as to identify the fund flow direction corresponding to the transaction data.
2. The method of claim 1, wherein prior to obtaining transaction data belonging to the same connected component in the predetermined period, further comprising:
associating the user identification in each transaction data of the preset time period with the identification of the connected component to which the transaction data belong; the user identification in each piece of transaction data comprises the user identification of a paying user and the user identification of a receiving user;
the acquiring the transaction data belonging to the same connected component in the preset time period comprises:
and acquiring the transaction data belonging to the same connected component in the preset time period according to the incidence relation between the identifier of the connected component and the user identifier.
3. The method according to claim 1 or 2, wherein after acquiring the transaction data for the predetermined period of time, further comprising:
segmenting the transaction data of the preset time period according to a preset time interval to obtain the transaction data included in each time segment; wherein the duration of each time slice is the preset time interval;
the constructing of the directed graph corresponding to the predetermined period of time according to the transaction data of the predetermined period of time includes:
and constructing a directed graph corresponding to each time slice according to the transaction data included in each time slice.
4. The method of claim 3, wherein said constructing a directed graph corresponding to each time slice from transaction data included in each time slice comprises:
for each piece of transaction data in each time slice, acquiring a user identifier of a payee and a user identifier of a payer from the transaction data, and constructing a directed graph corresponding to each time slice by taking the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
5. The method of claim 3, wherein the obtaining transaction data belonging to the same connected component in the predetermined period comprises:
and acquiring the transaction data belonging to the same connected component in each time slice.
6. The method of claim 5, wherein the marking transaction data belonging to the same connected component in the predetermined period of time to identify a flow of funds to which the transaction data corresponds comprises:
and marking the transaction data belonging to the same connected component in each time slice so as to identify the fund flow direction corresponding to the transaction data.
7. The method according to claim 6, wherein the marking of transaction data belonging to the same connected component in each time slice to identify a fund flow corresponding to the transaction data comprises:
traversing each transaction data belonging to the same connected component in each time slice;
acquiring a user identifier of a payer and a user identifier of a payee from currently traversed transaction data, acquiring an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and acquiring the available asset list and the unavailable asset list of the payee according to the user identifier of the payee;
if the available assets in the available asset list of the paying user exist, accumulating the available assets in the available asset list according to a preset time sequence until the total accumulated assets amount is equal to the payment amount of the paying user in the currently traversed transaction data;
marking the accumulated available assets as unavailable and adding an identification of the accumulated available assets to a list of unavailable assets for the payment user;
creating a sub-asset for each accumulated available asset, the parent node of the created sub-asset pointing to the corresponding accumulated available asset, and adding the identity of the sub-asset to the list of available assets of the receiving user; wherein the created sub-assets are equal in amount to the corresponding accumulated amount of available assets.
8. The method as claimed in claim 7, wherein the obtaining of the available asset list and the unavailable asset list of the paying user according to the user identification of the paying user, and the obtaining of the available asset list and the unavailable asset list of the receiving user according to the user identification of the receiving user further comprises:
creating an initial asset and a sub-asset corresponding to the initial asset if there is no available asset in the list of available assets of the paying user; the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data;
adding the identification of the initial asset to the list of unavailable assets for the paying user and adding the identification of the sub-asset corresponding to the initial asset to the list of available assets for the receiving user.
9. An apparatus for associating data, comprising:
the acquisition module is used for acquiring transaction data of a preset time period;
the construction module is used for constructing a directed graph corresponding to the preset time period according to the transaction data of the preset time period;
the obtaining module is further configured to obtain a maximum connected subgraph of the directed graph, and use the maximum connected subgraph as a connected component of the directed graph; acquiring transaction data belonging to the same connected component in the preset time period;
and the marking module is used for marking the transaction data belonging to the same connected component in the preset time period so as to mark the fund flow direction corresponding to the transaction data.
10. The apparatus of claim 9, further comprising:
the association module is used for associating the user identifier in each transaction data of the preset time period with the identifier of the connected component to which the transaction data belong before the acquisition module acquires the transaction data belonging to the same connected component in the preset time period; the user identification in each piece of transaction data comprises the user identification of a paying user and the user identification of a receiving user;
the obtaining module is specifically configured to obtain the transaction data belonging to the same connected component in the predetermined period according to the association relationship between the identifier of the connected component and the user identifier.
11. The apparatus of claim 9 or 10, further comprising:
the segmentation module is used for segmenting the transaction data of the preset time period according to a preset time interval after the acquisition module acquires the transaction data of the preset time period, so as to acquire the transaction data included in each time segment; wherein the duration of each time slice is the predetermined time interval;
the construction module is specifically configured to construct a directed graph corresponding to each time slice according to transaction data included in each time slice.
12. The apparatus of claim 11, wherein,
the construction module is specifically configured to, for each piece of transaction data in each time slice, obtain a user identifier of a payee and a user identifier of a payer from the transaction data, and construct a directed graph corresponding to each time slice with the user identifier of the payer as an initial node and the user identifier of the payee as a target node.
13. The apparatus of claim 11, wherein,
the acquisition module is specifically configured to acquire transaction data belonging to the same connected component in each time slice.
14. The apparatus of claim 13, wherein,
the marking module is specifically used for marking the transaction data belonging to the same connected component in each time slice so as to identify the fund flow direction corresponding to the transaction data.
15. The apparatus of claim 14, wherein the marking module comprises:
the traversing submodule is used for traversing each transaction data belonging to the same connected component in each time slice;
the acquisition submodule is used for acquiring a user identifier of a payer and a user identifier of a payee from the currently traversed transaction data, acquiring an available asset list and an unavailable asset list of the payer according to the user identifier of the payer, and acquiring the available asset list and the unavailable asset list of the payee according to the user identifier of the payee;
the accumulation submodule is used for accumulating the available assets in the available asset list according to a preset time sequence when the available assets in the available asset list of the paying user exist, until the total amount of the assets obtained by accumulation is equal to the payment amount of the paying user in the currently traversed transaction data;
a marking submodule for marking the accumulated available assets as unavailable;
an add sub-module for adding an identification of accumulated available assets to the list of unavailable assets for the payment user;
the creating submodule is used for creating a child asset aiming at each accumulated available asset, and a parent node of the created child asset points to the corresponding accumulated available asset; wherein the created sub-assets are equal in money amount to the corresponding accumulated available assets;
the adding sub-module is further configured to add the identifier of the sub-asset to the list of available assets of the payee.
16. The apparatus of claim 15, wherein,
the creating sub-module is further used for creating an initial asset and a sub-asset corresponding to the initial asset when no available asset exists in the available asset list of the paying user; the state of the initial asset is unavailable, the state of the child asset corresponding to the initial asset is available, and the parent node of the child asset corresponding to the initial asset points to the initial asset; the sum of the initial asset is equal to the sum of the sub-asset corresponding to the initial asset, and is the payment sum of the paying user in the currently traversed transaction data;
and the adding submodule is used for adding the identification of the initial asset into the unavailable asset list of the paying user and adding the identification of the sub-asset corresponding to the initial asset into the available asset list of the paying user.
17. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor being capable of invoking the program instructions to perform the method of any of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the method of any one of claims 1 to 8.
CN202010732513.7A 2020-07-27 2020-07-27 Data association method and device and electronic equipment Active CN111784320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010732513.7A CN111784320B (en) 2020-07-27 2020-07-27 Data association method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010732513.7A CN111784320B (en) 2020-07-27 2020-07-27 Data association method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111784320A CN111784320A (en) 2020-10-16
CN111784320B true CN111784320B (en) 2022-07-26

Family

ID=72764140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010732513.7A Active CN111784320B (en) 2020-07-27 2020-07-27 Data association method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111784320B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868089A (en) * 2021-09-30 2021-12-31 中国建设银行股份有限公司 Transaction data processing method and device
CN114817968B (en) * 2022-06-29 2022-10-14 深圳红途科技有限公司 Method, device and equipment for tracing path of featureless data and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815290A (en) * 2016-12-07 2017-06-09 ***股份有限公司 A kind of determination method and device of the bank card ownership excavated based on figure
CN109741173A (en) * 2018-12-27 2019-05-10 深圳前海微众银行股份有限公司 Recognition methods, device, equipment and the computer storage medium of suspicious money laundering clique
CN110019324A (en) * 2017-12-06 2019-07-16 航天信息股份有限公司 A kind of method and system generating taxpayer's fund circuit
CN110175916A (en) * 2019-04-26 2019-08-27 阿里巴巴集团控股有限公司 Cash flow checking method and device
CN110399533A (en) * 2019-07-29 2019-11-01 中国工商银行股份有限公司 Funds flow querying method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3287970A1 (en) * 2016-08-24 2018-02-28 Mastercard International Incorporated Method and system for effecting a pre-paid redeemable transaction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815290A (en) * 2016-12-07 2017-06-09 ***股份有限公司 A kind of determination method and device of the bank card ownership excavated based on figure
CN110019324A (en) * 2017-12-06 2019-07-16 航天信息股份有限公司 A kind of method and system generating taxpayer's fund circuit
CN109741173A (en) * 2018-12-27 2019-05-10 深圳前海微众银行股份有限公司 Recognition methods, device, equipment and the computer storage medium of suspicious money laundering clique
CN110175916A (en) * 2019-04-26 2019-08-27 阿里巴巴集团控股有限公司 Cash flow checking method and device
CN110399533A (en) * 2019-07-29 2019-11-01 中国工商银行股份有限公司 Funds flow querying method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
异常跨境外汇关联交易识别方法及实证检验;季云华;《南方金融》;20181012;全文 *
资金数据可视化分析的应用探索;程科;《江西警察学院学报》;20200331;全文 *
银行账户交易网络中特定组织发现研究;吕芳;《网络与信息安全学报》;20200530;全文 *

Also Published As

Publication number Publication date
CN111784320A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN111784320B (en) Data association method and device and electronic equipment
CN110633991A (en) Risk identification method and device and electronic equipment
US9535689B2 (en) Source control management system with contingent dependency handling
CN110781971B (en) Merchant type identification method, device, equipment and readable medium
CN113269547A (en) Data processing method and device, electronic equipment and storage medium
CN113205402A (en) Account checking method and device, electronic equipment and computer readable medium
TW201911180A (en) Method and device for evaluating goods
US10452847B2 (en) System call vectorization
CN115242731A (en) Message processing method, device, equipment and storage medium
CN110928914A (en) Method and apparatus for outputting information
CN113870028A (en) Method and device for associating funds and electronic equipment
CN111105238A (en) Transaction risk control method and device
CN109120509B (en) Information collection method and device
CN111241180A (en) Information processing method, device, equipment and storage medium
CN111324732B (en) Model training method, text processing device and electronic equipment
CN114549013A (en) Face brushing payment method and device and face brushing equipment
CN111784346A (en) User interception method and device based on unmanned selling equipment and server
CN111967767A (en) Business risk identification method, device, equipment and medium
CN113127689B (en) Data processing method, device, equipment and storage medium
CN116775478A (en) Service release method and device and electronic equipment
CN114926275A (en) Transaction data accounting method and device and electronic equipment
US20210166056A1 (en) Object recognition with dynamic switching of visual recognition processes using an image capturing device
CN117689429A (en) Rate verification method, device, equipment and medium
CN106447486B (en) Method and device for acquiring bank card account opening time
CN115619390A (en) Method and device for improving fund account arrival time efficiency and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant