Merchant recommendation method, device, equipment and computer readable storage medium

By constructing a transaction network graph and determining weights based on transaction amount and frequency, the problem of low matching degree in merchant recommendations is solved, achieving higher matching degree and interpretability.

CN119722233BActive Publication Date: 2025-10-21CHINA UNIONPAY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411799330.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-10-21
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

In existing technologies, the matching degree between merchant recommendations and users is low, and the relationship between multiple users and multiple merchants cannot be fully considered, resulting in poor recommendation performance.

Method used

By constructing a first transaction network graph and a second transaction network graph based on merchant identifiers and user identifiers as nodes, the weights of the edges are determined using the target transaction amount and the number of transactions. Based on these weights, a set of users and a set of merchants whose user characteristics meet similar conditions are determined, and relevant merchants are recommended to users.

Benefits of technology

It improves the matching degree between merchants and users, and the recommendation results are more intuitive and have higher interpretability, fully taking into account the relationship between multiple users and merchants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722233B_ABST
    Figure CN119722233B_ABST
Patent Text Reader

Abstract

The application discloses a merchant recommendation method and device, equipment and a computer readable storage medium. Wherein, the method comprises: obtaining transaction information of a plurality of merchants in a target period, the transaction information comprising merchant identifier, user identifier, transaction frequency and target transaction amount; taking the merchant identifier and the user identifier as nodes, and constructing a first transaction network graph and a second transaction network graph based on the transaction information; determining a first weight of an edge in the first transaction network graph according to the target transaction amount, and determining a second weight of an edge in the second transaction network graph according to the transaction frequency; determining a user set in which the user features satisfy the user similarity condition in the first transaction network graph and the second transaction network graph, and a merchant set in which the merchants have ever transacted with the users in the user set based on the first weight and the second weight; and recommending the merchants in the merchant set to the users in the user set. According to the embodiment of the application, the matching degree between the recommended merchants and the users can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular relates to a merchant recommendation method, device, equipment and computer-readable storage medium. Background Art

[0002] With the rapid development of machine learning technology, statistical algorithms, machine learning algorithms or deep learning algorithms are currently used to analyze users' transaction behaviors to determine their transaction habits and then recommend merchants to them based on their transaction habits.

[0003] However, the matching degree between recommended merchants and users is still relatively low. Therefore, there is an urgent need for a merchant recommendation method that can improve the matching degree between recommended merchants and users. Summary of the Invention

[0004] The embodiments of the present application provide a merchant recommendation method, apparatus, device, computer-readable storage medium, and computer program product, which can improve the matching degree between recommended merchants and users.

[0005] In a first aspect, an embodiment of the present application provides a merchant recommendation method, the method comprising:

[0006] Acquiring transaction information of a plurality of merchants within a target period, the transaction information including merchant identifiers of the merchants, user identifiers of users transacting with the merchants, the number of transactions between the merchants and the users, and target transaction amounts;

[0007] Taking the merchant identifier and the user identifier as nodes, constructing a first transaction network graph and a second transaction network graph based on the transaction information;

[0008] Determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and determine a second weight of an edge in the second transaction network graph according to the number of transactions;

[0009] Based on the first weight and the second weight, determining a user set in the first transaction network graph and the second transaction network graph whose user characteristics meet the user similarity condition, and a merchant set that has transacted with the users in the user set;

[0010] Merchants in the merchant set are recommended to users in the user set.

[0011] In a second aspect, an embodiment of the present application provides a merchant recommendation device, the device comprising:

[0012] A first acquisition module is configured to acquire transaction information of multiple merchants within a target period, wherein the transaction information includes a merchant identifier of the merchant, a user identifier of a user who transacts with the merchant, a number of transactions between the merchant and the user, and a target transaction amount;

[0013] A construction module, configured to construct a first transaction network graph and a second transaction network graph based on the transaction information, using the merchant identifier and the user identifier as nodes;

[0014] a first determining module, configured to determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and to determine a second weight of an edge in the second transaction network graph according to the number of transactions;

[0015] a second determining module, configured to determine, based on the first weight and the second weight, a set of users whose user characteristics satisfy a user similarity condition in the first transaction network graph and the second transaction network graph, and a set of merchants that have transacted with users in the user set;

[0016] The first recommendation module is configured to recommend merchants in the merchant set to users in the user set.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0018] When the processor executes the computer program instructions, the method in any possible implementation method of the first aspect described above is implemented.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method of any possible implementation method in the first aspect described above is implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method as any possible implementation method in the first aspect above.

[0021] In the merchant recommendation method, apparatus, device, computer-readable storage medium, and computer program product of the embodiments of the present application, since the relationship between users and merchants is usually many-to-many, by using merchant identifiers and user identifiers as nodes and constructing a first transaction network diagram and a second transaction network diagram based on transaction information, compared to determining a one-dimensional vector or a two-dimensional matrix based on transaction information, it is possible to fully consider the association relationship between nodes when recommending merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining the first weight of the edge in the first transaction network diagram according to the target transaction amount, and determining the second weight of the edge in the second transaction network diagram according to the number of transactions, that is, by determining different transaction network diagrams based on different transaction dimensions (including transaction amount and number of transactions), it is possible to provide more dimensional reference information for subsequent recommended merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining, based on the first weight and the second weight, a set of users whose user characteristics meet the user similarity condition in the first transaction network graph and the second transaction network graph, as well as a set of merchants that have transacted with the users in the user set, that is, by jointly determining, based on transaction information in multiple transaction dimensions and the association relationships between multiple nodes, a set of users whose user characteristics meet the user similarity condition and a set of merchants that have transacted with the users in the user set in multiple transaction network graphs, the matching degree between the user set and the merchant set can be improved. In this way, by recommending merchants in the merchant set to users in the user set, the matching degree between the recommended merchants and the users can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 This is a flowchart of a merchant recommendation method provided in an embodiment of the present application;

[0024] Figure 2 is a schematic diagram of a first transaction network diagram provided in an embodiment of the present application;

[0025] Figure 3 is a schematic diagram of a second transaction network diagram provided in an embodiment of the present application;

[0026] Figure 4 This is a schematic diagram of a process for determining a user set and a merchant set in a first transaction network diagram and a second transaction network diagram provided by an embodiment of the present application;

[0027] Figure 5This is a flow chart of determining a target second community that meets community similarity conditions with a target first community, provided by an embodiment of the present application;

[0028] Figure 6 This is another flowchart of determining a target second community that meets community similarity conditions with a target first community, provided by an embodiment of the present application;

[0029] Figure 7 This is a flowchart of another merchant recommendation method provided in an embodiment of the present application;

[0030] Figure 8 This is a flow chart of recommending users to merchants provided by an embodiment of the present application;

[0031] Figure 9 This is a schematic diagram of the structure of a merchant recommendation system provided in an embodiment of the present application;

[0032] Figure 10 This is a structural diagram of a merchant recommendation device provided in an embodiment of the present application;

[0033] Figure 11 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.

[0035] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.

[0036] In addition, the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0037] The current merchant recommendation method usually involves first processing transaction data into a one-dimensional vector or two-dimensional matrix, and then analyzing and reasoning the one-dimensional vector or two-dimensional matrix through statistical algorithms, machine learning algorithms, or deep learning algorithms to determine the user's transaction habits, and then recommend merchants to the user based on the user's transaction habits.

[0038] In reality, the relationship between users and merchants is often many-to-many. That is, a user can shop at multiple merchants, and a merchant can have multiple users shop at the same merchant. Therefore, one-dimensional vectors and two-dimensional matrices often cannot fully describe the relationships between multiple users and merchants, failing to fully utilize existing data, resulting in a low match between recommended merchants and users. Therefore, when recommending merchants to users, it is crucial to fully consider the relationships between multiple users and merchants.

[0039] Graph is a universal language for describing and analyzing entities with interactive relationships. Graph computing is increasingly used in scenarios such as personalized recommendations, social networks, financial risk control, and network security. Therefore, the embodiment of the present application determines recommended merchants based on graph computing, and can fully consider the association relationship between multiple users and multiple merchants when recommending merchants, thereby making the recommendation results more intuitive and more explainable, and improving the matching degree between subsequent recommended merchants and users.

[0040] Based on this, in order to solve the problems of the prior art, the embodiments of the present application provide a merchant recommendation method, apparatus, device, computer-readable storage medium, and computer program product. The merchant recommendation method can be applied to scenarios where merchants are recommended to users.

[0041] The following first introduces the merchant recommendation method provided in the embodiment of the present application.

[0042] Figure 1 FIG1 shows a flow chart of a merchant recommendation method provided by an embodiment of the present application. The merchant recommendation method can be executed by a server and / or processor with computing capabilities. Figure 1 As shown, the merchant recommendation method provided in the embodiment of the present application includes the following steps:

[0043] S110. Acquire transaction information of multiple merchants within a target period, where the transaction information includes the merchant ID of the merchant, the user ID of the user who transacted with the merchant, the number of transactions between the merchant and the user, and the target transaction amount;

[0044] S120: Using the merchant identifier and the user identifier as nodes, construct a first transaction network graph and a second transaction network graph based on the transaction information;

[0045] S130: Determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and determine a second weight of an edge in the second transaction network graph according to the number of transactions;

[0046] S140: Determine, based on the first weight and the second weight, a set of users in the first transaction network graph and the second transaction network graph whose user characteristics meet the user similarity condition, and a set of merchants that have transacted with the users in the user set;

[0047] S150: Recommend merchants in the merchant set to users in the user set.

[0048] In the merchant recommendation method of the embodiment of the present application, since the relationship between users and merchants is usually many-to-many, by using merchant identifiers and user identifiers as nodes and constructing a first transaction network diagram and a second transaction network diagram based on transaction information, compared to determining a one-dimensional vector or a two-dimensional matrix based on transaction information, it is possible to fully consider the association relationship between nodes when recommending merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining the first weight of the edge in the first transaction network diagram according to the target transaction amount, and determining the second weight of the edge in the second transaction network diagram according to the number of transactions, that is, by determining different transaction network diagrams based on different transaction dimensions (including transaction amount and number of transactions), it is possible to provide more dimensional reference information for subsequent recommended merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining, based on the first weight and the second weight, a set of users whose user characteristics meet the user similarity condition in the first transaction network graph and the second transaction network graph, as well as a set of merchants that have transacted with the users in the user set, that is, by jointly determining, based on transaction information in multiple transaction dimensions and the association relationships between multiple nodes, a set of users whose user characteristics meet the user similarity condition and a set of merchants that have transacted with the users in the user set in multiple transaction network graphs, the matching degree between the user set and the merchant set can be improved. In this way, by recommending merchants in the merchant set to users in the user set, the matching degree between the recommended merchants and the users can be improved.

[0049] The specific implementation methods of the above steps are introduced below.

[0050] In some embodiments, in S110, multiple merchants may belong to the same business district. A merchant identifier may be used to uniquely identify a merchant. The merchant identifier may be a merchant number, or a merchant number obtained by serializing the merchant numbers corresponding to multiple merchants, which is not limited here. The merchant number may be, for example, recorded as Merchant 1, Merchant 2, ..., Merchant N, etc. In addition, a user identifier may be used to uniquely identify a user, and the user identifier may be a user's ID number, mobile phone number, etc., or a user number obtained by serializing the user's ID number or mobile phone number, which is not limited here. The user number may be, for example, recorded as User 1, User 2, ..., User M, etc.

[0051] Additionally, the target period can be a statistical period for transaction information. This can be six months, one year, two years, or the like. Each merchant can have multiple transaction records within the target period. By statistically analyzing multiple transaction records, transaction information such as the merchant's merchant ID, the user ID of the user transacting with the merchant, the number of transactions between the merchant and the user, and the target transaction amount can be determined. The target transaction amount can be any of the following: the maximum transaction amount, the total transaction amount, or the average transaction amount.

[0052] It should be noted that each merchant may have one or more merchant terminals, and each user may have one or more payment accounts. A user may pay a merchant's merchant terminal through a payment account to complete a transaction.

[0053] Based on this, in order to ensure the accuracy of transaction information, in some embodiments, the above S110 may specifically include:

[0054] For each merchant, do the following:

[0055] Obtaining transaction records of at least one merchant terminal within a target period, the transaction records including a merchant identifier of the merchant, a user identifier of a user transacting with the merchant, a transaction time between the merchant and the user, and a transaction amount;

[0056] Determining a transaction record corresponding to at least one merchant terminal as a transaction record corresponding to the merchant;

[0057] Based on the merchant ID and user ID, statistical analysis is performed on the transaction time and transaction amount to determine the number of transactions and target transaction amount between the merchant and the user;

[0058] Transaction information is determined based on the merchant ID, user ID, number of transactions, and target transaction amount.

[0059] Here, the transaction record may be a transaction record of a non-query verification transaction, that is, the transaction amount in the transaction record is not zero.

[0060] As an example, obtaining transaction records for at least one merchant terminal within a target period may specifically include: first obtaining transaction details for at least one merchant terminal within the target period, then extracting information such as the merchant's merchant ID, the user ID of the user transacting with the merchant, the transaction time and amount between the merchant and the user, and obtaining the transaction record. Furthermore, the transaction record may also include account information for the payment account used by the user during the transaction. For example, the transaction record may be recorded as: User 1, Merchant 1, 202403XX, 300.

[0061] For each merchant, when there are multiple merchant terminals, the transaction records corresponding to the multiple merchant terminals are the transaction records corresponding to the merchant.

[0062] In practice, a user and a merchant may transact multiple times, meaning the same merchant ID and user ID may appear in multiple transaction records. Therefore, for each merchant, by first identifying multiple target transaction records corresponding to the target user ID within the merchant's corresponding multiple transaction records, and then statistically analyzing the transaction times and amounts in these multiple target transaction records, the number of transactions and target transaction amounts between the merchant and the user corresponding to the target user ID can be determined. The target user ID can be any one of the multiple user IDs.

[0063] For example, if Merchant 1 and User 1 both have three transaction records, and the transaction times of these three transaction records are different, then the number of transactions between Merchant 1 and User 1 during the target period can be determined to be 3. Furthermore, the target transaction amount can be obtained by selecting the largest transaction amount among the three transaction records.

[0064] In this way, by identifying the transaction record corresponding to at least one merchant terminal as the transaction record corresponding to each merchant, a complete transaction record corresponding to the merchant can be obtained. By first statistically analyzing the transaction time and transaction amount based on the merchant ID and user ID for each merchant, determining the number of transactions and target transaction amount between the merchant and the user, and then determining the transaction information based on the merchant ID, user ID, number of transactions, and target transaction amount, the accuracy of the transaction information can be guaranteed.

[0065] In addition, as mentioned above, multiple merchants may belong to the same business district. Therefore, in order to ensure the comprehensiveness of the merchants, in some embodiments, before the above S110, the following steps may also be included:

[0066] Acquire multiple target merchant sets within the business district, where the multiple target merchant sets are determined through different merchant acquisition methods;

[0067] Multiple merchants are determined based on a union of multiple target merchant sets.

[0068] The embodiments of the present application do not limit the method for obtaining a merchant set, and any merchant set that can be obtained within a business district is within the protection scope of the present application.

[0069] In some embodiments, obtaining the target merchant set may specifically include:

[0070] Obtain identification information of the business district and the first address information of the merchant;

[0071] Determine the address keyword corresponding to the business district based on the correspondence between the identification information and the address keyword;

[0072] Determining a first target merchant including an address keyword in the first address information based on a fuzzy matching algorithm;

[0073] A target merchant set is determined based on the first target merchant.

[0074] Here, the business district may be an area range including multiple merchants. The identification information of the business district may be used to identify the business district. The identification information may be the name of the business district. Each business district may correspond to one or more address keywords. The business district may be identified by the one or more address keywords. Address keywords may include, for example, "xxx shopping center, x district, x city", "x road, x district, x province", etc. In addition, the first address information may include, for example, "x floor, xxx shopping center, x district, x city", "x number, x road, x district, x city, x province", etc. In this way, by fuzzy matching the address keyword and the first address information based on a fuzzy matching algorithm, it can be determined whether the first address information includes the address keyword. The fuzzy matching algorithm may be, for example, a regular expression. If the first address information includes the address keyword, the merchant corresponding to the first address information may be determined as the first target merchant. By repeating the above steps, multiple first target merchants can be obtained, and a target merchant set can be determined based on the multiple first target merchants.

[0075] In addition, in some embodiments, obtaining the target merchant set may specifically include:

[0076] Obtain the first latitude and longitude information of the business district and the second latitude and longitude information of the merchant;

[0077] Determining a target area on a map based on the first latitude and longitude information;

[0078] Determining a second target merchant within the target area on the map based on the second latitude and longitude information;

[0079] A target merchant set is determined according to the second target merchant.

[0080] Here, obtaining the first longitude and latitude information of a business district may include directly obtaining the first longitude and latitude information of the business district, or first obtaining the second address information of the business district and then determining the first longitude and latitude information based on the second address information. Similarly, obtaining the second longitude and latitude information of a merchant may include directly obtaining the second longitude and latitude information of the merchant, or first obtaining the first address information of the merchant and then determining the second longitude and latitude information based on the first address information.

[0081] Alternatively, the target area may be a polygonal area. If the second latitude and longitude information of a merchant is within the target area, the merchant may be determined as a second target merchant. Repeating the above steps may yield multiple second target merchants, and a target merchant set may be determined based on the multiple second target merchants.

[0082] Furthermore, when the target area is an irregular polygonal area, in order to determine whether the second longitude and latitude information is located within the target area, in some embodiments, determining the second target merchant within the target area on the map based on the second longitude and latitude information may specifically include:

[0083] Get the latitude and longitude information of the leftmost point in the target area, the rightmost point, the highest point in the target area, and the lowest point in the target area on the map;

[0084] Expand the target area into a rectangle based on the latitude and longitude information of the leftmost point, the rightmost point, the highest point, and the lowest point in the target area;

[0085] Determine whether the second latitude and longitude information is within the rectangle;

[0086] If yes, continue to determine whether the second longitude and latitude information is within the target area based on the ray method;

[0087] If so, the merchant corresponding to the second latitude and longitude information is determined as the second target merchant.

[0088] The embodiment of the present application obtains a target merchant set in a business district through multiple merchant acquisition methods, and then takes a union of multiple target merchant sets to obtain multiple merchants in the business district, which can ensure the comprehensiveness of the acquired merchants.

[0089] In some embodiments, in S120, the transaction information may indicate whether a transaction has occurred between the merchant and the user. If the target transaction amount in the transaction information is not zero, it can be determined that a transaction has occurred between the merchant and the user. If a transaction has occurred between the merchant and the user, the merchant identifier and the user identifier can be connected to form an edge. In this way, by using the merchant identifier and the user identifier as nodes and constructing an edge between the user identifier and the merchant identifier where the transaction occurred, a first transaction network graph and a second transaction network graph can be obtained. The structures of the first transaction network graph and the second transaction network graph can be identical.

[0090] In some embodiments, in S130, the weight of the edge in the first transaction network graph may be a first weight, which may be determined based on the target transaction amount. The weight of the edge in the second transaction network graph may be a second weight, which may be determined based on the number of transactions.

[0091] For example, if the target transaction amount of user 1 in merchant 1 is 100, the first weight of the edge between user 1 and merchant 1 in the first transaction network graph can be determined as 100; if the number of transactions between user 1 and merchant 1 is 3, the second weight of the edge between user 1 and merchant 1 in the second transaction network graph can be determined as 3.

[0092] If the first weight is recorded as w1, the schematic diagram of a first transaction network diagram provided in the embodiment of the present application can be as follows: Figure 2 shown.

[0093] If the second weight is recorded as w2, the schematic diagram of a second transaction network diagram provided in the embodiment of the present application can be as follows: Figure 3 shown.

[0094] In addition, the target transaction amount and the number of transactions usually have a large range of values, which may affect the efficiency of subsequently determining the user set and the merchant set based on the first transaction network graph and the second transaction network graph. Therefore, in order to improve the efficiency of subsequently determining the user set and the merchant set based on the first transaction network graph and the second transaction network graph, in some embodiments, the above S130 may specifically include:

[0095] Based on the activation function, the target transaction amount is mapped between 0 and 1 to obtain the first weight;

[0096] Based on the activation function, the number of transactions is mapped between 0 and 1 to obtain the second weight.

[0097] Here, the activation function may be, for example, a softmax function, a sigmoid function, etc. The expression of the sigmoid function may be as follows:

[0098]

[0099] By substituting the target transaction amount into the activation function, the first weight can be obtained; by substituting the number of transactions into the activation function, the second weight can be obtained.

[0100] In addition, the embodiment of the present application can also first use the target transaction amount as the first initial weight of the first transaction network diagram, and then use the sigmoid function to smooth the first initial weight to obtain the first weight. Similarly, the embodiment of the present application can also first use the number of transactions as the second initial weight of the second transaction network diagram, and then use the sigmoid function to smooth the second initial weight to obtain the second weight. Among them, using the sigmoid function to smooth the first initial weight and / or the second initial weight can increase the discrimination when the first initial weight and / or the second initial weight are in the [0,1) interval, and reduce the discrimination when they are in the [1,+) interval, which naturally plays a segmentation role.

[0101] The embodiment of the present application can ensure the consistency of the value range of the first weight and the second weight by limiting the first weight and the second weight to between 0 and 1, thereby improving the efficiency of subsequent determination of the user set and the merchant set based on the first transaction network diagram and the second transaction network diagram.

[0102] In some embodiments, in S140, the first transaction network graph may include multiple first communities, each of which may include multiple users and multiple merchants that have transacted with the multiple users. Multiple users in the first community may have the same consumption preferences, and multiple merchants in the first community may have the same consumer group. The first community may be determined based on the first weight.

[0103] Similarly, the second transaction network graph may include multiple second communities, each of which may include multiple users and multiple merchants that have transacted with the multiple users. Multiple users in the second community may have the same consumption preferences, and multiple merchants in the second community may have the same consumer group. The second community may be determined based on the second weight.

[0104] After determining the first community, first user information of users in the first community can be obtained, and first user characteristics of users in the first community can be determined based on the first user information. The first user information may include information such as the user's gender and age. Based on this, the first user characteristics may include the first gender percentage and the first average age.

[0105] Similarly, after determining the second community, second user information of users in the second community can be obtained, and second user characteristics of users in the second community can be determined based on the second user information. The second user information may include information such as the user's gender and age. Based on this, the second user characteristics may include the proportion of the second gender and the second average age.

[0106] After determining a plurality of first user features in the first transaction network diagram and a plurality of second user features in the second transaction network diagram, the plurality of first user features and the plurality of second user features may be matched separately to determine whether the first user feature and the second user feature meet the user similarity condition. If a first user feature and a second user feature meet the user similarity condition, the users in the first community corresponding to the first user feature and the users in the second community corresponding to the second user feature may be merged into a user set, and the merchants in the first community and the second community may be merged into a merchant set. The first user feature and the second user feature meeting the user similarity condition may be that the difference between the first gender ratio and the second gender ratio is less than a preset gender ratio threshold, and the difference between the first average age and the second average age is less than a preset age threshold.

[0107] On this basis, in order to improve the efficiency of determining the user set and the merchant set, in some embodiments, such as Figure 4 As shown, the above S140 may specifically include:

[0108] S410: Based on the first weight, using a community discovery algorithm, assign multiple merchant identifiers and multiple user identifiers in the first transaction network graph to multiple first communities, thereby obtaining a third transaction network graph with the first communities as nodes.

[0109] S420: Based on the second weight, using a community discovery algorithm, assign the plurality of merchant identifiers and the plurality of user identifiers in the second transaction network graph to a plurality of second communities, thereby obtaining a fourth transaction network graph with the second communities as nodes.

[0110] S430: For the target first community in the third transaction network diagram, determine a target second community in the fourth transaction network diagram that meets a community similarity condition with the target first community, where the target first community is any one of the multiple first communities;

[0111] S440: Determine users in the target first community and users in the target second community as a set of users whose user characteristics meet user similarity conditions;

[0112] S450: Determine merchants in the target first community and merchants in the target second community as a set of merchants that have conducted transactions with users in the user set.

[0113] Community discovery algorithms can uncover valuable information hidden within massive amounts of data. These algorithms include the Louvain algorithm, the Label Propagation Algorithm (LPA), and the Girvan-Newman (GN) algorithm. The core idea of ​​the Louvain algorithm is to partition all nodes so that the sum of the weights within a community is as large as possible, while the sum of the weights of the connection points with external communities is as small as possible. This algorithm offers advantages such as fast convergence, simplicity, and effectiveness.

[0114] Taking the Louvain algorithm as an example, in some embodiments, based on the first weight, the community discovery algorithm is used to assign multiple merchant identifiers and multiple user identifiers in the first transaction network graph to multiple first communities, thereby obtaining a third transaction network graph with the first community as a node. Specifically, the following steps may be performed:

[0115] Initializing a plurality of nodes in the first transaction network graph as a community respectively, wherein the plurality of nodes include a plurality of merchant identifiers and a plurality of user identifiers;

[0116] Iterate over multiple nodes and perform the following operations on each node:

[0117] Move the node to the first subcommunity where the node's adjacent nodes are located in sequence, to obtain multiple second subcommunities;

[0118] Calculating modularity gains corresponding to the plurality of second subcommunities based on the first weight to obtain a plurality of modularity gains;

[0119] When the modularity gain with the largest value among the multiple modularity gains is greater than a preset threshold, determining the second subcommunity corresponding to the modularity gain with the largest value as the third subcommunity including the node;

[0120] Take the third subcommunity as a node, return and traverse multiple nodes, and perform the following operations on each node until the community to which the node belongs no longer changes, thereby obtaining multiple first communities;

[0121] Construct a third transaction network graph with the first community as the node.

[0122] Here, the modularity gain can be calculated by the following formula (2):

[0123]

[0124] In formula (2), ΔQ may represent the modularity gain, m may represent the sum of the weights of all edges in the first transaction network graph, ∑in may represent the sum of the weights of all edges in the second subcommunity, and ∑tot may represent the sum of the weights of the edges connected to the nodes in the second subcommunity.

[0125] In addition, the preset threshold value may be, for example, 0, 0.5, 1, etc. In addition, the community to which the node belongs no longer changes may mean that even if the node is moved into a certain community, the modularity of the community no longer increases, or the increase is less than the preset threshold value.

[0126] In the third transaction network graph, the weight of the edge between nodes may be the sum of the weights of all edges connecting the two first communities.

[0127] Based on the second weight, a community discovery algorithm is used to assign multiple merchant identifiers and multiple user identifiers in the second transaction network graph to multiple second communities. The specific method of obtaining a fourth transaction network graph with the second communities as nodes can be found in the above description and will not be repeated here.

[0128] After obtaining the first community and the second community, a community tag can be added to each community (including the first community and the second community). Among them, the community tag can be determined based on the user information of the users in the community and the merchant information of the merchants. User information may include gender and age, and merchant information may include the name of the merchant. The merchant's name may contain the merchant's category information and / or brand information. In this way, by performing statistical analysis on the user information corresponding to multiple user identifiers in the community, the average age and male-female ratio of users in the community can be obtained. By analyzing the names of multiple merchants in the community, the category information and / or brand information of the merchants in the community can be determined.

[0129] For example, a community's tags might include: the average user age is 40, 62% are female and 38% are male, and the merchant categories include beauty, hairdressing, nail art, and jewelry. Because beauty, hairdressing, nail art, and jewelry often reflect the spending habits of 40-year-old women in some scenarios, community tags can also help determine whether the community's divisions are reasonable.

[0130] After obtaining the third transaction network and the fourth transaction network graph, each first community in the third transaction network can be matched with each second community in the fourth transaction network graph to find the first community and the second community that meet the community similarity condition. Among them, the two communities meeting the community similarity condition can mean that the two communities have both similarities and differences. The two communities meeting the community similarity condition can include that the number of overlapping users in the two communities is large and / or the number of overlapping businesses in the two communities is large. In addition, if the two communities meet the community similarity condition, the user characteristics of the users in the two communities can meet the user similarity condition. That is, if the number of overlapping users in the two communities is large and / or the number of overlapping businesses in the two communities is large, the difference between the gender proportions of users in the two communities can be less than the preset gender proportion threshold, and the difference between the average ages of users in the two communities can be less than the preset age threshold.

[0131] As an example, for a target first community (i.e., any one of multiple first communities) in a third trading network, the target first community can be matched with multiple second communities in a fourth trading network to determine whether the target first community and the second community meet the community similarity condition. If so, the second community can be determined as the target second community. The target second community can be one or more, and this is not limited here.

[0132] As described above, if two communities meet the community similarity condition, then the user characteristics of users in the two communities can also meet the user similarity condition. Therefore, for each pair of target first and target second communities, since both communities meet the community similarity condition, the users in the target first community and the users in the target second community can be determined as a set of users whose user characteristics meet the user similarity condition, and the merchants in the target first community and the merchants in the target second community can be determined as a set of merchants that have transacted with the users in the user set.

[0133] In an embodiment of the present application, since if two communities meet the community similarity condition, the user characteristics of the users in the two communities can meet the user similarity condition, therefore, by determining whether the two communities meet the community similarity condition based on the large number of overlapping users in the two communities and / or the overlapping number of merchants in the two communities, compared to determining whether the user characteristics of the users in the two communities meet the user similarity condition based on the user information of the users in the two communities, the process of obtaining user information, determining user characteristics based on the user information, and matching the user characteristics in the two communities can be saved, thereby improving the efficiency of determining the user set and the merchant set.

[0134] Based on this, in order to ensure the accuracy of determining whether two communities meet the community similarity condition, in some embodiments, Figure 5As shown, for the target first community in the third transaction network diagram, determining the target second community in the fourth transaction network diagram that meets the community similarity condition with the target first community may specifically include:

[0135] S510: Acquire a first user set in a target first community and a second user set in a target second community;

[0136] S520: Determine the intersection of the first user set and the second user set as a third user set;

[0137] S530. If the size relationship between the number of users in the third user set and the target number of users meets the first preset condition, determine the second community as a target second community that meets the community similarity condition with the target first community, the target number of users being the smaller of the first number of users and the second number of users, the first number of users being the number of users in the first user set, and the second number of users being the number of users in the second user set.

[0138] Here, the first user set includes all user IDs in the target first community, the second user set includes all user IDs in the second community, and the user IDs in the third user set may exist in both the first and second user sets. After determining the first, second, and third user sets, the number of user IDs in each of the three user sets can be obtained to determine the number of users in the three user sets. Users and user IDs may have a one-to-one correspondence.

[0139] Furthermore, if the number of users in the third user set is recorded as the third user number, then the relationship between the third user number and the target user number that satisfies the first preset condition can be that the third user number is greater than half of the target user number, or greater than three-quarters of the target user number. If the third user number is greater than half of the target user number, or greater than three-quarters of the target user number, it can be determined that the target first community and the second community have a significant number of overlapping users, and the second community can then be determined as a target second community that meets the community similarity condition with the target first community.

[0140] For example, if the target first community includes 2071 user identifiers (i.e., the first user set includes 2071 user identifiers), the second community includes 542 user identifiers (i.e., the second user set includes 542 user identifiers), and the third user set includes 486 user identifiers, then since 486 is greater than half of 542, the second community can be determined as a target second community that meets the community similarity condition with the target first community.

[0141] In this embodiment of the present application, when the size relationship between the number of users in the third user set and the number of target users meets the first preset condition, the second community is determined as the target second community that meets the community similarity condition with the target first community. This ensures the accuracy of determining whether the two communities meet the community similarity condition.

[0142] Based on this, in order to ensure the accuracy of determining whether two communities meet the community similarity condition, in some embodiments, for the target first community in the third transaction network diagram, determining the target second community in the fourth transaction network diagram that meets the community similarity condition with the target first community may specifically include:

[0143] Obtaining a first merchant set in a target first community and a second merchant set in a second community;

[0144] Determine the intersection of the first merchant set and the second merchant set as a third merchant set;

[0145] When the size relationship between the number of merchants in the third merchant set and the target number of merchants meets the third preset condition, the second community is determined as a target second community that meets the community similarity condition with the target first community, the target number of merchants is the smaller of the first number of merchants and the second number of merchants, the first number of merchants is the number of merchants in the first merchant set, and the second number of merchants is the number of merchants in the second merchant set.

[0146] Here, the first merchant set may include all merchant identifiers in the target first community, the second merchant set may include all merchant identifiers in the second community, and the merchant identifiers in the third merchant set may exist in both the first merchant set and the second merchant set. After determining the first merchant set, the second merchant set, and the third merchant set, the number of merchant identifiers in each of the three merchant sets may be obtained to determine the number of merchants in the three merchant sets. Merchants and merchant identifiers may have a one-to-one correspondence.

[0147] Furthermore, if the number of merchants in the third merchant set is recorded as the third merchant number, then the relationship between the third merchant number and the target merchant number that satisfies the third preset condition can be that the third merchant number is greater than half of the target merchant number, or greater than three-quarters of the target merchant number. If the third merchant number is greater than half of the target merchant number, or greater than three-quarters of the target merchant number, it can be determined that the target first community and the second community have a relatively large number of overlapping merchants, and the second community can then be determined as a target second community that meets the community similarity condition with the target first community.

[0148] In the embodiment of the present application, when the size relationship between the number of merchants in the third merchant set and the number of target merchants meets the third preset condition, the second community is determined as the target second community that meets the community similarity condition with the target first community, thereby ensuring the accuracy of determining whether the two communities meet the community similarity condition.

[0149] In addition, in order to ensure the accuracy of determining whether two communities meet the community similarity condition, in some embodiments, Figure 6 As shown, for the target first community in the third transaction network diagram, determining the target second community in the fourth transaction network diagram that meets the community similarity condition with the target first community may specifically include:

[0150] S610: Acquire a first user set in a target first community and a second user set in a target second community;

[0151] S620: Determine the intersection of the first user set and the second user set as a third user set;

[0152] S630: Determine a union of the first user set and the second user set as a fourth user set;

[0153] S640: If the size relationship between the number of users in the third user set and the number of users in the fourth user set meets a second preset condition, determine the second community as a target second community that meets a community similarity condition with the target first community.

[0154] Here, if the number of users in the third user set is recorded as the third user number, and the number of users in the fourth user set is recorded as the fourth user number, then the relationship between the third user number and the fourth user number can satisfy the second preset condition by requiring that the third user number is greater than half of the fourth user number, or greater than three-quarters of the fourth user number. If the third user number is half of the fourth user number, or greater than three-quarters of the fourth user number, then it can be determined that the target first community and the second community have a large number of overlapping users, and the second community can then be determined as a target second community that meets the community similarity condition with the target first community.

[0155] In addition, the specific implementation methods of the steps in the embodiments of the present application can be found in the above description and will not be repeated here.

[0156] In this embodiment of the present application, when the size relationship between the number of users in the third user set and the number of users in the fourth user set meets the second preset condition, the second community is determined to be a target second community that meets the community similarity condition with the target first community. This ensures the accuracy of determining whether two communities meet the community similarity condition.

[0157] Based on this, in order to ensure the accuracy of determining whether two communities meet the community similarity condition, in some embodiments, for the target first community in the third transaction network diagram, determining the target second community in the fourth transaction network diagram that meets the community similarity condition with the target first community may specifically include:

[0158] Obtaining a first merchant set in a target first community and a second merchant set in a second community;

[0159] Determine the intersection of the first merchant set and the second merchant set as a third merchant set;

[0160] Determine a union of the first merchant set and the second merchant set as a fourth merchant set;

[0161] When the size relationship between the number of merchants in the third merchant set and the number of merchants in the fourth merchant set meets a fourth preset condition, the second community is determined as a target second community that meets a community similarity condition with the target first community.

[0162] Here, if the number of merchants in the third merchant set is recorded as the third merchant number, and the number of merchants in the fourth merchant set is recorded as the fourth merchant number, then the relationship between the third merchant number and the fourth merchant number can satisfy the fourth preset condition by being greater than half of the fourth merchant number, or greater than three-quarters of the fourth merchant number. If the third merchant number is greater than half of the fourth merchant number, or greater than three-quarters of the fourth merchant number, then it can be determined that the target first community and the second community have a large number of overlapping merchants, and the second community can then be determined as a target second community that meets the community similarity condition with the target first community.

[0163] For example, if the target first community and the second community have a total of 156 businesses, and 70 of them overlap, then since 70 is greater than half of 156, the second community can be determined as the target second community that meets the community similarity condition with the target first community.

[0164] In addition, the specific implementation methods of the steps in the embodiments of the present application can be found in the above description and will not be repeated here.

[0165] In the embodiment of the present application, when the size relationship between the number of merchants in the third merchant set and the number of merchants in the fourth merchant set meets the fourth preset condition, the second community is determined to be a target second community that meets the community similarity condition with the target first community, thereby ensuring the accuracy of determining whether two communities meet the community similarity condition.

[0166] In addition, after determining that the two communities meet the community similarity condition based on the number of overlapping users and / or merchants in the two communities, user features of users in the two communities can be obtained separately and matched to assist in verifying whether the target first community and the target second community meet the community similarity condition.

[0167] For example, if a target second community that meets the community similarity condition with the target first community has been determined, and the average age of users in the target first community is 43.2414 years old, with males accounting for 51.52% and females accounting for 48.48%; and the average age of users in the target second community is 43.2196 years old, with males accounting for 46.13% and females accounting for 53.87%, then it can be further determined whether the target first community and the target second community meet the community similarity condition.

[0168] In some embodiments, in S150, after determining a user set whose user characteristics meet user similarity conditions in the first transaction network diagram and the second transaction network diagram, and a merchant set that has conducted transactions with the users in the user set, merchants in the merchant set can be recommended to the users in the user set.

[0169] As an example, after determining the target first community and its corresponding target second community, merchants in the target first community and the target second community may be recommended to users in the target first community and the target second community.

[0170] In addition, as mentioned above, multiple merchants belong to the same business district. In addition, this application can be applied to the scenario of using an application to recommend merchants to users. Based on this, in order to further improve the user's experience of using the application, in some embodiments, such as Figure 7 As shown, after the above S140, the method may further include:

[0171] S710, obtaining category information and brand information of merchants in the merchant set;

[0172] S720: Recommend merchants outside the business circle to users in the user set based on the category information and brand information.

[0173] Here, the category information can be determined based on the category keyword or the merchant category code (MCC). Category keywords may include, for example, apparel, technology, sports, fitness, footwear, toys, health, glasses, coffee, culture and media, cosmetics, pets, film and television, beauty, hairdressing, music, art, textiles, photography, education, sportswear, and movies.

[0174] In this way, by recommending merchants outside the business circle to users in the user set based on category information and brand information, the recommended merchants are not limited to the business circle, further improving the user experience of the application.

[0175] In addition, this application can be applied to scenarios where an application is used to recommend users to merchants. Based on this, in order to improve the merchant's experience of using the application, in some embodiments, such as Figure 8 As shown, after the above S140, the method may further include:

[0176] S810. Obtain user information of users in the user set;

[0177] S820: Determine characteristic information of users in the user set based on the user information;

[0178] S830: Recommend the user to merchants in the merchant set based on the feature information.

[0179] Here, user information may include the user's gender and age. Feature information may include the average age and male-female ratio of users in the user set.

[0180] In this way, by recommending users to merchants in the merchant set based on feature information, the merchant's experience of using the application can be improved.

[0181] Based on the above embodiments, the merchant recommendation method in the embodiment of the present application can be applied to a merchant recommendation system. The merchant recommendation system provided by the embodiment of the present application is introduced below.

[0182] like Figure 9 As shown, the merchant recommendation system provided in the embodiment of the present application may include a business district merchant extraction module 91, a merchant transaction extraction module 92, a transaction graph construction module 93, a transaction graph construction module 94, a community discovery module 95, a community discovery module 96 and a merchant recommendation module 97.

[0183] The business district merchant extraction module 91 may be used to extract multiple merchants from the business district, and the merchant transaction extraction module 92 may be used to extract transaction information from the merchant's transaction details within a target period for each merchant.

[0184] The transaction graph construction module 93 can be configured to construct edges between user identifiers and merchant identifiers with which transactions have occurred, using the multiple user identifiers and merchant identifiers in the transaction information as nodes, and to determine first weights for the edges based on the target transaction amounts in the transaction information, thereby constructing a first transaction network graph. The transaction graph construction module 94 can be configured to construct edges between user identifiers and merchant identifiers with which transactions have occurred, using the multiple user identifiers and merchant identifiers in the transaction information as nodes, and to determine second weights for the edges based on the number of transactions in the transaction information, thereby constructing a second transaction network graph.

[0185] The community discovery module 95 can be configured to, based on the first weights, utilize a community discovery algorithm to assign multiple merchant identifiers and multiple user identifiers in the first transaction network graph to multiple first communities, thereby obtaining a third transaction network graph with the first communities as nodes. The community discovery module 96 can be configured to, based on the second weights, utilize a community discovery algorithm to assign multiple merchant identifiers and multiple user identifiers in the second transaction network graph to multiple second communities, thereby obtaining a fourth transaction network graph with the second communities as nodes.

[0186] The merchant recommendation module 97 can be configured to determine, in the fourth transaction network diagram, a target second community that satisfies a community similarity condition with the target first community, with respect to the target first community in the third transaction network diagram, and recommend merchants in the target first community and the target second community to users in the target first community and the target second community, where the target first community is any one of the plurality of first communities.

[0187] Thus, by using merchant identification and user identification as nodes and constructing the first transaction network graph and the second transaction network graph based on transaction information, compared to determining a one-dimensional vector or a two-dimensional matrix based on transaction information, it is possible to fully consider the association relationship between nodes when recommending merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining the first weight of the edge in the first transaction network graph according to the target transaction amount, and determining the second weight of the edge in the second transaction network graph according to the number of transactions, that is, by determining different transaction network graphs based on different transaction dimensions (including transaction amount and number of transactions), it is possible to provide more dimensional reference information for subsequent recommended merchants, thereby improving the matching degree between subsequent recommended merchants and users. By using a community discovery algorithm, it is possible to mine valuable information hidden in massive data, discover the first community in the first transaction network graph, and discover the second community in the second transaction network graph.

[0188] By determining, based on the first weight and the second weight, a set of users whose user characteristics meet the user similarity condition in the first transaction network graph and the second transaction network graph, and a set of merchants that have transacted with the users in the user set, that is, by jointly determining, based on transaction information in multiple transaction dimensions and the association relationship between multiple nodes, a set of users whose user characteristics meet the user similarity condition and a set of merchants that have transacted with the users in the user set in multiple transaction network graphs, the matching degree between the user set and the merchant set can be improved. In this way, by recommending merchants in the merchant set to users in the user set, the matching degree between the recommended merchants and the users can be improved. By determining, in the fourth transaction network graph, a target second community that meets the community similarity condition with the target first community for the target first community, and recommending merchants in the target first community and the target second community to users in the target first community and the target second community, the matching degree between the recommended merchants and the users can be improved by comprehensively considering the transaction information in multiple transaction dimensions and the association relationship between multiple nodes when recommending merchants.

[0189] Based on the merchant recommendation method provided in the above embodiment, the present application also provides a specific implementation of a merchant recommendation device. Please refer to the following embodiment.

[0190] like Figure 10 As shown, the merchant recommendation device 1000 provided in this embodiment of the application includes the following modules:

[0191] A first acquisition module 1010 is configured to acquire transaction information of multiple merchants within a target period, wherein the transaction information includes the merchant identifier of the merchant, the user identifier of the user transacting with the merchant, the number of transactions between the merchant and the user, and the target transaction amount;

[0192] A construction module 1020 is configured to construct a first transaction network graph and a second transaction network graph based on transaction information, using the merchant identifier and the user identifier as nodes;

[0193] A first determining module 1030 is configured to determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and to determine a second weight of an edge in the second transaction network graph according to the number of transactions;

[0194] A second determining module 1040 is configured to determine, based on the first weight and the second weight, a set of users in the first transaction network graph and the second transaction network graph whose user characteristics meet the user similarity condition, and a set of merchants that have transacted with the users in the user set;

[0195] The first recommendation module 1050 is configured to recommend merchants in the merchant set to users in the user set.

[0196] The merchant recommendation device 1000 is described in detail below.

[0197] In some embodiments, the second determining module 1040 may specifically include:

[0198] a first partitioning submodule, configured to classify the plurality of merchant identifiers and the plurality of user identifiers in the first transaction network graph into a plurality of first communities using a community discovery algorithm based on the first weight, thereby obtaining a third transaction network graph with the first communities as nodes;

[0199] a second partitioning submodule, configured to classify the plurality of merchant identifiers and the plurality of user identifiers in the second transaction network graph into a plurality of second communities using a community discovery algorithm based on the second weight, thereby obtaining a fourth transaction network graph with the second communities as nodes;

[0200] A first determining submodule is configured to determine, in a fourth transaction network diagram, a target second community that satisfies a community similarity condition with the target first community, with respect to the target first community in the third transaction network diagram, where the target first community is any one of the plurality of first communities;

[0201] A second determining submodule is configured to determine users in the target first community and users in the target second community as a set of users whose user characteristics meet a user similarity condition;

[0202] The third determining submodule is configured to determine merchants in the target first community and merchants in the target second community as a set of merchants that have conducted transactions with users in the user set.

[0203] In some embodiments, the first determining submodule may specifically include:

[0204] A first acquisition unit is configured to acquire a first set of users in a target first community and a second set of users in a target second community;

[0205] A first determining unit, configured to determine an intersection of the first user set and the second user set as a third user set;

[0206] The second determining unit is configured to determine the second community as a target second community that satisfies a community similarity condition with the target first community when a size relationship between the number of users in the third user set and the target number of users satisfies a first preset condition, the target number of users being the smaller of the first number of users and the second number of users, the first number of users being the number of users in the first user set, and the second number of users being the number of users in the second user set.

[0207] In some embodiments, the first determining submodule may specifically include:

[0208] A first acquisition unit is configured to acquire a first set of users in a target first community and a second set of users in a target second community;

[0209] A first determining unit, configured to determine an intersection of the first user set and the second user set as a third user set;

[0210] a third determining unit, configured to determine a union of the first user set and the second user set as a fourth user set;

[0211] The fourth determining unit is configured to determine the second community as a target second community that meets a community similarity condition with the target first community if the size relationship between the number of users in the third user set and the number of users in the fourth user set meets a second preset condition.

[0212] In some embodiments, the first division submodule may specifically include:

[0213] an initialization unit, configured to initialize a plurality of nodes in the first transaction network graph into a community, wherein the plurality of nodes include a plurality of merchant identifiers and a plurality of user identifiers;

[0214] The execution unit is used to traverse multiple nodes and perform the following operations on each node:

[0215] The node is sequentially moved to the first subcommunity where the node's adjacent nodes are located, obtaining multiple second subcommunities; the modularity gains corresponding to the multiple second subcommunities are calculated based on the first weight to obtain multiple modularity gains; if the modularity gain with the largest value among the multiple modularity gains is greater than a preset threshold, the second subcommunity corresponding to the largest modularity gain is determined as the third subcommunity including the node; the third subcommunity is treated as a node, and the multiple nodes are traversed back and forth, performing the following operations on each node until the community to which the node belongs no longer changes, thereby obtaining multiple first communities;

[0216] A construction unit is used to construct a third transaction network graph with the first community as a node.

[0217] In some embodiments, the first determining module 1030 may specifically include:

[0218] A first mapping submodule is configured to map the target transaction amount to a value between 0 and 1 based on an activation function to obtain a first weight;

[0219] The second mapping submodule is used to map the number of transactions to between 0 and 1 based on the activation function to obtain a second weight.

[0220] In some embodiments, multiple merchants belong to the same business district. Based on this, the merchant recommendation device 1000 may further include:

[0221] a second acquisition module configured to, after determining, based on the first weight and the second weight, a user set whose user characteristics satisfy the user similarity condition in the first transaction network graph and the second transaction network graph, and a merchant set that has transacted with the users in the user set, acquire category information and brand information of merchants in the merchant set;

[0222] The second recommendation module is used to recommend businesses outside the business circle to users in the user set based on category information and brand information.

[0223] In some embodiments, the merchant recommendation device 1000 may further include:

[0224] A third acquisition module is configured to obtain user information of users in the user set after determining, based on the first weight and the second weight, a user set whose user characteristics satisfy the user similarity condition in the first transaction network graph and the second transaction network graph, and a merchant set that has conducted transactions with the users in the user set;

[0225] A third determining module, configured to determine characteristic information of users in the user set based on the user information;

[0226] The third recommendation module is used to recommend users to merchants in the merchant set based on feature information.

[0227] In some embodiments, each merchant corresponds to at least one merchant terminal. Based on this, the first acquisition module 1010 may specifically include:

[0228] The execution submodule is used to perform the following operations for each merchant:

[0229] Obtaining transaction records of at least one merchant terminal within a target period, the transaction records including the merchant identifier of the merchant, the user identifier of the user transacting with the merchant, the transaction time and the transaction amount between the merchant and the user; determining the transaction record corresponding to the at least one merchant terminal as the transaction record corresponding to the merchant; performing statistical analysis on the transaction time and the transaction amount based on the merchant identifier and the user identifier to determine the number of transactions and the target transaction amount between the merchant and the user; and determining transaction information based on the merchant identifier, the user identifier, the number of transactions and the target transaction amount.

[0230] In some embodiments, multiple merchants belong to the same business district. Based on this, the merchant recommendation device 1000 may further include:

[0231] A fourth acquisition module is configured to acquire a plurality of target merchant sets within the business circle before acquiring transaction information of a plurality of merchants within a target period, wherein the plurality of target merchant sets are determined by different merchant acquisition methods;

[0232] The fourth determining module is configured to determine a plurality of merchants according to a union of a plurality of target merchant sets.

[0233] In some embodiments, the fourth acquisition module is specifically configured to:

[0234] Obtain identification information of the business district and first address information of the merchant; determine the address keyword corresponding to the business district based on the correspondence between the identification information and the address keyword; determine the first target merchant including the address keyword in the first address information based on a fuzzy matching algorithm; and determine a target merchant set based on the first target merchant.

[0235] In some embodiments, the fourth acquisition module is specifically used to: obtain first longitude and latitude information of the business district and second longitude and latitude information of the merchant; determine the target area in the map based on the first longitude and latitude information; determine the second target merchant in the target area based on the second longitude and latitude information; and determine the target merchant set based on the second target merchant.

[0236] In the merchant recommendation device of the embodiment of the present application, since the relationship between users and merchants is usually many-to-many, by using merchant identifiers and user identifiers as nodes and constructing a first transaction network diagram and a second transaction network diagram based on transaction information, compared to determining a one-dimensional vector or a two-dimensional matrix based on transaction information, it is possible to fully consider the association relationship between nodes when recommending merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining the first weight of the edge in the first transaction network diagram based on the target transaction amount, and determining the second weight of the edge in the second transaction network diagram based on the number of transactions, that is, by determining different transaction network diagrams based on different transaction dimensions (including transaction amount and number of transactions), it is possible to provide more dimensional reference information for subsequent recommended merchants, thereby improving the matching degree between subsequent recommended merchants and users. By determining, based on the first weight and the second weight, a set of users whose user characteristics meet the user similarity condition in the first transaction network graph and the second transaction network graph, as well as a set of merchants that have transacted with the users in the user set, that is, by jointly determining, based on transaction information in multiple transaction dimensions and the association relationships between multiple nodes, a set of users whose user characteristics meet the user similarity condition and a set of merchants that have transacted with the users in the user set in multiple transaction network graphs, the matching degree between the user set and the merchant set can be improved. In this way, by recommending merchants in the merchant set to users in the user set, the matching degree between the recommended merchants and the users can be improved.

[0237] Based on the merchant recommendation method provided in the above embodiment, the embodiment of the present application also provides a specific implementation of the electronic device. Figure 11 A schematic diagram of an electronic device 1100 provided in an embodiment of the present application is shown.

[0238] The electronic device 1100 may include a processor 1110 and a memory 1120 storing computer program instructions.

[0239] Specifically, the processor 1110 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0240] The memory 1120 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 1120 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 1120 may include removable or non-removable (or fixed) media. Where appropriate, the memory 1120 may be internal or external to the electronic device 1100. In a particular embodiment, the memory 1120 is a non-volatile solid-state memory.

[0241] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.

[0242] The processor 1110 implements any one of the merchant recommendation methods in the above embodiments by reading and executing computer program instructions stored in the memory 1120 .

[0243] In one example, the electronic device 1100 may further include a communication interface 1130 and a bus 1140. Figure 11 As shown, the processor 1110 , the memory 1120 , and the communication interface 1130 are connected via a bus 1140 and communicate with each other.

[0244] The communication interface 1130 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0245] Bus 1140 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 1140 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0246] Illustratively, the electronic device 1100 may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).

[0247] The electronic device can execute the merchant recommendation method in the embodiment of the present application, thereby realizing the combination Figures 1 to 10 Described merchant recommendation method and device.

[0248] In addition, in conjunction with the merchant recommendation method in the above embodiments, embodiments of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the merchant recommendation methods in the above embodiments is implemented.

[0249] In combination with the merchant recommendation method in the above embodiments, the present application can provide a computer program product for implementation. When the instructions in the computer program product are executed by a processor of an electronic device, any of the merchant recommendation methods in the above embodiments is implemented.

[0250] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0251] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0252] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0253] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.

[0254] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A merchant recommendation method, characterized in that: include: Acquiring transaction information of a plurality of merchants within a target period, the transaction information including merchant identifiers of the merchants, user identifiers of users transacting with the merchants, the number of transactions between the merchants and the users, and target transaction amounts; Taking the merchant identifier and the user identifier as nodes, constructing a first transaction network graph and a second transaction network graph based on the transaction information; Determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and determine a second weight of an edge in the second transaction network graph according to the number of transactions; Based on the first weight and the second weight, determining a user set in the first transaction network graph and the second transaction network graph whose user characteristics meet the user similarity condition, and a merchant set that has transacted with the users in the user set; Merchants in the merchant set are recommended to users in the user set.

2. The method according to claim 1, characterized in that The determining, based on the first weight and the second weight, a user set in the first transaction network graph and the second transaction network graph whose user characteristics meet the user similarity condition, and a merchant set that has transacted with the users in the user set includes: Based on the first weights, using a community discovery algorithm, assigning the plurality of merchant identifiers and the plurality of user identifiers in the first transaction network graph to a plurality of first communities, thereby obtaining a third transaction network graph with the first communities as nodes; Based on the second weights, using a community discovery algorithm, assigning the plurality of merchant identifiers and the plurality of user identifiers in the second transaction network graph to a plurality of second communities, thereby obtaining a fourth transaction network graph with the second communities as nodes; For the target first community in the third transaction network diagram, determining a target second community in the fourth transaction network diagram that meets a community similarity condition with the target first community, where the target first community is any one of the multiple first communities; determining users in the target first community and users in the target second community as a set of users whose user characteristics meet a user similarity condition; Merchants in the target first community and merchants in the target second community are determined as a set of merchants that have conducted transactions with users in the user set.

3. The method according to claim 2, characterized in that The determining, in the fourth transaction network diagram, a target second community that satisfies a community similarity condition with the target first community in the third transaction network diagram, includes: Acquire a first user set in the target first community and a second user set in the second community; determining an intersection of the first user set and the second user set as a third user set; When a size relationship between the number of users in the third user set and the target number of users satisfies a first preset condition, the second community is determined as a target second community that satisfies a community similarity condition with the target first community, the target number of users is the smaller of the first number of users and the second number of users, the first number of users is the number of users in the first user set, and the second number of users is the number of users in the second user set.

4. The method according to claim 2, characterized in that The determining, in the fourth transaction network diagram, a target second community that satisfies a community similarity condition with the target first community in the third transaction network diagram, includes: Acquire a first user set in the target first community and a second user set in the second community; determining an intersection of the first user set and the second user set as a third user set; determining a union of the first user set and the second user set as a fourth user set; When the size relationship between the number of users in the third user set and the number of users in the fourth user set meets a second preset condition, the second community is determined as a target second community that meets a community similarity condition with the target first community.

5. The method according to claim 2, characterized in that The method further comprises: assigning the plurality of merchant identifiers and the plurality of user identifiers in the first transaction network graph to a plurality of first communities using a community discovery algorithm based on the first weights, thereby obtaining a third transaction network graph with the first communities as nodes, including: Initializing a plurality of nodes in the first transaction network graph as a community respectively, wherein the plurality of nodes include a plurality of the merchant identifiers and a plurality of the user identifiers; Traverse the multiple nodes and perform the following operations on each node: Moving the node sequentially to the first subcommunity where the neighboring nodes of the node are located, to obtain multiple second subcommunities; Calculating modularity gains corresponding to the plurality of second subcommunities based on the first weight to obtain a plurality of modularity gains; When the modularity gain with the largest value among the multiple modularity gains is greater than a preset threshold, determining the second subcommunity corresponding to the modularity gain with the largest value as the third subcommunity including the node; Taking the third subcommunity as a node, returning to traverse the multiple nodes, performing the following operations on each node until the community to which the node belongs no longer changes, thereby obtaining the multiple first communities; The third transaction network graph is constructed with the first community as a node.

6. The method according to any one of claims 1 to 5, characterized in that The determining of the first weight of the edge in the first transaction network graph according to the target transaction amount, and the determining of the second weight of the edge in the second transaction network graph according to the number of transactions, includes: Based on the activation function, mapping the target transaction amount to between 0 and 1 to obtain the first weight; Based on the activation function, the number of transactions is mapped to between 0 and 1 to obtain the second weight.

7. The method according to any one of claims 1 to 5, characterized in that The multiple merchants belong to the same business district, and after determining, based on the first weight and the second weight, a user set whose user characteristics meet a user similarity condition in the first transaction network graph and the second transaction network graph, and a merchant set that has conducted transactions with the users in the user set, the method further includes: Obtain category information and brand information of merchants in the merchant set; Based on the category information and brand information, merchants outside the business circle are recommended to users in the user set.

8. The method according to any one of claims 1 to 5, characterized in that After determining, based on the first weight and the second weight, a set of users whose user characteristics satisfy a user similarity condition in the first transaction network graph and the second transaction network graph, and a set of merchants that have transacted with users in the user set, the method further includes: Obtain user information of users in the user set; determining characteristic information of users in the user set based on the user information; Based on the feature information, the user is recommended to merchants in the merchant set.

9. The method according to any one of claims 1 to 5, characterized in that Each of the merchants corresponds to at least one merchant terminal, and obtaining transaction information of the plurality of merchants within a target period includes: For each of these merchants, perform the following actions: Acquiring a transaction record of the at least one merchant terminal within the target period, the transaction record including a merchant identifier of the merchant, a user identifier of a user who transacted with the merchant, a transaction time, and a transaction amount between the merchant and the user; Determining the transaction record corresponding to the at least one merchant terminal as the transaction record corresponding to the merchant; Based on the merchant identifier and the user identifier, statistically analyzing the transaction time and the transaction amount to determine the number of transactions and the target transaction amount between the merchant and the user; The transaction information is determined according to the merchant identifier, the user identifier, the number of transactions, and the target transaction amount.

10. The method according to any one of claims 1 to 5, characterized in that The multiple merchants belong to the same business district. Before obtaining transaction information of the multiple merchants in the target period, the method further includes: Acquire multiple target merchant sets within the business district, where the multiple target merchant sets are determined using different merchant acquisition methods; The multiple merchants are determined according to a union of the multiple target merchant sets.

11. The method according to claim 10, characterized in that Obtain the target merchant set, including: Obtain identification information of the business district and first address information of the merchant; Determining the address keyword corresponding to the business district according to the correspondence between the identification information and the address keyword; Determining a first target merchant including the address keyword in the first address information based on a fuzzy matching algorithm; A target merchant set is determined according to the first target merchant.

12. The method according to claim 10, characterized in that Obtain the target merchant set, including: Obtaining first latitude and longitude information of the business district and second latitude and longitude information of the merchant; Determining a target area on a map based on the first latitude and longitude information; Determining a second target merchant within the target area based on the second latitude and longitude information; A target merchant set is determined based on the second target merchant.

13. A merchant recommendation device, characterized in that: The device comprises: A first acquisition module is configured to acquire transaction information of multiple merchants within a target period, wherein the transaction information includes a merchant identifier of the merchant, a user identifier of a user who transacts with the merchant, a number of transactions between the merchant and the user, and a target transaction amount; A construction module, configured to construct a first transaction network graph and a second transaction network graph based on the transaction information, using the merchant identifier and the user identifier as nodes; a first determining module, configured to determine a first weight of an edge in the first transaction network graph according to the target transaction amount, and to determine a second weight of an edge in the second transaction network graph according to the number of transactions; a second determining module, configured to determine, based on the first weight and the second weight, a set of users whose user characteristics satisfy a user similarity condition in the first transaction network graph and the second transaction network graph, and a set of merchants that have transacted with users in the user set; The first recommendation module is configured to recommend merchants in the merchant set to users in the user set.

14. An electronic device, characterized in that: The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the merchant recommendation method according to any one of claims 1 to 12 is implemented.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the merchant recommendation method according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the merchant recommendation method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Information prediction method and device and storage medium

    CN111984698A

  • Graph neural network model construction method and device, commodity recommendation method and device and equipment

    CN112633978A